Added another structure for improved recursion detection

This commit is contained in:
ceriel
1987-02-05 17:00:14 +00:00
parent d0d5c84689
commit a40ec68883
2 changed files with 43 additions and 11 deletions

View File

@@ -36,6 +36,24 @@ extern char *std_alloc();
#endif
#define free_macro(p) st_free(p, &h_macro, sizeof(struct macro))
struct mlist {
struct mlist *next;
struct macro *m_mac;
char *m_repl;
};
/* allocation definitions of struct mlist */
extern char *st_alloc();
extern struct mlist *h_mlist;
#ifdef DEBUG
extern int cnt_mlist;
extern char *std_alloc();
#define new_mlist() ((struct mlist *) std_alloc((char **)&h_mlist, sizeof(struct mlist), 20, &cnt_mlist))
#else
#define new_mlist() ((struct mlist *) st_alloc((char **)&h_mlist, sizeof(struct mlist), 20))
#endif
#define free_mlist(p) st_free(p, &h_mlist, sizeof(struct mlist))
/* `token' numbers of keywords of command-line processor
*/