auto-formatted c source with Artistic Style
initial porting and cleanup