projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Trim trailing whitespace off saved session names on the command line
[u/mdw/putty]
/
misc.c
diff --git
a/misc.c
b/misc.c
index
370eea0
..
e06ced6
100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-1,4
+1,11
@@
#include <windows.h>
#include <windows.h>
+#ifndef AUTO_WINSOCK
+#ifdef WINSOCK_TWO
+#include <winsock2.h>
+#else
+#include <winsock.h>
+#endif
+#endif
#include <stdio.h>
#include <stdlib.h>
#include "putty.h"
#include <stdio.h>
#include <stdlib.h>
#include "putty.h"
@@
-13,8
+20,10
@@
static FILE *fp = NULL;
void mlog(char *file, int line) {
static FILE *fp = NULL;
void mlog(char *file, int line) {
- if (!fp)
+ if (!fp)
{
fp = fopen("putty_mem.log", "w");
fp = fopen("putty_mem.log", "w");
+ setvbuf(fp, NULL, _IONBF, BUFSIZ);
+ }
if (fp)
fprintf (fp, "%s:%d: ", file, line);
}
if (fp)
fprintf (fp, "%s:%d: ", file, line);
}