]> thyrsus.com Git - morse-classic.git/commitdiff
ANSIfy the code.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 24 Jan 2005 19:40:56 +0000 (19:40 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 24 Jan 2005 19:40:56 +0000 (19:40 +0000)
qso/QSO.c
qso/make_fre.c
qso/put_form.c
qso/util.c

index 0ab534fd3ef1eabc30e408f1bb6ab9f1b3c43bd4..764d53adbbe8b9eedefbdab5ba5c9b421cfcc804 100644 (file)
--- a/qso/QSO.c
+++ b/qso/QSO.c
 
 
 #include <sys/types.h>
-/*
-#include <sys/time.h>
- */
 #include <time.h>
 
-char *A_Or_An ();
-
-int License_Seed ();
+char *A_Or_An (char *);
+char *Choose (char *Words[], int Number);
+int License_Seed (void);
 
 int their_age;                 /* PERSON'S AGE, SO THEY AREN'T LICENSED MORE
                                  * THAN THEIR AGE */
 
-
 extern char *Transceiver[];
 extern char *Antenna[];
 extern char *UpFeet[];
@@ -173,7 +169,6 @@ char *FrqCallmisc[] =
     0
 };
 
-char *Choose ();
 int NCALLMISC;
 int NNUMMISC;
 int NMISC;
@@ -187,13 +182,13 @@ int NRST;
   */
 
 void
-PutMisc ()
+PutMisc (void)
 {
     printf ("%s\n", Choose (Miscellaneous, NMISC));
 }
 
 void
-PutThanks ()
+PutThanks (void)
 {
     switch (Roll (6))
       {
@@ -220,7 +215,7 @@ PutThanks ()
 }
 
 void
-PutName ()
+PutName (void)
 {
     switch (Roll (6))
       {
@@ -243,7 +238,7 @@ PutName ()
 }
 
 void
-PutJob ()
+PutJob (void)
 {
     switch (Roll (20))
       {
@@ -273,7 +268,7 @@ PutJob ()
 }
 
 void
-PutAge ()
+PutAge (void)
 {
 
     their_age = Roll (60) + 16;
@@ -295,7 +290,7 @@ PutAge ()
 }
 
 void
-PutLicense ()
+PutLicense (void)
 {
 int get_years_licence;
 
@@ -348,13 +343,13 @@ int get_years_licence;
 }
 
 void
-PutTemperature ()
+PutTemperature (void)
 {
     printf ("Temperature is %d.\n", Roll (80) + 10);
 }
 
 void
-PutWeather1 ()
+PutWeather1 (void)
 {
     switch (Roll (17))
       {
@@ -427,7 +422,7 @@ PutWeather1 ()
 }
 
 void
-PutWeather2 ()
+PutWeather2 (void)
 {
 
     switch (Roll (10))
@@ -477,7 +472,7 @@ PutWeather2 ()
 }
 
 void
-PutWeather ()
+PutWeather (void)
 {
     switch (Roll (4))
       {
@@ -492,7 +487,7 @@ PutWeather ()
 }
 
 void
-PutCityState ()
+PutCityState (void)
 {
     switch (Roll (6))
       {
@@ -513,7 +508,7 @@ PutCityState ()
 }
 
 void
-PutLocation ()
+PutLocation (void)
 {
 
     switch (Roll (5))
@@ -535,7 +530,7 @@ PutLocation ()
 }
 
 void
-PutRig ()
+PutRig (void)
 
 {
     switch (Roll (19))
@@ -632,7 +627,7 @@ PutRig ()
 }
 
 void
-PutRST ()
+PutRST (void)
 {
 register char *TheRST;
 
@@ -676,7 +671,7 @@ register char *TheRST;
 
 
 void
-PutQ_And_Freq ()
+PutQ_And_Freq (void)
 {
     switch (Roll (8))
       {
@@ -711,7 +706,7 @@ PutQ_And_Freq ()
 }
 
 void
-PutFirstCallsign ()
+PutFirstCallsign (void)
 {
     Sender = Choose (CallSign, NCALLSIGN);
     Receiver = Choose (CallSign, NCALLSIGN);
@@ -719,12 +714,12 @@ PutFirstCallsign ()
 }
 
 void
-PutLastCallsign ()
+PutLastCallsign (void)
 {
     printf ("%s de %s\n", Receiver, Sender);
 }
 
-main ()
+main (int argc, char **argv)
 {
 
     NXCVR = CountStrings (Transceiver);
index baa9c9395b362f25a7ce758f679b6cae69dd837d..412a463626e1bf5f290187b31de166a8e1e996d4 100644 (file)
@@ -5,7 +5,7 @@
 #define NUM_BAND 4
 
 int
-make_freq ()
+make_freq (void)
 {
     switch (Roll (NUM_BAND + 2))
       {
index 30faa4d82eba3281f5b57128a2d650dd7fec4d01..f38fc60397b8ab8af9d2cedb46dc39f5af4b52a0 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdio.h>
 
 void
-PutForm0 ()
+PutForm0 (void)
 {
     PutRST ();
     PutName ();
@@ -17,7 +17,7 @@ PutForm0 ()
 }
 
 void
-PutForm1 ()
+PutForm1 (void)
 {
     PutLocation ();
     PutRST ();
@@ -33,7 +33,7 @@ PutForm1 ()
 }
 
 void
-PutForm2 ()
+PutForm2 (void)
 {
     PutThanks ();
     PutRST ();
@@ -48,7 +48,7 @@ PutForm2 ()
 }
 
 void
-PutForm3 ()
+PutForm3 (void)
 {
     PutLocation ();
     PutRST ();
@@ -66,7 +66,7 @@ PutForm3 ()
 }
 
 void
-PutForm4 ()
+PutForm4 (void)
 
 {
     PutThanks ();
@@ -84,7 +84,7 @@ PutForm4 ()
 }
 
 void
-PutForm5 ()
+PutForm5 (void)
 {
     PutLocation ();
     PutRST ();
@@ -99,7 +99,7 @@ PutForm5 ()
     PutQ_And_Freq ();
 }
 
-PutQSO ()
+PutQSO (void)
 {
     /*  printf("VVV VVV\n") ; */
     PutFirstCallsign ();
index 5b70b62b0ce134a2801cf87d257aeaef2510bb4a..4fde89ff2f6ece9148e3411932df799f6bbbb381 100644 (file)
@@ -6,8 +6,7 @@
 extern int their_age;
 
 int
-CountStrings (StringVector)
-     char *StringVector[];
+CountStrings (char *StringVector[])
      /*
       * Count the number of string values in the supplied vector
       * of pointers. Start with the first pointer and stop when
@@ -27,8 +26,7 @@ register int Count;
 }
 
 int
-Roll (Number)
-     int Number;
+Roll (int Number)
 {
 int new_tmp;
 double tmp_val;
@@ -41,7 +39,7 @@ double drand48 ();
 }
 
 int
-License_Seed ()
+License_Seed (void)
 {
     if (their_age > 20)
        return (20);
@@ -51,9 +49,7 @@ License_Seed ()
 }
 
 char *
-Choose (Words, Number)
-     char *Words[];
-     int Number;
+Choose (char *Words[], int Number)
 {
     return (Words[Roll (Number)]);
 }