10 #include <sys/types.h>
28 #define STREMPTY(x) { (x).s = NULL; (x).len = 0; }
40 static inline int __attribute__ ((nonnull (1)))
50 return (len && !s->s) ? -1 : 0;
67 static inline int __attribute__ ((nonnull (1,2)))
76 return (s->s == NULL) ? -1 : 0;
size_t len
Definition: sstring.h:17
const char * s
Definition: sstring.h:24
char * s
Definition: sstring.h:16
static int newstr(string *s, const size_t len)
allocate a new string buffer of the given length
Definition: sstring.h:41
size_t len
Definition: sstring.h:25
record of a string
Definition: sstring.h:15
static int dupstr(string *s, const char *t)
duplicate a character string to a string buffer
Definition: sstring.h:68
record of a constant string
Definition: sstring.h:23