make it possible to use KEY_HOME and KEY_END to define new key bindings, and prevent user from assigning a non-recgnized key
This commit is contained in:
13
src/utils.h
13
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);
|
||||
|
||||
Reference in New Issue
Block a user