[xiph-cvs] cvs commit: vorbis-tools/oggenc oggenc.c
Michael Smith
msmith at xiph.org
Mon Jul 1 04:47:51 PDT 2002
msmith 02/07/01 04:47:51
Modified: oggenc oggenc.c
Log:
Rearrange some stuff (only allow long option for advanced encoder opts)
Revision Changes Path
1.61 +9 -11 vorbis-tools/oggenc/oggenc.c
Index: oggenc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/oggenc/oggenc.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- oggenc.c 2002/06/30 13:39:56 1.60
+++ oggenc.c 2002/07/01 11:47:50 1.61
@@ -58,7 +58,7 @@
{"managed", 0, 0, 0},
{"resample",1,0,0},
{"downmix", 0,0,0},
- {"advanced-encode-option", 1, 0, 'A'},
+ {"advanced-encode-option", 1, 0, 0},
{NULL,0,0,0}
};
@@ -581,21 +581,14 @@
else if(!strcmp(long_options[option_index].name, "downmix")) {
opt->downmix = 1;
}
- else {
- fprintf(stderr, _("Internal error parsing command line options\n"));
- exit(1);
- }
-
- break;
- case 'A':
- {
+ else if(!strcmp(long_options[option_index].name, "advanced-encode-option")) {
char *arg = strdup(optarg);
char *val;
val = strchr(arg, '=');
if(val == NULL) {
fprintf(stderr, _("No value for advanced encoder option found\n"));
- break;
+ continue;
}
else
*val++=0;
@@ -603,8 +596,13 @@
opt->advopt = realloc(opt->advopt, (++opt->advopt_count)*sizeof(adv_opt));
opt->advopt[opt->advopt_count - 1].arg = arg;
opt->advopt[opt->advopt_count - 1].val = val;
- break;
}
+ else {
+ fprintf(stderr, _("Internal error parsing command line options\n"));
+ exit(1);
+ }
+
+ break;
case 'a':
opt->artist = realloc(opt->artist, (++opt->artist_count)*sizeof(char *));
opt->artist[opt->artist_count - 1] = strdup(optarg);
<p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list