File src/hstr.c changed (mode: 100644) (index 9bfa827..ede9959) |
... |
... |
void hstr_getopt(int argc, char **argv, Hstr *hstr) |
1413 |
1413 |
} |
} |
1414 |
1414 |
} |
} |
1415 |
1415 |
|
|
|
1416 |
|
void hstr_destroy() |
|
1417 |
|
{ |
|
1418 |
|
favorites_destroy(hstr->favorites); |
|
1419 |
|
hstr_regexp_destroy(&hstr->regexp); |
|
1420 |
|
blacklist_destroy(&hstr->blacklist); |
|
1421 |
|
|
|
1422 |
|
free(hstr); |
|
1423 |
|
} |
|
1424 |
|
|
1416 |
1425 |
int main(int argc, char *argv[]) |
int main(int argc, char *argv[]) |
1417 |
1426 |
{ |
{ |
1418 |
1427 |
setlocale(LC_ALL, ""); |
setlocale(LC_ALL, ""); |
1419 |
1428 |
|
|
1420 |
1429 |
hstr=malloc(sizeof(Hstr)); |
hstr=malloc(sizeof(Hstr)); |
1421 |
|
|
|
1422 |
1430 |
hstr_init(); |
hstr_init(); |
1423 |
1431 |
hstr_get_env_configuration(hstr); |
hstr_get_env_configuration(hstr); |
1424 |
1432 |
hstr_getopt(argc, argv, hstr); |
hstr_getopt(argc, argv, hstr); |
1425 |
1433 |
hstr_init_favorites(hstr); |
hstr_init_favorites(hstr); |
1426 |
1434 |
blacklist_load(&hstr->blacklist); |
blacklist_load(&hstr->blacklist); |
1427 |
|
hstr_main(hstr); |
|
1428 |
1435 |
|
|
1429 |
|
favorites_destroy(hstr->favorites); |
|
1430 |
|
free(hstr); |
|
|
1436 |
|
hstr_main(hstr); |
1431 |
1437 |
|
|
|
1438 |
|
hstr_destroy(); |
1432 |
1439 |
return EXIT_SUCCESS; |
return EXIT_SUCCESS; |
1433 |
1440 |
} |
} |
File src/hstr_blacklist.c changed (mode: 100644) (index 1f7f751..f8b6e66) |
1 |
1 |
/* |
/* |
2 |
2 |
hstr_blacklist.c commands to be skipped from history |
hstr_blacklist.c commands to be skipped from history |
3 |
3 |
|
|
4 |
|
Copyright (C) 2014 Martin Dvorak <martin.dvorak@mindforger.com> |
|
|
4 |
|
Copyright (C) 2014-2017 Martin Dvorak <martin.dvorak@mindforger.com> |
5 |
5 |
|
|
6 |
6 |
Licensed under the Apache License, Version 2.0 (the "License"); |
Licensed under the Apache License, Version 2.0 (the "License"); |
7 |
7 |
you may not use this file except in compliance with the License. |
you may not use this file except in compliance with the License. |