Lines Matching defs:parser
3 // container.c - an interface of parser/builder for formatted files.
19 [CONTAINER_TYPE_PARSER] = "parser",
154 const struct container_parser *parser;
190 parser = parsers[i];
191 size = strlen(parser->magic);
194 if (!strncmp(cntr->magic, parser->magic, size))
204 parser = &container_parser_raw;
206 // Allocate private data for the parser.
207 if (parser->private_size > 0) {
208 cntr->private_data = malloc(parser->private_size);
211 memset(cntr->private_data, 0, parser->private_size);
216 cntr->format = parser->format;
217 cntr->ops = &parser->ops;
218 cntr->max_size = parser->max_size;
377 // A parser of cotainers already read first 4 bytes to detect format