From: Eric S. Raymond Date: Tue, 19 Oct 2010 06:00:14 +0000 (-0400) Subject: Polish code to full ANSI. X-Git-Tag: 2.10~2 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=f76324ca0abc8562689714680a438baa40223a94;p=bluemoon.git Polish code to full ANSI. --- diff --git a/bluemoon.c b/bluemoon.c index be7ef11..03d8a8b 100644 --- a/bluemoon.c +++ b/bluemoon.c @@ -88,8 +88,7 @@ static chtype glyphs[] = static chtype *suits = letters; /* this may change to glyphs below */ -static void die(onsig) -int onsig; +static void die(int onsig) { signal(onsig, SIG_IGN); endwin(); @@ -98,7 +97,7 @@ int onsig; exit(0); } -static void init_vars() +static void init_vars(void) { int i; @@ -109,8 +108,7 @@ static void init_vars() freeptr[i]=i * GRID_WIDTH; } -static void shuffle(size) -int size; +static void shuffle(int size) { int i,j,numswaps,swapnum,temp; @@ -126,7 +124,7 @@ int size; } } -static void deal_cards() +static void deal_cards(void) { int ptr, card=0, value, csuit, crank, suit, aces[4]; @@ -154,8 +152,7 @@ static void deal_cards() } } -static void printcard(value) -int value; +static void printcard(int value) { (void) addch(' '); if (value == NOCARD) @@ -169,8 +166,7 @@ int value; (void) addch(' '); } -static void display_cards(deal) -int deal; +static void display_cards(int deal) { int row, card; @@ -202,8 +198,7 @@ P("deals. A good score is 1-3 deals, 4-7 is average, 8 or more is poor. "); refresh(); } -static int find(card) -int card; +static int find(int card) { int i; @@ -215,8 +210,7 @@ int card; return(NOCARD); } -static void movecard(src, dst) -int src, dst; +static void movecard(int src, int dst) { grid[dst]=grid[src]; grid[src]=NOCARD; @@ -230,7 +224,7 @@ int src, dst; refresh(); } -static void play_game() +static void play_game(void) { int dead=0, i, j; char c; @@ -340,7 +334,7 @@ static void play_game() (void) getch(); } -static int collect_discards() +static int collect_discards(void) { int row, col, cardno=0, finish, gridno; @@ -364,8 +358,7 @@ static int collect_discards() return cardno; } -static void game_finished(deal) -int deal; +static void game_finished(int deal) { clear(); (void)printw("You finished the game in %d deals. This is ",deal); diff --git a/bluemoon.spec b/bluemoon.spec index 3857b76..4b3ae94 100644 --- a/bluemoon.spec +++ b/bluemoon.spec @@ -46,7 +46,7 @@ cp bluemoon.6 "$RPM_BUILD_ROOT"%{_mandir}/man6/ %changelog * Tue Oct 19 2010 Eric S. Raymond 2.10-1 - Change license to BSD + Change license to BSD. Polish code to full ANSI with prototypes. * Sun Jan 11 2004 Eric S. Raymond 2.9-1 - RPM spec file cleanup, new distribution machinery based on shipper.