]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - battlestar/command6.c
Remove extra semicolon.
[bsdgames-darwin.git] / battlestar / command6.c
index be46f0a7bb28f14192efc624d0ff51e9ff1d4c3d..0c6c864155410cf2f16fcea7a32b7cc45834611a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: command6.c,v 1.5 2009/08/12 05:20:38 dholland Exp $    */
+/*     $NetBSD: command6.c,v 1.8 2010/04/24 00:38:30 dholland Exp $    */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)com6.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: command6.c,v 1.5 2009/08/12 05:20:38 dholland Exp $");
+__RCSID("$NetBSD: command6.c,v 1.8 2010/04/24 00:38:30 dholland Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -120,17 +120,14 @@ static void
 post(int ch)
 {
        time_t tv;
-       char   *date;
        sigset_t isigset, osigset;
 
        sigemptyset(&isigset);
        sigaddset(&isigset, SIGINT);
        sigprocmask(SIG_BLOCK, &isigset, &osigset);
        tv = time(NULL);
-       date = ctime(&tv);
-       date[24] = '\0';
        if (score_fp != NULL) {
-               fprintf(score_fp, "%s  %8s  %c%20s", date, username, 
+               fprintf(score_fp, "%24.24s  %8s  %c%20s", ctime(&tv), username, 
                    ch, rate());
                if (wiz)
                        fprintf(score_fp, "   wizard\n");
@@ -140,6 +137,7 @@ post(int ch)
                        else
                                fprintf(score_fp, "\n");
        }
+       fflush(score_fp);
        sigprocmask(SIG_SETMASK, &osigset, (sigset_t *) 0);
 }