-/* $NetBSD: extern.h,v 1.5 1997/10/13 21:03:49 christos Exp $ */
+/* $NetBSD: extern.h,v 1.11 1999/09/08 21:45:30 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
};
struct ship {
- char *shipname; /* 0 */
+ const char *shipname; /* 0 */
struct shipspecs *specs; /* 2 */
unsigned char nationality; /* 4 */
short shiprow; /* 6 */
char windspeed; /* 2 */
char windchange; /* 4 */
unsigned char vessels; /* 12 */
- char *name; /* 14 */
+ const char *name; /* 14 */
struct ship ship[NSHIP]; /* 16 */
};
-struct scenario scene[];
+extern struct scenario scene[];
int nscene;
struct shipspecs {
int rig4;
short pts;
};
-struct shipspecs specs[];
+extern struct shipspecs specs[];
struct scenario *cc; /* the current scenario */
struct ship *ls; /* &cc->ship[cc->vessels] */
struct windeffects {
char A, B, C, D;
};
-struct windeffects WET[7][6];
+const struct windeffects WET[7][6];
struct Tables {
char H, G, C, R;
};
-struct Tables RigTable[11][6];
-struct Tables HullTable[11][6];
+const struct Tables RigTable[11][6];
+const struct Tables HullTable[11][6];
-char AMMO[9][4];
-char HDT[9][10];
-char HDTrake[9][10];
-char QUAL[9][5];
-char MT[9][3];
+const char AMMO[9][4];
+const char HDT[9][10];
+const char HDTrake[9][10];
+const char QUAL[9][5];
+const char MT[9][3];
-char *countryname[];
-char *classname[];
-char *directionname[];
-char *qualname[];
-char loadname[];
+extern const char *const countryname[];
+extern const char *const classname[];
+extern const char *const directionname[];
+extern const char *const qualname[];
+extern const char loadname[];
-char rangeofshot[];
+extern const char rangeofshot[];
-char dr[], dc[];
+extern const char dr[], dc[];
int winddir;
int windspeed;
void thinkofgrapples __P((void));
void checkup __P((void));
void prizecheck __P((void));
-int strend __P((char *));
+int strend __P((const 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 move_ship __P((const 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 *));
void unboard __P((struct ship *, struct ship *, int));
/* pl_1.c */
-void leave __P((int));
-void choke __P((int));
+void leave __P((int)) __attribute__((__noreturn__));
+void choke __P((int)) __attribute__((__noreturn__));
void child __P((int));
/* pl_2.c */
-void play __P((void));
+void play __P((void)) __attribute__((__noreturn__));
/* pl_3.c */
void acceptcombat __P((void));
void changesail __P((void));
void acceptsignal __P((void));
void lookout __P((void));
-char *saywhat __P((struct ship *, int));
+const char *saywhat __P((struct ship *, int));
void eyeball __P((struct ship *));
/* pl_5.c */
void Msg __P((const char *, ...))
__attribute__((__format__(__printf__,1,2)));
void Scroll __P((void));
-void prompt __P((char *, struct ship *));
+void prompt __P((const char *, struct ship *));
void endprompt __P((int));
-int sgetch __P((char *, struct ship *, int));
-void sgetstr __P((char *, char *, int));
+int sgetch __P((const char *, struct ship *, int));
+void sgetstr __P((const char *, char *, int));
void draw_screen __P((void));
void draw_view __P((void));
void draw_turn __P((void));
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));
+void Write __P((int, struct ship *, long, long, long, long));
+void Writestr __P((int, struct ship *, const char *));
int Sync __P((void));
-int sync_update __P((int, struct ship *, long, long, long, long));
+int sync_update __P((int, struct ship *, const char *, long, long, long, long));