diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2003-06-30 21:42:51 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2003-06-30 21:42:51 +0000 |
commit | 6947789365296ced45fe71914dfebf93e2dd8934 (patch) | |
tree | 4dd70820679c5b58f8855b08cfb733022262a26a /usr.bin/m4/extern.h | |
parent | 46c83bd2c3b0a0d556a2f88fe379bf645a538697 (diff) |
clean up internal lookup interface:
define an interface with explicit define/pushdef/popdef... and use it.
That way, most details of the hashtable are no longer visible.
okay millert@
Diffstat (limited to 'usr.bin/m4/extern.h')
-rw-r--r-- | usr.bin/m4/extern.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.bin/m4/extern.h b/usr.bin/m4/extern.h index 29022fd922d..a00dad4b057 100644 --- a/usr.bin/m4/extern.h +++ b/usr.bin/m4/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.33 2003/06/18 21:08:07 espie Exp $ */ +/* $OpenBSD: extern.h,v 1.34 2003/06/30 21:42:50 espie Exp $ */ /* $NetBSD: extern.h,v 1.3 1996/01/13 23:25:24 pk Exp $ */ /*- @@ -58,10 +58,17 @@ extern void doesyscmd(const char *); /* look.c */ -extern ndptr addent(const char *); -extern unsigned hash(const char *); extern ndptr lookup(const char *); -extern void remhash(const char *, int); + +extern struct macro_definition *lookup_macro_definition(const char *); +extern void macro_define(const char *, const char *); +extern void macro_pushdef(const char *, const char *); +extern void macro_popdef(const char *); +extern void macro_undefine(const char *); +extern void setup_builtin(const char *, unsigned int); +extern void macro_for_all(void (*)(const char *, struct macro_definition *)); +extern const char *macro_name(ndptr); +extern struct macro_definition *macro_getdef(ndptr); /* main.c */ extern void outputstr(const char *); @@ -149,3 +156,4 @@ extern char scommt[MAXCCHARS+1];/* start character for comment */ extern int synch_lines; /* line synchronisation directives */ extern int mimic_gnu; /* behaves like gnu-m4 */ + |