195 |
|
|
196 |
|
|
197 |
void |
void |
198 |
log_f( const char *format, ... ) |
log_debug (const char *format, ...) |
199 |
{ |
{ |
200 |
FILE *fp; |
FILE *fp; |
201 |
char temp_path[384]; |
char temp_path[384]; |
202 |
va_list arg_ptr; |
va_list arg_ptr; |
203 |
|
|
204 |
GetTempPath( sizeof temp_path - 1, temp_path ); |
if (!debug) |
|
strcat( temp_path, "\\WinPT.LOG" ); |
|
|
fp = fopen( temp_path, "a+b" ); |
|
|
if( !fp ) |
|
205 |
return; |
return; |
206 |
va_start( arg_ptr, format ); |
|
207 |
vfprintf( fp, format, arg_ptr ); |
GetTempPath (sizeof temp_path - 1, temp_path); |
208 |
va_end( arg_ptr ); |
strcat (temp_path, "\\WinPT.LOG"); |
209 |
fflush( fp ); |
fp = fopen (temp_path, "a+b"); |
210 |
fclose( fp ); |
if (!fp) |
211 |
} /* log_f */ |
return; |
212 |
|
va_start (arg_ptr, format); |
213 |
|
vfprintf (fp, format, arg_ptr); |
214 |
|
va_end (arg_ptr); |
215 |
|
fflush (fp); |
216 |
|
fclose (fp); |
217 |
|
} |
218 |
|
|
219 |
|
|
220 |
int |
int |