From: Miloš Mulač Date: Thu, 9 Mar 2006 10:58:19 +0000 (+0000) Subject: accepr short options hist/cont + usage X-Git-Tag: glite-jp-index_R_1_2_0~5 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=a5aecd2bd11563085238561c2bc683170be5b8f0;p=jra1mw.git accepr short options hist/cont + usage --- diff --git a/org.glite.jp.index/src/conf.c b/org.glite.jp.index/src/conf.c index 3bed992..cf38f18 100644 --- a/org.glite.jp.index/src/conf.c +++ b/org.glite.jp.index/src/conf.c @@ -154,14 +154,18 @@ int glite_jp_get_conf(int argc, char **argv, char *config_file, glite_jp_is_conf conf->feeds[0]->history = 1; conf->feeds[0]->continuous = 1; } - else if (qt && !strcmp(qt,"continuous")) { + else if ( qt && (!strcmp(qt,"continuous") || !strcmp(qt,"cont")) ) { conf->feeds[0]->history = 0; conf->feeds[0]->continuous = 1; } - else { + else if ( qt && (!strcmp(qt,"history") || !strcmp(qt,"hist")) ) { conf->feeds[0]->history = 1; conf->feeds[0]->continuous = 0; } + else { + usage(argv[0]); + exit(0); + } conf->feeds[1] = NULL;