syslog-ng source
str-utils.h File Reference
#include "syslog-ng.h"
#include <string.h>
Include dependency graph for str-utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define APPEND_ZERO(dest, value, value_len)
 

Functions

GString * g_string_assign_len (GString *s, const gchar *val, gint len)
 
gchar * g_string_steal (GString *s)
 
gchar * __normalize_key (const gchar *buffer)
 
gchar * normalize_flag (const gchar *buffer)
 

Macro Definition Documentation

◆ APPEND_ZERO

#define APPEND_ZERO (   dest,
  value,
  value_len 
)
Value:
do { \
gchar *__buf; \
if (G_UNLIKELY(value[value_len] != 0)) \
{ \
/* value is NOT zero terminated */ \
\
__buf = g_alloca(value_len + 1); \
memcpy(__buf, value, value_len); \
__buf[value_len] = 0; \
} \
else \
{ \
/* value is zero terminated */ \
__buf = (gchar *) value; \
} \
dest = __buf; \
} while (0)
GString * value
Definition: test_decode.c:28

Function Documentation

◆ __normalize_key()

gchar* __normalize_key ( const gchar *  buffer)

◆ g_string_assign_len()

GString* g_string_assign_len ( GString *  s,
const gchar *  val,
gint  len 
)

◆ g_string_steal()

gchar* g_string_steal ( GString *  s)

◆ normalize_flag()

gchar* normalize_flag ( const gchar *  buffer)