1 /* vi: set sw=4 ts=4: */
3 * seq implementation for busybox
5 * Copyright (C) 2004, Glenn McGrath
7 * Licensed under the GPL v2, see the file LICENSE in this tarball.
14 int seq_main(int argc, char **argv);
15 int seq_main(int argc, char **argv)
17 double last, first, increment, i;
19 first = increment = 1;
22 increment = atof(argv[2]);
24 first = atof(argv[1]);
26 last = atof(argv[argc-1]);
32 /* You should note that this is pos-5.0.91 semantics, -- FK. */
34 (increment > 0 && i <= last) || (increment < 0 && i >=last);