# HG changeset patch # User Bruno Haible # Date 1037714298 0 # Node ID 7627246c7a83d583da6124e507f450742bf950ac # Parent 55eb3920b607da335e67f0640477dca479b282a6 Standard specification idiom. Make mbswidth.h self contained. diff --git a/lib/ChangeLog b/lib/ChangeLog --- 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 --- 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 @@ #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 --- 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