Change exit codes so action triggering is cleaner
This commit is contained in:
parent
6abd6e3985
commit
bf203580b9
1 changed files with 6 additions and 4 deletions
8
herbe.c
8
herbe.c
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue