-void chew(void);
-void chew2(void);
-void skip(int);
-void prout(char *, ...);
-void proutn(char *, ...);
-void stars(void);
-void newqad(bool);
-bool ja(void);
-void cramen(int);
-void crmshp(void);
-char *cramlc(enum loctype, coord w);
-double expran(double);
-double Rand(void);
-coord iran(int);
-coord dropin(int);
-void newcnd(void);
-void sortkl(void);
-void imove(void);
-void ram(bool, int, coord);
-void crmena(bool, int, enum loctype, coord w);
-void deadkl(coord, int, coord);
-void timwrp(void);
-void movcom(void);
-void torpedo(double, double, coord, double *, int, int);
-void huh(void);
-void pause_game(int);
-void nova(coord);
-void snova(bool, coord *);
-void scom(bool *);
-void hittem(double *);
-void prouts(char *, ...);
-int isit(char *);
-void preport(void);
-void orbit(void);
-void sensor(void);
-void drawmaps(int);
-void beam(void);
-void mine(void);
-void usecrystals(void);
-void shuttle(void);
-void deathray(void);
-void debugme(void);
-void attakreport(bool);
-void movetho(void);
-void probe(void);
-void iostart(void);
-void setwnd(WINDOW *);
-void warble(void);
-void boom(coord);
-void tracktorpedo(coord, int, int, int, int);
-void cgetline(char *, int);
-void waitfor(void);
-void setpassword(void);
-void commandhook(char *, bool);
-void makechart(void);
-void enqueue(char *);
-char *systemname(int);
-coord newkling(int);
-
-/* mode arguments for srscan() */
-#define SCAN_FULL 1
-#define SCAN_REQUEST 2
-#define SCAN_STATUS 3
-#define SCAN_NO_LEFTSIDE 4
+extern void chew(void);
+extern void chew2(void);
+extern void skip(int);
+extern void prout(const char *, ...) __attribute__((format(printf, 1, 2)));
+extern void proutn(const char *, ...) __attribute__((format(printf, 1, 2)));
+extern void prouts(const char *, ...) __attribute__((format(printf, 1, 2)));
+extern void prstat(const char *txt, const char *fmt, ...)
+ __attribute__((format(printf, 2, 3)));
+extern void stars(void);
+extern void newqad(bool);
+extern bool ja(void);
+extern void cramen(feature);
+extern void crmshp(void);
+extern char *cramlc(enum loctype, coord w);
+extern double expran(double);
+extern double Rand(void);
+extern coord randplace(int);
+extern coord dropin(feature);
+extern void newcnd(void);
+extern void sortklings(void);
+extern void imove(bool);
+extern void ram(bool, feature, coord);
+extern void crmena(bool, feature, enum loctype, coord w);
+extern void deadkl(coord, feature, coord);
+extern void timwrp(void);
+extern void moveklings(void);
+extern void torpedo(double, double, coord, double *, int, int);
+extern void huh(void);
+extern void announce(void);
+extern void nova(coord);
+extern void supernova(bool, coord *);
+extern void supercommander(void);
+extern void hittem(double *);
+extern bool isit(char *);
+extern void survey(void);
+extern void orbit(void);
+extern void sensor(void);
+extern void drawmaps(int);
+extern void beam(void);
+extern void mine(void);
+extern void usecrystals(void);
+extern void shuttle(void);
+extern void deathray(void);
+extern void debugme(void);
+extern void attackreport(bool);
+extern void movetholian(void);
+extern void probe(void);
+extern void iostart(void);
+extern void setwnd(WINDOW *);
+extern void warble(void);
+extern void boom(coord);
+extern void tracktorpedo(coord, int, int, int, int);
+extern void cgetline(char *, int);
+extern void waitfor(void);
+extern void setpassword(void);
+extern void commandhook(char *, bool);
+extern void makechart(void);
+extern coord newkling(int);
+#ifdef BSD_BUG_FOR_BUG
+extern void visual(void);
+#endif