From 54f71b7a23365134d7e2981dbe9d161a05c68896 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sun, 21 Aug 2022 15:52:39 +0300 Subject: tree: rename usageprint() to print_usage() Rename macro based on naming rules. --- src/exec-cmd.c | 20 ++++++++++---------- src/output.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/exec-cmd.c b/src/exec-cmd.c index 686ada7..55d3b21 100644 --- a/src/exec-cmd.c +++ b/src/exec-cmd.c @@ -40,7 +40,7 @@ int cmd_init(int argc, char *argv[]) int retval = 0, result; char *gpg_key = argv[2]; if(gpg_key == NULL) { - usageprint("%s", description); + print_usage("%s", description); return 1; } @@ -77,14 +77,14 @@ int cmd_insert(int argc, char *argv[]) case 'f': { flag_force = 1; break; } case 'c': { flag_copy = 1; break; } default: - usageprint("%s", description); + print_usage("%s", description); return 1; } } char *path = argv[optind]; if(path == NULL) { - usageprint("%s", description); + print_usage("%s", description); return 1; } @@ -164,7 +164,7 @@ int cmd_edit(int argc, char *argv[]) char *editor, *password; char *path = argv[1]; if(!path) { - usageprint("%s", description); + print_usage("%s", description); return 1; } @@ -265,14 +265,14 @@ int cmd_generate(int argc, char *argv[]) case 'f': { flag_force = 1; break; } case 'c': { flag_copy = 1; break; } default: - usageprint("%s", description); + print_usage("%s", description); return 1; } } char *path = argv[optind]; if(path == NULL) { - usageprint("%s", description); + print_usage("%s", description); return 1; } @@ -317,7 +317,7 @@ int cmd_remove(int argc, char *argv[]) int result; char *path = argv[1]; if(!path) { - usageprint("%s", description); + print_usage("%s", description); return 1; } @@ -356,13 +356,13 @@ int cmd_move(int argc, char *argv[]) switch(result) { case 'f': { flag_force = 1; break; } default: - usageprint("%s", description); + print_usage("%s", description); return 1; } } if(!argv[optind] || !argv[optind+1]) { - usageprint("%s", description); + print_usage("%s", description); return 1; } @@ -454,7 +454,7 @@ int cmd_showtree(int argc, char *argv[]) case 'c': { flag_copy = 1; break; } case 'C': { flag_color = 0; break; } default: - usageprint("%s", description); + print_usage("%s", description); return 1; } } diff --git a/src/output.h b/src/output.h index 7925e28..314afec 100644 --- a/src/output.h +++ b/src/output.h @@ -22,6 +22,6 @@ #include #define print_error(...) fprintf(stderr, __VA_ARGS__) -#define usageprint(...) fprintf(stderr, "Usage: lpass " __VA_ARGS__) +#define print_usage(...) fprintf(stderr, "Usage: lpass " __VA_ARGS__) #endif /* LPASS_OUTPUT_H */ -- cgit v1.2.3-18-g5258