From: Eric S. Raymond Date: Mon, 24 Jan 2005 15:06:23 +0000 (+0000) Subject: Second stage ANSIfication. X-Git-Tag: 2.0~20 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=53b0325a55580913f5b5b3a307fcae3c01fecc6b;p=morse-classic.git Second stage ANSIfication. --- diff --git a/morse.c b/morse.c index f11ff51..29c0648 100644 --- a/morse.c +++ b/morse.c @@ -861,7 +861,7 @@ extern time_t time (); return (totalmisscount > 0); } -void +static void new_words_per_minute () { float wtick, ftick, tick; @@ -904,9 +904,8 @@ float wtick, ftick, tick; static int tryingagain = 0, slowpoke = 0; -void -dowords (c) - int c; +static void +dowords (int c) { static int wordc = 0; static char word[MAXWORDLEN+1]; @@ -1292,8 +1291,7 @@ int are_we_repeating; * Don't try to test the person DURING the call into morse! */ void -morse (c) - int c; +morse (int c) { if ((isalpha (c) && (code[tolower(c)] == NULL)) || ((code[(int) '%'] == NULL) && ((c == EOF) || (c == '\004')))) c = ' '; @@ -1409,9 +1407,8 @@ morse (c) /* * Don't try to test the person WHILE doing dots and dashes! */ -void -show (s) - char *s; +static void +show (char *s) { char c; @@ -1450,9 +1447,8 @@ char c; * that have a morse code associated with them * or ones for which isspace(c) is true. */ -void -testaddchar (c) - char c; +static void +testaddchar (char c) { testpointer = (testpointer + 1) % TESTBUFSZ; teststring[testpointer] = c; @@ -1477,9 +1473,8 @@ testaddchar (c) behindness++; } -void -youraddchar (c) - char c; +static void +youraddchar (char c) { yourpointer = (yourpointer + 1) % TESTBUFSZ; yourstring[yourpointer] = c; @@ -1496,11 +1491,11 @@ youraddchar (c) } } -void -pollyou () +static void +pollyou (void) { -int ii, num; -char *string; + int ii, num; + char *string; num = readterminal (&string); @@ -1508,8 +1503,8 @@ char *string; youraddchar (string[ii]); } -int -testterminal () +static int +testterminal (void) { int testinc, yourinc; int correctchar, yourchar, yourcharnocase; @@ -1813,8 +1808,8 @@ static int termopen = 0; static int oldflgs, newflgs; #endif -void -openterminal () +static void +openterminal (void) { /* get parameters and open terminal */