Supporting code for the C version of Viterbi.
C version of Viterbi.