Published C code for sorting (& other stuff)

#Bill_Stewart wcs at ho95e.UUCP
Wed Mar 26 10:35:40 AEST 1986


In article <1999 at brl-smoke.ARPA> Jim.Thario%cod at NOSC.ARPA writes:
>I'd also have to second the _C_Programmer's_Library_ from Que. It's section on
>linked lists, sorting and filing is quite extensive. It also includes a large
>collection of ISAM filing functions.

I was highly unimpressed when I read it a few months ago.  First of
all, it uses a brain-damaged version of C.  Not to flame too loudly at
Ecosoft, but any book that's talking about writing portable code
shouldn't depend on
	UNBUFFERED STDIO!
Specifically, they authors say getchar and putchar must be unbuffered
for their program to work, and that these functions have to be MODIFIED
to work on systems with buffered versions.  NOt even a mention of
setbuf().  They also say functions can't return structures, which is
true for many compilers (not that they go into it), and yet they
declare some functions as void(),indicating they're pretending to have
a modern compiler.

They give a large section on writing a general terminal handling
library, with no mention of or compatibility with termcap or curses.
They show you how to create a generalized sorting utility, which gives
you your choice of bubble, shell, or quicksort, and has a brain-damaged
option-specification technique.

On the plus side, they do some good explanations, especially on things
like declaring pointers to functions returning pointers to arrays of
integers and the like.  The ISAM library they present might or might
not be useful.
			
-- 
# Bill Stewart, AT&T Bell Labs 2G-202, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs



More information about the Comp.lang.c mailing list