summaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
authorDenys Vlasenko2011-07-03 03:19:43 +0200
committerDenys Vlasenko2011-07-03 03:19:43 +0200
commit066f39956641300c1e5c6bfe6c11a115cea3e2cf (patch)
treef8887492b8108f528353bec7b54e4c80a00b95cc /editors/vi.c
parent104e01409de48057f34fa8abe3fcae11820a651c (diff)
downloadbusybox-066f39956641300c1e5c6bfe6c11a115cea3e2cf.zip
busybox-066f39956641300c1e5c6bfe6c11a115cea3e2cf.tar.gz
vi: tweak regex.h include
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 3f4ccdc..55092f9 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -161,8 +161,11 @@
//usage: )
//usage: "\n -H Short help regarding available features"
-#include <regex.h>
#include "libbb.h"
+/* Should be after libbb.h: on some systems regex.h needs sys/types.h: */
+#if ENABLE_FEATURE_VI_REGEX_SEARCH
+# include <regex.h>
+#endif
/* the CRASHME code is unmaintained, and doesn't currently build */
#define ENABLE_FEATURE_VI_CRASHME 0
@@ -181,9 +184,9 @@
/* 0x9b is Meta-ESC */
#if ENABLE_FEATURE_VI_8BIT
-#define Isprint(c) ((unsigned char)(c) >= ' ' && (c) != 0x7f && (unsigned char)(c) != 0x9b)
+# define Isprint(c) ((unsigned char)(c) >= ' ' && (c) != 0x7f && (unsigned char)(c) != 0x9b)
#else
-#define Isprint(c) ((unsigned char)(c) >= ' ' && (unsigned char)(c) < 0x7f)
+# define Isprint(c) ((unsigned char)(c) >= ' ' && (unsigned char)(c) < 0x7f)
#endif
#endif