]> pd.if.org Git - pdclib.old/commitdiff
Convert readme to be in reStructuredText format (for nice formatting)
authorOwen Shepherd <owen.shepherd@e43.eu>
Thu, 8 Nov 2012 20:00:06 +0000 (20:00 +0000)
committerOwen Shepherd <owen.shepherd@e43.eu>
Thu, 8 Nov 2012 20:00:06 +0000 (20:00 +0000)
Readme.rst [moved from Readme.txt with 63% similarity]

similarity index 63%
rename from Readme.txt
rename to Readme.rst
index 77762e5ffedc03ef9a2a2ac8e70d3d3a1941ba4a..b1143a950da8f82c3115932026df3db23cbab7e5 100644 (file)
@@ -1,6 +1,14 @@
-PDCLib - Public Domain C Library\r
+PDCLib - the `Public Domain C Library<http://pdclib.e43.eu>`_\r
 ================================\r
 \r
+What is it\r
+----------\r
+\r
+This is a C Standard Library - what's defined in ISO/IEC 9899 "Information \r
+technology — Programming languages — C" or extensions to the above defined in\r
+ISO/IEC 14882 "Information technology — Programming languages — C++". A few \r
+extensions may optionally be provided.\r
+\r
 License\r
 -------\r
 \r
@@ -14,30 +22,76 @@ worldwide. This software is distributed without any warranty.
 You should have received a copy of the CC0 Public Domain Dedication along with \r
 this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.\r
 \r
-NOTE: Some configuration options may include components under non-public domain\r
-      conditions. In particular, selecting ptmalloc3 as the malloc \r
-      implementation will cause the incorporation of elements under the BSD \r
-      license.\r
+    **Exception:** Portions of the test suite are under different licenses. \r
+    Where this is the case, it is clearly noted in the relevant location.\r
 \r
-What is it\r
-----------\r
+    The license of this code has no bearing upon the licensing of the built \r
+    library (as it does not comprise part of it).\r
 \r
-This is a C Standard Library - what's defined in ISO/IEC 9899 "Information \r
-technology — Programming languages — C" or extensions to the above defined in\r
-ISO/IEC 14882 "Information technology — Programming languages — C++". A few \r
-extensions may optionally be provided.\r
+    At the time this was written, this exception only applies to portions of the\r
+    printf test suite, which are released under the terms of the 2-clause BSD\r
+    license (see testing/printf_testcases.h for full details)\r
 \r
 Terms for extensions\r
 --------------------\r
-Extensions are permitted where their inclusion is reasonable, they are widely\r
-used, in  keeping with the spirit of the standard, and do not convey \r
-additional requirements upon the target system, and do not needlessly duplicate\r
-functionality already contained within the standard.\r
-\r
-As an example: strdup is in, because (a) it can be implemented entirely in \r
-terms of existing standard C functions and (b) is very widely used. Something\r
-like open, write or close would not be considered, because it implies POSIXy \r
-assumptions.\r
+Extensions are permitted only if they pass the following tests:\r
+\r
+Pre-existing wide usage\r
+    On most systems, the system C library must maintain its application binary\r
+    interface for long periods of time (potentially eternity). Existing wide \r
+    usage demonstrates utility\r
+\r
+In keeping with the spirit of the standard\r
+    The extension should respect the design, intentions and conventions of the C\r
+    standard, and feel like a natural extension to the offered capability. \r
+\r
+Not system dependent\r
+    The extension should not add any additional dependencies on the underlying \r
+    system\r
+\r
+Non-duplicative\r
+    Extensions should not duplicate functionality already provided by the \r
+    standard\r
+\r
+Disabled by default\r
+    PDCLib will always default to a "strictly conforming" mode exposing only\r
+    functionality offered by the version of the standard specified by the\r
+    __STDC_VERSION__, __STDC__ or __cplusplus macro; extensions will only be \r
+    exposed when requested.\r
+\r
+Additionally, extra consideration will be given to extensions which are \r
+difficult or impossible to implement without access to internal structures of \r
+the C library.\r
+\r
+Conrete Examples:\r
+\r
+strndup\r
+    **Included.** strndup is easily defined in terms of existing standard \r
+    functions, follows  the standard's naming conventions, is in wide usage, and\r
+    does not duplicate  features already provided.\r
+\r
+posix_memalign\r
+    **Rejected.** Has existing wide usage, is not system dependent (can be \r
+    implemented, albeit inefficiently, on top of malloc), but naming is not \r
+    consistent with the naming used by the standard (posix_ prefix) and \r
+    duplicates functionality provided by the C11 standard\r
+\r
+open, close, read, write, ...\r
+    **Rejected.** Widely used, but duplicates functionality provided by the \r
+    standard (FILE objects set to be unbuffered), and not able to implement full\r
+    semantics (e.g. in relation to POSIX fork and other functionality from the \r
+    same defining standard) in a platform-neutral way\r
+\r
+strl*\r
+    **Rejected.** Used somewhat widely, in keeping with the standard, not system\r
+    dependent, but duplicative of functionality provided by (optional) Annex K \r
+    of the C standard. \r
+\r
+flockfile, funlockfile, getc_unlocked, putc_unlocked, fwrite_unlocked, ...\r
+    **Accepted.** Provide functionality not provided by the standard (and \r
+    useful in light of the C11 addition of threading). Can be trivially \r
+    implemented in terms of the <threads.h> mutex functions and the bodies of \r
+    the existing I/O functions, and impossible to implement externally\r
 \r
 Internals\r
 ---------\r
@@ -92,13 +146,16 @@ all that is actually required to make PDCLib work for your platform.
 Future directions\r
 -----------------\r
 Obviously, full C89, C99 and C11 conformance; and full support for the \r
-applicable portions of C++98, C++03 and C++11.\r
+applicable portions of C++98, C++03 and C++11 (the version which acomplishes \r
+this will be christened "1.0").\r
 \r
 Support for "optimization overlays." These would allow efficient \r
 implementations of certain functions on individual platforms, for example \r
 memcpy, strcpy and memset. This requires further work to only compile in one\r
 version of a given function.\r
 \r
+Post 1.0, support for C11 Annexe K "Bounds checking interfaces"\r
+\r
 Development Status\r
 ------------------\r
 \r