135 |
} |
} |
136 |
|
|
137 |
/* Change the debug output to file NAME. If NAME is NULL, debug output is |
/* Change the debug output to file NAME. If NAME is NULL, debug output is |
138 |
reverted to stderr, and if empty debug output is discarded. Return TRUE |
reverted to stderr, and if empty debug output is discarded. Return true |
139 |
iff the output stream was changed. */ |
iff the output stream was changed. */ |
140 |
boolean |
bool |
141 |
m4_debug_set_output (m4 *context, const char *name) |
m4_debug_set_output (m4 *context, const char *name) |
142 |
{ |
{ |
143 |
FILE *fp; |
FILE *fp; |
152 |
{ |
{ |
153 |
fp = fopen (name, "a"); |
fp = fopen (name, "a"); |
154 |
if (fp == NULL) |
if (fp == NULL) |
155 |
return FALSE; |
return false; |
156 |
|
|
157 |
set_debug_file (context, fp); |
set_debug_file (context, fp); |
158 |
} |
} |
159 |
return TRUE; |
return true; |
160 |
} |
} |
161 |
|
|
162 |
/* Print the header of a one-line debug message, starting by "m4 debug". */ |
/* Print the header of a one-line debug message, starting by "m4 debug". */ |