aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2022-08-21 15:52:39 +0300
committerJoursoir <chat@joursoir.net>2022-08-22 00:47:15 +0300
commit54f71b7a23365134d7e2981dbe9d161a05c68896 (patch)
treed3d16a70bb8eb06947b0bfd20a0a4f3156557852
parent3f22a4390ef116593158b4c9b36e923f6d853aee (diff)
downloadlock-password-54f71b7a23365134d7e2981dbe9d161a05c68896.tar.gz
lock-password-54f71b7a23365134d7e2981dbe9d161a05c68896.tar.bz2
lock-password-54f71b7a23365134d7e2981dbe9d161a05c68896.zip
tree: rename usageprint() to print_usage()
Rename macro based on naming rules.
-rw-r--r--src/exec-cmd.c20
-rw-r--r--src/output.h2
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 <stdio.h>
#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 */