diff options
-rw-r--r-- | editors/vi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/editors/vi.c b/editors/vi.c index 3f4ccdcdd..55092f921 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -161,8 +161,11 @@ | |||
161 | //usage: ) | 161 | //usage: ) |
162 | //usage: "\n -H Short help regarding available features" | 162 | //usage: "\n -H Short help regarding available features" |
163 | 163 | ||
164 | #include <regex.h> | ||
165 | #include "libbb.h" | 164 | #include "libbb.h" |
165 | /* Should be after libbb.h: on some systems regex.h needs sys/types.h: */ | ||
166 | #if ENABLE_FEATURE_VI_REGEX_SEARCH | ||
167 | # include <regex.h> | ||
168 | #endif | ||
166 | 169 | ||
167 | /* the CRASHME code is unmaintained, and doesn't currently build */ | 170 | /* the CRASHME code is unmaintained, and doesn't currently build */ |
168 | #define ENABLE_FEATURE_VI_CRASHME 0 | 171 | #define ENABLE_FEATURE_VI_CRASHME 0 |
@@ -181,9 +184,9 @@ | |||
181 | 184 | ||
182 | /* 0x9b is Meta-ESC */ | 185 | /* 0x9b is Meta-ESC */ |
183 | #if ENABLE_FEATURE_VI_8BIT | 186 | #if ENABLE_FEATURE_VI_8BIT |
184 | #define Isprint(c) ((unsigned char)(c) >= ' ' && (c) != 0x7f && (unsigned char)(c) != 0x9b) | 187 | # define Isprint(c) ((unsigned char)(c) >= ' ' && (c) != 0x7f && (unsigned char)(c) != 0x9b) |
185 | #else | 188 | #else |
186 | #define Isprint(c) ((unsigned char)(c) >= ' ' && (unsigned char)(c) < 0x7f) | 189 | # define Isprint(c) ((unsigned char)(c) >= ' ' && (unsigned char)(c) < 0x7f) |
187 | #endif | 190 | #endif |
188 | 191 | ||
189 | #endif | 192 | #endif |