next up previous contents
Next: A typical example Up: C Library Wrapper Previous: Introduction   Contents


The objective of the safety library is simple: provide more safety. The C Library Wrapper (CLW) library does so by encapsulating all "unsafe" libC functions in a new library. This library has the same functionality as the standard one, but adds error checking and avoids well-known pitfalls. The programmer is asked to use those wrapper functions, that are prefixed by clw_, instead of the standard ones. By doing so, the program becomes safer. There are two reasons for this. Firstly, the functions are simply safer then the regular ones, as it checks for well-known pitfalls. Secondly, as all error checking (etc.) is done in one isolated library, potential mistakes in those checks can be improved easily. Whenever a new faulty behaviour be comes apparent, it will be abandoned in once. This second reason makes using CLW superb to "inlined" error handling; the level of safety is easily maintained and is maintainable.


Erwin Nijmeijer 2002-09-26