X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Frepl.c;h=f6d32d30ca6ba6e891bb11e68105ef6ea048791c;hb=b28e871ba874a53257b37eed94adfc365ed6ebf2;hp=d7c09ac8be19336140aadacb13b9c68e488eb4e3;hpb=1e6e0b5cc1bd2d49ffcef4ea7bb1bb6c256d07b7;p=mmh diff --git a/uip/repl.c b/uip/repl.c index d7c09ac..f6d32d3 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -62,13 +62,13 @@ static struct swit switches[] = { #define VERSIONSW 25 { "version", 0 }, #define HELPSW 26 - { "help", 4 }, + { "help", 0 }, #define FILESW 27 - { "file file", -4 }, /* interface from msh */ + { "file file", 4 }, /* interface from msh */ #ifdef MHE #define BILDSW 28 - { "build", -5 }, /* interface from mhe */ + { "build", 5 }, /* interface from mhe */ #endif { NULL, 0 } @@ -108,9 +108,9 @@ static struct swit aqrl[] = { { NULL, 0 } }; -short ccto = 0; /* global for replsbr */ -short cccc = 0; -short ccme = 0; +short ccto = -1; /* global for replsbr */ +short cccc = -1; +short ccme = -1; short querysw = 0; short outputlinelen = OUTPUTLINELEN; @@ -177,11 +177,9 @@ main (int argc, char **argv) case GROUPSW: groupreply++; - ccto = cccc = ccme = 1; continue; case NGROUPSW: groupreply = 0; - ccto = cccc = ccme = 0; continue; case ANNOSW: @@ -325,6 +323,13 @@ main (int argc, char **argv) } } + if (ccto == -1) + ccto = groupreply; + if (cccc == -1) + cccc = groupreply; + if (ccme == -1) + ccme = groupreply; + cwd = getcpy (pwd ()); if (!context_find ("path"))