]> pd.if.org Git - pdclib/commitdiff
Re-import from Subversion. origin/tags/OLD OLD
authorsolar <unknown>
Thu, 17 Jun 2004 04:46:43 +0000 (04:46 +0000)
committersolar <unknown>
Thu, 17 Jun 2004 04:46:43 +0000 (04:46 +0000)
199 files changed:
functions/assert.c
functions/complex/cabs.c
functions/complex/cacos.c
functions/complex/cacosh.c
functions/complex/carg.c
functions/complex/casin.c
functions/complex/casinh.c
functions/complex/catan.c
functions/complex/catanh.c
functions/complex/cconj.c
functions/complex/ccos.c
functions/complex/ccosh.c
functions/complex/cexp.c
functions/complex/cimag.c
functions/complex/clog.c
functions/complex/cpow.c
functions/complex/cproj.c
functions/complex/creal.c
functions/complex/csin.c
functions/complex/csinh.c
functions/complex/csqrt.c
functions/complex/ctan.c
functions/complex/ctanh.c
functions/ctype.c
functions/errno.c
functions/fenv.c
functions/inttypes.c
functions/locale.c
functions/math/abs.c
functions/math/acos.c
functions/math/acosh.c
functions/math/asin.c
functions/math/asinh.c
functions/math/atan.c
functions/math/atan2.c
functions/math/atanh.c
functions/math/cbrt.c
functions/math/ceil.c
functions/math/copysign.c
functions/math/cos.c
functions/math/cosh.c
functions/math/erf.c
functions/math/exp.c
functions/math/fdim.c
functions/math/floor.c
functions/math/fma.c
functions/math/fmax.c
functions/math/fmin.c
functions/math/gamma.c
functions/math/hypot.c
functions/math/log.c
functions/math/mod.c
functions/math/nan.c
functions/math/nearbyint.c
functions/math/nextafter.c
functions/math/nexttoward.c
functions/math/pow.c
functions/math/remainder.c
functions/math/remquo.c
functions/math/rint.c
functions/math/round.c
functions/math/scalbn.c
functions/math/sin.c
functions/math/sinh.c
functions/math/sqrt.c
functions/math/tan.c
functions/math/tanh.c
functions/math/trunc.c
functions/setjmp.c
functions/signal.c
functions/stdio/clearerr.c
functions/stdio/fclose.c
functions/stdio/feof.c
functions/stdio/ferror.c
functions/stdio/fflush.c
functions/stdio/fgetc.c
functions/stdio/fgetpos.c
functions/stdio/fgets.c
functions/stdio/fopen.c
functions/stdio/fprintf.c
functions/stdio/fputc.c
functions/stdio/fputs.c
functions/stdio/fread.c
functions/stdio/freopen.c
functions/stdio/fscanf.c
functions/stdio/fseek.c
functions/stdio/fsetpos.c
functions/stdio/ftell.c
functions/stdio/fwrite.c
functions/stdio/getc.c
functions/stdio/getchar.c
functions/stdio/gets.c
functions/stdio/perror.c
functions/stdio/printf.c
functions/stdio/putc.c
functions/stdio/putchar.c
functions/stdio/puts.c
functions/stdio/remove.c
functions/stdio/rename.c
functions/stdio/rewind.c
functions/stdio/scanf.c
functions/stdio/setbuf.c
functions/stdio/setvbuf.c
functions/stdio/snprintf.c
functions/stdio/sprintf.c
functions/stdio/sscanf.c
functions/stdio/tmpfile.c
functions/stdio/tmpnam.c
functions/stdio/ungetc.c
functions/stdio/vfprintf.c
functions/stdio/vfscanf.c
functions/stdio/vprintf.c
functions/stdio/vscanf.c
functions/stdio/vsnprintf.c
functions/stdio/vsprintf.c
functions/stdio/vsscanf.c
functions/stdlib/_Exit.c
functions/stdlib/abort.c
functions/stdlib/atexit.c
functions/stdlib/bsearch.c
functions/stdlib/calloc.c
functions/stdlib/div.c
functions/stdlib/exit.c
functions/stdlib/free.c
functions/stdlib/getenv.c
functions/stdlib/malloc.c
functions/stdlib/mblen.c
functions/stdlib/mbstowcs.c
functions/stdlib/mbtowc.c
functions/stdlib/qsort.c
functions/stdlib/rand.c
functions/stdlib/realloc.c
functions/stdlib/strtox.c
functions/stdlib/system.c
functions/stdlib/wcstombs.c
functions/stdlib/wctomb.c
functions/string/memchr.c
functions/string/memcmp.c
functions/string/memcpy.c
functions/string/memmove.c
functions/string/memset.c
functions/string/strcat.c
functions/string/strchr.c
functions/string/strcmp.c
functions/string/strcoll.c
functions/string/strcpy.c
functions/string/strcspn.c
functions/string/strerror.c
functions/string/strlen.c
functions/string/strncat.c
functions/string/strncmp.c
functions/string/strncpy.c
functions/string/strpbrk.c
functions/string/strrchr.c
functions/string/strspn.c
functions/string/strstr.c
functions/string/strtok.c
functions/string/strxfrm.c
functions/time.c
functions/wctype.c
includes/__NULL.h [deleted file]
includes/__WCHAR.h [deleted file]
includes/__intern.h [new file with mode: 0644]
includes/__size_t.h [deleted file]
includes/__tm.h [deleted file]
includes/__wchar_t.h [deleted file]
includes/__wint_t.h [deleted file]
includes/assert.h
includes/complex.h
includes/ctype.h
includes/errno.h
includes/fenv.h
includes/float.h [new file with mode: 0644]
includes/inttypes.h
includes/iso646.h
includes/limits.h [new file with mode: 0644]
includes/locale.h
includes/math.h
includes/setjmp.h
includes/signal.h
includes/stdarg.h
includes/stdbool.h
includes/stddef.h
includes/stdint.h [new file with mode: 0644]
includes/stdio.h
includes/stdlib.h
includes/string.h
includes/tgmath.h
includes/time.h
includes/wchar.h
includes/wctype.h
personalities/__pdc_stdio.h [deleted file]
personalities/__personality.h [deleted file]
personalities/float.h [deleted file]
personalities/limits.h [deleted file]
personalities/personality.txt [new file with mode: 0644]
personalities/stdint.h [deleted file]
personalities/template/includes/__personality.h [new file with mode: 0644]
personality.txt [deleted file]

index 6168ea644b5607d658803de6f662f6065bd7a7f1..3e887d9360c6cd5326cff65d11d085f032cff212 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <stdlib.h>
 #include <stdio.h>
index e1afe402e94737f5c0a006e74228e72cd0d0744e..2d74c2c3f6ced2740b20918a39cbeea3756ce5d0 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double cabs( double _Complex x ) { /* TODO */ };
 float cabsf( float _Complex x ) { /* TODO */ };
index cfa5a882b3b9e01f1e1c1081d45479cd840118f9..9711dd39e6d30bfd38619e6399163b5087f211f5 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex cacos( double _Complex x ) { /* TODO */ };
 float _Complex cacosf( float _Complex x ) { /* TODO */ };
index 61a27d74fc5fdfdf1623b7c161ca94111b5214ab..a1e00fb9580d11bbdb4a86b6058d3dccf45e9344 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex cacosh( double _Complex x ) { /* TODO */ };
 float _Complex cacoshf( float _Complex x ) { /* TODO */ };
index a338cd062be6a5668382e61c329d54a40187a39b..dbb707cad2dfcf944d5f2a48efaa1814f7fc105e 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double carg( double _Complex x ) { /* TODO */ };
 float cargf( float _Complex x ) { /* TODO */ };
index 9ac4d753400c5ebfc0c70d0b80dbb1dff9f96ab5..af4a065fa7e4ae17f27f7c5211979d140a572362 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex casin( double _Complex x ) { /* TODO */ };
 float _Complex casinf( float _Complex x ) { /* TODO */ };
index 763bce76ce296ecb99422da3d1fae09904cf659f..72eee57d9013634adcb06cdb984b603b2fa33018 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex casinh( double _Complex x ) { /* TODO */ };
 float _Complex casinhf( float _Complex x ) { /* TODO */ };
index c5854bd3cae573b8766986cce62bc29347af3e5d..d05f9d3319876bc93f942fc7445191b0b054611b 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex catan( double _Complex x ) { /* TODO */ };
 float _Complex catanf( float _Complex x ) { /* TODO */ };
index 1288262713b00fa3e2ae692a53f6a6051ff0f56c..7a25af2767869caa6e3eacd8dcf26259e4c8cdd0 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex catanh( double _Complex x ) { /* TODO */ };
 float _Complex catanhf( float _Complex x ) { /* TODO */ };
index 7e4d1f862332de5e727dc033eab84622c90795ad..cb438a7a714017019607ac2bb7c9881fd820ba7d 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex conj( double _Complex x ) { /* TODO */ };
 float _Complex conjf( float _Complex x ) { /* TODO */ };
index 0a61fd2a27b49b0759b7b55021fe5f73de84642b..ecaee27f86721dbc7abc58143d7db809f88686d1 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex ccos( double _Complex x ) { /* TODO */ };
 float _Complex ccosf( float _Complex x ) { /* TODO */ };
index 5503333f57a7270198b9770f10ccbf4543849d4d..112aaaf33a93be8dd3191110a3abe1cb3f5105fb 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex ccosh( double _Complex x ) { /* TODO */ };
 float _Complex ccoshf( float _Complex x ) { /* TODO */ };
index acfcb2792e636534ecff4833f3ffd460d075d8c8..5ebf72655cc60e3d6783ad8c9c534c50fef6266e 100644 (file)
@@ -1,11 +1,10 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex cexp( double _Complex x ) { /* TODO */ };
 float _Complex cexpf( float _Complex x ) { /* TODO */ };
 long double _Complex cexpl( long double _Complex x ) { /* TODO */ };
-
index 018fd2663d76047f345112072e0bc0ba379c5818..1a666fbabd2ef36e20ed5db258964327903de302 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double cimag( double _Complex x ) { /* TODO */ };
 float cimagf( float _Complex x ) { /* TODO */ };
index 94bea7d785b134e56225a7286bc62530defb2520..84bfb1949e1639a61e78a87a9dc4a30bbfeb0f15 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex clog( double _Complex x ) { /* TODO */ };
 float _Complex clogf( float _Complex x ) { /* TODO */ };
index 59753671363c14071db79549604c599ac3b340f4..3f6313aecf70c17e64a9bda6c441b741d00465f1 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex cpow( double _Complex x, double _Complex y ) { /* TODO */ };
 float _Complex cpowf( float _Complex x, float _Complex y ) { /* TODO */ };
index fc811d65e79c0c23a70b061585bca3c42a2517e0..23f85efad85f9bf49305cceedf2b7bb9d76913fb 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex cproj( double _Complex x ) { /* TODO */ };
 float _Complex cprojf( float _Complex x ) { /* TODO */ };
index 4c02e35228d77fde93f00425827e9d02d2133390..2e532b1ec1807d45af065b95a53f689d3d3e51f4 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double creal( double _Complex x ) { /* TODO */ };
 float crealf( float _Complex x ) { /* TODO */ };
index edc45aa9690ff78ac5eb92351070324505518f33..e4b30f1712b8358dab54198986404762f8ac8340 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex csin( double _Complex x ) { /* TODO */ };
 float _Complex csinf( float _Complex x ) { /* TODO */ };
index a40c2ff72f273c6ed4e15a1667f6ebac225145ff..f1205930b9524fd25ae8bb15aeb7f8525a047291 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex csinh( double _Complex x ) { /* TODO */ };
 float _Complex csinhf( float _Complex x ) { /* TODO */ };
index af119b546a8ca95ab3f48a149081b4256b2c73f4..f9fa89c2f52aa99e5d1db316d407913fa177761d 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex csqrt( double _Complex x ) { /* TODO */ };
 float _Complex csqrtf( float _Complex x ) { /* TODO */ };
index 12896f2139f53eb1ed706aad41ef741864e13c04..958fba38fc27baa53657aca72d297faa5d2f2ac6 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex ctan( double _Complex x ) { /* TODO */ };
 float _Complex ctanf( float _Complex x ) { /* TODO */ };
index daa5a7cde143102698e3f1788a3ad214861c9253..c12611f53f04e9f65c893c7c5f716fdb1d65e61a 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double _Complex ctanh( double _Complex x ) { /* TODO */ };
 float _Complex ctanhf( float _Complex x ) { /* TODO */ };
index 14bdeda67821dcd14d434b78de2b8f18d9d2771f..390e39bbc5e2a5226a0a8ee056601aef7a4c89be 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int isalnum( int c ) { /* TODO */ };
 int isalpha( int c ) { /* TODO */ };
index 1768b612a79f5c6e9b03b7ea9bf8dca24fee4900..843c8a9fdab5c1976333301d68a7e9f25c557b3b 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
-int errno = 0;
\ No newline at end of file
+int errno = 0;
index 89bc1b2fe3e202b4a1eb678b80e3096ca35cc6de..592bee29853d39a3390c8341318a74e766af1c7b 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int feclearexcept( int exceptions ) { /* TODO */ };
 int fegetexceptflag( fexcept_t * flags, int exceptions ) { /* TODO */ };
index 6025be3aed808c0203093a44f9781a65537e352f..c223a2ef12023c79a335e79a27acc4801fb53f87 100644 (file)
@@ -1,12 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------
-// Standard C
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 intmax_t imaxabs( intmax_t i ) { /* TODO */ };
 imaxdiv_t imaxdiv( intmax_t numer, intmax_t denom ) { /* TODO */ };
index 757bf8ee85050df7e09b23a3cdda64c5e6004186..a0eec0223f04d73a798e7132ab955d7e8d054a8c 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 /* PDPC code - unreviewed
 static struct lconv thislocale = {
index c45527824c8ee66b07138e9972ee388f4514534b..0dae242f025b8e99f597e9953e33041e1d172131 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double fabs( double x ) { /* TODO */ };
 
index fcb28bc2232d1841b6b1c54405df022616461351..266184929e365386325c82739f93bcbb976e7534 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double acos( double x ) { /* TODO */ };
 float acosf( float x ) { /* TODO */ };
index 81cd66b3154f106feefdc2f3d2ddf917a83076b8..d988aeefd2fccab82015fa2a4a6278977442e668 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double acosh( double x ) { /* TODO */ };
 float acoshf( float x ) { /* TODO */ };
index 3f2a9921444250bb0b5ee4eb8322034808abe9df..6807ced85c70cb5a8af79298c8376cc92daef5bf 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double asin( double x ) { /* TODO */ };
 float asinf( float x ) { /* TODO */ };
index 7c0cfd64d6a99ab467b2895ad2c5b1b95a53bf13..7674db60eaa49175eda07e73e4a18d7967180928 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double asinh( double x ) { /* TODO */ };
 float asinhf( float x ) { /* TODO */ };
index adb0a1665e245d3e1505df9e6b0125e064a8f533..9798f610d64d18607bda4aecc042975556b904cb 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double atan( double x ) { /* TODO */ };
 float atanf( float x ) { /* TODO */ };
index 29ebc6f6d53eeeac8a03e9e6d4951afa8811d4c6..7ceb789c2e5baa0e85b1e38dec23d0ebedba7555 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double atan2( double y, double x ) { /* TODO */ };
 float atan2f( float y, float x ) { /* TODO */ };
index 1dedd93ca565e9f653decf6cff8b98ba9b592f12..4566dab6d3b43b484111afef3c52d0998907ca2b 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double atanh( double x ) { /* TODO */ };
 float atanhf( float x ) { /* TODO */ };
index 64185aa037036737f3ea66b7838fec76044ff2fb..12fc59e3c4493cf93e2f8db44636ed06817d95a1 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double cbrt( double x ) { /* TODO */ };
 
index c5e6f95000ffbe18b2b7151ccc798be19c981205..4c1e7bd276acc6c192886672650a314325ffbef5 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double ceil( double x ) { /* TODO */ };
 
index 61e13dd2f45b4eef9d913f027c2ff7b2daa9a817..98622f433cbb0450cb7e12a154c4ca2b8cbcb3ce 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double copysign( double x, double y ) { /* TODO */ };
 
index 7fd85428ec0d7160241e3997fda481583264e1c0..333e114479aa07f8e6f5c766dc09577fb2a809bb 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double cos( double x ) { /* TODO */ };
 float cosf( float x ) { /* TODO */ };
index 09e22239abb6651aea9ffb675ec390b6ec044b54..b81ca1f23f22c1dfaf313886ab22b6cd8a6374cc 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double cosh( double x ) { /* TODO */ };
 float coshf( float x ) { /* TODO */ };
index f6227e3bffe955953dc33614ec2620ba6aa56ecb..bdda8dd8b57bcc4ec212daded9989ced39bcf71f 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double erf( double x ) { /* TODO */ };
 float erff( float x ) { /* TODO */ };
