/[winpt]/trunk/Src/wptErrors.cpp
ViewVC logotype

Diff of /trunk/Src/wptErrors.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4 by twoaday, Sun Feb 6 11:11:40 2005 UTC revision 24 by twoaday, Sat Oct 8 10:43:08 2005 UTC
# Line 195  debug_f( const char *msg, const char *fi Line 195  debug_f( const char *msg, const char *fi
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

Legend:
Removed from v.4  
changed lines
  Added in v.24

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26