Change exit codes so action triggering is cleaner

This commit is contained in:
Samuel Dudik 2020-08-18 19:49:56 +02:00
parent 6abd6e3985
commit bf203580b9

View file

@ -11,11 +11,13 @@
#include "config.h" #include "config.h"
#define EXIT_ACTION 3 #define EXIT_ACTION 0
#define EXIT_FAIL 1
#define EXIT_DISMISS 2
Display *display; Display *display;
Window window; Window window;
int exit_code = EXIT_SUCCESS; int exit_code = EXIT_DISMISS;
static void die(const char *format, ...) static void die(const char *format, ...)
{ {
@ -24,7 +26,7 @@ static void die(const char *format, ...)
vfprintf(stderr, format, ap); vfprintf(stderr, format, ap);
fprintf(stderr, "\n"); fprintf(stderr, "\n");
va_end(ap); va_end(ap);
exit(EXIT_FAILURE); exit(EXIT_FAIL);
} }
int get_max_len(char *body, XftFont *font, int max_text_width) int get_max_len(char *body, XftFont *font, int max_text_width)