X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=abook.h;h=0631b8f0f858ff6fbbce6420e454d7687069f04e;hb=126dbdaf881905b0406be15a27fa842fd91d11e1;hp=1c1e29d6a0b217e90df5b17815a556a24c3a0156;hpb=ef379a20d142cb95ba08c7887c8e3245269b3fdd;p=pkg%2Fabook.git diff --git a/abook.h b/abook.h index 1c1e29d..0631b8f 100644 --- a/abook.h +++ b/abook.h @@ -13,7 +13,7 @@ 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) @@ -38,7 +38,6 @@ int strncasecmp (const char *, const char *, size_t); #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)) @@ -50,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