summaryrefslogtreecommitdiff
path: root/lib/c32tob.c
Commit message (Collapse)AuthorAgeFilesLines
* *c32*: Inline most functions on glibc and musl libc.Bruno Haible2023-04-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/uchar.in.h: Invoke _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. (btoc32): Inline if _GL_WCHAR_T_IS_UCS4. (c32isalnum, c32isalpha, c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace, c32isupper, c32isxdigit): Inline if _GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t. (c32snrtombs, c32srtombs, c32stombs, c32tob, mbsnrtoc32s, mbsrtoc32s, mbstoc32s): Inline if _GL_WCHAR_T_IS_UCS4. * lib/btoc32.c: Define compilation unit marker. (btoc32): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32isalnum.c: Define compilation unit marker. * lib/c32isalpha.c: Likewise. * lib/c32isblank.c: Likewise. * lib/c32iscntrl.c: Likewise. * lib/c32isdigit.c: Likewise. * lib/c32isgraph.c: Likewise. * lib/c32islower.c: Likewise. * lib/c32isprint.c: Likewise. * lib/c32ispunct.c: Likewise. * lib/c32isspace.c: Likewise. * lib/c32isupper.c: Likewise. * lib/c32isxdigit.c: Likewise. * lib/c32is-impl.h (FUNC): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32snrtombs.c: Define compilation unit marker. (c32snrtombs): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32srtombs.c: Define compilation unit marker. (c32srtombs): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32stombs.c: Define compilation unit marker. (c32stombs): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32tob.c: Define compilation unit marker. (c32tob): Conditionally mark as _GL_EXTERN_INLINE. * lib/mbsnrtoc32s.c: Define compilation unit marker. (mbsnrtoc32s): Conditionally mark as _GL_EXTERN_INLINE. * lib/mbsrtoc32s.c: Define compilation unit marker. (mbsrtoc32s): Conditionally mark as _GL_EXTERN_INLINE. * lib/mbstoc32s.c: Define compilation unit marker. (mbstoc32s): Conditionally mark as _GL_EXTERN_INLINE. * modules/uchar (Depends-on): Add extern-inline.
* *c32*: Optimize on musl libc like on glibc.Bruno Haible2023-04-041-1/+1
| | | | | | | | | | | * lib/uchar.in.h (_GL_WCHAR_T_IS_UCS4): New macro. * lib/btoc32.c (btoc32): Test _GL_WCHAR_T_IS_UCS4 instead of __GLIBC__. * lib/mbsrtoc32s.c: Likewise. * lib/mbsnrtoc32s.c: Likewise. * lib/c32tob.c (c32tob): Likewise. * lib/c32srtombs.c: Likewise. * lib/c32snrtombs.c: Likewise. * lib/c32is-impl.h (FUNC): Likewise.
* uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T.Bruno Haible2023-04-041-1/+1
| | | | | | | | | | | | | * lib/uchar.in.h (_GL_SMALL_WCHAR_T): Renamed from _GL_LARGE_CHAR32_T. * lib/mbrtoc32.c: Update. * lib/mbsrtoc32s.c: Update. * lib/mbsnrtoc32s.c: Update. * lib/c32tob.c: Update. * lib/c32rtomb.c: Update. * lib/c32srtombs.c: Update. * lib/c32snrtombs.c: Update. * lib/c32is-impl.h: Update. * tests/test-uchar.c: Update.
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* Put LGPLv3+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c}: Use LGPLv3+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* c32tob: Make consistent with mbrtoc32.Bruno Haible2020-01-091-1/+18
| | | | | | | | | * lib/c32tob.c: Include <stdio.h>, <string.h>, <wchar.h>. (c32tob): If the char32_t encoding and the wchar_t encoding may differ, use c32rtomb, not wctob. * modules/c32tob (Files): Add m4/mbrtoc32.m4. (Depends-on): Add c32rtomb. (configure.ac): Require gl_MBRTOC32_SANITYCHECK.
* c32tob: prefer https: URLsBruno Haible2020-01-041-1/+1
|
* c32tob: New module.Bruno Haible2020-01-011-0/+37
* lib/uchar.in.h (_GL_LARGE_CHAR32_T): New macro. (c32tob): New declaration. * lib/c32tob.c: New file. * m4/uchar.m4 (gl_UCHAR_MODULE_INDICATOR, gl_UCHAR_H_DEFAULTS): New macros. (gl_UCHAR_H): Require gl_UCHAR_H_DEFAULTS. * modules/uchar (Depends-on): Add snippet/c++defs. (Makefile.am): Include c++defs.h and substitute GNULIB_C32TOB in uchar.h. * modules/c32tob: New file. * tests/test-uchar.c: Verify that _GL_LARGE_CHAR32_T is correctly defined. * tests/test-uchar-c++.cc: Include signature.h. Test the signature of c32tob. * modules/uchar-c++-tests (Files): Add tests/signature.h. * doc/posix-functions/wctob.texi: Mention the new module.