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) 126 typedef struct _unformat_input_t
140 uword (*fill_buffer) (
struct _unformat_input_t *
i);
144 #define UNFORMAT_END_OF_INPUT (~0) 145 #define UNFORMAT_MORE_INPUT 0 148 void *fill_buffer_arg;
154 void *fill_buffer_arg)
157 i->fill_buffer = fill_buffer;
158 i->fill_buffer_arg = fill_buffer_arg;
176 _unformat_fill_input (i);
194 if (i <
vec_len (input->buffer))
196 input->index = i + 1;
197 i = input->buffer[
i];
253 char *
string,
int string_len);
268 #define unformat_parse_error(input) \ 269 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.
#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".