summaryrefslogtreecommitdiff
path: root/games/cribbage/io.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-07-10 07:26:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-07-10 07:26:25 +0000
commit81fbdc5dca4ba4f9673c612f03fede15c8ad3f91 (patch)
treebb4eddffc1438ca1405dde0867782c5b37066a26 /games/cribbage/io.c
parent123f3b7651527e3cd41a6956ecd641c00442b6c7 (diff)
more ansi; khalek@linuxgamers.net
Diffstat (limited to 'games/cribbage/io.c')
-rw-r--r--games/cribbage/io.c59
1 files changed, 17 insertions, 42 deletions
diff --git a/games/cribbage/io.c b/games/cribbage/io.c
index cc124a5ea60..983acb0c8ac 100644
--- a/games/cribbage/io.c
+++ b/games/cribbage/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.9 2003/06/03 03:01:39 millert Exp $ */
+/* $OpenBSD: io.c,v 1.10 2004/07/10 07:26:23 deraadt Exp $ */
/* $NetBSD: io.c,v 1.9 1997/07/09 06:25:47 phil Exp $ */
/*-
@@ -78,9 +78,7 @@ char *suitchar[SUITS] = {"S", "H", "D", "C"};
* Call msgcrd in one of two forms
*/
int
-msgcard(c, brief)
- CARD c;
- bool brief;
+msgcard(CARD c, bool brief)
{
if (brief)
return (msgcrd(c, TRUE, NULL, TRUE));
@@ -93,10 +91,7 @@ msgcard(c, brief)
* Print the value of a card in ascii
*/
int
-msgcrd(c, brfrank, mid, brfsuit)
- CARD c;
- bool brfrank, brfsuit;
- char *mid;
+msgcrd(CARD c, bool brfrank, char *mid, bool brfsuit)
{
if (c.rank == EMPTY || c.suit == EMPTY)
return (FALSE);
@@ -118,11 +113,7 @@ msgcrd(c, brfrank, mid, brfsuit)
* Print out a card.
*/
void
-printcard(win, cardno, c, blank)
- WINDOW *win;
- int cardno;
- CARD c;
- bool blank;
+printcard(WINDOW *win, int cardno, CARD c, bool blank)
{
prcard(win, cardno * 2, cardno, c, blank);
}
@@ -132,11 +123,7 @@ printcard(win, cardno, c, blank)
* Print out a card on the window at the specified location
*/
void
-prcard(win, y, x, c, blank)
- WINDOW *win;
- int y, x;
- CARD c;
- bool blank;
+prcard(WINDOW *win, int y, int x, CARD c, bool blank)
{
if (c.rank == EMPTY)
return;
@@ -159,11 +146,7 @@ prcard(win, y, x, c, blank)
* Print a hand of n cards
*/
void
-prhand(h, n, win, blank)
- CARD h[];
- int n;
- WINDOW *win;
- bool blank;
+prhand(CARD h[], int n, WINDOW *win, bool blank)
{
int i;
@@ -179,10 +162,7 @@ prhand(h, n, win, blank)
* input, returns the index of the card found...
*/
int
-infrom(hand, n, prompt)
- CARD hand[];
- int n;
- char *prompt;
+infrom(CARD hand[], int n, char *prompt)
{
int i, j;
CARD crd;
@@ -235,8 +215,7 @@ infrom(hand, n, prompt)
* and then parses it.
*/
int
-incard(crd)
- CARD *crd;
+incard(CARD *crd)
{
int i;
int rnk, sut;
@@ -320,7 +299,7 @@ gotit:
* Reads and converts to upper case
*/
int
-getuchar()
+getuchar(void)
{
int c;
@@ -337,9 +316,7 @@ getuchar()
* "hi" inclusive.
*/
int
-number(lo, hi, prompt)
- int lo, hi;
- char *prompt;
+number(int lo, int hi, char *prompt)
{
char *p;
int sum, tmp;
@@ -425,7 +402,7 @@ addmsg(const char *fmt, ...)
int Lineno = 0;
void
-endmsg()
+endmsg(void)
{
static int lastline = 0;
int len;
@@ -474,7 +451,7 @@ endmsg()
* Wait for the user to type ' ' before doing anything else
*/
void
-do_wait()
+do_wait(void)
{
static char prompt[] = {'-', '-', 'M', 'o', 'r', 'e', '-', '-', '\0'};
@@ -496,8 +473,7 @@ do_wait()
* Sit around until the guy types the right key
*/
void
-wait_for(ch)
- int ch;
+wait_for(int ch)
{
char c;
@@ -514,7 +490,7 @@ wait_for(ch)
* Reads and returns a character, checking for gross input errors
*/
int
-readchar()
+readchar(void)
{
int cnt;
char c;
@@ -542,7 +518,7 @@ over:
* compressed to one space; a space is inserted before a ','
*/
char *
-getline()
+getline(void)
{
char *sp;
int c, oy, ox;
@@ -591,8 +567,7 @@ getline()
}
void
-rint(signo)
- int signo;
+rint(int signo)
{
bye();
exit(1);
@@ -603,7 +578,7 @@ rint(signo)
* Leave the program, cleaning things up as we go.
*/
void
-bye()
+bye(void)
{
signal(SIGINT, SIG_IGN);
mvcur(0, COLS - 1, LINES - 1, 0);