added copy function to c99 interface and fixed sizeof function of enums