UNIX Humour

Bakul Shah bakul at bitblocks.com
Wed Sep 17 15:08:56 PDT 2003

> The original comment was supposed to read "self-compiling", but I like
> your modification too :)  Don't forget the set -x, or a compile error
> will result in errors running and removing ${0%%.c}.


Actually this is a useful thing to do.  For files containing
a library of functions I tend to add main() to test out these
functions like so:

#ifdef	 TESTING
int main(int argc, char**argv) {

Now I can write a self-testing .c file!

More information about the freebsd-chat mailing list