Standard specification idiom. Make mbswidth.h self contained.
authorBruno Haible <bruno@clisp.org>
Tue, 19 Nov 2002 13:58:18 +0000 (13:58 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Nov 2002 13:58:18 +0000 (13:58 +0000)
lib/ChangeLog
lib/mbswidth.c
lib/mbswidth.h

index a42032409823137339dc2808a33623995e9c9e29..72638148bc908197cc4570a4f10da5fb13f35ec5 100644 (file)
@@ -1,5 +1,8 @@
 2002-11-19  Bruno Haible  <bruno@clisp.org>
 
+       * mbswidth.c: Include mbswidth.h right at the beginning.
+       * mbswidth.h: Include <stddef.h>, for size_t.
+
        * mbswidth.h (PARAMS): Remove macro.
        (mbswidth, mbsnwidth): Use ANSI C function declarations.
        * mbswidth.c (mbswidth, mbsnwidth): Likewise.
index 9a133b74536389780b1fdfa057203783b54a494e..a2ef5b3fdaf5af14677c3cebc2199224ce69a12f 100644 (file)
@@ -21,6 +21,9 @@
 # include <config.h>
 #endif
 
+/* Specification.  */
+#include "mbswidth.h"
+
 /* Get MB_CUR_MAX.  */
 #include <stdlib.h>
 
@@ -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.
index 878e67ec44500faaaa7299b17eacab2dbeed8d51..40d4cba0419debe8bd3b802acf05ef59d6388ef8 100644 (file)
@@ -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 <stddef.h>
+
 /* Optional flags to influence mbswidth/mbsnwidth behavior.  */
 
 /* If this bit is set, return -1 upon finding an invalid or incomplete