Discussion:
two more patches
(too old to reply)
Andreas Barth
2006-04-17 09:01:43 UTC
Permalink
Hi,

I got these two patches.

One is that pvftowav gives debugging output. This patch just silents
pvftowav, ut a debug switch would be better of course:
--- mgetty-1.1.33.orig/voice/libpvf/wav.c 2005-03-13 12:40:10.000000000 +0100
+++ mgetty-1.1.33/voice/libpvf/wav.c 2006-04-16 22:36:48.991709176 +0200
@@ -341,12 +341,14 @@
wllong(ft, data_length); /* data chunk size: FIXUP(40) */


+/*
fprintf(stderr, "Writing Wave file: %s format, %d channel%s, %ld samp/sec",
wav_format_str(wFormatTag), wChannels,
wChannels == 1 ? "" : "s", wSamplesPerSecond);
fprintf(stderr, " %ld byte/sec, %d block align, %d bits/samp\n",
wAvgBytesPerSec, wBlockAlign, wBitsPerSample);
-
+*/
+
return OK;
}


The other "bug" is that mgetty doesn't build on GNU/kFreeBSD - I don't
mind too much, but well ...
--- mgetty-1.1.33.old/logfile.c 2005-11-09 10:26:41.000000000 +0100
+++ mgetty-1.1.33.new/logfile.c 2005-11-09 10:32:35.000000000 +0100
@@ -25,7 +25,7 @@
#include <syslog.h>

#if !defined(linux) && !defined(BSD) && !defined(_SCO_DS) && \
- !defined(SVR42) && !defined(solaris2) && !defined(_AIX)
+ !defined(SVR42) && !defined(solaris2) && !defined(_AIX) && !defined(__GLIBC__)
int openlog _PROTO(( char *, int, int ));
int syslog _PROTO(( int, char *, ... ));
#endif
--- mgetty-1.1.33.old/mgetty.h 2005-11-09 10:26:41.000000000 +0100
+++ mgetty-1.1.33.new/mgetty.h 2005-11-09 10:28:50.000000000 +0100
@@ -313,7 +313,7 @@
extern char * mktemp _PROTO(( char * template ));

#if !defined(linux) && !defined(SVR4) && !defined(__hpux) && \
- !defined(BSD) && !defined(M_UNIX) && !defined(_AIX)
+ !defined(BSD) && !defined(M_UNIX) && !defined(_AIX) && !defined(__GLIBC__)
extern int getopt _PROTO(( int, char **, char * ));
#endif
extern int optind;
--- mgetty-1.1.33.old/tio.c 2005-11-09 10:26:41.000000000 +0100
+++ mgetty-1.1.33.new/tio.c 2005-11-09 10:34:02.000000000 +0100
@@ -45,7 +45,7 @@

/* some systems do not define all flags needed later, e.g. NetBSD */

-#ifdef BSD
+#if defined(BSD) || defined(__FreeBSD_kernel__)
# ifndef IUCLC
# define IUCLC 0
# endif
--- mgetty-1.1.33.old/tio.h 2005-11-09 10:26:41.000000000 +0100
+++ mgetty-1.1.33.new/tio.h 2005-11-09 10:31:10.000000000 +0100
@@ -18,7 +18,7 @@
#if !defined( POSIX_TERMIOS ) && !defined( BSD_SGTTY ) && !defined( SYSV_TERMIO)
# if defined(linux) || defined(sunos4) || defined(_AIX) || defined(BSD) || \
defined(SVR4) || defined(solaris2) || defined(m88k) || defined(M_UNIX) ||\
- defined(__sgi)
+ defined(__sgi) || defined(__GLIBC__)
# define POSIX_TERMIOS
# else
# define SYSV_TERMIO



Cheers,
Andi
--
http://home.arcor.de/andreas-barth/

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Juergen Kosel
2006-04-19 16:09:32 UTC
Permalink
Hello,
Post by Andreas Barth
Hi,
I got these two patches.
One is that pvftowav gives debugging output. This patch just silents
--- mgetty-1.1.33.orig/voice/libpvf/wav.c 2005-03-13 12:40:10.000000000 +0100
+++ mgetty-1.1.33/voice/libpvf/wav.c 2006-04-16 22:36:48.991709176 +0200
@@ -341,12 +341,14 @@
wllong(ft, data_length); /* data chunk size: FIXUP(40) */
+/*
fprintf(stderr, "Writing Wave file: %s format, %d channel%s, %ld samp/sec",
wav_format_str(wFormatTag), wChannels,
wChannels == 1 ? "" : "s", wSamplesPerSecond);
fprintf(stderr, " %ld byte/sec, %d block align, %d bits/samp\n",
wAvgBytesPerSec, wBlockAlign, wBitsPerSample);
-
+*/
+
return OK;
}
if someone feels disturbed by the above outputs to stderr, (s)he could
redirect stderr to /dev/null.
But with the above patch, people who want to know what happend with
their voice files, would miss information.
(At least if they can't use file, because pvftowav wrote to a pipe.)


Greetings
Juergen
--
Homepage: http://people.freenet.de/Juergen-Kosel/
PGP-Key : http://people.freenet.de/Juergen-Kosel/passwd.pgp
Andreas Barth
2006-04-19 16:22:16 UTC
Permalink
Post by Juergen Kosel
Post by Andreas Barth
I got these two patches.
One is that pvftowav gives debugging output. This patch just silents
--- mgetty-1.1.33.orig/voice/libpvf/wav.c 2005-03-13
12:40:10.000000000 +0100
+++ mgetty-1.1.33/voice/libpvf/wav.c 2006-04-16 22:36:48.991709176 +0200
@@ -341,12 +341,14 @@
wllong(ft, data_length); /* data chunk size: FIXUP(40) */
+/*
fprintf(stderr, "Writing Wave file: %s format, %d channel%s, %ld samp/sec",
wav_format_str(wFormatTag), wChannels,
wChannels == 1 ? "" : "s", wSamplesPerSecond);
fprintf(stderr, " %ld byte/sec, %d block align, %d bits/samp\n",
wAvgBytesPerSec, wBlockAlign, wBitsPerSample);
-
+*/
+
return OK;
}
if someone feels disturbed by the above outputs to stderr, (s)he could
redirect stderr to /dev/null.
But with the above patch, people who want to know what happend with
their voice files, would miss information.
(At least if they can't use file, because pvftowav wrote to a pipe.)
You could argue the same for the other pvfto*-commands as well. I would
consider it worth to add verbose switches to all of them - but I still
consider it better to silent all of them instead having output with
exactly one.


Cheers,
Andi
--
http://home.arcor.de/andreas-barth/

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...