--- /usr/src/games/bs/bs.c Mon Feb 21 14:07:31 2000 +++ bs.c Mon Jun 10 01:26:20 2002 @@ -1110,6 +1110,17 @@ return(sgetc("YN") == 'Y'); } +static void usage(void) { + + (void) fprintf(stderr, "Usage: bs [-s | -b] [-c]\n" + "\tWhere the options are:\n" + "\t-s : play a salvo game\n" + "\t-b : play a blitz game\n" + "\t-c : ships may be adjacent\n"); + exit(1); +} + + static void do_options(c,op) int c; char *op[]; @@ -1124,12 +1135,7 @@ { default: case '?': - (void) fprintf(stderr, "Usage: battle [-s | -b] [-c]\n"); - (void) fprintf(stderr, "\tWhere the options are:\n"); - (void) fprintf(stderr, "\t-s : play a salvo game\n"); - (void) fprintf(stderr, "\t-b : play a blitz game\n"); - (void) fprintf(stderr, "\t-c : ships may be adjacent\n"); - exit(1); + usage(); break; case '-': switch(op[i][1])