X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib%2Fstr.h;h=8a480c33b0b2ee7e2bf1ca629e111a8480ba30ed;hb=c98480f8568e6c1bc927c6c5f2b5e80b4aa6548c;hp=ef5211d71d2509d4b78ae1eb3012524b5ff89afa;hpb=a8477ebaa09990b3688164cbe5cf661c4189541d;p=apps%2Fmadmutt.git diff --git a/lib/str.h b/lib/str.h index ef5211d..8a480c3 100644 --- a/lib/str.h +++ b/lib/str.h @@ -12,8 +12,6 @@ #include -#define NONULL(x) x?x:"" - # define HUGE_STRING 5120 # define LONG_STRING 1024 # define STRING 256 @@ -32,25 +30,11 @@ # define ISSPACE(c) isspace((unsigned char)c) # define ISBLANK(c) (c == ' ' || c == '\t') -# define strfcpy(A,B,C) strncpy(A,B,C), *(A+(C)-1)=0 +# define strfcpy(A,B,C) m_strcpy(A,C,B) /* this macro must check for *c == 0 since isspace(0) has * unreliable behavior on some systems */ # define SKIPWS(c) while (*(c) && isspace ((unsigned char) *(c))) c++; -/* - * safety wrappers/replacements - * (mostly only difference: safely handle NULL strings) - */ -char *str_dup (const char*); -char *str_cat (char*, size_t, const char*); -char *str_ncat (char*, size_t, const char*, size_t); -int str_cmp (const char*, const char*); -int str_casecmp (const char*, const char*); -int str_ncmp (const char*, const char*, size_t); -int str_ncasecmp (const char*, const char*, size_t); -int str_coll (const char*, const char*); -size_t str_len (const char*); - /* * tools */