From c907565811f05a2365d1bd7eaa1c2b40b6e1d4cb Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 19 Nov 2002 13:58:18 +0000 Subject: [PATCH] Standard specification idiom. Make mbswidth.h self contained. --- lib/ChangeLog | 3 +++ lib/mbswidth.c | 5 +++-- lib/mbswidth.h | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index a420324098..72638148bc 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +1,8 @@ 2002-11-19 Bruno Haible + * mbswidth.c: Include mbswidth.h right at the beginning. + * mbswidth.h: Include , for size_t. + * mbswidth.h (PARAMS): Remove macro. (mbswidth, mbsnwidth): Use ANSI C function declarations. * mbswidth.c (mbswidth, mbsnwidth): Likewise. diff --git a/lib/mbswidth.c b/lib/mbswidth.c index 9a133b7453..a2ef5b3fda 100644 --- a/lib/mbswidth.c +++ b/lib/mbswidth.c @@ -21,6 +21,9 @@ # include #endif +/* Specification. */ +#include "mbswidth.h" + /* Get MB_CUR_MAX. */ #include @@ -78,8 +81,6 @@ int wcwidth (); #undef ISCNTRL #define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c)) -#include "mbswidth.h" - /* Returns the number of columns needed to represent the multibyte character string pointed to by STRING. If a non-printable character occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned. diff --git a/lib/mbswidth.h b/lib/mbswidth.h index 878e67ec44..40d4cba041 100644 --- a/lib/mbswidth.h +++ b/lib/mbswidth.h @@ -15,6 +15,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + /* Optional flags to influence mbswidth/mbsnwidth behavior. */ /* If this bit is set, return -1 upon finding an invalid or incomplete -- 2.30.2