]> git.deb.at Git - pkg/abook.git/blobdiff - abook.h
- add xstrdup to have proper checking for memory allocation failures
[pkg/abook.git] / abook.h
diff --git a/abook.h b/abook.h
index 64ea077330ddc849844eb3a6606c45ac4c70e635..0cdc513405db7b4bfba13cf4833854779b075cc6 100644 (file)
--- a/abook.h
+++ b/abook.h
@@ -1,19 +1,13 @@
 #ifndef _ABOOK_H
 #define _ABOOK_H
 
-void            refresh_screen();
-void            statusline_msg(char *msg);
-char           *ask_filename(char *prompt, int flags);
-void            clear_statusline();
-void           statusline_addstr(char *str);
-char           *statusline_getnstr(char *str, int n, int use_filesel);
-void           headerline(char *str);
-void           refresh_statusline();
-void           display_editor_help();
-void           *abook_malloc(size_t size);
-void           *abook_realloc(void *ptr, size_t size);
+#include <stdio.h>
+
 FILE           *abook_fopen (const char *path, const char *mode);
-void           quit_abook();
+void           quit_abook(int save_db);
+void           launch_wwwbrowser(int item);
+void           launch_mutt(int item);
+void           print_stderr(int item);
 #ifdef _AIX
 int            strcasecmp (const char *, const char *);
 int            strncasecmp (const char *, const char *, size_t);
@@ -23,11 +17,17 @@ int         strncasecmp (const char *, const char *, size_t);
 
 #define Y_STATUSLINE           (LINES - 2)
 
-#define MIN_LINES      20      
-#define MIN_COLS       70      
+#define MIN_LINES      20
+#define MIN_COLS       70
 
 #define DEFAULT_UMASK  066
-#define DATAFILE       ".abook.addressbook"
+#define DIR_IN_HOME    ".abook"
+#define DATAFILE       "addressbook"
+
+#define RCFILE         "abookrc"
+
+#define QUIT_SAVE      1
+#define QUIT_DONTSAVE  0
 
 /*
  * some "abookwide" useful macros
@@ -36,10 +36,8 @@ int          strncasecmp (const char *, const char *, size_t);
 #define hide_cursor()  curs_set(0)
 #define show_cursor()  curs_set(1)
 
-#define safe_atoi(X)    (X == NULL) ? 0 : atoi(X)
-#define my_free(X)     do {free(X); X=NULL;} while(0)
-#define safe_str(X)    X == NULL ? "" : X
-#define safe_strdup(X) (X == NULL) ? NULL : strdup(X)
+#define safe_atoi(X)    ((X == NULL) ? 0 : atoi(X))
+#define safe_str(X)    ((X == NULL) ? "" : X)
 
 #ifndef min
 #       define min(x,y) (((x)<(y)) ? (x):(y))