sbase

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

commit 504855ff96389b02fd92197792a7b26069cde593
parent 0925bf95ac95ca3eafb2ed62dd514ee09bf79914
Author: sin <sin@2f30.org>
Date:   Tue, 21 Apr 2015 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:
Mexpr.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>");