vim-patch:8.2.4402: missing parenthesis may cause unexpected problems

Problem:    Missing parenthesis may cause unexpected problems.
Solution:   Add more parenthesis is macros.
ae6f1d8b14
This commit is contained in:
Brian Leung
2022-04-03 02:36:01 -07:00
parent 271bb32855
commit 69e11b58b4
17 changed files with 58 additions and 59 deletions

View File

@@ -279,15 +279,15 @@ static void init_class_tab(void)
done = true;
}
# define ri_digit(c) (c < 0x100 && (class_tab[c] & RI_DIGIT))
# define ri_hex(c) (c < 0x100 && (class_tab[c] & RI_HEX))
# define ri_octal(c) (c < 0x100 && (class_tab[c] & RI_OCTAL))
# define ri_word(c) (c < 0x100 && (class_tab[c] & RI_WORD))
# define ri_head(c) (c < 0x100 && (class_tab[c] & RI_HEAD))
# define ri_alpha(c) (c < 0x100 && (class_tab[c] & RI_ALPHA))
# define ri_lower(c) (c < 0x100 && (class_tab[c] & RI_LOWER))
# define ri_upper(c) (c < 0x100 && (class_tab[c] & RI_UPPER))
# define ri_white(c) (c < 0x100 && (class_tab[c] & RI_WHITE))
# define ri_digit(c) ((c) < 0x100 && (class_tab[c] & RI_DIGIT))
# define ri_hex(c) ((c) < 0x100 && (class_tab[c] & RI_HEX))
# define ri_octal(c) ((c) < 0x100 && (class_tab[c] & RI_OCTAL))
# define ri_word(c) ((c) < 0x100 && (class_tab[c] & RI_WORD))
# define ri_head(c) ((c) < 0x100 && (class_tab[c] & RI_HEAD))
# define ri_alpha(c) ((c) < 0x100 && (class_tab[c] & RI_ALPHA))
# define ri_lower(c) ((c) < 0x100 && (class_tab[c] & RI_LOWER))
# define ri_upper(c) ((c) < 0x100 && (class_tab[c] & RI_UPPER))
# define ri_white(c) ((c) < 0x100 && (class_tab[c] & RI_WHITE))
// flags for regflags
#define RF_ICASE 1 // ignore case