#include "util/u_memory.h"
#include "util/u_string.h"
#include "util/u_math.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "tr_dump.h"
#include "tr_screen.h"
#include "tr_texture.h"
-static boolean close_stream = FALSE;
+static bool close_stream = false;
static FILE *stream = NULL;
static mtx_t call_mutex = _MTX_INITIALIZER_NP;
static long unsigned call_no = 0;
-static boolean dumping = FALSE;
+static bool dumping = false;
static inline void
trace_dump_writes("</trace>\n");
if (close_stream) {
fclose(stream);
- close_stream = FALSE;
+ close_stream = false;
stream = NULL;
}
call_no = 0;
}
-boolean
+bool
trace_dump_trace_begin(void)
{
const char *filename;
filename = debug_get_option("GALLIUM_TRACE", NULL);
if (!filename)
- return FALSE;
+ return false;
if (!stream) {
if (strcmp(filename, "stderr") == 0) {
- close_stream = FALSE;
+ close_stream = false;
stream = stderr;
}
else if (strcmp(filename, "stdout") == 0) {
- close_stream = FALSE;
+ close_stream = false;
stream = stdout;
}
else {
- close_stream = TRUE;
+ close_stream = true;
stream = fopen(filename, "wt");
if (!stream)
- return FALSE;
+ return false;
}
trace_dump_writes("<?xml version='1.0' encoding='UTF-8'?>\n");
atexit(trace_dump_trace_close);
}
- return TRUE;
+ return true;
}
-boolean trace_dump_trace_enabled(void)
+bool trace_dump_trace_enabled(void)
{
- return stream ? TRUE : FALSE;
+ return stream ? true : false;
}
/*
void trace_dumping_start_locked(void)
{
- dumping = TRUE;
+ dumping = true;
}
void trace_dumping_stop_locked(void)
{
- dumping = FALSE;
+ dumping = false;
}
-boolean trace_dumping_enabled_locked(void)
+bool trace_dumping_enabled_locked(void)
{
return dumping;
}
mtx_unlock(&call_mutex);
}
-boolean trace_dumping_enabled(void)
+bool trace_dumping_enabled(void)
{
- boolean ret;
+ bool ret;
mtx_lock(&call_mutex);
ret = trace_dumping_enabled_locked();
mtx_unlock(&call_mutex);