From: Bruno Haible Date: Tue, 17 Apr 2001 19:33:35 +0000 (+0000) Subject: Assume stdlib.h and string.h exist. Use K&R C syntax. X-Git-Tag: v0.10.37~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b862137cd256d7e116abc5eb87188d2265cedbb;p=thirdparty%2Fgettext.git Assume stdlib.h and string.h exist. Use K&R C syntax. --- diff --git a/lib/mbswidth.c b/lib/mbswidth.c index b6b01138a..7c1c8c226 100644 --- a/lib/mbswidth.c +++ b/lib/mbswidth.c @@ -22,13 +22,9 @@ #endif /* Get MB_CUR_MAX. */ -#if HAVE_STDLIB_H -# include -#endif +#include -#if HAVE_STRING_H -# include -#endif +#include /* Get isprint(). */ #include @@ -84,7 +80,9 @@ int wcwidth (); With flags = MBSW_REJECT_INVALID | MBSW_REJECT_UNPRINTABLE, this is the multibyte analogon of the wcswidth function. */ int -mbswidth (const char *string, int flags) +mbswidth (string, flags) + const char *string; + int flags; { return mbsnwidth (string, strlen (string), flags); } @@ -94,7 +92,10 @@ mbswidth (const char *string, int flags) non-printable character occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned. */ int -mbsnwidth (const char *string, size_t nbytes, int flags) +mbsnwidth (string, nbytes, flags) + const char *string; + size_t nbytes; + int flags; { const char *p = string; const char *plimit = p + nbytes;