]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - trek/win.c
Use An in AUTHORS section.
[bsdgames-darwin.git] / trek / win.c
index 5b7c8f24267a74e46b5889adc9e1137fb6d08997..9d45e38e8182930b84f48c3bf0f3961d53130f21 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: win.c,v 1.6 2001/02/05 01:12:46 christos Exp $ */
+/*     $NetBSD: win.c,v 1.12 2009/05/25 00:39:45 dholland Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -38,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)win.c      8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: win.c,v 1.6 2001/02/05 01:12:46 christos Exp $");
+__RCSID("$NetBSD: win.c,v 1.12 2009/05/25 00:39:45 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -64,10 +60,10 @@ __RCSID("$NetBSD: win.c,v 1.6 2001/02/05 01:12:46 christos Exp $");
 extern jmp_buf env;
 
 void
-win()
+win(void)
 {
        long            s;
-       const struct cvntab     *p = NULL;
+       const struct cvntab *p;
 
        sleep(1);
        printf("\nCongratulations, you have saved the Federation\n");
@@ -77,18 +73,17 @@ win()
        s = score();
 
        /* decide if she gets a promotion */
-       if (Game.helps == 0 && Game.killb == 0 && Game.killinhab == 0 && 5 * Game.kills + Game.deaths < 100 &&
-                       s >= 1000 && Ship.ship == ENTERPRISE)
-       {
+       if (Game.helps == 0 && Game.killb == 0 && Game.killinhab == 0 &&
+           5 * Game.kills + Game.deaths < 100 &&
+           s >= 1000 && Ship.ship == ENTERPRISE) {
                printf("In fact, you are promoted one step in rank,\n");
-               if (Game.skill >= 6)
+               if (Game.skill >= 6) {
                        printf("to the exalted rank of Commodore Emeritus\n");
-               else
-               {
+               } else {
                        p = &Skitab[Game.skill - 1];
-                       printf("from %s%s ", p->abrev, p->full);
+                       printf("from %s%s ", p->abbrev, p->full);
                        p++;
-                       printf("to %s%s\n", p->abrev, p->full);
+                       printf("to %s%s\n", p->abbrev, p->full);
                }
        }