Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void parseSection(char *config) {
- char *type, *name;
- type = tokenize(config, DELIMS);
- struct sectionHandler *h;
- h = (struct sectionHandler *)bsearch(type, sections,
- sizeof(sections)/sizeof(struct sectionHandler),
- sizeof(struct sectionHandler), §Comparator);
- if (h == NULL) {
- fprintf(stderr, "Unknown section type: %s\n", type);
- } else {
- name = tokenize(NULL, DELIMS);
- //Skip past open bracket to first definition, pass to parser
- void *rcb_private;
- RENDER_CALLBACK rcb = h->parser(tokenize(NULL, DELIMS_OB), &rcb_private);
- }
- }
- int sectComparator(const void *a, const void *b) {
- return strcmp(((struct sectionHandler *)a)->ident,
- ((struct sectionHandler *)b)->ident);
- }
Add Comment
Please, Sign In to add comment