1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 11:02:48 -05:00

Reorganisation of misc.c: Minefield has moved out to winmisc.c, and

so has the Windows dputs() - which has also acquired a Unix
counterpart in uxmisc.c. -DDEBUG should now work on Unix.

[originally from svn r2914]
This commit is contained in:
Simon Tatham
2003-03-06 13:24:02 +00:00
parent 645eee8647
commit 6f693ffeb0
4 changed files with 277 additions and 251 deletions

View File

@ -3,6 +3,7 @@
*/
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include "putty.h"
@ -40,3 +41,19 @@ int filename_is_null(Filename fn)
{
return !*fn.path;
}
#ifdef DEBUG
static FILE *debug_fp = NULL;
void dputs(char *buf)
{
if (!debug_fp) {
debug_fp = fopen("debug.log", "w");
}
write(1, buf, strlen(buf));
fputs(buf, debug_fp);
fflush(debug_fp);
}
#endif