I was trying to use the CodeWarrior MWC68K and MWCPPC compilers with the mpw emulator and I got no error message and only exit code 78, which was confusing:
It took me some time to realize that the method I had used to transfer the MWC68K and MWCPPC tools from my Power Mac had not preserved the resource fork which of course made the tools unusable.
Exit code 78 is EX_CONFIG and there are several places in the code that use this exit code but most of them first print error messages and are about actual configuration errors, like specifying non-numbers for parameters that need to be numbers.
In this case, a different exit code might be clearer. I changed it to EX_SOFTWARE; I'm not sure if that's correct but it seems more accurate than EX_CONFIG and you've used elsewhere in the code already. I also added an error message based on the error code returned from the loader. Now my situation gives this somewhat more helpful output:
% mpw MWC68K; echo $?
Unable to load command /Users/rschmidt/mpw/MetroWerks/Tools/MWC68K: Logical end-of-file reached during read operation
70
% mpw MWCPPC; echo $?
Unable to load command /Users/rschmidt/mpw/MetroWerks/Tools/MWCPPC: Logical end-of-file reached during read operation
70
%
I was trying to use the CodeWarrior MWC68K and MWCPPC compilers with the mpw emulator and I got no error message and only exit code 78, which was confusing:
It took me some time to realize that the method I had used to transfer the MWC68K and MWCPPC tools from my Power Mac had not preserved the resource fork which of course made the tools unusable.
Exit code 78 is
EX_CONFIG
and there are several places in the code that use this exit code but most of them first print error messages and are about actual configuration errors, like specifying non-numbers for parameters that need to be numbers.In this case, a different exit code might be clearer. I changed it to
EX_SOFTWARE
; I'm not sure if that's correct but it seems more accurate thanEX_CONFIG
and you've used elsewhere in the code already. I also added an error message based on the error code returned from the loader. Now my situation gives this somewhat more helpful output: