NeoMutt
2025-12-11-1009-ga75d9e
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
common.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include <stdbool.h>
31
#include "
mutt/lib.h
"
32
#include "
lib.h
"
33
40
void
add_flag
(
struct
Buffer
*buf,
bool
is_set,
const
char
*name)
41
{
42
if
(!buf || !name)
43
return
;
44
45
if
(is_set)
46
{
47
if
(!
buf_is_empty
(buf))
48
buf_addch
(buf,
','
);
49
buf_addstr
(buf, name);
50
}
51
}
buf_is_empty
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition
buffer.c:298
buf_addch
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
Definition
buffer.c:248
buf_addstr
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition
buffer.c:233
add_flag
void add_flag(struct Buffer *buf, bool is_set, const char *name)
Add a flag name to a buffer if set.
Definition
common.c:40
lib.h
Convenience wrapper for the debug headers.
lib.h
Convenience wrapper for the library headers.
Buffer
String manipulation buffer.
Definition
buffer.h:36