Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: use islower for parsing directives
details: https://anonhg.NetBSD.org/src/rev/9d91ca6493de
branches: trunk
changeset: 359659:9d91ca6493de
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jan 15 19:13:08 2022 +0000
description:
make: use islower for parsing directives
None of the directives has an uppercase letter, so there is no need to
test for it.
No functional change.
diffstat:
usr.bin/make/make.h | 4 +++-
usr.bin/make/parse.c | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r ef9dd89c8a30 -r 9d91ca6493de usr.bin/make/make.h
--- a/usr.bin/make/make.h Sat Jan 15 19:05:23 2022 +0000
+++ b/usr.bin/make/make.h Sat Jan 15 19:13:08 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.288 2022/01/09 18:59:27 rillig Exp $ */
+/* $NetBSD: make.h,v 1.289 2022/01/15 19:13:08 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -874,6 +874,8 @@
MAKE_INLINE bool MAKE_ATTR_USE
ch_isdigit(char ch) { return isdigit((unsigned char)ch) != 0; }
MAKE_INLINE bool MAKE_ATTR_USE
+ch_islower(char ch) { return islower((unsigned char)ch) != 0; }
+MAKE_INLINE bool MAKE_ATTR_USE
ch_isspace(char ch) { return isspace((unsigned char)ch) != 0; }
MAKE_INLINE bool MAKE_ATTR_USE
ch_isupper(char ch) { return isupper((unsigned char)ch) != 0; }
diff -r ef9dd89c8a30 -r 9d91ca6493de usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Sat Jan 15 19:05:23 2022 +0000
+++ b/usr.bin/make/parse.c Sat Jan 15 19:13:08 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.650 2022/01/15 18:34:41 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.651 2022/01/15 19:13:08 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.650 2022/01/15 18:34:41 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.651 2022/01/15 19:13:08 rillig Exp $");
/*
* A file being read.
@@ -2636,7 +2636,7 @@
}
dir.start = cp;
- while (ch_isalpha(*cp) || *cp == '-')
+ while (ch_islower(*cp) || *cp == '-')
cp++;
dir.end = cp;
Home |
Main Index |
Thread Index |
Old Index