diff --git a/doc/comparisons.md b/doc/comparisons.md index dd6c225..30ea41d 100644 --- a/doc/comparisons.md +++ b/doc/comparisons.md @@ -4,7 +4,7 @@ Better String Library Comparisons by Paul Hsieh The bstring library is an attempt to provide improved string processing -functionality to the C and C++ language. At the heart of the bstring library +functionality to the C language. At the heart of the bstring library is the management of `bstring`s which are a significant improvement over `'\0'` terminated char buffers. See the accompanying documenation for more information. @@ -14,7 +14,7 @@ Comparison With Microsoft's CString Class The bstring library has significant advantages over CString: -1. Bstrlib is a C-library as well as a C++ library (using the C++ wrapper) +1. Bstrlib is a cross-platform, portable C-library Thus it is compatible with more programming environments and available to a wider population of programmers. @@ -141,10 +141,7 @@ parameter does, and would require macro tricks to implement). The Bstrlib C API takes the position that error handling needs to be done at the callsite, and just tries to make it as painless as possible. Furthermore, -error modes are removed by supporting auto-growing strings and aliasing. For -capturing errors in more central code fragments, Bstrlib's C++ API uses -exception handling extensively, which is superior to the leaf-only error -handler approach. +error modes are removed by supporting auto-growing strings and aliasing. Comparison With Managed String Library CERT Proposal ---------------------------------------------------- diff --git a/doc/porting.md b/doc/porting.md index a297f7e..67ba6bd 100644 --- a/doc/porting.md +++ b/doc/porting.md @@ -4,7 +4,7 @@ Better String Library Porting Guide by Paul Hsieh The bstring library is an attempt to provide improved string processing -functionality to the C and C++ language. At the heart of the bstring library +functionality to the C language. At the heart of the bstring library is the management of `bstring`s which are a significant improvement over `'\0'` terminated char buffers. See the accompanying documenation for more information. @@ -49,46 +49,13 @@ functions which will make porting Bstrlib to it onerous. Bstrlib is not designed for such bare bones compiler environments. This usually includes compilers that target ROM environments. -Porting Issues --------------- - -Bstrlib has been written completely in ANSI/ISO C and ISO C++, however, there -are still a few porting issues. These are described below. - -### Weak C++ Compiler - -C++ is a much more complicated language to implement than C. This has lead -to varying quality of compiler implementations. The weaknesses isolated in -the initial ports are inclusion of the Standard Template Library, -`std::iostream` and exception handling. By default it is assumed that the C++ -compiler supports all of these things correctly. If your compiler does not -support one or more of these define the corresponding macro: - - BSTRLIB_CANNOT_USE_STL - BSTRLIB_CANNOT_USE_IOSTREAM - BSTRLIB_DOESNT_THROW_EXCEPTIONS - -The compiler specific detected macro should be defined at the top of -bstrwrap.h in the Configuration defines section. Note that these disabling -macros can be overrided with the associated enabling macro if a subsequent -version of the compiler gains support. (For example, its possible to rig -up STLport to provide STL support for WATCOM C/C++, so `-DBSTRLIB_CAN_USE_STL` -can be passed in as a compiler option.) - -Platform Specific Files ------------------------ - -The makefiles for the examples are basically setup of for particular -environments for each platform. In general these makefiles are not portable -and should be constructed as necessary from scratch for each platform. - Testing a port -------------- To test that a port compiles correctly do the following: -1. Run `make check` and ensure that no errors are reported. -2. Run `make memcheck` and ensure that no errors are reported. +1. Run `meson test -C build` and ensure that no errors are reported. +2. Run `meson test --wrapper='valgrind --leak-check=full' -C build` and ensure that no errors are reported. The builds must have zero errors and zero warnings. The result of execution should be essentially identical on each platform. @@ -102,15 +69,3 @@ that a platform doesn't have (since it was primarily developed on just one platform). The goal of Bstrlib is to provide very good performance on all platforms regardless of this but without resorting to extreme measures (such as using assembly language, or non-portable intrinsics or library extensions). - -There are two performance benchmarks that can be found in the `example` -directory. They are: cbench.c and cppbench.cpp. These are variations and -expansions of a benchmark for another string library. They don't cover all -string functionality, but do include the most basic functions which will be -common in most string manipulation kernels. - -Feedback --------- - -Please send email to the [primary author](websnarf@users.sourceforge.net) if -you find any issues. diff --git a/doc/security.md b/doc/security.md index 65671d9..c648194 100644 --- a/doc/security.md +++ b/doc/security.md @@ -7,7 +7,7 @@ Introduction ------------ The Better String library (hereafter referred to as Bstrlib) is an attempt to -provide improved string processing functionality to the C and C++ languages. +provide improved string processing functionality to the C language. At the heart of the Bstrlib is the management of "bstring"s which are a significant improvement over '\0' terminated char buffers. See the accompanying documenation file bstrlib.txt for more information. @@ -113,7 +113,7 @@ image in the heap except for the allocated bstring that is returned. Bstrlib does not do anything out of the ordinary to attempt to deal with the standard problem of memory leaking (losing references to allocated memory) -when programming in the C and C++ languages. However, it does not compound +when programming in the C language. However, it does not compound the problem any more than exists either, as it doesn't have any intrinsic inescapable leaks in it. Bstrlib does not preclude the use of automatic garbage collection mechanisms such as the Boehm garbage collector. @@ -193,11 +193,3 @@ carefully auditted by anyone using a system in which `CHAR_BIT` is not 8. Bstrlib uses ctype.h functions to ensure that it remains portable to non- ASCII systems. It also checks range to make sure it is well defined even for data that ANSI does not define for the ctype functions. - -Obscure Issues --------------- - -### Data attributes - -There is no support for a Perl-like "taint" attribute, although this is a -fairly straightforward exercise using C++'s type system.