38 #ifndef included_format_h 39 #define included_format_h 61 #define stdin ((FILE *) 0) 62 #define stdout ((FILE *) 1) 63 #define stderr ((FILE *) 2) 90 #define _(f) u8 * f (u8 * s, va_list * va) 127 typedef struct _unformat_input_t
141 uword (*fill_buffer) (
struct _unformat_input_t *
i);
145 #define UNFORMAT_END_OF_INPUT (~0) 146 #define UNFORMAT_MORE_INPUT 0 149 void *fill_buffer_arg;
155 void *fill_buffer_arg)
158 i->fill_buffer = fill_buffer;
159 i->fill_buffer_arg = fill_buffer_arg;
177 _unformat_fill_input (i);
195 if (i <
vec_len (input->buffer))
197 input->index = i + 1;
198 i = input->buffer[
i];
254 char *
string,
int string_len);
269 #define unformat_parse_error(input) \ 270 clib_error_return (0, "parse error `%U'", format_unformat_error, input)
Optimized string handling code, including c11-compliant "safe C library" variants.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
#define vec_end(v)
End (last data address) of vector.
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".