From b8621b671ffce31002c06f707658f848dd0c0d2a Mon Sep 17 00:00:00 2001 From: solar Date: Sun, 14 Nov 2004 13:09:07 +0000 Subject: [PATCH] Removing old files. --- includes/assert.h | 37 -- includes/ctype.h | 60 -- includes/fenv.h | 58 -- includes/inttypes.h | 262 --------- includes/limits.h | 59 -- includes/math.h | 1317 ------------------------------------------- includes/signal.h | 49 -- includes/stdbool.h | 35 -- includes/stdint.h | 143 ----- includes/stdlib.h | 112 ---- includes/tgmath.h | 18 - includes/wchar.h | 121 ---- 12 files changed, 2271 deletions(-) delete mode 100644 includes/assert.h delete mode 100644 includes/ctype.h delete mode 100644 includes/fenv.h delete mode 100644 includes/inttypes.h delete mode 100644 includes/limits.h delete mode 100644 includes/math.h delete mode 100644 includes/signal.h delete mode 100644 includes/stdbool.h delete mode 100644 includes/stdint.h delete mode 100644 includes/stdlib.h delete mode 100644 includes/tgmath.h delete mode 100644 includes/wchar.h diff --git a/includes/assert.h b/includes/assert.h deleted file mode 100644 index 7bd6e41..0000000 --- a/includes/assert.h +++ /dev/null @@ -1,37 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Diagnostics - * --------------------------------------------------------------------------*/ - -#ifndef _ASSERT_H -#define _ASSERT_H _ASSERT_H - -/* ---------------------------------------------------------------------------- - * AUXILIARY - * --------------------------------------------------------------------------*/ - -/* Helper function doing the print to stderr and call to abort(). */ -void __assert( char const * const expression, /* the tested expression */ - char const * const file, /* name of source file */ - char const * const function, /* name of function */ - int const line ); /* number of source file line */ - -#endif /* _ASSERT_H - note that the header guard ends here on purpose. The - assert macro is redefined upon each inclusion, in - dependence of NDEBUG. */ - -/* ---------------------------------------------------------------------------- - * DEFINES - * --------------------------------------------------------------------------*/ - -#undef assert -#if defined NDEBUG -#define assert( x ) ( (void) 0 ) -#else -#define assert( x ) ( x ) ? ( (void) 0 ) \ - : __assert( #x, __FILE__, __func__, __LINE__ ) -#endif diff --git a/includes/ctype.h b/includes/ctype.h deleted file mode 100644 index 96f288c..0000000 --- a/includes/ctype.h +++ /dev/null @@ -1,60 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Character handling - * --------------------------------------------------------------------------*/ - -#ifndef _CTYPE_H -#define _CTYPE_H _CTYPE_H - -/* ---------------------------------------------------------------------------- - * FUNCTIONS - * --------------------------------------------------------------------------*/ - -/* returns nonzero if c is alphanumeric in the locale. */ -int isalnum( int c ); - -/* returns nonzero if c is alphabetic character in the locale. */ -int isalpha( int c ); - -/* returns nonzero if c is a horizontal blank in the locale. */ -int isblank( int c ); - -/* returns nonzero if c is a control character in the locale. */ -int iscntrl( int c ); - -/* returns nonzero if c is a digit in the locale. */ -int isdigit( int c ); - -/* returns nonzero if c is alphanumeric or a punctuation in the locale. */ -int isgraph( int c ); - -/* returns nonzero if c is a lowercase alphabetic character in the locale. */ -int islower( int c ); - -/* returns nonzero if c is a printable character ( isgraph() or isblank() ) in - * the locale. */ -int isprint( int c ); - -/* returns nonzero if c is a punctuation in the locale. */ -int ispunct( int c ); - -/* returns nonzero if c is a whitespace in the locale. */ -int isspace( int c ); - -/* returns nonzero if c is an uppercase alphabetical character in the locale. */ -int isupper( int c ); - -/* returns nonzero if c is a hexedecimal digit in the locale. */ -int isxdigit( int c ); - -/* returns lowercase equivalent for c in locale. */ -int tolower( int c ); - -/* returns uppercase equivalent for c in locale. */ -int toupper( int c ); - -#endif /* _CTYPE_H */ diff --git a/includes/fenv.h b/includes/fenv.h deleted file mode 100644 index 7a0d9f3..0000000 --- a/includes/fenv.h +++ /dev/null @@ -1,58 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Floating-point environment - * --------------------------------------------------------------------------*/ - -#ifndef _FENV_H -#define _FENV_H _FENV_H - -/* TODO: Documentation */ - -/* ---------------------------------------------------------------------------- - * MACROS - * --------------------------------------------------------------------------*/ - -#define FE_DIVBYZERO /* TODO - to __intern.h / __personality.h? */ -#define FE_INEXACT /* TODO - to __intern.h / __personality.h? */ -#define FE_INVALID /* TODO - to __intern.h / __personality.h? */ -#define FE_OVERFLOW /* TODO - to __intern.h / __personality.h? */ -#define FE_UNDERFLOW /* TODO - to __intern.h / __personality.h? */ -#define FE_ALL_EXCEPT /* TODO - to __intern.h / __personality.h? */ - -#define FE_DOWNWARD /* TODO - to __intern.h / __personality.h? */ -#define FE_TONEAREST /* TODO - to __intern.h / __personality.h? */ -#define FE_TOWARDZERO /* TODO - to __intern.h / __personality.h? */ -#define FE_UPWARD /* TODO - to __intern.h / __personality.h? */ - -#define FE_DFL_ENV /* TODO - to __intern.h / __personality.h? */ - -/* ---------------------------------------------------------------------------- - * TYPEDEFS - * --------------------------------------------------------------------------*/ - -typedef fenv_t; /* TODO - to __intern.h / __personality.h? */ -typedef fexcept_t; /* TODO - to __intern.h / __personality.h? */ - -/* ---------------------------------------------------------------------------- - * FUNCTIONS - * --------------------------------------------------------------------------*/ - -int feclearexcept( int exceptions ); -int fegetexceptflag( fexcept_t * flags, int exceptions ); -int feraiseexcept( int exceptions ); -int fesetexceptflag( const fexcept_t * flags, int exceptions ); -int fetestexcept( int exceptions ); - -int fegetround( void ); -int fesetround( int mode ); - -int fegetenv( fenv_t * environment ); -int feholdexcept( fenv_t * environment ); -int fesetenv( const fenv_t * environment ); -int feupdateenv( const fenv_t * environment ); - -#endif /* _FENV_H */ diff --git a/includes/inttypes.h b/includes/inttypes.h deleted file mode 100644 index 944793a..0000000 --- a/includes/inttypes.h +++ /dev/null @@ -1,262 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Format conversion of integer types - * --------------------------------------------------------------------------*/ - -#ifndef _INTTYPES_H -#define _INTTYPES_H _INTTYPES_H - -/* TODO: Documentation */ - -/* ---------------------------------------------------------------------------- - * TYPEDEFS - * --------------------------------------------------------------------------*/ - -typedef struct -{ - intmax_t quotient, - intmax_t remainder; -} -imaxdiv_t; - -/* ---------------------------------------------------------------------------- - * FUNCTIONS - * --------------------------------------------------------------------------*/ - -intmax_t imaxabs( intmax_t i ); -imaxdiv_t imaxdiv( intmax_t numer, intmax_t denom ); - -intmax_t strtoimax( const char * restrict s, char * * restrict endptr, int base ); -uintmax_t strtoumax( const char * restrict s, char * * restrict endptr, int base ); -intmax_t wcstoimax( const wchar_t * restrict s, wchar_t * * restrict endptr, int base ); -uintmax_t wcstoumax( const wchar_t * restrict s, wchar_t * * restrict endptr, int base ); - -/* ---------------------------------------------------------------------------- - * MACROS (PRINT) - * --------------------------------------------------------------------------*/ - -#define PRId8 -#define PRId16 -#define PRId32 -#define PRId64 - -#define PRIdFAST8 -#define PRIdFAST16 -#define PRIdFAST32 -#define PRIdFAST64 - -#define PRIdLEAST8 -#define PRIdLEAST16 -#define PRIdLEAST32 -#define PRIdLEAST64 - -#define PRIdMAX -#define PRIdPTR - -#define PRIi8 -#define PRIi16 -#define PRIi32 -#define PRIi64 - -#define PRIiFAST8 -#define PRIiFAST16 -#define PRIiFAST32 -#define PRIiFAST64 - -#define PRIiLEAST8 -#define PRIiLEAST16 -#define PRIiLEAST32 -#define PRIiLEAST64 - -#define PRIiMAX -#define PRIiPTR - -#define PRIo8 -#define PRIo16 -#define PRIo32 -#define PRIo64 - -#define PRIoFAST8 -#define PRIoFAST16 -#define PRIoFAST32 -#define PRIoFAST64 - -#define PRIoLEAST8 -#define PRIoLEAST16 -#define PRIoLEAST32 -#define PRIoLEAST64 - -#define PRIoMAX -#define PRIoPTR - -#define PRIu8 -#define PRIu16 -#define PRIu32 -#define PRIu64 - -#define PRIuFAST8 -#define PRIuFAST16 -#define PRIuFAST32 -#define PRIuFAST64 - -#define PRIuLEAST8 -#define PRIuLEAST16 -#define PRIuLEAST32 -#define PRIuLEAST64 - -#define PRIuMAX -#define PRIuPTR - -#define PRIx8 -#define PRIx16 -#define PRIx32 -#define PRIx64 - -#define PRIxFAST8 -#define PRIxFAST16 -#define PRIxFAST32 -#define PRIxFAST64 - -#define PRIxLEAST8 -#define PRIxLEAST16 -#define PRIxLEAST32 -#define PRIxLEAST64 - -#define PRIxMAX -#define PRIxPTR - -#define PRIX8 -#define PRIX16 -#define PRIX32 -#define PRIX64 - -#define PRIXFAST8 -#define PRIXFAST16 -#define PRIXFAST32 -#define PRIXFAST64 - -#define PRIXLEAST8 -#define PRIXLEAST16 -#define PRIXLEAST32 -#define PRIXLEAST64 - -#define PRIXMAX -#define PRIXPTR - -/* ---------------------------------------------------------------------------- - * MACROS (SCAN) - * --------------------------------------------------------------------------*/ - -#define SCNd8 -#define SCNd16 -#define SCNd32 -#define SCNd64 - -#define SCNdFAST8 -#define SCNdFAST16 -#define SCNdFAST32 -#define SCNdFAST64 - -#define SCNdLEAST8 -#define SCNdLEAST16 -#define SCNdLEAST32 -#define SCNdLEAST64 - -#define SCNdMAX -#define SCNdPTR - -#define SCNi8 -#define SCNi16 -#define SCNi32 -#define SCNi64 - -#define SCNiFAST8 -#define SCNiFAST16 -#define SCNiFAST32 -#define SCNiFAST64 - -#define SCNiLEAST8 -#define SCNiLEAST16 -#define SCNiLEAST32 -#define SCNiLEAST64 - -#define SCNiMAX -#define SCNiPTR - -#define SCNo8 -#define SCNo16 -#define SCNo32 -#define SCNo64 - -#define SCNoFAST8 -#define SCNoFAST16 -#define SCNoFAST32 -#define SCNoFAST64 - -#define SCNoLEAST8 -#define SCNoLEAST16 -#define SCNoLEAST32 -#define SCNoLEAST64 - -#define SCNoMAX -#define SCNoPTR - -#define SCNu8 -#define SCNu16 -#define SCNu32 -#define SCNu64 - -#define SCNuFAST8 -#define SCNuFAST16 -#define SCNuFAST32 -#define SCNuFAST64 - -#define SCNuLEAST8 -#define SCNuLEAST16 -#define SCNuLEAST32 -#define SCNuLEAST64 - -#define SCNuMAX -#define SCNuPTR - -#define SCNx8 -#define SCNx16 -#define SCNx32 -#define SCNx64 - -#define SCNxFAST8 -#define SCNxFAST16 -#define SCNxFAST32 -#define SCNxFAST64 - -#define SCNxLEAST8 -#define SCNxLEAST16 -#define SCNxLEAST32 -#define SCNxLEAST64 - -#define SCNxMAX -#define SCNxPTR - -#define SCNX8 -#define SCNX16 -#define SCNX32 -#define SCNX64 - -#define SCNXFAST8 -#define SCNXFAST16 -#define SCNXFAST32 -#define SCNXFAST64 - -#define SCNXLEAST8 -#define SCNXLEAST16 -#define SCNXLEAST32 -#define SCNXLEAST64 - -#define SCNXMAX -#define SCNXPTR - -#endif /* _INTTYPES_H */ diff --git a/includes/limits.h b/includes/limits.h deleted file mode 100644 index 0d35495..0000000 --- a/includes/limits.h +++ /dev/null @@ -1,59 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Sizes of integer types - * ---------------------------------------------------------------------------- - * This header is part of a freestanding implementation - * --------------------------------------------------------------------------*/ - -#ifndef _LIMITS_H -#define _LIMITS_H _LIMITS_H - -/* ISO/IEC 9899:1999, ยง5.2.4.2.1 - * The values given below shall be replaced by constant expressions suitable - * for use in #if preprocessing directives. Moreover, except for CHAR_BIT and - * MB_LEN_MAX, the following shall be replaced by expressions that have the - * same type as would an expression that is an object of the corresponding type - * converted according to the integer promotions. Their implementation-defined - * values shall be equal or greater in magnitude (absolute value) to those - * shown, with the same sign. - */ - -/* This file is part of the platform personality, and is commonly generated - using the enquire utility (included). */ - -/* Limits of type 'char' */ -#define CHAR_BIT /* 8 */ -#define CHAR_MAX /* SCHAR_MAX / UCHAR_MAX */ -#define CHAR_MIN /* SCHAR_MIN / 0 */ -#define SCHAR_MAX /* +127 */ -#define SCHAR_MIN /* -127 */ -#define UCHAR_MAX /* 255 (2^CHAR_BIT - 1) */ - -/* Multibyte characters */ -#define MB_LEN_MAX /* 1 */ - -/* Limits of type 'short int' */ -#define SHRT_MAX /* +32767 */ -#define SHRT_MIN /* -32767 */ -#define USHRT_MAX /* 65535 */ - -/* Limits of type 'int' */ -#define INT_MAX /* +32767 */ -#define INT_MIN /* -32767 */ -#define UINT_MAX /* 65535 */ - -/* Limits of type 'long int' */ -#define LONG_MAX /* +2147483647 */ -#define LONG_MIN /* -2147483647 */ -#define ULONG_MAX /* 4294967295 */ - -/* Limits of type 'long long int' */ -#define LLONG_MAX /* +9223372036854775807 */ -#define LLONG_MIN /* -9223372036854775807 */ -#define ULLONG_MAX /* 18446744073709551615 */ - -#endif /* _LIMITS_H */ diff --git a/includes/math.h b/includes/math.h deleted file mode 100644 index 9070284..0000000 --- a/includes/math.h +++ /dev/null @@ -1,1317 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Mathematics - * --------------------------------------------------------------------------*/ - -#ifndef _MATH_H -#define _MATH_H _MATH_H - -/* TODO: Documentation */ - -/* ---------------------------------------------------------------------------- - * DEFINES - * --------------------------------------------------------------------------*/ - -#define HUGE_VAL ((double)0x7FF0000000000000) /* TODO */ -#define HUGE_VALF ((float)0x7F800000) /* TODO */ -#define HUGE_VALL ((long double)0x7FFF8000000000000000) /* TODO */ - -#define INFINITY ((float)0x7F800000) /* TODO */ -#define NAN ((float)0x7F800001) /* TODO */ - -/* The following values are platform dependant, must be personality. */ -#if 0 -#define FP_FAST_FMA /* TODO */ -#define FP_FAST_FMAF /* TODO */ -#define FP_FAST_FMAL /* TODO */ -#endif - -/* These values are used instead of constants to classify numbers. */ -#define FP_UNDEFINED 0 -#define FP_INFINITE 1 -#define FP_NAN 2 -#define FP_NORMAL 3 -#define FP_SUBNORMAL 4 -#define FP_ZERO 5 - -#define FP_ILOGB0 /* TODO */ -#define FP_ILOGBNAN /* TODO */ - -#define MATH_ERRNO 1 -#define MATH_ERREXCEPT 2 - -/* should be MATH_ERRNO | MATH_ERREXCEPT if we do exceptions. Do we? It's - * nice if this is implementation-wide the same. - */ -#define math_errhandling ((int)MATH_ERRNO) - -/* ---------------------------------------------------------------------------- - * TYPEDEFS - * --------------------------------------------------------------------------*/ - -typedef double_t -#if FLT_EVAL_METHOD == 0 - double -#elif FLT_EVAL_METHOD == 1 - double -#elif FLT_EVAL_METHOD == 2 - long double -#else - /* TODO - this is implementation defined and cpu dependant */ -#endif -; - -typedef float_t -#if FLT_EVAL_METHOD == 0 - float -#elif FLT_EVAL_METHOD == 1 - double -#elif FLT_EVAL_METHOD == 2 - long double -#else - /* TODO - this is implementation defined and cpu dependant */ -#endif -; - -/* ---------------------------------------------------------------------------- - * MACROS - * --------------------------------------------------------------------------*/ - -#define isgreater( x, y ) /* TODO */ -#define isgreaterequal( x, y ) /* TODO */ -#define isless( x, y ) /* TODO */ -#define islessequal( x, y ) /* TODO */ -#define islessgreater( x, y ) /* TODO */ -#define isunordered( x, y ) /* TODO */ - -/* Could somebody clean this macro up? It uses 7 other definitions (below). - * Also, I suspect this macro to be personality-dependant. Somebody confirm - * or deny? - */ -#define fp_mef 0x7F800000 -#define fp_mff 0x007FFFFF -#define fp_med 0x7FF0000000000000 -#define fp_mfd 0x000FFFFFFFFFFFFF -#define fp_mel 0x7FFF8000000000000000 -#define fp_mjl 0x00004000000000000000 // the j-bit mask -#define fp_mfl 0x00003FFFFFFFFFFFFFFF - -#define fpclassify( x ) ((sizeof(x) == sizeof(float)) ? ( \ - (((x) & fp_mef) == (fp_mef)) ? ( \ - (((x) & fp_mff) == (0)) ? ( \ - FP_INFINITY \ - ) : ( \ - FP_NAN \ - ) \ - ) : ( \ - (((x) & fp_mef) == (0)) ? ( \ - (((x) & fp_mff) == (0)) ? ( \ - FP_ZERO \ - ) : ( \ - FP_DENORMAL \ - ) \ - ) : ( \ - FP_NORMAL \ - ) \ - ) \ - ) : ( - (sizeof(x) == sizeof(double)) ? ( \ - (((x) & fp_med) == (fp_med)) ? ( \ - (((x) & fp_mfd) == (0)) ? ( \ - FP_INFINITY \ - ) : ( \ - FP_NAN \ - ) \ - ) : ( \ - (((x) & fp_med) == (0)) ? ( \ - (((x) & fp_mfd) == (0)) ? ( \ - FP_ZERO \ - ) : ( \ - FP_DENORMAL \ - ) \ - ) : ( \ - FP_NORMAL \ - ) \ - ) \ - ) : ( \ - (((x) & fp_mel) == (fp_mel)) ? ( \ - (((x) & fp_mjl) == (fp_mjl)) ? ( \ - FP_UNSUPPORTED \ - ) : ( \ - (((x) & fp_mfl) == (fp_mfl)) ? ( \ - FP_NAN \ - ) : ( \ - FP_INFINITY \ - ) \ - ) \ - ) : ( \ - (((x) & fp_mel) == (0)) ? ( \ - (((x) & fp_mjl) == (fp_mjl)) ? ( \ - FP_NORMAL \ // or actually, pseudo-denormal - ) : ( \ - (((x) & fp_mfl) == (fp_mfl)) ? ( \ - FP_DENORMAL \ - ) : ( \ - FP_ZERO \ - ) \ - ) \ - ) : ( \ - (((x) & fp_mjl) == (fp_mjl)) ? ( \ - FP_NORMAL \ - ) : ( \ - FP_UNDEFINED \ - ) \ - ) \ - ) \ - ) \ - ) \ - ) - -#define isfinite( x ) ((sizeof(x) == sizeof(float)) ? ( \ - (((x) & fp_mef) == (fp_mef)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) : ( - (sizeof(x) == sizeof(double)) ? ( \ - (((x) & fp_med) == (fp_med)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) : ( \ - (((x) & fp_mel) == (fp_mel)) ? ( \ - 0 \ - ) : ( \ - (((x) & fp_mel) == (0)) ? ( \ - (((x) & fp_mjl) == (fp_mjl)) ? ( \ - 1 \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - (((x) & fp_mjl) == (fp_mjl)) ? ( \ - 1 \ - ) : ( \ - 0 \ - ) \ - ) \ - ) \ - ) \ - ) \ - ) - -#define isinf( x ) ((sizeof(x) == sizeof(float)) ? ( \ - (((x) & fp_mef) == (fp_mef)) ? ( \ - (((x) & fp_mff) == (0)) ? ( \ - 1 \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - 0 \ - ) \ - ) : ((sizeof(x) == sizeof(double)) ? ( \ - (((x) & fp_med) == (fp_med)) ? ( \ - (((x) & fp_mfd) == (0)) ? ( \ - 1 \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - (((x) & fp_mel) == (fp_mel)) ? ( \ - (((x) & fp_mjl) == (0)) ? ( \ - (((x) & fp_mfl) == (fp_mfl)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - 0 \ - ) \ - ) \ - ) \ - ) - -#define isnan( x ) ((sizeof(x) == sizeof(float)) ? ( \ - (((x) & fp_mef) == (fp_mef)) ? ( \ - (((x) & fp_mff) == (0)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) : ( \ - 0 \ - ) \ - ) : ((sizeof(x) == sizeof(double)) ? ( \ - (((x) & fp_med) == (fp_med)) ? ( \ - (((x) & fp_mfd) == (0)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - (((x) & fp_mel) == (fp_mel)) ? ( \ - (((x) & fp_mjl) == (0)) ? ( \ - (((x) & fp_mfl) == (fp_mfl)) ? ( \ - 1 \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - 0 \ - ) \ - ) \ - ) \ - ) - -#define isnormal( x ) ((sizeof(x) == sizeof(float)) ? ( \ - (((x) & fp_mef) == (fp_mef)) ? ( \ - 0 \ - ) : ( \ - (((x) & fp_mef) == (0)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) \ - ) : ((sizeof(x) == sizeof(double)) ? ( \ - (((x) & fp_med) == (fp_med)) ? ( \ - 0 \ - ) : ( \ - (((x) & fp_med) == (0)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) \ - ) : ( \ - (((x) & fp_mel) == (fp_mel)) ? ( \ - 0 \ - ) : ( \ - (((x) & fp_mel) == (0)) ? ( \ - (((x) & fp_mjl) == (fp_mjl)) ? ( \ - 1 \ - ) : ( \ - 0 \ - ) \ - ) : ( \ - (((x) & fp_mjl) == (fp_mjl)) ? ( \ - 1 \ - ) : ( \ - 0 \ - ) \ - ) \ - ) \ - ) \ - ) \ - ) - -#define signbit( x ) ((sizeof(x) == sizeof(float)) ? ( \ - (((x) & 0x80000000) == (0)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) : ((sizeof(x) == sizeof(double)) ? ( \ - (((x) & 0x8000000000000000) == (0)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) : ( \ - (((x) & 0x80000000000000000000) == (0)) ? ( \ - 0 \ - ) : ( \ - 1 \ - ) \ - ) \ - ) \ - ) - -/* ---------------------------------------------------------------------------- - * FUNCTIONS - * --------------------------------------------------------------------------*/ - -/** These functions return the magnitude of x. - * @param x The value to find the absolute value of. - * @return The absolute value of x. - * @see fabsl() - * @see fabsf() - */ -double fabs( double x ); - -/** These functions return the magnitude of x. - * @param x The value to find the absolute value of. - * @return The absolute value of x. - * @see fabsl() - * @see fabs() - */ -float fabsf( float x ); - -/** These functions return the magnitude of x. - * @param x The value to find the absolute value of. - * @return The absolute value of x. - * @see fabs() - * @see fabsf() - */ -long double fabsl( long double x ); - -/** These functions compute the sine of x (measured in radians). - * @param x The value to compute the sine of. - * @return The sine of x. - * @see sinf() - * @see sinl() - * @see cos() - * @see tan() - * @see sinh() - * @see asin() - */ -double sin( double x ); - -/** These functions compute the sine of x (measured in radians). - * @param x The value to compute the sine of. - * @return The sine of x. - * @see sin() - * @see sinl() - * @see cosf() - * @see tanf() - * @see sinhf() - * @see asinf() - */ -float sinf( float x ); - -/** These functions compute the sine of x (measured in radians). - * @param x The value to compute the sine of. - * @return The sine of x. - * @see sinf() - * @see sin() - * @see cosl() - * @see tanl() - * @see sinhl() - * @see asinl() - */ -long double sinl( long double x ); - -/** These functions compute the hyperbolic sine of x (measured in radians). - * @param x The value to compute the hyperbolic sine of. - * @return The hyperbolic sine of x. - * @see sinhf() - * @see sinhl() - * @see sin() - * @see cosh() - * @see tanh() - * @see asinh() - */ -double sinh( double x ); - -/** These functions compute the hyperbolic sine of x (measured in radians). - * @param x The value to compute the hyperbolic sine of. - * @return The hyperbolic sine of x. - * @see sinh() - * @see sinhl() - * @see sinf() - * @see coshf() - * @see tanhf() - * @see asinhf() - */ -float sinhf( float x ); - -/** These functions compute the hyperbolic sine of x (measured in radians). - * @param x The value to compute the hyperbolic sine of. - * @return The hyperbolic sine of x. - * @see sinh() - * @see sinhf() - * @see sinl() - * @see coshl() - * @see tanhl() - * @see asinhl() - */ -long double sinhl( long double x ); - -/** These functions compute the arcsine of x (measured in radians). - * @param x The value to compute the arcsine of. - * @return The arcsine of x. - * @see asinf() - * @see asinl() - * @see sin() - * @see acos() - * @see atan() - * @see asinh() - */ -double asin( double x ); - -/** These functions compute the arcsine of x (measured in radians). - * @param x The value to compute the arcsine of. - * @return The arcsine of x. - * @see asin() - * @see asinl() - * @see sinf() - * @see acosf() - * @see atanf() - * @see asinhf() - */ -float asinf( float x ); - -/** These functions compute the arcsine of x (measured in radians). - * @param x The value to compute the arcsine of. - * @return The arcsine of x. - * @see asin() - * @see asinf() - * @see sinl() - * @see acosl() - * @see atanl() - * @see asinhl() - */ -long double asinl( long double x ); - -/** These functions compute the hyperbolic arcsine of x (measured in radians). - * @param x The value to compute the hyperbolic arcsine of. - * @return The hyperbolic arcsine of x. - * @see asinhf() - * @see asinhl() - * @see asin() - * @see acosh() - * @see atanh() - * @see sinh() - */ -double asinh( double x ); - -/** These functions compute the hyperbolic arcsine of x (measured in radians). - * @param x The value to compute the hyperbolic arcsine of. - * @return The hyperbolic arcsine of x. - * @see asinh() - * @see asinhl() - * @see asinf() - * @see acoshf() - * @see atanhf() - * @see sinhf() - */ -float asinhf( float x ); - -/** These functions compute the hyperbolic arcsine of x (measured in radians). - * @param x The value to compute the hyperbolic arcsine of. - * @return The hyperbolic arcsine of x. - * @see asinh() - * @see asinhf() - * @see asinl() - * @see acoshl() - * @see atanhl() - * @see sinhl() - */ -long double asinhl( long double x ); - -/** These functions compute the cosine of x (measured in radians). - * @param x The value to compute the cosine of. - * @return The cosine of x. - * @see cosf() - * @see cosl() - * @see sin() - * @see cosh() - * @see tan() - * @see acos() - */ -double cos( double x ); - -/** These functions compute the cosine of x (measured in radians). - * @param x The value to compute the cosine of. - * @return The cosine of x. - * @see cos() - * @see cosl() - * @see sinf() - * @see coshf() - * @see tanf() - * @see acosf() - */ -float cosf( float x ); - -/** These functions compute the cosine of x (measured in radians). - * @param x The value to compute the cosine of. - * @return The cosine of x. - * @see cos() - * @see cosf() - * @see sinl() - * @see coshl() - * @see tanl() - * @see acosl() - */ -long double cosl( long double x ); - -/** These functions compute the hyperbolic cosine of x (measured in radians). - * @param x The value to compute the hyperbolic cosine of. - * @return The hyperbolic cosine of x. - * @see coshf() - * @see coshl() - * @see sinh() - * @see cos() - * @see tanh() - * @see acosh() - */ -double cosh( double x ); - -/** These functions compute the hyperbolic cosine of x (measured in radians). - * @param x The value to compute the hyperbolic cosine of. - * @return The hyperbolic cosine of x. - * @see cosh() - * @see coshl() - * @see sinhf() - * @see cosf() - * @see tanhf() - * @see acoshf() - */ -float coshf( float x ); - -/** These functions compute the hyperbolic cosine of x (measured in radians). - * @param x The value to compute the hyperbolic cosine of. - * @return The hyperbolic cosine of x. - * @see cosh() - * @see coshf() - * @see sinhl() - * @see cosl() - * @see tanhl() - * @see acoshl() - */ -long double coshl( long double x ); - -/** These functions compute the arccosine of x (measured in radians). - * @param x The value to compute the arccosine of. - * @return The arccosine of x. - * @see acosf() - * @see acosl() - * @see asin() - * @see cos() - * @see atan() - * @see acosh() - */ -double acos( double x ); - -/** These functions compute the arccosine of x (measured in radians). - * @param x The value to compute the arccosine of. - * @return The arccosine of x. - * @see acos() - * @see acosl() - * @see asinf() - * @see cosf() - * @see atanf() - * @see acoshf() - */ -float acosf( float x ); - -/** These functions compute the arccosine of x (measured in radians). - * @param x The value to compute the arccosine of. - * @return The arccosine of x. - * @see acos() - * @see acosf() - * @see asinl() - * @see cosl() - * @see atanl() - * @see acoshl() - */ -long double acosl( long double x ); - -/** These functions compute the hyperbolic arccosine of x (measured in radians). - * @param x The value to compute the hyperbolic arccosine of. - * @return The hyperbolic arccosine of x. - * @see acoshf() - * @see acoshl() - * @see asinh() - * @see cosh() - * @see atanh() - * @see acos() - */ -double acosh( double x ); - -/** These functions compute the hyperbolic arccosine of x (measured in radians). - * @param x The value to compute the hyperbolic arccosine of. - * @return The hyperbolic arccosine of x. - * @see acosh() - * @see acoshl() - * @see asinhf() - * @see coshf() - * @see atanhf() - * @see acosf() - */ -float acoshf( float x ); - -/** These functions compute the hyperbolic arccosine of x (measured in radians). - * @param x The value to compute the hyperbolic arccosine of. - * @return The hyperbolic arccosine of x. - * @see acosh() - * @see acoshf() - * @see asinhl() - * @see coshl() - * @see atanhl() - * @see acosl() - */ -long double acoshl( long double x ); - -/** These functions compute the tangent of x (measured in radians). - * @param x The value to compute the tangent of. - * @return The tangent of x. - * @see tanf() - * @see tanl() - * @see sin() - * @see cos() - * @see tanh() - * @see atan() - */ -double tan( double x ); - -/** These functions compute the tangent of x (measured in radians). - * @param x The value to compute the tangent of. - * @return The tangent of x. - * @see tan() - * @see tanl() - * @see sinf() - * @see cosf() - * @see tanhf() - * @see atanf() - */ -float tanf( float x ); - -/** These functions compute the tangent of x (measured in radians). - * @param x The value to compute the tangent of. - * @return The tangent of x. - * @see tan() - * @see tanf() - * @see sinl() - * @see cosl() - * @see tanhl() - * @see atanl() - */ -long double tanl( long double x ); - -/** These functions compute the hyperbolic tangent of x (measured in radians). - * @param x The value to compute the hyperbolic tangent of. - * @return The hyperbolic tangent of x. - * @see tanhf() - * @see tanhl() - * @see sinh() - * @see cosh() - * @see tan() - * @see atanh() - */ -double tanh( double x ); - -/** These functions compute the hyperbolic tangent of x (measured in radians). - * @param x The value to compute the hyperbolic tangent of. - * @return The hyperbolic tangent of x. - * @see tanh() - * @see tanhl() - * @see sinhf() - * @see coshf() - * @see tanf() - * @see atanhf() - */ -float tanhf( float x ); - -/** These functions compute the hyperbolic tangent of x (measured in radians). - * @param x The value to compute the hyperbolic tangent of. - * @return The hyperbolic tangent of x. - * @see tanh() - * @see tanhf() - * @see sinhl() - * @see coshl() - * @see tanl() - * @see atanhl() - */ -long double tanhl( long double x ); - -/** These functions compute the arctangent of x (measured in radians). - * @param x The value to compute the arctangent of. - * @return The arctangent of x. - * @see atanf() - * @see atanl() - * @see atan2() - * @see asin() - * @see acos() - * @see tan() - * @see atanh() - */ -double atan( double x ); - -/** These functions compute the arctangent of x (measured in radians). - * @param x The value to compute the arctangent of. - * @return The arctangent of x. - * @see atan() - * @see atanl() - * @see atan2f() - * @see asinf() - * @see acosf() - * @see tanf() - * @see atanhf() - */ -float atanf( float x ); - -/** These functions compute the arctangent of x (measured in radians). - * @param x The value to compute the arctangent of. - * @return The arctangent of x. - * @see atan() - * @see atanf() - * @see atan2l() - * @see asinl() - * @see acosl() - * @see tanl() - * @see atanhl() - */ -long double atanl( long double x ); - -/** These functions compute the hyperbolic arctangent of x (measured in radians). - * @param x The value to compute the hyperbolic arctangent of. - * @return The hyperbolic arctangent of x. - * @see atanhf() - * @see atanhl() - * @see asinh() - * @see acosh() - * @see tanh() - * @see atan() - */ -double atanh( double x ); - -/** These functions compute the hyperbolic arctangent of x (measured in radians). - * @param x The value to compute the hyperbolic arctangent of. - * @return The hyperbolic arctangent of x. - * @see atanh() - * @see atanhl() - * @see asinhf() - * @see acoshf() - * @see tanhf() - * @see atanf() - */ -float atanhf( float x ); - -/** These functions compute the hyperbolic arctangent of x (measured in radians). - * @param x The value to compute the hyperbolic arctangent of. - * @return The hyperbolic arctangent of x. - * @see atanh() - * @see atanhf() - * @see asinhl() - * @see acoshl() - * @see tanhl() - * @see atanl() - */ -long double atanhl( long double x ); - -/** These functions compute the hyperbolic arctangent of x / y (measured in radians). - * They return their answer between pi and -pi. - * @param y The first side of the triangle. - * @param x The second side of the triangle. - * @return The angle between the first and the second side. - * @see atan2f() - * @see atan2l() - * @see atan() - * @see asin() - * @see acos() - * @see atanh() - * @see tanh() - */ -double atan2( double y, double x ); - -/** These functions compute the hyperbolic arctangent of x / y (measured in radians). - * They return their answer between pi and -pi. - * @param y The first side of the triangle. - * @param x The second side of the triangle. - * @return The angle between the first and the second side. - * @see atan2f() - * @see atan2l() - * @see atanf() - * @see asinf() - * @see acosf() - * @see atanhf() - * @see tanhf() - */ -float atan2f( float y, float x ); - -/** These functions compute the hyperbolic arctangent of x / y (measured in radians). - * They return their answer between pi and -pi. - * @param y The first side of the triangle. - * @param x The second side of the triangle. - * @return The angle between the first and the second side. - * @see atan2f() - * @see atan2l() - * @see atanl() - * @see asinl() - * @see acosl() - * @see atanhl() - * @see tanhl() - */ -long double atan2l( long double y, long double x ); - -/** These functions compute the hypotenuse of a straight triangle. - * @param x The length of one side of the triangle. - * @param y The length of the other side of the triangle. - * @return The length of the hypotenuse, according to h = sqrt(x*x+y*y). - * @see hypotf() - * @see hypotl() - */ -double hypot( double x, double y ); - -/** These functions compute the hypotenuse of a straight triangle. - * @param x The length of one side of the triangle. - * @param y The length of the other side of the triangle. - * @return The length of the hypotenuse, according to h = sqrt(x*x+y*y). - * @see hypot() - * @see hypotl() - */ -float hypotf( float x, float y ); - -/** These functions compute the hypotenuse of a straight triangle. - * @param x The length of one side of the triangle. - * @param y The length of the other side of the triangle. - * @return The length of the hypotenuse, according to h = sqrt(x*x+y*y). - * @see hypot() - * @see hypotf() - */ -long double hypotl( long double x, long double y ); - -/** These functions compute x raised to the power y. - * @param x The base of the power. - * @param y The exponent of the power. - * @return The base raised to the power of the exponent. - * @see powf() - * @see powl() - */ -double pow( double x, double y ); - -/** These functions compute x raised to the power y. - * @param x The base of the power. - * @param y The exponent of the power. - * @return The base raised to the power of the exponent. - * @see pow() - * @see powl() - */ -float powf( float x, float y ); - -/** These functions compute x raised to the power y. - * @param x The base of the power. - * @pa am y The exponent of the power. - * @return The base raised to the power of the exponent. - * @see pow() - * @see powf() - */ -long double powl( long double x, long double y ); - -/** These functions compute the square root of x. - * @param x The value to take the square root of. - * @return The square root of x. - * @see sqrtf() - * @see sqrtl() - */ -double sqrt( double x ); - -/** These functions compute the square root of x. - * @param x The value to take the square root of. - * @return The square root of x. - * @see sqrt() - * @see sqrtl() - */ -float sqrtf( float x ); - -/** These functions compute the square root of x. - * @param x The value to take the square root of. - * @return The square root of x. - * @see sqrt() - * @see sqrtf() - */ -long double sqrtl( long double x ); - -/* TODO */ -double cbrt( double x ); -float cbrtf( float x ); -long double cbrtl( long double x ); - -/* TODO */ -double exp( double x ); -float expf( float x ); -long double expl( long double x ); - -/* TODO */ -double exp2( double x ); -float exp2f( float x ); -long double exp2l( long double x ); - -/* TODO */ -double expm1( double x ); -float expm1f( float x ); -long double expm1l( long double x ); - -/* TODO */ -double frexp( double x, int * exp ); -float frexpf( float x, int * exp ); -long double frexpl( long double x, int * exp ); - -/* TODO */ -double ldexp( double x, int exp ); -float ldexpf( float x, int exp ); -long double ldexpl( long double x, int exp ); - -/** These functions compute the logarithm (base e) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see logf() - * @see logl() - * @todo is this really the natural logarithm? wouldn't it be ln()? - */ -double log( double x ); - -/** These functions compute the logarithm (base e) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see log() - * @see logl() - * @todo is this really the natural logarithm? wouldn't it be ln()? - */ -float logf( float x ); - -/** These functions compute the logarithm (base e) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see log() - * @see logf() - * @todo is this really the natural logarithm? wouldn't it be ln()? - */ -long double logl( long double x ); - -/** These functions compute the logarithm (base 10) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see log10f() - * @see log10l() - */ -double log10( double x ); - -/** These functions compute the logarithm (base 10) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see log10() - * @see log10l() - */ -float log10f( float x ); - -/** These functions compute the logarithm (base 10) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see log10() - * @see log10f() - */ -long double log10l( long double x ); - -/** These functions compute the logarithm (base 2) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see log2f() - * @see log2l() - */ -double log2( double x ); - -/** These functions compute the logarithm (base 2) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see log2() - * @see log2l() - */ -float log2f( float x ); - -/** These functions compute the logarithm (base 2) of x. - * @param x The value to take the logarithm of. - * @return The logarithm of x. - * @see log2() - * @see log2f() - */ -long double log2l( long double x ); - -/* TODO */ -double logb( double x ); -float logbf( float x ); -long double logbl( long double x ); - -/* TODO */ -int ilogb( double x ); -int ilogbf( float x ); -int ilogbl( long double x ); - -/* TODO */ -double log1p( double x ); -float log1pf( float x ); -long double log1pl( long double x ); - -/** These functions increase x to the next whole number. - * @param x The value to increase. - * @return The next whole number after x. - * @see ceilf() - * @see ceill() - */ -double ceil( double x ); - -/** These functions increase x to the next whole number. - * @param x The value to increase. - * @return The next whole number after x. - * @see ceil() - * @see ceill() - */ -float ceilf( float x ); - -/** These functions increase x to the next whole number. - * @param x The value to increase. - * @return The next whole number after x. - * @see ceil() - * @see ceilf() - */ -long double ceill( long double x ); - -/** These functions decrease x to the previous whole number. - * @param x The value to decrease. - * @return The previous whole number before x. - * @see floorf() - * @see floorl() - */ -double floor( double x ); - -/** These functions decrease x to the previous whole number. - * @param x The value to decrease. - * @return The previous whole number before x. - * @see floor() - * @see floorl() - */ -float floorf( float x ); - -/** These functions decrease x to the previous whole number. - * @param x The value to decrease. - * @return The previous whole number before x. - * @see floor() - * @see floorf() - */ -long double floorl( long double x ); - -/** These functions compute the modulus of x and y. - * @param x The value to take the modulus of. - * @param y The modulus. - * @return The value of x modulus y. - * @see fmodf() - * @see fmodl() - */ -double fmod( double x, double y ); - -/** These functions compute the modulus of x and y. - * @param x The value to take the modulus of. - * @param y The modulus. - * @return The value of x modulus y. - * @see fmod() - * @see fmodl() - */ -float fmodf( float x, float y ); - -/** These functions compute the modulus of x and y. - * @param x The value to take the modulus of. - * @param y The modulus. - * @return The value of x modulus y. - * @see fmod() - * @see fmodf() - */ -long double fmodl( long double x, long double y ); - -/* TODO */ -double modf( double x, double * integer ); -float modff( float x, float * integer ); -long double modfl( long double x, long double * integer ); - -/** These functions return x with the sign of y. - * @param x The value to set the sign of. - * @param y The value from which to read the sign. - * @return The magnitude of x with the sign of y. - * @see copysignf() - * @see copysignl() - */ -double copysign( double x, double y ); - -/** These functions return x with the sign of y. - * @param x The value to set the sign of. - * @param y The value from which to read the sign. - * @return The magnitude of x with the sign of y. - * @see copysign() - * @see copysignl() - */ -float copysignf( float x, float y ); - -/** These functions return x with the sign of y. - * @param x The value to set the sign of. - * @param y The value from which to read the sign. - * @return The magnitude of x with the sign of y. - * @see copysign() - * @see copysignf() - */ -long double copysignl( long double x, long double y ); - -/* TODO */ -double erf( double x ); -float erff( float x ); -long double erfl( long double x ); - -/* TODO */ -double erfc( double x ); -float erfcf( float x ); -long double erfcl( long double x ); - -/* TODO */ -double fdim( double x, double y ); -float fdimf( float x, float y ); -long double fdiml( long double x, long double y ); - -/* TODO */ -double fma( double x, double y, double z ); -float fmaf( float x, float y, float z ); -long double fmal( long double x, long double y, long double z ); - -/** These functions return the largest of the parameters. - * @param x The first candidate. - * @param y The second candidate. - * @return The largest of x and y. - * @see fmaxf() - * @see fmaxl() - */ -double fmax( double x, double y ); - -/** These functions return the largest of the parameters. - * @param x The first candidate. - * @param y The second candidate. - * @return The largest of x and y. - * @see fmax() - * @see fmaxl() - */ -float fmaxf( float x, float y ); - -/** These functions return the largest of the parameters. - * @param x The first candidate. - * @param y The second candidate. - * @return The largest of x and y. - * @see fmax() - * @see fmaxf() - */ -long double fmaxl( long double x, long double y ); - -/** These functions return the smallest of the parameters. - * @param x The first candidate. - * @param y The second candidate. - * @return The smallest of x and y. - * @see fminf() - * @see fminl() - */ -double fmin( double x, double y ); - -/** These functions return the smallest of the parameters. - * @param x The first candidate. - * @param y The second candidate. - * @return The smallest of x and y. - * @see fmin() - * @see fminl() - */ -float fminf( float x, float y ); - -/** These functions return the smallest of the parameters. - * @param x The first candidate. - * @param y The second candidate. - * @return The smallest of x and y. - * @see fmin() - * @see fminf() - */ -long double fminl( long double x, long double y ); - -/* TODO */ -long long llrint( double x ); -long long llrintf( float x ); -long long llrintl( long double x ); -long lrint( double x ); -long lrintf( float x ); -long lrintl( long double x ); -double rint( double x ); -float rintf( float x ); -long double rintl( long double x ); - -/* TODO - These functions return their parameter correctly rounded according - * to the current rounding settings. - */ -long long llround( double x ); -long long llroundf( float x ); -long long llroundl( long double x ); -long lround( double x ); -long lroundf( float x ); -long lroundl( long double x ); -double round( double x ); -float roundf( float x ); -long double roundl( long double x ); - -/* TODO - These functions return their parameter with its decimal part - * truncated. - */ -double trunc( double x ); -float truncf( float x ); -long double truncl( long double x ); - -double nearbyint( double x ); -float nearbyintf( float x ); -long double nearbyintl( long double x ); - -double nextafter( double x, double y ); -float nextafterf( float x, float y ); -long double nextafterl( long double x, long double y ); - -/* TODO */ -double nexttoward( double x, long double y ); -float nexttowardf( float x, long double y ); -long double nexttowardl( long double x, long double y ); - -/* TODO - These functions divide parameter x by parameter y and return the - * remainder. - */ -double remainder( double x, double y ); -float remainderf( float x, float y ); -long double remainderl( long double x, long double y ); - -/* TODO */ -double remquo( double x, double y, int * pquo ); -float remquof( float x, float y, int * pquo ); -long double remquol( long double x, long double y, int * pquo ); - -/* TODO */ -double scalbn( double x, int ex ); -float scalbnf( float x, int ex ); -long double scalbnl( long double x, int ex ); - -/* TODO */ -double scalbln( double x, long ex ); -float scalblnf( float x, long ex ); -long double scalblnl( long double x, long ex ); - -/* TODO */ -double lgamma( double x ); -float lgammaf( float x ); -long double lgammal( long double x ); - -/* TODO */ -double tgamma( double x ); -float tgammaf( float x ); -long double tgammal( long double x ); - -/* TODO */ -double nan( const char *str ); -float nanf( const char *str ); -long double nanl( const char *str ); - -#endif /* _MATH_H */ diff --git a/includes/signal.h b/includes/signal.h deleted file mode 100644 index 170851c..0000000 --- a/includes/signal.h +++ /dev/null @@ -1,49 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Signal handling - * --------------------------------------------------------------------------*/ - -#ifndef _SIGNAL_H -#define _SIGNAL_H _SIGNAL_H - -#ifndef _NULL -#include "__intern.h" -#endif - -/* TODO: Documentation */ - -/* ---------------------------------------------------------------------------- - * MACROS - * --------------------------------------------------------------------------*/ - -#define SIGABRT _SIGABRT -#define SIGFPE _SIGFPE -#define SIGILL _SIGILL -#define SIGINT _SIGINT -#define SIGSEGV _SIGSEGV -#define SIGTERM _SIGTERM -#define SIG_DFL _SIG_DFL -#define SIG_ERR _SIG_ERR -#define SIG_IGN _SIG_IGN - -/* ---------------------------------------------------------------------------- - * TYPEDEFS - * --------------------------------------------------------------------------*/ - -#ifndef _SIG_ATOMIC_T -#define _SIG_ATOMIC_T _SIG_ATOMIC_T -typedef __sig_atomic_t sig_atomic_t; -#endif /* _SIG_ATOMIC_T - -/* ---------------------------------------------------------------------------- - * FUNCTIONS - * --------------------------------------------------------------------------*/ - -int raise( int sig ); /* TODO */ -void ( * signal( int sig, void ( *func )( int ) ) ) ( int ); /* TODO */ - -#endif /* _SIGNAL_H */ diff --git a/includes/stdbool.h b/includes/stdbool.h deleted file mode 100644 index 6e9c83f..0000000 --- a/includes/stdbool.h +++ /dev/null @@ -1,35 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Boolean type and values - * ---------------------------------------------------------------------------- - * This header is part of a freestanding implementation - * --------------------------------------------------------------------------*/ - -#ifndef _STDBOOL_H -#define _STDBOOL_H _STDBOOL_H - -/* ---------------------------------------------------------------------------- - * MACROS - * --------------------------------------------------------------------------*/ - -#define __bool_true_false_are_defined 1 - -#ifndef __cplusplus - -#define bool _Bool -#define false 0 -#define true 1 - -/* ---------------------------------------------------------------------------- - * TYPEDEFS - * --------------------------------------------------------------------------*/ - -typedef int bool; - -#endif /* __cplusplus */ - -#endif /* _STDBOOL_H */ diff --git a/includes/stdint.h b/includes/stdint.h deleted file mode 100644 index 7ba5c70..0000000 --- a/includes/stdint.h +++ /dev/null @@ -1,143 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Integer types - * ---------------------------------------------------------------------------- - * This header is part of a freestanding implementation - * --------------------------------------------------------------------------*/ - -#ifndef _STDINT_H -#define _STDINT_H _STDINT_H - -/* This file is part of the platform personality (see personality.txt). */ -#ifndef _NULL -#include "__intern.h" -#endif - -/* TODO: Documentation */ - -/* ---------------------------------------------------------------------------- - * TYPEDEFS - * --------------------------------------------------------------------------*/ - -typedef int8_t; /* TODO */ -typedef int16_t; /* TODO */ -typedef int32_t; /* TODO */ -typedef int64_t; /* TODO */ - -typedef uint8_t; /* TODO */ -typedef uint16_t; /* TODO */ -typedef uint32_t; /* TODO */ -typedef uint64_t; /* TODO */ - -typedef int_least8_t; /* TODO */ -typedef int_least16_t; /* TODO */ -typedef int_least32_t; /* TODO */ -typedef int_least64_t; /* TODO */ - -typedef uint_least8_t; /* TODO */ -typedef uint_least16_t; /* TODO */ -typedef uint_least32_t; /* TODO */ -typedef uint_least64_t; /* TODO */ - -typedef int_fast8_t; /* TODO */ -typedef int_fast16_t; /* TODO */ -typedef int_fast32_t; /* TODO */ -typedef int_fast64_t; /* TODO */ - -typedef uint_fast8_t; /* TODO */ -typedef uint_fast16_t; /* TODO */ -typedef uint_fast32_t; /* TODO */ -typedef uint_fast64_t; /* TODO */ - -typedef intptr_t; /* TODO */ -typedef uintptr_t; /* TODO */ - -typedef intmax_t; /* TODO */ -typedef uintmax_t; /* TODO */ - -/* ---------------------------------------------------------------------------- - * MACROS - * --------------------------------------------------------------------------*/ - -#define INT8_MIN /* TODO */ -#define INT16_MIN /* TODO */ -#define INT32_MIN /* TODO */ -#define INT64_MIN /* TODO */ - -#define INT8_MAX 0x7f -#define INT16_MAX 0x7fff -#define INT32_MAX 0x7fffffff -#define INT64_MAX 0x7fffffffffffffff - -#define UINT8_MAX 0xff -#define UINT16_MAX 0xffff -#define UINT32_MAX 0xffffffff -#define UINT64_MAX 0xffffffffffffffff - -#define INT_LEAST8_MIN /* TODO */ -#define INT_LEAST16_MIN /* TODO */ -#define INT_LEAST32_MIN /* TODO */ -#define INT_LEAST64_MIN /* TODO */ - -#define INT_LEAST8_MAX /* TODO */ -#define INT_LEAST16_MAX /* TODO */ -#define INT_LEAST32_MAX /* TODO */ -#define INT_LEAST64_MAX /* TODO */ - -#define UINT_LEAST8_MAX /* TODO */ -#define UINT_LEAST16_MAX /* TODO */ -#define UINT_LEAST32_MAX /* TODO */ -#define UINT_LEAST64_MAX /* TODO */ - -#define INT_FAST8_MIN /* TODO */ -#define INT_FAST16_MIN /* TODO */ -#define INT_FAST32_MIN /* TODO */ -#define INT_FAST64_MIN /* TODO */ - -#define INT_FAST8_MAX /* TODO */ -#define INT_FAST16_MAX /* TODO */ -#define INT_FAST32_MAX /* TODO */ -#define INT_FAST64_MAX /* TODO */ - -#define UINT_FAST8_MAX /* TODO */ -#define UINT_FAST16_MAX /* TODO */ -#define UINT_FAST32_MAX /* TODO */ -#define UINT_FAST64_MAX /* TODO */ - -#define INTPTR_MIN /* TODO */ -#define INTPTR_MAX /* TODO */ -#define UINTPTR_MAX /* TODO */ - -#define INT8_C(x) /* TODO */ -#define INT16_C(x) /* TODO */ -#define INT32_C(x) /* TODO */ -#define INT64_C(x) /* TODO */ - -#define UINT8_C(x) /* TODO */ -#define UINT16_C(x) /* TODO */ -#define UINT32_C(x) /* TODO */ -#define UINT64_C(x) /* TODO */ - -#define INTMAX_C(x) /* TODO */ -#define UINTMAX_C(x) /* TODO */ - -#define PTRDIFF_MIN /* TODO */ -#define PTRDIFF_MAX /* TODO */ - -#define SIG_ATOMIC_MIN /* TODO */ -#define SIG_ATOMIC_MAX /* TODO */ - -#define SIZE_MAX /* TODO */ - -#define WCHAR_MIN _WCHAR_MIN -#define WCHAR_MAX _WCHAR_MAX - -#define INTMAX_MIN /* TODO */ -#define INTMAX_MAX /* TODO */ -#define UINTMAX_MAX /* TODO */ - -#endif // _STDINT_H diff --git a/includes/stdlib.h b/includes/stdlib.h deleted file mode 100644 index 2724dcf..0000000 --- a/includes/stdlib.h +++ /dev/null @@ -1,112 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * General utilities - * --------------------------------------------------------------------------*/ - -#ifndef _STDLIB_H -#define _STDLIB_H _STDLIB_H - -#ifndef _NULL -#include "__intern.h" -#endif /* _NULL */ - -/* TODO: Documentation */ - -/* ---------------------------------------------------------------------------- - * MACROS - * --------------------------------------------------------------------------*/ - -#define NULL _NULL - -#define EXIT_FAILURE /* TODO */ -#define EXIT_SUCCESS /* TODO */ -#define MB_CUR_MAX /* TODO */ -#define RAND_MAX /* TODO */ - -/* ---------------------------------------------------------------------------- - * TYPEDEFS - * --------------------------------------------------------------------------*/ - -typedef struct -{ - int quotient; - int remainder; -} div_t; - -typedef struct -{ - long quotient; - long remainder; -} ldiv_t; - -typedef struct -{ long long quotient; - long long remainder; -} lldiv_t; - -#ifndef _SIZE_T -#define _SIZE_T _SIZE_T -typedef __size_t size_t -#endif /* _SIZE_T */ - -#ifndef _WCHAR_T -#define _WCHAR_T _WCHAR_T -typedef __wchar_t wchar_t -#endif /* _WCHAR_T */ - -/* ---------------------------------------------------------------------------- - * FUNCTIONS - * --------------------------------------------------------------------------*/ - -int abs( int i ); -long long llabs( long long i ); -long labs( long i ); - -div_t div( int numer, int denom ); -lldiv_t lldiv( long long numer, long long denom ); -ldiv_t ldiv( long numer, long denom ); - -int rand( void ); -void srand( unsigned int seed ); - -double atof( const char * s ); -int atoi( const char * s ); -long atol( const char * s ); -long long atoll( const char * s); - -double strtod( const char * restrict s, char * * restrict endptr ); -float strtof( const char * restrict s, char * * restrict endptr ); -long double strtold( const char * restrict s, char * * restrict endptr ); - -long long strtoll( const char * restrict s, char * * restrict endptr, int base ); -unsigned long long strtoull( const char * restrict s, char * * restrict endptr, int base); - -long strtol( const char * restrict s, char * * restrict endptr, int base ); -unsigned long strtoul( const char * restrict s, char * * restrict endptr, int base); - -void * calloc( size_t nelem, size_t size ); -void free( void * ptr ); -void * malloc( size_t size ); -void * realloc( void * ptr, size_t size ); - -int mblen( const char * s, size_t n ); -size_t mbstowcs( wchar_t * restrict wcs, const char * restrict s, size_t n ); -int mbtowc( wchar_t * restrict pwc, const char * restrict s, size_t n ); -size_t wcstombs( char * restrict s, const wchar_t * restrict wcs, size_t n ); -int wctomb( char * s, wchar_t wchar ); - -void _Exit( int status ); -void exit( int status ); -void abort( void ); -char * getenv( const char * name ); -int system( const char * s ); - -int atexit( void (*func) ( void ) ); -void * bsearch( const void * key, const void * base, size_t nelem, size_t size, int (*cmp) ( const void * ck, const void * ce) ); -void qsort( void * base, size_t nelem, size_t size, int (*cmp) ( const void * e1, const void * e2) ); - -#endif /* _STDLIB_H */ diff --git a/includes/tgmath.h b/includes/tgmath.h deleted file mode 100644 index df1d2b8..0000000 --- a/includes/tgmath.h +++ /dev/null @@ -1,18 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Type-generic math - * --------------------------------------------------------------------------*/ - -#ifndef _TGMATH_H -#define _TGMATH_H _TGMATH_H - -/* Generics, despite necessary for implementing tgmath.h, are not part of the - * C language proper; it is - to my knowledge - not possible to implement this - * header in any implementation-independent way. - */ - -#endif /* _TGMATH_H */ diff --git a/includes/wchar.h b/includes/wchar.h deleted file mode 100644 index 1be74dc..0000000 --- a/includes/wchar.h +++ /dev/null @@ -1,121 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * ---------------------------------------------------------------------------- - * Extended multibyte and wide character utilities - * --------------------------------------------------------------------------*/ - -#ifndef _WCHAR_H -#define _WCHAR_H _CHAR_H - -#ifndef _NULL -#include "__intern.h" -#endif - -/* TODO: Documentation */ - -/* ---------------------------------------------------------------------------- - * MACROS - * --------------------------------------------------------------------------*/ - -#define NULL _NULL -#define WCHAR_MAX _WCHAR_MAX -#define WCHAR_MIN _WCHAR_MIN -#define WEOF _WEOF - -/* ---------------------------------------------------------------------------- - * TYPEDEFS - * --------------------------------------------------------------------------*/ - -/* TODO: Get struct tm into __intern.h */ - -#ifndef _SIZE_T -#define _SIZE_T _SIZE_T -typedef __size_t size_t; -#endif /* _SIZE_T */ - -#ifndef _WCHAR_T -#define _WCHAR_T _WCHAR_T -typedef __wchar_t wchar_t; -#endif /* _WCHAR_T */ - -#ifndef _WINT_T -#define _WINT_T _WINT_T -typedef __wint_t wint_t; -#endif /* _WINT_T */ - -typedef mbstate_t; /* TODO - to __intern.h / __personality.h? */ - -/* ---------------------------------------------------------------------------- - * FUNCTIONS - * --------------------------------------------------------------------------*/ - -wint_t fgetwc( FILE * stream ); -wchar_t * fgetws( wchar_t * restrict s, int n, FILE * restrict stream ); -wint_t fputwc( wchar_t c, FILE * stream ); -int fputws( const wchar_t * restrict s, FILE * restrict stream ); -int fwide( FILE * stream, int mode ); -wint_t getwc( FILE * stream ); -wint_t getwchar( void ); -wint_t putwc( wchar_t c, FILE * stream ); -wint_t putwchar( wchar_t c ); -wint_t ungetwc( wint_t c, FILE * stream ); - -int fwscanf( FILE * restrict stream, const wchar_t * restrict format, ... ); -int swscanf( const wchar_t * restrict s, const wchar_t * restrict format, ... ); -int wscanf( const wchar_t * restrict format, ... ); -int fwprintf( FILE * restrict stream, const wchar_t * restrict format, ... ); -int swprintf( wchar_t * restrict s, size_t n, const wchar_t * restrict format, ... ); -int wprintf( const wchar_t * restrict format, ... ); -int vfwscanf( FILE * restrict stream, const wchar_t * restrict format, va_list arg ); -int vswscanf( const wchar_t * restrict s, size_t n, const wchar_t * restrict format, va_list arg ); -int vwscanf( const wchar_t * restrict format, va_list arg ); -int vfwprintf( FILE * restrict stream, const wchar_t * restrict format, va_list arg ); -int vswprintf( wchar_t * restrict s, size_t n, const wchar_t * restrict format, va_list arg ); -int vwprintf( const wchar_t * restrict format, va_list arg ); - -size_t wcsftime( wchar_t * restrict s, size_t maxsize, const wchar_t * restrict format, const struct tm * restrict timeptr ); - -wint_t btowc( int c ); -size_t mbrlen( const char * restrict s, size_t n, mbstate_t * restrict ps ); -size_t mbrtowc( wchar_t * restrict pwc, const char * restrict s, size_t n, mbstate_t * restrict ps ); -int mbsinit( const mbstate_t * ps ); -size_t mbsrtowcs( wchar_t * restrict dst, const char * * restrict src, size_t len, mbstate_t * restrict ps ); -size_t wcrtomb( char * restrict s, wchar_t wc, mbstate_t * restrict ps ); -size_t wcsrtombs(char * restrict dst, const wchar_t * * restrict src, size_t len, mbstate_t * restrict ps ); -double wcstod( const wchar_t * restrict nptr, wchar_t * * restrict endptr ); -float wcstof( const wchar_t * restrict nptr, wchar_t * * restrict endptr); -long double wcstold( const wchar_t * restrict nptr, wchar_t * * restrict endptr); -long long wcstoll( const wchar_t * restrict nptr, wchar_t * * restrict endptr, int base ); -unsigned long long wcstoull( const wchar_t * restrict nptr, wchar_t * * restrict endptr, int base ); -long wcstol( const wchar_t * restrict nptr, wchar_t * * restrict endptr, int base ); -unsigned long wcstoul( const wchar_t * restrict nptr, wchar_t * * restrict endptr, int base ); -int wctob( wint_t c ); - -wchar_t * wcscat( wchar_t * restrict s1, const wchar_t * restrict s2); -int wcscmp( const wchar_t * s1, const wchar_t * s2 ); -int wcscoll( const wchar_t * s1, const wchar_t * s2 ); -wchar_t * wcscpy( wchar_t * restrict s1, const wchar_t * restrict s2 ); -size_t wcscspn( const wchar_t * s1, const wchar_t * s2 ); -size_t wcslen( const wchar_t * s ); -wchar_t * wcsncat( wchar_t * restrict s1, const wchar_t * restrict s2, size_t n ); -int wcsncmp( const wchar_t * s1, const wchar_t * s2, size_t n ); -wchar_t * wcsncpy( wchar_t * restrict s1, const wchar_t * restrict s2, size_t n ); -size_t wcsspn( const wchar_t * s1, const wchar_t * s2 ); -wchar_t * wcsstr( const wchar_t * s1, const wchar_t * s2 ); -wchar_t * wcstok( wchar_t * restrict s1, const wchar_t * restrict s2, wchar_t * * restrict ptr ); -size_t wcsxfrm( wchar_t * restrict s1, const wchar_t * restrict s2, size_t n ); -int wmemcmp( const wchar_t * s1, const wchar_t * s2, size_t n ); -wchar_t * wmemcpy( wchar_t * restrict s1, const wchar_t * restrict s2, size_t n ); -wchar_t * wmemmove( wchar_t * s1, const wchar_t * s2, size_t n ); -wchar_t * wmemset( wchar_t * s, wchar_t c, size_t n ); - -wchar_t * wcschr( const wchar_t * s, wchar_t c ); -wchar_t * wcspbrk( const wchar_t * s1, const wchar_t * s2 ); -wchar_t * wcsrchr( const wchar_t * s, wchar_t c ); -wchar_t * wcsstr( const wchar_t * s1, const wchar_t * s2 ); -wchar_t * wmemchr( const wchar_t * s, wchar_t c, size_t n); - -#endif /* _WCHAR_H */ -- 2.40.0