[hackers] [sbase] tail: Skip leading spaces in tail -n " +20" || sin

From: <git_AT_suckless.org>
Date: Mon, 9 Feb 2015 17:12:35 +0100 (CET)

commit ae7313c9d6a0dcb7d3578c33029a3c1d439501d3
Author: sin <sin_AT_2f30.org>
Date: Mon Feb 9 16:10:00 2015 +0000

    tail: Skip leading spaces in tail -n " +20"

diff --git a/tail.c b/tail.c
index 2265bac..984de9c 100644
--- a/tail.c
+++ b/tail.c
_AT_@ -75,7 +75,7 @@ main(int argc, char *argv[])
         case 'n':
                 lines = EARGF(usage());
                 n = MIN(llabs(estrtonum(lines, LLONG_MIN + 1, MIN(LLONG_MAX, SIZE_MAX))), SIZE_MAX);
- if (lines[0] == '+')
+ if (strchr(lines, '+'))
                         tail = dropinit;
                 break;
         ARGNUM:
Received on Mon Feb 09 2015 - 17:12:35 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 09 2015 - 17:24:13 CET