X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-lib%2Fstr.h;h=c9c8c90eaa0714770b6db39831cffee4b49b12ff;hb=1ee89902de184a640c171ae3285bff6882a791bd;hp=296cd55b7d0ece6b687c9f614e258e46cfb1480e;hpb=cba0e6e5396174e213987bd0d45cc6f25dc78b05;p=apps%2Fmadmutt.git diff --git a/lib-lib/str.h b/lib-lib/str.h index 296cd55..c9c8c90 100644 --- a/lib-lib/str.h +++ b/lib-lib/str.h @@ -20,11 +20,6 @@ #ifndef MUTT_LIB_LIB_STR_H #define MUTT_LIB_LIB_STR_H -#include -#include - -#include "mem.h" - #define HUGE_STRING 5120 #define LONG_STRING 1024 #define STRING 256 @@ -130,6 +125,18 @@ m_strncat(char *dst, ssize_t n, const char *src, ssize_t l) { /* parsing related */ /****************************************************************************/ +static inline const char *m_strchrnul(const char *s, int c) { + while (*s && *s != c) + s++; + return s; +} + +static inline const char *m_strnextsp(const char *s) { + while (*s && !isspace((unsigned char)*s)) + s++; + return s; +} + static inline const char *skipspaces(const char *s) { while (*s && isspace((unsigned char)*s)) s++;