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) 125 typedef struct _unformat_input_t
139 uword (*fill_buffer) (
struct _unformat_input_t *
i);
143 #define UNFORMAT_END_OF_INPUT (~0) 144 #define UNFORMAT_MORE_INPUT 0 147 void *fill_buffer_arg;
153 void *fill_buffer_arg)
155 memset (i, 0,
sizeof (i[0]));
156 i->fill_buffer = fill_buffer;
157 i->fill_buffer_arg = fill_buffer_arg;
165 memset (i, 0,
sizeof (i[0]));
175 _unformat_fill_input (i);
193 if (i <
vec_len (input->buffer))
195 input->index = i + 1;
196 i = input->buffer[
i];
252 char *
string,
int string_len);
267 #define unformat_parse_error(input) \ 268 clib_error_return (0, "parse error `%U'", format_unformat_error, input)
#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".