]> git.cameronkatri.com Git - bsdgames-darwin.git/commitdiff
First half of static-ization of local funcs.
authorjwise <jwise@NetBSD.org>
Thu, 4 Jan 2001 01:53:24 +0000 (01:53 +0000)
committerjwise <jwise@NetBSD.org>
Thu, 4 Jan 2001 01:53:24 +0000 (01:53 +0000)
sail/assorted.c
sail/dr_1.c
sail/dr_2.c
sail/dr_3.c
sail/dr_4.c
sail/dr_5.c
sail/dr_main.c
sail/extern.h
sail/game.c

index ae418741232065a51cf5a6c56ef22aa98ac6f9f2..d2e16a653bef55e34005f239fd50db60bfa851f3 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: assorted.c,v 1.10 2001/01/01 21:57:37 jwise Exp $      */
+/*     $NetBSD: assorted.c,v 1.11 2001/01/04 01:53:24 jwise Exp $      */
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)assorted.c 8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: assorted.c,v 1.10 2001/01/01 21:57:37 jwise Exp $");
+__RCSID("$NetBSD: assorted.c,v 1.11 2001/01/04 01:53:24 jwise Exp $");
 #endif
 #endif /* not lint */
 
@@ -47,6 +47,8 @@ __RCSID("$NetBSD: assorted.c,v 1.10 2001/01/01 21:57:37 jwise Exp $");
 #include <unistd.h>
 #include <err.h>
 
+void   table(int, int, int, struct ship *, struct ship *, int);
+void   Cleansnag(struct ship *, struct ship *, int, int);
 static void strike (struct ship *, struct ship *);
 
 void
index bc6a6ccad03ccde49b13a03671b39e3fbd0656d4..d63feef2c5db87dd776796f3942d19dd117f54be 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: dr_1.c,v 1.12 2001/01/01 21:57:37 jwise Exp $  */
+/*     $NetBSD: dr_1.c,v 1.13 2001/01/04 01:53:24 jwise Exp $  */
 
 /*
  * Copyright (c) 1983, 1993
 #if 0
 static char sccsid[] = "@(#)dr_1.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: dr_1.c,v 1.12 2001/01/01 21:57:37 jwise Exp $");
+__RCSID("$NetBSD: dr_1.c,v 1.13 2001/01/04 01:53:24 jwise Exp $");
 #endif
 #endif /* not lint */
 
 #include "driver.h"
 #include <stdlib.h>
 
+void   unfoul(void);
+void   boardcomp(void);
+static int     fightitout(struct ship *, struct ship *, int);
+void   resolve(void);
+void   compcombat(void);
+int    next(void);
+
 void
 unfoul(void)
 {
@@ -133,7 +140,7 @@ boardcomp(void)
        }
 }
 
-int
+static int
 fightitout(struct ship *from, struct ship *to, int key)
 {
        struct ship *fromcap, *tocap;
index 236faac786c8e523c0389ceef9eeafe1c9612f27..065902ed3b4a16d33110df7803a22f2f16f17176 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: dr_2.c,v 1.13 2001/01/01 21:57:37 jwise Exp $  */
+/*     $NetBSD: dr_2.c,v 1.14 2001/01/04 01:53:24 jwise Exp $  */
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)dr_2.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: dr_2.c,v 1.13 2001/01/01 21:57:37 jwise Exp $");
+__RCSID("$NetBSD: dr_2.c,v 1.14 2001/01/04 01:53:24 jwise Exp $");
 #endif
 #endif /* not lint */
 
@@ -47,6 +47,18 @@ __RCSID("$NetBSD: dr_2.c,v 1.13 2001/01/01 21:57:37 jwise Exp $");
 
 #define couldwin(f,t) (f->specs->crew2 > t->specs->crew2 * 1.5)
 
+void   thinkofgrapples(void);
+void   checkup(void);
+void   prizecheck(void);
+static int     str_end(const char *);
+void   closeon(struct ship *, struct ship *, char *, int, int, int);
+static int     score(char *, struct ship *, struct ship *, int);
+static void    move_ship(const char *, struct ship *, unsigned char *, short *, short *, char *);
+static void    try(char *, char *, int, int, int, int, int, struct ship *, struct ship *, int *, int);
+static void    rmend(char *);
+
+const int dtab[] = {0,1,1,2,3,4,4,5};  /* diagonal distances in x==y */
+
 void
 thinkofgrapples(void)
 {
@@ -127,7 +139,7 @@ prizecheck(void)
        }
 }
 
