Add _cbprintf/_vcbprintf (callback based printf formatters)
Annotate _unlocked stdio as nothrow
Minimize the amount of internal definitions which get exposed via the user-visible headers
<stdio.h>: remove fileno_unlocked (illegal immigrant from POSIX! We don't and never will implement it; it doesn't make sense for us)
Manual page on unlocked stdio routines
PDCLIB-19: Remove gets() when >=C11. Deprecated it universally.
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
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
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
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
Add nothrow annotations where appropriate
* 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.
* Change the style of inclusion of the internal/ headers. Modern preprocessors all detect the header guards and know not to include anyhow. The old style may have actually been counterproductive * Make the built library be standard independent (i.e. the library build is independent of _PDCLIB_C_VERSION/__STDC_VERSION__/_PDCLIB_CXX_VERSION /__cplusplus. * <threads.h> from C11. A bit off of the track of C99 support (which is still a higher priority goal), but solid implementation of many C99 functions on many real platforms will need proper thread support. <stdio.h> support to come. This is a stub implementation. * Move malloc/free/realloc etc to opt/malloc-solar, in preparation for support of other memory allocators. On the cards are at least ptmalloc3 (BSD) and dlmalloc (public domain) as options. * New build system (See CoreMakefile.mk). Not ready yet; but its coming. This doesn't change the project dependencies - you still only need GNU make. This is a large bundle of changes - most of them are as a result of implementing PDClib into my system, so they're mostly "changes I was doing" that have got wrapped up together. Hopefully, now that things are together, future changesets should be better factored. Special thanks go to Martin "Solar" Baute for the work he has put in on this code over many years.
Fixes #45.
Started out on v0.6.
Fixed broken filename handling in freopen().
Some cleanups.
FILE
Merged branch stdio_rewrite back into trunk.
Added test for interactive streams (_IOLBF / _IOFBF)