1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

For some reason Roman Pompejus' original logging patch opened the log in

"wb" mode. Since we were mostly writing "\n" rather than "\r\n", I've
changed it to just "w" and refunded the difference.

[originally from svn r2286]
This commit is contained in:
Jacob Nevins 2002-12-07 21:35:05 +00:00
parent 602834d887
commit 9ee5d85169

View File

@ -96,7 +96,7 @@ void logfopen(void *handle)
if (!cfg.logtype)
return;
sprintf(writemod, "wb"); /* default to rewrite */
sprintf(writemod, "w"); /* default to rewrite */
time(&t);
tm = *localtime(&t);
@ -124,7 +124,7 @@ void logfopen(void *handle)
fputs("=~=~=~=~=~=~=~=~=~=~=~= PuTTY log ", ctx->lgfp);
strftime(buf, 24, "%Y.%m.%d %H:%M:%S", &tm);
fputs(buf, ctx->lgfp);
fputs(" =~=~=~=~=~=~=~=~=~=~=~=\r\n", ctx->lgfp);
fputs(" =~=~=~=~=~=~=~=~=~=~=~=\n", ctx->lgfp);
sprintf(buf, "%s session log (%s mode) to file: ",
(writemod[0] == 'a') ? "Appending" : "Writing new",