accepr short options hist/cont + usage
authorMiloš Mulač <mulac@civ.zcu.cz>
Thu, 9 Mar 2006 10:58:19 +0000 (10:58 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Thu, 9 Mar 2006 10:58:19 +0000 (10:58 +0000)
org.glite.jp.index/src/conf.c

index 3bed992..cf38f18 100644 (file)
@@ -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;