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

Go to the source code of this file.

Macros

#define max(a, b)
 
#define min(a, b)
 
#define SLEN(s)
 
#define UNUSED(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,
b )
Value:
((a)>(b)?(a):(b))

◆ min

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

◆ SLEN

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

◆ UNUSED

#define UNUSED ( x)
Value:
((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 )