diff options
author | 1997-10-13 19:42:53 +0000 | |
---|---|---|
committer | 1997-10-13 19:42:53 +0000 | |
commit | 7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c (patch) | |
tree | e32f911a4774980914f141c9b101745fb106eefe /sail/extern.h | |
parent | c1a3f2353b38d22d94cbc0101f3115b8e2eefc30 (diff) | |
download | bsdgames-darwin-7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c.tar.gz bsdgames-darwin-7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c.tar.zst bsdgames-darwin-7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c.zip |
Warns fixes:
use varargs properly
use unsigned chars where appropriate
fix typos
eliminate gcc warnings
Diffstat (limited to 'sail/extern.h')
-rw-r--r-- | sail/extern.h | 168 |
1 files changed, 145 insertions, 23 deletions
diff --git a/sail/extern.h b/sail/extern.h index 6774867d..caf7cff3 100644 --- a/sail/extern.h +++ b/sail/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.3 1997/04/19 07:35:33 thorpej Exp $ */ +/* $NetBSD: extern.h,v 1.4 1997/10/13 19:44:01 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -185,10 +185,10 @@ struct File { int index; char captain[20]; /* 0 */ short points; /* 20 */ - char loadL; /* 22 */ - char loadR; /* 24 */ - char readyL; /* 26 */ - char readyR; /* 28 */ + unsigned char loadL; /* 22 */ + unsigned char loadR; /* 24 */ + unsigned char readyL; /* 26 */ + unsigned char readyR; /* 28 */ struct BP OBP[NBP]; /* 30 */ struct BP DBP[NBP]; /* 48 */ char struck; /* 66 */ @@ -206,7 +206,7 @@ struct File { char FS; /* 230 */ char explode; /* 232 */ char sink; /* 234 */ - char dir; + unsigned char dir; short col; short row; char loadwith; @@ -216,7 +216,7 @@ struct File { struct ship { char *shipname; /* 0 */ struct shipspecs *specs; /* 2 */ - char nationality; /* 4 */ + unsigned char nationality; /* 4 */ short shiprow; /* 6 */ short shipcol; /* 8 */ char shipdir; /* 10 */ @@ -227,7 +227,7 @@ struct scenario { char winddir; /* 0 */ char windspeed; /* 2 */ char windchange; /* 4 */ - char vessels; /* 12 */ + unsigned char vessels; /* 12 */ char *name; /* 14 */ struct ship ship[NSHIP]; /* 16 */ }; @@ -239,9 +239,9 @@ struct shipspecs { char fs; char ta; short guns; - char class; + unsigned char class; char hull; - char qual; + unsigned char qual; char crew1; char crew2; char crew3; @@ -298,16 +298,138 @@ int alive; int people; char hasdriver; -char *info(); -char *quality(); -double arctan(); -char *saywhat(); -struct ship *closestenemy(); - -char *calloc(); -char *rindex(); -char *strcpy(); -char *strcat(); -char *strncpy(); -char *getenv(); -char *gets(); +/* 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)); +int strend __P((char *)); +void closeon __P((struct ship *, struct ship *, char[], int, int, int)); +int score __P((char[], struct ship *, struct ship *, int)); +void move __P((char *, struct ship *, unsigned char *, short *, short *, char *)); +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)); +int isolated __P((struct ship *)); +int push __P((struct ship *, struct ship *)); +void step __P((int, struct ship *, char *)); +void sendbp __P((struct ship *, struct ship *, int, int)); +int toughmelee __P((struct ship *, struct ship *, int, int)); +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 */ +void leave __P((int)); +void choke __P((int)); +void child __P((int)); + +/* pl_2.c */ +void play __P((void)); + +/* 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)); +char *saywhat __P((struct ship *, int)); +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)); +void Signal __P((const char *, struct ship *, ...)); +void Msg __P((const char *, ...)); +void Scroll __P((void)); +void prompt __P((char *, struct ship *)); +void endprompt __P((int)); +int sgetch __P((char *, struct ship *, int)); +void sgetstr __P((char *, char *, int)); +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 *)); +void makesignal __P((struct ship *, const char *, struct ship *, ...)); +int sync_exists __P((int)); +int sync_open __P((void)); +void sync_close __P((int)); +void Write __P((int, struct ship *, int, long, long, long, long)); +int Sync __P((void)); +int sync_update __P((int, struct ship *, long, long, long, long)); |