[xiph-commits] r15069 - in trunk/vorbis-tools: oggdec oggenc
ivo at svn.xiph.org
ivo at svn.xiph.org
Tue Jun 24 19:23:19 PDT 2008
Author: ivo
Date: 2008-06-24 19:23:18 -0700 (Tue, 24 Jun 2008)
New Revision: 15069
Modified:
trunk/vorbis-tools/oggdec/oggdec.c
trunk/vorbis-tools/oggenc/oggenc.c
Log:
Patches by Benno Schulenberg:
* internationalize the version string of oggenc
* correctness: make oggdec output help text on stdout instead of stderr
Modified: trunk/vorbis-tools/oggdec/oggdec.c
===================================================================
--- trunk/vorbis-tools/oggdec/oggdec.c 2008-06-25 02:05:46 UTC (rev 15068)
+++ trunk/vorbis-tools/oggdec/oggdec.c 2008-06-25 02:23:18 UTC (rev 15069)
@@ -47,30 +47,29 @@
char *outfilename = NULL;
static void version (void) {
- fprintf(stderr, _("oggdec from %s %s\n"), PACKAGE, VERSION);
+ fprintf(stdout, _("oggdec from %s %s\n"), PACKAGE, VERSION);
}
static void usage(void)
{
version ();
- fprintf(stderr, _(" by the Xiph.Org Foundation (http://www.xiph.org/)\n\n"));
- fprintf(stderr, _("Usage: oggdec [options] file1.ogg [file2.ogg ... fileN.ogg]\n\n"));
- fprintf(stderr, _("Supported options:\n"));
- fprintf(stderr, _(" --quiet, -Q Quiet mode. No console output.\n"));
- fprintf(stderr, _(" --help, -h Produce this help message.\n"));
- fprintf(stderr, _(" --version, -v Print out version number.\n"));
- fprintf(stderr, _(" --bits, -b Bit depth for output (8 and 16 supported)\n"));
- fprintf(stderr, _(" --endianness, -e Output endianness for 16-bit output; 0 for\n"
- " little endian (default), 1 for big endian.\n"));
- fprintf(stderr, _(" --sign, -s Sign for output PCM; 0 for unsigned, 1 for\n"
- " signed (default 1).\n"));
- fprintf(stderr, _(" --raw, -R Raw (headerless) output.\n"));
- fprintf(stderr, _(" --output, -o Output to given filename. May only be used\n"
+ fprintf(stdout, _(" by the Xiph.Org Foundation (http://www.xiph.org/)\n\n"));
+ fprintf(stdout, _("Usage: oggdec [options] file1.ogg [file2.ogg ... fileN.ogg]\n\n"));
+ fprintf(stdout, _("Supported options:\n"));
+ fprintf(stdout, _(" --quiet, -Q Quiet mode. No console output.\n"));
+ fprintf(stdout, _(" --help, -h Produce this help message.\n"));
+ fprintf(stdout, _(" --version, -v Print out version number.\n"));
+ fprintf(stdout, _(" --bits, -b Bit depth for output (8 and 16 supported)\n"));
+ fprintf(stdout, _(" --endianness, -e Output endianness for 16-bit output; 0 for\n"
+ " little endian (default), 1 for big endian.\n"));
+ fprintf(stdout, _(" --sign, -s Sign for output PCM; 0 for unsigned, 1 for\n"
+ " signed (default 1).\n"));
+ fprintf(stdout, _(" --raw, -R Raw (headerless) output.\n"));
+ fprintf(stdout, _(" --output, -o Output to given filename. May only be used\n"
" if there is only one input file, except in\n"
" raw mode.\n"));
}
-
static void parse_options(int argc, char **argv)
{
int option_index = 1;
Modified: trunk/vorbis-tools/oggenc/oggenc.c
===================================================================
--- trunk/vorbis-tools/oggenc/oggenc.c 2008-06-25 02:05:46 UTC (rev 15068)
+++ trunk/vorbis-tools/oggenc/oggenc.c 2008-06-25 02:23:18 UTC (rev 15069)
@@ -28,10 +28,6 @@
#include "utf8.h"
#include "i18n.h"
-
-#define VERSION_STRING "oggenc from vorbis-tools " VERSION " \n"
-#define COPYRIGHT "(c) 2000-2005 Michael Smith <msmith at xiph.org>\n"
-
#define CHUNK 4096 /* We do reads, etc. in multiples of this */
struct option long_options[] = {
@@ -101,7 +97,7 @@
if(optind >= argc)
{
- fprintf(stderr, _("%s%s\nERROR: No input files specified. Use -h for help.\n"), VERSION_STRING, COPYRIGHT);
+ fprintf(stderr, _("ERROR: No input files specified. Use -h for help.\n"));
return 1;
}
else
@@ -396,12 +392,10 @@
static void usage(void)
{
- fprintf(stdout, _(
- "%s%s\n"
- "Usage: oggenc [options] inputfile [...]\n"
- "\n"), VERSION_STRING, COPYRIGHT);
- fprintf(stdout, _(
- "OPTIONS:\n"
+ fprintf(stdout, _("oggenc from %s %s"), PACKAGE, VERSION);
+ fprintf(stdout, _(" by the Xiph.Org Foundation (http://www.xiph.org/)\n\n"));
+ fprintf(stdout, _("Usage: oggenc [options] inputfile [...]\n\n"));
+ fprintf(stdout, _("OPTIONS:\n"
" General:\n"
" -Q, --quiet Produce no output to stderr\n"
" -h, --help Print this help text\n"
@@ -829,7 +823,7 @@
opt->rawmode = 1;
break;
case 'v':
- fprintf(stdout, VERSION_STRING);
+ fprintf(stdout, _("oggenc from %s %s\n"), PACKAGE, VERSION);
exit(0);
break;
case 'B':
More information about the commits
mailing list