-int
+static int
 str_end(const char *str)
 {
        const char *p;
@@ -148,9 +160,7 @@ closeon(struct ship *from, struct ship *to, char *command, int ta, int ma, int a
        try(command, temp, ma, ta, af, ma, from->file->dir, from, to, &high, 0);
 }
 
-const int dtab[] = {0,1,1,2,3,4,4,5};  /* diagonal distances in x==y */
-
-int
+static int
 score(char *movement, struct ship *ship, struct ship *to, int onlytemp)
 {
        char drift;
@@ -181,7 +191,7 @@ score(char *movement, struct ship *ship, struct ship *to, int onlytemp)
        return total;
 }
 
-void
+static void
 move_ship(const char *p, struct ship *ship, unsigned char *dir, short *row, short *col, char *drift)
 {
        int dist;
@@ -221,7 +231,7 @@ move_ship(const char *p, struct ship *ship, unsigned char *dir, short *row, shor
                *drift = 0;
 }
 
-void
+static void
 try(char *command, char *temp, int ma, int ta, int af, int vma, int dir, struct ship *f, struct ship *t, int *high, int rakeme)
 {
        int new, n;
@@ -263,7 +273,7 @@ try(char *command, char *temp, int ma, int ta, int af, int vma, int dir, struct
        }
 }
 
-void
+static void
 rmend(char *str)
 {
        char *p;
index b10fae42d5fbe605561d65268d26743509d44150..3c8be352df6b9b6cd703e0cc8cafc797ca15e27d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: dr_3.c,v 1.9 2001/01/01 21:57:37 jwise Exp $   */
+/*     $NetBSD: dr_3.c,v 1.10 2001/01/04 01:53:24 jwise Exp $  */
 
 /*
  * Copyright (c) 1983, 1993
 #if 0
 static char sccsid[] = "@(#)dr_3.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: dr_3.c,v 1.9 2001/01/01 21:57:37 jwise Exp $");
+__RCSID("$NetBSD: dr_3.c,v 1.10 2001/01/04 01:53:24 jwise Exp $");
 #endif
 #endif /* not lint */
 
 #include "driver.h"
 #include <stdlib.h>
 
+void   moveall(void);
+static int     stillmoving(int);
+static int     is_isolated(struct ship *);
+static int     push(struct ship *, struct ship *);
+static void    step(int, struct ship *, char *);
+void   sendbp(struct ship *, struct ship *, int, int);
+int    is_toughmelee(struct ship *, struct ship *, int, int);
+void   reload(void);
+void   checksails(void);
+
 /* move all comp ships */
 void
 moveall(void)
@@ -183,7 +193,7 @@ moveall(void)
        }
 }
 
-int
+static int
 stillmoving(int k)
 {
        struct ship *sp;
@@ -194,7 +204,7 @@ stillmoving(int k)
        return 0;
 }
 
-int
+static int
 is_isolated(struct ship *ship)
 {
        struct ship *sp;
@@ -206,7 +216,7 @@ is_isolated(struct ship *ship)
        return 1;
 }
 
-int
+static int
 push(struct ship *from, struct ship *to)
 {
        int bs, sb;
@@ -220,7 +230,7 @@ push(struct ship *from, struct ship *to)
        return from < to;
 }
 
-void
+static void
 step(int com, struct ship *sp, char *moved)
 {
        int dist;
index 2617ddccce5e9848e5d887b96818a2f2fff2a496..afd9373cf3be540658d02c57295d8b26b73cbc43 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: dr_4.c,v 1.9 2001/01/01 21:57:37 jwise Exp $   */
+/*     $NetBSD: dr_4.c,v 1.10 2001/01/04 01:53:24 jwise Exp $  */
 
 /*
  * Copyright (c) 1983, 1993
 #if 0
 static char sccsid[] = "@(#)dr_4.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: dr_4.c,v 1.9 2001/01/01 21:57:37 jwise Exp $");
+__RCSID("$NetBSD: dr_4.c,v 1.10 2001/01/04 01:53:24 jwise Exp $");
 #endif
 #endif /* not lint */
 
 #include "extern.h"
 #include <stdlib.h>
 
+void   ungrap(struct ship *, struct ship *);
+void   grap(struct ship *, struct ship *);
+
 void
 ungrap(struct ship *from, struct ship *to)
 {
index a48e549e803c399bce11fadbfee44dadfc8bb7a0..857f00dc48e7b99c01fd2bf3dabb877dff4e3d15 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: dr_5.c,v 1.7 2001/01/01 21:57:38 jwise Exp $   */
+/*     $NetBSD: dr_5.c,v 1.8 2001/01/04 01:53:24 jwise Exp $   */
 
 /*
  * Copyright (c) 1983, 1993
 #if 0
 static char sccsid[] = "@(#)dr_5.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: dr_5.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: dr_5.c,v 1.8 2001/01/04 01:53:24 jwise Exp $");
 #endif
 #endif /* not lint */
 
 #include "extern.h"
 
+void   subtract(struct ship *, int, int *, struct ship *, int);
+int    mensent(struct ship *, struct ship *, int *, struct ship **, int *, int);
+
 void
 subtract(struct ship *from, int totalfrom, int *crewfrom, struct ship *fromcap, int pcfrom)
 {
index 4e7778c973a44e90950cc38455266224a2be1ac0..0b7db8b48070da13657b0c9f3f21ff57fdb7b105 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: dr_main.c,v 1.7 2001/01/01 21:57:38 jwise Exp $        */
+/*     $NetBSD: dr_main.c,v 1.8 2001/01/04 01:53:24 jwise Exp $        */
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)dr_main.c  8.2 (Berkeley) 4/16/94";
 #else
-__RCSID("$NetBSD: dr_main.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: dr_main.c,v 1.8 2001/01/04 01:53:24 jwise Exp $");
 #endif
 #endif /* not lint */
 
@@ -46,6 +46,8 @@ __RCSID("$NetBSD: dr_main.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
 #include <stdlib.h>
 #include <unistd.h>
 
+int    dr_main(void);
+
 int
 dr_main(void)
 {
index 65f06bf9fe212476bac59201eb66fe089df16980..1b9be7db31827e3ed1e17373779d35054cd6e053 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.18 2001/01/01 21:57:38 jwise Exp $ */
+/*     $NetBSD: extern.h,v 1.19 2001/01/04 01:53:24 jwise Exp $ */
 
 /*
  * Copyright (c) 1983, 1993
@@ -307,7 +307,6 @@ void Cleansnag (struct ship *, struct ship *, int, int);
 /* dr_1.c */
 void unfoul (void);
 void boardcomp (void);
-int fightitout (struct ship *, struct ship *, int);
 void resolve (void);
 void compcombat (void);
 int next (void);
@@ -316,20 +315,10 @@ int next (void);
 void thinkofgrapples (void);
 void checkup (void);
 void prizecheck (void);
-int str_end (const char *);
 void closeon (struct ship *, struct ship *, char *, int, int, int);
-int score (char *, struct ship *, struct ship *, int);
-void move_ship (const char *, struct ship *, unsigned char *, short *, short *, char *);
-void try (char *, char *, int, int, int, int, int, struct ship *,
-    struct ship *, int *, int);
-void rmend (char *);
 
 /* dr_3.c */
 void moveall (void);
-int stillmoving (int);
-int is_isolated (struct ship *);
-int push (struct ship *, struct ship *);
-void step (int, struct ship *, char *);
 void sendbp (struct ship *, struct ship *, int, int);
 int is_toughmelee (struct ship *, struct ship *, int, int);
 void reload (void);
index ae871273c599388c4b6588a1bdc63fc148cbebac..5819a6e8a67cc7cf4d616e98089cee191fd63f87 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: game.c,v 1.7 2001/01/01 21:57:38 jwise Exp $   */
+/*     $NetBSD: game.c,v 1.8 2001/01/04 01:53:24 jwise Exp $   */
 
 /*
  * Copyright (c) 1983, 1993
 #if 0
 static char sccsid[] = "@(#)game.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: game.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: game.c,v 1.8 2001/01/04 01:53:24 jwise Exp $");
 #endif
 #endif /* not lint */
 
 #include "extern.h"
 
+int    maxturns(struct ship *, char *);
+int    maxmove(struct ship *, int, int);
+
 int
 maxturns(struct ship *ship, char *af)
 {