]> git.deb.at Git - pkg/abook.git/blobdiff - mbswidth.c
Upload 0.6.1-2 to unstable
[pkg/abook.git] / mbswidth.c
index c6c3ea9ae9206952153bbde1a68abd0d9c8e77b4..21622057c860ced19c3ba4d6765be2eb3a59e2b7 100644 (file)
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Written by Bruno Haible <haible@clisp.cons.org>.  */
+/*
+ * Adapted for abook by JH <jheinonen@users.sourceforge.net>
+ */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
-#ifdef HANDLE_MULTIBYTE /* for abook */
-
 /* Specification.  */
 #include "mbswidth.h"
 
+#ifdef HANDLE_MULTIBYTE /* for abook */
+
 /* Get MB_CUR_MAX.  */
 #include <stdlib.h>
 
@@ -57,7 +60,7 @@
 #endif
 
 #ifndef HAVE_DECL_WCWIDTH
-"this configure-time declaration test was not run"
+#      warn "this configure-time declaration test was not run"
 #endif
 #if !HAVE_DECL_WCWIDTH
 int wcwidth ();
@@ -323,4 +326,13 @@ mbsnbytes (const char *string, size_t nbytes, int maxwidth, int flags)
   return maxwidth;
 }
 
+#else /* HANDLE_MULTIBYTE */
+
+#include <string.h>
+int
+mbswidth (const char *string, int flags)
+{
+  return strlen(string);
+}
 #endif /* HANDLE_MULTIBYTE */
+