For some reason Roman Pompejus' original logging patch opened the log in
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Dec 2002 21:35:05 +0000 (21:35 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Dec 2002 21:35:05 +0000 (21:35 +0000)
"wb" mode. Since we were mostly writing "\n" rather than "\r\n", I've
changed it to just "w" and refunded the difference.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2286 cda61777-01e9-0310-a592-d414129be87e

logging.c

index 6eaa3e9..67b2456 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -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",