index 7bf8ce38c4231d580bc2756bc839d2ee5d8a2af6..37033d227e744a702fe46aa10afaaaebc023da5d 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double exp( double x ) { /* TODO */ };
 float expf( float x ) { /* TODO */ };
index f87d1cc0f3ff9533f547a3289e8ed67544698015..5956e5f32a229043aaac23fd2f3b83f90cd0df8f 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double fdim( double x, double y ) { /* TODO */ };
 
index ea890bea1ec08bb9b1e21f39eb58c20e9f9de775..7d62107e17f7bac1332d38c7a7ae197aa00c16b7 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double floor( double x ) { /* TODO */ };
 
index 31eff28f68bfd8e4db82895f313f3ff36f5b9efc..dbfec2ad7e871cbaf0e809d1ed38533e65b1d5f9 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double fma( double x, double y, double z ) { /* TODO */ };
 
index 6bc8e6ca4d0c8cffe18f4256f0e1c83174871165..ecbfce3541becfc6b98e8ceb9464c1531703f98d 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double fmax( double x, double y ) { /* TODO */ };
 
index 22ea9622abddfc367fc73e139c986a0fb4029a7c..3ba9b295dddc6853a051c86724bb8ae7d25bcde2 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double fmin( double x, double y ) { /* TODO */ };
 
index 7720efaa13c6742ae3ac54e33b56e1c92ed54d0a..a9dab9d47065b9c26b0f30aeccd1381fcd2c01c6 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double lgamma( double x ) { /* TODO */ };
 float lgammaf( float x ) { /* TODO */ };
index b4412aa3bfccd11845278ff5f599113549565bea..83dc672f8b46265be2d03b54bf6e9d0393bf6111 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double hypot( double x, double y ) { /* TODO */ };
 
index fce90a73f0c7736b6f5dd716a74d2b74a93a1610..34712a5cb8fde3b43c4a9387482461b894f52edd 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double log( double x ) { /* TODO */ };
 float logf( float x ) { /* TODO */ };
index ed3a371ee65ac84961a2cf08a7247793a54ebbe8..468f2c483098fdb6f42547cdbca42f63863e2e08 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double fmod( double x, double y ) { /* TODO */ };
 
index 5d0526eee7bfd07916004da64762ceba2f943de2..f13aefddca45e3c04c10343910be5a7aad3c42e7 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double nan( const char *str ) { /* TODO */ };
 float nanf( const char *str ) { /* TODO */ };
index f9f7efac50b3fecbb9534a5594ad452b0e7b1fcd..3937dbebb37d6890606e0f5129a08bd0f106290c 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double nearbyint( double x ) { /* TODO */ };
 
index 204caadc6105ef24ae9fb86d494a400a4a13c8f0..5b5ecebcb6a9851effc330288149e594706e1fd0 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double nextafter( double x, double y ) { /* TODO */ };
 float nextafterf( float x, float y ) { /* TODO */ };
index 30e8d945bcfffb2d45a80c82c4886099c1dbb208..2f4ef29adfc0fbe6b38906cdb9acda92b0582ffe 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double nexttoward( double x, long double y ) { /* TODO */ };
 float nexttowardf( float x, long double y ) { /* TODO */ };
index 583c8f369e634e47f9bb6688e16267ab62771425..776b46f2a67432cde61c5b343b5fbd13a66cf14c 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double pow( double x, double y ) { /* TODO */ };
 float powf( float x, float y ) { /* TODO */ };
index 08f167adf71ae072abf89002ca9f0c5a6a3e3bd4..170cae210d38a3de11dcbbb68884ca5ad4396980 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double remainder( double x, double y ) { /* TODO */ };
 
index 59d37b08053dd2ff5db13321de6157e1af7fb2d6..a11e3564e8ab8f27ce78b5043fbd0f0bd207dcf9 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double remquo( double x, double y, int * pquo ) { /* TODO */ };
 float remquof( float x, float y, int * pquo ) { /* TODO */ };
index 96bd5027657a92b35715b5e4ab5d735b4cc56b75..1c7fe3d7ac753a9ca998a74cce687d9f4df6b35f 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 long long llrint( double x ) { /* TODO */ };
 long long llrintf( float x ) { /* TODO */ };
index b2abcd1f805c588735c8f873ede453db5b7b712c..d5a052b7ed3c44fc27d42f24b6b4d274956110c3 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 long long llround( double x ) { /* TODO */ };
 long long llroundf( float x ) { /* TODO */ };
index 88d882bb9ac5aa676e02271a1fcb9fb352b5b2c4..cfcd5e2f30b0b23aec8d7b5d875a166195c8875b 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double scalbn( double x, int ex ) { /* TODO */ };
 float scalbnf( float x, int ex ) { /* TODO */ };
index 27ad651aa603db50f92d8bb665d522b2d5e2dd36..98a23181ffa6434265aca896bc4459add61fe30b 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double sin( double x ) { /* TODO */ };
 float sinf( float x ) { /* TODO */ };
index c24ee3dcf3a8648d21b4a260ca956039105f7d9d..3a0ef4cd95cf8799a0fc404bcb8deb308e16abeb 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double sinh( double x ) { /* TODO */ };
 float sinhf( float x ) { /* TODO */ };
index 7dd60203519089a8e5adc7e16a521813e14610ce..802f4ce20e7f8a9990f5fc2aecb5bd0316c73c4b 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double sqrt( double x ) { /* TODO */ };
 
index 1f539330c59a6203a7c3fa7d500670960acffde3..4d2dc4e232144784498007d8e43486167d8850a7 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double tan( double x ) { /* TODO */ };
 float tanf( float x ) { /* TODO */ };
index b12162045d533015275f96d63a4267e5af5187ae..02bb494884e585241a6371fb170af43f4ede6f6e 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double tanh( double x ) { /* TODO */ };
 float tanhf( float x ) { /* TODO */ };
index c018c06168d76020827bc7a11ca9cc73d0a711bf..752afc02b1b61cbcc4deb13c6ac744c9990eebb8 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double trunc( double x ) { /* TODO */ };
 
index 762edfba8ab438f273bb7f35b55108d76a08b684..39134202850d0fff9ca6e33c76802636f5185ad1 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int setjmp(jmp_buf env) { /* TODO */ };
-void longjmp(jmp_buf env, int val) { /* TODO */ };
\ No newline at end of file
+void longjmp(jmp_buf env, int val) { /* TODO */ };
index d0fc8b60a027d1827130adbadf58c63f0afac920..b9da182f22f85e319ed9e30b3f5ac1bb40df3d27 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 /* PDPC code - unreviewed
 static void (*handlers[6])(int) = {
index 7fcdf8e0cd84aba43f41b8f660bb1acd2a6bb770..28a042d8bd12affa09be2ea7d11737a5931f8ec2 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #ifndef __FILE_H
 #define __FILE_H __FILE_H
index 446b8ee471efe56edea8f05b8a1c2289dd2d1f39..f672fb0abb9cadd16ddc32f6b5a2020400a431d6 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fclose( FILE * stream ) { /* TODO */ };
 
index 93203d0dff0e14cd6e97f1c56f5cd3f3f560be48..dab3b7e23f6a7aa4d18d507a1738050f013eb443 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #ifndef __FILE_H
 #define __FILE_H __FILE_H
index 71bd7378e642c328f3b5c5dc1fe7647429c8c928..cf11f4ca37978366d37a2bc56d140ba93d8e5cdb 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #ifndef __FILE_H
 #define __FILE_H __FILE_H
index 66e97a587f7c88a0453025aae336c2eefb9c6c58..137fd49d6e63217d5643c9a15e8f9e836cc431f1 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fflush( FILE * stream ) { /* TODO */ };
 
index c4f2993f533f862878f36ed1faf8ea751d4e7d2a..ba7f8ffa35e1efd7a1cf1d84b024b07e0d67624c 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fgetc( FILE * stream ) { /* TODO */ };
 
index c97cf0182365e02f0a67ada5f620499484f5f4cd..df80ccc07497129efb256fd0ea10a1b3e612fc04 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fgetpos( FILE * restrict stream, fpos_t * restrict pos ) { /* TODO */ };
 
index 556e426f9cd4bbafe63151def1dcd83018042353..638bcdd4da0a3dff5d70e9797d9301786a16b510 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 char * fgets( char * restrict s, int n, FILE * restrict stream ) { /* TODO */ };
 
index 3bab83a5ad1cdae875ddf8e2e5768ed0764d1fc1..b088a4a70d1406e06bd0d35f2e557a656a27e77b 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 FILE * fopen( const char * restrict filename, const char * restrict mode ) { /* TODO */ };
 
index d3d4cb661d2fc4512f6fb41628e8e323e806dd1e..58adaa044dbb0688107768507cd0d73b24ed2fcd 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fprintf( FILE * restrict stream, const char * restrict format, ... ) { /* TODO */ };
 
index a89d2984b7ab57cd60ba6a33259eaf094775b14f..d17c936c365e35d1757ba91befdffd7835127e0a 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fputc( int c, FILE * stream ) { /* TODO */ };
 
index e7a04f7d670a51341a114516f4be69bc87a363ff..ad75cd2ffba26d7f9f3377d9595232acea10340c 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fputs( const char * restrict s, FILE * restrict stream ) { /* TODO */ };
 
index b580fe529e97f92cf4a5c97fe8dd0bba234e8438..6f528cbf4019c7f6dbbde36cc1a79ad056a37cb1 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 size_t fread( void * restrict ptr, size_t size, size_t nelem, FILE * restrict stream ) { /* TODO */ };
 
index 8758814b51018404f788a9ddb29b1ab4ac728bbc..2619eea9388ffd233b9c6e3fa309f0f06039c52d 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 FILE * freopen( const char * restrict filename, const char * restrict mode, FILE * stream ) { /* TODO */ };
 
index 2be1758375c1abb015c50de9360586c555da7b85..05a9a1a923aecdfd71adeb50f7db7d87c5d69e59 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fscanf( FILE * restrict stream, const char * restrict format, ... ) { /* TODO */ };
 
index b4e76b9cbab17e4cea0c85372e0816fb16d42c2f..61dbc4fc7c9799a4c46c5ecd03c256b54fe7bd10 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fseek( FILE * stream, long offset, int mode ) { /* TODO */ };
 
index b77104728304ac347c9c1afd8465d1d0a74fefb8..044c9744d83c54700a8ffb1a1c8a8a0ba2308caf 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int fsetpos( FILE * stream, const fpos_t * pos ) { /* TODO */ };
 
index f4efecdf7973ce1ae10d69b99f841f85566af115..9518033f384901c3835778becbebbc185c51ad59 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 long ftell( FILE * stream ) { /* TODO */ };
 
index 97bbbd50f22ace32cceb9ecad23813fee6dd4f32..d2698b840de8efca2f10f0e03eeb338f76f5eaaf 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 size_t fwrite( const void * restrict ptr, size_t size, size_t nelem, FILE * restrict stream ) { /* TODO */ };
 
index f2de070792628149d2390719fa205c15b28ed46b..e54fca3a0fefd8d2e3dd591dfa41b958ed6a7de7 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int getc( FILE * stream ) { /* TODO */ };
 
index 0ba30fc14574a60dfc37c48f94534d17fa71f3e6..485a61396b693e55b68a5c5ea567f41e2b0c2c3d 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int getchar( void ) { /* TODO */ };
 
index ecba23fe51910db0be446597b51265a1ec2525dc..cd2942e13aa79a0434e24eea12a259914912f884 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 char * gets( char * s ) { /* TODO */ };
 
index d94746cdb2c217399e61e82c45d583a280d9d511..d85cd647440cbdfcd8e75acb2052a1dc80121877 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void perror( const char * s ) { /* TODO */ };
 
index 440fa5f9562ffef8a456adb5d11f3b3c5d250537..d5769948386e68a44e07fb5ed39cec0c733c7049 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int printf( const char * restrict format, ... ) { /* TODO */ };
 
index 01acfd89e3e35e9b16b475fd986cde67039a6b11..4f259032e95cccb0b0523581f62e60c7095dd6da 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int putc( int c, FILE * stream ) { /* TODO */ };
 
index 7025698172c9d1a12b9545ae79d2832e61657a56..673d86a632244dd3fb6566dfc1b2c4e2b58ee758 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int putchar( int c ) { /* TODO */ };
 
index d4ec498a86cd43060acf13e434e5b26d1a9cffa6..3c819dd5a89d3c768439ed0e7946706241a064cd 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int puts( const char * s ) { /* TODO */ };
 
index e89b99575726e3cf22bc8bd3117da9e85a206cdc..7985984322b8526d18a0959e275ef2067c3808fa 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int remove( const char * filename ) { /* TODO */ };
index 5cb5665f940bf79913bbab0cf2fe34b7c7cf805b..d9b3d1ff2e200314c2f919673f7f89511e46b927 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int rename( const char * old, const char * new ) { /* TODO */ };
index fdcb4301456d442d60dfb26d1d16835472f06689..b893086856c98cc49c434d6fd68d60246035fe66 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void rewind( FILE * stream ) { /* TODO */ };
 
index e4342ab51bfe29525f0ddf2dd796f47bd7b4d33d..612f151c17551d010ac5698c513bd266f81314c5 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int scanf( const char * restrict format, ... ) { /* TODO */ };
 
index 85137af39ff18a8ecf6bd602434c8e785a120aa9..163f1f550e749def67d7397bee05e6ece986c94c 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void setbuf( FILE * restrict stream, char * restrict buf ) { /* TODO */ };
 
index 2f9b4c48bdef5e2565b5e6ce9e39bdb7c394079b..a88a27fa547784313149ac3cd6b86e00537a85fe 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int setvbuf( FILE * restrict stream, char * restrict buf, int mode, size_t size ) { /* TODO */ };
 
index f4b7ebfd492dd2006d6841e153fb8f5b72f57124..dd2a972ece30807df414cb2753cb03bc4f10941b 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int snprintf( char * restrict s, size_t n, const char * restrict format, ... ) { /* TODO */ };
index 2063e7868dc6b873601dbeb7e948b4046b0bc61c..b992dbaa32715f6c985d9c98e79a73663b97d4dc 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int sprintf( char * restrict s, const char * restrict format, ... ) { /* TODO */ };
 
index 0b902eeedda1c804df86117fa97c5afd25ad0092..9103aaba6b8de2a331bfbf3f56d950315f9623c7 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int sscanf( const char * restrict s, const char * restrict format, ... ) { /* TODO */ };
 
index 1eb153d0fe4604407db5701fb6d38885939d5198..e5b7fd8d90586498211020403a0a20d4a2c709f0 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 FILE * tmpfile( void ) { /* TODO */ };
 
@@ -11,4 +11,4 @@ FILE * tmpfile( void ) { /* TODO */ };
 {
     return (fopen("ZZZZZZZA.$$$", "wb+"));
 }
-*/
\ No newline at end of file
+*/
index ad642a040e2c398af0673b7a1b4589ef30d30b42..69edae79bb0cfd9853ac3910771b38874d736efc 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 char * tmpnam( char * s ) { /* TODO */ };
 
index f15d8a3b8a66de75ab1bcff32a4085ddbcd0c945..1bd7323ba80eb7345f26586de79d48912e386439 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int ungetc( int c, FILE * stream ) { /* TODO */ };
 
index 7bbc212a747be96ff791e614d9c115bc937b7bb8..00de473e72e7716c560f480aed20ed2a68627944 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int vfprintf( FILE * restrict stream, const char * restrict format, va_list ap ) { /* TODO */ };
 
index a75870e27f5ff609311df3c81580f5171ea21006..92b4bebec7778351af33d95998b471e926224017 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int vfscanf( FILE * restrict stream, const char * restrict format, va_list ap ) { /* TODO */ };
index 02de2e0cf8239552c1619b28aa7f579f914a79d6..e55eb7ca62bcd02e9de7c45f0f9ad5d4135584b6 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int vprintf( const char * restrict format, va_list ap ) { /* TODO */ };
index 14d69f71f93ffd84f912d6ea1312ff827f51f775..8287237bb1a15288d7706745ebbc0a6d2957a120 100644 (file)
@@ -1,9 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int vscanf( const char * restrict format, va_list ap ) { /* TODO */ };
-
index df104ecab5cc10b123aac9fdf085679230a9122d..6fae08075c8840da65fc55f8972e8d97f16ab8cd 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int vsnprintf( char * restrict s, size_t n, const char * restrict format, va_list ap ) { /* TODO */ };
index 8e21b70352877e9b03c7e4a1f89fc4d30544f3ec..e17f6ffda1e9ac82a9048ca20aab65f1fe0e7537 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int vsprintf( char * restrict s, const char * restrict format, va_list ap) { /* TODO */ };
 
index f29f0518dbfdd7a5083e30525a03f92214b6dfdc..97efeb2c490360c61ceab52edab804dd07afede9 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int vsscanf( const char * restrict s, const char * restrict format, va_list ap ) { /* TODO */ };
index 561ab4aeae9f3e545373feab96bea527e60b8df8..15cfd54ccb85187937a9b3c0e2246db28cdc1487 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void _Exit( int status ) { /* TODO */ };
index 5f18565ffa98224d38a14937b749e056a3d1a892..1665706c391ee04fdbfe3b48bd09473f5ebc0765 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void abort( void ) { /* TODO */ };
 
