Commit 1ad41a2d authored by ROOL's avatar ROOL 🤖
Browse files

CLib header updates

Detail:
  Sync the disc copies of the compiler's internal headers from cc 5.89.
  Add <stdalign.h> and <stdnoreturn.h> and <uchar.h> in support of C18.
  Now the compiler sets __STDC_VERSION__ appropriately on the nightly builds it
  is no longer necessary to use predefine 'DDE' to enable those additions.

Version 6.15. Tagged as 'RISC_OSLib-6_15'
parent afa04ff1
...@@ -15,7 +15,7 @@ ifeq (${APCS},Host) ...@@ -15,7 +15,7 @@ ifeq (${APCS},Host)
# Yes, some cross-compilation components use kernel definitions even for host tools # Yes, some cross-compilation components use kernel definitions even for host tools
CLIBHDRS = kernel CLIBHDRS = kernel
else else
CLIBHDRS = assert complex ctype errno fenv float inttypes iso646 kernel limits locale math setjmp signal stdarg stdatomic stdbool stddef stdint stdio stdlib string swis tgmath time varargs wchar wctype CLIBHDRS = assert complex ctype errno fenv float inttypes iso646 kernel limits locale math setjmp signal stdalign stdarg stdatomic stdbool stddef stdint stdio stdlib stdnoreturn string swis tgmath time uchar varargs wchar wctype
RLIBHDRS = akbd alarm baricon bbc colourmenu colourpick colourtran coords dbox dboxfile dboxquery dboxtcol dragasprit drawfdiag drawferror drawfobj drawftypes drawmod event fileicon flex font fontlist fontselect heap help jpeg magnify menu msgs msgtrans os pointer print res resspr saveas sprite template trace txt txtedit txtopt txtscrap txtwin typdat visdelay werr wimp wimpt win xferrecv xfersend RLIBHDRS = akbd alarm baricon bbc colourmenu colourpick colourtran coords dbox dboxfile dboxquery dboxtcol dragasprit drawfdiag drawferror drawfobj drawftypes drawmod event fileicon flex font fontlist fontselect heap help jpeg magnify menu msgs msgtrans os pointer print res resspr saveas sprite template trace txt txtedit txtopt txtscrap txtwin typdat visdelay werr wimp wimpt win xferrecv xfersend
CLIBEXPLIBS = ansilib ansilibm stubs CLIBEXPLIBS = ansilib ansilibm stubs
RLIBEXPLIBS = risc_oslib riscoslibm rstubs romstubs romcstubs RLIBEXPLIBS = risc_oslib riscoslibm rstubs romstubs romcstubs
......
...@@ -169,6 +169,7 @@ HEADERS =\ ...@@ -169,6 +169,7 @@ HEADERS =\
CLIB:h.math \ CLIB:h.math \
CLIB:h.setjmp \ CLIB:h.setjmp \
CLIB:h.signal \ CLIB:h.signal \
CLIB:h.stdalign \
CLIB:h.stdarg \ CLIB:h.stdarg \
CLIB:h.stdatomic \ CLIB:h.stdatomic \
CLIB:h.stdbool \ CLIB:h.stdbool \
...@@ -176,10 +177,12 @@ HEADERS =\ ...@@ -176,10 +177,12 @@ HEADERS =\
CLIB:h.stdint \ CLIB:h.stdint \
CLIB:h.stdio \ CLIB:h.stdio \
CLIB:h.stdlib \ CLIB:h.stdlib \
CLIB:h.stdnoreturn \
CLIB:h.string \ CLIB:h.string \
CLIB:h.swis \ CLIB:h.swis \
CLIB:h.tgmath \ CLIB:h.tgmath \
CLIB:h.time \ CLIB:h.time \
CLIB:h.uchar \
CLIB:h.varargs \ CLIB:h.varargs \
CLIB:h.wchar \ CLIB:h.wchar \
CLIB:h.wctype \ CLIB:h.wctype \
...@@ -698,6 +701,7 @@ CLIB:h.locale: clib.h.locale; ${CP} clib.h.locale $@ ${CPFLAGS} ...@@ -698,6 +701,7 @@ CLIB:h.locale: clib.h.locale; ${CP} clib.h.locale $@ ${CPFLAGS}
CLIB:h.math: clib.h.math; ${CP} clib.h.math $@ ${CPFLAGS} CLIB:h.math: clib.h.math; ${CP} clib.h.math $@ ${CPFLAGS}
CLIB:h.setjmp: clib.h.setjmp; ${CP} clib.h.setjmp $@ ${CPFLAGS} CLIB:h.setjmp: clib.h.setjmp; ${CP} clib.h.setjmp $@ ${CPFLAGS}
CLIB:h.signal: clib.h.signal; ${CP} clib.h.signal $@ ${CPFLAGS} CLIB:h.signal: clib.h.signal; ${CP} clib.h.signal $@ ${CPFLAGS}
CLIB:h.stdalign: clib.h.stdalign; ${CP} clib.h.stdalign $@ ${CPFLAGS}
CLIB:h.stdarg: clib.h.stdarg; ${CP} clib.h.stdarg $@ ${CPFLAGS} CLIB:h.stdarg: clib.h.stdarg; ${CP} clib.h.stdarg $@ ${CPFLAGS}
CLIB:h.stdatomic: clib.h.stdatomic; ${CP} clib.h.stdatomic $@ ${CPFLAGS} CLIB:h.stdatomic: clib.h.stdatomic; ${CP} clib.h.stdatomic $@ ${CPFLAGS}
CLIB:h.stdbool: clib.h.stdbool; ${CP} clib.h.stdbool $@ ${CPFLAGS} CLIB:h.stdbool: clib.h.stdbool; ${CP} clib.h.stdbool $@ ${CPFLAGS}
...@@ -705,9 +709,11 @@ CLIB:h.stddef: clib.h.stddef; ${CP} clib.h.stddef $@ ${CPFLAGS} ...@@ -705,9 +709,11 @@ CLIB:h.stddef: clib.h.stddef; ${CP} clib.h.stddef $@ ${CPFLAGS}
CLIB:h.stdint: clib.h.stdint; ${CP} clib.h.stdint $@ ${CPFLAGS} CLIB:h.stdint: clib.h.stdint; ${CP} clib.h.stdint $@ ${CPFLAGS}
CLIB:h.stdio: clib.h.stdio; ${CP} clib.h.stdio $@ ${CPFLAGS} CLIB:h.stdio: clib.h.stdio; ${CP} clib.h.stdio $@ ${CPFLAGS}
CLIB:h.stdlib: clib.h.stdlib; ${CP} clib.h.stdlib $@ ${CPFLAGS} CLIB:h.stdlib: clib.h.stdlib; ${CP} clib.h.stdlib $@ ${CPFLAGS}
CLIB:h.stdnoreturn: clib.h.stdnoreturn; ${CP} clib.h.stdnoreturn $@ ${CPFLAGS}
CLIB:h.string: clib.h.string; ${CP} clib.h.string $@ ${CPFLAGS} CLIB:h.string: clib.h.string; ${CP} clib.h.string $@ ${CPFLAGS}
CLIB:h.tgmath: clib.h.tgmath; ${CP} clib.h.tgmath $@ ${CPFLAGS} CLIB:h.tgmath: clib.h.tgmath; ${CP} clib.h.tgmath $@ ${CPFLAGS}
CLIB:h.time: clib.h.time; ${CP} clib.h.time $@ ${CPFLAGS} CLIB:h.time: clib.h.time; ${CP} clib.h.time $@ ${CPFLAGS}
CLIB:h.uchar: clib.h.uchar; ${CP} clib.h.uchar $@ ${CPFLAGS}
CLIB:h.varargs: clib.h.varargs; ${CP} clib.h.varargs $@ ${CPFLAGS} CLIB:h.varargs: clib.h.varargs; ${CP} clib.h.varargs $@ ${CPFLAGS}
CLIB:h.wchar: clib.h.wchar; ${CP} clib.h.wchar $@ ${CPFLAGS} CLIB:h.wchar: clib.h.wchar; ${CP} clib.h.wchar $@ ${CPFLAGS}
CLIB:h.wctype: clib.h.wctype; ${CP} clib.h.wctype $@ ${CPFLAGS} CLIB:h.wctype: clib.h.wctype; ${CP} clib.h.wctype $@ ${CPFLAGS}
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate GBLS Module_ApplicationDate
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
Module_MajorVersion SETS "6.14" Module_MajorVersion SETS "6.15"
Module_Version SETA 614 Module_Version SETA 615
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "20 Aug 2022" Module_Date SETS "21 Sep 2022"
Module_ApplicationDate SETS "20-Aug-22" Module_ApplicationDate SETS "21-Sep-22"
Module_ComponentName SETS "RISC_OSLib" Module_ComponentName SETS "RISC_OSLib"
Module_FullVersion SETS "6.14" Module_FullVersion SETS "6.15"
Module_HelpVersion SETS "6.14 (20 Aug 2022)" Module_HelpVersion SETS "6.15 (21 Sep 2022)"
END END
/* (6.14) /* (6.15)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 6.14 #define Module_MajorVersion_CMHG 6.15
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 20 Aug 2022 #define Module_Date_CMHG 21 Sep 2022
#define Module_MajorVersion "6.14" #define Module_MajorVersion "6.15"
#define Module_Version 614 #define Module_Version 615
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "20 Aug 2022" #define Module_Date "21 Sep 2022"
#define Module_ApplicationDate "20-Aug-22" #define Module_ApplicationDate "21-Sep-22"
#define Module_ComponentName "RISC_OSLib" #define Module_ComponentName "RISC_OSLib"
#define Module_FullVersion "6.14" #define Module_FullVersion "6.15"
#define Module_HelpVersion "6.14 (20 Aug 2022)" #define Module_HelpVersion "6.15 (21 Sep 2022)"
#define Module_LibraryVersionInfo "6:14" #define Module_LibraryVersionInfo "6:15"
...@@ -31,10 +31,17 @@ ...@@ -31,10 +31,17 @@
/* maximum value for an object of type signed char */ /* maximum value for an object of type signed char */
#define UCHAR_MAX 0xFF #define UCHAR_MAX 0xFF
/* maximum value for an object of type unsigned char */ /* maximum value for an object of type unsigned char */
#ifdef __FEATURE_SIGNED_CHAR
#define CHAR_MIN (-0x80)
/* minimum value for an object of type char */
#define CHAR_MAX 0x7F
/* maximum value for an object of type char */
#else
#define CHAR_MIN 0 #define CHAR_MIN 0
/* minimum value for an object of type char */ /* minimum value for an object of type char */
#define CHAR_MAX 0xFF #define CHAR_MAX 0xFF
/* maximum value for an object of type char */ /* maximum value for an object of type char */
#endif
#define MB_LEN_MAX 1 #define MB_LEN_MAX 1
/* maximum number of bytes in a multibyte character, */ /* maximum number of bytes in a multibyte character, */
/* for any supported locale */ /* for any supported locale */
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/* math.h: ISO 'C' (9899:1999) library header, section 7.12 */ /* math.h: ISO 'C' (9899:1999) library header, section 7.12 */
/* Copyright (C) Codemist Ltd. */ /* Copyright (C) Codemist Ltd. */
/* Copyright (C) Acorn Computers Ltd. 1991 */ /* Copyright (C) Acorn Computers Ltd. 1991 */
/* version 0.07 */ /* version 0.08 */
#ifndef __math_h #ifndef __math_h
#define __math_h #define __math_h
...@@ -612,7 +612,9 @@ double __d_fma(double,double,double); ...@@ -612,7 +612,9 @@ double __d_fma(double,double,double);
#define rint(x) __d_rint(x) #define rint(x) __d_rint(x)
#define lrint(x) __d_lrint(x) #define lrint(x) __d_lrint(x)
#define remainder(x,y) __d_rem(x,y) #define remainder(x,y) __d_rem(x,y)
#define fma(x,y,z) __d_fma(x,y,z) #ifdef __FP_FAST_FMA
# define fma(x,y,z) __d_fma(x,y,z)
#endif
#ifndef __cplusplus #ifndef __cplusplus
__caller_narrow float __r_acos(float); __caller_narrow float __r_acos(float);
__caller_narrow float __r_asin(float); __caller_narrow float __r_asin(float);
...@@ -651,7 +653,9 @@ __caller_narrow float __r_fma(float,float,float); ...@@ -651,7 +653,9 @@ __caller_narrow float __r_fma(float,float,float);
#define rintf(x) __r_rint(x) #define rintf(x) __r_rint(x)
#define lrintf(x) __r_lrint(x) #define lrintf(x) __r_lrint(x)
#define remainderf(x,y) __r_rem(x,y) #define remainderf(x,y) __r_rem(x,y)
#define fmaf(x,y,z) __r_fma(x,y,z) #ifdef __FP_FAST_FMAF
# define fmaf(x,y,z) __r_fma(x,y,z)
#endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -47,6 +47,7 @@ typedef int jmp_buf[22]; /* size suitable for the ARM */ ...@@ -47,6 +47,7 @@ typedef int jmp_buf[22]; /* size suitable for the ARM */
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
#define _Noreturn
extern "C" { extern "C" {
#endif #endif
int setjmp(jmp_buf /*env*/); int setjmp(jmp_buf /*env*/);
...@@ -57,7 +58,7 @@ int setjmp(jmp_buf /*env*/); ...@@ -57,7 +58,7 @@ int setjmp(jmp_buf /*env*/);
* function, the setjmp function returns a non zero value. * function, the setjmp function returns a non zero value.
*/ */
void longjmp(jmp_buf /*env*/, int /*val*/); void _Noreturn longjmp(jmp_buf /*env*/, int /*val*/);
/* Restores the environment saved by the most recent call to setjmp in the /* Restores the environment saved by the most recent call to setjmp in the
* same invocation of the program, with the corresponding jmp_buf argument. * same invocation of the program, with the corresponding jmp_buf argument.
* If there has been no such call, or if the function containing the call * If there has been no such call, or if the function containing the call
......
/* Copyright 2020 RISC OS Open Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma force_top_level
#pragma include_only_once
/* stdalign.h: ISO 'C' (9899:2018) library header, section 7.15 */
/* Copyright (C) RISC OS Open Ltd. 2020 */
#ifndef __stdalign_h
#define __stdalign_h
#define alignas _Alignas
#define __alignas_is_defined 1
#define alignof _Alignof
#define __alignof_is_defined 1
#endif
/* end of stdalign.h */
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
#pragma force_top_level #pragma force_top_level
#pragma include_only_once #pragma include_only_once
/* stddef.h: ISO 'C' (9899:1999) library header, section 7.17 */ /* stddef.h: ISO 'C' (9899:2018) library header, section 7.19 */
/* Copyright (C) Codemist Ltd. */ /* Copyright (C) Codemist Ltd. */
/* Copyright (C) Acorn Computers Ltd. 1991, 1992 */ /* Copyright (C) Acorn Computers Ltd. 1991, 1992 */
/* version 2.01 */ /* version 2.02 */
/* /*
* The following types and macros are defined in several headers referred to in * The following types and macros are defined in several headers referred to in
...@@ -53,6 +53,18 @@ typedef int wchar_t; /* also in <stdlib.h> */ ...@@ -53,6 +53,18 @@ typedef int wchar_t; /* also in <stdlib.h> */
*/ */
#endif #endif
#ifdef __STDC_VERSION__
#if __STDC_VERSION__ >= 201112
typedef union
{ long long int __a;
long double __b;
void *__c;
void (*__d)(void);
} max_align_t;
/* an object whose alignment is the greatest fundamental alignment. */
#endif
#endif
#ifndef NULL /* this hack is so that <stdio.h> can also define it */ #ifndef NULL /* this hack is so that <stdio.h> can also define it */
# define NULL 0 # define NULL 0
/* null pointer constant. */ /* null pointer constant. */
......
...@@ -90,6 +90,7 @@ typedef struct lldiv_t { long long int quot, rem; } lldiv_t; ...@@ -90,6 +90,7 @@ typedef struct lldiv_t { long long int quot, rem; } lldiv_t;
#ifdef __cplusplus #ifdef __cplusplus
#define restrict #define restrict
#define _Noreturn
extern "C" { extern "C" {
#else #else
#define restrict __restrict #define restrict __restrict
...@@ -328,7 +329,7 @@ char *malloc(size_t /*size*/); ...@@ -328,7 +329,7 @@ char *malloc(size_t /*size*/);
char *realloc(void * /*ptr*/, size_t /*size*/); char *realloc(void * /*ptr*/, size_t /*size*/);
#endif #endif
#else #else
#if defined(DDE) || (__STDC_VERSION__ >= 201112) #if __STDC_VERSION__ >= 201112
void *aligned_alloc(size_t /*alignment*/, size_t /*size*/); void *aligned_alloc(size_t /*alignment*/, size_t /*size*/);
/* /*
* allocates space for an object whose alignment is specified by alignment, * allocates space for an object whose alignment is specified by alignment,
...@@ -374,7 +375,7 @@ void *realloc(void * /*ptr*/, size_t /*size*/); ...@@ -374,7 +375,7 @@ void *realloc(void * /*ptr*/, size_t /*size*/);
*/ */
#endif #endif
void abort(void); void _Noreturn abort(void);
/* /*
* causes abnormal program termination to occur, unless the signal SIGABRT * causes abnormal program termination to occur, unless the signal SIGABRT
* is being caught and the signal handler does not return. Whether open * is being caught and the signal handler does not return. Whether open
...@@ -391,7 +392,7 @@ int atexit(void (* /*func*/)(void)); ...@@ -391,7 +392,7 @@ int atexit(void (* /*func*/)(void));
* least 32 functions. * least 32 functions.
* Returns: zero if the registration succeeds, nonzero if it fails. * Returns: zero if the registration succeeds, nonzero if it fails.
*/ */
void exit(int /*status*/); void _Noreturn exit(int /*status*/);
/* /*
* causes normal program termination to occur. If more than one call to the * causes normal program termination to occur. If more than one call to the
* exit function is executed by a program, the behaviour is undefined. * exit function is executed by a program, the behaviour is undefined.
...@@ -408,7 +409,7 @@ void exit(int /*status*/); ...@@ -408,7 +409,7 @@ void exit(int /*status*/);
* status is returned under RISC OS). * status is returned under RISC OS).
*/ */
#ifdef __STDC_VERSION__ #ifdef __STDC_VERSION__
#if defined(DDE) || (__STDC_VERSION__ >= 201112) #if __STDC_VERSION__ >= 201112
int at_quick_exit(void (* /*func*/)(void)); int at_quick_exit(void (* /*func*/)(void));
/* /*
* register the function pointed to by func, to be called without arguments * register the function pointed to by func, to be called without arguments
...@@ -416,7 +417,7 @@ int at_quick_exit(void (* /*func*/)(void)); ...@@ -416,7 +417,7 @@ int at_quick_exit(void (* /*func*/)(void));
* least 32 functions. * least 32 functions.
* Returns: zero if the registration succeeds, nonzero if it fails. * Returns: zero if the registration succeeds, nonzero if it fails.
*/ */
void quick_exit(int /*status*/); void _Noreturn quick_exit(int /*status*/);
/* /*
* causes normal program termination to occur. No functions registered by * causes normal program termination to occur. No functions registered by
* the atexit function or signal handlers registered by the signal function * the atexit function or signal handlers registered by the signal function
...@@ -437,7 +438,7 @@ void quick_exit(int /*status*/); ...@@ -437,7 +438,7 @@ void quick_exit(int /*status*/);
#endif #endif
#endif #endif
void _Exit(int /*status*/); void _Noreturn _Exit(int /*status*/);
/* /*
* causes normal program termination to occur and control to be returned to * causes normal program termination to occur and control to be returned to
* the host environment. No functions registered by the atexit function or * the host environment. No functions registered by the atexit function or
......
/* Copyright 2020 RISC OS Open Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma force_top_level
#pragma include_only_once
/* stdnoreturn.h: ISO 'C' (9899:2018) library header, section 7.23 */
/* Copyright (C) RISC OS Open Ltd. 2020 */
#ifndef __stdnoreturn_h
#define __stdnoreturn_h
#define noreturn _Noreturn
#endif
/* end of stdnoreturn.h */
...@@ -113,7 +113,7 @@ time_t time(time_t * /*timer*/); ...@@ -113,7 +113,7 @@ time_t time(time_t * /*timer*/);
* not available. If timer is not a null pointer, the return value * not available. If timer is not a null pointer, the return value
* is also assigned to the object it points to. * is also assigned to the object it points to.
*/ */
#if defined(DDE) || (__STDC_VERSION__ >= 201112) #if __STDC_VERSION__ >= 201112
struct timespec { struct timespec {
time_t tv_sec; /* whole seconds, >= 0 */ time_t tv_sec; /* whole seconds, >= 0 */
long tv_nsec; /* nanoseconds, 0 to 999999999 */ long tv_nsec; /* nanoseconds, 0 to 999999999 */
......
/* Copyright 2020 RISC OS Open Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma force_top_level
#pragma include_only_once
/* uchar.h: ISO 'C' (9899:2018) library header, section 7.28 */
/*
* The header <uchar.h> declares types and functions for manipulating
* Unicode characters.
*/
#ifndef __uchar_h
#define __uchar_h
#ifndef __size_t
# define __size_t 1
typedef unsigned int size_t; /* from <stddef.h> */
#endif
#ifndef __mbstate_t
# define __mbstate_t 1
typedef struct __mbstate_struct /* from <wchar.h> */
{
wchar_t __c; /* current character? */
int __n; /* pending bytes? */
wchar_t __min;
} mbstate_t;
/*
* an object type other than an array type that can hold the conversion
* state information necessary to convert between sequences of multibyte
* characters and wide characters
*/
#endif
typedef unsigned short char16_t;
/*
* an unsigned integer type used for 16-bit characters
*/
typedef unsigned int char32_t;
/*
* an unsigned integer type used for 32-bit characters
*/
size_t mbrtoc16(char16_t * restrict /*pc16*/, const char * restrict /*s*/,
size_t /*n*/, mbstate_t * restrict /*ps*/);
/*
* inspects at most n bytes beginning with the byte pointed to by s to
* determine the number of bytes needed to complete the next multibyte
* character (including any shift sequences). If the function determines that
* the next multibyte character is complete and valid, it determines the
* value of the corresponding wide character and then, if pc16 is not a null
* pointer, stores that value in the object pointed to by pc16. If the
* corresponding wide character is the null wide character, the resulting
* state described is the initial conversion state.
*/
size_t c16rtomb(char * restrict /*s*/, char16_t /*c16*/,
mbstate_t * restrict /*ps*/);
/*
* determines the number of bytes need to represent the multibyte character
* that corresponds to the wide character given by c16 (including any
* shift sequences), and stores the multibyte character representation in the
* array whose first element is pointed to by s. At most MB_CUR_MAX bytes
* are stored. If c16 is a null wide character, a null byte is stored,
* preceded by any shift sequence needed to restore the initial shift state;
* the resulting state described is the initial conversion state.
*/
size_t mbrtoc32(char32_t * restrict /*pc32*/, const char * restrict /*s*/,
size_t /*n*/, mbstate_t * restrict /*ps*/);
/*
* inspects at most n bytes beginning with the byte pointed to by s to
* determine the number of bytes needed to complete the next multibyte
* character (including any shift sequences). If the function determines that
* the next multibyte character is complete and valid, it determines the
* value of the corresponding wide character and then, if pc32 is not a null
* pointer, stores that value in the object pointed to by pc32. If the
* corresponding wide character is the null wide character, the resulting
* state described is the initial conversion state.
*/
size_t c32rtomb(char * restrict /*s*/, char32_t /*c32*/,
mbstate_t * restrict /*ps*/);
/*
* determines the number of bytes need to represent the multibyte character
* that corresponds to the wide character given by c32 (including any
* shift sequences), and stores the multibyte character representation in the
* array whose first element is pointed to by s. At most MB_CUR_MAX bytes
* are stored. If c32 is a null wide character, a null byte is stored,
* preceded by any shift sequence needed to restore the initial shift state;
* the resulting state described is the initial conversion state.
*/
#endif
/* end of uchar.h */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment