about summary refs log tree commit diff
path: root/src/multibyte
diff options
context:
space:
mode:
Diffstat (limited to 'src/multibyte')
-rw-r--r--src/multibyte/internal.c2
-rw-r--r--src/multibyte/internal.h1
-rw-r--r--src/multibyte/mblen.c5
-rw-r--r--src/multibyte/mbrlen.c5
-rw-r--r--src/multibyte/mbrtowc.c3
-rw-r--r--src/multibyte/mbsinit.c5
-rw-r--r--src/multibyte/mbsnrtowcs.c6
-rw-r--r--src/multibyte/mbsrtowcs.c4
-rw-r--r--src/multibyte/mbtowc.c5
-rw-r--r--src/multibyte/wcrtomb.c4
-rw-r--r--src/multibyte/wcsnrtombs.c5
-rw-r--r--src/multibyte/wcsrtombs.c5
-rw-r--r--src/multibyte/wctomb.c4
13 files changed, 3 insertions, 51 deletions
diff --git a/src/multibyte/internal.c b/src/multibyte/internal.c
index ab22806e..1813b266 100644
--- a/src/multibyte/internal.c
+++ b/src/multibyte/internal.c
@@ -4,8 +4,6 @@
  * unnecessary.
  */
 
-#include <inttypes.h>
-
 #include "internal.h"
 
 #define C(x) ( x<2 ? -1 : ( R(0x80,0xc0) | x ) )
diff --git a/src/multibyte/internal.h b/src/multibyte/internal.h
index 25ba240e..82f5a07e 100644
--- a/src/multibyte/internal.h
+++ b/src/multibyte/internal.h
@@ -6,6 +6,7 @@
 
 #define bittab __fsmu8
 
+#include <stdint.h>
 #include "libc.h"
 
 extern const uint32_t bittab[] ATTR_LIBC_VISIBILITY;
diff --git a/src/multibyte/mblen.c b/src/multibyte/mblen.c
index 26d35649..96b47b12 100644
--- a/src/multibyte/mblen.c
+++ b/src/multibyte/mblen.c
@@ -5,11 +5,6 @@
  */
 
 #include <stdlib.h>
-#include <inttypes.h>
-#include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int mblen(const char *s, size_t n)
 {
diff --git a/src/multibyte/mbrlen.c b/src/multibyte/mbrlen.c
index c9714ef8..3a5a7433 100644
--- a/src/multibyte/mbrlen.c
+++ b/src/multibyte/mbrlen.c
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict st)
 {
diff --git a/src/multibyte/mbrtowc.c b/src/multibyte/mbrtowc.c
index db803661..35e834ee 100644
--- a/src/multibyte/mbrtowc.c
+++ b/src/multibyte/mbrtowc.c
@@ -4,11 +4,8 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
 
 size_t mbrtowc(wchar_t *restrict wc, const char *restrict src, size_t n, mbstate_t *restrict st)
diff --git a/src/multibyte/mbsinit.c b/src/multibyte/mbsinit.c
index c0e7e494..e001d844 100644
--- a/src/multibyte/mbsinit.c
+++ b/src/multibyte/mbsinit.c
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int mbsinit(const mbstate_t *st)
 {
diff --git a/src/multibyte/mbsnrtowcs.c b/src/multibyte/mbsnrtowcs.c
index 33457f95..68b9960f 100644
--- a/src/multibyte/mbsnrtowcs.c
+++ b/src/multibyte/mbsnrtowcs.c
@@ -4,13 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-#include <stdio.h>
-
-#include "internal.h"
 
 size_t mbsnrtowcs(wchar_t *restrict wcs, const char **restrict src, size_t n, size_t wn, mbstate_t *restrict st)
 {
diff --git a/src/multibyte/mbsrtowcs.c b/src/multibyte/mbsrtowcs.c
index 066cce60..3c1343ae 100644
--- a/src/multibyte/mbsrtowcs.c
+++ b/src/multibyte/mbsrtowcs.c
@@ -4,11 +4,9 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
+#include <stdint.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
 
 size_t mbsrtowcs(wchar_t *restrict ws, const char **restrict src, size_t wn, mbstate_t *restrict st)
diff --git a/src/multibyte/mbtowc.c b/src/multibyte/mbtowc.c
index ec9e54ad..6710637a 100644
--- a/src/multibyte/mbtowc.c
+++ b/src/multibyte/mbtowc.c
@@ -4,13 +4,10 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
-#include <stdio.h>
+
 int mbtowc(wchar_t *restrict wc, const char *restrict src, size_t n)
 {
 	unsigned c;
diff --git a/src/multibyte/wcrtomb.c b/src/multibyte/wcrtomb.c
index 250649f5..59f733db 100644
--- a/src/multibyte/wcrtomb.c
+++ b/src/multibyte/wcrtomb.c
@@ -4,13 +4,9 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
 
-#include "internal.h"
-
 size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict st)
 {
 	if (!s) return 1;
diff --git a/src/multibyte/wcsnrtombs.c b/src/multibyte/wcsnrtombs.c
index a2e308b3..7eb05d45 100644
--- a/src/multibyte/wcsnrtombs.c
+++ b/src/multibyte/wcsnrtombs.c
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st)
 {
diff --git a/src/multibyte/wcsrtombs.c b/src/multibyte/wcsrtombs.c
index d48a65e7..5cf8f3eb 100644
--- a/src/multibyte/wcsrtombs.c
+++ b/src/multibyte/wcsrtombs.c
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t wcsrtombs(char *restrict s, const wchar_t **restrict ws, size_t n, mbstate_t *restrict st)
 {
diff --git a/src/multibyte/wctomb.c b/src/multibyte/wctomb.c
index 6910ef37..de7ed84d 100644
--- a/src/multibyte/wctomb.c
+++ b/src/multibyte/wctomb.c
@@ -5,11 +5,7 @@
  */
 
 #include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int wctomb(char *s, wchar_t wc)
 {