libdom
Loading...
Searching...
No Matches
Macros | Functions
utils.h File Reference
#include <stddef.h>
#include <inttypes.h>

Go to the source code of this file.

Macros

#define max(a, b)   ((a)>(b)?(a):(b))
 
#define min(a, b)   ((a)<(b)?(a):(b))
 
#define SLEN(s)   (sizeof((s)) - 1) /* -1 for '\0' */
 
#define UNUSED(x)   ((x) = (x))
 

Functions

void * myrealloc (void *ptr, size_t len, void *pw)
 
void mymsg (uint32_t severity, void *ctx, const char *msg,...)
 
char * domts_strndup (const char *s, size_t len)
 

Macro Definition Documentation

◆ max

#define max (   a,
 
)    ((a)>(b)?(a):(b))

◆ min

#define min (   a,
 
)    ((a)<(b)?(a):(b))

◆ SLEN

#define SLEN (   s)    (sizeof((s)) - 1) /* -1 for '\0' */

◆ UNUSED

#define UNUSED (   x)    ((x) = (x))

Function Documentation

◆ domts_strndup()

char * domts_strndup ( const char *  s,
size_t  len 
)

◆ mymsg()

void mymsg ( uint32_t  severity,
void *  ctx,
const char *  msg,
  ... 
)

◆ myrealloc()

void * myrealloc ( void *  ptr,
size_t  len,
void *  pw 
)