summaryrefslogtreecommitdiff
path: root/src/shared.c
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-12-27 23:10:06 -0600
committer@syxhe <https://t.me/syxhe>2025-12-27 23:10:06 -0600
commit9bf40160e911dd6c2affa856c375193ae0579947 (patch)
treebeb2a2c4994a797184d048851e430ed659fc272b /src/shared.c
parentc8ab26e9f5aa398a208fcac3d8d11335f6c72632 (diff)
Start working on cryptscan again
Diffstat (limited to 'src/shared.c')
-rw-r--r--src/shared.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shared.c b/src/shared.c
index b6d27e4..1dd0309 100644
--- a/src/shared.c
+++ b/src/shared.c
@@ -29,8 +29,10 @@
29 29
30//! Macro to exit on an alloc error instead of doing the terrible nested if statement that was being used previously 30//! Macro to exit on an alloc error instead of doing the terrible nested if statement that was being used previously
31#define XALLOC_EXIT(msg, ...) do { \ 31#define XALLOC_EXIT(msg, ...) do { \
32 if(___VXGG___VERBOSE_ERRORS___) error(EXIT_FAILURE, errno, (msg)__VA_ARGS__); \ 32 if(___VXGG___VXALLOC_EXIT_ON_ERROR___) { \
33 if(___VXGG___VXALLOC_EXIT_ON_ERROR___) exit(EXIT_FAILURE); \ 33 if(___VXGG___VERBOSE_ERRORS___) error(EXIT_FAILURE, errno, (msg)__VA_ARGS__); \
34 exit(EXIT_FAILURE); \
35 } \
34 abort(); \ 36 abort(); \
35} while (0) 37} while (0)
36 38
@@ -102,6 +104,7 @@ int rwbuf(char **str, unsigned long int initsize, int fd) {
102ERR_rwbuf: 104ERR_rwbuf:
103 if(___VXGG___VERBOSE_ERRORS___) { 105 if(___VXGG___VERBOSE_ERRORS___) {
104 switch (eflag) { 106 switch (eflag) {
107 case 0: break;
105 case 1: WARN(errno, "Could not reallocate enough space for lstr",); break; 108 case 1: WARN(errno, "Could not reallocate enough space for lstr",); break;
106 case 2: WARN(errno, "Ran into a read() error",); break; 109 case 2: WARN(errno, "Ran into a read() error",); break;
107 case 3: WARN(errno, "Could not shrink lstr after reading buffer",); break; 110 case 3: WARN(errno, "Could not shrink lstr after reading buffer",); break;