diff -ur multimon.orig/demod_dtmf.c multimon/demod_dtmf.c --- multimon.orig/demod_dtmf.c Mon Dec 8 10:56:06 1997 +++ multimon/demod_dtmf.c Fri Sep 10 03:27:30 1999 @@ -25,6 +25,7 @@ #include "filter.h" #include #include +#include /* ---------------------------------------------------------------------- */ @@ -137,6 +138,7 @@ i = process_block(s); if (i != s->l1.dtmf.lastch && i >= 0) verbprintf(0, "DTMF: %c\n", dtmf_transl[i]); + fflush(stdout); s->l1.dtmf.lastch = i; } } diff -ur multimon.orig/gen.c multimon/gen.c --- multimon.orig/gen.c Mon Dec 8 10:56:06 1997 +++ multimon/gen.c Fri Sep 10 03:38:12 1999 @@ -367,7 +367,7 @@ " -s : encode sine\n" " -p : encode hdlc packet\n"; -void main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int c; int errflg = 0; diff -ur multimon.orig/unixinput.c multimon/unixinput.c --- multimon.orig/unixinput.c Mon Dec 8 10:56:06 1997 +++ multimon/unixinput.c Fri Sep 10 03:41:43 1999 @@ -370,12 +370,14 @@ "(C) 1996 by Thomas Sailer HB9JNX/AE4WA\n" " -t : input file type (any other type than raw requires sox)\n" " -a : add demodulator\n" -" -s : subtract demodulator\n"; +" -s : subtract demodulator\n" +" -q : quiet output messages\n"; int main(int argc, char *argv[]) { int c; int errflg = 0; + int quiet = 0; int i; char **itype; int mask_first = 1; @@ -383,16 +385,15 @@ unsigned int overlap = 0; char *input_type = "hw"; - fprintf(stdout, "multimod (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA\n" - "available demodulators:"); - for (i = 0; i < NUMDEMOD; i++) - fprintf(stdout, " %s", dem[i]->name); - fprintf(stdout, "\n"); - while ((c = getopt(argc, argv, "t:a:s:v:")) != EOF) { + while ((c = getopt(argc, argv, "t:a:s:v:q")) != EOF) { switch (c) { case '?': errflg++; break; + + case 'q': + quiet++; + break; case 'v': verbose_level = strtoul(optarg, 0, 0); @@ -445,17 +446,33 @@ } } + + if (!quiet) + { + fprintf (stdout, "multimod (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA\n" + "available demodulators:"); + for (i = 0; i < NUMDEMOD; i++) + fprintf (stdout, " %s", dem[i]->name); + fprintf (stdout, "\n"); + } + if (errflg) { (void)fprintf(stderr, usage_str); exit(2); } if (mask_first) memset(dem_mask, 0xff, sizeof(dem_mask)); + if (!quiet) + { + fprintf (stdout, "Enabled demodulators:"); + } - fprintf(stdout, "Enabled demodulators:"); for (i = 0; i < NUMDEMOD; i++) if (MASK_ISSET(i)) { - fprintf(stdout, " %s", dem[i]->name); + if (!quiet) + { + fprintf (stdout, " %s", dem[i]->name); + } memset(dem_st+i, 0, sizeof(dem_st[i])); dem_st[i].dem_par = dem[i]; if (dem[i]->init) @@ -463,16 +480,24 @@ if (sample_rate == -1) sample_rate = dem[i]->samplerate; else if (sample_rate != dem[i]->samplerate) { - fprintf(stdout, "\n"); - fprintf(stderr, "Error: Current sampling rate %d, " - " demodulator \"%s\" requires %d\n", - sample_rate, dem[i]->name, dem[i]->samplerate); - exit(3); - } + + if (!quiet) + { + fprintf (stdout, "\n"); + fprintf (stderr, "Error: Current sampling rate %d, " + " demodulator \"%s\" requires %d\n", + sample_rate, dem[i]->name, dem[i]->samplerate); + } + + exit(3); + } if (dem[i]->overlap > overlap) overlap = dem[i]->overlap; } - fprintf(stdout, "\n"); + if (!quiet) + { + fprintf (stdout, "\n"); + } if (!strcmp(input_type, "hw")) { if ((argc - optind) >= 1)