mirror of
https://github.com/softdorothy/Pararena2.git
synced 2024-05-28 12:41:35 +00:00
806b9b47db
This project was originally compiled with THINK C for the Macintosh. The project file is a THINK C project file. Then there is the assembly static library (SMS) that is linked in to provide fast, 4-channel sound (written by Patrick Buckland). Resource files, a balloon file for “balloon help” when it was a thing…. Good luck to anyone trying to bring this beast back to life.
1 line
1.8 KiB
C
Executable File
1 line
1.8 KiB
C
Executable File
/*============================================================*/
|
|
/*============================================================*/
|
|
/*== ==*/
|
|
/*== File Error Handling File ==*/
|
|
/*== ==*/
|
|
/*============================================================*/
|
|
/*============================================================*/
|
|
|
|
|
|
/*======================================================== Includes */
|
|
|
|
#include "UnivUtilities.h"
|
|
#include "FileError.h"
|
|
|
|
|
|
/*======================================================== CheckFileError */
|
|
|
|
Boolean CheckFileError (short resultCode, StringPtr fileName)
|
|
|
|
{
|
|
short dummyInt, stringIndex;
|
|
Str255 errMessage, errNumString;
|
|
|
|
if (resultCode == noErr) /* No problems? Then cruise */
|
|
{
|
|
return(TRUE);
|
|
}
|
|
|
|
switch (resultCode)
|
|
{
|
|
case dirFulErr:
|
|
stringIndex = 2;
|
|
break;
|
|
case dskFulErr:
|
|
stringIndex = 3;
|
|
break;
|
|
case ioErr:
|
|
stringIndex = 4;
|
|
break;
|
|
case bdNamErr:
|
|
stringIndex = 5;
|
|
break;
|
|
case fnOpnErr:
|
|
stringIndex = 6;
|
|
break;
|
|
case mFulErr:
|
|
stringIndex = 7;
|
|
break;
|
|
case tmfoErr:
|
|
stringIndex = 8;
|
|
break;
|
|
case wPrErr:
|
|
stringIndex = 9;
|
|
break;
|
|
case fLckdErr:
|
|
stringIndex = 10;
|
|
break;
|
|
case vLckdErr:
|
|
stringIndex = 11;
|
|
break;
|
|
case fBsyErr:
|
|
stringIndex = 12;
|
|
break;
|
|
case dupFNErr:
|
|
stringIndex = 13;
|
|
break;
|
|
case opWrErr:
|
|
stringIndex = 14;
|
|
break;
|
|
case volOffLinErr:
|
|
stringIndex = 15;
|
|
break;
|
|
case permErr:
|
|
stringIndex = 16;
|
|
break;
|
|
case wrPermErr:
|
|
stringIndex = 17;
|
|
break;
|
|
default:
|
|
stringIndex = 1;
|
|
break;
|
|
}
|
|
InitCursor();
|
|
|
|
GetIndString(errMessage, rFileErrorStrings, stringIndex);
|
|
NumToString((long)resultCode, errNumString);
|
|
ParamText(errMessage, errNumString, fileName, "\p");
|
|
|
|
CenterAlert(rFileErrorAlert);
|
|
dummyInt = Alert(rFileErrorAlert, 0L);
|
|
|
|
return(FALSE);
|
|
}
|
|
|
|
|