6 void *abook_malloc(size_t size);
7 void *abook_realloc(void *ptr, size_t size);
8 FILE *abook_fopen (const char *path, const char *mode);
9 void quit_abook(int save_db);
10 void launch_wwwbrowser(int item);
11 void launch_mutt(int item);
12 void print_stderr(int item);
14 int strcasecmp (const char *, const char *);
15 int strncasecmp (const char *, const char *, size_t);
18 #define MAIN_HELPLINE "q:quit ?:help a:add r:remove"
20 #define Y_STATUSLINE (LINES - 2)
25 #define DEFAULT_UMASK 066
26 #define DIR_IN_HOME ".abook"
27 #define DATAFILE "addressbook"
29 #define RCFILE "abookrc"
32 #define QUIT_DONTSAVE 0
35 * some "abookwide" useful macros
38 #define hide_cursor() curs_set(0)
39 #define show_cursor() curs_set(1)
41 #define safe_atoi(X) ((X == NULL) ? 0 : atoi(X))
42 #define my_free(X) do {free(X); X=NULL;} while(0)
43 #define safe_str(X) ((X == NULL) ? "" : X)
44 #define safe_strdup(X) ((X == NULL) ? NULL : strdup(X))
47 # define min(x,y) (((x)<(y)) ? (x):(y))
51 # define max(x,y) (((x)>(y)) ? (x):(y))
54 #define ISSPACE(c) isspace((unsigned char)c)