]> git.deb.at Git - pkg/abook.git/blob - abook.h
Upload 0.6.1-2 to unstable
[pkg/abook.git] / abook.h
1 #ifndef _ABOOK_H
2 #define _ABOOK_H
3
4 #include <stdio.h>
5
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
15
16 #define MAIN_HELPLINE        N_("q:quit  ?:help  a:add  r:remove")
17
18 #define Y_STATUSLINE    (LINES - 2)
19
20 #define MIN_LINES       20
21 #define MIN_COLS        70
22
23 #define DEFAULT_UMASK   066
24 #define DIR_IN_HOME     ".abook"
25 #define DATAFILE        "addressbook"
26
27 #define RCFILE          "abookrc"
28
29 #define QUIT_SAVE       1
30 #define QUIT_DONTSAVE   0
31
32 /*
33  * some "abookwide" useful macros
34  */
35
36 #define hide_cursor()   curs_set(0)
37 #define show_cursor()   curs_set(1)
38
39 #define safe_atoi(X)    ((X == NULL) ? 0 : atoi(X))
40 #define safe_str(X)     ((X == NULL) ? "" : X)
41
42 #ifndef min
43 #       define min(x,y) (((x)<(y)) ? (x):(y))
44 #endif
45
46 #ifndef max
47 #       define max(x,y) (((x)>(y)) ? (x):(y))
48 #endif
49
50 #define ISSPACE(c)      isspace((unsigned char)c)
51
52 #define SKIPWS(c)       while(*(c) && ISSPACE(*(c))) c++
53 #define SKIPNONWS(c)    while(*(c) && ! ISSPACE(*(c))) c++
54
55 #ifndef DEBUG
56 #       define NDEBUG   1
57 #else
58 #       undef NDEBUG
59 #endif
60
61 #endif