]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Assume stdlib.h and string.h exist. Use K&R C syntax.
authorBruno Haible <bruno@clisp.org>
Tue, 17 Apr 2001 19:33:35 +0000 (19:33 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 17 Apr 2001 19:33:35 +0000 (19:33 +0000)
lib/mbswidth.c

index b6b01138a24ea9898197a702a2402498fcc5170f..7c1c8c22601c3c9995240fd5555bf2b0e8edfa74 100644 (file)
 #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;