]> pd.if.org Git - pdclib.old/log
pdclib.old
11 years agoFix warnings
Owen Shepherd [Thu, 27 Dec 2012 01:13:24 +0000 (01:13 +0000)]
Fix warnings

11 years agoAdd an up to date POSIX port (works on Mac OS X). This is fully functional except...
Owen Shepherd [Thu, 27 Dec 2012 00:46:40 +0000 (00:46 +0000)]
Add an up to date POSIX port (works on Mac OS X). This is fully functional except for strerror. Warning cleanup is to come.

11 years agoRemove object files that had smuggled their way into the POSIX platform directories
Owen Shepherd [Thu, 27 Dec 2012 00:42:37 +0000 (00:42 +0000)]
Remove object files that had smuggled their way into the POSIX platform directories

11 years ago_PDCLIB_float.h: add newline at end of file
Owen Shepherd [Thu, 27 Dec 2012 00:33:42 +0000 (00:33 +0000)]
_PDCLIB_float.h: add newline at end of file
_PDCLIB_int.h: provide way to override choice of int64_t

11 years agoopt/nothread: add support for recursion
Owen Shepherd [Thu, 27 Dec 2012 00:29:19 +0000 (00:29 +0000)]
opt/nothread: add support for recursion

11 years agoMove existing errno handling to tss_errno, to allow the POSIX platform to just use...
Owen Shepherd [Thu, 27 Dec 2012 00:27:28 +0000 (00:27 +0000)]
Move existing errno handling to tss_errno, to allow the POSIX platform to just use the underlying OS's errno implementation. Eventually, tss_errno will use the thread specific primitives.

11 years agoAdd hello world file which can be used to establish that the I/O routines are working
Owen Shepherd [Thu, 27 Dec 2012 00:19:49 +0000 (00:19 +0000)]
Add hello world file which can be used to establish that the I/O routines are working

11 years agoJamfile, Jamrules: Convert to UNIX line endings
Owen Shepherd [Thu, 27 Dec 2012 00:19:04 +0000 (00:19 +0000)]
Jamfile, Jamrules: Convert to UNIX line endings

11 years agowcsncat test suite had a parameter which was a narrow string. whoops!
Owen Shepherd [Thu, 27 Dec 2012 00:11:19 +0000 (00:11 +0000)]
wcsncat test suite had a parameter which was a narrow string. whoops!

11 years agoFIXES PDCLIB-20 by preserving _PDCLIB_STATUS flag
Owen Shepherd [Thu, 27 Dec 2012 00:05:11 +0000 (00:05 +0000)]
FIXES PDCLIB-20 by preserving _PDCLIB_STATUS flag

11 years agoPDCLIB_scan: For %p, use E_long. This is a temporary change: Long term, we will be...
Owen Shepherd [Wed, 26 Dec 2012 23:28:07 +0000 (23:28 +0000)]
PDCLIB_scan: For %p, use E_long. This is a temporary change: Long term, we will be adding an E_pointer conversion

11 years ago_PDCLIB_print: Change "written" unsigned -> int due to C promotion rules causing...
Owen Shepherd [Wed, 26 Dec 2012 22:19:57 +0000 (22:19 +0000)]
_PDCLIB_print: Change "written" unsigned -> int due to C promotion rules causing incorrect behaviour on 64-bit platforms

11 years ago_PDCLIB_scan: Correct INT_MAX -> UINT_MAX when initializing width
Owen Shepherd [Wed, 26 Dec 2012 19:45:24 +0000 (19:45 +0000)]
_PDCLIB_scan: Correct INT_MAX -> UINT_MAX when initializing width
vfprintf: Correct SIZE_MAX -> UINT_MAX when initializing width

11 years agoposix: First pass at updated config file for POSIX platforms
Owen Shepherd [Wed, 26 Dec 2012 18:54:57 +0000 (18:54 +0000)]
posix: First pass at updated config file for POSIX platforms

