diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-10-06 10:27:17 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-10-06 10:27:17 +0000 |
commit | dc7a1c0287185201962596e8d86ebf149649d565 (patch) | |
tree | f0c98a34053c6ebd58e57fc6a31a2a69b2a685f5 /handy.h | |
parent | 7fddd94457983d86b562b409f0a846c0a764f8d7 (diff) | |
download | perl-dc7a1c0287185201962596e8d86ebf149649d565.tar.gz |
Optimise the logic in isPRINT(), possible following Jarkko's bugfix
of change 10855. (to the implementation added in change 18)
Nothing that a decent compiler optimiser would have missed.
p4raw-id: //depot/perl@32041
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -443,7 +443,7 @@ Converts the specified character to lowercase. # define isASCII(c) ((c) <= 127) # define isCNTRL(c) ((c) < ' ' || (c) == 127) # define isGRAPH(c) (isALNUM(c) || isPUNCT(c)) -# define isPRINT(c) (((c) > 32 && (c) < 127) || (c) == ' ') +# define isPRINT(c) (((c) >= 32 && (c) < 127)) # define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126)) # define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) # define toUPPER(c) (isLOWER(c) ? (c) - ('a' - 'A') : (c)) |