X-Git-Url: https://git.deb.at/w?p=pkg%2Fabook.git;a=blobdiff_plain;f=mbswidth.c;h=21622057c860ced19c3ba4d6765be2eb3a59e2b7;hp=c6c3ea9ae9206952153bbde1a68abd0d9c8e77b4;hb=5840fceb1f91b066a4c4361b0599c417aa111386;hpb=b1b41dce461ab21ae9a2bd26d7a00a381a5f81f8 diff --git a/mbswidth.c b/mbswidth.c index c6c3ea9..2162205 100644 --- a/mbswidth.c +++ b/mbswidth.c @@ -16,16 +16,19 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Bruno Haible . */ +/* + * Adapted for abook by JH + */ #ifdef HAVE_CONFIG_H # include #endif -#ifdef HANDLE_MULTIBYTE /* for abook */ - /* Specification. */ #include "mbswidth.h" +#ifdef HANDLE_MULTIBYTE /* for abook */ + /* Get MB_CUR_MAX. */ #include @@ -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 +int +mbswidth (const char *string, int flags) +{ + return strlen(string); +} #endif /* HANDLE_MULTIBYTE */ +