ICU-5438 cleaner handling of default arguments.

X-SVN-Rev: 20826
This commit is contained in:
Eric Mader 2007-01-02 23:51:38 +00:00
parent 303c876958
commit 06068d951e

View File

@ -327,18 +327,17 @@ int main (int argc, char *argv[])
return 1;
}
const char *defaultArgs[] = {"Sample.txt", NULL};
const char **args = poptGetArgs(ptctx);
if (args == NULL) {
app = newSample("Sample.txt");
args = defaultArgs;
}
gtk_widget_show_all(app);
} else {
for (int i = 0; args[i] != NULL; i += 1) {
app = newSample(args[i]);
for (int i = 0; args[i] != NULL; i += 1) {
app = newSample(args[i]);
gtk_widget_show_all(app);
}
gtk_widget_show_all(app);
}
gtk_main();