📄 stdlib.h
字号:
extern _ARMABI_PURE lldiv_t lldiv(long long /*numer*/, long long /*denom*/);
/*
* computes the quotient and remainder of the division of the numerator
* numer by the denominator denom. If the division is inexact, the sign of
* the resulting quotient is that of the algebraic quotient, and the
* magnitude of the resulting quotient is the largest integer less than the
* magnitude of the algebraic quotient. If the result cannot be represented,
* the behaviour is undefined; otherwise, quot * denom + rem shall equal
* numer.
* Returns: a structure of type lldiv_t, comprising both the quotient and the
* remainder. the structure shall contain the following members,
* in either order.
* long long quot; long long rem;
*/
#ifdef __cplusplus
extern "C++" inline _ARMABI_PURE lldiv_t div(long long __numer, long long __denom) {
return lldiv(__numer, __denom);
}
#endif
#endif
/*
* ARM real-time divide functions for guaranteed performance
*/
typedef struct __sdiv32by16 { int quot, rem; } __sdiv32by16;
typedef struct __udiv32by16 { unsigned int quot, rem; } __udiv32by16;
/* used int so that values return in separate regs, although 16-bit */
typedef struct __sdiv64by32 { int rem, quot; } __sdiv64by32;
__value_in_regs extern _ARMABI_PURE __sdiv32by16 __rt_sdiv32by16(
int /*numer*/,
short int /*denom*/);
/*
* Signed divide: (16-bit quot), (16-bit rem) = (32-bit) / (16-bit)
*/
__value_in_regs extern _ARMABI_PURE __udiv32by16 __rt_udiv32by16(
unsigned int /*numer*/,
unsigned short /*denom*/);
/*
* Unsigned divide: (16-bit quot), (16-bit rem) = (32-bit) / (16-bit)
*/
__value_in_regs extern _ARMABI_PURE __sdiv64by32 __rt_sdiv64by32(
int /*numer_h*/, unsigned int /*numer_l*/,
int /*denom*/);
/*
* Signed divide: (32-bit quot), (32-bit rem) = (64-bit) / (32-bit)
*/
/*
* ARM floating-point mask/status function (for both hardfp and softfp)
*/
extern _ARMABI unsigned int __fp_status(unsigned int /*mask*/, unsigned int /*flags*/);
/*
* mask and flags are bit-fields which correspond directly to the
* floating point status register in the FPE/FPA and fplib.
* __fp_status returns the current value of the status register,
* and also sets the writable bits of the word
* (the exception control and flag bytes) to:
*
* new = (old & ~mask) ^ flags;
*/
#define __fpsr_IXE 0x100000
#define __fpsr_UFE 0x80000
#define __fpsr_OFE 0x40000
#define __fpsr_DZE 0x20000
#define __fpsr_IOE 0x10000
#define __fpsr_IXC 0x10
#define __fpsr_UFC 0x8
#define __fpsr_OFC 0x4
#define __fpsr_DZC 0x2
#define __fpsr_IOC 0x1
/*
* Multibyte Character Functions.
* The behaviour of the multibyte character functions is affected by the
* LC_CTYPE category of the current locale. For a state-dependent encoding,
* each function is placed into its initial state by a call for which its
* character pointer argument, s, is a null pointer. Subsequent calls with s
* as other than a null pointer cause the internal state of the function to be
* altered as necessary. A call with s as a null pointer causes these functions
* to return a nonzero value if encodings have state dependency, and a zero
* otherwise. After the LC_CTYPE category is changed, the shift state of these
* functions is indeterminate.
*/
extern _ARMABI int mblen(const char * /*s*/, size_t /*n*/);
/*
* If s is not a null pointer, the mblen function determines the number of
* bytes compromising the multibyte character pointed to by s. Except that
* the shift state of the mbtowc function is not affected, it is equivalent
* to mbtowc((wchar_t *)0, s, n);
* Returns: If s is a null pointer, the mblen function returns a nonzero or
* zero value, if multibyte character encodings, respectively, do
* or do not have state-dependent encodings. If s is not a null
* pointer, the mblen function either returns a 0 (if s points to a
* null character), or returns the number of bytes that compromise
* the multibyte character (if the next n of fewer bytes form a
* valid multibyte character), or returns -1 (they do not form a
* valid multibyte character).
*/
extern _ARMABI int mbtowc(wchar_t * /*pwc*/, const char * /*s*/, size_t /*n*/);
/*
* If s is not a null pointer, the mbtowc function determines the number of
* bytes that compromise the multibyte character pointed to by s. It then
* determines the code for value of type wchar_t that corresponds to that
* multibyte character. (The value of the code corresponding to the null
* character is zero). If the multibyte character is valid and pwc is not a
* null pointer, the mbtowc function stores the code in the object pointed
* to by pwc. At most n bytes of the array pointed to by s will be examined.
* Returns: If s is a null pointer, the mbtowc function returns a nonzero or
* zero value, if multibyte character encodings, respectively, do
* or do not have state-dependent encodings. If s is not a null
* pointer, the mbtowc function either returns a 0 (if s points to
* a null character), or returns the number of bytes that
* compromise the converted multibyte character (if the next n of
* fewer bytes form a valid multibyte character), or returns -1
* (they do not form a valid multibyte character).
*/
extern _ARMABI int wctomb(char * /*s*/, wchar_t /*wchar*/);
/*
* determines the number of bytes need to represent the multibyte character
* corresponding to the code whose value is wchar (including any change in
* shift state). It stores the multibyte character representation in the
* array object pointed to by s (if s is not a null pointer). At most
* MB_CUR_MAX characters are stored. If the value of wchar is zero, the
* wctomb function is left in the initial shift state).
* Returns: If s is a null pointer, the wctomb function returns a nonzero or
* zero value, if multibyte character encodings, respectively, do
* or do not have state-dependent encodings. If s is not a null
* pointer, the wctomb function returns a -1 if the value of wchar
* does not correspond to a valid multibyte character, or returns
* the number of bytes that compromise the multibyte character
* corresponding to the value of wchar.
*/
/*
* Multibyte String Functions.
* The behaviour of the multibyte string functions is affected by the LC_CTYPE
* category of the current locale.
*/
extern _ARMABI size_t mbstowcs(wchar_t * /*pwcs*/, const char * /*s*/, size_t /*n*/);
/*
* converts a sequence of multibyte character that begins in the initial
* shift state from the array pointed to by s into a sequence of
* corresponding codes and stores not more than n codes into the array
* pointed to by pwcs. No multibyte character that follow a null character
* (which is converted into a code with value zero) will be examined or
* converted. Each multibyte character is converted as if by a call to
* mbtowc function, except that the shift state of the mbtowc function is
* not affected. No more than n elements will be modified in the array
* pointed to by pwcs. If copying takes place between objects that overlap,
* the behaviour is undefined.
* Returns: If an invalid multibyte character is encountered, the mbstowcs
* function returns (size_t)-1. Otherwise, the mbstowcs function
* returns the number of array elements modified, not including
* a terminating zero code, if any.
*/
extern _ARMABI size_t wcstombs(char * /*s*/, const wchar_t * /*pwcs*/, size_t /*n*/);
/*
* converts a sequence of codes that correspond to multibyte characters
* from the array pointed to by pwcs into a sequence of multibyte
* characters that begins in the initial shift state and stores these
* multibyte characters into the array pointed to by s, stopping if a
* multibyte character would exceed the limit of n total bytes or if a
* null character is stored. Each code is converted as if by a call to the
* wctomb function, except that the shift state of the wctomb function is
* not affected. No more than n elements will be modified in the array
* pointed to by s. If copying takes place between objects that overlap,
* the behaviour is undefined.
* Returns: If a code is encountered that does not correspond to a valid
* multibyte character, the wcstombs function returns (size_t)-1.
* Otherwise, the wcstombs function returns the number of bytes
* modified, not including a terminating null character, if any.
*/
extern _ARMABI void __use_realtime_heap(void);
extern _ARMABI void __use_realtime_division(void);
extern _ARMABI void __use_two_region_memory(void);
extern _ARMABI void __use_no_heap(void);
extern _ARMABI void __use_no_heap_region(void);
extern _ARMABI char const *__C_library_version_string(void);
extern _ARMABI int __C_library_version_number(void);
#ifdef __cplusplus
} /* extern "C" */
} /* namespace std */
#endif /* __cplusplus */
#endif /* __STDLIB_DECLS */
#ifdef __cplusplus
#ifndef __STDLIB_NO_EXPORTS
#if !defined(__STRICT_ANSI__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__)
using ::std::atoll;
using ::std::strtoll;
using ::std::strtoull;
using ::std::lldiv_t;
#endif /*!defined(__STRICT_ANSI__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__)*/
using ::std::div_t;
using ::std::ldiv_t;
using ::std::atof;
using ::std::atoi;
using ::std::atol;
using ::std::strtod;
using ::std::strtol;
using ::std::strtoul;
using ::std::rand;
using ::std::srand;
using ::std::calloc;
using ::std::free;
using ::std::malloc;
using ::std::realloc;
using ::std::__heapprt;
using ::std::__heapstats;
using ::std::__heapvalid;
using ::std::abort;
using ::std::atexit;
using ::std::exit;
using ::std::getenv;
using ::std::system;
using ::std::bsearch;
using ::std::qsort;
using ::std::abs;
using ::std::div;
using ::std::labs;
using ::std::ldiv;
#ifndef __STRICT_ANSI__
using ::std::llabs;
using ::std::lldiv;
#endif /* __STRICT_ANSI__ */
using ::std::__sdiv32by16;
using ::std::__udiv32by16;
using ::std::__sdiv64by32;
using ::std::__rt_sdiv32by16;
using ::std::__rt_udiv32by16;
using ::std::__rt_sdiv64by32;
using ::std::__fp_status;
using ::std::mblen;
using ::std::mbtowc;
using ::std::wctomb;
using ::std::mbstowcs;
using ::std::wcstombs;
using ::std::__use_realtime_heap;
using ::std::__use_two_region_memory;
using ::std::__C_library_version_string;
using ::std::__C_library_version_number;
using ::std::size_t;
using ::std::__mb_cur_max;
#endif /* __STDLIB_NO_EXPORTS */
#endif /* __cplusplus */
#endif
/* end of stdlib.h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -