86 |
case WPTERR_CLIP_ISEMPTY: return _("There is no text in the Clipboard"); |
case WPTERR_CLIP_ISEMPTY: return _("There is no text in the Clipboard"); |
87 |
case WPTERR_CLIP_SECURED: return _("The Clipboard already contains GPG data"); |
case WPTERR_CLIP_SECURED: return _("The Clipboard already contains GPG data"); |
88 |
case WPTERR_CLIP: return _("General Clipboard error"); |
case WPTERR_CLIP: return _("General Clipboard error"); |
89 |
case WPTERR_FILE_ZERO: return _("File has a size of zero"); |
case WPTERR_REGISTRY: sprintf (buf, "%s", _("Registry error: ")); |
90 |
case WPTERR_REGISTRY: return _("Registry error"); |
w32_fmt_msg (buf + strlen (buf), 128); |
91 |
|
break; |
92 |
case WPTERR_WINSOCK_INIT: return _("Could not startup Winsock 2 interface"); |
case WPTERR_WINSOCK_INIT: return _("Could not startup Winsock 2 interface"); |
93 |
case WPTERR_WINSOCK_RESOLVE: return _("Could not resolve hostname"); |
case WPTERR_WINSOCK_RESOLVE: return _("Could not resolve hostname"); |
94 |
case WPTERR_WINSOCK_SOCKET: return _("Could not create new socket"); |
case WPTERR_WINSOCK_SOCKET: return _("Could not create new socket"); |
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 |