summaryrefslogtreecommitdiff
path: root/conf/cf-lex.l
diff options
context:
space:
mode:
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r--conf/cf-lex.l15
1 files changed, 15 insertions, 0 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l
index ca7bfae1..94c2b2ab 100644
--- a/conf/cf-lex.l
+++ b/conf/cf-lex.l
@@ -183,6 +183,12 @@ cf_find_sym(byte *c, unsigned int h0)
}
struct symbol *
+cf_find_symbol(byte *c)
+{
+ return cf_find_sym(c, cf_hash(c));
+}
+
+struct symbol *
cf_default_name(char *prefix, int *counter)
{
char buf[32];
@@ -199,6 +205,15 @@ cf_default_name(char *prefix, int *counter)
}
void
+cf_define_symbol(struct symbol *sym, int type, void *def)
+{
+ if (sym->class)
+ cf_error("Symbol already defined");
+ sym->class = type;
+ sym->def = def;
+}
+
+void
cf_lex_init(int flag)
{
if (allow_new_symbols = flag)