X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=misc.c;fp=misc.c;h=9f0a0a3f6824dc88f7c28bdfacb35a1c4f2f7b16;hb=7c54e85b04f6d030ae47dd880d0391f6e35d1634;hp=c8d0d73ea3c75af259671504c2d7f41095123a94;hpb=addc54efb596b39b0e4e6ce219ee0f1506337475;p=pkg%2Fabook.git diff --git a/misc.c b/misc.c index c8d0d73..9f0a0a3 100644 --- a/misc.c +++ b/misc.c @@ -1,6 +1,6 @@ /* - * $Id: misc.c,v 1.19 2005/08/11 07:32:35 jheinonen Exp $ + * $Id: misc.c,v 1.21 2005/10/05 11:03:36 jheinonen Exp $ * * by JH * @@ -18,9 +18,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#ifdef HANDLE_MULTIBYTE -# include -#endif +#include #include "misc.h" #include "xmalloc.h" @@ -82,7 +80,7 @@ strtrim(char *s) #endif char * -mkstr (const char *format, ... ) +strdup_printf (const char *format, ... ) { MY_VA_LOCAL_DECL; size_t size = 100; @@ -274,11 +272,7 @@ int strwidth(const char *s) { assert(s); -#ifdef HANDLE_MULTIBYTE - return (int)mbswidth(s, 0); -#else - return strlen(s); -#endif + return mbswidth(s, 0); } int