Create ancestralStates.c

Old version of the code (June 2012).