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>
#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 ();
return maxwidth;
}
+#else /* HANDLE_MULTIBYTE */
+
+#include <string.h>
+int
+mbswidth (const char *string, int flags)
+{
+ return strlen(string);
+}
#endif /* HANDLE_MULTIBYTE */
+