aboutsummaryrefslogtreecommitdiffstats
path: root/src/implementation.h
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-02-27 10:43:02 +0000
committerJoursoir <chat@joursoir.net>2021-02-27 10:43:02 +0000
commit6088f6812ab545198325052b943fe14d7683187d (patch)
tree3114e28838dd707cf6093dbf24ae1a6da749902a /src/implementation.h
parentc22e30cb675529f6e5c922bf7561683ab6023c2c (diff)
downloadlock-password-6088f6812ab545198325052b943fe14d7683187d.tar.gz
lock-password-6088f6812ab545198325052b943fe14d7683187d.tar.bz2
lock-password-6088f6812ab545198325052b943fe14d7683187d.zip
refactor code&style; use gpgme, delete fork for gpg; generate/showtree cmd don't use global vars anymore
Diffstat (limited to 'src/implementation.h')
-rw-r--r--src/implementation.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/implementation.h b/src/implementation.h
index 15f21ff..15fc56d 100644
--- a/src/implementation.h
+++ b/src/implementation.h
@@ -3,18 +3,20 @@
#define GPG_PUBLICKEY_MAXLENGTH 1024
-enum asnwers {
- OW_YES = 0,
- OW_NO = 1,
-};
+#define errprint(RET, ...) \
+ do { \
+ fprintf(stderr, "Error: " __VA_ARGS__); \
+ return RET; \
+ } while(0)
+void copy_outside(char *password);
int check_sneaky_paths(const char *path);
-char *getGPGKey();
-char* getPassword(char *path_pass, char *password, size_t size, int flag_copy);
-void nonvisibleEnter(int status);
-int insertPass(char *path, char *password, int flag_copy);
-char *getInput(int minlen, int maxlen);
-char *generatePassword(char *dest, int amount);
-int getOverwriteAnswer(char *path);
+char *get_pubkey();
+char *get_password(const char *path);
+void visible_enter(int status);
+int insert_pass(const char *path, const char *password);
+char *get_input(int minlen, int maxlen);
+void gen_password(char *dest, int amount);
+int overwrite_answer(const char *path);
#endif \ No newline at end of file