+static GMQCC_INLINE int ftepp_predef_index(const char *name) {
+ /* no hashtable here, we simply check for one to exist the naive way */
+ int i;
+ for(i = 0; i < (int)(sizeof(ftepp_predefs)/sizeof(*ftepp_predefs)); i++)
+ if (!strcmp(ftepp_predefs[i].name, name))
+ return i;
+ return -1;
+}
+
+bool ftepp_predef_exists(const char *name) {
+ return ftepp_predef_index(name) != -1;
+}
+
+/* singleton because we're allowed */
+static GMQCC_INLINE char *(*ftepp_predef(const char *name))(lex_file *context) {
+ int i = ftepp_predef_index(name);
+ return (i != -1) ? ftepp_predefs[i].func : NULL;
+}
+