]> diplodocus.org Git - nmh/commit
When debugging is enabled, replace the ctype functions with
authorDavid Levine <levinedl@acm.org>
Thu, 7 Feb 2013 02:39:06 +0000 (20:39 -0600)
committerDavid Levine <levinedl@acm.org>
Thu, 7 Feb 2013 02:39:06 +0000 (20:39 -0600)
commit82f1f1db8de7b833068a3ef0dc7d10759bb94941
treed7ba4f6cc3bec742818e059748a1269ca5a1b000
parentfc8a48c33835906623cb10ee129fc70a72271e02
When debugging is enabled, replace the ctype functions with
macros that index into arrays.  This allows the compiler to
catch use of char, instead of unsigned char, arguments to
those functions.  gcc uses -Wchar-subscripts, which is enabled
with the -Wall that we use by default.  Thanks to Tom Lane for
suggesting this approach.

This feature can be enabled by undef'ing NDEBUG in config.h.
configure --enable-debug does that.  We can now use the same
mechanism to enable and disable assert(3), too.
.gitignore
Makefile.am
configure.ac
etc/gen-ctype-checked.c [new file with mode: 0644]
h/nmh.h