Fuzzy string comparison.
[gnulib.git] / lib / mbswidth.c
index 48da663..a207d0f 100644 (file)
@@ -17,9 +17,7 @@
 
 /* Written by Bruno Haible <haible@clisp.cons.org>.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 /* Specification.  */
 #include "mbswidth.h"
@@ -51,7 +49,7 @@
 # include <wctype.h>
 #endif
 #if !defined iswcntrl && !HAVE_ISWCNTRL
-# define iswcntrl(wc) 0
+# define iswcntrl(wc) (((wc) & ~0x1f) == 0 || (wc) == 0x7f)
 #endif
 
 #ifndef mbsinit