]> thyrsus.com Git - morse-classic.git/commitdiff
Second stage ANSIfication.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 24 Jan 2005 15:06:23 +0000 (15:06 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 24 Jan 2005 15:06:23 +0000 (15:06 +0000)
morse.c

diff --git a/morse.c b/morse.c
index f11ff519746e7596b65da4557b6a010a6b8f9926..29c0648fe2ac3553a1b1aaaadf4e1e404ec7c024 100644 (file)
--- 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 */