summaryrefslogtreecommitdiff
path: root/lib/libncurses/lib_unctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libncurses/lib_unctrl.c')
-rw-r--r--lib/libncurses/lib_unctrl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libncurses/lib_unctrl.c b/lib/libncurses/lib_unctrl.c
index 3c8f5831fb608..b0f10c2b4ef58 100644
--- a/lib/libncurses/lib_unctrl.c
+++ b/lib/libncurses/lib_unctrl.c
@@ -1,4 +1,6 @@
+#ifdef __FreeBSD__
#include <ctype.h>
+#endif
#include <unctrl.h>
char *
@@ -6,7 +8,11 @@ char *
{
static char buffer[3] = "^x";
- if (isgraph(uch)) {
+#ifdef __FreeBSD__
+ if (isprint(uch)) {
+#else
+ if ((uch & 0x60) != 0 && uch != 0x7F) {
+#endif
/*
* Printable character. Simply return the character as a one-character
* string.