Adapted Pascal files to work with fpc.