sbase

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

commit b66c44b24e5fc55d9d9ddd1bdac5920ad4c2f944
parent fd562481f3ca0b7cd9b4af69bdb6b232a3011f35
Author: sin <sin@2f30.org>
Date:   Fri, 30 Jan 2015 16:45:44 +0000

ARGNUMF() only works on base 10 as it uses strtonum underneath

Diffstat:
Marg.h | 2+-
Mfold.c | 2+-
Mhead.c | 2+-
Mtail.c | 2+-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arg.h b/arg.h @@ -46,7 +46,7 @@ extern char *argv0; #define ARGC() argc_ -#define ARGNUMF(base) (brk_ = 1, estrtonum(argv[0], 0, INT_MAX)) +#define ARGNUMF() (brk_ = 1, estrtonum(argv[0], 0, INT_MAX)) #define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ ((x), abort(), (char *)0) :\ diff --git a/fold.c b/fold.c @@ -87,7 +87,7 @@ main(int argc, char *argv[]) width = estrtonum(EARGF(usage()), 1, LLONG_MAX); break; ARGNUM: - width = ARGNUMF(10); + width = ARGNUMF(); break; default: usage(); diff --git a/head.c b/head.c @@ -44,7 +44,7 @@ main(int argc, char *argv[]) n = estrtonum(EARGF(usage()), 0, LONG_MAX); break; ARGNUM: - n = ARGNUMF(0); + n = ARGNUMF(); break; default: usage(); diff --git a/tail.c b/tail.c @@ -35,7 +35,7 @@ main(int argc, char *argv[]) tail = dropinit; break; ARGNUM: - n = ARGNUMF(0); + n = ARGNUMF(); break; default: usage();