summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/u8c/SIZE_C.h17
-rw-r--r--include/u8c/col.h36
-rw-r--r--include/u8c/dbg.h21
-rw-r--r--include/u8c/dbgprint.h26
-rw-r--r--include/u8c/end.h20
-rw-r--r--include/u8c/err.h (renamed from include/u8c/errtyp.h)18
-rw-r--r--include/u8c/errhandltyp.h20
-rw-r--r--include/u8c/fmt.h73
-rw-r--r--include/u8c/fmttyp.h49
-rw-r--r--include/u8c/geterr.h23
-rw-r--r--include/u8c/init.h22
-rw-r--r--include/u8c/is.h (renamed from include/u8c/isxdigit.h)17
-rw-r--r--include/u8c/isalnum.h23
-rw-r--r--include/u8c/isalpha.h23
-rw-r--r--include/u8c/iscntrl.h23
-rw-r--r--include/u8c/isdigit.h23
-rw-r--r--include/u8c/ispunct.h23
-rw-r--r--include/u8c/isspace.h23
-rw-r--r--include/u8c/main.h (renamed from include/u8c/abrt.h)17
-rw-r--r--include/u8c/print.h23
-rw-r--r--include/u8c/println.h23
-rw-r--r--include/u8c/regerrhandl.h23
-rw-r--r--include/u8c/seterr.h23
-rw-r--r--include/u8c/setfmt.h22
-rw-r--r--include/u8c/thrdsafe.h21
-rw-r--r--include/u8c/u16.h (renamed from include/u8c/u32alloc.h)14
-rw-r--r--include/u8c/u32.h37
-rw-r--r--include/u8c/u32cmp.h22
-rw-r--r--include/u8c/u32cp.h22
-rw-r--r--include/u8c/u32fndchr.h22
-rw-r--r--include/u8c/u32fndpat.h23
-rw-r--r--include/u8c/u32free.h22
-rw-r--r--include/u8c/u32ins.h23
-rw-r--r--include/u8c/u32substr.h23
-rw-r--r--include/u8c/u32sz.h23
-rw-r--r--include/u8c/u8.h (renamed from include/u8c/u32cat.h)16
-rw-r--r--include/u8c/u8alloc.h22
-rw-r--r--include/u8c/u8dec.h23
-rw-r--r--include/u8c/u8enc.h23
-rw-r--r--include/u8c/u8free.h21
-rw-r--r--include/u8c/unimax.h22
-rw-r--r--include/u8c/ver.h21
-rw-r--r--include/u8c/vfmt.h24
-rw-r--r--include/u8c/vprint.h24
44 files changed, 180 insertions, 879 deletions
diff --git a/include/u8c/SIZE_C.h b/include/u8c/SIZE_C.h
index 4a8d513..542ddfd 100644
--- a/include/u8c/SIZE_C.h
+++ b/include/u8c/SIZE_C.h
@@ -13,18 +13,17 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-/* Size constant */
# if !defined(SIZE_C)
# include <limits.h>
# include <stdint.h>
-# if SIZE_MAX == USHRT_MAX
-# define SIZE_C(val) ((unsigned short)val)
-# elif SIZE_MAX == UINT_MAX
-# define SIZE_C(val) val
-# elif SIZE_MAX == ULONG_MAX
-# define SIZE_C(val) val ## lu
-# elif SIZE_MAX == ULLONG_MAX
-# define SIZE_C(val) val ## llu
+# if SIZE_MAX == UINT_LEAST8_MAX
+# define SIZE_C(val) UINT8_C(val)
+# elif SIZE_MAX == UINT_LEAST16_MAX
+# define SIZE_C(val) UINT16_C(val)
+# elif SIZE_MAX == UINT_LEAST32_MAX
+# define SIZE_C(val) UINT32s_C(val)
+# elif SIZE_MAX == UINT_LEAST64_MAX
+# define SIZE_C(val) UINT64_C(val)
# else
# define SIZE_C(val) ((size_t)UINTMAX_C(val))
# endif
diff --git a/include/u8c/col.h b/include/u8c/col.h
deleted file mode 100644
index 9096608..0000000
--- a/include/u8c/col.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Colour */
-# if !defined(u8c_sym_col)
-# define u8c_sym_col
-# include <stdint.h>
-# define u8c_col_azure (UINT32_C(0x3DA9E1))
-# define u8c_col_ash (UINT32_C(0xD2D2CC))
-# define u8c_col_black (UINT32_C(0x444747))
-# define u8c_col_blue (UINT32_C(0x3D3DE1))
-# define u8c_col_chartreuse (UINT32_C(0xA9E13D))
-# define u8c_col_cyan (UINT32_C(0x3DE1E1))
-# define u8c_col_green (UINT32_C(0x3ED13D))
-# define u8c_col_magenta (UINT32_C(0xE13DE1))
-# define u8c_col_mint (UINT32_C(0x3DE1A9))
-# define u8c_col_orange (UINT32_C(0xE1A93D))
-# define u8c_col_red (UINT32_C(0xE13D3D))
-# define u8c_col_rose (UINT32_C(0xE13DA9))
-# define u8c_col_silver (UINT32_C(0x9CA1A1))
-# define u8c_col_violet (UINT32_C(0xA93dE1))
-# define u8c_col_white (UINT32_C(0xF8F8F1))
-# define u8c_col_yellow (UINT32_C(0xE1E13D))
-# endif
diff --git a/include/u8c/dbg.h b/include/u8c/dbg.h
deleted file mode 100644
index e517a79..0000000
--- a/include/u8c/dbg.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Debug */
-# if !defined(u8c_sym_dbg)
-# define u8c_sym_dbg
-# include <stdbool.h>
-extern bool const u8c_dbg;
-# endif
diff --git a/include/u8c/dbgprint.h b/include/u8c/dbgprint.h
deleted file mode 100644
index 8c5ea31..0000000
--- a/include/u8c/dbgprint.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Debug print */
-# if !defined(u8c_sym_dbgprint)
-# define u8c_sym_dbgprint
-# if defined(NDEBUG)
-# define u8c_dbgprint(...) ((void)0x0)
-# else
-# include <u8c/println.h>
-# include <stdio.h>
-# define u8c_dbgprint(...) u8c_println(stderr,__VA_ARGS__)
-# endif
-# endif
diff --git a/include/u8c/end.h b/include/u8c/end.h
deleted file mode 100644
index 5cc7922..0000000
--- a/include/u8c/end.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-# if !defined(u8c_sym_end)
-# define u8c_sym_end
-# include <stdbool.h>
-extern bool u8c_end(void);
-# endif
diff --git a/include/u8c/errtyp.h b/include/u8c/err.h
index 00a6ef8..c6b0f9f 100644
--- a/include/u8c/errtyp.h
+++ b/include/u8c/err.h
@@ -13,9 +13,12 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-/* Error type */
-# if !defined(u8c_sym_errtyp)
-# define u8c_sym_errtyp
+# if !defined(u8c_hdr_err)
+# define u8c_hdr_err
+# include <stdbool.h>
+# include <stddef.h>
+# include <uchar.h>
+/* Enumerations: */
enum u8c_errtyp {
u8c_errtyp_badalloc, /* Bad allocation */
u8c_errtyp_badio, /* Bad input or output */
@@ -26,4 +29,13 @@ enum u8c_errtyp {
u8c_errtyp_maxerrtyp, /* Maximum error type */
u8c_errtyp_all, /* All */
};
+/* Type definitions: */
+typedef void (* u8c_errhandltyp)(enum u8c_errtyp);
+/* Structures: */
+/* Functions */
+extern bool u8c_geterr( size_t * const sz, char32_t const * * const out);
+extern bool u8c_regerrhandl(enum u8c_errtyp typ,u8c_errhandltyp errhandl);
+extern bool u8c_seterr( char32_t const * const msg,enum u8c_errtyp typ);
+/* Constants & Variables: */
+/* Macros: */
# endif
diff --git a/include/u8c/errhandltyp.h b/include/u8c/errhandltyp.h
deleted file mode 100644
index 310f6a6..0000000
--- a/include/u8c/errhandltyp.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-# if !defined(u8c_sym_errhandltyp)
-# define u8c_sym_errhandltyp
-# include <u8c/errtyp.h>
-typedef void (* u8c_errhandltyp)(enum u8c_errtyp);
-# endif
diff --git a/include/u8c/fmt.h b/include/u8c/fmt.h
index 4f7ed1b..138acd6 100644
--- a/include/u8c/fmt.h
+++ b/include/u8c/fmt.h
@@ -13,10 +13,75 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-/* Format */
-# if !defined(u8c_sym_fmt)
-# define u8c_sym_fmt
+# if !defined(u8c_hdr_fmt)
+# define u8c_hdr_fmt
+# include <stdarg.h>
+# include <stdbool.h>
# include <stddef.h>
+# include <stdint.h>
+# include <stdio.h>
# include <uchar.h>
-extern bool u8c_fmt(size_t * const outsz,char32_t const * * const out,char32_t const * const in,...);
+/* Enumerations: */
+enum u8c_fmttyp {
+ u8c_fmttyp_bgcol, /* Background colour (uint_least32_t) */
+ u8c_fmttyp_bgcol0, /* Background colour #0 */
+ u8c_fmttyp_bool, /* Boolean (bool) */
+ u8c_fmttyp_byt, /* Byte (char) */
+ u8c_fmttyp_chr, /* Character (uint_least32_t) */
+ u8c_fmttyp_fgcol, /* Foreground colour (uint_least32_t) */
+ u8c_fmttyp_fgcol0, /* Foreground colour #0 */
+ u8c_fmttyp_int, /* Integer (int) */
+ u8c_fmttyp_int16, /* Integer 16 bit (int_least16_t) */
+ u8c_fmttyp_int32, /* Integer 32 bit (int_least32_t) */
+ u8c_fmttyp_int64, /* Integer 64 bit (int_least64_t) */
+ u8c_fmttyp_int8, /* Integer 8 bit (int_least8_t) */
+ u8c_fmttyp_llong, /* Long long (long long) */
+ u8c_fmttyp_long, /* Long (long) */
+ u8c_fmttyp_sbyt, /* Signed byte (signed char) */
+ u8c_fmttyp_shrt, /* Short (short) */
+ u8c_fmttyp_str, /* String (char32_t const *) */
+ u8c_fmttyp_sz, /* Size (size_t) */
+ u8c_fmttyp_tm, /* Time (uint_least64_t) */
+ u8c_fmttyp_ubyt, /* Unsigned byte (unsigned char) */
+ u8c_fmttyp_uint, /* Unsigned integer (unsigned int) */
+ u8c_fmttyp_uint16, /* Unsigned integer 16 bit (uint_least16_t) */
+ u8c_fmttyp_uint32, /* Unsigned integer 32 bit (uint_least32_t) */
+ u8c_fmttyp_uint64, /* Unsigned integer 64 bit (uint_least64_t) */
+ u8c_fmttyp_uint8, /* Unsigned integer 8 bit (uint_least8_t) */
+ u8c_fmttyp_ulong, /* Unsigned long (unsigned long) */
+ u8c_fmttyp_ullong, /* Unsigned long long (unsigned long long) */
+ u8c_fmttyp_ushrt, /* Unsigned short (unsigned short) */
+};
+/* Type definitions: */
+/* Structures: */
+/* Functions */
+extern bool u8c_fmt( size_t * const outsz,char32_t const * * const out, char32_t const * const in,...);
+extern bool u8c_print( FILE * fp, char32_t const * const msg, ...);
+extern bool u8c_println(FILE * fp, char32_t const * const msg, ...);
+extern bool u8c_setfmt( uint_least8_t const base, uint_least8_t const endian);
+extern bool u8c_vfmt( size_t * const sz, char32_t const * * const out, char32_t const * const in,va_list args);
+extern bool u8c_vprint( FILE * fp, char32_t const * const msg, va_list args);
+/* Constants & Variables: */
+static uint_least32_t const u8c_col_azure = UINT32_C(0x3DA9E1);
+static uint_least32_t const u8c_col_ash = UINT32_C(0xD2D2CC);
+static uint_least32_t const u8c_col_black = UINT32_C(0x444747);
+static uint_least32_t const u8c_col_blue = UINT32_C(0x3D3DE1);
+static uint_least32_t const u8c_col_chartreuse = UINT32_C(0xA9E13D);
+static uint_least32_t const u8c_col_cyan = UINT32_C(0x3DE1E1);
+static uint_least32_t const u8c_col_green = UINT32_C(0x3ED13D);
+static uint_least32_t const u8c_col_magenta = UINT32_C(0xE13DE1);
+static uint_least32_t const u8c_col_mint = UINT32_C(0x3DE1A9);
+static uint_least32_t const u8c_col_orange = UINT32_C(0xE1A93D);
+static uint_least32_t const u8c_col_red = UINT32_C(0xE13D3D);
+static uint_least32_t const u8c_col_rose = UINT32_C(0xE13DA9);
+static uint_least32_t const u8c_col_silver = UINT32_C(0x9CA1A1);
+static uint_least32_t const u8c_col_violet = UINT32_C(0xA93dE1);
+static uint_least32_t const u8c_col_white = UINT32_C(0xF8F8F1);
+static uint_least32_t const u8c_col_yellow = UINT32_C(0xE1E13D);
+/* Macros: */
+# if defined(NDEBUG)
+# define u8c_dbgprint(...) ((void)0x0)
+# else
+# define u8c_dbgprint(...) u8c_println(stderr,__VA_ARGS__)
+# endif
# endif
diff --git a/include/u8c/fmttyp.h b/include/u8c/fmttyp.h
deleted file mode 100644
index cce9a2f..0000000
--- a/include/u8c/fmttyp.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Format type */
-# if !defined(u8c_sym_fmttyp)
-# define u8c_sym_fmttyp
-enum u8c_fmttyp {
- u8c_fmttyp_bgcol, /* Background colour (uint_least32_t) */
- u8c_fmttyp_bgcol0, /* Background colour #0 */
- u8c_fmttyp_bool, /* Boolean (bool) */
- u8c_fmttyp_byt, /* Byte (char) */
- u8c_fmttyp_chr, /* Character (uint_least32_t) */
- u8c_fmttyp_fgcol, /* Foreground colour (uint_least32_t) */
- u8c_fmttyp_fgcol0, /* Foreground colour #0 */
- u8c_fmttyp_int, /* Integer (int) */
- u8c_fmttyp_int16, /* Integer 16 bit (int_least16_t) */
- u8c_fmttyp_int32, /* Integer 32 bit (int_least32_t) */
- u8c_fmttyp_int64, /* Integer 64 bit (int_least64_t) */
- u8c_fmttyp_int8, /* Integer 8 bit (int_least8_t) */
- u8c_fmttyp_llong, /* Long long (long long) */
- u8c_fmttyp_long, /* Long (long) */
- u8c_fmttyp_sbyt, /* Signed byte (signed char) */
- u8c_fmttyp_shrt, /* Short (short) */
- u8c_fmttyp_str, /* String (char32_t const *) */
- u8c_fmttyp_sz, /* Size (size_t) */
- u8c_fmttyp_tm, /* Time (uint_least64_t) */
- u8c_fmttyp_ubyt, /* Unsigned byte (unsigned char) */
- u8c_fmttyp_uint, /* Unsigned integer (unsigned int) */
- u8c_fmttyp_uint16, /* Unsigned integer 16 bit (uint_least16_t) */
- u8c_fmttyp_uint32, /* Unsigned integer 32 bit (uint_least32_t) */
- u8c_fmttyp_uint64, /* Unsigned integer 64 bit (uint_least64_t) */
- u8c_fmttyp_uint8, /* Unsigned integer 8 bit (uint_least8_t) */
- u8c_fmttyp_ulong, /* Unsigned long (unsigned long) */
- u8c_fmttyp_ullong, /* Unsigned long long (unsigned long long) */
- u8c_fmttyp_ushrt, /* Unsigned short (unsigned short) */
-};
-# endif
diff --git a/include/u8c/geterr.h b/include/u8c/geterr.h
deleted file mode 100644
index 70acc4f..0000000
--- a/include/u8c/geterr.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Get error */
-# if !defined(u8c_sym_geterr)
-# define u8c_sym_geterr
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_geterr(size_t * const sz,char32_t const * * const out);
-# endif
diff --git a/include/u8c/init.h b/include/u8c/init.h
deleted file mode 100644
index e19cb5b..0000000
--- a/include/u8c/init.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Initialise */
-# if !defined(u8c_sym_init)
-# define u8c_sym_init
-# include <stdbool.h>
-# include <u8c/errtyp.h>
-extern bool u8c_init(void);
-# endif
diff --git a/include/u8c/isxdigit.h b/include/u8c/is.h
index 57e1392..20097cf 100644
--- a/include/u8c/isxdigit.h
+++ b/include/u8c/is.h
@@ -13,11 +13,22 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-/* Is hexadecimal digit */
-# if !defined(luma_sym_isxdigit)
-# define luma_sym_isxdigit
+# if !defined(u8c_hdr_is)
+# define u8c_hdr_is
# include <stdbool.h>
# include <stdint.h>
# include <uchar.h>
+/* Enumerations: */
+/* Type definitions: */
+/* Structures: */
+/* Functions */
+extern bool u8c_isalnum( uint_least8_t * const res,char32_t const chr);
+extern bool u8c_isalpha( uint_least8_t * const res,char32_t const chr);
+extern bool u8c_iscntrl( uint_least8_t * const res,char32_t const chr);
+extern bool u8c_isdigit( uint_least8_t * const res,char32_t const chr);
+extern bool u8c_ispunct( uint_least8_t * const res,char32_t const chr);
+extern bool u8c_isspace( uint_least8_t * const res,char32_t const chr);
extern bool u8c_isxdigit(uint_least8_t * const res,char32_t const chr);
+/* Constants & Variables: */
+/* Macros: */
# endif
diff --git a/include/u8c/isalnum.h b/include/u8c/isalnum.h
deleted file mode 100644
index b951f5e..0000000
--- a/include/u8c/isalnum.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Is alphanumeric */
-# if !defined(luma_sym_isalnum)
-# define luma_sym_isalnum
-# include <stdbool.h>
-# include <stdint.h>
-# include <uchar.h>
-extern bool u8c_isalnum(uint_least8_t * const res,char32_t const chr);
-# endif
diff --git a/include/u8c/isalpha.h b/include/u8c/isalpha.h
deleted file mode 100644
index a43363f..0000000
--- a/include/u8c/isalpha.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Is alphabetic */
-# if !defined(luma_sym_isalpha)
-# define luma_sym_isalpha
-# include <stdbool.h>
-# include <stdint.h>
-# include <uchar.h>
-extern bool u8c_isalpha(uint_least8_t * const res,char32_t const chr);
-# endif
diff --git a/include/u8c/iscntrl.h b/include/u8c/iscntrl.h
deleted file mode 100644
index 5ffe157..0000000
--- a/include/u8c/iscntrl.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Is control */
-# if !defined(luma_sym_iscntrl)
-# define luma_sym_iscntrl
-# include <stdbool.h>
-# include <stdint.h>
-# include <uchar.h>
-extern bool u8c_iscntrl(uint_least8_t * const res,char32_t const chr);
-# endif
diff --git a/include/u8c/isdigit.h b/include/u8c/isdigit.h
deleted file mode 100644
index a28dd9a..0000000
--- a/include/u8c/isdigit.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Is digit */
-# if !defined(luma_sym_isdigit)
-# define luma_sym_isdigit
-# include <stdbool.h>
-# include <stdint.h>
-# include <uchar.h>
-extern bool u8c_isdigit(uint_least8_t * const res,char32_t const chr);
-# endif
diff --git a/include/u8c/ispunct.h b/include/u8c/ispunct.h
deleted file mode 100644
index 9834491..0000000
--- a/include/u8c/ispunct.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Is punctuation */
-# if !defined(luma_sym_ispunct)
-# define luma_sym_ispunct
-# include <stdbool.h>
-# include <stdint.h>
-# include <uchar.h>
-extern bool u8c_ispunct(uint_least8_t * const res,char32_t const chr);
-# endif
diff --git a/include/u8c/isspace.h b/include/u8c/isspace.h
deleted file mode 100644
index 78cafea..0000000
--- a/include/u8c/isspace.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Is space */
-# if !defined(luma_sym_isspace)
-# define luma_sym_isspace
-# include <stdbool.h>
-# include <stdint.h>
-# include <uchar.h>
-extern bool u8c_isspace(uint_least8_t * const res,char32_t const chr);
-# endif
diff --git a/include/u8c/abrt.h b/include/u8c/main.h
index a068ff2..49049f6 100644
--- a/include/u8c/abrt.h
+++ b/include/u8c/main.h
@@ -14,10 +14,23 @@
If not, see <https://www.gnu.org/licenses/>.
*/
/* Abort */
-# if !defined(u8c_sym_abrt)
-# define u8c_sym_abrt
+# if !defined(u8c_hdr_main)
+# define u8c_hdr_main
# include <stdbool.h>
+# include <stdint.h>
# include <stdnoreturn.h>
# include <uchar.h>
+/* Enumerations: */
+/* Type definitions: */
+/* Structures: */
+/* Functions */
extern noreturn bool u8c_abrt(char const * const fl,long long const ln,char const * const fn,char const * const why);
+extern bool u8c_end( void);
+extern bool u8c_init(void);
+/* Constants & Variables: */
+extern bool const u8c_dbg;
+extern bool const u8c_thrdsafe;
+static char32_t const u8c_unimax = (char32_t)UINT32_C(0x10FFFF);
+static uint_least64_t const u8c_ver = UINT64_C(0x19);
+/* Macros: */
# endif
diff --git a/include/u8c/print.h b/include/u8c/print.h
deleted file mode 100644
index f76c942..0000000
--- a/include/u8c/print.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Print */
-# if !defined(u8c_sym_print)
-# define u8c_sym_print
-# include <stdbool.h>
-# include <stdio.h>
-# include <uchar.h>
-extern bool u8c_print(FILE * fp,char32_t const * const msg,...);
-# endif
diff --git a/include/u8c/println.h b/include/u8c/println.h
deleted file mode 100644
index 8d80353..0000000
--- a/include/u8c/println.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Print line */
-# if !defined(u8c_sym_println)
-# define u8c_sym_println
-# include <stdbool.h>
-# include <stdio.h>
-# include <uchar.h>
-extern bool u8c_println(FILE * fp,char32_t const * const msg,...);
-# endif
diff --git a/include/u8c/regerrhandl.h b/include/u8c/regerrhandl.h
deleted file mode 100644
index d94869a..0000000
--- a/include/u8c/regerrhandl.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Register error handler */
-# if !defined(u8c_sym_regerrhandl)
-# define u8c_sym_regerrhandl
-# include <stdbool.h>
-# include <u8c/errhandltyp.h>
-# include <u8c/errtyp.h>
-extern bool u8c_regerrhandl(enum u8c_errtyp typ,u8c_errhandltyp errhandl);
-# endif
diff --git a/include/u8c/seterr.h b/include/u8c/seterr.h
deleted file mode 100644
index b143f5d..0000000
--- a/include/u8c/seterr.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Set error */
-# if !defined(u8c_sym_seterr)
-# define u8c_sym_seterr
-# include <stdbool.h>
-# include <u8c/errtyp.h>
-# include <uchar.h>
-extern bool u8c_seterr(char32_t const * const msg,enum u8c_errtyp _typ);
-# endif
diff --git a/include/u8c/setfmt.h b/include/u8c/setfmt.h
deleted file mode 100644
index f742bea..0000000
--- a/include/u8c/setfmt.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Set format */
-# if !defined(u8c_sym_setfmt)
-# define u8c_sym_setfmt
-# include <stdbool.h>
-# include <stdint.h>
-extern bool u8c_setfmt(uint_least8_t const base,uint_least8_t const endian);
-# endif
diff --git a/include/u8c/thrdsafe.h b/include/u8c/thrdsafe.h
deleted file mode 100644
index 2ab6709..0000000
--- a/include/u8c/thrdsafe.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Thread-safe */
-# if !defined(u8c_sym_thrdsafe)
-# define u8c_sym_thrdsafe
-# include <stdbool.h>
-extern bool const u8c_thrdsafe;
-# endif
diff --git a/include/u8c/u32alloc.h b/include/u8c/u16.h
index 5241ee6..1babb69 100644
--- a/include/u8c/u32alloc.h
+++ b/include/u8c/u16.h
@@ -13,11 +13,17 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-/* UTF-32 allocate */
-# if !defined(u8c_sym_u32alloc)
-# define u8c_sym_u32alloc
+# if !defined(u8c_hdr_u16)
+# define u8c_hdr_u16
# include <stdbool.h>
# include <stddef.h>
# include <uchar.h>
-extern bool u8c_u32alloc(char32_t * * const u32,size_t const sz);
+/* Enumerations: */
+/* Type definitions: */
+/* Structures: */
+/* Functions */
+extern bool u8c_u16alloc(char16_t * * const u16,size_t const sz);
+extern bool u8c_u16free(char16_t const * * const u16);
+/* Constants & Variables: */
+/* Macros: */
# endif
diff --git a/include/u8c/u32.h b/include/u8c/u32.h
new file mode 100644
index 0000000..08ac161
--- /dev/null
+++ b/include/u8c/u32.h
@@ -0,0 +1,37 @@
+/*
+ Copyright 2021 Gabriel Jensen
+
+ This file is part of u8c.
+
+ u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+
+ u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ See the GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License along with u8c.
+
+ If not, see <https://www.gnu.org/licenses/>.
+*/
+# if !defined(u8c_hdr_u32)
+# define u8c_hdr_u32
+# include <stdbool.h>
+# include <stddef.h>
+# include <uchar.h>
+/* Enumerations: */
+/* Type definitions: */
+/* Structures: */
+/* Functions */
+extern bool u8c_u32alloc(char32_t * * const u32,size_t const sz);
+extern bool u8c_u32cat(size_t * const sz,char32_t const * * const out,char32_t const * const lstr,char32_t const * const rstr);
+extern bool u8c_u32cmp(uint_least8_t * const res,char32_t const * const lstr,char32_t const * const rstr);
+extern bool u8c_u32cp(size_t * const sz,char32_t const * * const out,char32_t const * const in);
+extern bool u8c_u32fndchr(size_t * const pos,char32_t const * const in,char32_t const chr);
+extern bool u8c_u32fndpat(size_t * const pos,char32_t const * const in,char32_t const * const pat);
+extern bool u8c_u32free(char32_t const * * const u32);
+extern bool u8c_u32ins(size_t * const sz,char32_t const * * const out,size_t const pos,char32_t const * const str0,char32_t const * const str1);
+extern bool u8c_u32substr(char32_t const * * const out,size_t const start,size_t const len,char32_t const * const in);
+extern bool u8c_u32sz(size_t * sz,char32_t const * in);
+/* Constants & Variables: */
+/* Macros: */
+# endif
diff --git a/include/u8c/u32cmp.h b/include/u8c/u32cmp.h
deleted file mode 100644
index d638255..0000000
--- a/include/u8c/u32cmp.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-# if !defined(luma_sym_u32cmp)
-# define luma_sym_u32cmp
-# include <stdbool.h>
-# include <stdint.h>
-# include <uchar.h>
-extern bool u8c_u32cmp(uint_least8_t * const res,char32_t const * const lstr,char32_t const * const rstr);
-# endif
diff --git a/include/u8c/u32cp.h b/include/u8c/u32cp.h
deleted file mode 100644
index a79d087..0000000
--- a/include/u8c/u32cp.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-# if !defined(luma_sym_u32cp)
-# define luma_sym_u32cp
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_u32cp(size_t * const sz,char32_t const * * const out,char32_t const * const in);
-# endif
diff --git a/include/u8c/u32fndchr.h b/include/u8c/u32fndchr.h
deleted file mode 100644
index 2ba83a1..0000000
--- a/include/u8c/u32fndchr.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-# if !defined(luma_sym_u32fndchr)
-# define luma_sym_u32fndchr
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_u32fndchr(size_t * const pos,char32_t const * const in,char32_t const chr);
-# endif
diff --git a/include/u8c/u32fndpat.h b/include/u8c/u32fndpat.h
deleted file mode 100644
index a17948b..0000000
--- a/include/u8c/u32fndpat.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-32 find pattern */
-# if !defined(luma_sym_u32fndpat)
-# define luma_sym_u32fndpat
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_u32fndpat(size_t * const pos,char32_t const * const in,char32_t const * const pat);
-# endif
diff --git a/include/u8c/u32free.h b/include/u8c/u32free.h
deleted file mode 100644
index 4525b22..0000000
--- a/include/u8c/u32free.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-32 free */
-# if !defined(u8c_sym_u32free)
-# define u8c_sym_u32free
-# include <stdbool.h>
-# include <uchar.h>
-extern bool u8c_u32free(char32_t const * * const u32);
-# endif
diff --git a/include/u8c/u32ins.h b/include/u8c/u32ins.h
deleted file mode 100644
index 70a2440..0000000
--- a/include/u8c/u32ins.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-32 insert */
-# if !defined(luma_sym_u32ins)
-# define luma_sym_u32ins
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_u32ins(size_t * const sz,char32_t const * * const out,size_t const pos,char32_t const * const str0,char32_t const * const str1);
-# endif
diff --git a/include/u8c/u32substr.h b/include/u8c/u32substr.h
deleted file mode 100644
index e9258a4..0000000
--- a/include/u8c/u32substr.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-32 sub-string */
-# if !defined(luma_sym_u32substr)
-# define luma_sym_u32substr
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_u32substr(char32_t const * * const out,size_t const start,size_t const len,char32_t const * const in);
-# endif
diff --git a/include/u8c/u32sz.h b/include/u8c/u32sz.h
deleted file mode 100644
index f182e92..0000000
--- a/include/u8c/u32sz.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-32 size */
-# if !defined(u8c_sym_u32sz)
-# define u8c_sym_u32sz
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_u32sz(size_t * sz,char32_t const * in);
-# endif
diff --git a/include/u8c/u32cat.h b/include/u8c/u8.h
index 7672cb7..f47666b 100644
--- a/include/u8c/u32cat.h
+++ b/include/u8c/u8.h
@@ -13,11 +13,19 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-/* UTF-32 concatenate */
-# if !defined(luma_sym_u32cat)
-# define luma_sym_u32cat
+# if !defined(u8c_hdr_u8)
+# define u8c_hdr_u8
# include <stdbool.h>
# include <stddef.h>
# include <uchar.h>
-extern bool u8c_u32cat(size_t * const sz,char32_t const * * const out,char32_t const * const lstr,char32_t const * const rstr);
+/* Enumerations: */
+/* Type definitions: */
+/* Structures: */
+/* Functions */
+extern bool u8c_u8alloc(unsigned char * * const u32,size_t const sz);
+extern bool u8c_u8dec( size_t * const sz, char32_t const * * const out,unsigned char const * const in);
+extern bool u8c_u8enc( size_t * const sz, unsigned char const * * const out,char32_t const * const in);
+extern bool u8c_u8free( unsigned char const * * const u8);
+/* Constants & Variables: */
+/* Macros: */
# endif
diff --git a/include/u8c/u8alloc.h b/include/u8c/u8alloc.h
deleted file mode 100644
index b5c2516..0000000
--- a/include/u8c/u8alloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-8 allocate */
-# if !defined(u8c_sym_u8alloc)
-# define u8c_sym_u8alloc
-# include <stdbool.h>
-# include <stddef.h>
-extern bool u8c_u8alloc(unsigned char * * const u32,size_t const sz);
-# endif
diff --git a/include/u8c/u8dec.h b/include/u8c/u8dec.h
deleted file mode 100644
index 2b76df8..0000000
--- a/include/u8c/u8dec.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-8 decode */
-# if !defined(u8c_sym_dec)
-# define u8c_sym_dec
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_u8dec(size_t * const sz,char32_t const * * const out,unsigned char const * const in);
-# endif
diff --git a/include/u8c/u8enc.h b/include/u8c/u8enc.h
deleted file mode 100644
index 096e65a..0000000
--- a/include/u8c/u8enc.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-8 encode */
-# if !defined(u8c_sym_enc)
-# define u8c_sym_enc
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_u8enc(size_t * const sz,unsigned char const * * const out,char32_t const * const in);
-# endif
diff --git a/include/u8c/u8free.h b/include/u8c/u8free.h
deleted file mode 100644
index f1994dd..0000000
--- a/include/u8c/u8free.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* UTF-8 free */
-# if !defined(u8c_sym_u8free)
-# define u8c_sym_u8free
-# include <stdbool.h>
-extern bool u8c_u8free(unsigned char const * * const u8);
-# endif
diff --git a/include/u8c/unimax.h b/include/u8c/unimax.h
deleted file mode 100644
index 5baa4de..0000000
--- a/include/u8c/unimax.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Unicode maximum */
-# if !defined(u8c_sym_unimax)
-# define u8c_sym_unimax
-# include <stdint.h>
-# include <uchar.h>
-# define u8c_unimax ((char32_t)UINT32_C(0x10FFFF))
-# endif
diff --git a/include/u8c/ver.h b/include/u8c/ver.h
deleted file mode 100644
index 454c851..0000000
--- a/include/u8c/ver.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Version */
-# if !defined(u8c_sym_ver)
-# define u8c_sym_ver
-# include <stdint.h>
-# define u8c_ver (UINT64_C(0x18))
-# endif
diff --git a/include/u8c/vfmt.h b/include/u8c/vfmt.h
deleted file mode 100644
index 8db9e05..0000000
--- a/include/u8c/vfmt.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Variadic format */
-# if !defined(u8c_sym_vfmt)
-# define u8c_sym_vfmt
-# include <stdarg.h>
-# include <stdbool.h>
-# include <stddef.h>
-# include <uchar.h>
-extern bool u8c_vfmt(size_t * const sz,char32_t const * * const out,char32_t const * const in,va_list args);
-# endif
diff --git a/include/u8c/vprint.h b/include/u8c/vprint.h
deleted file mode 100644
index 41e7e41..0000000
--- a/include/u8c/vprint.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Copyright 2021 Gabriel Jensen
-
- This file is part of u8c.
-
- u8c is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
- u8c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- See the GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License along with u8c.
-
- If not, see <https://www.gnu.org/licenses/>.
-*/
-/* Variadic print */
-# if !defined(u8c_sym_vprint)
-# define u8c_sym_vprint
-# include <stdarg.h>
-# include <stdbool.h>
-# include <stdio.h>
-# include <uchar.h>
-extern bool u8c_vprint(FILE * fp,char32_t const * const msg,va_list args);
-# endif