Taking things out (was: nroff && mesg)

Kay Dekker kay at warwick.UUCP
Sat Jul 19 02:08:32 AEST 1986


People have been talking about nroff turning off terminal messages, and
whether or not this is gratuitous behaviour; my vote is with those who
support taking this out.  There's another example of (what I consider)
gratuitous and insidious nastiness in the (at least) 4.1 BSD dbm library.
My boss asked me to whip up a quick database, and I thought "Hell, the
library's already there, why reinvent the wheel?".  Writes 2 pages or so
of harnessing code to wrap the library functions in, handle arguments,
do error recovery and... print diagnostics.

O horror! the dbm library contains code like this:

	if(key.dsize+dat.dsize+2*sizeof(short) >= PBLKSIZ) {
		printf("entry too big\n");
		return (-1);
	}

<<< FLAME....
Fine, it returns an error code, but - PRINTING DIAGNOSTICS?  TO STDOUT??
AAAAAAAAAAAAAAAARRRRRRRRGGGGGHHHHHHH!
....EMALF >>>

Am I wrong? is it not a bad and a bogus thing for library routines to do?
Are we supposed to be incapable of doing our own error reporting?

						Fume, fume...
							Kay

PS: pause 2 weeks before flaming me; warwick will be down for the duration,
and I'd hate to miss out on the free energy...



More information about the Comp.bugs.4bsd.ucb-fixes mailing list