71 if (str && (str[0] ==
'\0'))
127 struct Slist *slist = *ptr;
143 return list->
count == 0;
195 for (
char *p = start; *p; p++)
197 if ((p[0] ==
'\\') && (p[1] !=
'\0'))
269 if (!list || !buf || (list->
count == 0))
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
General purpose object for storing and parsing strings.
void mutt_list_copy_tail(struct ListHead *dst, const struct ListHead *src)
Copy a list into another list.
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
bool mutt_list_equal(const struct ListHead *ah, const struct ListHead *bh)
Compare two string lists.
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Memory management wrappers.
#define MUTT_MEM_CALLOC(n, type)
struct Slist * slist_remove_string(struct Slist *list, const char *str)
Remove a string from a list.
struct Slist * slist_parse(const char *str, uint32_t flags)
Parse a list of strings into a list.
bool slist_is_empty(const struct Slist *list)
Is the slist empty?
void slist_free(struct Slist **ptr)
Free an Slist object.
bool slist_equal(const struct Slist *a, const struct Slist *b)
Compare two string lists.
struct Slist * slist_add_string(struct Slist *list, const char *str)
Add a string to a list.
bool slist_is_member(const struct Slist *list, const char *str)
Is a string a member of a list?
struct Slist * slist_dup(const struct Slist *list)
Create a copy of an Slist object.
int slist_to_buffer(const struct Slist *list, struct Buffer *buf)
Export an Slist to a Buffer.
struct Slist * slist_new(uint32_t flags)
Create a new string list.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
#define STAILQ_REMOVE_HEAD(head, field)
#define STAILQ_INIT(head)
#define STAILQ_REMOVE_AFTER(head, elm, field)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
#define STAILQ_NEXT(elm, field)
A separated list of strings.
String manipulation functions.
String manipulation buffer.
struct ListHead head
List containing values.
size_t count
Number of values in list.
uint32_t flags
Flags controlling list, e.g. D_SLIST_SEP_SPACE.
Constants for all the config types.
#define D_SLIST_SEP_COMMA
Slist items are comma-separated.
#define D_SLIST_SEP_COLON
Slist items are colon-separated.
#define D_SLIST_ALLOW_EMPTY
Slist may be empty.