From a5aecd2bd11563085238561c2bc683170be5b8f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Thu, 9 Mar 2006 10:58:19 +0000 Subject: [PATCH] accepr short options hist/cont + usage --- org.glite.jp.index/src/conf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 1.8.2.3