diff options
Diffstat (limited to 'src/utils.h')
-rwxr-xr-x | src/utils.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/utils.h b/src/utils.h index fcd9c0d..f045720 100755 --- a/src/utils.h +++ b/src/utils.h @@ -1,4 +1,4 @@ -/* $calcurse: utils.h,v 1.43 2009/01/03 21:32:11 culot Exp $ */ +/* $calcurse: utils.h,v 1.44 2009/01/24 14:44:25 culot Exp $ */ /* * Calcurse - text-based organizer @@ -49,6 +49,16 @@ (void)fprintf (stderr, "%s\n", msg); \ } while (0) +#define WARN_MSG(...) do { \ + char msg[BUFSIZ]; \ + \ + (void)snprintf (msg, BUFSIZ, __VA_ARGS__); \ + if (ui_mode == UI_CURSES) \ + warnbox (msg); \ + else \ + (void)fprintf (stderr, "%s\n", msg); \ +} while (0) + #define EXIT(...) do { \ ERROR_MSG(__VA_ARGS__); \ if (ui_mode == UI_CURSES) \ @@ -103,6 +113,7 @@ erase_flag_e; void exit_calcurse (int); void fatalbox (const char *); +void warnbox (const char *); void status_mesg (char *, char *); void erase_window_part (WINDOW *, int, int, int, int); WINDOW *popup (int, int, int, int, char *, char *, int); |