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 {
134 uword * buffer_marks;
138 uword (* fill_buffer) (
struct _unformat_input_t *
i);
142 #define UNFORMAT_END_OF_INPUT (~0) 143 #define UNFORMAT_MORE_INPUT 0 146 void * fill_buffer_arg;
152 void * fill_buffer_arg)
154 memset (i, 0,
sizeof (i[0]));
155 i->fill_buffer = fill_buffer;
156 i->fill_buffer_arg = fill_buffer_arg;
164 memset (i, 0,
sizeof (i[0]));
173 if (i->index >=
vec_len (i->buffer)
175 _unformat_fill_input (i);
193 if (i <
vec_len (input->buffer))
195 input->index = i + 1;
196 i = input->buffer[
i];
204 { input->index -= 1; }
265 #define unformat_parse_error(input) \ 266 clib_error_return (0, "parse error `%U'", format_unformat_error, input) 304 int file_descriptor);
sll srl srl sll sra u16x4 i
#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".