X-Git-Url: https://git.deb.at/w?p=pkg%2Fabook.git;a=blobdiff_plain;f=mbswidth.c;h=21622057c860ced19c3ba4d6765be2eb3a59e2b7;hp=a38d03ecce0b1d75e37cd06c3a2602ad5c241b18;hb=5840fceb1f91b066a4c4361b0599c417aa111386;hpb=d3c55f5a5fcd740475ae9a3195986b455465be69 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 */ +