Initialize with abook-0.6.0pre2
[abook.git] / abook.h
blobfc6c1bbc0486d6e54f5e62a01fbdc5248c25f45a
1 #ifndef _ABOOK_H
2 #define _ABOOK_H
4 #include <stdio.h>
6 FILE *abook_fopen (const char *path, const char *mode);
7 void quit_abook(int save_db);
8 void launch_wwwbrowser(int item);
9 void launch_mutt(int item);
10 void print_stderr(int item);
11 #ifdef _AIX
12 int strcasecmp (const char *, const char *);
13 int strncasecmp (const char *, const char *, size_t);
14 #endif
16 #define MAIN_HELPLINE N_("q:quit ?:help a:add r:remove")
18 #define Y_STATUSLINE (LINES - 2)
20 #define MIN_LINES 20
21 #define MIN_COLS 70
23 #define DEFAULT_UMASK 066
24 #define DIR_IN_HOME ".abook"
25 #define DATAFILE "addressbook"
27 #define RCFILE "abookrc"
29 #define QUIT_SAVE 1
30 #define QUIT_DONTSAVE 0
33 * some "abookwide" useful macros
36 #define hide_cursor() curs_set(0)
37 #define show_cursor() curs_set(1)
39 #define safe_atoi(X) ((X == NULL) ? 0 : atoi(X))
40 #define safe_str(X) ((X == NULL) ? "" : X)
42 #ifndef min
43 # define min(x,y) (((x)<(y)) ? (x):(y))
44 #endif
46 #ifndef max
47 # define max(x,y) (((x)>(y)) ? (x):(y))
48 #endif
50 #define ISSPACE(c) isspace((unsigned char)c)
52 #define SKIPWS(c) while(*(c) && ISSPACE(*(c))) c++
54 #ifndef DEBUG
55 # define NDEBUG 1
56 #else
57 # undef NDEBUG
58 #endif
60 #endif