trace: allow GALLIUM_TRACE=stdout/stderr

This commit is contained in:
Brian Paul 2013-01-29 16:48:25 -07:00
parent 225228a7f5
commit fe20e3ebb5
1 changed files with 11 additions and 3 deletions

View File

@ -244,9 +244,17 @@ boolean trace_dump_trace_begin()
if(!stream) {
stream = fopen(filename, "wt");
if(!stream)
return FALSE;
if (strcmp(filename, "stderr") == 0) {
stream = stderr;
}
else if (strcmp(filename, "stdout") == 0) {
stream = stdout;
}
else {
stream = fopen(filename, "wt");
if (!stream)
return FALSE;
}
trace_dump_writes("<?xml version='1.0' encoding='UTF-8'?>\n");
trace_dump_writes("<?xml-stylesheet type='text/xsl' href='trace.xsl'?>\n");