]> thyrsus.com Git - bluemoon.git/commitdiff
Polish code to full ANSI.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 19 Oct 2010 06:00:14 +0000 (02:00 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 19 Oct 2010 06:00:14 +0000 (02:00 -0400)
bluemoon.c
bluemoon.spec

index be7ef1186877361ad46e040243f2a58b62d2eacf..03d8a8bb6716e6db002271801ae8eddcc89b648f 100644 (file)
@@ -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);
index 3857b76ce48a7b5bfdb24bee84906d17a8bca9ad..4b3ae941c8ce5fb164f324936cdb5207f334e69d 100644 (file)
@@ -46,7 +46,7 @@ cp bluemoon.6 "$RPM_BUILD_ROOT"%{_mandir}/man6/
 
 %changelog
 * Tue Oct 19 2010 Eric S. Raymond <esr@snark.thyrsus.com> 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 <esr@snark.thyrsus.com> 2.9-1
 - RPM spec file cleanup, new distribution machinery based on shipper.