X-Git-Url: https://git.deb.at/w?p=pkg%2Fabook.git;a=blobdiff_plain;f=abook.h;h=0631b8f0f858ff6fbbce6420e454d7687069f04e;hp=20bad884ebc49c8b8969037475abec016cb9921f;hb=69a912c0db0ac135fff332db4f0b05ad9ed2eec6;hpb=c5d8ef5198f2bfd02f678b7a709b6538ef83cd44 diff --git a/abook.h b/abook.h index 20bad88..0631b8f 100644 --- a/abook.h +++ b/abook.h @@ -3,8 +3,6 @@ #include -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(int save_db); void launch_wwwbrowser(int item); @@ -15,12 +13,12 @@ int strcasecmp (const char *, const char *); int strncasecmp (const char *, const char *, size_t); #endif -#define MAIN_HELPLINE "q:quit ?:help a:add r:remove" +#define MAIN_HELPLINE N_("q:quit ?:help a:add r:remove") #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 DIR_IN_HOME ".abook" @@ -39,9 +37,7 @@ int strncasecmp (const char *, const char *, size_t); #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)) #ifndef min # define min(x,y) (((x)<(y)) ? (x):(y)) @@ -53,6 +49,9 @@ int strncasecmp (const char *, const char *, size_t); #define ISSPACE(c) isspace((unsigned char)c) +#define SKIPWS(c) while(*(c) && ISSPACE(*(c))) c++ +#define SKIPNONWS(c) while(*(c) && ! ISSPACE(*(c))) c++ + #ifndef DEBUG # define NDEBUG 1 #else