From 1eda81035bbddb81676f5def8c4c91d83ce69618 Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Wed, 5 Oct 1983 19:45:49 -0800 Subject: [PATCH] changed sizes of things and reformated globals.c SCCS-vsn: games/sail/Makefile 1.11 SCCS-vsn: games/sail/dr_2.c 1.3 SCCS-vsn: games/sail/extern.h 1.6 SCCS-vsn: games/sail/globals.c 1.5 SCCS-vsn: games/sail/pl_2.c 1.4 SCCS-vsn: games/sail/pl_4.c 1.2 --- usr/src/games/sail/Makefile | 6 +- usr/src/games/sail/dr_2.c | 11 +- usr/src/games/sail/extern.h | 126 ++++---- usr/src/games/sail/globals.c | 594 +++++++++++++++++------------------ usr/src/games/sail/pl_2.c | 4 +- usr/src/games/sail/pl_4.c | 8 +- 6 files changed, 368 insertions(+), 381 deletions(-) diff --git a/usr/src/games/sail/Makefile b/usr/src/games/sail/Makefile index c41ebeb649..d29d7c252f 100644 --- a/usr/src/games/sail/Makefile +++ b/usr/src/games/sail/Makefile @@ -1,7 +1,7 @@ # # Sail - Wooden Ships And Iron Men # -# Makefile @(#)Makefile 1.10 83/07/20 +# Makefile @(#)Makefile 1.11 83/10/05 # CC= cc CTAGS= ctags -w @@ -11,8 +11,8 @@ DFILES= driver1.c driver2.c driver3.c grap.c boarders.c DOBJS= driver1.o driver2.o driver3.o grap.o boarders.o PFILES= player1.c player2.c player3.c player4.c version.c POBJS= player1.o player2.o player3.o player4.o version.o -COMMONFILES= assorted.c game.c globals.c misc.c parties.c screen.c machdep.c -COMMONOBJS= assorted.o game.o globals.o misc.o parties.o screen.o machdep.o +COMMONFILES= assorted.c game.c globals.c misc.c parties.c screen.c +COMMONOBJS= assorted.o game.o globals.o misc.o parties.o screen.o LFILES= sail.log.c LOBJS= sail.log.o diff --git a/usr/src/games/sail/dr_2.c b/usr/src/games/sail/dr_2.c index 9d1c5181e0..6a57dd1743 100644 --- a/usr/src/games/sail/dr_2.c +++ b/usr/src/games/sail/dr_2.c @@ -1,5 +1,5 @@ #ifndef lint -static char *sccsid = "@(#)dr_2.c 1.2 83/07/20"; +static char *sccsid = "@(#)dr_2.c 1.3 83/10/05"; #endif #include "driver.h" @@ -130,7 +130,8 @@ char movement[]; register struct ship *ship, *to; char onlytemp; { - int drift, row, col, dir, total, ran; + char drift; + int row, col, dir, total, ran; register struct File *fp = ship->file; if ((dir = fp->dir) == 0) @@ -161,7 +162,7 @@ moveship(ship, movement) struct ship *ship; char *movement; { - int drift; + char drift; register struct File *fp = ship->file; if (fp->dir == 0) @@ -183,7 +184,9 @@ char *movement; move(p, ship, dir, row, col, drift) register char *p; register struct ship *ship; -register int *dir, *row, *col, *drift; +register char *dir; +register short *row, *col; +register char *drift; { int dist; char moved = 0; diff --git a/usr/src/games/sail/extern.h b/usr/src/games/sail/extern.h index eabeff17c1..c3ddd3f59b 100644 --- a/usr/src/games/sail/extern.h +++ b/usr/src/games/sail/extern.h @@ -1,5 +1,5 @@ /* - * @(#)extern.h 1.5 83/07/20 + * @(#)extern.h 1.6 83/10/05 */ #include #include @@ -95,13 +95,13 @@ struct logs { }; struct BP { - int turnsent; + short turnsent; struct ship *toship; - int mensent; + short mensent; }; struct snag { - int turnfoul; + short turnfoul; struct ship *toship; }; @@ -118,77 +118,77 @@ struct snag { struct File { char captain[20]; /* 0 */ - int points; /* 20 */ - int loadL; /* 22 */ - int loadR; /* 24 */ - int readyL; /* 26 */ - int readyR; /* 28 */ + short points; /* 20 */ + char loadL; /* 22 */ + char loadR; /* 24 */ + char readyL; /* 26 */ + char readyR; /* 28 */ struct BP OBP[NBP]; /* 30 */ struct BP DBP[NBP]; /* 48 */ - int struck; /* 66 */ + char struck; /* 66 */ struct ship *captured; /* 68 */ - int pcrew; /* 70 */ + short pcrew; /* 70 */ char last[10]; /* 72 */ - int drift; /* 82 */ + char drift; /* 82 */ struct snag fouls[NSHIP]; /* 84 */ struct snag grapples[NSHIP]; /* 124 */ char signal[60]; /* 164 */ - int RH; /* 224 */ - int RG; /* 226 */ - int RR; /* 228 */ - int FS; /* 230 */ - int explode; /* 232 */ - int sink; /* 234 */ - int dir; - int col; - int row; - int loadwith; - int stern; + char RH; /* 224 */ + char RG; /* 226 */ + char RR; /* 228 */ + char FS; /* 230 */ + char explode; /* 232 */ + char sink; /* 234 */ + char dir; + short col; + short row; + char loadwith; + char stern; }; struct ship { char *shipname; /* 0 */ struct shipspecs *specs; /* 2 */ - int nationality; /* 4 */ - int shiprow; /* 6 */ - int shipcol; /* 8 */ - int shipdir; /* 10 */ + char nationality; /* 4 */ + short shiprow; /* 6 */ + short shipcol; /* 8 */ + char shipdir; /* 10 */ struct File *file; /* 12 */ }; struct scenario { - int winddir; /* 0 */ - int windspeed; /* 2 */ - int windchange; /* 4 */ - int turn; /* 6 */ - int people; /* 8 */ - int time; /* 10 */ - int vessels; /* 12 */ + char winddir; /* 0 */ + char windspeed; /* 2 */ + char windchange; /* 4 */ + short turn; /* 6 */ + char people; /* 8 */ + char time; /* 10 */ + char vessels; /* 12 */ char *name; /* 14 */ struct ship ship[NSHIP]; /* 16 */ }; struct scenario scene[NSCENE]; struct shipspecs { - int bs; - int fs; - int ta; - int guns; - int class; - int hull; - int qual; - int crew1; - int crew2; - int crew3; - int gunL; - int gunR; - int carL; - int carR; - int rig1; - int rig2; - int rig3; - int rig4; - int pts; + char bs; + char fs; + char ta; + short guns; + char class; + char hull; + char qual; + char crew1; + char crew2; + char crew3; + char gunL; + char gunR; + char carL; + char carR; + char rig1; + char rig2; + char rig3; + char rig4; + short pts; }; struct shipspecs specs[]; @@ -199,25 +199,21 @@ struct ship *ls; /* &cc->ship[cc->vessels] */ #define foreachship(sp) for ((sp) = cc->ship; (sp) < ls; (sp)++) struct windeffects { - int A, B, C, D; + char A, B, C, D; }; struct windeffects WET[7][6]; struct Tables { - int H, G, C, R; + char H, G, C, R; }; struct Tables RigTable[11][6]; struct Tables HullTable[11][6]; -int AMMO[9][4]; - -int HDT[9][10]; - -int HDTrake[9][10]; - -int QUAL[9][5]; - -int MT[9][3]; +char AMMO[9][4]; +char HDT[9][10]; +char HDTrake[9][10]; +char QUAL[9][5]; +char MT[9][3]; char *countryname[]; char *classname[]; @@ -225,7 +221,7 @@ char *directionname[]; char *qualname[]; char loadname[]; -int rangeofshot[]; +char rangeofshot[]; char dr[], dc[]; diff --git a/usr/src/games/sail/globals.c b/usr/src/games/sail/globals.c index edb355ac00..0205da1594 100644 --- a/usr/src/games/sail/globals.c +++ b/usr/src/games/sail/globals.c @@ -1,6 +1,8 @@ +/*LINTLIBRARY*/ #ifndef lint -static char *sccsid = "@(#)globals.c 1.4 83/07/20"; +static char *sccsid = "@(#)globals.c 1.5 83/10/05"; #endif + #include "externs.h" struct scenario scene[] = { @@ -17,315 +19,315 @@ struct scenario scene[] = { */ 5, 3, 5, 0, 1, 0, 2, "Ranger vs. Drake", { - { "Ranger", specs+0, 0, 7, 20, 4, 0 }, - { "Drake", specs+1, 1, 7, 31, 5, 0 } + { "Ranger", specs+0, N_A, 7, 20, 4, 0 }, + { "Drake", specs+1, N_B, 7, 31, 5, 0 } }, 1, 3, 6, 0, 1, 0, 2, "The Battle of Flamborough Head", { - { "Bonhomme Rich", specs+2, 0, 13, 40, 2, 0 }, - { "Serapis", specs+3, 1, 2, 42, 2, 0 } + { "Bonhomme Rich", specs+2, N_A, 13, 40, 2, 0 }, + { "Serapis", specs+3, N_B, 2, 42, 2, 0 } }, 5, 5, 5, 0, 1, 0, 10, "Arbuthnot and Des Touches", { - { "America", specs+4, 1, 7, 37, 4, 0 }, - { "Befford", specs+5, 1, 5, 35, 4, 0 }, - { "Adamant", specs+6, 1, 3, 33, 4, 0 }, - { "London", specs+7, 1, 1, 31, 4, 0 }, - { "Royal Oak", specs+8, 1, -1, 29, 4, 0 }, - { "Neptune", specs+9, 3, 6, 44, 4, 0 }, - { "Duc Bougogne", specs+10, 3, 8, 46, 4, 0 }, - { "Conquerant", specs+48, 3, 10, 48, 4, 0 }, - { "Provence", specs+11, 3, 12, 50, 4, 0 }, - { "Romulus", specs+12, 3, 20, 58, 4, 0 } + { "America", specs+4, N_B, 7, 37, 4, 0 }, + { "Befford", specs+5, N_B, 5, 35, 4, 0 }, + { "Adamant", specs+6, N_B, 3, 33, 4, 0 }, + { "London", specs+7, N_B, 1, 31, 4, 0 }, + { "Royal Oak", specs+8, N_B, -1, 29, 4, 0 }, + { "Neptune", specs+9, N_F, 6, 44, 4, 0 }, + { "Duc Bougogne", specs+10, N_F, 8, 46, 4, 0 }, + { "Conquerant", specs+48, N_F, 10, 48, 4, 0 }, + { "Provence", specs+11, N_F, 12, 50, 4, 0 }, + { "Romulus", specs+12, N_F, 20, 58, 4, 0 } }, 1, 3, 5, 0, 1, 0, 10, "Suffren and Hughes", { - { "Monmouth", specs+52, 1, 9, 45, 2, 0 }, - { "Hero", specs+5, 1, 13, 49, 2, 0 }, - { "Isis", specs+6, 1, 12, 48, 2, 0 }, - { "Superb", specs+50, 1, 10, 46, 2, 0 }, - { "Burford", specs+48, 1, 11, 47, 2, 0 }, - { "Flamband", specs+13, 3, 7, 59, 4, 0 }, - { "Annibal", specs+9, 3, 4, 56, 4, 0 }, - { "Severe", specs+11, 3, 2, 54, 4, 0 }, - { "Brilliant", specs+49, 3, -1, 51, 4, 0 }, - { "Sphinx", specs+51, 3, -5, 47, 4, 0 } + { "Monmouth", specs+52, N_B, 9, 45, 2, 0 }, + { "Hero", specs+5, N_B, 13, 49, 2, 0 }, + { "Isis", specs+6, N_B, 12, 48, 2, 0 }, + { "Superb", specs+50, N_B, 10, 46, 2, 0 }, + { "Burford", specs+48, N_B, 11, 47, 2, 0 }, + { "Flamband", specs+13, N_F, 7, 59, 4, 0 }, + { "Annibal", specs+9, N_F, 4, 56, 4, 0 }, + { "Severe", specs+11, N_F, 2, 54, 4, 0 }, + { "Brilliant", specs+49, N_F, -1, 51, 4, 0 }, + { "Sphinx", specs+51, N_F, -5, 47, 4, 0 } }, 1, 3, 4, 0, 1, 0, 2, "Nymphe vs. Cleopatre", { - { "Nymphe", specs+14, 1, 13, 30, 2, 0 }, - { "Cleopatre", specs+15, 3, 3, 41, 2, 0 } + { "Nymphe", specs+14, N_B, 13, 30, 2, 0 }, + { "Cleopatre", specs+15, N_F, 3, 41, 2, 0 } }, 1, 3, 5, 0, 1, 0, 2, "Mars vs. Hercule", { - { "Mars", specs+16, 1, 13, 30, 2, 0 }, - { "Hercule", specs+17, 3, 3, 41, 2, 0 } + { "Mars", specs+16, N_B, 13, 30, 2, 0 }, + { "Hercule", specs+17, N_F, 3, 41, 2, 0 } }, 5, 3, 5, 0, 1, 0, 2, "Ambuscade vs. Baionnaise", { - { "Ambuscade", specs+18, 1, 13, 30, 2, 0 }, - { "Baionnaise", specs+19, 3, 3, 41, 2, 0 } + { "Ambuscade", specs+18, N_B, 13, 30, 2, 0 }, + { "Baionnaise", specs+19, N_F, 3, 41, 2, 0 } }, 1, 5, 6, 0, 1, 0, 2, "Constellation vs. Insurgent", { - { "Constellation", specs+20, 0, 9, 50, 8, 0 }, - { "Insurgent", specs+22, 3, 4, 24, 2, 0 } + { "Constellation", specs+20, N_A, 9, 50, 8, 0 }, + { "Insurgent", specs+22, N_F, 4, 24, 2, 0 } }, 1, 3, 5, 0, 1, 0, 2, "Constellation vs. Vengeance", { - { "Constellation", specs+20, 0, 12, 40, 2, 0 }, - { "Vengeance", specs+21, 3, 1, 43, 2, 0 } + { "Constellation", specs+20, N_A, 12, 40, 2, 0 }, + { "Vengeance", specs+21, N_F, 1, 43, 2, 0 } }, 1, 3, 6, 0, 1, 0, 10, "The Battle of Lissa", { - { "Amphion", specs+23, 1, 8, 50, 4, 0 }, - { "Active", specs+24, 1, 6, 48, 4, 0 }, - { "Volage", specs+25, 1, 4, 46, 4, 0 }, - { "Cerberus", specs+26, 1, 2, 44, 4, 0 }, - { "Favorite", specs+27, 3, 9, 34, 2, 0 }, - { "Flore", specs+21, 3, 13, 39, 2, 0 }, - { "Danae", specs+64, 3, 15, 37, 2, 0 }, - { "Bellona", specs+28, 3, 17, 35, 2, 0 }, - { "Corona", specs+29, 3, 12, 31, 2, 0 }, - { "Carolina", specs+30, 3, 15, 28, 2, 0 } + { "Amphion", specs+23, N_B, 8, 50, 4, 0 }, + { "Active", specs+24, N_B, 6, 48, 4, 0 }, + { "Volage", specs+25, N_B, 4, 46, 4, 0 }, + { "Cerberus", specs+26, N_B, 2, 44, 4, 0 }, + { "Favorite", specs+27, N_F, 9, 34, 2, 0 }, + { "Flore", specs+21, N_F, 13, 39, 2, 0 }, + { "Danae", specs+64, N_F, 15, 37, 2, 0 }, + { "Bellona", specs+28, N_F, 17, 35, 2, 0 }, + { "Corona", specs+29, N_F, 12, 31, 2, 0 }, + { "Carolina", specs+30, N_F, 15, 28, 2, 0 } }, 2, 5, 6, 0, 1, 0, 2, "Constitution vs. Guerriere", { - { "Constitution", specs+31, 0, 7, 35, 1, 0 }, - { "Guerriere", specs+32, 1, 7, 47, 4, 0 } + { "Constitution", specs+31, N_A, 7, 35, 1, 0 }, + { "Guerriere", specs+32, N_B, 7, 47, 4, 0 } }, 1, 3, 5, 0, 1, 0, 2, "United States vs. Macedonian", { - { "United States", specs+33, 0, 1, 52, 6, 0 }, - { "Macedonian", specs+34, 1, 14, 40, 1, 0 } + { "United States", specs+33, N_A, 1, 52, 6, 0 }, + { "Macedonian", specs+34, N_B, 14, 40, 1, 0 } }, 1, 3, 6, 0, 1, 0, 2, "Constitution vs. Java", { - { "Constitution", specs+31, 0, 1, 40, 2, 0 }, - { "Java", specs+35, 1, 11, 40, 2, 0 } + { "Constitution", specs+31, N_A, 1, 40, 2, 0 }, + { "Java", specs+35, N_B, 11, 40, 2, 0 } }, 1, 3, 5, 0, 1, 0, 2, "Chesapeake vs. Shannon", { - { "Chesapeake", specs+36, 0, 13, 40, 2, 0 }, - { "Shannon", specs+37, 1, 1, 42, 2, 0 } + { "Chesapeake", specs+36, N_A, 13, 40, 2, 0 }, + { "Shannon", specs+37, N_B, 1, 42, 2, 0 } }, 1, 1, 6, 0, 1, 0, 5, "The Battle of Lake Erie", { - { "Lawrence", specs+38, 0, 4, 55, 8, 0 }, - { "Niagara", specs+42, 0, 7, 61, 8, 0 }, - { "Lady Prevost", specs+39, 1, 4, 25, 2, 0 }, - { "Detroit", specs+40, 1, 7, 22, 2, 0 }, - { "Q. Charlotte", specs+41, 1, 10, 19, 2, 0 } + { "Lawrence", specs+38, N_A, 4, 55, 8, 0 }, + { "Niagara", specs+42, N_A, 7, 61, 8, 0 }, + { "Lady Prevost", specs+39, N_B, 4, 25, 2, 0 }, + { "Detroit", specs+40, N_B, 7, 22, 2, 0 }, + { "Q. Charlotte", specs+41, N_B, 10, 19, 2, 0 } }, 1, 1, 5, 0, 1, 0, 2, "Wasp vs. Reindeer", { - { "Wasp", specs+42, 0, 3, 41, 2, 0 }, - { "Reindeer", specs+43, 1, 10, 48, 2, 0 } + { "Wasp", specs+42, N_A, 3, 41, 2, 0 }, + { "Reindeer", specs+43, N_B, 10, 48, 2, 0 } }, 1, 2, 5, 0, 1, 0, 3, "Constitution vs. Cyane and Levant", { - { "Constitution", specs+31, 0, 10, 45, 2, 0 }, - { "Cyane", specs+44, 1, 3, 37, 2, 0 }, - { "Levant", specs+45, 1, 5, 35, 2, 0 } + { "Constitution", specs+31, N_A, 10, 45, 2, 0 }, + { "Cyane", specs+44, N_B, 3, 37, 2, 0 }, + { "Levant", specs+45, N_B, 5, 35, 2, 0 } }, 5, 5, 5, 0, 1, 0, 3, "Pellew vs. Droits de L'Homme", { - { "Indefatigable", specs+46, 1, 12, 45, 6, 0 }, - { "Amazon", specs+47, 1, 9, 48, 6, 0 }, - { "Droits L'Hom", specs+48, 3, 3, 28, 5, 0 } + { "Indefatigable", specs+46, N_B, 12, 45, 6, 0 }, + { "Amazon", specs+47, N_B, 9, 48, 6, 0 }, + { "Droits L'Hom", specs+48, N_F, 3, 28, 5, 0 } }, 2, 2, 3, 0, 1, 0, 10, "Algeciras", { - { "Caesar", specs+49, 1, 7, 70, 6, 0 }, - { "Pompee", specs+50, 1, 5, 72, 6, 0 }, - { "Spencer", specs+5, 1, 3, 74, 6, 0 }, - { "Hannibal", specs+7, 1, 1, 76, 6, 0 }, - { "Real-Carlos", specs+53, 2, 9, 20, 3, 0 }, - { "San Fernando", specs+54, 2, 11, 16, 3, 0 }, - { "Argonauta", specs+55, 2, 10, 14, 4, 0 }, - { "San Augustine", specs+56, 2, 6, 22, 4, 0 }, - { "Indomptable", specs+51, 3, 7, 23, 5, 0 }, - { "Desaix", specs+52, 3, 7, 27, 7, 0 } + { "Caesar", specs+49, N_B, 7, 70, 6, 0 }, + { "Pompee", specs+50, N_B, 5, 72, 6, 0 }, + { "Spencer", specs+5, N_B, 3, 74, 6, 0 }, + { "Hannibal", specs+7, N_B, 1, 76, 6, 0 }, + { "Real-Carlos", specs+53, N_S, 9, 20, 3, 0 }, + { "San Fernando", specs+54, N_S, 11, 16, 3, 0 }, + { "Argonauta", specs+55, N_S, 10, 14, 4, 0 }, + { "San Augustine", specs+56, N_S, 6, 22, 4, 0 }, + { "Indomptable", specs+51, N_F, 7, 23, 5, 0 }, + { "Desaix", specs+52, N_F, 7, 27, 7, 0 } }, 5, 3, 6, 0, 1, 0, 7, "Lake Champlain", { - { "Saratoga", specs+60, 0, 8, 10, 1, 0 }, - { "Eagle", specs+61, 0, 9, 13, 2, 0 }, - { "Ticonderoga", specs+62, 0, 12, 17, 3, 0 }, - { "Preble", specs+63, 0, 14, 20, 2, 0 }, - { "Confiance", specs+57, 1, 4, 70, 6, 0 }, - { "Linnet", specs+58, 1, 7, 68, 6, 0 }, - { "Chubb", specs+59, 1, 10, 65, 6, 0 } + { "Saratoga", specs+60, N_A, 8, 10, 1, 0 }, + { "Eagle", specs+61, N_A, 9, 13, 2, 0 }, + { "Ticonderoga", specs+62, N_A, 12, 17, 3, 0 }, + { "Preble", specs+63, N_A, 14, 20, 2, 0 }, + { "Confiance", specs+57, N_B, 4, 70, 6, 0 }, + { "Linnet", specs+58, N_B, 7, 68, 6, 0 }, + { "Chubb", specs+59, N_B, 10, 65, 6, 0 } }, 5, 3, 6, 0, 1, 0, 4, "Last Voyage of the USS President", { - { "President", specs+67, 0, 12, 42, 5, 0 }, - { "Endymion", specs+64, 1, 5, 42, 5, 0 }, - { "Pomone", specs+65, 1, 7, 82, 6, 0 }, - { "Tenedos", specs+66, 1, 7, -1, 4, 0 } + { "President", specs+67, N_A, 12, 42, 5, 0 }, + { "Endymion", specs+64, N_B, 5, 42, 5, 0 }, + { "Pomone", specs+65, N_B, 7, 82, 6, 0 }, + { "Tenedos", specs+66, N_B, 7, -1, 4, 0 } }, 7, 5, 5, 0, 1, 0, 2, "Hornblower and the Natividad", { - { "Lydia", specs+68, 1, 12, 40, 2, 0 }, - { "Natividad", specs+69, 2, 2, 40, 4, 0 } + { "Lydia", specs+68, N_B, 12, 40, 2, 0 }, + { "Natividad", specs+69, N_S, 2, 40, 4, 0 } }, 1, 3, 6, 0, 1, 0, 2, "Curse of the Flying Dutchman", { - { "Piece of Cake", specs+19, 2, 7, 40, 2, 0 }, - { "Flying Dutchy", specs+71, 3, 7, 41, 1, 0 } + { "Piece of Cake", specs+19, N_S, 7, 40, 2, 0 }, + { "Flying Dutchy", specs+71, N_F, 7, 41, 1, 0 } }, 1, 4, 1, 0, 1, 0, 4, "The South Pacific", { - { "USS Scurvy", specs+70, 0, 7, 40, 1, 0 }, - { "HMS Tahiti", specs+71, 1, 12, 60, 1, 0 }, - { "Australian", specs+18, 2, 5, 20, 8, 0 }, - { "Bikini Atoll", specs+63, 3, 2, 60, 4, 0 } + { "USS Scurvy", specs+70, N_A, 7, 40, 1, 0 }, + { "HMS Tahiti", specs+71, N_B, 12, 60, 1, 0 }, + { "Australian", specs+18, N_S, 5, 20, 8, 0 }, + { "Bikini Atoll", specs+63, N_F, 2, 60, 4, 0 } }, 7, 3, 6, 0, 1, 0, 5, "Hornblower and the battle of Rosas bay", { - { "Sutherland", specs+5, 1, 13, 30, 2, 0 }, - { "Turenne", specs+10, 3, 9, 35, 6, 0 }, - { "Nightmare", specs+9, 3, 7, 37, 6, 0 }, - { "Paris", specs+53, 3, 3, 45, 4, 0 }, - { "Napolean", specs+56, 3, 1, 40, 6, 0 } + { "Sutherland", specs+5, N_B, 13, 30, 2, 0 }, + { "Turenne", specs+10, N_F, 9, 35, 6, 0 }, + { "Nightmare", specs+9, N_F, 7, 37, 6, 0 }, + { "Paris", specs+53, N_F, 3, 45, 4, 0 }, + { "Napolean", specs+56, N_F, 1, 40, 6, 0 } }, 6, 4, 7, 0, 1, 0, 5, "Cape Horn", { - { "Concord", specs+51, 0, 3, 20, 4, 0 }, - { "Berkeley", specs+7, 0, 5, 50, 5, 0 }, - { "Thames", specs+71, 1, 10, 40, 1, 0 }, - { "Madrid", specs+53, 2, 13, 60, 8, 0 }, - { "Musket", specs+10, 3, 10, 60, 7, 0 } + { "Concord", specs+51, N_A, 3, 20, 4, 0 }, + { "Berkeley", specs+7, N_A, 5, 50, 5, 0 }, + { "Thames", specs+71, N_B, 10, 40, 1, 0 }, + { "Madrid", specs+53, N_S, 13, 60, 8, 0 }, + { "Musket", specs+10, N_F, 10, 60, 7, 0 } }, 8, 3, 7, 0, 1, 0, 3, "New Orleans", { - { "Alligator", specs+71, 0, 13, 5, 1, 0 }, - { "Firefly", specs+50, 1, 10, 20, 8, 0 }, - { "Cypress", specs+46, 1, 5, 10, 6, 0 } + { "Alligator", specs+71, N_A, 13, 5, 1, 0 }, + { "Firefly", specs+50, N_B, 10, 20, 8, 0 }, + { "Cypress", specs+46, N_B, 5, 10, 6, 0 } }, 5, 3, 7, 0, 1, 0, 3, "Botany Bay", { - { "Shark", specs+11, 1, 6, 15, 4, 0 }, - { "Coral Snake", specs+31, 3, 3, 30, 6, 0 }, - { "Sea Lion", specs+33, 3, 13, 50, 8, 0 } + { "Shark", specs+11, N_B, 6, 15, 4, 0 }, + { "Coral Snake", specs+31, N_F, 3, 30, 6, 0 }, + { "Sea Lion", specs+33, N_F, 13, 50, 8, 0 } }, 4, 3, 6, 0, 1, 0, 4, "Voyage to the Bottom of the Sea", { - { "Seaview", specs+71, 0, 6, 3, 3, 0 }, - { "Flying Sub", specs+64, 0, 8, 3, 3, 0 }, - { "Mermaid", specs+70, 1, 2, 5, 5, 0 }, - { "Giant Squid", specs+53, 2, 10, 30, 8, 0 } + { "Seaview", specs+71, N_A, 6, 3, 3, 0 }, + { "Flying Sub", specs+64, N_A, 8, 3, 3, 0 }, + { "Mermaid", specs+70, N_B, 2, 5, 5, 0 }, + { "Giant Squid", specs+53, N_S, 10, 30, 8, 0 } }, 7, 3, 6, 0, 1, 0, 3, "Frigate Action", { - { "Killdeer", specs+21, 0, 7, 20, 8, 0 }, - { "Sandpiper", specs+27, 1, 5, 40, 8, 0 }, - { "Curlew", specs+34, 2, 10, 60, 8, 0 } + { "Killdeer", specs+21, N_A, 7, 20, 8, 0 }, + { "Sandpiper", specs+27, N_B, 5, 40, 8, 0 }, + { "Curlew", specs+34, N_S, 10, 60, 8, 0 } }, 7, 2, 5, 0, 1, 0, 6, "The Battle of Midway", { { "Enterprise", specs+49, N_A, 10, 70, 8, 0 }, - { "Yorktown", specs+51, N_A, 3, 70, 7, 0 }, - { "Hornet", specs+52, N_A, 6, 70, 7, 0 }, - { "Akagi", specs+53, N_J, 6, 10, 4, 0 }, - { "Kaga", specs+54, N_J, 4, 12, 4, 0 }, - { "Soryu", specs+55, N_J, 2, 14, 4, 0 } + { "Yorktown", specs+51, N_A, 3, 70, 7, 0 }, + { "Hornet", specs+52, N_A, 6, 70, 7, 0 }, + { "Akagi", specs+53, N_J, 6, 10, 4, 0 }, + { "Kaga", specs+54, N_J, 4, 12, 4, 0 }, + { "Soryu", specs+55, N_J, 2, 14, 4, 0 } }, /* 4, 3, 4, 0, 1, 0, 8, "Star Trek", { - { "Enterprise", specs+72, 0, 20, 4, 2, 0 }, - { "Yorktown", specs+72, 0, 19, 2, 2, 0 }, - { "Reliant", specs+73, 0, 18, 3, 2, 0 }, - { "Galileo", specs+74, 0, 20, 6, 2, 0 }, - { "Kobayashi Maru", specs+75, 3, 31, 11, 5, 0 }, - { "Klingon two", specs+75, 3, 31, 11, 5, 0 }, - { "Klingon three", specs+75, 3, 31, 11, 5, 0 }, - { "Blue Orion", specs+63, 2, 31, 11, 5, 0 } + { "Enterprise", specs+72, N_A, 20, 4, 2, 0 }, + { "Yorktown", specs+72, N_A, 19, 2, 2, 0 }, + { "Reliant", specs+73, N_A, 18, 3, 2, 0 }, + { "Galileo", specs+74, N_A, 20, 6, 2, 0 }, + { "Kobayashi Maru", specs+75, N_F, 31, 11, 5, 0 }, + { "Klingon two", specs+75, N_F, 31, 11, 5, 0 }, + { "Klingon three", specs+75, N_F, 31, 11, 5, 0 }, + { "Blue Orion", specs+63, N_S, 31, 11, 5, 0 } } */ }; /* happy */ struct shipspecs specs[] = { - 4, 7, 3, 19, 5, 5, 4, 2, 2, 2, 2, 2, 0, 0, 4, 4, 4, 4, 7, - 4, 7, 3, 17, 5, 5, 4, 2, 2, 2, 0, 0, 4, 4, 3, 3, 3, 3, 6, - 3, 5, 2, 42, 4, 7, 4, 2, 2, 2, 2, 2, 0, 0, 5, 5, 5, -1, 11, - 4, 6, 3, 44, 3, 7, 4, 2, 2, 2, 3, 3, 0, 0, 5, 5, 5, 5, 12, - 3, 5, 2, 64, 2, 17, 4, 8, 6, 6, 12, 12, 2, 2, 7, 7, 7, -1, 20, - 3, 5, 2, 74, 2, 20, 4, 8, 8, 8, 16, 16, 2, 2, 7, 7, 7, -1, 26, - 3, 5, 2, 50, 2, 12, 4, 6, 4, 4, 8, 8, 2, 2, 6, 6, 6, -1, 17, - 3, 5, 1, 98, 1, 23, 4, 10, 10, 10, 18, 18, 2, 2, 8, 8, 8, -1, 28, - 3, 5, 2, 74, 2, 20, 4, 8, 8, 8, 16, 16, 2, 2, 7, 7, 7, -1, 26, - 3, 5, 2, 74, 2, 21, 3, 10, 10, 8, 20, 20, 0, 0, 7, 7, 7, -1, 24, - 3, 5, 1, 80, 1, 23, 3, 12, 12, 10, 22, 22, 0, 0, 7, 7, 7, -1, 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, 5, 4, 4, 4, 4, 4, 2, 2, 5, 5, 5, 5, 14, - 4, 6, 3, 36, 3, 12, 4, 4, 4, 4, 6, 6, 2, 2, 5, 5, 5, 5, 14, - 3, 5, 2, 74, 2, 21, 3, 10, 8, 8, 20, 20, 2, 2, 4, 4, 7, -1, 24, - 3, 5, 2, 80, 2, 24, 4, 10, 8, 8, 20, 20, 2, 2, 8, 8, 8, -1, 31, - 3, 5, 2, 74, 2, 21, 4, 8, 8, 6, 16, 16, 4, 4, 7, 7, 7, -1, 27, - 3, 5, 2, 80, 2, 24, 3, 12, 12, 10, 22, 22, 2, 2, 7, 7, 7, -1, 27, - 3, 5, 2, 74, 2, 21, 3, 10, 10, 8, 20, 20, 2, 2, 7, 7, 7, -1, 24, - 3, 5, 1, 112, 1, 27, 2, 12, 12, 12, 24, 24, 0, 0, 9, 9, 9, -1, 27, - 3, 5, 1, 96, 1, 24, 2, 12, 12, 10, 20, 20, 0, 0, 8, 8, 8, -1, 24, - 3, 5, 2, 80, 2, 23, 2, 10, 10, 8, 20, 20, 0, 0, 7, 7, 7, -1, 23, - 3, 5, 2, 74, 2, 21, 2, 10, 8, 8, 16, 16, 4, 4, 7, 7, 7, -1, 20, - 4, 6, 3, 37, 3, 12, 4, 4, 4, 2, 6, 6, 4, 4, 5, 5, 5, 5, 14, - 4, 7, 3, 16, 5, 5, 5, 2, 2, 2, 0, 0, 4, 4, 4, 4, 4, 4, 10, - 4, 7, 3, 11, 6, 3, 4, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 5, - 4, 7, 3, 26, 5, 6, 4, 4, 2, 2, 2, 2, 6, 6, 4, 4, 4, 4, 12, - 4, 7, 3, 20, 5, 6, 4, 4, 2, 2, 0, 0, 6, 6, 4, 4, 4, 4, 11, - 4, 7, 3, 17, 5, 5, 4, 2, 2, 2, 0, 0, 6, 6, 4, 4, 4, 4, 9, - 4, 7, 3, 7, 6, 3, 4, 0, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 4, - 4, 6, 3, 40, 3, 15, 4, 4, 4, 4, 8, 8, 6, 6, 5, 5, 5, 5, 17, - 4, 6, 3, 44, 3, 15, 4, 8, 8, 6, 10, 10, 2, 2, 6, 6, 6, 6, 20, - 4, 6, 3, 38, 3, 14, 4, 4, 4, 4, 6, 6, 6, 6, 5, 5, 5, 5, 15, - 4, 5, 3, 44, 3, 18, 5, 8, 6, 6, 8, 8, 8, 8, 6, 6, 6, 6, 24, - 4, 6, 3, 36, 3, 9, 5, 4, 4, 2, 4, 4, 2, 2, 5, 5, 5, 5, 13, - 3, 5, 2, 50, 2, 14, 2, 6, 6, 6, 8, 8, 0, 0, 6, 6, 6, -1, 14, - 3, 5, 1, 136, 1, 30, 1, 8, 14, 14, 28, 28, 0, 0, 9, 9, 9, -1, 27, - 3, 5, 1, 120, 1, 27, 5, 16, 14, 14, 28, 28, 2, 2, 9, 9, 9, -1, 43, -/*72*/ 3, 5, 1, 120, 2, 21, 5, 15, 17, 15, 25, 25, 7, 7, 9, 9, 9, -1, 36, -/*73*/ 3, 5, 1, 90, 3, 18, 4, 13, 15, 13, 20, 20, 6, 6, 5, 5, 5, 5, 28, -/*74*/ 4, 7, 3, 6, 6, 3, 4, 2, 2, 2, 20, 20, 6, 6, 2, 2, 3, 3, 5, -/*75*/ 3, 5, 1, 110, 2, 20, 4, 14, 15, 11, 26, 26, 8, 8, 7, 8, 9, -1, 34, - -/*int bs, fs, ta, guns, class, hull, qual, crew1, crew2, crew3, gunL, gunR, carL, carR, rig1, rig2, rig3, rig4, pts*/ +/* bs fs ta guns hull crew1 crew3 gunR carR rig2 rig4 pts */ +/* class qual crew2 gunL carL rig1 rig3 */ +/*00*/ 4, 7, 3, 19, 5, 5, 4, 2, 2, 2, 2, 2, 0, 0, 4, 4, 4, 4, 7, +/*01*/ 4, 7, 3, 17, 5, 5, 4, 2, 2, 2, 0, 0, 4, 4, 3, 3, 3, 3, 6, +/*02*/ 3, 5, 2, 42, 4, 7, 4, 2, 2, 2, 2, 2, 0, 0, 5, 5, 5, -1, 11, +/*03*/ 4, 6, 3, 44, 3, 7, 4, 2, 2, 2, 3, 3, 0, 0, 5, 5, 5, 5, 12, +/*04*/ 3, 5, 2, 64, 2, 17, 4, 8, 6, 6, 12, 12, 2, 2, 7, 7, 7, -1, 20, +/*05*/ 3, 5, 2, 74, 2, 20, 4, 8, 8, 8, 16, 16, 2, 2, 7, 7, 7, -1, 26, +/*06*/ 3, 5, 2, 50, 2, 12, 4, 6, 4, 4, 8, 8, 2, 2, 6, 6, 6, -1, 17, +/*07*/ 3, 5, 1, 98, 1, 23, 4, 10, 10, 10, 18, 18, 2, 2, 8, 8, 8, -1, 28, +/*08*/ 3, 5, 2, 74, 2, 20, 4, 8, 8, 8, 16, 16, 2, 2, 7, 7, 7, -1, 26, +/*09*/ 3, 5, 2, 74, 2, 21, 3, 10, 10, 8, 20, 20, 0, 0, 7, 7, 7, -1, 24, +/*10*/ 3, 5, 1, 80, 1, 23, 3, 12, 12, 10, 22, 22, 0, 0, 7, 7, 7, -1, 27, +/*11*/ 3, 5, 2, 64, 2, 18, 3, 8, 8, 6, 12, 12, 0, 0, 7, 7, 7, -1, 18, +/*12*/ 3, 5, 2, 44, 2, 11, 3, 4, 4, 4, 6, 6, 2, 2, 5, 5, 5, -1, 10, +/*13*/ 3, 5, 2, 50, 2, 14, 3, 6, 6, 4, 8, 8, 0, 0, 6, 6, 6, -1, 14, +/*14*/ 4, 6, 3, 36, 3, 11, 4, 4, 4, 2, 4, 4, 2, 2, 5, 5, 5, 5, 11, +/*15*/ 4, 6, 3, 36, 3, 11, 3, 4, 4, 4, 4, 4, 2, 2, 5, 5, 5, 5, 10, +/*16*/ 3, 5, 2, 74, 2, 21, 4, 10, 8, 8, 18, 18, 2, 2, 7, 7, 7, -1, 26, +/*17*/ 3, 5, 2, 74, 2, 21, 3, 10, 10, 8, 20, 20, 2, 2, 7, 7, 7, -1, 23, +/*18*/ 4, 6, 3, 32, 3, 8, 3, 4, 2, 2, 4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6, 6, 6, 5, 5, 5, 5, 15, +/*67*/ 4, 5, 3, 44, 3, 18, 5, 8, 6, 6, 8, 8, 8, 8, 6, 6, 6, 6, 24, +/*68*/ 4, 6, 3, 36, 3, 9, 5, 4, 4, 2, 4, 4, 2, 2, 5, 5, 5, 5, 13, +/*69*/ 3, 5, 2, 50, 2, 14, 2, 6, 6, 6, 8, 8, 0, 0, 6, 6, 6, -1, 14, +/*70*/ 3, 5, 1, 136, 1, 30, 1, 8, 14, 14, 28, 28, 0, 0, 9, 9, 9, -1, 27, +/*71*/ 3, 5, 1, 120, 1, 27, 5, 16, 14, 14, 28, 28, 2, 2, 9, 9, 9, -1, 43, +/*72*/ 3, 5, 1, 120, 2, 21, 5, 15, 17, 15, 25, 25, 7, 7, 9, 9, 9, -1, 36, +/*73*/ 3, 5, 1, 90, 3, 18, 4, 13, 15, 13, 20, 20, 6, 6, 5, 5, 5, 5, 28, +/*74*/ 4, 7, 3, 6, 6, 3, 4, 2, 2, 2, 20, 20, 6, 6, 2, 2, 3, 3, 5, +/*75*/ 3, 5, 1, 110, 2, 20, 4, 14, 15, 11, 26, 26, 8, 8, 7, 8, 9, -1, 34, }; struct windeffects WET[7][6] = { @@ -337,94 +339,95 @@ struct windeffects WET[7][6] = { { {1,0,0,0}, {1,1,0,0}, {1,1,1,0}, {1,1,1,0}, {3,2,2,0}, {3,2,2,0} }, { {2,1,1,0}, {3,2,1,0}, {3,2,1,0}, {3,2,1,0}, {3,3,2,0}, {3,3,2,0} } }; + struct Tables RigTable[11][6] = { - 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,1,0 , - 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,1,0, 1,0,0,1, 0,1,1,1 , - 0,0,0,0, 0,0,0,1, 0,0,1,1, 0,1,0,1, 0,1,0,1, 1,0,1,2 , - 0,0,0,0, 0,0,1,1, 0,1,0,1, 0,0,0,2, 0,1,0,2, 1,0,1,2 , - 0,1,0,1, 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,1,0}, {2,2,0,0}, {3,1,0,1}, {3,1,1,0} }, + { {1,2,2,0}, {2,0,2,1}, {2,1,0,1}, {2,2,0,0}, {3,1,1,0}, {4,2,1,0} }, + { {2,1,1,0}, {2,0,1,1}, {3,2,2,0}, {3,2,0,0}, {4,2,1,0}, {4,2,1,1} }, + { {2,1,2,0}, {3,1,1,1}, {3,2,2,0}, {4,2,1,0}, {4,1,0,2}, {4,2,2,0} }, + { {2,3,1,0}, {3,2,2,0}, {3,2,2,1}, {4,2,2,0}, {4,1,0,3}, {5,1,2,0} }, + { {2,2,4,0}, {3,3,1,1}, {4,2,1,1}, {5,1,0,2}, {5,1,2,1}, {6,2,2,0} }, }; -int AMMO[9][4] = { - {-1,1,0,1}, - {-1,1,0,1}, - {-1,1,0,1}, - {-1,1,0,2}, - {-1,2,0,2}, - {-2,2,0,2}, - {-2,2,0,2}, - {-2,2,0,3}, - {-2,2,0,3} +char AMMO[9][4] = { + { -1, 1, 0, 1 }, + { -1, 1, 0, 1 }, + { -1, 1, 0, 1 }, + { -1, 1, 0, 2 }, + { -1, 2, 0, 2 }, + { -2, 2, 0, 2 }, + { -2, 2, 0, 2 }, + { -2, 2, 0, 3 }, + { -2, 2, 0, 3 } }; -int HDT[9][10] = { - {1,0,-1,-2,-3,-3,-4,-4,-4,-4}, - {1,1,0,-1,-2,-2,-3,-3,-3,-3}, - {2,1,0,-1,-2,-2,-3,-3,-3,-3}, - {2,2,1,0,-1,-1,-2,-2,-2,-2}, - {3,2,1,0,-1,-1,-2,-2,-2,-2}, - {3,3,2,1,0,0,-1,-1,-1,-1}, - {4,3,2,1,0,0,-1,-1,-1,-1}, - {4,4,3,2,1,1,0,0,0,0}, - {5,4,3,2,1,1,0,0,0,0} +char HDT[9][10] = { + { 1, 0,-1,-2,-3,-3,-4,-4,-4,-4 }, + { 1, 1, 0,-1,-2,-2,-3,-3,-3,-3 }, + { 2, 1, 0,-1,-2,-2,-3,-3,-3,-3 }, + { 2, 2, 1, 0,-1,-1,-2,-2,-2,-2 }, + { 3, 2, 1, 0,-1,-1,-2,-2,-2,-2 }, + { 3, 3, 2, 1, 0, 0,-1,-1,-1,-1 }, + { 4, 3, 2, 1, 0, 0,-1,-1,-1,-1 }, + { 4, 4, 3, 2, 1, 1, 0, 0, 0, 0 }, + { 5, 4, 3, 2, 1, 1, 0, 0, 0, 0 } }; -int HDTrake[9][10] = { - {2,1,0,-1,-2,-2,-3,-3,-3,-3}, - {2,2,1,0,-1,-1,-2,-2,-2,-2}, - {3,2,1,0,-1,-1,-2,-2,-2,-2}, - {4,3,2,1,0,0,-1,-1,-1,-1}, - {5,4,3,2,1,1,0,0,0,0}, - {6,5,4,3,2,2,1,1,1,1}, - {7,6,5,4,3,3,2,2,2,2}, - {8,7,6,5,4,4,3,3,3,3}, - {9,8,7,6,5,5,4,4,4,4} +char HDTrake[9][10] = { + { 2, 1, 0,-1,-2,-2,-3,-3,-3,-3 }, + { 2, 2, 1, 0,-1,-1,-2,-2,-2,-2 }, + { 3, 2, 1, 0,-1,-1,-2,-2,-2,-2 }, + { 4, 3, 2, 1, 0, 0,-1,-1,-1,-1 }, + { 5, 4, 3, 2, 1, 1, 0, 0, 0, 0 }, + { 6, 5, 4, 3, 2, 2, 1, 1, 1, 1 }, + { 7, 6, 5, 4, 3, 3, 2, 2, 2, 2 }, + { 8, 7, 6, 5, 4, 4, 3, 3, 3, 3 }, + { 9, 8, 7, 6, 5, 5, 4, 4, 4, 4 } }; -int QUAL[9][5] = { - {-1,0,0,1,1}, - {-1,0,0,1,1}, - {-1,0,0,1,2}, - {-1,0,0,1,2}, - {-1,0,0,2,2}, - {-1,-1,0,2,2}, - {-2,-1,0,2,2}, - {-2,-1,0,2,2}, - {-2,-1,0,2,3} +char QUAL[9][5] = { + { -1, 0, 0, 1, 1 }, + { -1, 0, 0, 1, 1 }, + { -1, 0, 0, 1, 2 }, + { -1, 0, 0, 1, 2 }, + { -1, 0, 0, 2, 2 }, + { -1,-1, 0, 2, 2 }, + { -2,-1, 0, 2, 2 }, + { -2,-1, 0, 2, 2 }, + { -2,-1, 0, 2, 3 } }; -int MT[9][3] = { - {1,0,0}, - {1,1,0}, - {2,1,0}, - {2,1,1}, - {2,2,1}, - {3,2,1}, - {3,2,2}, - {4,3,2}, - {4,4,2} +char MT[9][3] = { + { 1, 0, 0 }, + { 1, 1, 0 }, + { 2, 1, 0 }, + { 2, 1, 1 }, + { 2, 2, 1 }, + { 3, 2, 1 }, + { 3, 2, 2 }, + { 4, 3, 2 }, + { 4, 4, 2 } }; -int rangeofshot[] = { +char rangeofshot[] = { 0, 1, /* grape */ 3, /* chain */ @@ -433,11 +436,7 @@ int rangeofshot[] = { }; char *countryname[] = { - "American", - "British", - "Spanish", - "French", - "Japanese" + "American", "British", "Spanish", "French", "Japanese" }; char *classname[] = { @@ -462,22 +461,9 @@ char *directionname[] = { "dead ahead" }; -char *qualname[] = { - "dead", - "mutinous", - "green", - "mundane", - "crack", - "elite" -}; +char *qualname[] = { "dead", "mutinous", "green", "mundane", "crack", "elite" }; -char loadname[] = { - '-', 'G', 'C', 'R', 'D', 'E' -}; +char loadname[] = { '-', 'G', 'C', 'R', 'D', 'E' }; -char dr[] = { - 0, 1, 1, 0, -1, -1, -1, 0, 1 -}; -char dc[] = { - 0, 0, -1, -1, -1, 0, 1, 1, 1 -}; +char dr[] = { 0, 1, 1, 0, -1, -1, -1, 0, 1 }; +char dc[] = { 0, 0, -1, -1, -1, 0, 1, 1, 1 }; diff --git a/usr/src/games/sail/pl_2.c b/usr/src/games/sail/pl_2.c index 0711fbebc0..3a354a5932 100644 --- a/usr/src/games/sail/pl_2.c +++ b/usr/src/games/sail/pl_2.c @@ -1,5 +1,5 @@ #ifndef lint -static char *sccsid = "@(#)pl_2.c 1.3 83/07/20"; +static char *sccsid = "@(#)pl_2.c 1.4 83/10/05"; #endif #include "player.h" @@ -238,7 +238,7 @@ int base, exp; repair() { int buf; - int *repairs; + char *repairs; struct shipspecs *ptr; if (repaired || loaded || fired || changed || turned()) { diff --git a/usr/src/games/sail/pl_4.c b/usr/src/games/sail/pl_4.c index fa1bc6f4b1..ee405cc313 100644 --- a/usr/src/games/sail/pl_4.c +++ b/usr/src/games/sail/pl_4.c @@ -1,5 +1,5 @@ #ifndef lint -static char *sccsid = "@(#)pl_4.c 1.1 83/07/20"; +static char *sccsid = "@(#)pl_4.c 1.2 83/10/05"; #endif #include "player.h" @@ -133,11 +133,13 @@ char *buf; *p = 0; return; case '\b': - if (p > buf) + if (p > buf) { + (void) waddstr(scroll_w, "\b \b"); p--; + } break; default: - if (p < &buf[n] - 1) { + if (p < buf + n - 1) { *p++ = c; (void) waddch(scroll_w, c); (void) wrefresh(scroll_w); -- 2.20.1