C template system