NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
common.c File Reference

Shared debug code. More...

#include "config.h"
#include <stdbool.h>
#include "mutt/lib.h"
#include "lib.h"
+ Include dependency graph for common.c:

Go to the source code of this file.

Functions

void add_flag (struct Buffer *buf, bool is_set, const char *name)
 

Detailed Description

Shared debug code.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file common.c.

Function Documentation

◆ add_flag()

void add_flag ( struct Buffer buf,
bool  is_set,
const char *  name 
)

Definition at line 34 of file common.c.

35{
36 if (!buf || !name)
37 return;
38
39 if (is_set)
40 {
41 if (!buf_is_empty(buf))
42 buf_addch(buf, ',');
43 buf_addstr(buf, name);
44 }
45}
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition: buffer.c:291
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
Definition: buffer.c:241
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:226
+ Here is the call graph for this function: