sbase

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

commit b8c9a883718bad8e428eaae60cd57fabe21f967f
parent 7e7d15b7a5a97674194d6c0e3b6f0548bd59af30
Author: FRIGN <dev@frign.de>
Date:   Fri, 20 Mar 2015 16:37:29 +0100

Reorder variables in seq(1)

Diffstat:
Mseq.c | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/seq.c b/seq.c @@ -8,8 +8,8 @@ static int digitsleft(const char *d) { - char *exp; int shift; + char *exp; if (*d == '+') d++; @@ -22,8 +22,8 @@ digitsleft(const char *d) static int digitsright(const char *d) { - char *exp; int shift, after; + char *exp; exp = strpbrk(d, "eE"); shift = exp ? estrtonum(&exp[1], INT_MIN, INT_MAX) : 0; @@ -79,11 +79,10 @@ usage(void) int main(int argc, char *argv[]) { - const char *starts = "1", *steps = "1", *ends = "1", *sep = "\n"; - int wflag = 0; - char *tmp, ftmp[BUFSIZ], *fmt = ftmp; double start, step, end, out, dir; - int left, right; + int wflag = 0, left, right; + char *tmp, ftmp[BUFSIZ], *fmt = ftmp; + const char *starts = "1", *steps = "1", *ends = "1", *sep = "\n"; ARGBEGIN { case 'f':