326 |
/* 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 |
327 |
actually expanded. Used from expand_macro (). */ |
actually expanded. Used from expand_macro (). */ |
328 |
void |
void |
329 |
m4_trace_pre (const char *name, int id, int argc, m4_token **argv) |
m4_trace_pre (const char *name, int id, int argc, m4_symbol_value **argv) |
330 |
{ |
{ |
331 |
int i; |
int i; |
332 |
const m4_builtin *bp; |
const m4_builtin *bp; |
343 |
if (i != 1) |
if (i != 1) |
344 |
m4_trace_format (", "); |
m4_trace_format (", "); |
345 |
|
|
346 |
switch (TOKEN_TYPE (argv[i])) |
switch (VALUE_TYPE (argv[i])) |
347 |
{ |
{ |
348 |
case M4_TOKEN_TEXT: |
case M4_SYMBOL_TEXT: |
349 |
m4_trace_format ("%l%S%r", M4ARG (i)); |
m4_trace_format ("%l%S%r", M4ARG (i)); |
350 |
break; |
break; |
351 |
|
|
352 |
case M4_TOKEN_FUNC: |
case M4_SYMBOL_FUNC: |
353 |
bp = m4_builtin_find_by_func (NULL, TOKEN_FUNC (argv[i])); |
bp = m4_builtin_find_by_func (NULL, VALUE_FUNC (argv[i])); |
354 |
if (bp == NULL) |
if (bp == NULL) |
355 |
{ |
{ |
356 |
M4ERROR ((warning_status, 0, "\ |
M4ERROR ((warning_status, 0, "\ |
360 |
m4_trace_format ("<%s>", bp->name); |
m4_trace_format ("<%s>", bp->name); |
361 |
break; |
break; |
362 |
|
|
363 |
case M4_TOKEN_VOID: |
case M4_SYMBOL_VOID: |
364 |
M4ERROR ((warning_status, 0, |
M4ERROR ((warning_status, 0, |
365 |
"INTERNAL ERROR: Bad token data type (m4_trace_pre ())")); |
"INTERNAL ERROR: Bad token data type (m4_trace_pre ())")); |
366 |
abort (); |
abort (); |
380 |
/* 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 |
381 |
expand_macro (). */ |
expand_macro (). */ |
382 |
void |
void |
383 |
m4_trace_post (const char *name, int id, int argc, m4_token **argv, |
m4_trace_post (const char *name, int id, int argc, m4_symbol_value **argv, |
384 |
const char *expanded) |
const char *expanded) |
385 |
{ |
{ |
386 |
if (debug_level & M4_DEBUG_TRACE_CALL) |
if (debug_level & M4_DEBUG_TRACE_CALL) |