modified calg_types.h