how twiddles are calculated in the code snippet below from ti.com?
These are similar and provide the same result. In the c code every other sample:  w[k+1], w[k+3], etc, are the imaginary twiddle factors in the MATLAB code:

For instance the lines in C: 

w[k]     = cos (2 * PI * i / n);
w[k + 1] = sin (2 * PI * i / n);


Corresponds to this line in MATLAB :

twiddle(mm+1) = cos(theta) + (1i*(sin(theta)));


Where "theta" in MATLAB is "2*PI*i/n" in c.