add missing newline to types.h
use unsigned for loop variables