move to c from cpp. actually, we don't use cpp code in this ext
fixed several compile warnings
use PECL style indent.