mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
updated for version 7.3.1171
Problem: Check for digits and ascii letters can be faster. Solution: Use a trick with one comparison. (Dominique Pelle)
This commit is contained in:
parent
60bf1f58d0
commit
0ea4a6b94b
@ -109,15 +109,14 @@
|
|||||||
#else
|
#else
|
||||||
# define ASCII_ISALPHA(c) ((c) < 0x7f && isalpha(c))
|
# define ASCII_ISALPHA(c) ((c) < 0x7f && isalpha(c))
|
||||||
# define ASCII_ISALNUM(c) ((c) < 0x7f && isalnum(c))
|
# define ASCII_ISALNUM(c) ((c) < 0x7f && isalnum(c))
|
||||||
# define ASCII_ISLOWER(c) ((c) < 0x7f && islower(c))
|
# define ASCII_ISLOWER(c) ((unsigned)(c) - 'a' < 26)
|
||||||
# define ASCII_ISUPPER(c) ((c) < 0x7f && isupper(c))
|
# define ASCII_ISUPPER(c) ((unsigned)(c) - 'A' < 26)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Use our own isdigit() replacement, because on MS-Windows isdigit() returns
|
/* Use our own isdigit() replacement, because on MS-Windows isdigit() returns
|
||||||
* non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
|
* non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
|
||||||
* below 0 and above 255. For complicated arguments and in/decrement use
|
* below 0 and above 255. */
|
||||||
* vim_isdigit() instead. */
|
#define VIM_ISDIGIT(c) ((unsigned)(c) - '0' < 10)
|
||||||
#define VIM_ISDIGIT(c) ((c) >= '0' && (c) <= '9')
|
|
||||||
|
|
||||||
/* macro version of chartab().
|
/* macro version of chartab().
|
||||||
* Only works with values 0-255!
|
* Only works with values 0-255!
|
||||||
|
@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1171,
|
||||||
/**/
|
/**/
|
||||||
1170,
|
1170,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user