work around popt bug

Original commit message from CVS:
work around popt bug
This commit is contained in:
Benjamin Otte 2003-04-04 20:33:05 +00:00
parent 6ddd676a02
commit c56b13bd2b

View file

@ -182,6 +182,7 @@ fault_setup (void)
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
gint i, j;
/* options */ /* options */
gboolean verbose = FALSE; gboolean verbose = FALSE;
gboolean no_fault = FALSE; gboolean no_fault = FALSE;
@ -215,6 +216,24 @@ main(int argc, char *argv[])
gst_init_with_popt_table (&argc, &argv, options); gst_init_with_popt_table (&argc, &argv, options);
/* FIXpopt: strip short args, too. We do it ourselves for now */
j = 1;
for (i = 1; i < argc; i++) {
if (*(argv[i]) == '-') {
if (strlen (argv[i]) == 2) {
gchar *c = argv[i];
c++;
if (*c == 'X' || *c == 'o') {
i++;
}
}
} else {
argv[j] = argv[i];
j++;
}
}
argc = j;
if (!no_fault) if (!no_fault)
fault_setup(); fault_setup();