Some of the C code from books.