here you will find a paper (direct link -
http://asc.harvard.edu/ciao3.2/download/papers/compcurr.ps.gz) that has
a C code in the appendix. If that works for you, do share with us all
:)
Hope that helps..
Divya Rathore
(remove underscores for email ID)