diff options
author | Bruno Haible <bruno@clisp.org> | 2001-04-17 19:33:35 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-04-17 19:33:35 +0000 |
commit | 7b862137cd256d7e116abc5eb87188d2265cedbb (patch) | |
tree | f42a624bc771d3ed9c935bcf808538c3b4e9ed28 /lib/mbswidth.c | |
parent | 3f1eb9ca63f8eeae1e81ed7e1a5c96d9002d75f2 (diff) | |
download | external_gettext-7b862137cd256d7e116abc5eb87188d2265cedbb.zip external_gettext-7b862137cd256d7e116abc5eb87188d2265cedbb.tar.gz external_gettext-7b862137cd256d7e116abc5eb87188d2265cedbb.tar.bz2 |
Assume stdlib.h and string.h exist. Use K&R C syntax.
Diffstat (limited to 'lib/mbswidth.c')
-rw-r--r-- | lib/mbswidth.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/mbswidth.c b/lib/mbswidth.c index b6b0113..7c1c8c2 100644 --- a/lib/mbswidth.c +++ b/lib/mbswidth.c @@ -22,13 +22,9 @@ #endif /* Get MB_CUR_MAX. */ -#if HAVE_STDLIB_H -# include <stdlib.h> -#endif +#include <stdlib.h> -#if HAVE_STRING_H -# include <string.h> -#endif +#include <string.h> /* Get isprint(). */ #include <ctype.h> @@ -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; |