@@ -12,4 +12,4 @@ void abort( void ) { /* TODO */ };
     raise(SIGABRT);
     exit(EXIT_FAILURE);
 }
-*/
\ No newline at end of file
+*/
index 9792cad1846968addb78e2100d0909aebd3ae916..d9f0ee942b2ebd9e4267d79fc1baf564349cae86 100644 (file)
@@ -1,11 +1,10 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
-// TODO: C/C++ linkages
 int atexit( void (*func) ( void ) ) { /* TODO */ };
 
 /* PDPC code - unreviewed
index c03cd45716e435b884a01f5b8e4ac20ea12decc4..fa58d0d0ffec7f6657de39d65527cd721e711288 100644 (file)
@@ -1,11 +1,10 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
-// TODO: C/C++ linkage
 void * bsearch( const void * key, const void * base, size_t nelem, size_t size, int (*cmp) ( const void * ck, const void * ce) ) { /* TODO */ };
 
 /* PDPC code - unreviewed
index 4169f84c60c8ff80ea338a13dd50044e8ad85bb7..a9a485fee3ff64c7e4fa64492843e146c31f7f6b 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void * calloc( size_t nelem, size_t size ) { /* TODO */ };
 
@@ -31,4 +31,4 @@ void * calloc( size_t nelem, size_t size ) { /* TODO */ };
     }
     return (ptr);
 }
-*/
\ No newline at end of file
+*/
index 4994d3db3513d0c518942af9deea78d57f4174b3..34af22323cf11e265ad1e4a9a15a89639d8188b6 100644 (file)
@@ -1,18 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------
-// C++
-
-ldiv_t div( long numer, long denom ) { /* TODO */ };
-lldiv_t div( long long numer, long long denom ) { /* TODO */ };
-
-// ----------------------------------------------------------------------------
-// Standard C
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 div_t div( int numer, int denom ) { /* TODO */ };
 lldiv_t lldiv( long long numer, long long denom ) { /* TODO */ };
index a0525e3793c95aacd9a3a143ed6470d26589324d..743744cf2d28a640f077524ce340b79e42d1342c 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void exit( int status ) { /* TODO */ };
index 5801248ebb22f10631e397976ac76eedca754873..150d7b337ae60167941f87315c6d13be28e0d4bd 100644 (file)
@@ -1,8 +1,48 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void free( void * ptr ) { /* TODO */ };
+
+/* Thomas "Beyond Infinity" Kreitner's code - unchecked, unoptimized
+{
+    chunk_t * chunk;
+    chunk_t * prev_chunk;
+    chunk = used_mem.start;
+    do
+    {
+        prev_chunk = chunk;
+        chunk = chunk->next;
+    } while ( ( chunk != NULL ) && ( chunk->address != ptr ) );
+    if ( chunk->address == ptr )
+    {
+    if( used_mem.start->next->next == NULL )
+    {
+        /* used_mem list has only one entry */
+        chunk = used_mem.start->next;
+        used_mem.last = used_mem.start;
+    }
+    else if ( chunk == used_mem.last )
+    {
+        /* chunk is the last element of used_mem list */
+        prev_chunk->next = NULL;
+        used_mem.last = prev_chunk;
+    }
+    else
+    {
+        /* chunk is neither only nor last in the used_mem list */
+        prev_chunk->next = prev_chunk->next->next;
+    }
+    chunk->next = NULL;
+    free_mem.last->next = chunk;
+    free_mem.last = chunk;
+    return chunk;
+    }
+    else
+    {
+        return NULL;
+    }
+}
index 2b04d516b3811d3d297f9c86093c29355da3f895..31ce5e4c7774b711a43c7bae62bf5c233f617770 100644 (file)
@@ -1,8 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 char * getenv( const char * name ) { /* TODO */ };
index d1a8d5e3673374222c0af0287aaa76ecfe988856..a563350f929faf48c6949cdf59c1fe2c52031648 100644 (file)
@@ -1,8 +1,121 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
+
+#include <__size_t.h>
 
 void * malloc( size_t size ) { /* TODO */ };
+
+/* This is a simple best-fit / first-fit implementation heavily based on
+ * Thomas "Beyond Infinity" Kreitner's code
+ */
+
+/* memory list element */
+struct chunk_t
+{
+    void *    address;
+    size_t    size;
+    chunk_t * next;
+};
+
+struct memlist_t
+{
+    chunk_t * start;
+    chunk_t * last;
+};
+
+size_t heap_start = 0xa0000000;
+size_t heap_used  = 0x00000050; /* HEAP in use. Holds the next FREE address (?) */
+size_t heap_max   = 0xfffffff;  /* max. HEAP */
+
+static struct memlist_t free_mem = { (struct memlist_t *) heap_start,
+                                     (struct memlist_t *) heap_start };
+/* free_mem.start->next = NULL; */
+
+static struct memlist_t used_mem = { (struct memlist_t *) heap_start + sizeof( chunk_t ),
+                                     (struct memlist_t *) heap_start + sizeof( chunk_t ) };
+/* used_mem.start->next = NULL; */
+
+void * malloc( size_t size )
+{
+    chunk_t * chunk = 0;
+    chunk_t * prev_chunk;
+    if ( free_mem.start != free_mem.last )
+    {
+        /* first pass: exact fit */
+        chunk = free_mem.start;
+        while ( 1 )
+        {
+            prev_chunk = chunk;
+            chunk = chunk->next;
+            if ( ( chunk == NULL ) || ( chunk->size == size ) )
+            {
+                break;
+            }
+        }
+    }
+    if ( chunk == NULL )
+    {
+        /* second pass - first fit */
+        chunk = free_mem.start;
+        while ( 1 )
+        {
+            prev_chunk = chunk;
+            chunk = chunk-> next;
+            if ( ( chunk == NULL ) || ( chunk->size > size ) )
+            {
+                break;
+            }
+        }
+    }
+    if ( chunk != NULL )
+    {
+        /* remove chunk from free_mem list */
+        if ( free_mem.start->next->next == NULL )
+        {
+            /* free_mem list has only one entry */
+            free_mem.last = free_mem.start;
+        }
+        else if ( chunk == free_mem.last )
+        {
+            /* chunk is last element of free_mem list */
+            prev_chunk->next = NULL;
+            free_mem.last = prev_chunk;
+        }
+        else
+        {
+            /* chunk is neither only nor last in free_mem list */
+            prev_chunk->next = prev_chunk->next->next;
+        }
+        /* append chunk to used_mem list */
+        chunk->next = NULL;
+        used_mem.last->next = chunk;
+        used_mem.last = chunk;
+    }
+    /* append new chunk to end of used_mem list (if there's space) */
+    if ( chunk == NULL )
+    {
+        if ( ( heap_used + size ) <= heap_max )
+        {
+            /* building the header */
+            chunk = (chunk_t *) heap_start + heap_used + 1;
+            chunk->size    = size;
+            chunk->next    = NULL;
+            chunk->address = chunk + sizeof( chunk_t );
+            /* push heap_used past allocated area */
+            heap_used += sizeof( chunk_t ) + size;
+            used_mem.last->next = chunk;
+            used_mem.last = chunk;
+        }
+        else
+        {
+            /* allocation would exceed max. heap size -
+            /* demand more memory from kernel - not implemented */
+            return 0;
+        }
+    }
+    return (void *) chunk->address;
+}
index ae90a98353abce68d33e21e5c8ff40c589880b2b..3b783f46588aed037997b5d7cde8e9c59301bb5d 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int mblen( const char * s, size_t n ) { /* TODO */ };
 
index f4ca6d192e2a10b989fb0d57a8f98a32815e24c1..a7cd2a0fb8709af6e8ef34241c71da031216a52e 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 size_t mbstowcs( wchar_t * restrict wcs, const char * restrict s, size_t n ) { /* TODO */ };
 
index 7163019a0e7c18180b37b8b6af6eec7e5b1a009d..c022d6e85612c41e5dcc41dd19f90f9a97eaf99a 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int mbtowc( wchar_t * restrict pwc, const char * restrict s, size_t n ) { /* TODO */ };
 
