Module Name: src
Committed By: jschauma
Date: Sun Feb 12 20:43:21 UTC 2023
Modified Files:
src/usr.bin/split: split.c
Log Message:
sort option blocks; no functional change
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/split/split.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/split/split.c
diff -u src/usr.bin/split/split.c:1.29 src/usr.bin/split/split.c:1.30
--- src/usr.bin/split/split.c:1.29 Mon Jan 30 15:22:02 2023
+++ src/usr.bin/split/split.c Sun Feb 12 20:43:21 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: split.c,v 1.29 2023/01/30 15:22:02 jschauma Exp $ */
+/* $NetBSD: split.c,v 1.30 2023/02/12 20:43:21 jschauma Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
#if 0
static char sccsid[] = "@(#)split.c 8.3 (Berkeley) 4/25/94";
#endif
-__RCSID("$NetBSD: split.c,v 1.29 2023/01/30 15:22:02 jschauma Exp $");
+__RCSID("$NetBSD: split.c,v 1.30 2023/02/12 20:43:21 jschauma Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -98,6 +98,13 @@ main(int argc, char *argv[])
errx(1, "%s: illegal line count.", p);
}
break;
+ case 'a': /* Suffix length. */
+ if (!isdigit((unsigned char)optarg[0]) ||
+ (sfxlen = (size_t)strtoul(optarg, &ep, 10)) == 0 ||
+ *ep != '\0')
+ errx(1, "%s: illegal suffix length.", optarg);
+ autosfx = 0;
+ break;
case 'b': /* Byte count. */
if (!isdigit((unsigned char)optarg[0]) ||
(bytecnt = strtoull(optarg, &ep, 10)) == 0 ||
@@ -116,13 +123,6 @@ main(int argc, char *argv[])
*ep != '\0')
errx(1, "%s: illegal line count.", optarg);
break;
- case 'a': /* Suffix length. */
- if (!isdigit((unsigned char)optarg[0]) ||
- (sfxlen = (size_t)strtoul(optarg, &ep, 10)) == 0 ||
- *ep != '\0')
- errx(1, "%s: illegal suffix length.", optarg);
- autosfx = 0;
- break;
case 'n': /* Chunks. */
if (!isdigit((unsigned char)optarg[0]) ||
(chunks = (size_t)strtoul(optarg, &ep, 10)) == 0 ||