sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 434c586926ae7aa1c8304de5edc719c8836ea829
parent 9156a6940b2353f940e4f1c1ea85e17cc25542f7
Author: sin <sin@2f30.org>
Date:   Tue Apr 21 17:08:14 +0100

expr: Don't interpret any arguments

expr -1 '<' 1 failed previously.

There is no need to have usage at all, any errors will be flagged
up as necessary further down.

Diffstat:
expr.c | 12+-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/expr.c b/expr.c @@ -252,22 +252,12 @@ parse(char *expr[], int numexpr) return (valp->str && *valp->str) || valp->num; } -static void -usage(void) -{ - enprintf(3, "usage: %s expression\n", argv0); -} - int main(int argc, char *argv[]) { int ret; - ARGBEGIN { - default: - usage(); - } ARGEND; - + argv0 = argv[0], argc--, argv++; ret = !parse(argv, argc); enfshut(3, stdout, "<stdout>");