@@ -26,4 +26,4 @@ int mbtowc( wchar_t * restrict pwc, const char * restrict s, size_t n ) { /* TOD
         return (-1);
     }
 }
-*/
\ No newline at end of file
+*/
index a1f903c8b21e70283d82b2e5d90625ee7b8fc412..66bc14ba072314676073fc02693ad521d996c89a 100644 (file)
@@ -1,11 +1,10 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-
-// TODO: C/C++ linkage
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
+
 void qsort( void * base, size_t nelem, size_t size, int (*cmp) ( const void * e1, const void * e2) ) { /* TODO */ };
 
 /* PDPC code - unreviewed
@@ -156,4 +155,4 @@ static void swap_ints(char *ap, char *bp, size_t nints)
 }
 
 #endif
-*/
\ No newline at end of file
+*/
index 967ae2fcff1e24b5653c15a3830198285db3658a..abe58f6fd9e2bf17ccd5adccfce5326d8138f1a7 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int rand( void ) { /* TODO */ };
 void srand( unsigned int seed ) { /* TODO */ };
index ae11da5c2cba6a509d97042dc8f4612fe42ca8fc..93a2aa418d2280d0853bf7cae2ee474abd8b0081 100644 (file)
@@ -1,32 +1,71 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 void * realloc( void * ptr, size_t size ) { /* TODO */ };
 
-/* PDPC code - unreviewed
+/* PDPC code - assumes size_t of memory chunk at offset -4.
 {
-    char *newptr;
+    char * newptr;
     size_t oldsize;
-    
-    newptr = malloc(size);
-    if (newptr == NULL)
+
+    if ( ( newptr = malloc(size) ) != NULL )
     {
-        return (NULL);
+        if ( ptr != NULL )
+        {
+            // reading size information from hidden chunk header
+            oldsize = * (size_t *) ( (char *) ptr - 4 );
+            // correctly handle *down*sizing as well as *up*sizing
+            memcpy( newptr, ptr, ( oldsize < size ) ? oldsize : size );
+            free( ptr );
+        }
     }
-    if (ptr != NULL)
+    return ( newptr );
+}
+*/
+
+/* Thomas "Beyond Infinity" Kreitner's code - unchecked, unoptimized
+{
+    uint_t found = 0;
+    uint_t length;
+    chunk_t * new;
+    chunk_t * chunk;
+    // searching the block to-be-allocated
+    chunk = used_mem.start;
+    while ( ! found && ( chunk->next != NULL )
     {
-        oldsize = *(size_t *)((char *)ptr - 4);
-        if (oldsize < size)
+        if ( chunk->address == ptr )
+        {
+            found++;
+        }
+        else
         {
-            size = oldsize;
+            chunk=chunk->next;
         }
-        memcpy(newptr, ptr, size);
-        free(ptr);
     }
-    return (newptr);
+    if ( found )
+    {
+        length = chunk->length;
+        // allocate new memory area
+        if ( ( new = (void *) malloc( size ) ) != NULL )
+        {
+            // copy the data
+            memcpy( ptr, new, length );
+            // release the old memory
+            free( ptr );
+        }
+        else
+        {
+            new = NULL;
+        }
+    }
+    else
+    {
+        new = NULL;
+    }
+    return new;
 }
 */
index 1def161e839a22f947f98bd9e0edfb56bce5f84c..db739529f7e33b90068712b467b1465de12a4fab 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 double atof( const char * s ) { /* TODO */ };
 int atoi( const char * s ) { /* TODO */ };
index 91e0ffae510dc7a24fad3842256c34e799e5d0cd..c0638e4ae019f895ead9a9ee1f4b46b07b2b1b19 100644 (file)
@@ -1,15 +1,8 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
-void _Exit( int status ) { /* TODO */ };
-void exit( int status ) { /* TODO */ };
-void abort( void ) { /* TODO */ };
-char * getenv( const char * name ) { /* TODO */ };
 int system( const char * s ) { /* TODO */ };
-
-// TODO: C/C++ linkages
-int atexit( void (*func) ( void ) ) { /* TODO */ };
index b78ddb7d53332f5ce5a05166c3589f5830b1a702..dc964f7a320cc6aa444e0c9d197e53db5e846486 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 size_t wcstombs( char * restrict s, const wchar_t * restrict wcs, size_t n ) { /* TODO */ };
 
index 94e63672cabc63e59fedad4df0e1ff3e58de1a74..450b242ce497640250f4fea45190f53ed0456631 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int wctomb( char * s, wchar_t wchar ) { /* TODO */ };
 
index 6a09649903787a88a28640159a7e6bb87d16e95d..1c9563c7efa3641f166009935fe281cb0ce00c06 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 #include <__NULL.h>
index 35def11b33d4bc1e0c364501ba14e4b16e497735..8491ef72c7155bf361d1ac6412c75e8434ca2a32 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index de512aee858693fbc89971481ec83b7058103bd2..4e7b63cc32a150dbad70e1e4825bca4c050f905d 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index 06f67741ef7fc8270e6737957932c747164645e6..f7ed6c1656b38d43e3f0a5afb8478a8cf895efe2 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index 48477a71778934b15d517391f5f1530c93967516..17d96f5d2c073a29f835e2f282055bbefd83c051 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index dfbc135aa15df56e66784e7074cee8df676a82cb..eab90c15b212a187bad807a59d9735fbdc0fa132 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 char * strcat( char * restrict dest, const char * restrict src )
 {
@@ -12,12 +12,12 @@ char * strcat( char * restrict dest, const char * restrict src )
     {
         while ( *++dest_p != '\0' )
         {
-            // EMPTY
+            /* EMPTY */
         }
     }
     while ( (*dest_p++ = *src++) != '\0' )
     {
-        // EMPTY
+        /* EMPTY */
     }
     return dest;
 }
index bff8d054e20ae212c8d5e96064e1b8bbe2a5729d..960e7e4ed599fd9070b13007969ea5485464831e 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__NULL.h>
 
index e72e3761bf78a260f77e4037f8a81580c0e2abe8..874828eb269fc25a1082f5d41640cd45ed49e876 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int strcmp( const char * src_1, const char * src_2 )
 {
index c89b8cfd3bdc88bc1829ad014a5b39a372d3a492..3c841e54d763ebe9f139710be6c9f28547502081 100644 (file)
@@ -1,11 +1,11 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
-// TODO: Dummy function, does not support locales.
+/* TODO: Dummy function, does not support locales. */
 
 int strcmp( const char * src_1, const char * src_2 );
 
index 94f54b40efc730ebd9074deb19d6b249f8d360f1..f9b340ef691d6944cf000eb59d117f43be71a9bd 100644 (file)
@@ -1,16 +1,16 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 char * strcpy( char * restrict dest, const char * restrict src )
 {
     char * tmp = dest;
     while ( ( *dest++ = *src++ ) != '\0' )
     {
-        // EMPTY
+        /* EMPTY */
     }
     return tmp;
 }
index 70b978824e7d6973df4a393c678aad6cb47daad5..7c4d9b8c58054576394f2111ed88d259de8943aa 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index 2fdacdba5431bfc1eb73215bd612f477a5c50d22..1cd820cc869946f9e2c3e5a53550d540de0843c0 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <errno.h>
 
index ec0c21e7134a8c96edbac8b28d353c2592b1abdf..05e5e3bb9d2740b30787887f114b01cb8cd2ca79 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index d168e6e8e02ecb2a056cf993bb9b4ca811856c2d..4a819919e1b969e3aa3283abba399ab28f4404f4 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index b6a98cecf77caa278aa6204691ca314168678bce..9e5e615f4c42e7a4c90fb3625c297f01c329c90e 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index 3784df4dcdf2c8fbc722adb5455230567bf21b12..e89332cfadd633de3444dbb68e4867970bd08d4e 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
@@ -12,7 +12,7 @@ char * strncpy( char * restrict dest, const char * restrict src, size_t n )
     char * tmp = dest;
     while ( ( n-- != 0 ) && ( ( *dest++ = *src++ ) != '\0' ) )
     {
-        // EMPTY
+        /* EMPTY */
     }
     while ( n-- != 0 )
     {
index 9c4fe78f40c1c3d3164f764ae1d2b7f78b24bc68..1006ab6d21a32b995ff3b29965310f21626447fc 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__NULL.h>
 
index 6ce1a3231de2f67bc7be3c5994cecfe165ba1244..4f1e2b5cb58fbd230de5b04776d5050f62cc14f0 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__NULL.h>
 
index f8f89e1ef6a632e106c6a7c3566bc61dfbc07c93..55cf29a084aa87f8ae2e5b2f8522b99e2f8a70d7 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
index 55f1db60dab91bf4a886fdc37ab099ec10ac0de9..4a60479148293f210ab6242a8a9b9f10d7f7a0c6 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__NULL.h>
 
index 69b45a73cb8aeb0753395907425beed9643ce13f..70d2cd702fe196b7bf8d2a68a078312bdadc3681 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 char * strtok( char * restrict src, const char * restrict seperators )
 {
@@ -12,24 +12,24 @@ char * strtok( char * restrict src, const char * restrict seperators )
 
     if ( src != NULL )
     {
-        // new string
+        /* new string */
         store = src;
     }
     if ( store == NULL )
     {
-        // no old string, no new string, nothing to do
+        /* no old string, no new string, nothing to do */
         return NULL;
     }
-    src += strspn( src, seperators ); // skipping leading seperators
+    src += strspn( src, seperators ); /* skipping leading seperators */
     if ( strlen( src ) == 0 )
     {
-        // no more to parse
+        /* no more to parse */
         return ( store = NULL );
     }
     token_length = strcspn( src, seperators );
     if ( src[ token_length ] == '\0' )
     {
-        // parsed to end of string
+        /* parsed to end of string */
         store = NULL;
         return src;
     }
index 5b0fabb3fa75ffe354a3cb516d8c7e936cdfc50d..a971e38d572ada95e9a5a7168ccb4365a0465566 100644 (file)
@@ -1,13 +1,13 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 #include <__size_t.h>
 
-// TODO: Dummy function, no locale support yet.
+/* TODO: Dummy function, no locale support yet. */
 
 size_t strlen( const char * src );
 char * strncpy( char * restrict dest, const char * restrict src, size_t n );
index 7da9c4b3281ae358e95d1e8ad322ccaa3b6831ee..54dcc017901434c87300d12d53ca4cfc517738c7 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 char * asctime( const struct tm * tptr ) { /* TODO */ };
 clock_t clock( void ) { /* TODO */ };
@@ -536,4 +536,4 @@ static void strfmt(char *str, const char *fmt, ...)
       *str = '\0';
       va_end(vp);
 }
-*/
\ No newline at end of file
+*/
index 9d50564c42fdb51254cdaa5781f0e4bfe8774dbd..922cdd63f633b33e5e312ce734eb6a7449cff517 100644 (file)
@@ -1,9 +1,9 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
 int iswalnum( wint_t c ) { /* TODO */ };
 int iswalpha( wint_t c ) { /* TODO */ };
diff --git a/includes/__NULL.h b/includes/__NULL.h
deleted file mode 100644 (file)
index 7c8cc77..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Definition of NULL shared by locale.h, stddef.h, stdio.h, stdlib.h, 
-// string.h, wchar.h, and time.h
-// ----------------------------------------------------------------------------
-
-#ifndef __NULL_H
-#define __NULL_H __NULL_H
-
-#define NULL 0
-
-#endif // __NULL_H
diff --git a/includes/__WCHAR.h b/includes/__WCHAR.h
deleted file mode 100644 (file)
index cb1a181..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Definition of WCHAR_MIN and WCHAR_MAX, shared by stdint.h and wchar.h
-// ----------------------------------------------------------------------------
-
-#ifndef __WCHAR_H
-#define __WCHAR_H __WCHAR_H
-
-#define WCHAR_MIN // TODO - personality?
-#define WCHAR_MAX // TODO - personality?
-
-#endif // __WCHAR_H
diff --git a/includes/__intern.h b/includes/__intern.h
new file mode 100644 (file)
index 0000000..937b948
--- /dev/null
@@ -0,0 +1,45 @@
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Internally used values (struct tm, _NULL, __size_t, __wchar_t, __wint_t,
+ * _WCHAR_MIN, _WCHAR_MAX).
+ * ----------------------------------------------------------------------------
+ * Note that this file does not have a header guard. It is advised to check for
+ * _NULL defore including it. (The idea is to avoid redundant opening of this
+ * file during preprocessing.)
+ * --------------------------------------------------------------------------*/
+
+/* This should work on any environment. */
+#define _NULL 0
+
+#define _WCHAR_MAX /* TODO */
+#define _WCHAR_MIN /* TODO */
+
+#define _WEOF      /* TODO */
+
+#define _EDOM      /* TODO */
+#define _EILSEQ    /* TODO */
+#define _ERANGE    /* TODO */
+
+#define _SIGABRT   /* TODO */
+#define _SIGFPE    /* TODO */
+#define _SIGILL    /* TODO */
+#define _SIGINT    /* TODO */
+#define _SIGSEGV   /* TODO */
+#define _SIGTERM   /* TODO */
+#define _SIG_DFL   /* TODO */
+#define _SIG_ERR   /* TODO */
+#define _SIG_IGN   /* TODO */
+
+typedef __size_t;       /* TODO */
+typedef __wchar_t;      /* TODO */
+typedef __wint_t;       /* TODO */
+typedef __sig_atomic_t; /* TODO */
+
+/* Including personality module so it can override generic settings, and set
+ * the values that cannot be set generically.
+ */
+#include "__personality.h"
diff --git a/includes/__size_t.h b/includes/__size_t.h
deleted file mode 100644 (file)
index 50d7d33..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// size_t typedef shared by stddef.h, stdio.h, stdlib.h, string.h, time.h, and
-// wchar.h
-// ----------------------------------------------------------------------------
-
-#ifndef __SIZE_T_H
-#define __SIZE_T_H __SIZE_T_H
-
-typedef size_t; // TODO - personality?
-
-#endif // __SIZE_T_H
diff --git a/includes/__tm.h b/includes/__tm.h
deleted file mode 100644 (file)
index 7b6aaaa..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// struct tm definition shared by time.h and wchar.h
-// ----------------------------------------------------------------------------
-
-#ifndef __TM_H
-#define __TM_H __TM_H
-
-struct tm; // TODO - personality?
-
-#endif // __TM_H
diff --git a/includes/__wchar_t.h b/includes/__wchar_t.h
deleted file mode 100644 (file)
index 029cb2e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// wchar_t typedef shared by stddef.h, stdlib.h, and wchar.h
-// ----------------------------------------------------------------------------
-
-#ifndef __WCHAR_T_H
-#define __WCHAR_T_H __WCHAR_T_H
-
-typedef wchar_t; // TODO - personality?
-
-#endif // __WCHAR_T_H
diff --git a/includes/__wint_t.h b/includes/__wint_t.h
deleted file mode 100644 (file)
index 38c8457..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// wint_t typedef shared by wchar.h and wctype.h
-// ----------------------------------------------------------------------------
-
-#ifndef __WINT_T_H
-#define __WINT_T_H __WINT_T_H
-
-typedef wint_t; // TODO - personality?
-
-#endif // __WINT_T_H
index ebf4d8c15b4eac6224415223754ba50459264ebd..7bd6e41a6ded9145224628d42479ec32ec0e2274 100644 (file)
@@ -1,28 +1,32 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Diagnostics
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $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
+#ifndef _ASSERT_H
+#define _ASSERT_H _ASSERT_H
 
-// ----------------------------------------------------------------------------
-// AUXILIARY
+/* ----------------------------------------------------------------------------
+ * 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
+/* 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  */
 
-// ----------------------------------------------------------------------------
-// DEFINES
+#endif /* _ASSERT_H - note that the header guard ends here on purpose. The
+                      assert macro is redefined upon each inclusion, in
+                      dependence of NDEBUG.                                  */
 
-// TODO: Check the macro for if-compatibility.
+/* ----------------------------------------------------------------------------
+ * DEFINES
+ * --------------------------------------------------------------------------*/
 
 #undef assert
 #if defined NDEBUG
@@ -31,5 +35,3 @@ void __assert( char const * const expression, // the tested expression
 #define assert( x ) ( x ) ? ( (void) 0 ) \
                           :  __assert( #x, __FILE__, __func__, __LINE__ )
 #endif
-
-#endif // __ASSERT_H
index 59fe73c5da1a4456ca5cb3fee1f6df2b140fd538..ea6d35d5989aff18ed4f8d1ec75bbbfaf1084a7e 100644 (file)
@@ -1,19 +1,23 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Complex arithmetic
-// ----------------------------------------------------------------------------
-
-#ifndef __COMPLEX_H
-#define __COMPLEX_H __COMPLEX_H
-
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Complex arithmetic
+ * --------------------------------------------------------------------------*/
+
+#ifndef _COMPLEX_H
+#define _COMPLEX_H _COMPLEX_H
+
+#ifndef _PERSONALITY
+#define _PERSONALITY _PERSONALITY
 #include "__personality.h"
+#endif /* _PERSONALITY */
 
-// ----------------------------------------------------------------------------
-// DEFINES
+/* ----------------------------------------------------------------------------
+ * DEFINES
+ * --------------------------------------------------------------------------*/
 
 #ifndef __cplusplus
 #define complex     _Complex
 #define I _Complex_I
 #endif
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
-// These functions return the absolute value (magnitude) of their parameter.
+/* These functions return the absolute value (magnitude) of their parameter. */
 double               cabs( double _Complex       x );
 float                cabsf( float _Complex       x );
 long double          cabsl( long double _Complex x );
 
-// These functions return the sine of their parameter.
+/* These functions return the sine of their parameter. */
 double _Complex      csin( double _Complex       x );
 float _Complex       csinf( float _Complex       x );
 long double _Complex csinl( long double _Complex x );
 
-// These functions return the hyperbolic sine of their parameter.
+/* These functions return the hyperbolic sine of their parameter. */
 double _Complex      csinh( double _Complex       x );
 float _Complex       csinhf( float _Complex       x );
 long double _Complex csinhl( long double _Complex x );
 
-// These functions return the arcsine of their parameter.
+/* These functions return the arcsine of their parameter. */
 double _Complex      casin( double _Complex       x );
 float _Complex       casinf( float _Complex       x );
 long double _Complex casinl( long double _Complex x );
 
-// These functions return the hyperbolic arcsine of their parameter.
+/* These functions return the hyperbolic arcsine of their parameter. */
 double _Complex      casinh( double _Complex       x );
 float _Complex       casinhf( float _Complex       x );
 long double _Complex casinhl( long double _Complex x );
 
-// These functions return the cosine of their parameter.
+/* These functions return the cosine of their parameter. */
 double _Complex      ccos( double _Complex       x );
 float _Complex       ccosf( float _Complex       x );
 long double _Complex ccosl( long double _Complex x );
 
-// These functions return the hyperbolic cosine of their parameter.
+/* These functions return the hyperbolic cosine of their parameter. */
 double _Complex      ccosh( double _Complex       x );
 float _Complex       ccoshf( float _Complex       x );
 long double _Complex ccoshl( long double _Complex x );
 
-// These functions return the arccosine of their parameter.
+/* These functions return the arccosine of their parameter. */
 double _Complex      cacos( double _Complex       x );
 float _Complex       cacosf( float _Complex       x );
 long double _Complex cacosl( long double _Complex x );
 
-// These functions return the hyperbolic arccosine of their parameter.
+/* These functions return the hyperbolic arccosine of their parameter. */
 double _Complex      cacosh( double _Complex       x );
 float _Complex       cacoshf( float _Complex       x );
 long double _Complex cacoshl( long double _Complex x );
 
-// These functions return the tangent of their parameter.
+/* These functions return the tangent of their parameter. */
 double _Complex      ctan( double _Complex       x );
 float _Complex       ctanf( float _Complex       x );
 long double _Complex ctanl( long double _Complex x );
 
-// These functions return the hyperbolic tangent of their parameter.
+/* These functions return the hyperbolic tangent of their parameter. */
 double _Complex      ctanh( double _Complex       x );
 float _Complex       ctanhf( float _Complex       x );
 long double _Complex ctanhl( long double _Complex x );
 
-// These functions return the arctangent of their parameter.
+/* These functions return the arctangent of their parameter. */
 double _Complex      catan( double _Complex       x );
 float _Complex       catanf( float _Complex       x );
 long double _Complex catanl( long double _Complex x );
 
-// These functions return the hyperbolic arctangent of their parameter.
+/* These functions return the hyperbolic arctangent of their parameter. */
 double _Complex      catanh( double _Complex       x );
 float _Complex       catanhf( float _Complex       x );
 long double _Complex catanhl( long double _Complex x );
 
-// These functions return the imaginary part of their parameter.
+/* These functions return the imaginary part of their parameter. */
 double               cimag( double _Complex       x );
 float                cimagf( float _Complex       x );
 long double          cimagl( long double _Complex x );
 
-// These functions return the real part of their parameter.
+/* These functions return the real part of their parameter. */
 double               creal( double _Complex       x );
 float                crealf( float _Complex       x );
 long double          creall( long double _Complex x );
 
-// These functions return x^y.
+/* These functions return x^y. */
 double _Complex      cpow( double _Complex       x, double _Complex      y );
 float _Complex       cpowf( float _Complex       x, float _Complex       y );
 long double _Complex cpowl( long double _Complex x, long double _Complex y );
 
-// These functions return the square root of their parameter.
+/* These functions return the square root of their parameter. */
 double _Complex      csqrt( double _Complex       x );
 float _Complex       csqrtf( float _Complex       x );
 long double _Complex csqrtl( long double _Complex x );
 
-// These functions return the exponential of their parameter.
+/* These functions return the exponential of their parameter. */
 double _Complex      cexp( double _Complex       x );
 float _Complex       cexpf( float _Complex       x );
 long double _Complex cexpl( long double _Complex x );
 
-// These functions return the logarithm of their parameter.
+/* These functions return the logarithm of their parameter. */
 double _Complex      clog( double _Complex       x );
 float _Complex       clogf( float _Complex       x );
 long double _Complex clogl( long double _Complex x );
 
-// These functions return the phase angle of their value.
+/* These functions return the phase angle of their value. */
 double               carg( double _Complex       x );
 float                cargf( float _Complex       x );
 long double          cargl( long double _Complex x );
 
-// These functions return the conjugate of their parameter.
+/* These functions return the conjugate of their parameter. */
 double _Complex      conj( double _Complex       x );
 float _Complex       conjf( float _Complex       x );
 long double _Complex conjl( long double _Complex x );
 
-// These functions return the projection of their parameter.
+/* These functions return the projection of their parameter. */
 double _Complex      cproj( double _Complex       x );
 float _Complex       cprojf( float _Complex       x );
 long double _Complex cprojl( long double _Complex x );
 
-#endif // __COMPLEX_H
+#endif /* _COMPLEX_H */
index 86ca13cb2b7901b60d2a7e036ba041276f4d0e60..96f288c820e6a91e014e0e7c8f293c1229ec75ed 100644 (file)
@@ -1,59 +1,60 @@
-// ----------------------------------------------------------------------------
-// $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.
+/* ----------------------------------------------------------------------------
+ * $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.
+/* 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.
+/* 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.
+/* 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.
+/* 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.
+/* 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.
+/* 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.
+/* 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.
+/* returns nonzero if c is a punctuation in the locale. */
 int ispunct( int c );
 
-// returns nonzero if c is a whitespace in the locale.
+/* 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.
+/* 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.
+/* returns nonzero if c is a hexedecimal digit in the locale. */
 int isxdigit( int c );
 
-// returns lowercase equivalent for c in locale.
+/* returns lowercase equivalent for c in locale. */
 int tolower( int c );
 
-// returns uppercase equivalent for c in locale.
+/* returns uppercase equivalent for c in locale. */
 int toupper( int c );
 
-#endif // __CTYPE_H
+#endif /* _CTYPE_H */
index e85d3024b670f3dd31f750c1d08e23b0228a3e72..5bd397d12424d23e250e4976a20bbddf06ecc8ee 100644 (file)
@@ -1,27 +1,34 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Errors
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Errors
+ * --------------------------------------------------------------------------*/
 
-#ifndef __ERRNO_H
-#define __ERRNO_H __ERRNO_H
+#ifndef _ERRNO_H
+#define _ERRNO_H _ERRNO_H
 
-// TODO: Documentation
+#ifndef _PERSONALITY
+#define _PERSONALITY _PERSONALITY
+#include "__personality.h"
+#endif /* _PERSONALITY */
 
-// ----------------------------------------------------------------------------
-// DECLARATIONS
+/* TODO: Documentation */
+
+/* ----------------------------------------------------------------------------
+ * DECLARATIONS
+ * --------------------------------------------------------------------------*/
 
 extern int errno;
 
-// ----------------------------------------------------------------------------
-// DEFINES
+/* ----------------------------------------------------------------------------
+ * DEFINES
+ * --------------------------------------------------------------------------*/
 
-#define EDOM      1 // domain error
-#define EILSEQ    2 // illegal (multibyte) sequence
-#define ERANGE    3 // range error
+#define EDOM   _EDOM   /* domain error                                       */
+#define EILSEQ _EILSEQ /* illegal (multibyte) sequence                       */
+#define ERANGE _ERANGE /* range error                                        */
 
-#endif // __ERRNO_H
+#endif /* _ERRNO_H */
index b6c11a06b91c8e938e2f758d454c6fbf51b85932..7a0d9f37340ff178ed4ba58d9c09ad84a409ff00 100644 (file)
@@ -1,43 +1,45 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Floating-point environment
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $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
+#ifndef _FENV_H
+#define _FENV_H _FENV_H
 
-// TODO: Documentation, checking for personality
+/* TODO: Documentation */
 
-// ----------------------------------------------------------------------------
-// MACROS
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
 
-// Used
-#define FE_DIVBYZERO  // TODO
-#define FE_INEXACT    // TODO
-#define FE_INVALID    // TODO
-#define FE_OVERFLOW   // TODO
-#define FE_UNDERFLOW  // TODO
-#define FE_ALL_EXCEPT // TODO
+#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
-#define FE_TONEAREST  // TODO
-#define FE_TOWARDZERO // TODO
-#define FE_UPWARD     // TODO
+#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
+#define FE_DFL_ENV    /* TODO - to __intern.h / __personality.h? */
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
-typedef fenv_t;    // TODO
-typedef fexcept_t; // TODO
+typedef fenv_t;    /* TODO - to __intern.h / __personality.h? */
+typedef fexcept_t; /* TODO - to __intern.h / __personality.h? */
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 int feclearexcept( int exceptions );
 int fegetexceptflag( fexcept_t * flags, int exceptions );
@@ -53,4 +55,4 @@ int feholdexcept( fenv_t * environment );
 int fesetenv( const fenv_t * environment );
 int feupdateenv( const fenv_t * environment );
 
-#endif // __FENV_H
+#endif /* _FENV_H */
diff --git a/includes/float.h b/includes/float.h
new file mode 100644 (file)
index 0000000..d9696ac
--- /dev/null
@@ -0,0 +1,28 @@
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Characteristics of floating types
+ * ----------------------------------------------------------------------------
+ * This header is part of a freestanding implementation
+ * --------------------------------------------------------------------------*/
+
+#ifndef _FLOAT_H
+#define _FLOAT_H _FLOAT_H
+
+/* This file is part of the platform personality, and is commonly generated
+   using the enquire utility (included).                                     */
+
+/* Defines:
+ * FLT_RADIX, FLT_ROUNDS, FLT_EVAL_METHOD, DECIMAL_DIG,
+ * DBL_DIG, DBL_EPSILON, DBL_MANT_DIG, DBL_MAX, DBL_MAX_10_EXP, DBL_MAX_EXP,
+ * DBL_MIN, DBL_MIN_10_EXP, DBL_MIN_EXP,
+ * FLT_DIG, FLT_EPSILON, FLT_MANT_DIG, FLT_MAX, FLT_MAX_10_EXP, FLT_MAX_EXP,
+ * FLT_MIN, FLT_MIN_10_EXP, FLT_MIN_EXP,
+ * LDBL_DIG, LDBL_EPSILON, LDBL_MANT_DIG, LDBL_MAX, LDBL_MAX_10_EXP,
+ * LDBL_MAX_EXP, LDBL_MIN, LDBL_MIN_10_EXP, LDBL_MIN_EXP
+ */
+
+#endif /* _FLOAT_H */
index cc81b984a51fe92d04e8770859a8329ff9c565ab..944793aa6a91ca9073047bc8988b27dd673ce889 100644 (file)
@@ -1,19 +1,20 @@
-// ----------------------------------------------------------------------------
-// $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
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $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
+#ifndef _INTTYPES_H
+#define _INTTYPES_H _INTTYPES_H
 
-// TODO: Documentation
+/* TODO: Documentation */
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
 typedef struct
 {
@@ -22,8 +23,9 @@ typedef struct
 }
 imaxdiv_t;
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 intmax_t imaxabs( intmax_t i );
 imaxdiv_t imaxdiv( intmax_t numer, intmax_t denom );
@@ -33,8 +35,9 @@ 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)
+/* ----------------------------------------------------------------------------
+ * MACROS (PRINT)
+ * --------------------------------------------------------------------------*/
 
 #define PRId8
 #define PRId16
@@ -144,8 +147,9 @@ uintmax_t wcstoumax( const wchar_t * restrict s, wchar_t * * restrict endptr, in
 #define PRIXMAX
 #define PRIXPTR
 
-// ----------------------------------------------------------------------------
-// MACROS (SCAN)
+/* ----------------------------------------------------------------------------
+ * MACROS (SCAN)
+ * --------------------------------------------------------------------------*/
 
 #define SCNd8
 #define SCNd16
@@ -255,4 +259,4 @@ uintmax_t wcstoumax( const wchar_t * restrict s, wchar_t * * restrict endptr, in
 #define SCNXMAX
 #define SCNXPTR
 
-#endif // __INTTYPES_H
+#endif /* _INTTYPES_H */
index 632dcef0b62257f35cefc8bf2c67695419bd7fb3..61d84edd4da89c29edb57387b5277005c4bb5918 100644 (file)
@@ -1,17 +1,20 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Alternative spellings
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Alternative spellings
+ * ----------------------------------------------------------------------------
+ * This header is part of a freestanding implementation
+ * --------------------------------------------------------------------------*/
 
-#ifndef __ISO646_H
-#define __ISO646_H __ISO646_H
+#ifndef _ISO646_H
+#define _ISO646_H _ISO646_H
 
-// ----------------------------------------------------------------------------
-// DEFINES
+/* ----------------------------------------------------------------------------
+ * DEFINES
+ * --------------------------------------------------------------------------*/
 
 #define and &&
 #define and_eq &=
@@ -25,4 +28,4 @@
 #define xor ^
 #define xor_eq ^=
 
-#endif // __ISO646_H
+#endif /* _ISO646_H */
diff --git a/includes/limits.h b/includes/limits.h
new file mode 100644 (file)
index 0000000..0d35495
--- /dev/null
@@ -0,0 +1,59 @@
+/* ----------------------------------------------------------------------------
+ * $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 */
index 566fa5d40ac8218c9b7fce0b67bb5f2abfc4cf03..f9dd659ed18d132bdd23d37028cbcdc69154060d 100644 (file)
@@ -1,84 +1,93 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Localization
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Localization
+ * --------------------------------------------------------------------------*/
 
-#ifndef __LOCALE_H
-#define __LOCALE_H __LOCALE_H
+#ifndef _LOCALE_H
+#define _LOCALE_H _LOCALE_H
 
-// ----------------------------------------------------------------------------
-// DEFINES
+#ifndef _NULL
+#include "__intern.h"
+#endif /* _NULL */
 
-#include "__NULL.h"
+/* ----------------------------------------------------------------------------
+ * DEFINES
+ * --------------------------------------------------------------------------*/
 
-// Locale categories
-#define LC_COLLATE   1 // affects strcoll() and strxfrm()
-#define LC_CTYPE     2 // affects ctype.h
-#define LC_MONETARY  4 // affects monetary aspect of localeconv()
-#define LC_NUMERIC   8 // affects numeric aspect of localeconv()
-#define LC_TIME     16 // affects strftime()
-#define LC_ALL      31 // affects all of the above
+#define NULL _NULL
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+/* Locale categories */
+#define LC_COLLATE   1 /* affects strcoll() and strxfrm() */
+#define LC_CTYPE     2 /* affects ctype.h */
+#define LC_MONETARY  4 /* affects monetary aspect of localeconv() */
+#define LC_NUMERIC   8 /* affects numeric aspect of localeconv() */
+#define LC_TIME     16 /* affects strftime() */
+#define LC_ALL      31 /* affects all of the above */
 
-// TODO: Detailed documentation of grouping formats and field values
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
+
+/* TODO: Detailed documentation of grouping formats and field values */
 
 struct lconv
 {
-    // LC_NUMERIC
-    char * decimal_point;      // decimal point
-    char * grouping;           // grouping
-    char * thousands_sep;      // grouping string
+    /* LC_NUMERIC */
+    char * decimal_point;      /* decimal point */
+    char * grouping;           /* grouping */
+    char * thousands_sep;      /* grouping string */
 
-    // LC_MONETARY
-    char * mon_decimal_point;  // decimal point
-    char * mon_grouping;       // grouping
-    char * mon_thousands_sep;  // grouping string
-    char * negative_sign;      // negative sign
-    char * positive_sign;      // positive sign
-    char * currency_symbol;    // currency symbol
-    char frac_digits;          // after-point digits
-    // negative values
-    char n_cs_precedes;        // currency symbol preceding value?
-    char n_sep_by_space;       // currency symbol seperated by space?
-    char n_sign_posn;          // sign position
-    // positive values
-    char p_cs_precedes;        // currency symbol preceding value?
-    char p_sep_by_space;       // currency symbol seperated by space?
-    char p_sign_posn;          // sign position?
+    /* LC_MONETARY */
+    char * mon_decimal_point;  /* decimal point */
+    char * mon_grouping;       /* grouping */
+    char * mon_thousands_sep;  /* grouping string */
+    char * negative_sign;      /* negative sign */
+    char * positive_sign;      /* positive sign */
+    char * currency_symbol;    /* currency symbol */
+    char frac_digits;          /* after-point digits */
+    /* negative values */
+    char n_cs_precedes;        /* currency symbol preceding value? */
+    char n_sep_by_space;       /* currency symbol seperated by space? */
+    char n_sign_posn;          /* sign position */
+    /* positive values */
+    char p_cs_precedes;        /* currency symbol preceding value? */
+    char p_sep_by_space;       /* currency symbol seperated by space? */
+    char p_sign_posn;          /* sign position? */
 
-    // for international monetary values
-    char * int_curr_symbol;    // international currency symbol (ISO 4217)
-    char int_frac_digits;      // after-point digits
-    // negative values
-    char int_n_cs_precedes;    // currency symbol preceding value?
-    char int_n_sep_by_space;   // currency symbol seperated by space?
-    char int_n_sign_posn;      // sign position?
-    // positive values
-    char int_p_cs_precedes;    // currency symbol preceding value?
-    char int_p_sep_by_space;   // currency symbol seperated by space?
-    char int_p_sign_posn;      // sign position?
+    /* for international monetary values */
+    char * int_curr_symbol;    /* international currency symbol (ISO 4217) */
+    char int_frac_digits;      /* after-point digits */
+    /* negative values */
+    char int_n_cs_precedes;    /* currency symbol preceding value? */
+    char int_n_sep_by_space;   /* currency symbol seperated by space? */
+    char int_n_sign_posn;      /* sign position? */
+    /* positive values */
+    char int_p_cs_precedes;    /* currency symbol preceding value? */
+    char int_p_sep_by_space;   /* currency symbol seperated by space? */
+    char int_p_sign_posn;      /* sign position? */
 };
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
-// Returns a (pointer to a) lconv structure holding the values for the current
-// locale. The structure must not be changed; values might become outdated with
-// later calls to setlocale() changing LC_NUMERIC, LC_MONETARY or LC_ALL.
+/** Returns a (pointer to a) lconv structure holding the values for the current
+ * locale. The structure must not be changed; values might become outdated with
+ * later calls to setlocale() changing LC_NUMERIC, LC_MONETARY or LC_ALL.
+ */
 struct lconv * localeconv( void );
 
-// Categories are selected by OR'ing the LC_* defines from this header. The
-// function sets the current locale to that defined by locale_name, and returns
-// the name of the new locale (if it was set successfully) or a null pointer
-// (if unsuccessful). At startup, the current locale is "C" by default. A null
-// pointer as locale_name leaves the locale unchanged, an empty string sets it
-// to the "native" locale.
+/** Categories are selected by OR'ing the LC_* defines from this header. The
+ * function sets the current locale to that defined by locale_name, and returns
+ * the name of the new locale (if it was set successfully) or a null pointer
+ * (if unsuccessful). At startup, the current locale is "C" by default. A null
+ * pointer as locale_name leaves the locale unchanged, an empty string sets it
+ * to the "native" locale.
+ */
 char * setlocale( int categories, const char * locale_name );
 
-#endif // __LOCALE_H
+#endif /* _LOCALE_H */
index ef80c92775d192540504a4ab664b2b5d9ee756f8..9070284a393d884c4535d5cab591c90494ba0c6f 100644 (file)
-// ----------------------------------------------------------------------------
-// $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  // TODO - personality?
-#define HUGE_VALF // TODO - personality?
-#define HUGE_VALL // TODO - personality?
-
-#define INFINITY // TODO - personality?
-#define NAN      // TODO - personality?
-
-#define FP_FAST_FMA  // TODO - personality?
-#define FP_FAST_FMAF // TODO - personality?
-#define FP_FAST_FMAL // TODO - personality?
-
-#define FP_INFINITE  // TODO - personality?
-#define FP_NAN       // TODO - personality?
-#define FP_NORMAL    // TODO - personality?
-#define FP_SUBNORMAL // TODO - personality?
-#define FP_ZERO      // TODO - personality?
-
-#define FP_ILOGB0   // TODO - personality?
-#define FP_ILOGBNAN // TODO - personality?
-
-#define MATH_ERRNO       1 // personality?
-#define MATH_ERREXCEPT   2 // personality?
-#define math_errhandling // TODO - personality?
-
-// --------------------------------------------------------------------------
-// TYPEDEFS
-
-typedef double_t; // TODO - personality?
-typedef float_t;  // TODO - personality?
-
-// --------------------------------------------------------------------------
-// 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
-#define fpclassify( x )        // TODO
-#define isfinite( x )          // TODO
-
-#define isinf( x )             // TODO
-#define isnan( x )             // TODO
-#define isnormal( x )          // TODO
-#define signbit( x )           // TODO
-
-// ----------------------------------------------------------------------------
-// FUNCTIONS
-
-// These functions return the magnitude of their parameter.
+/* ----------------------------------------------------------------------------
+ * $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).
+/** 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 return the hyperbolic cosine of their parameter.
+/** 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 return the arcsine of their parameter.
+/** 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 return the hyperbolic arcsine of their parameter.
+/** 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).
+/** 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 return the hyperbolic cosine of their parameter.
+/** 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 return the arccosine of their parameter.
+/** 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 return the hyperbolic arccosine of their parameter.
+/** 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 return the tangent of 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 return the hyperbolic tangent of their parameter.
+/** 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.
+/** 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 return the hyperbolic arctangent of their parameter.
+/** 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 );
 
-// TODO
+/** 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 return sqrt(x^2 + y^2 ).
+/** 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 return their parameter x, raised to the power 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 return the square root of their parameter.
+/** 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
+/* TODO */
 double      cbrt( double       x );
 float       cbrtf( float       x );
 long double cbrtl( long double x );
 
-// TODO
+/* TODO */
 double      exp( double       x );
 float       expf( float       x );
 long double expl( long double x );
 
-// TODO
+/* TODO */
 double      exp2( double       x );
 float       exp2f( float       x );
 long double exp2l( long double x );
 
-// TODO
+/* TODO */
 double      expm1( double       x );
 float       expm1f( float       x );
 long double expm1l( long double x );
 
-// TODO
+/* TODO */
 double      frexp( double       x, int * exp );
 float       frexpf( float       x, int * exp );
 long double frexpl( long double x, int * exp );
 
-// TODO
+/* TODO */
 double      ldexp( double       x, int exp );
 float       ldexpf( float       x, int exp );
 long double ldexpl( long double x, int exp );
 
-// These functions return the natural logarithm of their parameter.
+/** 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 return the logarithm (base 10 ) of their parameter.
+/** 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 return the logarithm (base 2 ) of their parameter.
+/** 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
+/* TODO */
 double      logb( double       x );
 float       logbf( float       x );
 long double logbl( long double x );
 
-// TODO
+/* TODO */
 int ilogb( double       x );
 int ilogbf( float       x );
 int ilogbl( long double x );
 
-// TODO
+/* TODO */
 double      log1p( double       x );
 float       log1pf( float       x );
 long double log1pl( long double x );
 
-// These functions return the smallest integer no smaller than value.
+/** 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 return the largest integer no larger than their parameter.
+/** 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 );
 
-// TODO
+/** 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
+/* 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 their parameter x, with the sign of parameter 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 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
+/* TODO */
 double      erf( double       x );
 float       erff( float       x );
 long double erfl( long double x );
 
-// TODO
+/* TODO */
 double      erfc( double       x );
 float       erfcf( float       x );
 long double erfcl( long double x );
 
-// TODO
+/* TODO */
 double      fdim( double       x, double      y );
 float       fdimf( float       x, float       y );
 long double fdiml( long double x, long double y );
 
-// TODO
+/* 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 larger of their parameters.
+/** 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 smaller of their parameters.
+/** 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
+/* TODO */
 long long llrint( double       x );
 long long llrintf( float       x );
 long long llrintl( long double x );
@@ -276,7 +1244,9 @@ double      rint( double       x );
 float       rintf( float       x );
 long double rintl( long double x );
 
-// TODO
+/* 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 );
@@ -287,7 +1257,9 @@ double      round( double       x );
 float       roundf( float       x );
 long double roundl( long double x );
 
-// TODO
+/* 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 );
@@ -300,44 +1272,46 @@ double      nextafter( double       x, double      y );
 float       nextafterf( float       x, float       y );
 long double nextafterl( long double x, long double y );
 
-// TODO
+/* 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
+/* 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
+/* 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
+/* TODO */
 double      scalbn( double       x, int ex );
 float       scalbnf( float       x, int ex );
 long double scalbnl( long double x, int ex );
 
-// TODO
+/* TODO */
 double      scalbln( double       x, long ex );
 float       scalblnf( float       x, long ex );
 long double scalblnl( long double x, long ex );
 
-// TODO
+/* TODO */
 double      lgamma( double       x );
 float       lgammaf( float       x );
 long double lgammal( long double x );
 
-// TODO
+/* TODO */
 double      tgamma( double       x );
 float       tgammaf( float       x );
 long double tgammal( long double x );
 
-// TODO
+/* TODO */
 double      nan( const char  *str );
 float       nanf( const char *str );
 long double nanl( const char *str );
 
-#endif // __MATH_H
+#endif /* _MATH_H */
index cb938a96d3f6e09993062af0796a3197a978fa9c..8afef149e0a373e84b1eac0814491db2549fde2b 100644 (file)
@@ -1,26 +1,28 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Nonlocal jumps
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Nonlocal jumps
+ * --------------------------------------------------------------------------*/
 
-#ifndef __SETJMP_H
-#define __SETJMP_H __SETJMP_H
+#ifndef _SETJMP_H
+#define _SETJMP_H _SETJMP_H
 
-// TODO: Documentation
+/* TODO: Documentation */
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
-struct jmp_buf[1]; // TODO
+struct jmp_buf[1]; /* TODO */
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 int setjmp( jmp_buf env );
 void longjmp( jmp_buf env, int val );
 
-#endif // __SETJMP_H
+#endif /* _SETJMP_H */
index 3f516852b67364a5e0bdd71fb08ec3a80b3be40a..170851c17e2a77616ad3ea085afda31b938edb8a 100644 (file)
@@ -1,39 +1,49 @@
-// ----------------------------------------------------------------------------
-// $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
-
-// TODO: Documentation
-
-// ----------------------------------------------------------------------------
-// MACROS
-
-#define SIGABRT // TODO - personality?
-#define SIGFPE  // TODO - personality?
-#define SIGILL  // TODO - personality?
-#define SIGINT  // TODO - personality?
-#define SIGSEGV // TODO - personality?
-#define SIGTERM // TODO - personality?
-#define SIG_DFL // TODO - personality?
-#define SIG_ERR // TODO - personality?
-#define SIG_IGN // TODO - personality?
-
-// ----------------------------------------------------------------------------
-// TYPEDEFS
-
-typedef sig_atomic_t; // TODO - personality?
-
-// ----------------------------------------------------------------------------
-// FUNCTIONS
-
-int raise( int sig );                                        // TODO
-void ( * signal( int sig, void ( *func )( int ) ) ) ( int ); // TODO
-
-#endif // __SIGNAL_H
+/* ----------------------------------------------------------------------------
+ * $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 */
index 5d2270535968835b6d685a56cde6011d40adce93..62d0e404e36dbc80d1e0fdfb51e6f7edc04836ff 100644 (file)
@@ -1,32 +1,80 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Variable arguments
-// ----------------------------------------------------------------------------
-
-#ifndef __STDARG_H
-#define __STDARG_H __STDARG_H
-
-// ----------------------------------------------------------------------------
-// TYPEDEFS
-
-typedef do-type va_list; // TODO
-
-// ----------------------------------------------------------------------------
-// MACROS
-
-#define va_arg( va_list ap, Ty )             // TODO
-#define va_copy( va_list dest, va_list src ) // TODO
-#define va_end( va_list ap )                 // TODO
-#define va_start( va_list ap, last-par )     // TODO
-
-/* PDPC code - unreviewed
-#define va_start(ap, parmN) ap = (char *)&parmN + 4
-#define va_arg(ap, type) *(type *)(ap += sizeof(type), ap - sizeof(type))
-#define va_end(ap) ap = 0
-*/
-
-#endif // __STDARG_H
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Variable arguments
+ * ----------------------------------------------------------------------------
+ * This header is part of a freestanding implementation
+ * --------------------------------------------------------------------------*/
+
+#ifndef _STDARG_H
+#define _STDARG_H _STDARG_H
+
+/* TODO: This code was contributed by Michael Moody, who added:
+ * "As always with my code it's not guaranteed bug-free (In fact I know for a
+ * fact it won't work properly on certain archs)."
+ * Code assumes that:
+ * - arguments are passed on the stack;
+ * - arguments are alligned to pointer size.
+ */
+
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
+
+typedef char * va_list;
+
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
+
+/** Returns the size of 'type' rounded up to the nearest multiple of the size
+ * of a pointer. This macro is just here for clarity.
+ */
+#define __va_round(type)                                                      \
+   (                                                                          \
+      (sizeof(type) + sizeof(void *) - 1) & ~(sizeof(void *) - 1)             \
+   )
+
+/** Initialises ap for use by va_arg by setting ap to point at the first
+ * argument in the ellipsis. parmN is the last known parameter in the function
+ * definition (ie the one before the ellipsis).
+ */
+#define va_start(ap, parmN)                                                   \
+   (                                                                          \
+      (ap) = (char *)&parmN + (__va_round(parmN))                               \
+      ,                                                                       \
+      (void)0                                                                 \
+   )
+
+/** Returns the next argument, assumed variable type is 'type', in the
+ * ellipsis.
+ */
+#define va_arg(ap, type)                                                      \
+   (                                                                          \
+      (ap) += (__va_round(type))                                              \
+      ,                                                                       \
+      (*(type*)((ap) - (__va_round(type))))                                   \
+   )
+
+/** Cleans up ap.
+ */
+#define va_end(ap)                                                            \
+   (                                                                          \
+      (ap) = (void *)0                                                        \
+      ,                                                                       \
+      (void)0                                                                 \
+   )
+
+/** Makes the va_list dest be a copy of the va_list src.
+ */
+#define va_copy(dest, src)                                                    \
+   (                                                                          \
+      (dest) = (src)                                                          \
+      ,                                                                       \
+      (void)0                                                                 \
+   )
+
+#endif /* _STDARG_H */
index 0e1c2a5ebbe95bd0b14c09242a757ab938d60e1f..6e9c83f07acaad0fdfea42e394c49abbb30e1297 100644 (file)
@@ -1,17 +1,20 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Boolean type and values
-// ----------------------------------------------------------------------------
-
-#ifndef __STDBOOL_H
-#define __STDBOOL_H __STDBOOL_H
-
-// ----------------------------------------------------------------------------
-// MACROS
+/* ----------------------------------------------------------------------------
+ * $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
 
 #define false 0
 #define true  1
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
 typedef int bool;
 
-#endif // __cplusplus
+#endif /* __cplusplus */
 
-#endif // __STDBOOL_H
+#endif /* _STDBOOL_H */
index 3c6955b627e6034a7ecdcabe9e4e0ea2b34443c5..cec8dfbaddcf14a856f0db8843ca87dfd4a8f78f 100644 (file)
@@ -1,30 +1,46 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Common definitions
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Common definitions
+ * ----------------------------------------------------------------------------
+ * This header is part of a freestanding implementation
+ * --------------------------------------------------------------------------*/
 
-#ifndef __STDDEF_H
-#define __STDDEF_H __STDDEF_H
+#ifndef _STDDEF_H
+#define _STDDEF_H _STDDEF_H
 
-// TODO: Documentation
+#ifndef _NULL
+#include "__intern.h"
+#endif
 
-// ----------------------------------------------------------------------------
-// MACROS
+/* TODO: Documentation */
 
-#include "__NULL.h"
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
 
-#define offsetof( s-type, mbr ) // TODO - personality?
+#define NULL _NULL
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+#define offsetof( s-type, mbr ) /* TODO - to __intern.h / __personality.h? */
 
-#include "__size_t.h"
-#include "__wchar_t.h"
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
-typedef ptrdiff_t; // TODO - personality?
+#ifndef _SIZE_T
+#define _SIZE_T _SIZE_T
+typedef __size_t size_t;
+#endif /* _SIZE_T */
 
-#endif // __STDDEF_H
+#ifndef _WCHAR_T
+#define _WCHAR_T _WCHAR_T
+typedef __wchar_t wchar_t;
+#endif /* _WCHAR_T */
+
+/* Look this up in the C Standard Rationale, which has example code on this. */
+typedef ptrdiff_t; /* TODO - to __intern.h / __personality.h? */
+
+#endif /* _STDDEF_H */
diff --git a/includes/stdint.h b/includes/stdint.h
new file mode 100644 (file)
index 0000000..7ba5c70
--- /dev/null
@@ -0,0 +1,143 @@
+/* ----------------------------------------------------------------------------
+ * $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
index de9a491eb0c41a7362d139d26c30cb8d717459ae..ddf7d981ca183b58b99572a079381659fc9ddd5c 100644 (file)
@@ -1,20 +1,24 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Input/output
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Input/output
+ * --------------------------------------------------------------------------*/
 
-#ifndef __STDIO_H
-#define __STDIO_H __STDIO_H
+#ifndef _STDIO_H
+#define _STDIO_H _STDIO_H
 
-// ----------------------------------------------------------------------------
-// MACROS
+#ifndef _NULL
+#include "__intern.h"
+#endif /* _NULL */
 
-#include "__NULL.h"
-#include "__pdc_stdio.h"
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
+
+#define NULL _NULL
 
 #define _IOFBF    0   // @see setvbuf()
 #define _IOLBF    1   // @see setvbuf()
 
 #define EOF      -1
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
+
+#ifndef _SIZE_T
+#define _SIZE_T _SIZE_T
+typedef __size_t size_t
+#endif /* _SIZE_T */
 
-#include "__size_t.h"
+/* file position, buffer pointer, ErrorIndicator, EOFIndicator, HostRC */
+typedef FILE; /* TODO */
 
-typedef FILE;   // file position, buffer pointer, ErrorIndicator, EOFIndicator,
-                // HostRC
-typedef fpos_t; // file position
+/* file position */
+typedef fpos_t; /* TODO */
 
 extern FILE * stdin;
 extern FILE * stdout;
 extern FILE * stderr;
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 /* TABLE OF CONTENTS (in order of appearance)
  *
@@ -115,402 +126,402 @@ extern FILE * stderr;
  */
 
 /** File OPEN. Opens a file.
   @param filename Name of the file.
   @param mode One of r, w, a, rb, wb, ab, r+, w+, a+, rb+, wb+, ab+,
          specifying which mode to open the file in.
   @return A file handle associated with the opened file, NULL if failed.
*  @param filename Name of the file.
*  @param mode One of r, w, a, rb, wb, ab, r+, w+, a+, rb+, wb+, ab+,
*         specifying which mode to open the file in.
*  @return A file handle associated with the opened file, NULL if failed.
  */
 FILE * fopen( const char * restrict filename, const char * restrict mode );
 
 /** File REOPEN. Opens the file specified by the given name, associating it
   with the given file handle. If filename is NULL, it is attempted to change
   the mode of the already opened file associated with the given file handle.
   (This function can e.g. be used to reassociate stdin / stdout / stderr with
   a filename.)
   @param filename Name of the file to be opened.
   @param mode One of r, w, a, rb, wb, ab, r+, w+, a+, rb+, wb+, ab+,
          specifying which mode to open the file in.
   @param fh The file handle to associate with the opened file.
   @return fh if successful, NULL if failed.
*  with the given file handle. If filename is NULL, it is attempted to change
*  the mode of the already opened file associated with the given file handle.
*  (This function can e.g. be used to reassociate stdin / stdout / stderr with
*  a filename.)
*  @param filename Name of the file to be opened.
*  @param mode One of r, w, a, rb, wb, ab, r+, w+, a+, rb+, wb+, ab+,
*         specifying which mode to open the file in.
*  @param fh The file handle to associate with the opened file.
*  @return fh if successful, NULL if failed.
  */
 FILE * freopen( const char * restrict filename, const char * restrict mode, FILE * fh );
 
 /** File FLUSH. Flushes any output buffers of a file. If parameter is NULL,
   flushes output buffers for all file handles. The function is undefined for
   input streams or update streams when the last operation was input.
   @param fh The file handle.
   @return 0 if successful, EOF on write error (setting error indicator).
*  flushes output buffers for all file handles. The function is undefined for
*  input streams or update streams when the last operation was input.
*  @param fh The file handle.
*  @return 0 if successful, EOF on write error (setting error indicator).
  */
 int fflush( FILE * fh );
 
 /** File EOF. Tests whether EOF is set for a given file.
   @param fh The file handle.
   @return 0 if EOF is not set, non-zero if EOF is set.
*  @param fh The file handle.
*  @return 0 if EOF is not set, non-zero if EOF is set.
  */
 int feof( FILE * fh );
 
 /** File ERROR. Tests whether error indicator is set for a given file.
   @param fh The file handle.
   @return 0 if error indicator is not set, non-zero if set.
*  @param fh The file handle.
*  @return 0 if error indicator is not set, non-zero if set.
  */
 int ferror( FILE * fh );
 
 /** CLEAR ERRor. Clears EOF and error indicator of a FILE handle.
   @param fh The file handle.
*  @param fh The file handle.
  */
 void clearerr( FILE * fh );
 
 /** File CLOSE. Flushes any output buffers, closes the file, frees internal
   buffers, and discards the file handle.
   @param fh The file handle.
   @return 0 if successful, non-zero if failed. (In any case, the file handle
           is invalid afterwards.)
*  buffers, and discards the file handle.
*  @param fh The file handle.
*  @return 0 if successful, non-zero if failed. (In any case, the file handle
*          is invalid afterwards.)
  */
 int fclose( FILE * fh );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** RENAME file. Causes a file to be no longer accessible under a given name,
   but a new name instead.
   @param filename Name of the file.
   @param newname New file name.
   @return 0 if successful, non-zero if failed. (This implementation: INT_MAX
           if newname already exists; INT_MIN if filename could not be found;
           EOF if filename is a currently open file.)
*  but a new name instead.
*  @param filename Name of the file.
*  @param newname New file name.
*  @return 0 if successful, non-zero if failed. (This implementation: INT_MAX
*          if newname already exists; INT_MIN if filename could not be found;
*          EOF if filename is a currently open file.)
  */
 int rename( const char * filename, const char * newname );
 
 /** REMOVE file. Causes a file to be no longer accessible under a given name.
   @param filename Name of the file.
   @return 0 if successful, non-zero if failed. (This implementation: INT_MAX
           if the file is currently open.)
*  @param filename Name of the file.
*  @return 0 if successful, non-zero if failed. (This implementation: INT_MAX
*          if the file is currently open.)
  */
 int remove( const char * filename );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** TeMPorary FILE. Opens a previously non-existend file in "wb+" mode that
   will be automatically deleted when closed, or when the program terminates.
   (This implementation: If program terminates abnormally, file is not
   deleted.)
   @return A file handle for the temporary file. (NULL if opening failed.)
*  will be automatically deleted when closed, or when the program terminates.
*  (This implementation: If program terminates abnormally, file is not
*  deleted.)
*  @return A file handle for the temporary file. (NULL if opening failed.)
  */
 FILE * tmpfile( void )
 
 /** TeMPorary NAMe. Generates a file name that does not yet exist in the file
   system, and is different from the last call to the function. Note that a
   file generated with this name is not "temporary", and must be remove()d
   normally.
   @param filename NULL, or a char[ L_tmpnam ] array. (Beware, calling this
          function with a NULL parameter is not thread-safe.)
   @return If 'filename' is NULL, a pointer to an internal static buffer
           holding the generated name. If 'filename' is not null, the
           generated name is stored in 'filename', and 'filename' is returned.
           If the filename generation fails, function returns NULL.
*  system, and is different from the last call to the function. Note that a
*  file generated with this name is not "temporary", and must be remove()d
*  normally.
*  @param filename NULL, or a char[ L_tmpnam ] array. (Beware, calling this
*         function with a NULL parameter is not thread-safe.)
*  @return If 'filename' is NULL, a pointer to an internal static buffer
*          holding the generated name. If 'filename' is not null, the
*          generated name is stored in 'filename', and 'filename' is returned.
*          If the filename generation fails, function returns NULL.
  */
 char * tmpnam( char * filename );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** File SEEK. Sets the current position in a file to the values specified by
   start and offset.
   @param fh The file handle.
   @param offset The offset from 'start' to position to.
   @param start The starting point from which to calculate the offset. May be
          one of SEEK_SET, SEEK_CUR, SEEK_END.
   @return 0 if successful, non-zero if error encountered.
*  start and offset.
*  @param fh The file handle.
*  @param offset The offset from 'start' to position to.
*  @param start The starting point from which to calculate the offset. May be
*         one of SEEK_SET, SEEK_CUR, SEEK_END.
*  @return 0 if successful, non-zero if error encountered.
  */
 int fseek( FILE * fh, long offset, int start );
 
 /** REWIND file. Equivalent to (void) fseek( fh, 0, SEEK_SET ).
   @param fh The file handle.
*  @param fh The file handle.
  */
 void rewind( FILE * fh );
 
 /** File TELL position. Tells the current offset into a given file.
   @param fh The file handle.
   @return The offset into the file.
*  @param fh The file handle.
*  @return The offset into the file.
  */
 long ftell( FILE * fh );
 
 /** File GET POSition. Stores the current state and position in a file.
   @param fh The file handle.
   @param pos The object to store the current state in.
   @return 0 if successful, non-zero if error encountered.
*  @param fh The file handle.
*  @param pos The object to store the current state in.
*  @return 0 if successful, non-zero if error encountered.
  */
 int fgetpos( FILE * restrict fh, fpos_t * restrict pos );
 
 /** File SET POSition. Sets the current file position to the value stored in a
   given fpos_t object.
   @param fh The file handle.
   @param pos The fpos_t object.
   @return 0 if successful, non-zero if error encountered.
*  given fpos_t object.
*  @param fh The file handle.
*  @param pos The fpos_t object.
*  @return 0 if successful, non-zero if error encountered.
  */
 int fsetpos( FILE * fh, const fpos_t * pos );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** File GET Character. Reads a character from file.
   @param fh The file handle.
   @return The next character in the file, as unsigned char converted to int,
           or EOF if end of file is reached.
*  @param fh The file handle.
*  @return The next character in the file, as unsigned char converted to int,
*          or EOF if end of file is reached.
  */
 int fgetc( FILE * fh );
 
 /** GET Character. Equivalent to fgetc(), but may be implemented as macro, and
   is allowed to evaluate its parameter more than once.
   @param fh The file handle.
   @return The character read, or EOF if end of file / error encountered.
*  is allowed to evaluate its parameter more than once.
*  @param fh The file handle.
*  @return The character read, or EOF if end of file / error encountered.
  */
 int getc( FILE * fh );
 
 /** GET CHARacter. Equivalent to getc( stdin ).
   @return The character read, or EOF if end of file / error encountered.
*  @return The character read, or EOF if end of file / error encountered.
  */
 int getchar( void );
 
 /** UN-GET Character. Puts a character back into an input stream.
   @param c The character to put back.
   @param fh The file handle.
   @return The character put back, EOF if error encountered.
*  @param c The character to put back.
*  @param fh The file handle.
*  @return The character put back, EOF if error encountered.
  */
 int ungetc( int c, FILE * fh );
 
 /** File GET String. Reads a line (terminated by newline character) from file,
   but reading no more than n characters.
   @param dest The char array to write into.
   @param n The maximum number of characters to read.
   @param fh The file handle.
   @return 'dest', or NULL if an error occurred.
*  but reading no more than n characters.
*  @param dest The char array to write into.
*  @param n The maximum number of characters to read.
*  @param fh The file handle.
*  @return 'dest', or NULL if an error occurred.
  */
 char * fgets( char * restrict dest, int n, FILE * restrict fh );
 
 /** GET String. Equivalent to fgets( dest, stdin ).
   @param dest The character array to write to.
   @return 'dest', or NULL if an error occurred.
*  @param dest The character array to write to.
*  @return 'dest', or NULL if an error occurred.
  */
 char * gets( char * dest );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** File PUT Character. Writes a character to file.
   @param c The character (when converted to unsigned char) to write.
   @param fh The file handle.
   @return 'c', or EOF if an error occurred.
*  @param c The character (when converted to unsigned char) to write.
*  @param fh The file handle.
*  @return 'c', or EOF if an error occurred.
  */
 int fputc( int c, FILE * fh );
 
 /** PUT Character. Equivalent to fputc( c, stdout ), but may be implemented as
   a macro, and may evaluate the file handle more than once.
   @param c The character to write.
   @param fh The file handle.
   @return The character written, or EOF if error encountered.
*  a macro, and may evaluate the file handle more than once.
*  @param c The character to write.
*  @param fh The file handle.
*  @return The character written, or EOF if error encountered.
  */
 int putc( int c, FILE * fh );
 
 /** PUT CHARacter. Equivalent to putc( c, stdout ).
   @param c The character to write.
   @return The character written, or EOF if error encountered.
*  @param c The character to write.
*  @return The character written, or EOF if error encountered.
  */
 int putchar( int c );
 
 /** File PUT String. Writes a C string to file.
   @param src The string to write.
   @param fh The file handle.
   @return >= 0 if successful, or EOF if an error occurred.
*  @param src The string to write.
*  @param fh The file handle.
*  @return >= 0 if successful, or EOF if an error occurred.
  */
 int fputs( const char * restrict src, FILE * restrict fh );
 
 /** PUT String. Write a C string to stdout.
   @param src The C string to write.
   @return >= 0 if successful, EOF if error encountered.
*  @param src The C string to write.
*  @return >= 0 if successful, EOF if error encountered.
  */
 int puts( const char * src );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** File SCAN Formatted. Reads from given file handle, under control of a
   formatting string, the values of variables pointed to by 0..n pointers.
   @param fh The file handle.
   @param format The formatting string.
   @param ... A list of 0..n pointers corresponding to placeholders in
          'format'.
   @return EOF if failed, number of values successfully assigned otherwise.
*  formatting string, the values of variables pointed to by 0..n pointers.
*  @param fh The file handle.
*  @param format The formatting string.
*  @param ... A list of 0..n pointers corresponding to placeholders in
*         'format'.
*  @return EOF if failed, number of values successfully assigned otherwise.
  */
 int fscanf( FILE * restrict fh, const char * restrict format, ... );
 
 /** SCAN Formatted. Equivalent to fscanf( stdin, format, ... )
   @param format The formatting string.
   @param ... A list of 0..n pointers corresponding to placeholders in
          'format'.
   @return EOF if failed, number of values successfully assigned otherwise.
*  @param format The formatting string.
*  @param ... A list of 0..n pointers corresponding to placeholders in
*         'format'.
*  @return EOF if failed, number of values successfully assigned otherwise.
  */
 int scanf( const char * restrict format, ... );
 
 /** String SCAN Formatted. Equivalent to scanf( format, ... ), but using a C
   string instead of a file handle for input.
   @param src The input string.
   @param format The formatting string.
   @param ... A list of 0..n pointers corresponding to placeholders in
          'format'.
   @return EOF if failed, number of values successfully assigned otherwise.
*  string instead of a file handle for input.
*  @param src The input string.
*  @param format The formatting string.
*  @param ... A list of 0..n pointers corresponding to placeholders in
*         'format'.
*  @return EOF if failed, number of values successfully assigned otherwise.
  */
 int sscanf( const char * restrict src, const char * restrict format, ... );
 
 /** Variable File SCAN Formatted. Equivalent to fscanf( fh, format, ... ),
   with the variable-length parameter list replaced by a va_list, created by
   the va_start macro.
   @param fh The file handle.
   @param format The formatting string.
   @param args The argument list created by the va_start macro.
   @return Number of characters printed.
*  with the variable-length parameter list replaced by a va_list, created by
*  the va_start macro.
*  @param fh The file handle.
*  @param format The formatting string.
*  @param args The argument list created by the va_start macro.
*  @return Number of characters printed.
  */
 int vfscanf( FILE * restrict fh, const char * restrict format, va_list args );
 
 /** Variable SCAN Formatted. Equivalent to vfscanf( stdin, format, args ).
   @param format The formatting string.
   @param args The argument list created by the va_start macro.
   @return Number of characters printed.
*  @param format The formatting string.
*  @param args The argument list created by the va_start macro.
*  @return Number of characters printed.
  */
 int vscanf( const char * restrict format, va_list args );
 
 /** Variable String SCAN Formatted. Equivalent to vscanf( format, args ), but
   reading from a C string instead of stdin.
   @param src The C string to read from.
   @param format The formatting string.
   @param args The argument list created by the va_start macro.
   @return Number of characters printed.
*  reading from a C string instead of stdin.
*  @param src The C string to read from.
*  @param format The formatting string.
*  @param args The argument list created by the va_start macro.
*  @return Number of characters printed.
  */
 int vsscanf( const char * restrict src, const char * restrict format, va_list ap );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** File PRINT Formatted. Prints to given file handle, under control of a
   formatting string, the values of 0..n variables.
   @param fh The file handle.
   @param format The formatting string.
   @param ... A list of 0..n variables corresponding to placeholders in
          'format'.
   @return Number of characters printed, negative value if error occurred.
*  formatting string, the values of 0..n variables.
*  @param fh The file handle.
*  @param format The formatting string.
*  @param ... A list of 0..n variables corresponding to placeholders in
*         'format'.
*  @return Number of characters printed, negative value if error occurred.
  */
 int fprintf( FILE * restrict fh, const char * restrict format, ... );
 
 /** PRINT Formatted. Equivalent to fprintf( stdout, format, ... ).
   @param format The formatting string.
   @param ... A list of 0..n variables corresponding to placeholders in
          'format'.
   @return Number of characters printed.
*  @param format The formatting string.
*  @param ... A list of 0..n variables corresponding to placeholders in
*         'format'.
*  @return Number of characters printed.
  */
 int printf( const char * restrict format, ... );
 
 /** String PRINT Formatted. Equivalent to printf( format, ... ), but writing
   to a char array instead of stdout.
   @param dest The char array to write to.
   @param format The formatting string.
   @param ... A list of 0..n variables corresponding to placeholders in
          'format'.
   @return Number of characters printed.
*  to a char array instead of stdout.
*  @param dest The char array to write to.
*  @param format The formatting string.
*  @param ... A list of 0..n variables corresponding to placeholders in
*         'format'.
*  @return Number of characters printed.
  */
 int sprintf( char * restrict dest, const char * restrict format, ... );
 
 /** String N PRINT Formatted. Equivalent to sprintf( dest, format, ... ), but
   will not write more than n characters.
   @param dest The char array to write to.
   @param n The maximum number of characters to write.
   @param format The formatting string.
   @param ... A list of 0..n variables corresponding to placeholders in
          'format'.
   @return Number of characters printed.
*  will not write more than n characters.
*  @param dest The char array to write to.
*  @param n The maximum number of characters to write.
*  @param format The formatting string.
*  @param ... A list of 0..n variables corresponding to placeholders in
*         'format'.
*  @return Number of characters printed.
  */
 int snprintf( char * restrict s, size_t n, const char * restrict format, ... );
 
 /** Variable File PRINT Formatted. Equivalent to fprintf( fh, format, ... ),
   with the variable-length parameter list replaced by a va_list, created by
   the va_start macro.
   @param fh The file handle.
   @param format The formatting string.
   @param args The argument list created by the va_start macro.
   @return Number of characters printed.
*  with the variable-length parameter list replaced by a va_list, created by
*  the va_start macro.
*  @param fh The file handle.
*  @param format The formatting string.
*  @param args The argument list created by the va_start macro.
*  @return Number of characters printed.
  */
 int vfprintf( FILE * restrict fh, const char * restrict format, va_list args );
 
 /** Variable PRINT Formatted. Equivalent to vfprintf( stdout, format, args ).
   @param format The formatting string.
   @param args The argument list created by the va_start macro.
   @return Number of characters printed.
*  @param format The formatting string.
*  @param args The argument list created by the va_start macro.
*  @return Number of characters printed.
  */
 int vprintf( const char * restrict format, va_list args );
 
 /** Variable String PRINT Formatted. Equivalent to vprintf( format, args ), but
   writing to a char array instead to stdout.
   @param dest The char array to write to.
   @param format The formatting string.
   @param args The argument list created by the va_start macro.
   @return Number of characters printed.
*  writing to a char array instead to stdout.
*  @param dest The char array to write to.
*  @param format The formatting string.
*  @param args The argument list created by the va_start macro.
*  @return Number of characters printed.
  */
 int vsprintf( char * restrict s, const char * restrict format, va_list ap);
 
 /** Variable String N PRINT Formatted. Equivalent to vsprintf( dest, format,
   args ), but will not write more than n characters.
   @param dest The char array to write to.
   @param n Maximum number of characters to write.
   @param format The formatting string.
   @param args The argument list created by the va_start macro.
   @return Number of characters printed.
*  args ), but will not write more than n characters.
*  @param dest The char array to write to.
*  @param n Maximum number of characters to write.
*  @param format The formatting string.
*  @param args The argument list created by the va_start macro.
*  @return Number of characters printed.
  */
 int vsnprintf( char * restrict dest, size_t n, const char * restrict format, va_list ap );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** Print ERROR.
   Equivalent to fprintf( stderr, "%s: %s\n", text, strerror( errno ) ).
   @param test Text to prepend the error message with.
*  Equivalent to fprintf( stderr, "%s: %s\n", text, strerror( errno ) ).
*  @param test Text to prepend the error message with.
  */
 void perror( const char * text );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** File READ. Reads a number of objects of a given size from file, and into
   a memory area.
   @param dest The memory area to write into.
   @param size The size of one object.
   @param n The number of objects to read.
   @param fh The file handle.
   @return The number of objects successfully read.
*  a memory area.
*  @param dest The memory area to write into.
*  @param size The size of one object.
*  @param n The number of objects to read.
*  @param fh The file handle.
*  @return The number of objects successfully read.
  */
 size_t fread( void * restrict dest, size_t size, size_t n, FILE * restrict fh );
 
 /** File WRITE. Writes a number of objects from a memory area to file.
   @param src The memory area to write from.
   @param size The size of a single object.
   @param n The number of objects to write.
   @param fh The file handle.
   @return The number of objects successfully written.
*  @param src The memory area to write from.
*  @param size The size of a single object.
*  @param n The number of objects to write.
*  @param fh The file handle.
*  @return The number of objects successfully written.
  */
 size_t fwrite( const void * restrict src, size_t size, size_t n, FILE * restrict fh );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /** SET Virtual BUFfer. Sets buffering mode and (optionally) the memory used
   for buffering, for a given file handle.
   This function must only be called immediately after associating the file
   handle with a file, before any operations are called on the file handle.
   @param fh The file handle.
   @param buf A pointer to the memory area to use for buffering, or NULL to
          use internally assigned buffer memory.
   @param mode One of _IOFBF, _IOLBF, _IONBF.
   @param size Size of the memory area to be used for buffering.
*  for buffering, for a given file handle.
*  This function must only be called immediately after associating the file
*  handle with a file, before any operations are called on the file handle.
*  @param fh The file handle.
*  @param buf A pointer to the memory area to use for buffering, or NULL to
*         use internally assigned buffer memory.
*  @param mode One of _IOFBF, _IOLBF, _IONBF.
*  @param size Size of the memory area to be used for buffering.
  */
 int setvbuf( FILE * restrict fh, char * restrict buf, int mode, size_t size );
 
 /** SET BUFfer. Equivalent to (void) setvbuf( fh, buf, _IOFBF, BUFSIZ ), or
   (void) setvbuf( fh, NULL, _IONBF, BUFSIZ ) if buf == NULL.
   @param fh The file handle to be passed to setvbuf().
   @param buf The buffer pointer to be passed to setvbuf().
*  (void) setvbuf( fh, NULL, _IONBF, BUFSIZ ) if buf == NULL.
*  @param fh The file handle to be passed to setvbuf().
*  @param buf The buffer pointer to be passed to setvbuf().
  */
 void setbuf( FILE * restrict fh, char * restrict buf );
 
-// ----------------------------------------------------------------------------
+/* ------------------------------------------------------------------------- */
 
 /* PDPC code - unreviewed
 /*
@@ -571,4 +582,4 @@ typedef struct
     int theirBuffer; /* Is the buffer supplied by them? */
 } FILE;
 
-#endif // __STDIO_H
+#endif /* _STDIO_H */
index 500060ce82f942ff21ee510ecac984390b6c7767..2724dcfdb685c4d755e31e66a1a74cfc508f643c 100644 (file)
@@ -1,29 +1,35 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// General utilities
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $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 _STDLIB_H
+#define _STDLIB_H _STDLIB_H
 
-// TODO: Documentation
+#ifndef _NULL
+#include "__intern.h"
+#endif /* _NULL */
 
-// ----------------------------------------------------------------------------
-// MACROS
+/* TODO: Documentation */
 
-#include "__NULL.h"
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
 
-#define EXIT_FAILURE // TODO
-#define EXIT_SUCCESS // TODO
-#define MB_CUR_MAX   // TODO
-#define RAND_MAX     // TODO
+#define NULL _NULL
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+#define EXIT_FAILURE /* TODO */
+#define EXIT_SUCCESS /* TODO */
+#define MB_CUR_MAX   /* TODO */
+#define RAND_MAX     /* TODO */
+
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
 typedef struct
 {
@@ -42,11 +48,19 @@ typedef struct
     long long remainder;
 } lldiv_t;
 
-#include "__size_t.h"
-#include "__wchar_t.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 */
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 int abs( int i );
 long long llabs( long long i );
@@ -95,4 +109,4 @@ 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
+#endif /* _STDLIB_H */
index e7e69216de1b6ca3fe021ed8d40a3eab98ddd735..9d2a517a7cc2de434d46af6274b686d77d5c1205 100644 (file)
@@ -1,27 +1,37 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// String handling
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * String handling
+ * --------------------------------------------------------------------------*/
 
-#ifndef __STRING_H
-#define __STRING_H __STRING_H
+#ifndef _STRING_H
+#define _STRING_H _STRING_H
 
-// ----------------------------------------------------------------------------
-// MACROS
+#ifndef _NULL
+#include "__intern.h"
+#endif /* _NULL */
 
-#include "__NULL.h"
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+#define NULL _NULL
 
-#include "__size_t.h"
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+#ifndef _SIZE_T
+#define _SIZE_T _SIZE_T
+typedef __size_t size_t
+#endif /* _SIZE_T */
+
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 /** MEMory search for CHaRacter. Searches a memory area for a character.
  *  @param src The memory area.
@@ -269,4 +279,4 @@ char * strrchr( const char * src, int c );
  */
 char * strstr( const char * src_1, const char * src_2 );
 
-#endif // __STRING_H
+#endif /* _STRING_H */
index 3ba73b0560093f92dd27f60ed8b2f5cfca8d37fe..df1d2b8d22d836cf3a9e3e7d4c859019d5f9579e 100644 (file)
@@ -1,18 +1,18 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Type-generic math
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $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
+#ifndef _TGMATH_H
+#define _TGMATH_H _TGMATH_H
 
-// TODO: Generics support
+/* 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.
+ */
 
-#include <complex.h>
-#include <math.h>
-
-#endif // __TGMATH_H
+#endif /* _TGMATH_H */
index c527cc31b68003aa1c54a89e55228da5464a25ea..b707a31c1f1dff2cee56f4c933ee83a240b83a54 100644 (file)
@@ -1,35 +1,46 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Date and time
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Date and time
+ * --------------------------------------------------------------------------*/
 
-#ifndef __TIME_H
-#define __TIME_H __TIME_H
+#ifndef _TIME_H
+#define _TIME_H _TIME_H
 
-// TODO: Documentation.
+#ifndef _NULL
+#include "__intern.h"
+#endif
 
-// ----------------------------------------------------------------------------
-// MACROS
+/* TODO: Documentation. */
 
-#include "__NULL.h"
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
 
-#define CLOCKS_PER_SEC // TODO - personality?
+#define NULL _NULL
 
-// ----------------------------------------------------------------------------
-// TYPES
+#define CLOCKS_PER_SEC /* TODO - to __intern.h / __personality.h? */
 
-#include "__size_t.h"
-#include "__tm.h"
+/* ----------------------------------------------------------------------------
+ * TYPES
+ * --------------------------------------------------------------------------*/
 
-typedef clock_t; // TODO - personality?
-typedef time_t;  // TODO - personality?
+/* TODO: Get struct tm into __intern.h */
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+#ifndef _SIZE_T
+#define _SIZE_T _SIZE_T
+typedef __size_t size_t;
+#endif /* _SIZE_T */
+
+typedef clock_t; /* TODO - to __intern.h / __personality.h? */
+typedef time_t;  /* TODO - to __intern.h / __personality.h? */
+
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 char * asctime( const struct tm * tptr );
 clock_t clock( void );
@@ -42,4 +53,4 @@ size_t strftime( char * restrict s, size_t n, const char * restrict format,
                  const struct tm * restrict tptr );
 time_t time( time_t * tod );
 
-#endif // __TIME_H
+#endif /* _TIME_H */
index 2af21556aa7a38b2ac5541206002f93bb103a90d..1be74dce28933cfa0372e0505dd19fb78c4005b1 100644 (file)
@@ -1,39 +1,56 @@
-// ----------------------------------------------------------------------------
-// $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
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $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 __WCHAR_H
+#ifndef _WCHAR_H
+#define _WCHAR_H _CHAR_H
 
-// TODO: Documentation
+#ifndef _NULL
+#include "__intern.h"
+#endif
 
-// ----------------------------------------------------------------------------
-// MACROS
+/* TODO: Documentation */
 
-#include "__NULL.h"
-#include "__WCHAR.h"
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
 
-#define WEOF       // TODO - personality?
+#define NULL _NULL
+#define WCHAR_MAX _WCHAR_MAX
+#define WCHAR_MIN _WCHAR_MIN
+#define WEOF _WEOF
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
-#include "__tm.h"
-#include "__size_t.h"
-#include "__wchar_t.h"
-#include "__wint_t.h"
+/* TODO: Get struct tm into __intern.h */
 
-typedef mbstate_t; // TODO - personality?
-typedef size_t;    // TODO - personality?
-typedef wint_t;    // TODO - personality?
+#ifndef _SIZE_T
+#define _SIZE_T _SIZE_T
+typedef __size_t size_t;
+#endif /* _SIZE_T */
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+#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 );
@@ -101,4 +118,4 @@ 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
+#endif /* _WCHAR_H */
index 64012843287c69c7f15ac0f13e200bbd8d81f0a2..3b3e211eb5fe1d78b9b36dcc1690b09255a243bc 100644 (file)
@@ -1,27 +1,37 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Wide character classification and mapping utilities
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Wide character classification and mapping utilities
+ * --------------------------------------------------------------------------*/
 
-#ifndef __WCTYPE_H
-#define __WCTYPE_H __WCTYPE_H
+#ifndef _WCTYPE_H
+#define _WCTYPE_H _WCTYPE_H
 
-// TODO: Documentation
+#ifndef _NULL
+#define _NULL _NULL
+#include "__intern.h"
+#endif /* _NULL */
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+/* TODO: Documentation */
 
-#include "__wint_t.h"
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
-typedef wctrans_t; // TODO - personality?
-typedef wctype_t;  // TODO - personality?
+#ifndef _WINT_T
+#define _WINT_T _WINT_T
+typedef __wint_t wint_t
+#endif /* _WINT_T */
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+typedef wctrans_t; /* TODO - to __intern.h / __personality.h? */
+typedef wctype_t;  /* TODO - to __intern.h / __personality.h? */
+
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 int iswalnum( wint_t c );
 int iswalpha( wint_t c );
@@ -44,4 +54,4 @@ wint_t towupper( wint_t c );
 wctrans_t wctrans( const char * property );
 wctype_t wctype( const char * property );
 
-#endif // __WCTYPE_H
+#endif /* _WCTYPE_H */
diff --git a/personalities/__pdc_stdio.h b/personalities/__pdc_stdio.h
deleted file mode 100644 (file)
index 54719ad..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Input/output - personality
-// ----------------------------------------------------------------------------
-
-#define BUFSIZ       // buffer size (see setvbuf()), >= 256
-#define FOPEN_MAX    // supported number of simultaneously open files, >= 8
-#define FILENAME_MAX // supported length of filenames
-#define L_tmpnam     // length of filenames generated by tmpnam() including \0
-#define TMP_MAX      // number of unique filenames generateable by tmpnam(),
-                     // during a program run; >= 25
-
-#define stderr // FILE *
-#define stdin  // FILE *
-#define stdout // FILE *
-
-// storing return code in fh->HostRC
-void __pdc_fclose( FILE * fh );
diff --git a/personalities/__personality.h b/personalities/__personality.h
deleted file mode 100644 (file)
index e5da670..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Personality #define's (see personality.txt)
-// ----------------------------------------------------------------------------
-
-#ifndef __PDCLIB_PERSONALITY_H
-#define __PDCLIB_PERSONALITY_H __PDCLIB_PERSONALITY_H
-
-// This structure is required by time.h and wchar.h.
-struct tm;
-
-// This type is required by wchar.h and wctype.h.
-typedef wint_t;
-
-// #undef this if environment does not support _Imaginary.
-#define __PERSONALITY_SUPPORTS_IMAGINARY
-
-#endif // __PDCLIB_PERSONALITY_H
diff --git a/personalities/float.h b/personalities/float.h
deleted file mode 100644 (file)
index 2a5a836..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Characteristics of floating types
-// ----------------------------------------------------------------------------
-
-#ifndef __FLOAT_H
-#define __FLOAT_H __FLOAT_H
-
-// This file is part of the platform personality (see personality.txt).
-
-#define FLT_RADIX       // TODO
-#define FLT_ROUNDS      // TODO
-#define FLT_EVAL_METHOD // TODO
-#define DECIMAL_DIG     // TODO
-
-#define DBL_DIG         // TODO
-#define DBL_EPSILON     // TODO
-#define DBL_MANT_DIG    // TODO
-#define DBL_MAX         // TODO
-#define DBL_MAX_10_EXP  // TODO
-#define DBL_MAX_EXP     // TODO
-#define DBL_MIN         // TODO
-#define DBL_MIN_10_EXP  // TODO
-#define DBL_MIN_EXP     // TODO
-
-#define FLT_DIG         // TODO
-#define FLT_EPSILON     // TODO
-#define FLT_MANT_DIG    // TODO
-#define FLT_MAX         // TODO
-#define FLT_MAX_10_EXP  // TODO
-#define FLT_MAX_EXP     // TODO
-#define FLT_MIN         // TODO
-#define FLT_MIN_10_EXP  // TODO
-#define FLT_MIN_EXP     // TODO
-
-#define LDBL_DIG        // TODO
-#define LDBL_EPSILON    // TODO
-#define LDBL_MANT_DIG   // TODO
-#define LDBL_MAX        // TODO
-#define LDBL_MAX_10_EXP // TODO
-#define LDBL_MAX_EXP    // TODO
-#define LDBL_MIN        // TODO
-#define LDBL_MIN_10_EXP // TODO
-#define LDBL_MIN_EXP    // TODO
-
-#endif // __FLOAT_H
diff --git a/personalities/limits.h b/personalities/limits.h
deleted file mode 100644 (file)
index 7d14a93..0000000
+++ /dev/null
@@ -1,55 +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
-// ----------------------------------------------------------------------------
-
-#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 (see personality.txt).
-
-// 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/personalities/personality.txt b/personalities/personality.txt
new file mode 100644 (file)
index 0000000..d5bc2ba
--- /dev/null
@@ -0,0 +1,71 @@
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Description of the personality concept
+ * --------------------------------------------------------------------------*/
+
+The PDCLib is aimed at providing a fully conforming implementation of the C
+standard library (ISO/IEC 9899) for diverse environments.
+
+To faciliate adaption to new environments, platform-specific parts of the
+library have been seperated from the generic parts (e.g. the string functions,
+or the parsing of format strings in stdio.h).
+
+The generic part is found in includes/ and functions/. It should be compilable
+on any platform given a compliant compiler.
+
+The "personalized" part implements, for each supported environment, the non-
+generic parts of the library. Each supported environment is represented by a
+subdirectory (dubbed "personality module") in personalities/. Such a module
+usually requires a specific compiler on a specific hardware.
+
+The concept of personality modules was favored over the traditional approach
+of '#ifdef', 'configure', and complex makefiles, because it isolates the
+environment dependencies in a limited number of files in a seperate directory, instead of spreading the dependency handling all over the code base. This
+approach also minimizes dependencies on the compilation environment, so that
+very minimalistic environments (which could e.g. not run a 'configure' script)
+could still compile the PDCLib.
+
+A personality module consists of:
+
+* standard '#define's and 'typedef's that are environment dependent (e.g. those
+  defined in stdint.h and float.h);
+
+* "abstract" '#define's that specify whether certain optional features are
+  available in the environment or not (e.g. whether the environment supports
+  the optional '_Imaginary' keyword, required in 'complex.h');
+
+* "glue code", which binds standard library functions to support functions of
+  the environment (e.g. the code actually allocating the memory passed out by
+  malloc()).
+
+* a (compiler-specific) solution for the type-generic math functions declared
+  in tgmath.h.
+
+In any case, it is sufficient to copy the contents of a personality module
+(consisting of the subdirectories functions/ and includes/) into the main
+directories of the same name. Your personalized copy of the PDCLib is now
+ready to be compiled.
+
+/* ------------------------------------------------------------------------- */
+
+ADDING A NEW ENVIRONMENT
+
+In the personalities/ subdirectory, you will find a module named "template". In
+this module, you will find a complete description of all '#define's, 'typedef's
+and glue code functions that are required to build a new personality module.
+
+A new personality module could be kept in our repository, or in the repository
+of the environment it refers to.
+
+If you are an OS developer opting to use the PDCLib as your standard library,
+you would be well-advised to keep the personality module in your own repository
+since you have direct access there, and can make necessary changes yourself.
+If you are not an OS developer, or your OS can be considered stable and active
+enough to warrant its own personality module in the PDCLib repository, you are
+free to submit it; but keep two things in mind: Any code contributed to this
+project must be Public Domain, and any contribution must be reviewed by the
+maintainers first. Please double-check your code before submitting.
diff --git a/personalities/stdint.h b/personalities/stdint.h
deleted file mode 100644 (file)
index d92753a..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Integer types
-// ----------------------------------------------------------------------------
-
-#ifndef __STDINT_H
-#define __STDINT_H __STDINT_H
-
-// This file is part of the platform personality (see personality.txt).
-
-// 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 // TODO
-#define WCHAR_MAX // TODO
-
-#include "__WCHAR.h"
-
-#define INTMAX_MIN  // TODO
-#define INTMAX_MAX  // TODO
-#define UINTMAX_MAX // TODO
-
-#endif // __STDINT_H
diff --git a/personalities/template/includes/__personality.h b/personalities/template/includes/__personality.h
new file mode 100644 (file)
index 0000000..2a3cb62
--- /dev/null
@@ -0,0 +1,25 @@
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Personality #define's (see personality.txt)
+ * --------------------------------------------------------------------------*/
+
+/* No header guard - including file is expected to check this (improves
+ * performance)
+ */
+
+#define _PERSONALITY
+
+/* This structure is required by time.h and wchar.h. */
+struct tm;
+
+/* This type is required by wchar.h and wctype.h. */
+typedef __wint_t;
+
+/* #undef this if environment does not support _Imaginary. */
+#define __PERSONALITY_SUPPORTS_IMAGINARY
+
+#endif /* _PERSONALITY */
diff --git a/personality.txt b/personality.txt
deleted file mode 100644 (file)
index 6f35088..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Description of the personality concept
-// ----------------------------------------------------------------------------
-
-The pdclib is aimed at providing a fully conforming implementation of the C99
-standard library, with a focus on adaptability to diverse environments.
-
-That means, an effort was made to make this library useful to you, no matter if
-you are looking for a replacement for the CLib provided by your system vendor,
-for a basic CLib to develop your own operating system on / with, or for a "bare
-bones" CLib to test your software against a strict "standard only" library.
-
-The traditional way of providing this kind of cross-platform support is the
-preprocessor directive '#ifdef'. However, careless use of this feature can make
-source code next to intelligible and hard to maintain. Hence, an effort was
-made to encapsule such platform dependencies, by the concept of "personality
-modules".
-
-A personality module consists of three parts: drop-ins, glue code, and the
-header file "__personality.h", in an appropriately named subdirectory of
-pdclib/personalities.
-
-// ----------------------------------------------------------------------------
-// DROP-INS
-
-The standard includes limits.h and stdint.h define various intrinsics of the
-integer types of a platform. The standard include float.h does the same for the
-floating point types. Throughout pdclib, these defines have been put to maximum
-use.
-
-Each personality module must provide those three include files, so that pdclib
-"knows" about the data type intrinsics of the platform in question. The files
-are simply "dropped" into the pdclib/includes subdirectory prior to building
-pdclib.
-
-// ----------------------------------------------------------------------------
-// GLUE CODE 
-
-Most functions of pdclib could be implemented generically - i.e., any supported
-platform uses identical source code for them. Some functions, however, interact
-closely with the operating system at one point or another. pdclib implements
-the "top half" of those functions, where possible. The "bottom half" has to be
-provided by the operating system.
-
-If pdclib is used on a host OS, as replacement for a vendor-supplied CLib, the
-personality module should contain the "glue code" necessary to match the OS
-provided services to pdclib's top/bottom interface (see below).
-
-When a new operating system uses pdclib as "native" C standard library, the
-documentation of the top/bottom interfaces (see below) should help in bringing
-OS and pdclib together. In this case, no dedicated "glue code" is necessary.
-
-// ----------------------------------------------------------------------------
-// __PERSONALITY.H
-
-At some points within the library, information about the environment is needed
-which cannot be derived from the drop-ins. In those places, "__personality.h"
-is included; this file defines a couple of symbols specifying those environment
-options for the personality module. A template for __personality.h can be found
-in the pdclib/personalities directory.
-
-The symbols defined in personality.h are all named __PERSONALITY_*, with "*"
-being replaced with a service or feature provded or not provided. Never is the
-name of an OS, compiler, or hardware used in such symbols - later generations
-of either might provide a service that older ones did not, and it is also more
-self-explanatory if the symbol reads "__PERSONALITY_SUPPORTS_XYZ" instead of
-"__PERSONALITY_MyOS", which basically leaves the reader clueless as to what
-makes MyOS special in this case - information that might be outdated already
-without anyone being the wiser.
-
-If a new, exotic personality is added that requires a new symbol to be added to personality.h, that symbol is always worded in a way that the old personality
-modules need not be changed. The default goes without saying, so to speak.
-
-// ----------------------------------------------------------------------------
-// TOP/BOTTOM INTERFACE
-
-What follows is a documentation of the "bottom half" functions required by
-pdclib, with an exact description of interface, required functionality, etc.