11 years agowin32: _PDCLIB_config.h cleaned up:
Owen Shepherd [Wed, 26 Dec 2012 18:53:47 +0000 (18:53 +0000)]
win32: _PDCLIB_config.h cleaned up:
 * _PDCLIB_NOHANDLE removed (obsolete)
 * _PDCLIB_NORETURN removed (obsolete)
 * Temp name length was greated than max guaranteed file name length. This has obvious issus.

11 years ago_PDCLIB_aux.h: Better detection of Clang and GCC features
Owen Shepherd [Wed, 26 Dec 2012 18:51:35 +0000 (18:51 +0000)]
_PDCLIB_aux.h: Better detection of Clang and GCC features

11 years ago_PDCLIB_seek: Incorrect specification (used int64_t where int_fast64_t was correct)
Owen Shepherd [Wed, 26 Dec 2012 18:50:48 +0000 (18:50 +0000)]
_PDCLIB_seek: Incorrect specification (used int64_t where int_fast64_t was correct)

11 years ago_PDCLIB_scan: Had incorrect upper bound on field width causing integer overflow
Owen Shepherd [Wed, 26 Dec 2012 18:50:04 +0000 (18:50 +0000)]
_PDCLIB_scan: Had incorrect upper bound on field width causing integer overflow

11 years agoAdd Sublime Text project file
Owen Shepherd [Fri, 14 Dec 2012 15:36:25 +0000 (15:36 +0000)]
Add Sublime Text project file

11 years agoPDCLIB-18: Unify fgetc under _PDCLIB_getchars. Also unify gets under _PDCLIB_getchars...
Owen Shepherd [Tue, 11 Dec 2012 02:00:22 +0000 (02:00 +0000)]
PDCLIB-18: Unify fgetc under _PDCLIB_getchars. Also unify gets under _PDCLIB_getchars (gets also suffered from the bug)

11 years agoPDCLIB-18: Add _PDCLIB_getchars to _PDCLIB_io.h. Change fread & fgets to go through...
Owen Shepherd [Tue, 11 Dec 2012 01:42:35 +0000 (01:42 +0000)]
PDCLIB-18: Add _PDCLIB_getchars to _PDCLIB_io.h. Change fread & fgets to go through this function.

All narrow character reads are going to be directed through this function

11 years agoPDCLIB-19: Remove gets() when >=C11. Deprecated it universally.
Owen Shepherd [Tue, 11 Dec 2012 01:15:02 +0000 (01:15 +0000)]
PDCLIB-19: Remove gets() when >=C11. Deprecated it universally.

11 years agoPDCLIB-18: Implement defect test cases
Owen Shepherd [Tue, 11 Dec 2012 00:55:36 +0000 (00:55 +0000)]
PDCLIB-18: Implement defect test cases

