44 |
obstack_init (&trace); |
obstack_init (&trace); |
45 |
} |
} |
46 |
|
|
|
void |
|
|
m4_debug_exit (void) |
|
|
{ |
|
|
obstack_free (&trace, NULL); |
|
|
} |
|
|
|
|
47 |
|
|
48 |
|
|
49 |
/* Function to decode the debugging flags OPTS. Used by main while |
/* Function to decode the debugging flags OPTS. Used by main while |
320 |
/* Format the parts of a trace line, that can be made before the macro is |
/* Format the parts of a trace line, that can be made before the macro is |
321 |
actually expanded. Used from expand_macro (). */ |
actually expanded. Used from expand_macro (). */ |
322 |
void |
void |
323 |
m4_trace_pre (const char *name, int id, int argc, m4_symbol **argv) |
m4_trace_pre (const char *name, int id, int argc, m4_token_data **argv) |
324 |
{ |
{ |
325 |
int i; |
int i; |
326 |
const m4_builtin *bp; |
const m4_builtin *bp; |
337 |
if (i != 1) |
if (i != 1) |
338 |
m4_trace_format (", "); |
m4_trace_format (", "); |
339 |
|
|
340 |
switch (M4_SYMBOL_TYPE (argv[i])) |
switch (M4_TOKEN_DATA_TYPE (argv[i])) |
341 |
{ |
{ |
342 |
case M4_TOKEN_TEXT: |
case M4_TOKEN_TEXT: |
343 |
m4_trace_format ("%l%S%r", M4_SYMBOL_TEXT (argv[i])); |
m4_trace_format ("%l%S%r", M4_TOKEN_DATA_TEXT (argv[i])); |
344 |
break; |
break; |
345 |
|
|
346 |
case M4_TOKEN_FUNC: |
case M4_TOKEN_FUNC: |
347 |
bp = m4_builtin_find_by_func (NULL, M4_SYMBOL_FUNC (argv[i])); |
bp = m4_builtin_find_by_func (NULL, M4_TOKEN_DATA_FUNC(argv[i])); |
348 |
if (bp == NULL) |
if (bp == NULL) |
349 |
{ |
{ |
350 |
M4ERROR ((warning_status, 0, _("\ |
M4ERROR ((warning_status, 0, _("\ |
374 |
/* Format the final part of a trace line and print it all. Used from |
/* Format the final part of a trace line and print it all. Used from |
375 |
expand_macro (). */ |
expand_macro (). */ |
376 |
void |
void |
377 |
m4_trace_post (const char *name, int id, int argc, m4_symbol **argv, |
m4_trace_post (const char *name, int id, int argc, m4_token_data **argv, |
378 |
const char *expanded) |
const char *expanded) |
379 |
{ |
{ |
380 |
if (debug_level & M4_DEBUG_TRACE_CALL) |
if (debug_level & M4_DEBUG_TRACE_CALL) |