#include struct structs_type; /* Find item, change nothing */ struct structs_type* structs_find(const char *name, const void** data) { /* ... */ return NULL; } /* Initialize (modify) data */ int type_init(const struct structs_type *type, void *data) { /* ... */ return 0; } int structs_init(const char *name, void *data) { struct structs_type *type; /* Find item */ if ((type = structs_find(name, &data)) == NULL) return (-1); /* Initialize it */ return type_init(type, data); }