2000-02-10 01:27:55 +03:00
|
|
|
/* $NetBSD: extern.h,v 1.14 2000/02/09 22:27:55 jsm Exp $ */
|
1997-01-07 15:42:14 +03:00
|
|
|
|
1996-12-28 22:09:10 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1983, 1993
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 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
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* @(#)externs.h 8.1 (Berkeley) 5/31/93
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <signal.h>
|
1997-01-07 15:42:14 +03:00
|
|
|
#include <string.h>
|
1996-12-28 22:09:10 +03:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <setjmp.h>
|
2000-02-10 01:27:55 +03:00
|
|
|
#include <sys/types.h>
|
1996-12-28 22:09:10 +03:00
|
|
|
#include "machdep.h"
|
|
|
|
|
|
|
|
/* program mode */
|
1999-12-28 21:05:24 +03:00
|
|
|
extern int mode;
|
|
|
|
extern jmp_buf restart;
|
1996-12-28 22:09:10 +03:00
|
|
|
#define MODE_PLAYER 1
|
|
|
|
#define MODE_DRIVER 2
|
|
|
|
#define MODE_LOGGER 3
|
|
|
|
|
|
|
|
/* command line flags */
|
1999-12-28 21:05:24 +03:00
|
|
|
extern char debug; /* -D */
|
|
|
|
extern char randomize; /* -x, give first available ship */
|
|
|
|
extern char longfmt; /* -l, print score in long format */
|
|
|
|
extern char nobells; /* -b, don't ring bell before Signal */
|
1996-12-28 22:09:10 +03:00
|
|
|
|
|
|
|
/* other initial modes */
|
2000-02-10 01:27:55 +03:00
|
|
|
extern gid_t gid;
|
|
|
|
extern gid_t egid;
|
1996-12-28 22:09:10 +03:00
|
|
|
|
|
|
|
#define die() ((rand() >> 3) % 6 + 1)
|
|
|
|
#define sqr(a) ((a) * (a))
|
|
|
|
#define abs(a) ((a) > 0 ? (a) : -(a))
|
|
|
|
#define min(a,b) ((a) < (b) ? (a) : (b))
|
|
|
|
|
|
|
|
#define grappled(a) ((a)->file->ngrap)
|
|
|
|
#define fouled(a) ((a)->file->nfoul)
|
|
|
|
#define snagged(a) (grappled(a) + fouled(a))
|
|
|
|
|
|
|
|
#define grappled2(a, b) ((a)->file->grap[(b)->file->index].sn_count)
|
|
|
|
#define fouled2(a, b) ((a)->file->foul[(b)->file->index].sn_count)
|
|
|
|
#define snagged2(a, b) (grappled2(a, b) + fouled2(a, b))
|
|
|
|
|
|
|
|
#define Xgrappled2(a, b) ((a)->file->grap[(b)->file->index].sn_turn < turn-1 ? grappled2(a, b) : 0)
|
|
|
|
#define Xfouled2(a, b) ((a)->file->foul[(b)->file->index].sn_turn < turn-1 ? fouled2(a, b) : 0)
|
|
|
|
#define Xsnagged2(a, b) (Xgrappled2(a, b) + Xfouled2(a, b))
|
|
|
|
|
|
|
|
#define cleangrapple(a, b, c) Cleansnag(a, b, c, 1)
|
|
|
|
#define cleanfoul(a, b, c) Cleansnag(a, b, c, 2)
|
|
|
|
#define cleansnag(a, b, c) Cleansnag(a, b, c, 3)
|
|
|
|
|
|
|
|
#define sterncolour(sp) ((sp)->file->stern+'0'-((sp)->file->captured?10:0))
|
|
|
|
#define sternrow(sp) ((sp)->file->row + dr[(sp)->file->dir])
|
|
|
|
#define sterncol(sp) ((sp)->file->col + dc[(sp)->file->dir])
|
|
|
|
|
|
|
|
#define capship(sp) ((sp)->file->captured?(sp)->file->captured:(sp))
|
|
|
|
|
|
|
|
#define readyname(r) ((r) & R_LOADING ? '*' : ((r) & R_INITIAL ? '!' : ' '))
|
|
|
|
|
|
|
|
/* loadL and loadR, should match loadname[] */
|
|
|
|
#define L_EMPTY 0 /* should be 0, don't change */
|
|
|
|
#define L_GRAPE 1
|
|
|
|
#define L_CHAIN 2
|
|
|
|
#define L_ROUND 3
|
|
|
|
#define L_DOUBLE 4
|
|
|
|
#define L_EXPLODE 5
|
|
|
|
|
|
|
|
/*
|
|
|
|
* readyL and readyR, these are bits, except R_EMPTY
|
|
|
|
*/
|
|
|
|
#define R_EMPTY 0 /* not loaded and not loading */
|
|
|
|
#define R_LOADING 1 /* loading */
|
|
|
|
#define R_DOUBLE 2 /* loading double */
|
|
|
|
#define R_LOADED 4 /* loaded */
|
|
|
|
#define R_INITIAL 8 /* loaded initial */
|
|
|
|
|
|
|
|
#define HULL 0
|
|
|
|
#define RIGGING 1
|
|
|
|
|
|
|
|
#define W_CAPTAIN 1
|
|
|
|
#define W_CAPTURED 2
|
|
|
|
#define W_CLASS 3
|
|
|
|
#define W_CREW 4
|
|
|
|
#define W_DBP 5
|
|
|
|
#define W_DRIFT 6
|
|
|
|
#define W_EXPLODE 7
|
|
|
|
#define W_FILE 8
|
|
|
|
#define W_FOUL 9
|
|
|
|
#define W_GUNL 10
|
|
|
|
#define W_GUNR 11
|
|
|
|
#define W_HULL 12
|
|
|
|
#define W_MOVE 13
|
|
|
|
#define W_OBP 14
|
|
|
|
#define W_PCREW 15
|
|
|
|
#define W_UNFOUL 16
|
|
|
|
#define W_POINTS 17
|
|
|
|
#define W_QUAL 18
|
|
|
|
#define W_UNGRAP 19
|
|
|
|
#define W_RIGG 20
|
|
|
|
#define W_COL 21
|
|
|
|
#define W_DIR 22
|
|
|
|
#define W_ROW 23
|
|
|
|
#define W_SIGNAL 24
|
|
|
|
#define W_SINK 25
|
|
|
|
#define W_STRUCK 26
|
|
|
|
#define W_TA 27
|
|
|
|
#define W_ALIVE 28
|
|
|
|
#define W_TURN 29
|
|
|
|
#define W_WIND 30
|
|
|
|
#define W_FS 31
|
|
|
|
#define W_GRAP 32
|
|
|
|
#define W_RIG1 33
|
|
|
|
#define W_RIG2 34
|
|
|
|
#define W_RIG3 35
|
|
|
|
#define W_RIG4 36
|
|
|
|
#define W_BEGIN 37
|
|
|
|
#define W_END 38
|
|
|
|
#define W_DDEAD 39
|
|
|
|
|
|
|
|
#define NLOG 10
|
|
|
|
struct logs {
|
|
|
|
char l_name[20];
|
|
|
|
int l_uid;
|
|
|
|
int l_shipnum;
|
|
|
|
int l_gamenum;
|
|
|
|
int l_netpoints;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BP {
|
|
|
|
short turnsent;
|
|
|
|
struct ship *toship;
|
|
|
|
short mensent;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct snag {
|
|
|
|
short sn_count;
|
|
|
|
short sn_turn;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define NSCENE nscene
|
|
|
|
#define NSHIP 10
|
|
|
|
#define NBP 3
|
|
|
|
|
|
|
|
#define NNATION 8
|
|
|
|
#define N_A 0
|
|
|
|
#define N_B 1
|
|
|
|
#define N_S 2
|
|
|
|
#define N_F 3
|
|
|
|
#define N_J 4
|
|
|
|
#define N_D 5
|
|
|
|
#define N_K 6
|
|
|
|
#define N_O 7
|
|
|
|
|
|
|
|
struct File {
|
|
|
|
int index;
|
|
|
|
char captain[20]; /* 0 */
|
|
|
|
short points; /* 20 */
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char loadL; /* 22 */
|
|
|
|
unsigned char loadR; /* 24 */
|
|
|
|
unsigned char readyL; /* 26 */
|
|
|
|
unsigned char readyR; /* 28 */
|
1996-12-28 22:09:10 +03:00
|
|
|
struct BP OBP[NBP]; /* 30 */
|
|
|
|
struct BP DBP[NBP]; /* 48 */
|
|
|
|
char struck; /* 66 */
|
|
|
|
struct ship *captured; /* 68 */
|
|
|
|
short pcrew; /* 70 */
|
|
|
|
char movebuf[10]; /* 72 */
|
|
|
|
char drift; /* 82 */
|
|
|
|
short nfoul;
|
|
|
|
short ngrap;
|
|
|
|
struct snag foul[NSHIP]; /* 84 */
|
|
|
|
struct snag grap[NSHIP]; /* 124 */
|
|
|
|
char RH; /* 224 */
|
|
|
|
char RG; /* 226 */
|
|
|
|
char RR; /* 228 */
|
|
|
|
char FS; /* 230 */
|
|
|
|
char explode; /* 232 */
|
|
|
|
char sink; /* 234 */
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char dir;
|
1996-12-28 22:09:10 +03:00
|
|
|
short col;
|
|
|
|
short row;
|
|
|
|
char loadwith;
|
|
|
|
char stern;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ship {
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const char *shipname; /* 0 */
|
1996-12-28 22:09:10 +03:00
|
|
|
struct shipspecs *specs; /* 2 */
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char nationality; /* 4 */
|
1996-12-28 22:09:10 +03:00
|
|
|
short shiprow; /* 6 */
|
|
|
|
short shipcol; /* 8 */
|
|
|
|
char shipdir; /* 10 */
|
|
|
|
struct File *file; /* 12 */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct scenario {
|
|
|
|
char winddir; /* 0 */
|
|
|
|
char windspeed; /* 2 */
|
|
|
|
char windchange; /* 4 */
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char vessels; /* 12 */
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const char *name; /* 14 */
|
1996-12-28 22:09:10 +03:00
|
|
|
struct ship ship[NSHIP]; /* 16 */
|
|
|
|
};
|
1998-03-29 08:57:19 +04:00
|
|
|
extern struct scenario scene[];
|
1999-12-28 21:05:24 +03:00
|
|
|
extern int nscene;
|
1996-12-28 22:09:10 +03:00
|
|
|
|
|
|
|
struct shipspecs {
|
|
|
|
char bs;
|
|
|
|
char fs;
|
|
|
|
char ta;
|
|
|
|
short guns;
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char class;
|
1996-12-28 22:09:10 +03:00
|
|
|
char hull;
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char qual;
|
1996-12-28 22:09:10 +03:00
|
|
|
char crew1;
|
|
|
|
char crew2;
|
|
|
|
char crew3;
|
|
|
|
char gunL;
|
|
|
|
char gunR;
|
|
|
|
char carL;
|
|
|
|
char carR;
|
1997-04-19 11:35:33 +04:00
|
|
|
int rig1;
|
|
|
|
int rig2;
|
|
|
|
int rig3;
|
|
|
|
int rig4;
|
1996-12-28 22:09:10 +03:00
|
|
|
short pts;
|
|
|
|
};
|
1998-03-29 08:57:19 +04:00
|
|
|
extern struct shipspecs specs[];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
1999-12-28 21:05:24 +03:00
|
|
|
extern struct scenario *cc; /* the current scenario */
|
|
|
|
extern struct ship *ls; /* &cc->ship[cc->vessels] */
|
1996-12-28 22:09:10 +03:00
|
|
|
|
|
|
|
#define SHIP(s) (&cc->ship[s])
|
|
|
|
#define foreachship(sp) for ((sp) = cc->ship; (sp) < ls; (sp)++)
|
|
|
|
|
|
|
|
struct windeffects {
|
|
|
|
char A, B, C, D;
|
|
|
|
};
|
1999-12-28 21:05:24 +03:00
|
|
|
extern const struct windeffects WET[7][6];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
|
|
|
struct Tables {
|
|
|
|
char H, G, C, R;
|
|
|
|
};
|
1999-12-28 21:05:24 +03:00
|
|
|
extern const struct Tables RigTable[11][6];
|
|
|
|
extern const struct Tables HullTable[11][6];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
1999-12-28 21:05:24 +03:00
|
|
|
extern const char AMMO[9][4];
|
|
|
|
extern const char HDT[9][10];
|
|
|
|
extern const char HDTrake[9][10];
|
|
|
|
extern const char QUAL[9][5];
|
|
|
|
extern const char MT[9][3];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
extern const char *const countryname[];
|
|
|
|
extern const char *const classname[];
|
|
|
|
extern const char *const directionname[];
|
|
|
|
extern const char *const qualname[];
|
|
|
|
extern const char loadname[];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
extern const char rangeofshot[];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
extern const char dr[], dc[];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
1999-12-28 21:05:24 +03:00
|
|
|
extern int winddir;
|
|
|
|
extern int windspeed;
|
|
|
|
extern int turn;
|
|
|
|
extern int game;
|
|
|
|
extern int alive;
|
|
|
|
extern int people;
|
|
|
|
extern char hasdriver;
|
1996-12-28 22:09:10 +03:00
|
|
|
|
1997-10-13 23:42:53 +04:00
|
|
|
/* assorted.c */
|
|
|
|
void table __P((int, int, int, struct ship *, struct ship *, int));
|
|
|
|
void Cleansnag __P((struct ship *, struct ship *, int, int));
|
|
|
|
|
|
|
|
/* dr_1.c */
|
|
|
|
void unfoul __P((void));
|
|
|
|
void boardcomp __P((void));
|
|
|
|
int fightitout __P((struct ship *, struct ship *, int));
|
|
|
|
void resolve __P((void));
|
|
|
|
void compcombat __P((void));
|
|
|
|
int next __P((void));
|
|
|
|
|
|
|
|
/* dr_2.c */
|
|
|
|
void thinkofgrapples __P((void));
|
|
|
|
void checkup __P((void));
|
|
|
|
void prizecheck __P((void));
|
1999-09-30 22:01:31 +04:00
|
|
|
int str_end __P((const char *));
|
1997-10-13 23:42:53 +04:00
|
|
|
void closeon __P((struct ship *, struct ship *, char[], int, int, int));
|
|
|
|
int score __P((char[], struct ship *, struct ship *, int));
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
void move_ship __P((const char *, struct ship *, unsigned char *, short *, short *, char *));
|
1997-10-13 23:42:53 +04:00
|
|
|
void try __P((char[], char [], int, int, int, int, int, struct ship *,
|
|
|
|
struct ship *, int *, int));
|
|
|
|
void rmend __P((char *));
|
|
|
|
|
|
|
|
/* dr_3.c */
|
|
|
|
void moveall __P((void));
|
|
|
|
int stillmoving __P((int));
|
1999-09-30 22:01:31 +04:00
|
|
|
int is_isolated __P((struct ship *));
|
1997-10-13 23:42:53 +04:00
|
|
|
int push __P((struct ship *, struct ship *));
|
|
|
|
void step __P((int, struct ship *, char *));
|
|
|
|
void sendbp __P((struct ship *, struct ship *, int, int));
|
1999-09-30 22:01:31 +04:00
|
|
|
int is_toughmelee __P((struct ship *, struct ship *, int, int));
|
1997-10-13 23:42:53 +04:00
|
|
|
void reload __P((void));
|
|
|
|
void checksails __P((void));
|
|
|
|
|
|
|
|
/* dr_4.c */
|
|
|
|
void ungrap __P((struct ship *, struct ship *));
|
|
|
|
void grap __P((struct ship *, struct ship *));
|
|
|
|
|
|
|
|
/* dr_5.c */
|
|
|
|
void subtract __P((struct ship *, int, int [3], struct ship *, int));
|
|
|
|
int mensent __P((struct ship *, struct ship *, int[3], struct ship **, int *,
|
|
|
|
int));
|
|
|
|
|
|
|
|
/* dr_main.c */
|
|
|
|
int dr_main __P((void));
|
|
|
|
|
|
|
|
/* game.c */
|
|
|
|
int maxturns __P((struct ship *, char *));
|
|
|
|
int maxmove __P((struct ship *, int, int));
|
|
|
|
|
|
|
|
/* lo_main.c */
|
|
|
|
int lo_main __P((void));
|
|
|
|
|
|
|
|
/* misc.c */
|
|
|
|
int range __P((struct ship *, struct ship *));
|
|
|
|
struct ship *closestenemy __P((struct ship *, int, int));
|
|
|
|
int angle __P((int, int));
|
|
|
|
int gunsbear __P((struct ship *, struct ship *));
|
|
|
|
int portside __P((struct ship *, struct ship *, int));
|
|
|
|
int colours __P((struct ship *));
|
|
|
|
void logger __P((struct ship *));
|
|
|
|
|
|
|
|
/* parties.c */
|
|
|
|
int meleeing __P((struct ship *, struct ship *));
|
|
|
|
int boarding __P((struct ship *, int));
|
|
|
|
void unboard __P((struct ship *, struct ship *, int));
|
|
|
|
|
|
|
|
/* pl_1.c */
|
1998-09-13 19:27:25 +04:00
|
|
|
void leave __P((int)) __attribute__((__noreturn__));
|
|
|
|
void choke __P((int)) __attribute__((__noreturn__));
|
1997-10-13 23:42:53 +04:00
|
|
|
void child __P((int));
|
|
|
|
|
|
|
|
/* pl_2.c */
|
1999-09-09 01:45:25 +04:00
|
|
|
void play __P((void)) __attribute__((__noreturn__));
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_3.c */
|
|
|
|
void acceptcombat __P((void));
|
|
|
|
void grapungrap __P((void));
|
|
|
|
void unfoulplayer __P((void));
|
|
|
|
|
|
|
|
/* pl_4.c */
|
|
|
|
void changesail __P((void));
|
|
|
|
void acceptsignal __P((void));
|
|
|
|
void lookout __P((void));
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const char *saywhat __P((struct ship *, int));
|
1997-10-13 23:42:53 +04:00
|
|
|
void eyeball __P((struct ship *));
|
|
|
|
|
|
|
|
/* pl_5.c */
|
|
|
|
void acceptmove __P((void));
|
|
|
|
void acceptboard __P((void));
|
|
|
|
void parties __P((int[3], struct ship *, int, int));
|
|
|
|
|
|
|
|
/* pl_6.c */
|
|
|
|
void repair __P((void));
|
|
|
|
int turned __P((void));
|
|
|
|
void loadplayer __P((void));
|
|
|
|
|
|
|
|
/* pl_7.c */
|
|
|
|
void initscreen __P((void));
|
|
|
|
void cleanupscreen __P((void));
|
|
|
|
void newturn __P((int));
|
1997-10-14 01:02:57 +04:00
|
|
|
void Signal __P((const char *, struct ship *, ...))
|
|
|
|
__attribute__((__format__(__printf__,1,3)));
|
|
|
|
void Msg __P((const char *, ...))
|
|
|
|
__attribute__((__format__(__printf__,1,2)));
|
1997-10-13 23:42:53 +04:00
|
|
|
void Scroll __P((void));
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
void prompt __P((const char *, struct ship *));
|
1997-10-13 23:42:53 +04:00
|
|
|
void endprompt __P((int));
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
int sgetch __P((const char *, struct ship *, int));
|
|
|
|
void sgetstr __P((const char *, char *, int));
|
1997-10-13 23:42:53 +04:00
|
|
|
void draw_screen __P((void));
|
|
|
|
void draw_view __P((void));
|
|
|
|
void draw_turn __P((void));
|
|
|
|
void draw_stat __P((void));
|
|
|
|
void draw_slot __P((void));
|
|
|
|
void draw_board __P((void));
|
|
|
|
void centerview __P((void));
|
|
|
|
void upview __P((void));
|
|
|
|
void downview __P((void));
|
|
|
|
void leftview __P((void));
|
|
|
|
void rightview __P((void));
|
|
|
|
void adjustview __P((void));
|
|
|
|
|
|
|
|
/* pl_main.c */
|
|
|
|
int pl_main __P((void));
|
|
|
|
void initialize __P((void));
|
|
|
|
|
|
|
|
/* sync.c */
|
|
|
|
void fmtship __P((char *, size_t, const char *, struct ship *));
|
1997-10-14 01:02:57 +04:00
|
|
|
void makesignal __P((struct ship *, const char *, struct ship *, ...))
|
|
|
|
__attribute__((__format__(__printf__,2,4)));
|
|
|
|
void makemsg __P((struct ship *, const char *, ...))
|
|
|
|
__attribute__((__format__(__printf__,2,3)));
|
1997-10-13 23:42:53 +04:00
|
|
|
int sync_exists __P((int));
|
|
|
|
int sync_open __P((void));
|
|
|
|
void sync_close __P((int));
|
1999-02-10 03:45:45 +03:00
|
|
|
void Write __P((int, struct ship *, long, long, long, long));
|
|
|
|
void Writestr __P((int, struct ship *, const char *));
|
1997-10-13 23:42:53 +04:00
|
|
|
int Sync __P((void));
|
1999-02-10 03:45:45 +03:00
|
|
|
int sync_update __P((int, struct ship *, const char *, long, long, long, long));
|