[hackers] [sbase][PATCH] seq: print first one separately

From: Mrlin <merlin_AT_nixnetmail.com>
Date: Tue, 6 Jul 2021 23:23:34 +0600

---
 seq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/seq.c b/seq.c
index 70763d1..60d001e 100644
--- a/seq.c
+++ b/seq.c
_AT_@ -136,9 +136,9 @@ main(int argc, char *argv[])
 		} else
 			snprintf(ftmp, sizeof ftmp, "%%.%df", right);
 	}
-	for (out = start; out * dir <= end * dir; out += step) {
-		if (out != start)
-			fputs(sep, stdout);
+	printf(fmt, start);
+	for (out = start+step; out * dir <= end * dir; out += step) {
+		fputs(sep, stdout);
 		printf(fmt, out);
 	}
 	putchar('\n');
-- 
2.31.1
Received on Tue Jul 06 2021 - 19:23:34 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 06 2021 - 19:36:33 CEST