-/* $NetBSD: assorted.c,v 1.13 2001/01/04 06:16:51 jwise Exp $ */
+/* $NetBSD: assorted.c,v 1.14 2001/02/05 01:10:08 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)assorted.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: assorted.c,v 1.13 2001/01/04 06:16:51 jwise Exp $");
+__RCSID("$NetBSD: assorted.c,v 1.14 2001/02/05 01:10:08 christos Exp $");
#endif
#endif /* not lint */
#include <err.h>
#include "extern.h"
-void table(struct ship *, struct ship *, int, int, int, int);
-void Cleansnag(struct ship *, struct ship *, int, int);
static void strike (struct ship *, struct ship *);
void
-/* $NetBSD: dr_1.c,v 1.17 2001/01/04 06:16:51 jwise Exp $ */
+/* $NetBSD: dr_1.c,v 1.18 2001/02/05 01:10:08 christos 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.17 2001/01/04 06:16:51 jwise Exp $");
+__RCSID("$NetBSD: dr_1.c,v 1.18 2001/02/05 01:10:08 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "driver.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)
-/* $NetBSD: dr_2.c,v 1.17 2001/01/04 06:16:51 jwise Exp $ */
+/* $NetBSD: dr_2.c,v 1.18 2001/02/05 01:10:08 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)dr_2.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dr_2.c,v 1.17 2001/01/04 06:16:51 jwise Exp $");
+__RCSID("$NetBSD: dr_2.c,v 1.18 2001/02/05 01:10:08 christos Exp $");
#endif
#endif /* not lint */
#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(struct ship *, struct ship *, char *, int);
static void move_ship(struct ship *, const char *, unsigned char *, short *, short *, char *);
static void try(struct ship *, struct ship *, char *, char *, int, int, int, int, int, int *, int);
-/* $NetBSD: dr_3.c,v 1.13 2001/01/04 06:16:51 jwise Exp $ */
+/* $NetBSD: dr_3.c,v 1.14 2001/02/05 01:10:09 christos 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.13 2001/01/04 06:16:51 jwise Exp $");
+__RCSID("$NetBSD: dr_3.c,v 1.14 2001/02/05 01:10:09 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "driver.h"
-void moveall(void);
static int stillmoving(int);
static int is_isolated(struct ship *);
static int push(struct ship *, struct ship *);
static void step(struct ship *, int, 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
-/* $NetBSD: dr_4.c,v 1.11 2001/01/04 03:21:17 jwise Exp $ */
+/* $NetBSD: dr_4.c,v 1.12 2001/02/05 01:10:09 christos 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.11 2001/01/04 03:21:17 jwise Exp $");
+__RCSID("$NetBSD: dr_4.c,v 1.12 2001/02/05 01:10:09 christos Exp $");
#endif
#endif /* not lint */
#include <stdlib.h>
#include "extern.h"
-void ungrap(struct ship *, struct ship *);
-void grap(struct ship *, struct ship *);
-
void
ungrap(struct ship *from, struct ship *to)
{
-/* $NetBSD: dr_5.c,v 1.10 2001/01/04 06:16:51 jwise Exp $ */
+/* $NetBSD: dr_5.c,v 1.11 2001/02/05 01:10:09 christos 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.10 2001/01/04 06:16:51 jwise Exp $");
+__RCSID("$NetBSD: dr_5.c,v 1.11 2001/02/05 01:10:09 christos Exp $");
#endif
#endif /* not lint */
#include <sys/types.h>
#include "extern.h"
-void subtract(struct ship *, struct ship *, int, int *, int);
-int mensent(struct ship *, struct ship *, int *, struct ship **, int *, int);
-
void
subtract(struct ship *from, struct ship *fromcap, int totalfrom, int *crewfrom, int pcfrom)
{
-/* $NetBSD: dr_main.c,v 1.10 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: dr_main.c,v 1.11 2001/02/05 01:10:09 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)dr_main.c 8.2 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: dr_main.c,v 1.10 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: dr_main.c,v 1.11 2001/02/05 01:10:09 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "driver.h"
-int dr_main(void);
-
int
dr_main(void)
{
-/* $NetBSD: game.c,v 1.9 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: game.c,v 1.10 2001/02/05 01:10:09 christos 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.9 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: game.c,v 1.10 2001/02/05 01:10:09 christos Exp $");
#endif
#endif /* not lint */
#include <sys/types.h>
#include "extern.h"
-int maxturns(struct ship *, char *);
-int maxmove(struct ship *, int, int);
-
int
maxturns(struct ship *ship, char *af)
{
-/* $NetBSD: lo_main.c,v 1.10 2001/01/16 02:44:43 cgd Exp $ */
+/* $NetBSD: lo_main.c,v 1.11 2001/02/05 01:10:10 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)lo_main.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: lo_main.c,v 1.10 2001/01/16 02:44:43 cgd Exp $");
+__RCSID("$NetBSD: lo_main.c,v 1.11 2001/02/05 01:10:10 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "pathnames.h"
-int lo_main(void);
-
const char *const title[] = {
"Admiral", "Commodore", "Captain", "Captain",
"Captain", "Captain", "Captain", "Commander",
-/* $NetBSD: misc.c,v 1.11 2001/01/04 06:33:18 itojun Exp $ */
+/* $NetBSD: misc.c,v 1.12 2001/02/05 01:10:10 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: misc.c,v 1.11 2001/01/04 06:33:18 itojun Exp $");
+__RCSID("$NetBSD: misc.c,v 1.12 2001/02/05 01:10:10 christos Exp $");
#endif
#endif /* not lint */
#define distance(x,y) (abs(x) >= abs(y) ? abs(x) + abs(y)/2 : abs(y) + abs(x)/2)
-int range(struct ship *, struct ship *);
-struct ship *closestenemy(struct ship *, int, int);
static int angle(int, int);
-int gunsbear(struct ship *, struct ship *);
-int portside(struct ship *, struct ship *, int);
-int colours(struct ship *);
-void logger(struct ship *);
/* XXX */
int
-/* $NetBSD: parties.c,v 1.9 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: parties.c,v 1.10 2001/02/05 01:10:10 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)parties.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: parties.c,v 1.9 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: parties.c,v 1.10 2001/02/05 01:10:10 christos Exp $");
#endif
#endif /* not lint */
#include <sys/types.h>
#include "extern.h"
-int meleeing(struct ship *, struct ship *);
-int boarding(struct ship *, int);
-void unboard(struct ship *, struct ship *, int);
-
int
meleeing(struct ship *from, struct ship *to)
{
-/* $NetBSD: pl_1.c,v 1.15 2001/01/16 02:44:43 cgd Exp $ */
+/* $NetBSD: pl_1.c,v 1.16 2001/02/05 01:10:10 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_1.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_1.c,v 1.15 2001/01/16 02:44:43 cgd Exp $");
+__RCSID("$NetBSD: pl_1.c,v 1.16 2001/02/05 01:10:10 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "player.h"
-void leave(int) __attribute__((__noreturn__));
-void choke(int) __attribute__((__noreturn__));
-void child(int);
-
/*
* If we get here before a ship is chosen, then ms == 0 and
* we don't want to update the score file, or do any Write's either.
-/* $NetBSD: pl_2.c,v 1.9 2001/01/04 05:34:56 jwise Exp $ */
+/* $NetBSD: pl_2.c,v 1.10 2001/02/05 01:10:10 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_2.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_2.c,v 1.9 2001/01/04 05:34:56 jwise Exp $");
+__RCSID("$NetBSD: pl_2.c,v 1.10 2001/02/05 01:10:10 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "player.h"
-void play(void) __attribute__((__noreturn__));
-
void
play(void)
{
-/* $NetBSD: pl_3.c,v 1.15 2001/01/04 06:16:51 jwise Exp $ */
+/* $NetBSD: pl_3.c,v 1.16 2001/02/05 01:10:10 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_3.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_3.c,v 1.15 2001/01/04 06:16:51 jwise Exp $");
+__RCSID("$NetBSD: pl_3.c,v 1.16 2001/02/05 01:10:10 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "player.h"
-void acceptcombat(void);
-void grapungrap(void);
-void unfoulplayer(void);
-
void
acceptcombat(void)
{
-/* $NetBSD: pl_4.c,v 1.12 2001/01/04 04:41:41 jwise Exp $ */
+/* $NetBSD: pl_4.c,v 1.13 2001/02/05 01:10:11 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_4.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_4.c,v 1.12 2001/01/04 04:41:41 jwise Exp $");
+__RCSID("$NetBSD: pl_4.c,v 1.13 2001/02/05 01:10:11 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "player.h"
-void changesail(void);
-void acceptsignal(void);
-void lookout(void);
-const char *saywhat(struct ship *, int);
-void eyeball(struct ship *);
-
void
changesail(void)
{
-/* $NetBSD: pl_5.c,v 1.14 2001/01/04 06:33:18 itojun Exp $ */
+/* $NetBSD: pl_5.c,v 1.15 2001/02/05 01:10:11 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_5.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_5.c,v 1.14 2001/01/04 06:33:18 itojun Exp $");
+__RCSID("$NetBSD: pl_5.c,v 1.15 2001/02/05 01:10:11 christos Exp $");
#endif
#endif /* not lint */
#define turnfirst(x) (*x == 'r' || *x == 'l')
-void acceptmove(void);
-void acceptboard(void);
static void parties(struct ship *, int *, int, int);
void
-/* $NetBSD: pl_6.c,v 1.9 2001/01/04 04:41:42 jwise Exp $ */
+/* $NetBSD: pl_6.c,v 1.10 2001/02/05 01:10:11 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_6.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_6.c,v 1.9 2001/01/04 04:41:42 jwise Exp $");
+__RCSID("$NetBSD: pl_6.c,v 1.10 2001/02/05 01:10:11 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#include "player.h"
-void repair(void);
static int turned(void);
-void loadplayer(void);
void
repair(void)
-/* $NetBSD: pl_7.c,v 1.23 2001/01/16 02:44:43 cgd Exp $ */
+/* $NetBSD: pl_7.c,v 1.24 2001/02/05 01:10:11 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_7.c,v 1.23 2001/01/16 02:44:43 cgd Exp $");
+__RCSID("$NetBSD: pl_7.c,v 1.24 2001/02/05 01:10:11 christos Exp $");
#endif
#endif /* not lint */
#include "player.h"
#include "display.h"
-void initscreen(void);
-void cleanupscreen(void);
-void newturn(int);
-void Signal(const char *, struct ship *, ...)
- __attribute__((__format__(__printf__,1,3)));
-void Msg(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
static void Scroll(void);
-void prompt(const char *, struct ship *);
static void endprompt(int);
-int sgetch(const char *, struct ship *, int);
-void sgetstr(const char *, char *, int);
-void draw_screen(void);
-void draw_view(void);
-void draw_turn(void);
-void draw_stat(void);
-void draw_slot(void);
-void draw_board(void);
-void centerview(void);
-void upview(void);
-void downview(void);
-void leftview(void);
-void rightview(void);
static void adjustview(void);
/*
-/* $NetBSD: pl_main.c,v 1.14 2001/01/04 04:41:42 jwise Exp $ */
+/* $NetBSD: pl_main.c,v 1.15 2001/02/05 01:10:11 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_main.c,v 1.14 2001/01/04 04:41:42 jwise Exp $");
+__RCSID("$NetBSD: pl_main.c,v 1.15 2001/02/05 01:10:11 christos Exp $");
#endif
#endif /* not lint */
#include "player.h"
#include "restart.h"
-int pl_main(void);
static void initialize(void);
/*ARGSUSED*/
-/* $NetBSD: sync.c,v 1.19 2001/01/04 05:34:56 jwise Exp $ */
+/* $NetBSD: sync.c,v 1.20 2001/02/05 01:10:11 christos Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)sync.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: sync.c,v 1.19 2001/01/04 05:34:56 jwise Exp $");
+__RCSID("$NetBSD: sync.c,v 1.20 2001/02/05 01:10:11 christos Exp $");
#endif
#endif /* not lint */
#define BUFSIZE 4096
-void fmtship(char *, size_t, const char *, struct ship *);
-void makesignal(struct ship *, const char *, struct ship *, ...)
- __attribute__((__format__(__printf__,2,4)));
-void makemsg(struct ship *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
-int sync_exists(int);
-int sync_open(void);
-void sync_close(int);
-void Write(int, struct ship *, long, long, long, long);
-void Writestr(int, struct ship *, const char *);
-int Sync(void);
static int sync_update(int, struct ship *, const char *, long, long, long, long);
static const char SF[] = _PATH_SYNC;