11 years agoPDCLIB-8: First phase of intergation of new I/O backend system (with minimal
Owen Shepherd [Wed, 5 Dec 2012 02:20:16 +0000 (02:20 +0000)]
PDCLIB-8: First phase of intergation of new I/O backend system (with minimal
disruption of existing code)
* _PDCLIB_fdopen: renamed _PDCLIB_fvopen to more clearly deliniate from POSIX
  fdopen function and state purpose
* _PDCLIB_fd_t is now a library provided union type
   Contains members of type void*, uintptr_t, intptr_t. If another type is
   required, define _PDCLIB_OSFD_T to that type in _PDCLIB_config.h
* _PDCLIB_fileops_t added. This structure contains the file operations
* _PDCLIB_fillbuffer, _PDCLIB_flushbuffer, _PDCLIB_seek become internal APIs
    (_PDCLIB_seek's days are numbered!)
* _PDCLIB_close is removed
* tmpfile() and fopen() should now call through to _PDCLIB_fvopen and provide
  a pointer to an appropriate _PDCLIB_fileops_t structure

Win32 port updated. Other ports are TODO

11 years agoOn C++, define _PDCLIB_wchar_t to be builtin type wchar_t
Owen Shepherd [Tue, 4 Dec 2012 19:07:13 +0000 (19:07 +0000)]
On C++, define _PDCLIB_wchar_t to be builtin type wchar_t

11 years agowin32: Fix warnings relating to definition of LONG and use of InterlockedCompareExchange
Owen Shepherd [Thu, 15 Nov 2012 20:33:02 +0000 (20:33 +0000)]
win32: Fix warnings relating to definition of LONG and use of InterlockedCompareExchange

11 years agoPDCLIB-15: _PDCLIB_print now calls through to putc_unlocked
Owen Shepherd [Thu, 15 Nov 2012 20:03:28 +0000 (20:03 +0000)]
PDCLIB-15: _PDCLIB_print now calls through to putc_unlocked

12 years agoPDCLIB-16: Add _unlocked variations of all I/O routines; move work into these versions
Owen Shepherd [Mon, 12 Nov 2012 04:09:02 +0000 (04:09 +0000)]
PDCLIB-16: Add _unlocked variations of all I/O routines; move work into these versions
PDCLIB-15: Make most stdio routines lock the stream and then call through to the _unlocked version

12 years agoPDCLIB-15: fopen initializes stream lock; fclose releases
Owen Shepherd [Thu, 8 Nov 2012 23:21:37 +0000 (23:21 +0000)]
PDCLIB-15: fopen initializes stream lock; fclose releases

12 years agoPDCLIB-15 PDCLIB-16:
Owen Shepherd [Thu, 8 Nov 2012 23:17:29 +0000 (23:17 +0000)]
PDCLIB-15 PDCLIB-16:
 * Move _PDCLIB_file_t to _PDCLIB_io.h, compertmentalizing dependencies.
   Removes I/O specific structures from _PDCLIB_int.h. Allows _PDCLIB_io.h
   to depend upon _PDCLIB_threadconfig.h without recursive dependencies
   happening.
 * Add "lock" member to _PDCLIB_file_t as the stream locking mutex
 * Add flockfile/ftrylockfile/funlockfile as functions which manipulate the
   locking mutex explicitly
 * Add man page on flockfile/funlockfile/ftrylockfile
 * Add flockfile/ftrylockfile/funlockfile and *_unlocked to <stdio.h> and
   <wchar.h> as appropriate
 * win32: Initialize mutex member correctly

12 years agoImprove reStructuredText formatting
Owen Shepherd [Thu, 8 Nov 2012 20:09:03 +0000 (20:09 +0000)]
Improve reStructuredText formatting

12 years agoConvert readme to be in reStructuredText format (for nice formatting)
Owen Shepherd [Thu, 8 Nov 2012 20:00:06 +0000 (20:00 +0000)]
Convert readme to be in reStructuredText format (for nice formatting)

12 years agoPDCLIB-14: abort() on buffer size error
Owen Shepherd [Thu, 8 Nov 2012 19:58:40 +0000 (19:58 +0000)]
PDCLIB-14: abort() on buffer size error

12 years agoPDCLIB-13: fwrite did not reset it's offset after doing a buffer flush.
Owen Shepherd [Wed, 10 Oct 2012 15:01:48 +0000 (16:01 +0100)]
PDCLIB-13: fwrite did not reset it's offset after doing a buffer flush.
           TODO: Evaluate if fwrite should move to using an offset stored inside the FILE structure

   Patch submitted by Rink Springer (complexity: trivial)

12 years agoUpdate .hgignore to ignore sublime text workspaces
Owen Shepherd [Wed, 10 Oct 2012 15:00:08 +0000 (16:00 +0100)]
Update .hgignore to ignore sublime text workspaces

12 years agoPDCLIB-2: Pure wide character functions
Owen Shepherd [Tue, 11 Sep 2012 21:48:43 +0000 (22:48 +0100)]
PDCLIB-2: Pure wide character functions
 * functions/wchar/: functions which only involve wide characters & no locale dependent characters
 * opt/mincoll: new option providing bare minimum collation support (pure wchar_t binary comparison)
 * platform/win32: Use mincoll
 * testing/_PDCLIB_test.h: Provide wide character strings for testing the wide character functions

12 years agoPDCLIB-2: <wchar.h>: don't expect or expose definition of FILE. Declare mbstate_t...
Owen Shepherd [Tue, 11 Sep 2012 21:46:07 +0000 (22:46 +0100)]
PDCLIB-2: <wchar.h>: don't expect or expose definition of FILE. Declare mbstate_t, wint_t, wchar_t

12 years agoman3/wchar.h.3: _PDCLIB_restrict -> restrict. doh.
Owen Shepherd [Wed, 29 Aug 2012 23:40:24 +0000 (00:40 +0100)]
man3/wchar.h.3: _PDCLIB_restrict -> restrict. doh.

12 years agoman3/pdclib.3: link wchar.h from our list of headers
Owen Shepherd [Wed, 29 Aug 2012 23:37:37 +0000 (00:37 +0100)]
man3/pdclib.3: link wchar.h from our list of headers

12 years agoPDCLIB-2: Complete wchar.h + manual page. This header is a monster, implies numerous...
Owen Shepherd [Wed, 29 Aug 2012 23:29:27 +0000 (00:29 +0100)]
PDCLIB-2: Complete wchar.h + manual page. This header is a monster, implies numerous backend changes, and therefore is going to be a bit of a slog :-(

12 years agoPDCLIB-7: Add _PDCLIB_ftell64 to give us full precision file positioning information...
Owen Shepherd [Sun, 26 Aug 2012 15:33:48 +0000 (16:33 +0100)]
PDCLIB-7: Add _PDCLIB_ftell64 to give us full precision file positioning information. Rewrite ftell to use it, and fseek to use it for the SEEK_CUR case. This should resolve PDCLIB-7

12 years agoPDCLIB-7: When fseek is called with SEEK_CUR, internally calculate the new offset...
Owen Shepherd [Sun, 26 Aug 2012 15:04:22 +0000 (16:04 +0100)]
PDCLIB-7: When fseek is called with SEEK_CUR, internally calculate the new offset and then hand SEEK_SET to the glue layer, as our offset may differ from the offset of the underlying file descriptor due to buffering

12 years agoopt nothread: Fix call_once to match recent changes to the implementation method
Owen Shepherd [Sat, 25 Aug 2012 20:23:17 +0000 (21:23 +0100)]
opt nothread: Fix call_once to match recent changes to the implementation method

12 years agowin32: mutex rewrite. new form is much simpler
Owen Shepherd [Sat, 25 Aug 2012 19:04:11 +0000 (20:04 +0100)]
win32: mutex rewrite. new form is much simpler

12 years agostrnlen: stupid off-by-one
Owen Shepherd [Sat, 25 Aug 2012 19:03:06 +0000 (20:03 +0100)]
strnlen: stupid off-by-one

12 years agoprintf_testcases.h: don't check for _PDCLIB_CHAR_SIGNED; instead, check for CHAR_MIN...
Owen Shepherd [Sat, 25 Aug 2012 16:57:34 +0000 (17:57 +0100)]
printf_testcases.h: don't check for _PDCLIB_CHAR_SIGNED; instead, check for CHAR_MIN==-128.

12 years agoPDCLIB-6: Didn't increment the specification pointer after the '*' in a precision...
Owen Shepherd [Sat, 25 Aug 2012 16:54:38 +0000 (17:54 +0100)]
PDCLIB-6: Didn't increment the specification pointer after the '*' in a precision specifier. Our printf now passes the tyndur test suite.

12 years agoC11 7.21.6.1p8 "The result of converting a zero value with a precision of zero is...
Owen Shepherd [Sat, 25 Aug 2012 16:50:29 +0000 (17:50 +0100)]
C11 7.21.6.1p8 "The result of converting a zero value with a precision of zero is no characters"

12 years agoC11 7.21.6.1p4: the precision may be * or an _optional_ number
Owen Shepherd [Sat, 25 Aug 2012 16:46:02 +0000 (17:46 +0100)]
C11 7.21.6.1p4: the precision may be * or an _optional_ number

12 years agoPDCLIB-6: Macros not wrapped in parentheses are evil things
Owen Shepherd [Sat, 25 Aug 2012 16:40:04 +0000 (17:40 +0100)]
PDCLIB-6: Macros not wrapped in parentheses are evil things

12 years agoPDCLIB-6: Removing the zero flag requires bitwise and, not bitwise xor
Owen Shepherd [Sat, 25 Aug 2012 16:31:08 +0000 (17:31 +0100)]
PDCLIB-6: Removing the zero flag requires bitwise and, not bitwise xor

12 years agoPDCLIB-6: Move output from %s/%c specifiers to their own functions in _PDCLIB_print...
Owen Shepherd [Sat, 25 Aug 2012 14:33:53 +0000 (15:33 +0100)]
PDCLIB-6: Move output from %s/%c specifiers to their own functions in _PDCLIB_print. These functions now handle padding and precision appropriately

12 years ago_PDCLIB_iotest.h: Print out the format string which caused the error (PDCLIB-6)
Owen Shepherd [Sat, 25 Aug 2012 14:32:54 +0000 (15:32 +0100)]
_PDCLIB_iotest.h: Print out the format string which caused the error (PDCLIB-6)

12 years ago<string.h>: add POSIX 2008 extension strnlen (general utility + use by printf).
Owen Shepherd [Sat, 25 Aug 2012 14:32:11 +0000 (15:32 +0100)]
<string.h>: add POSIX 2008 extension strnlen (general utility + use by printf).

12 years agoPDCLIB-6: _PDCLIB_status_t: change members from size_t to unsigned or int as appropri...
Owen Shepherd [Sat, 25 Aug 2012 14:31:04 +0000 (15:31 +0100)]
PDCLIB-6: _PDCLIB_status_t: change members from size_t to unsigned or int as appropriate. >int will overflow into error return anyway. Aligns types to better support negative precisions.

12 years agoprintf_testcases.h: Don't enable the Tyndur test cases if TEST_CONVERSION_ONLY is...
Owen Shepherd [Sat, 25 Aug 2012 02:19:50 +0000 (03:19 +0100)]
printf_testcases.h: Don't enable the Tyndur test cases if TEST_CONVERSION_ONLY is defined (it causes spurious test failures in the _PDCLIB_print test)

12 years agoPDCLIB-6: int2base: alternate conversion specifier for hex output (#x/#X) doesn't...
Owen Shepherd [Sat, 25 Aug 2012 02:18:57 +0000 (03:18 +0100)]
PDCLIB-6: int2base: alternate conversion specifier for hex output (#x/#X) doesn't print 0x/0X if value==0

12 years agoPDCLIB-6: Inside _PDCLIB_print, remove intformat and completely rewrite int2base...
Owen Shepherd [Sat, 25 Aug 2012 02:09:07 +0000 (03:09 +0100)]
PDCLIB-6: Inside _PDCLIB_print, remove intformat and completely rewrite int2base. The new code is non-recursive and far more logical. Additionally, because everything occurs in one place, it vastly simplifies some aspects of the handling

12 years ago_PDCLIB_iotest.h: the code for determining if the result matched or not was too cleve...
Owen Shepherd [Sat, 25 Aug 2012 00:43:23 +0000 (01:43 +0100)]
_PDCLIB_iotest.h: the code for determining if the result matched or not was too clever, and operator short circuiting was casuing the "actual" result for cases where the return codes didn't match to be stale (i.e. the result from a previous test). This should make fixing PDCLIB-6 much simpler

12 years agoPDCLIB-6: Incorporate the Tyndur test suite into our printf test suite (see included...
Owen Shepherd [Fri, 24 Aug 2012 18:14:14 +0000 (19:14 +0100)]
PDCLIB-6: Incorporate the Tyndur test suite into our printf test suite (see included license note for details).

This both incorporates the test suite to aid in fixing PDCLIB-6, and also ensures we have a good test suite to use for regression tests

12 years agoManual pages: renmae man->man3 to follow existing conventions. Add files _Exit.3...
Owen Shepherd [Fri, 24 Aug 2012 16:54:44 +0000 (17:54 +0100)]
Manual pages: renmae man->man3 to follow existing conventions. Add files _Exit.3, quick_exit.3, at_quick_exit.3, strndup.3 aliasing the file which documents said function, using .so inclusion directive. (While symlinks would be ideal, they are not sufficiently portable)

12 years agowin32: mtx_destroy implemented
Owen Shepherd [Thu, 23 Aug 2012 15:33:29 +0000 (16:33 +0100)]
win32: mtx_destroy implemented

12 years ago<threads.h>: correct declaration of thrd_start_t. oops.
Owen Shepherd [Thu, 23 Aug 2012 15:32:51 +0000 (16:32 +0100)]
<threads.h>: correct declaration of thrd_start_t. oops.

12 years ago<time.h> opt/notime: add timespec_get. wrap time with REGTEST check
Owen Shepherd [Thu, 23 Aug 2012 15:32:16 +0000 (16:32 +0100)]
<time.h> opt/notime: add timespec_get. wrap time with REGTEST check

12 years ago<time.h>: define timespec_get, TIME_UTC, to support <threads.h> implementations
Owen Shepherd [Thu, 23 Aug 2012 15:25:20 +0000 (16:25 +0100)]
<time.h>: define timespec_get, TIME_UTC, to support <threads.h> implementations

12 years agowin32: initial pass at thread support
Owen Shepherd [Wed, 22 Aug 2012 22:23:05 +0000 (23:23 +0100)]
win32: initial pass at thread support

12 years agocall_once: inline definition in threads.h (available when _PDCLIB_ONCE_FLAG_IS_DONE...
Owen Shepherd [Wed, 22 Aug 2012 22:21:45 +0000 (23:21 +0100)]
call_once: inline definition in threads.h (available when _PDCLIB_ONCE_FLAG_IS_DONE is defined): had sense of conditional wrong way around

12 years ago_PDCLIB_ONCE_FLAG_DONE -> _PDCLIB_ONCE_FLAG_IS_DONE(flag) to support once_flag types...
Owen Shepherd [Wed, 22 Aug 2012 21:05:16 +0000 (22:05 +0100)]
_PDCLIB_ONCE_FLAG_DONE -> _PDCLIB_ONCE_FLAG_IS_DONE(flag) to support once_flag types which are not simply comparable (e.g. structures)

12 years agowin32: predeclare mainCRTStartup in crt0.c (silence compiler warning)
Owen Shepherd [Wed, 22 Aug 2012 13:27:18 +0000 (14:27 +0100)]
win32: predeclare mainCRTStartup in crt0.c (silence compiler warning)

12 years agoRemove dev_zero_fd from dlmalloc.c (we don't use it - its a dlmalloc unix assumption)
Owen Shepherd [Wed, 22 Aug 2012 13:25:15 +0000 (14:25 +0100)]
Remove dev_zero_fd from dlmalloc.c (we don't use it - its a dlmalloc unix assumption)

12 years agowin32: declare _PDCLIB_w32errno in _PDCLIB_flushbuffer.c
Owen Shepherd [Wed, 22 Aug 2012 13:23:17 +0000 (14:23 +0100)]
win32: declare _PDCLIB_w32errno in _PDCLIB_flushbuffer.c

12 years agowcsrchr: add (wchar_t*) cast to found assignment (previously was assigning a const...
Owen Shepherd [Wed, 22 Aug 2012 13:22:23 +0000 (14:22 +0100)]
wcsrchr: add (wchar_t*) cast to found assignment (previously was assigning a const wchar_t without cast)

12 years agowin32: Predeclare _PDCLIB_w32errno (silence compiler warning)
Owen Shepherd [Wed, 22 Aug 2012 13:21:18 +0000 (14:21 +0100)]
win32: Predeclare _PDCLIB_w32errno (silence compiler warning)

12 years agorename: test driver checked for rv == -1 on failure. Standard defines failure as...
Owen Shepherd [Wed, 22 Aug 2012 13:20:55 +0000 (14:20 +0100)]
rename: test driver checked for rv == -1 on failure. Standard defines failure as any non-zero return; now check rv != 0. This makes the testsuite complete on win32 without failures (excepting disabled/not yet tested warnings)

12 years agowin32: L_tmpnam set to 260 (MAX_PATH)
Owen Shepherd [Wed, 22 Aug 2012 12:58:32 +0000 (13:58 +0100)]
win32: L_tmpnam set to 260 (MAX_PATH)

12 years ago<float.h> is now implemented in the platform independent portion. It is based
Owen Shepherd [Thu, 16 Aug 2012 23:13:35 +0000 (00:13 +0100)]
<float.h> is now implemented in the platform independent portion. It is based
upon a macro family defined in _PDCLIB_float.h, which is similar in structore
to the existing _PDCLIB_int.h. It is controlled by three definitions in
_PDCLIB_config.h, which define which IEEE 754 format the floating point types
are in. This removes a GCC dependency from all of the targets, and should help
in making PDCLib support other compilers

12 years agowin32: most tests now build on Watcom
Owen Shepherd [Thu, 16 Aug 2012 17:45:37 +0000 (18:45 +0100)]
win32: most tests now build on Watcom

12 years agoEnable building PDCLib with Watcom. This was surprisingly painless: their C99 mode...
Owen Shepherd [Thu, 16 Aug 2012 13:59:39 +0000 (14:59 +0100)]
Enable building PDCLib with Watcom. This was surprisingly painless: their C99 mode has come a long way!

12 years agoprintf test cases: check signdness of char. Validate assumptions about shorts
Owen Shepherd [Thu, 16 Aug 2012 13:58:54 +0000 (14:58 +0100)]
printf test cases: check signdness of char. Validate assumptions about shorts

12 years agowin32: Fix _PDCLIB_seek. Todo soon: change this API. It is far too tricky and involve...
Owen Shepherd [Thu, 16 Aug 2012 12:11:16 +0000 (13:11 +0100)]
win32: Fix _PDCLIB_seek. Todo soon: change this API. It is far too tricky and involves too much reaching into the stream objects.

12 years agoprintf_testcases: validate assumptions test cases make (todo soon: add support for...
Owen Shepherd [Thu, 16 Aug 2012 12:07:42 +0000 (13:07 +0100)]
printf_testcases: validate assumptions test cases make (todo soon: add support for case of char being unsigned)

12 years agowin32: add a last chance exception handler which invokes the appropriate signal handler
Owen Shepherd [Wed, 15 Aug 2012 22:53:54 +0000 (23:53 +0100)]
win32: add a last chance exception handler which invokes the appropriate signal handler

12 years agofclose.c: don't try to open testfile2 while already open; [win32] implement rename
Owen Shepherd [Wed, 15 Aug 2012 14:23:40 +0000 (15:23 +0100)]
fclose.c: don't try to open testfile2 while already open; [win32] implement rename

12 years ago_PDCLIB_flushbuffer for win32. correct seeking behaviour.
Owen Shepherd [Wed, 15 Aug 2012 13:08:07 +0000 (14:08 +0100)]
_PDCLIB_flushbuffer for win32. correct seeking behaviour.

12 years agoignore generated html files from manuals
Owen Shepherd [Tue, 14 Aug 2012 23:41:47 +0000 (00:41 +0100)]
ignore generated html files from manuals

12 years agoDocumentation for errno.h and errno
Owen Shepherd [Tue, 14 Aug 2012 23:40:43 +0000 (00:40 +0100)]
Documentation for errno.h and errno

12 years agoEDOM was repeated
Owen Shepherd [Tue, 14 Aug 2012 23:40:23 +0000 (00:40 +0100)]
EDOM was repeated

12 years agoChange the HTML manual page style to remove width limit (primarily for the
Owen Shepherd [Tue, 14 Aug 2012 22:44:11 +0000 (23:44 +0100)]
Change the HTML manual page style to remove width limit (primarily for the
website's manual viewer, where the size is capped by an iframe anyhow)

12 years agoAdd nothrow annotations where appropriate
Owen Shepherd [Tue, 14 Aug 2012 18:31:10 +0000 (19:31 +0100)]
Add nothrow annotations where appropriate

12 years agoThe feature check statements should represent what the user enters, not how we check...
Owen Shepherd [Tue, 14 Aug 2012 15:37:15 +0000 (16:37 +0100)]
The feature check statements should represent what the user enters, not how we check </brainfart>

12 years agoCorrect formatting of strdup/strndup in man string.h
Owen Shepherd [Tue, 14 Aug 2012 15:35:29 +0000 (16:35 +0100)]
Correct formatting of strdup/strndup in man string.h

12 years agoAdd string.h man page
Owen Shepherd [Tue, 14 Aug 2012 15:29:15 +0000 (16:29 +0100)]
Add string.h man page

12 years agoImport default mandoc stylesheet for HTML manuals
Owen Shepherd [Tue, 14 Aug 2012 15:28:59 +0000 (16:28 +0100)]
Import default mandoc stylesheet for HTML manuals

12 years agoBugfix: memmove parameters incorrectly defined as restrict.
Owen Shepherd [Tue, 14 Aug 2012 15:28:41 +0000 (16:28 +0100)]
Bugfix: memmove parameters incorrectly defined as restrict.

12 years agoAdd support for building HTML manual pages to the Jamfile
Owen Shepherd [Tue, 14 Aug 2012 15:07:54 +0000 (16:07 +0100)]
Add support for building HTML manual pages to the Jamfile

12 years ago(merge)
Owen Shepherd [Tue, 14 Aug 2012 14:54:36 +0000 (15:54 +0100)]
(merge)

12 years agoImport the manual pages into the repository
Owen Shepherd [Tue, 14 Aug 2012 14:51:35 +0000 (15:51 +0100)]
Import the manual pages into the repository

12 years agoInitial pass at a port to win32
Owen Shepherd [Mon, 13 Aug 2012 20:14:14 +0000 (21:14 +0100)]
Initial pass at a port to win32

12 years ago* Test cleanups: surround the code for all functions by #ifndef REGTEST
Owen Shepherd [Mon, 13 Aug 2012 20:11:29 +0000 (21:11 +0100)]
* Test cleanups: surround the code for all functions by #ifndef REGTEST
* Don't REGTEST internal functions (it doesn't make sense)
* <stdio.h>: add _PDCLIB_fdopen, which opens a file based upon its _PDCLIB_fd_t
  file descriptor
    TODO: Should this be public or not? POSIX fdopen demonstrates utility
    TODO: Can we stop storing the file name? Is that useful?
* fopen: rewrite based upon _PDCLIB_fdopen to consolidate code
* strndup: don't REGTEST - mingw doesn't implement.
* <stddef.h>: conditional definition of wchar_t for <wchar.h>
* <wchar.h>: Add 4 simple functions for dependencies
* <_PDCLIB_aux.h>: rename _PDCLIB_ALL to _PDCLIB_EXTENSIONS
* platform/example/functions/stdio/tmpfile.c: return NULL, not 1
* Build system: SubInclude the platform directory to enable the building of
  support routines (e.g. app startup files)
* Test system: If $(CRT0) is set, link the contents of it into the tests. This
  enables the platform code to provide startup files.

12 years ago * New feature check macro system. See _PDCLIB_aux.h for details
Owen Shepherd [Sun, 12 Aug 2012 18:47:31 +0000 (19:47 +0100)]
 * New feature check macro system. See _PDCLIB_aux.h for details
 * remove "#pragma weak" from strdup.c. It's nonportable and shouldn't be
   necessary
 * <string.h> changed to use new feature test system for strdup + strndup
 * add strndup implementation
 * <assert.h> more reliable handling of error messages

 Build system:
 * The CoreMake system is dead. It proved to be unscalable
 * The old Make based system is gone, also
 * We now use a Jam based system (requires the latest FT_Jam). Reasons:
  * Make is hard to scale in a non-recursive manner. The interactions get
    intractably complex
  * The build system depended upon GNU Make. GNU Make's license (the GPLv3) is
    about as diametrically opposed to PDCLib's CC0 as you can get without being
    closed source
  * Jam is actually more portable. In particular, it doesn't require a Unix
    emulation layer (unlike GMake)
  * The Jam system, as is, can be incorporated into the build system of a larger
    project.

Why Jam?
 * GNU make is too low level. It also incorporates too much magic: it can spend
   significant ammounts of time trying to update source files from SCCS and RCS
   files for example (a feature it is doubtful somebody has used in the last
   decade)
 * Systems like CMake are too high level: CMake is very difficult to use in a
   cross compilation environment.
 * Systems like Scons and Waf pose similar issues. Scons is also incredibly
   slow.