R
Richard Heathfield
I got an email today from a CU reader who wanted to know what had
happened to Chapter 15's sparse.c and sparse.h - neither of which
appear on the CD. He was ever so polite about it, mind you - but I
still felt really guilty because of course this should never have
happened.
The sparse.c omission was easy to explain - that was the original name
of a file which was later split into many. But the sparse.h header was
in fact completely missing. The author of the relevant chapter did once
send me the header (about two or three years after publication!) but
this was at a time when my work schedule was more insane than usual and
I lost track of it completely, together with his email address, when a
disk crashed; a disk that should have been backed up and wasn't.
I have spent today reconstructing the header from information provided
in the text and from hints in the source files, and then getting the
test-driver to work. This involved a considerable amount of hacking,
during the course of which I must have removed something like 200
unnecessary casts! (They were in my way, making the code harder to
read, so they had to go. I think there probably are still plenty left,
though, in the code I /didn't/ touch...)
The revised code is now freely available on my Web site:
http://www.cpax.org.uk/prg/portable/c/unleashed/code/ch15/CUnleashedChapter15Code.zip
It's about 20KB, and I have about 480kbps upload (in theory) - so if you
time it right, it shouldn't take more than about twenty minutes to
grab. (If you're astoundingly lucky, of course, it'll only take half a
second or so.)
happened to Chapter 15's sparse.c and sparse.h - neither of which
appear on the CD. He was ever so polite about it, mind you - but I
still felt really guilty because of course this should never have
happened.
The sparse.c omission was easy to explain - that was the original name
of a file which was later split into many. But the sparse.h header was
in fact completely missing. The author of the relevant chapter did once
send me the header (about two or three years after publication!) but
this was at a time when my work schedule was more insane than usual and
I lost track of it completely, together with his email address, when a
disk crashed; a disk that should have been backed up and wasn't.
I have spent today reconstructing the header from information provided
in the text and from hints in the source files, and then getting the
test-driver to work. This involved a considerable amount of hacking,
during the course of which I must have removed something like 200
unnecessary casts! (They were in my way, making the code harder to
read, so they had to go. I think there probably are still plenty left,
though, in the code I /didn't/ touch...)
The revised code is now freely available on my Web site:
http://www.cpax.org.uk/prg/portable/c/unleashed/code/ch15/CUnleashedChapter15Code.zip
It's about 20KB, and I have about 480kbps upload (in theory) - so if you
time it right, it shouldn't take more than about twenty minutes to
grab. (If you're astoundingly lucky, of course, it'll only take half a
second or so.)