Lines Matching defs:root
279 static int bof_read(bof_t *root, FILE *file, long end, int level)
287 r = bof_entry_grow(root);
329 root->array[root->centry++] = bof;
330 return bof_read(root, file, end, level);
338 bof_t *root = bof_object();
341 if (root == NULL) {
342 fprintf(stderr, "%s failed to create root object\n", __func__);
345 root->file = fopen(filename, "r");
346 if (root->file == NULL)
348 r = fseek(root->file, 0L, SEEK_SET);
353 root->offset = ftell(root->file);
354 r = fread(&root->type, 4, 1, root->file);
357 r = fread(&root->size, 4, 1, root->file);
360 r = fread(&root->array_size, 4, 1, root->file);
363 r = bof_read(root, root->file, root->offset + root->size, 2);
366 return root;
368 bof_decref(root);