Simple Algorithm Test (in progress)

I did some work on the 'full' conversion of the algorithm into C,
starting from what Santosh had recently written.  This is by no means
final, but since I won't see y'all until tomorrow afternoon I figured
I'd post what I've got right now.