From d3901212808d64c430fccebc3209e87e1653031d Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 2 Jul 1992 10:23:46 +0000 Subject: [PATCH] improved symbol table generation when source file has line directives --- lang/cem/cemcom.ansi/domacro.c | 5 +++++ lang/cem/cemcom/domacro.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lang/cem/cemcom.ansi/domacro.c b/lang/cem/cemcom.ansi/domacro.c index 3722d856b..de6768f56 100644 --- a/lang/cem/cemcom.ansi/domacro.c +++ b/lang/cem/cemcom.ansi/domacro.c @@ -809,6 +809,11 @@ do_line(l) * Do not attempt to free the old string, since it might * be used in a def structure. */ +#ifdef DBSYMTAB + if (options['g'] && strcmp(FileName, tk.tk_bts) != 0) { + C_ms_std(tk.tk_bts, N_SOL, 0); + } +#endif /* DBSYMTAB */ FileName = tk.tk_bts; } } diff --git a/lang/cem/cemcom/domacro.c b/lang/cem/cemcom/domacro.c index 46d01d847..02677bf10 100644 --- a/lang/cem/cemcom/domacro.c +++ b/lang/cem/cemcom/domacro.c @@ -712,6 +712,12 @@ do_line(l) SkipRestOfLine(); LineNumber = l; /* the number of the next input line */ - if (t == STRING) /* is there a filespecifier? */ + if (t == STRING) { /* is there a filespecifier? */ +#ifdef DBSYMTAB + if (options['g'] && strcmp(FileName, tk.tk_bts) != 0) { + C_ms_std(tk.tk_bts, N_SOL, 0); + } +#endif /* DBSYMTAB */ FileName = tk.tk_bts; + } } -- 2.34.1