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
main(int argc, char *argv[])
{
gint i, j;
/* options */
gboolean verbose = FALSE;
gboolean no_fault = FALSE;
@ -215,6 +216,24 @@ main(int argc, char *argv[])
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)
fault_setup();