summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-08-04 14:32:31 +0000
committerFrederic Culot <calcurse@culot.org>2007-08-04 14:32:31 +0000
commit52e1859e5f05eb102fee6734e71695d4c29b0d97 (patch)
tree05f88d952c31465b15c53fb48358463823e62c10 /src
parent2767b1f0e9cdb4193f3682ad94bd47de4491e925 (diff)
downloadcalcurse-52e1859e5f05eb102fee6734e71695d4c29b0d97.tar.gz
calcurse-52e1859e5f05eb102fee6734e71695d4c29b0d97.zip
ASSERT macro, ierror() and aerror() added
Diffstat (limited to 'src')
-rwxr-xr-xsrc/utils.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/utils.h b/src/utils.h
index ec06c1b..396fb9c 100755
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,4 +1,4 @@
-/* $calcurse: utils.h,v 1.22 2007/07/28 13:11:43 culot Exp $ */
+/* $calcurse: utils.h,v 1.23 2007/08/04 14:32:31 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -32,6 +32,10 @@
#define MAX(x,y) ((x)>(y)?(x):(y))
#define MIN(x,y) ((x)<(y)?(x):(y))
+#define ASSERT(e) do { \
+ ((e) ? (void)0 : aerror(__FILE__, __LINE__, #e)); \
+} while (0)
+
#define SPC 32 /* ASCII code for white space */
#define NB_CAL_CMDS 16 /* number of commands while in cal view */
@@ -52,7 +56,9 @@ typedef struct { /* structure defining a keybinding */
char *label;
} binding_t;
-void exit_calcurse(void);
+void exit_calcurse(int);
+void ierror(const char *);
+void aerror(const char *, int, const char *);
void status_mesg(char *, char *);
void erase_status_bar(void);
void erase_window_part(WINDOW *, int, int, int, int);