View | Details | Raw Unified | Return to bug 25278 | Differences between
and this patch

Collapse All | Expand All

(-)bs.c (-6 / +12 lines)
Lines 1110-1115 Link Here
1110
    return(sgetc("YN") == 'Y');
1110
    return(sgetc("YN") == 'Y');
1111
}
1111
}
1112
1112
1113
static void usage(void) {
1114
1115
    (void) fprintf(stderr, "Usage: bs [-s | -b] [-c]\n"
1116
			       "\tWhere the options are:\n"
1117
			       "\t-s : play a salvo game\n"
1118
			       "\t-b : play a blitz game\n"
1119
			       "\t-c : ships may be adjacent\n");
1120
    exit(1);
1121
}
1122
1123
1113
static void do_options(c,op)
1124
static void do_options(c,op)
1114
int c;
1125
int c;
1115
char *op[];
1126
char *op[];
Lines 1124-1135 Link Here
1124
	    {
1135
	    {
1125
	    default:
1136
	    default:
1126
	    case '?':
1137
	    case '?':
1127
		(void) fprintf(stderr, "Usage: battle [-s | -b] [-c]\n");
1138
		usage();
1128
		(void) fprintf(stderr, "\tWhere the options are:\n");
1129
		(void) fprintf(stderr, "\t-s : play a salvo game\n");
1130
		(void) fprintf(stderr, "\t-b : play a blitz game\n");
1131
		(void) fprintf(stderr, "\t-c : ships may be adjacent\n");
1132
		exit(1);
1133
		break;
1139
		break;
1134
	    case '-':
1140
	    case '-':
1135
		switch(op[i][1])
1141
		switch(op[i][1])

Return to bug 25278