diff options
Diffstat (limited to 'include/u8c/main.h')
-rw-r--r-- | include/u8c/main.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/include/u8c/main.h b/include/u8c/main.h index 2a13cc0..4004550 100644 --- a/include/u8c/main.h +++ b/include/u8c/main.h @@ -13,24 +13,43 @@ If not, see <https://www.gnu.org/licenses/>. */ -/* Abort */ # if !defined(u8c_hdr_main) # define u8c_hdr_main # include <stdbool.h> +# include <stddef.h> # include <stdint.h> # include <stdnoreturn.h> # include <uchar.h> /* Enumerations: */ /* Type definitions: */ /* Structures: */ -/* Functions */ -extern noreturn bool u8c_abrtfn(char const * const fl,long const ln,char const * const fn,char const * const why); -extern bool u8c_end( void); -extern bool u8c_init( void); +struct u8c_end_tuple { + bool stat; +}; +struct u8c_init_tuple { + bool stat; +}; +struct u8c_uniblk_tuple { + char32_t const * blk; + size_t blksz; + bool stat; +}; +struct u8c_uninm_tuple { + char32_t const * nm; + size_t nmsz; + bool stat; +}; +/* Functions: */ +noreturn extern void u8c_abrtfn(char const * const restrict fl, long const ln,char const * const restrict fn,char const * const restrict why); /* Abort function */ +extern struct u8c_end_tuple u8c_end( void); /* End */ +extern struct u8c_init_tuple u8c_init( void); /* Initialise */ +extern struct u8c_uniblk_tuple u8c_uniblk(char32_t const chr); /* Unicode block */ +extern struct u8c_uninm_tuple u8c_uninm( char32_t const chr); /* Unicode name */ /* Constants & Variables: */ -extern bool const u8c_dbg; -extern bool const u8c_thrdsafe; -static uint_least64_t const u8c_ver = UINT64_C(0x19); +extern bool const u8c_dbg; /* Debug */ +extern bool const u8c_thrdsafe; /* Thread-safe */ +static char32_t const u8c_unimax = U'\U0010FFFF'; /* Unicode maximum */ +static uint_least64_t const u8c_ver = UINT64_C(0x1A); /* Version */ /* Macros: */ -# define u8c_abrt(why) u8c_abrtfn(__FILE__,(long)__LINE__,__func__,why) +# define u8c_abrt(why) u8c_abrtfn(__FILE__,(long)__LINE__,__func__,why) /* Abort */ # endif |