libcss
Loading...
Searching...
No Matches
Macros | Functions
utils.h File Reference
#include <libwapcaplet/libwapcaplet.h>
#include <libcss/types.h>
#include <libcss/errors.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)   ((void)(x))
 
#define N_ELEMENTS(x)   (sizeof((x)) / sizeof((x)[0]))
 

Functions

css_fixed css__number_from_lwc_string (lwc_string *string, bool int_only, size_t *consumed)
 
css_fixed css__number_from_string (const uint8_t *data, size_t len, bool int_only, size_t *consumed)
 

Macro Definition Documentation

◆ max

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

◆ min

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

◆ N_ELEMENTS

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

◆ SLEN

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

◆ UNUSED

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

Function Documentation

◆ css__number_from_lwc_string()

css_fixed css__number_from_lwc_string ( lwc_string *  string,
bool  int_only,
size_t *  consumed 
)

◆ css__number_from_string()

css_fixed css__number_from_string ( const uint8_t *  data,
size_t  len,
bool  int_only,
size_t *  consumed 
)