Libparserutils
Macros
utils.h File Reference

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)   ((void)(x))
 
#define N_ELEMENTS(s)   (sizeof((s)) / sizeof((s)[0]))
 
#define ALIGN(val)   (((val) + 3) & ~(3))
 

Macro Definition Documentation

◆ ALIGN

#define ALIGN (   val)    (((val) + 3) & ~(3))

Definition at line 34 of file utils.h.

◆ max

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

Definition at line 13 of file utils.h.

◆ min

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

Definition at line 17 of file utils.h.

◆ N_ELEMENTS

#define N_ELEMENTS (   s)    (sizeof((s)) / sizeof((s)[0]))

Definition at line 30 of file utils.h.

◆ SLEN

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

Definition at line 22 of file utils.h.

◆ UNUSED

#define UNUSED (   x)    ((void)(x))

Definition at line 26 of file utils.h.