diff options
author | Joursoir <chat@joursoir.net> | 2021-02-28 11:27:07 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-02-28 11:27:07 +0000 |
commit | 8a84ef9b18b98ee800fac45552ce693e25aba205 (patch) | |
tree | ca6b8d71ae0665fd9320af2895ad3e862be54b7f /src/constants.h | |
parent | 6088f6812ab545198325052b943fe14d7683187d (diff) | |
download | lock-password-8a84ef9b18b98ee800fac45552ce693e25aba205.tar.gz lock-password-8a84ef9b18b98ee800fac45552ce693e25aba205.tar.bz2 lock-password-8a84ef9b18b98ee800fac45552ce693e25aba205.zip |
add header with constants; cmd 'edit' temporarily unavailable; delete all global vars
Diffstat (limited to 'src/constants.h')
-rw-r--r-- | src/constants.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/constants.h b/src/constants.h new file mode 100644 index 0000000..5eb4153 --- /dev/null +++ b/src/constants.h @@ -0,0 +1,35 @@ +#ifndef LPASS_CONSTANTS_H +#define LPASS_CONSTANTS_H + +#define VERSION "1.0c" +#define DATE_RELEASE "14 January, 2021" + +#define LOCKPASS_DIR ".lock-password/" +#define GPGKEY_FILE ".gpg-key" + +#define errprint(RET, ...) \ + do { \ + fprintf(stderr, "Error: " __VA_ARGS__); \ + return RET; \ + } while(0) + +#define usageprint(...) \ + do { \ + fprintf(stdout, "Usage: lpass " __VA_ARGS__); \ + return 1; \ + } while(0) + +#ifdef DEBUG + #define dbgprint(...) fprintf(stderr, "Debug: " __VA_ARGS__) +#else + #define dbgprint(...) +#endif + +enum { + maxlen_texteditor = 16, + minlen_pass = 1, + maxlen_pass = 128, + stdlen_pass = 14 +}; + +#endif /* LPASS_CONSTANTS_H */ |