]> git.deb.at Git - pkg/abook.git/blobdiff - abook.h
- replace abook_malloc, abook_realloc and my_free with new xmalloc routines
[pkg/abook.git] / abook.h
diff --git a/abook.h b/abook.h
index d9f401c646f0fd4133c920caa5a829acdc500ae9..b5e7c7627bbd291d101bef9080d473b5c37fb0ab 100644 (file)
--- a/abook.h
+++ b/abook.h
@@ -3,10 +3,8 @@
 
 #include <stdio.h>
 
-void           *abook_malloc(size_t size);
-void           *abook_realloc(void *ptr, size_t size);
 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);
@@ -26,6 +24,11 @@ int          strncasecmp (const char *, const char *, size_t);
 #define DIR_IN_HOME    ".abook"
 #define DATAFILE       "addressbook"
 
+#define RCFILE         "abookrc"
+
+#define QUIT_SAVE      1
+#define QUIT_DONTSAVE  0
+
 /*
  * some "abookwide" useful macros
  */
@@ -33,10 +36,9 @@ 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)
+#define safe_strdup(X) ((X == NULL) ? NULL : strdup(X))
 
 #ifndef min
 #       define min(x,y) (((x)<(y)) ? (x):(y))