X-Git-Url: https://git.deb.at/w?p=pkg%2Fabook.git;a=blobdiff_plain;f=mbswidth.c;h=21622057c860ced19c3ba4d6765be2eb3a59e2b7;hp=a38d03ecce0b1d75e37cd06c3a2602ad5c241b18;hb=7c54e85b04f6d030ae47dd880d0391f6e35d1634;hpb=addc54efb596b39b0e4e6ce219ee0f1506337475 diff --git a/mbswidth.c b/mbswidth.c index a38d03e..2162205 100644 --- a/mbswidth.c +++ b/mbswidth.c @@ -24,11 +24,11 @@ # include #endif -#ifdef HANDLE_MULTIBYTE /* for abook */ - /* Specification. */ #include "mbswidth.h" +#ifdef HANDLE_MULTIBYTE /* for abook */ + /* Get MB_CUR_MAX. */ #include @@ -326,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 */ +