Hubbub
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)   ((x)=(x))
 
#define N_ELEMENTS(x)   sizeof((x)) / sizeof((x)[0])
 

Macro Definition Documentation

◆ max

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

Definition at line 25 of file utils.h.

◆ min

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

Definition at line 29 of file utils.h.

Referenced by hubbub_charset_scan_meta().

◆ N_ELEMENTS

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

Definition at line 42 of file utils.h.

Referenced by adjust_svg_attributes(), adjust_svg_tagname(), and element_type_from_name().

◆ SLEN

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

◆ UNUSED

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