commit bf203580b96f702b23462d273a8a6a0bb0fdd1c9
parent 6abd6e39859360f4bc40db80b3bf28a6551b3c79
Author: Samuel Dudik <samuel.dudik@gmail.com>
Date: Tue, 18 Aug 2020 19:49:56 +0200
Change exit codes so action triggering is cleaner
Diffstat:
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/herbe.c b/herbe.c
@@ -11,11 +11,13 @@
#include "config.h"
-#define EXIT_ACTION 3
+#define EXIT_ACTION 0
+#define EXIT_FAIL 1
+#define EXIT_DISMISS 2
Display *display;
Window window;
-int exit_code = EXIT_SUCCESS;
+int exit_code = EXIT_DISMISS;
static void die(const char *format, ...)
{
@@ -24,7 +26,7 @@ static void die(const char *format, ...)
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
va_end(ap);
- exit(EXIT_FAILURE);
+ exit(EXIT_FAIL);
}
int get_max_len(char *body, XftFont *font, int max_text_width)
@@ -217,4 +219,4 @@ int main(int argc, char *argv[])
XCloseDisplay(display);
exit(exit_code);
-}
-\ No newline at end of file
+}