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);
13 int strcasecmp (const char *, const char *);
14 int strncasecmp (const char *, const char *, size_t);
17 #define MAIN_HELPLINE "q:quit ?:help a:add r:remove"
19 #define Y_STATUSLINE (LINES - 2)
24 #define DEFAULT_UMASK 066
25 #define DATAFILE ".abook.addressbook"
28 * some "abookwide" useful macros
31 #define hide_cursor() curs_set(0)
32 #define show_cursor() curs_set(1)
34 #define safe_atoi(X) (X == NULL) ? 0 : atoi(X)
35 #define my_free(X) do {free(X); X=NULL;} while(0)
36 #define safe_str(X) X == NULL ? "" : X
37 #define safe_strdup(X) (X == NULL) ? NULL : strdup(X)
40 # define min(x,y) (((x)<(y)) ? (x):(y))
44 # define max(x,y) (((x)>(y)) ? (x):(y))
47 #define ISSPACE(c) isspace((unsigned char)c)