
...
It is not necessary to go beyond the standard C library to find examples of inconsistent interfaces. This is because that the standard library is a fusion of multiple different libraries with various styles and various levels of rigor.
For example, the fputs()
defined in §7§7.19.7 is closely related to the fprintf()
defined in §7§7.19.6. However, the fputs()
has the file handle at the end and fprintf()
at the beginning as shown by their function declarations.
...
This rule appears in the C++ Secure Coding Standard as cplusplus:API04-CPP. Provide a consistent and usable error checking mechanism.
...