aboutsummaryrefslogtreecommitdiffstats
path: root/src/constants.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/constants.h')
-rw-r--r--src/constants.h35
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 */