TORCS  1.3.9
The Open Racing Car Simulator
trace.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  TRACE
3  -------------------
4  created : Fri Aug 13 22:32:45 CEST 1999
5  copyright : (C) 1999 by Eric Espie
6  email : torcs@free.fr
7  version : $Id$
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
27 #ifdef _WIN32
28 #include <windows.h>
29 #include <windowsx.h>
30 #endif /* _WIN32 */
31 
32 #include <stdio.h>
33 #include <assert.h>
34 #include <time.h>
35 #ifdef WIN32
36 #include <windows.h>
37 #endif
38 #include <tgf.h>
39 
40 /* static FILE *outTrace = (FILE*)NULL; */
41 
42 /* static char TraceStr[1024]; */
43 
44 void
46 {
47 }
48 
49 /* void GfFatal(char *fmt, ...) */
50 /* { */
51 /* va_list ap; */
52 /* va_start(ap, fmt); */
53 /* GfTrace(fmt, ap); */
54 /* va_end(ap); */
55 /* exit(1); */
56 /* } */
57 
58 
64 /* void GfTrace(char *fmt, ...) */
65 /* { */
66 /* va_list ap; */
67 /* struct tm *stm; */
68 /* time_t t; */
69 /* char *s = TraceStr; */
70 
71 /* fprintf(stderr, "ERROR: "); */
72 /* va_start(ap, fmt); */
73 /* vfprintf(stderr, fmt, ap); */
74 /* va_end(ap); */
75 /* fflush(stderr); */
76 
77 /* if (outTrace == NULL) { */
78 /* if ((outTrace = fopen("trace.txt", "w+")) == NULL) { */
79 /* perror("trace.txt"); */
80 /* return; */
81 /* } */
82 /* } */
83 /* t = time(NULL); */
84 /* stm = localtime(&t); */
85 /* s += snprintf(TraceStr, "%4d/%02d/%02d %02d:%02d:%02d ", */
86 /* stm->tm_year+1900, stm->tm_mon+1, stm->tm_mday, */
87 /* stm->tm_hour, stm->tm_min, stm->tm_sec); */
88 
89 /* va_start(ap, fmt); */
90 /* vsnprintf(s, 1023 - strlen(TraceStr), fmt, ap); */
91 /* va_end(ap); */
92 
93 /* fwrite(TraceStr, strlen(TraceStr), 1, outTrace); */
94 /* fflush(outTrace); */
95 /* } */
96 
void gfTraceInit(void)
Definition: trace.cpp:45
The Gaming Framework API.