diff options
author | Warner Losh <imp@FreeBSD.org> | 2002-02-18 05:15:19 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2002-02-18 05:15:19 +0000 |
commit | ad64363769ccc68607fb1a7cf4559c3cc6edf59e (patch) | |
tree | 275284ba202a3acb4c5d5041be389eba1a666e3b | |
parent | ab3d6ee0980a4fdd7264657107a076f92afb0e56 (diff) |
Remove __P
Remove __STDC__ (which means we now use stdarg rather than vararg)
Remove register
Remove main prototype
Notes
Notes:
svn path=/head/; revision=90828
35 files changed, 267 insertions, 300 deletions
diff --git a/games/arithmetic/arithmetic.c b/games/arithmetic/arithmetic.c index 38adab290743..6aee8286f5fb 100644 --- a/games/arithmetic/arithmetic.c +++ b/games/arithmetic/arithmetic.c @@ -94,13 +94,13 @@ int nright, nwrong; time_t qtime; #define NQUESTS 20 -static void usage __P((void)); -int getrandom __P((int, int, int)); -void intr __P((int)); -int opnum __P((int)); -void penalise __P((int, int, int)); -int problem __P((void)); -void showstats __P((void)); +static void usage(void); +int getrandom(int, int, int); +void intr(int); +int opnum(int); +void penalise(int, int, int); +int problem(void); +void showstats(void); /* * Select keys from +-x/ to be asked addition, subtraction, multiplication, diff --git a/games/battlestar/com1.c b/games/battlestar/com1.c index 09fddc34ecaf..4e054f261316 100644 --- a/games/battlestar/com1.c +++ b/games/battlestar/com1.c @@ -41,7 +41,7 @@ static const char rcsid[] = #include "externs.h" -void convert __P((int)); +void convert(int); int battlestar_move(thataway, token) diff --git a/games/battlestar/com6.c b/games/battlestar/com6.c index 33fd82c52d9c..d01644317ebf 100644 --- a/games/battlestar/com6.c +++ b/games/battlestar/com6.c @@ -43,7 +43,7 @@ static const char rcsid[] = #include "externs.h" #include "pathnames.h" -static void post __P((unsigned int ch)); +static void post(unsigned int ch); int launch() diff --git a/games/battlestar/externs.h b/games/battlestar/externs.h index 6dcc0a1381ed..0755e803069b 100644 --- a/games/battlestar/externs.h +++ b/games/battlestar/externs.h @@ -254,58 +254,58 @@ int wordtype[NWORD]; int wordcount, wordnumber; -int battlestar_move __P((int, int)); -void bury __P((void)); -int card __P((const char *, int)); -void chime __P((void)); -void crash __P((void)); -int cypher __P((void)); -void die __P((int)); -void dig __P((void)); -int draw __P((void)); -void drink __P((void)); -int drive __P((void)); -int drop __P((const char *name)); -int eat __P((void)); -int fight __P((int, int)); -int follow __P((void)); -char *getcom __P((char *, int, const char *, const char *)); -char *getword __P((char *, char *, int)); -int give __P((void)); -void initialize __P((int)); -int jump __P((void)); -void kiss __P((void)); -int land __P((void)); -int launch __P((void)); -void light __P((void)); -void live __P((void)); -void love __P((void)); -void murder __P((void)); -void news __P((void)); -void newway __P((int)); -void open_score_file __P((void)); -void parse __P((void)); -void printobjs __P((void)); -int put __P((void)); -int puton __P((void)); -void ravage __P((void)); -const char *rate __P((void)); -void restore __P((void)); -int ride __P((void)); -void save __P((void)); -int shoot __P((void)); -int take __P((unsigned int from[])); +int battlestar_move(int, int); +void bury(void); +int card(const char *, int); +void chime(void); +void crash(void); +int cypher(void); +void die(int); +void dig(void); +int draw(void); +void drink(void); +int drive(void); +int drop(const char *name); +int eat(void); +int fight(int, int); +int follow(void); +char *getcom(char *, int, const char *, const char *); +char *getword(char *, char *, int); +int give(void); +void initialize(int); +int jump(void); +void kiss(void); +int land(void); +int launch(void); +void light(void); +void live(void); +void love(void); +void murder(void); +void news(void); +void newway (int); +void open_score_file(void); +void parse(void); +void printobjs(void); +int put(void); +int puton(void); +void ravage(void); +const char *rate(void); +void restore(void); +int ride(void); +void save(void); +int shoot(void); +int take(unsigned int from[]); int takeoff(void); -int throw __P((const char *name)); -const char *truedirec __P((int, unsigned int)); -int ucard __P((const unsigned int *)); -int use __P((void)); -int visual __P((void)); -int wearit __P((void)); -void whichway __P((struct room)); -void wordinit __P((void)); -void writedes __P((void)); -int zzz __P((void)); +int throw(const char *name); +const char *truedirec(int, unsigned int); +int ucard(const unsigned int *); +int use(void); +int visual(void); +int wearit(void); +void whichway(struct room); +void wordinit(void); +void writedes(void); +int zzz(void); /* state of the game */ extern int gclock; diff --git a/games/battlestar/fly.c b/games/battlestar/fly.c index 5018f73d908c..e2048073da3f 100644 --- a/games/battlestar/fly.c +++ b/games/battlestar/fly.c @@ -55,13 +55,13 @@ int gclock = 120; /* gtime for all the flights in the game */ char cross = 0; sig_t oldsig; -static void blast __P((void)); -static void endfly __P((void)); -static void moveenemy __P((int)); -static void notarget __P((void)); -static void succumb __P((int)); -static void screen __P((void)); -static void target __P((void)); +static void blast(void); +static void endfly(void); +static void moveenemy(int); +static void notarget(void); +static void succumb(int); +static void screen(void); +static void target(void); void succumb(sig) diff --git a/games/battlestar/init.c b/games/battlestar/init.c index ea7fe3d344df..85ee6f200177 100644 --- a/games/battlestar/init.c +++ b/games/battlestar/init.c @@ -44,9 +44,9 @@ static const char rcsid[] = #include <string.h> #include "externs.h" -static int checkout __P((const char *)); -static void getutmp __P((char *)); -static int wizard __P((const char *)); +static int checkout(const char *); +static void getutmp(char *); +static int wizard(const char *); void initialize(startup) diff --git a/games/battlestar/parse.c b/games/battlestar/parse.c index a5846adb137e..e705b637bd74 100644 --- a/games/battlestar/parse.c +++ b/games/battlestar/parse.c @@ -41,9 +41,9 @@ static const char rcsid[] = #include "externs.h" -static int hash __P((const char *)); -static void install __P((struct wlist *)); -struct wlist *lookup __P((const char *)); +static int hash (const char *); +static void install(struct wlist *); +struct wlist *lookup(const char *); void wordinit() diff --git a/games/bs/bs.c b/games/bs/bs.c index 4b4892f3a780..5ccaa3eb1b6e 100644 --- a/games/bs/bs.c +++ b/games/bs/bs.c @@ -141,9 +141,9 @@ static int salvo, blitz, closepack; #define PR (void)addstr -static bool checkplace __P((int, ship_t *, int)); -static int getcoord __P((int)); -int playagain __P((void)); +static bool checkplace(int, ship_t *, int); +static int getcoord(int); +int playagain(void); static void uninitgame(sig) /* end the game, either normally or due to signal */ diff --git a/games/caesar/caesar.c b/games/caesar/caesar.c index f257415a1a8d..a92131eb3784 100644 --- a/games/caesar/caesar.c +++ b/games/caesar/caesar.c @@ -78,8 +78,7 @@ double stdf[26] = { 2.62, 0.81, 1.88, 0.23, 2.07, 0.06, }; -int main __P((int, char **)); -void printit __P((char *)); +void printit(char *); int main(argc, argv) diff --git a/games/cribbage/cribbage.h b/games/cribbage/cribbage.h index dae270c9616b..8eb1812ae739 100644 --- a/games/cribbage/cribbage.h +++ b/games/cribbage/cribbage.h @@ -33,6 +33,10 @@ * @(#)cribbage.h 8.1 (Berkeley) 5/31/93 */ +#include <sys/defs.h> + +__FBSDID("$FreeBSD$"); + extern CARD deck[ CARDS ]; /* a deck */ extern CARD phand[ FULLHAND ]; /* player's hand */ extern CARD chand[ FULLHAND ]; /* computer's hand */ @@ -59,54 +63,54 @@ extern BOOLEAN playing; /* currently playing game */ extern char expl[]; /* string for explanation */ -void addmsg __P((const char *, ...)); -int adjust __P((CARD [], CARD)); -int anymove __P((CARD [], int, int)); -int anysumto __P((CARD [], int, int, int)); -void bye __P((void)); -int cchose __P((CARD [], int, int)); -void cdiscard __P((BOOLEAN)); -int chkscr __P((int *, int)); -int comphand __P((CARD [], char *)); -void cremove __P((CARD, CARD [], int)); -int cut __P((BOOLEAN, int)); -int deal __P((int)); -void discard __P((BOOLEAN)); -void do_wait __P((void)); -void endmsg __P((void)); -int eq __P((CARD, CARD)); -int fifteens __P((CARD [], int)); -void game __P((void)); -void gamescore __P((void)); -char *getline __P((void)); -int getuchar __P((void)); -int incard __P((CARD *)); -int infrom __P((CARD [], int, char *)); -void instructions __P((void)); -int isone __P((CARD, CARD [], int)); -void makeboard __P((void)); -void makedeck __P((CARD [])); -void makeknown __P((CARD [], int)); -void msg __P((const char *, ...)); -int msgcard __P((CARD, BOOLEAN)); -int msgcrd __P((CARD, BOOLEAN, char *, BOOLEAN)); -int number __P((int, int, char *)); -int numofval __P((CARD [], int, int)); -int pairuns __P((CARD [], int)); -int peg __P((BOOLEAN)); -int pegscore __P((CARD, CARD [], int, int)); -int playhand __P((BOOLEAN)); -int plyrhand __P((CARD [], char *)); -void prcard __P((WINDOW *, int, int, CARD, BOOLEAN)); -void prcrib __P((BOOLEAN, BOOLEAN)); -void prhand __P((CARD [], int, WINDOW *, BOOLEAN)); -void printcard __P((WINDOW *, int, CARD, BOOLEAN)); -void prpeg __P((int, int, BOOLEAN)); -void prtable __P((int)); -int readchar __P((void)); -void rint __P((int)); -int score __P((BOOLEAN)); -int scorehand __P((CARD [], CARD, int, BOOLEAN, BOOLEAN)); -void shuffle __P((CARD [])); -void sorthand __P((CARD [], int)); -void wait_for __P((int)); +void addmsg(const char *, ...); +int adjust(CARD [], CARD); +int anymove(CARD [], int, int); +int anysumto(CARD [], int, int, int); +void bye(void); +int cchose(CARD [], int, int); +void cdiscard(BOOLEAN); +int chkscr(int *, int); +int comphand(CARD [], char *); +void cremove(CARD, CARD [], int); +int cut(BOOLEAN, int); +int deal(int); +void discard(BOOLEAN); +void do_wait(void); +void endmsg(void); +int eq(CARD, CARD); +int fifteens(CARD [], int); +void game(void); +void gamescore(void); +char *getline(void); +int getuchar(void); +int incard(CARD *); +int infrom(CARD [], int, char *); +void instructions(void); +int isone(CARD, CARD [], int); +void makeboard(void); +void makedeck(CARD []); +void makeknown(CARD [], int); +void msg(const char *, ...); +int msgcard(CARD, BOOLEAN); +int msgcrd(CARD, BOOLEAN, char *, BOOLEAN); +int number(int, int, char *); +int numofval(CARD [], int, int); +int pairuns(CARD [], int); +int peg(BOOLEAN); +int pegscore(CARD, CARD [], int, int); +int playhand(BOOLEAN); +int plyrhand(CARD [], char *); +void prcard(WINDOW *, int, int, CARD, BOOLEAN); +void prcrib(BOOLEAN, BOOLEAN); +void prhand(CARD [], int, WINDOW *, BOOLEAN); +void printcard(WINDOW *, int, CARD, BOOLEAN); +void prpeg(int, int, BOOLEAN); +void prtable(int); +int readchar(void); +void rint(int); +int score(BOOLEAN); +int scorehand(CARD [], CARD, int, BOOLEAN, BOOLEAN); +void shuffle(CARD []); +void sorthand(CARD [], int); +void wait_for(int); diff --git a/games/cribbage/io.c b/games/cribbage/io.c index 01b60e1986dd..fd30a080d48f 100644 --- a/games/cribbage/io.c +++ b/games/cribbage/io.c @@ -42,16 +42,12 @@ static const char rcsid[] = #include <ctype.h> #include <curses.h> #include <signal.h> +#include <stdarg.h> #include <stdlib.h> #include <string.h> #include <termios.h> #include <unistd.h> -#if __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif #include "deck.h" #include "cribbage.h" @@ -389,21 +385,11 @@ int Mpos = 0; static int Newpos = 0; void -#if __STDC__ msg(const char *fmt, ...) -#else -msg(fmt, va_alist) - char *fmt; - va_dcl -#endif { va_list ap; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif (void)vsprintf(&Msgbuf[Newpos], fmt, ap); va_end(ap); endmsg(); @@ -414,21 +400,11 @@ msg(fmt, va_alist) * Add things to the current message */ void -#if __STDC__ addmsg(const char *fmt, ...) -#else -addmsg(fmt, va_alist) - char *fmt; - va_dcl -#endif { va_list ap; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif (void)vsprintf(&Msgbuf[Newpos], fmt, ap); va_end(ap); } diff --git a/games/dm/dm.c b/games/dm/dm.c index 8e4a687a823b..5648eb169804 100644 --- a/games/dm/dm.c +++ b/games/dm/dm.c @@ -68,15 +68,15 @@ static int priority = 0; /* priority game runs at */ static char *game, /* requested game */ *gametty; /* from tty? */ -void c_day __P((char *, char *, char *)); -void c_tty __P((char *)); -void c_game __P((char *, char *, char *, char *)); -void hour __P((int)); -double load __P((void)); -void nogamefile __P((void)); -void play __P((char **)); -void read_config __P((void)); -int users __P((void)); +void c_day(char *, char *, char *); +void c_tty(char *); +void c_game(char *, char *, char *, char *); +void hour(int); +double load(void); +void nogamefile(void); +void play(char **); +void read_config(void); +int users(void); int main(argc, argv) diff --git a/games/factor/factor.c b/games/factor/factor.c index 34f0b57bc3e7..7097d57c6560 100644 --- a/games/factor/factor.c +++ b/games/factor/factor.c @@ -88,8 +88,8 @@ extern ubig *pr_limit; /* largest prime in the prime array */ int hflag; -void pr_fact __P((ubig)); /* print factors of a value */ -void usage __P((void)); +void pr_fact(ubig); /* print factors of a value */ +void usage(void); int main(argc, argv) diff --git a/games/fish/fish.c b/games/fish/fish.c index 7ef8b5b798e6..2a540226037f 100644 --- a/games/fish/fish.c +++ b/games/fish/fish.c @@ -75,21 +75,21 @@ int promode; int asked[RANKS], comphand[RANKS], deck[RANKS]; int userasked[RANKS], userhand[RANKS]; -void chkwinner __P((int player, int *hand)); -int compmove __P((void)); -int countbooks __P((int *hand)); -int countcards __P((int *hand)); -int drawcard __P((int player, int *hand)); -int gofish __P((int askedfor, int player, int *hand)); -void goodmove __P((int player, int move, int *hand, int *opphand)); -void init __P((void)); -void instructions __P((void)); -int nrandom __P((int n)); -void printhand __P((int *hand)); -void printplayer __P((int player)); -int promove __P((void)); -void usage __P((void)); -int usermove __P((void)); +void chkwinner(int player, int *hand); +int compmove(void); +int countbooks(int *hand); +int countcards(int *hand); +int drawcard(int player, int *hand); +int gofish(int askedfor, int player, int *hand); +void goodmove(int player, int move, int *hand, int *opphand); +void init(void); +void instructions(void); +int nrandom(int n); +void printhand(int *hand); +void printplayer(int player); +int promove(void); +void usage(void); +int usermove(void); int main(argc, argv) diff --git a/games/hangman/hangman.h b/games/hangman/hangman.h index a0851be844f0..b8dacd9c26a1 100644 --- a/games/hangman/hangman.h +++ b/games/hangman/hangman.h @@ -80,13 +80,13 @@ extern FILE *Dict; extern off_t Dict_size; -void die __P((int)); -void endgame __P((void)); -void getguess __P((void)); -void getword __P((void)); -void playgame __P((void)); -void prdata __P((void)); -void prman __P((void)); -void prword __P((void)); -char readch __P((void)); -void setup __P((void)); +void die(int); +void endgame(void); +void getguess(void); +void getword(void); +void playgame(void); +void prdata(void); +void prman(void); +void prword(void); +char readch(void); +void setup(void); diff --git a/games/mille/end.c b/games/mille/end.c index c8d736c5ea09..ff35779058da 100644 --- a/games/mille/end.c +++ b/games/mille/end.c @@ -46,8 +46,8 @@ static const char rcsid[] = */ #ifndef EXTRAP -void extrapolate __P((PLAY *)); -void undoex __P((void)); +void extrapolate(PLAY *); +void undoex(void); #endif /* diff --git a/games/mille/mille.c b/games/mille/mille.c index 13d35c11839c..e2f325514800 100644 --- a/games/mille/mille.c +++ b/games/mille/mille.c @@ -56,7 +56,7 @@ static const char rcsid[] = * @(#)mille.c 1.3 (Berkeley) 5/10/83 */ -static void usage __P((void)); +static void usage(void); int main(ac, av) diff --git a/games/mille/mille.h b/games/mille/mille.h index 2f94e41f05e8..f99cf454f610 100644 --- a/games/mille/mille.h +++ b/games/mille/mille.h @@ -232,37 +232,37 @@ extern WINDOW *Board, *Miles, *Score; * functions */ -void account __P((CARD)); -void calcmove __P((void)); -bool canplay __P((PLAY *, PLAY *, CARD)); -bool check_ext __P((bool)); -void check_more __P((void)); -void die __P((int)); -void domove __P((void)); -bool error __P((char *, ...)); +void account(CARD); +void calcmove(void); +bool canplay(PLAY *, PLAY *, CARD); +bool check_ext(bool); +void check_more(void); +void die(int); +void domove(void); +bool error(char *, ...); #ifdef EXTRAP -void extrapolate __P((PLAY *)); +void extrapolate(PLAY *); #endif -void finalscore __P((PLAY *)); -CARD getcard __P((void)); -bool getyn __P((int)); -void init __P((void)); -int isrepair __P((CARD)); -void newboard __P((void)); -void newscore __P((void)); -bool onecard __P((PLAY *)); -void prboard __P((void)); -void prompt __P((int)); -void prscore __P((bool)); -char readch __P((void)); -bool rest_f __P((char *)); -int roll __P((int, int)); -void rub __P((int)); -CARD safety __P((CARD)); -bool save __P((void)); -void shuffle __P((void)); -void sort __P((CARD *)); -void varpush __P((int, int (*)())); +void finalscore(PLAY *); +CARD getcard(void); +bool getyn(int); +void init(void); +int isrepair(CARD); +void newboard(void); +void newscore(void); +bool onecard(PLAY *); +void prboard(void); +void prompt(int); +void prscore(bool); +char readch(void); +bool rest_f(char *); +int roll(int, int); +void rub(int); +CARD safety(CARD); +bool save(void); +void shuffle(void); +void sort(CARD *); +void varpush(int, int (*)()); #ifdef EXTRAP -void undoex __P((void)); +void undoex(void); #endif diff --git a/games/mille/move.c b/games/mille/move.c index b67acfd6112c..9ae7e3d4cff1 100644 --- a/games/mille/move.c +++ b/games/mille/move.c @@ -60,10 +60,10 @@ const char *Movenames[] = { "M_DISCARD", "M_DRAW", "M_PLAY", "M_ORDER" }; -static void check_go __P((void)); -static void getmove __P((void)); -static int haspicked __P((PLAY *)); -static bool playcard __P((PLAY *)); +static void check_go(void); +static void getmove(void); +static int haspicked(PLAY *); +static bool playcard(PLAY *); void domove() diff --git a/games/mille/print.c b/games/mille/print.c index a373168ffdd8..488fbbb9722e 100644 --- a/games/mille/print.c +++ b/games/mille/print.c @@ -48,8 +48,8 @@ static const char rcsid[] = # define COMP_STRT 20 # define CARD_STRT 2 -static void show_card __P((int, int, CARD, CARD *)); -static void show_score __P((int, int, int, int *)); +static void show_card(int, int, CARD, CARD *); +static void show_score(int, int, int, int *); void prboard() { diff --git a/games/number/number.c b/games/number/number.c index c7dfbe424a09..f3d6a1089c7a 100644 --- a/games/number/number.c +++ b/games/number/number.c @@ -78,12 +78,12 @@ static const char *name1[] = { "novemdecillion", "vigintillion", }; -void convert __P((char *)); -int number __P((char *, int)); -void pfract __P((int)); -void toobig __P((void)); -int unit __P((int, char *)); -void usage __P((void)); +void convert(char *); +int number(char *, int); +void pfract(int); +void toobig(void); +int unit(int, char *); +void usage(void); int lflag; diff --git a/games/phantasia/misc.c b/games/phantasia/misc.c index f920832ab9a9..f46e3fdabdd8 100644 --- a/games/phantasia/misc.c +++ b/games/phantasia/misc.c @@ -1444,7 +1444,7 @@ readmessage() error(whichfile) char *whichfile; { - int (*funcp) __P((const char *, ...)); + int (*funcp)(const char *, ...); if (Windows) { diff --git a/games/phantasia/setup.c b/games/phantasia/setup.c index fddf7f4b9b5d..b295b6a7e0e3 100644 --- a/games/phantasia/setup.c +++ b/games/phantasia/setup.c @@ -61,7 +61,7 @@ main(argc, argv) char *argv[]; { char **filename; /* for pointing to file names */ - register int fd; /* file descriptor */ + int fd; /* file descriptor */ FILE *fp; /* for opening files */ struct stat fbuf; /* for getting files statistics */ int ch; diff --git a/games/pig/pig.c b/games/pig/pig.c index 627fab02c0ed..ccb56757341e 100644 --- a/games/pig/pig.c +++ b/games/pig/pig.c @@ -53,8 +53,8 @@ static const char rcsid[] = #include <string.h> #include <unistd.h> -void pigout __P((char *, int)); -void usage __P((void)); +void pigout(char *, int); +void usage(void); int main(argc, argv) diff --git a/games/pom/pom.c b/games/pom/pom.c index 90e0f424f738..b590991356eb 100644 --- a/games/pom/pom.c +++ b/games/pom/pom.c @@ -73,10 +73,9 @@ static const char rcsid[] = #define Nzero 55.204723 /* lunar mean long of node at EPOCH */ #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) -static void adj360 __P((double *)); -static double dtor __P((double)); -int main __P((void)); -static double potm __P((double)); +static void adj360(double *); +static double dtor(double); +static double potm(double); int main() diff --git a/games/primes/primes.c b/games/primes/primes.c index ec680deb662e..c6ea1d9ace0c 100644 --- a/games/primes/primes.c +++ b/games/primes/primes.c @@ -107,9 +107,9 @@ extern int pattern_size; /* length of pattern array */ int hflag; -void primes __P((ubig, ubig)); -ubig read_num_buf __P((void)); -void usage __P((void)); +void primes(ubig, ubig); +ubig read_num_buf(void); +void usage(void); int main(argc, argv) diff --git a/games/quiz/quiz.c b/games/quiz/quiz.c index 1c262729293d..5bffadce0bb9 100644 --- a/games/quiz/quiz.c +++ b/games/quiz/quiz.c @@ -53,6 +53,7 @@ static const char rcsid[] = #include <ctype.h> #include <errno.h> +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -66,16 +67,16 @@ static QE qlist; static int catone, cattwo, tflag; static u_int qsize; -char *appdstr __P((char *, char *, size_t)); -void downcase __P((char *)); -void err __P((const char *, ...)); -void get_cats __P((char *, char *)); -void get_file __P((char *)); -char *next_cat __P((char *)); -void quiz __P((void)); -void score __P((u_int, u_int, u_int)); -void show_index __P((void)); -void usage __P((void)); +char *appdstr(char *, char *, size_t); +void downcase(char *); +void err(const char *, ...); +void get_cats(char *, char *); +void get_file(char *); +char *next_cat(char *); +void quiz(void); +void score(u_int, u_int, u_int); +void show_index(void); +void usage(void); int main(argc, argv) @@ -369,27 +370,11 @@ usage() exit(1); } -#if __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif - void -#if __STDC__ err(const char *fmt, ...) -#else -err(fmt, va_alist) - char *fmt; - va_dcl -#endif { va_list ap; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif (void)fprintf(stderr, "quiz: "); (void)vfprintf(stderr, fmt, ap); va_end(ap); diff --git a/games/quiz/quiz.h b/games/quiz/quiz.h index 8923c8f79ebe..6dcfd9edd379 100644 --- a/games/quiz/quiz.h +++ b/games/quiz/quiz.h @@ -37,6 +37,10 @@ * @(#)quiz.h 8.1 (Berkeley) 5/31/93 */ +#include <sys/defs.h> + +__FBSDID("$FreeBSD$"); + #define TRUE 1 #define FALSE 0 @@ -56,6 +60,6 @@ typedef struct qentry { extern char rxperr[]; -int rxp_compile __P((char *)); -char *rxp_expand __P((void)); -int rxp_match __P((char *)); +int rxp_compile(char *); +char *rxp_expand(void); +int rxp_match(char *); diff --git a/games/quiz/rxp.c b/games/quiz/rxp.c index 69ac7c77b798..a3e37ce3a7c7 100644 --- a/games/quiz/rxp.c +++ b/games/quiz/rxp.c @@ -82,9 +82,9 @@ typedef short Rxp_t; /* type for regexp tokens */ static Rxp_t rxpbuf[RXP_LINE_SZ]; /* compiled regular expression buffer */ char rxperr[128]; /* parser error message */ -static int rxp__compile __P((char *, int)); -static char *rxp__expand __P((int)); -static int rxp__match __P((char *, int, Rxp_t *, Rxp_t *, char *)); +static int rxp__compile(char *, int); +static char *rxp__expand(int); +static int rxp__match(char *, int, Rxp_t *, Rxp_t *, char *); int rxp_compile(s) diff --git a/games/rain/rain.c b/games/rain/rain.c index 70799219bb76..5f762b386e3e 100644 --- a/games/rain/rain.c +++ b/games/rain/rain.c @@ -60,7 +60,7 @@ static const char rcsid[] = volatile sig_atomic_t sig_caught = 0; -static void onsig __P((int sig)); +static void onsig(int sig); int main(int argc, char **argv) diff --git a/games/random/random.c b/games/random/random.c index 8936b5ddb5dc..9c66da4bd73f 100644 --- a/games/random/random.c +++ b/games/random/random.c @@ -58,7 +58,7 @@ static const char rcsid[] = #include <time.h> #include <unistd.h> -void usage __P((void)); +void usage(void); int main(argc, argv) diff --git a/games/sail/pl_main.c b/games/sail/pl_main.c index becf6bf2b777..fe7ba0e503ee 100644 --- a/games/sail/pl_main.c +++ b/games/sail/pl_main.c @@ -61,12 +61,12 @@ pl_main() initialize() { - register struct File *fp; - register struct ship *sp; + struct File *fp; + struct ship *sp; char captain[80]; char message[60]; int load; - register int n; + int n; char *nameptr; int nat[NNATION]; diff --git a/games/worm/worm.c b/games/worm/worm.c index 71ffb8831373..228236456bbc 100644 --- a/games/worm/worm.c +++ b/games/worm/worm.c @@ -85,17 +85,17 @@ int start_len = LENGTH; char lastch; char outbuf[BUFSIZ]; -void crash __P((void)); -void display __P((struct body *, char)); -void leave __P((int)); -void life __P((void)); -void newpos __P((struct body *)); -void prize __P((void)); -void process __P((char)); -long rnd __P((int)); -void setup __P((void)); -void suspend __P((int)); -void wake __P((int)); +void crash(void); +void display(struct body *, char); +void leave(int); +void life(void); +void newpos(struct body *); +void prize(void); +void process(char); +long rnd(int); +void setup(void); +void suspend(int); +void wake(int); int main(argc, argv) diff --git a/games/worms/worms.c b/games/worms/worms.c index ed50e37a1041..f31a6e431d94 100644 --- a/games/worms/worms.c +++ b/games/worms/worms.c @@ -179,8 +179,8 @@ static struct worm { } *worm; volatile sig_atomic_t sig_caught = 0; -void onsig __P((int)); void nomem(void); +void onsig(int); int main(argc, argv) diff --git a/games/wump/wump.c b/games/wump/wump.c index e670533d75a9..76e9fbd02573 100644 --- a/games/wump/wump.c +++ b/games/wump/wump.c @@ -116,20 +116,20 @@ char answer[20]; /* user input */ int bats_nearby(void); void cave_init(void); void clear_things_in_cave(void); -void display_room_stats __P((void)); -int getans __P((const char *prompt)); +void display_room_stats(void); +int getans(const char *prompt); void initialize_things_in_cave(void); void instructions(void); -int int_compare __P((const void *va, const void *vb)); +int int_compare(const void *va, const void *vb); void jump(int where); void kill_wump(void); -int move_to __P((char *room_number)); +int move_to(char *room_number); void move_wump(void); void no_arrows(void); void pit_kill(void); int pit_nearby(void); void pit_survive(void); -int shoot __P((char *room_list)); +int shoot(char *room_list); void shoot_self(void); int take_action(void); void usage(void); |