aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* xstd: move sizeof() into malloc()Joursoir2022-09-081-3/+3
|
* cmd_remove: drop file existence checkJoursoir2022-09-081-6/+0
|
* cmd_remove: drop check for empty fileJoursoir2022-09-081-6/+2
| | | | | | | | | | | From the specification: > If path does not name a directory, remove(path) shall be equivalent to unlink(path). > If path names a directory, remove(path) shall be equivalent to rmdir(path). rmdir() will remove a directory only if it is empty, so drop validation for it.
* xstd: include missing headers for function prototypesJoursoir2022-09-061-0/+2
| | | | | Fix the next warning: > no previous prototype for ‘xstrcat’ [-Wmissing-prototypes]
* r-x11: include missing headers for function prototypesJoursoir2022-09-061-0/+1
| | | | | Fix the next warning: > no previous prototype for ‘run_clipboard’ [-Wmissing-prototypes]
* tree: handle a pointer returned by malloc()Joursoir2022-08-314-1/+28
| | | | | | | | It is wrong to assume that malloc() always returns allocated memory. Unfortunately, it can return NULL. The rest of the code that uses malloc() should be refactored. That's the reason why we can't do it right now.
* exec-cmd: use angle brackets to show that argument should be replacedJoursoir2022-08-311-13/+13
| | | | | | The angle brackets (<>) indicate that the enclosed parameter is mandatory. Man syntax uses italic text for this purpose, but our text is unformatted, so we use characters.
* tree: indent one tab between macro name and valueJoursoir2022-08-314-11/+11
|
* r-gpgme: add macro to print gpgme specific errorJoursoir2022-08-291-4/+6
|
* r-gpgme: drop macro for error handlingJoursoir2022-08-291-21/+0
|
* r-gpgme: handle errors using gotoJoursoir2022-08-291-34/+70
| | | | | To avoid a memory leakages we must release an allocated data. For output error messages use new macro.
* constants: drop macro for error handlingJoursoir2022-08-271-12/+0
| | | | | | | | This is last patch on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* r-x11: replace errprint_*() with print_error()Joursoir2022-08-271-2/+5
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* routines: replace errprint_*() with print_error()Joursoir2022-08-261-1/+2
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* routines: replace errprint_*() with print_error()Joursoir2022-08-261-3/+6
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* routines: replace errprint_*() with print_error()Joursoir2022-08-261-5/+10
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* routines: include wayland code only if DISPLAY isn't definedJoursoir2022-08-251-15/+15
| | | | | This code is unreachable if lock-password is compiled with X11 support. Move it to `else` macro-statement.
* routines: make the path validation error message more informativeJoursoir2022-08-251-2/+1
| | | | | The error message matches the comment before the function, so remove the last one.
* tree: move printing error into check_sneaky_paths()Joursoir2022-08-252-22/+13
| | | | Avoid repeating the same error messages.
* cmd_showtree: use a constant pointer to store the pathJoursoir2022-08-241-13/+4
| | | | No need to allocate memory.
* cmd_showtree: replace errprint_*() with print_error()Joursoir2022-08-241-35/+36
| | | | | | | | | | Handle errors using goto instead of "do { ... } while(0)". This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* cmd_move: replace errprint_*() with print_error()Joursoir2022-08-241-8/+16
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* cmd_remove: replace errprint_*() with print_error()Joursoir2022-08-241-8/+16
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* cmd_generate: replace errprint_*() with print_error()Joursoir2022-08-241-7/+14
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* cmd_edit: replace errprint_*() with print_error()Joursoir2022-08-241-17/+32
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* cmd_insert: initialize password pointersJoursoir2022-08-221-5/+3
| | | | | The standard says: "If ptr is a null pointer, no action occurs". So, remove conditions.
* cmd_insert: replace errprint_*() with print_error()Joursoir2022-08-221-42/+45
| | | | | | | | | | Handle errors using goto instead of "do { ... } while(0)". This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* cmd_init: replace errprint_*() with print_error()Joursoir2022-08-221-5/+9
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* exec-cmd: add macro to print usage optionsJoursoir2022-08-221-10/+12
|
* tree: rename usageprint() to print_usage()Joursoir2022-08-222-11/+11
| | | | Rename macro based on naming rules.
* tree: usageprint() macro no longer returns an error by itselfJoursoir2022-08-223-16/+32
| | | | | | This patch also does: - Moves usageprint() from constants.h to output.h - Returns an error after using useprint() clearly.
* lpass: delete obvious commentsJoursoir2022-08-221-3/+2
|
* lpass: drop unnecessary variableJoursoir2022-08-221-3/+2
|
* lpass: try to change the dir a second time if the dir existsJoursoir2022-08-221-5/+4
| | | | | Let's unite two conditions. So, if mkdir() returns a non-zero value and errno equals EEXIST, we'll give a change and do chdir() again.
* lpass: create root directory only if it doesn't exist.Joursoir2022-08-211-9/+14
| | | | | No need to try to create a directory in other cases, because that won't help.
* lpass: use new macro to output error(s)Joursoir2022-08-211-4/+7
| | | | | | | | This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* tree: introduce header file for outputJoursoir2022-08-211-0/+26
| | | | | | | | | | | The file contains only one macro right now. But it's more convenient if the header with the appropriate name will do output routines. This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
* bump versionv1.2aJoursoir2021-07-041-2/+2
|
* routines: null-terminate a generated passwordJoursoir2021-07-041-0/+1
|
* routines: use new allowed chars to generate a passwordJoursoir2021-07-041-2/+9
|
* bump versionv1.1cJoursoir2021-06-131-2/+2
|
* exec-cmd: help: add info about 'show'Joursoir2021-06-131-1/+4
|
* lpass: add cmd 'show'Joursoir2021-06-131-1/+3
| | | | | | | | | | Now you need to use the following command to list the contents of the password manager: lpass show [passname] If the command name is missing or was typed incorrectly, the 'help' command will be executed and will return 1. It will simplify the program when i add bash completion.
* lpass: call the function of command without argv[0]Joursoir2021-06-122-11/+4
|
* lpass: delete side effectJoursoir2021-06-121-3/+5
|
* rename main.c to lpass.cJoursoir2021-06-121-0/+0
|
* exec-cmd: show: handle argument '--no-color'Joursoir2021-06-111-4/+6
|
* tree: make it possible to control the use of colorJoursoir2021-06-112-6/+9
|
* refactor; set correct headers guardJoursoir2021-03-237-32/+25
|
* move cmd to 'exec-cmd.c', fix some memory leak, macros changesJoursoir2021-03-235-464/+519
|