summary refs log tree commit diff
path: root/bin/1sh
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-03-09 04:28:45 -0400
committerJune McEnroe <june@causal.agency>2020-03-09 20:01:30 -0400
commit62e90f9a29b68d462861ce10ec4cb23a1e3b3ffa (patch)
treeba5e02cb22ba85b17b5ced9f7cd309e3660200f6 /bin/1sh
parentReplace 1sh Makefile (diff)
downloadsrc-62e90f9a29b68d462861ce10ec4cb23a1e3b3ffa.tar.gz
src-62e90f9a29b68d462861ce10ec4cb23a1e3b3ffa.zip
Replace sys_nsig with NSIG
Diffstat (limited to 'bin/1sh')
-rw-r--r--bin/1sh/kill.c8
-rw-r--r--bin/1sh/trap.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/bin/1sh/kill.c b/bin/1sh/kill.c
index c176b5e5..ab36126d 100644
--- a/bin/1sh/kill.c
+++ b/bin/1sh/kill.c
@@ -91,7 +91,7 @@ main(int argc, char *argv[])
 				errx(2, "illegal signal number: %s", *argv);
 			if (numsig >= 128)
 				numsig -= 128;
-			if (numsig <= 0 || numsig >= sys_nsig)
+			if (numsig <= 0 || numsig >= NSIG)
 				nosig(*argv);
 			printf("%s\n", sys_signame[numsig]);
 			return (0);
@@ -164,7 +164,7 @@ signame_to_signum(const char *sig)
 
 	if (strncasecmp(sig, "SIG", 3) == 0)
 		sig += 3;
-	for (n = 1; n < sys_nsig; n++) {
+	for (n = 1; n < NSIG; n++) {
 		if (!strcasecmp(sys_signame[n], sig))
 			return (n);
 	}
@@ -189,9 +189,9 @@ printsignals(FILE *fp)
 {
 	int n;
 
-	for (n = 1; n < sys_nsig; n++) {
+	for (n = 1; n < NSIG; n++) {
 		(void)fprintf(fp, "%s", sys_signame[n]);
-		if (n == (sys_nsig / 2) || n == (sys_nsig - 1))
+		if (n == (NSIG / 2) || n == (NSIG - 1))
 			(void)fprintf(fp, "\n");
 		else
 			(void)fprintf(fp, " ");
diff --git a/bin/1sh/trap.c b/bin/1sh/trap.c
index 1622a319..7025fe3b 100644
--- a/bin/1sh/trap.c
+++ b/bin/1sh/trap.c
@@ -111,7 +111,7 @@ sigstring_to_signum(char *sig)
 
 		if (strncasecmp(sig, "SIG", 3) == 0)
 			sig += 3;
-		for (n = 1; n < sys_nsig; n++)
+		for (n = 1; n < NSIG; n++)
 			if (sys_signame[n] &&
 			    strcasecmp(sys_signame[n], sig) == 0)
 				return (n);
@@ -129,7 +129,7 @@ printsignals(void)
 	int n, outlen;
 
 	outlen = 0;
-	for (n = 1; n < sys_nsig; n++) {
+	for (n = 1; n < NSIG; n++) {
 		if (sys_signame[n]) {
 			out1fmt("%s", sys_signame[n]);
 			outlen += strlen(sys_signame[n]);
@@ -138,7 +138,7 @@ printsignals(void)
 			outlen += 3;	/* good enough */
 		}
 		++outlen;
-		if (outlen > 71 || n == sys_nsig - 1) {
+		if (outlen > 71 || n == NSIG - 1) {
 			out1str("\n");
 			outlen = 0;
 		} else {
@@ -169,7 +169,7 @@ trapcmd(int argc __unused, char **argv)
 	argv = argptr;
 
 	if (*argv == NULL) {
-		for (signo = 0 ; signo < sys_nsig ; signo++) {
+		for (signo = 0 ; signo < NSIG ; signo++) {
 			if (signo < NSIG && trap[signo] != NULL) {
 				out1str("trap -- ");
 				out1qstr(trap[signo]);