C Tools Lecture 2 Materials

- to prepare, in this directory
	make mkdir

- then edit your ~/.cshrc and add, at the bottom:

setenv TOOLDIR $HOME/c-tools
set path = ( $TOOLDIR/bin $TOOLDIR/bin/$ARCH $path )
setenv MANPATH ${MANPATH}:$TOOLDIR/man

  then run it (source ~/.cshrc)

Then sequence through the following directories,
following the instructions in each directory's README.

- 01.proto
	- my prototype tool
	- run tests, install it, link into vi all as mentioned
  	  in the README

- 02.libmem
	- the Dr Dobbs Journal libmem framework
	- make install to copy it into your TOOLDIR

- 03.mem-eg
	- 2 malloc()/free() test programs for libmem

- 04.badhash
	- large-scale memory leak bug.
	- investigate and understand the bizarre behaviour.

- 05.badhash+mem
	- hunt the wumpus... ahem, memory leak, down using libmem.

- 06.hash-profile
	- profile the bugfixed hash module with gprof
	  and see what surprises await.
	- a simple optimization suggested by the gprof
	  report DOUBLES the speed of the hash module.
	- and that's not a put up job, I've been using
	  the hash module for years w/o profiling it!

- 07.hash-final
	- the optimized version of the hash table.
	- installs into TOOLDIR via 'make install'
	  for you to use in your own projects, like libmem.
	NOTE: some of the later examples WILL NOT COMPILE
	unless you have 'make install'ed this!

- 08.datadec
	- my Haskell-style recursive data type generator
	  for C.  generate C ADT modules automatically.
	- installs into TOOLDIR via 'make install'
	  for you to use just like proto.

- 09.datadec-eg
	- an example of how to use datadec once you've
	  installed it

- 10.set
	- didn't have time to talk about this, but sets
	  are very useful, implemented as a value-less
	  hash table:-)
	- someone should profile and libmem check this!
	  (the above hash-profiling optimization may need
	  applying to this too).

- 11.mfbuild
	- an old C Makefile generator I wrote a long
	  time ago, haven't had time to even look at
	  this recently.  may give you a flavour.
