mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:49:09 +02:00
* internal changes
This commit is contained in:
parent
a8d6c1961d
commit
acd7fb50c6
@ -418,102 +418,109 @@ begin
|
|||||||
errno:=0;
|
errno:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure OSErr2InOutRes(err: OSErr);
|
Function MacOSErr2RTEerr(err: OSErr): Integer;
|
||||||
{ Convert MacOS specific error codes to the correct InOutRes value}
|
{ Converts MacOS specific error codes to the correct FPC error code.
|
||||||
|
All non zero MacOS errors shall correspond to a nonzero FPC error.}
|
||||||
|
var
|
||||||
|
res: Integer;
|
||||||
begin
|
begin
|
||||||
if err = noErr then { Else it will go through all the cases }
|
if err = noErr then { Else it will go through all the cases }
|
||||||
exit;
|
res:= 0
|
||||||
|
else case err of
|
||||||
case err of
|
|
||||||
dirFulErr, { Directory full }
|
dirFulErr, { Directory full }
|
||||||
dskFulErr { disk full }
|
dskFulErr { disk full }
|
||||||
:Inoutres:=101;
|
:res:=101;
|
||||||
nsvErr { no such volume }
|
nsvErr { no such volume }
|
||||||
:Inoutres:=3;
|
:res:=3;
|
||||||
ioErr, { I/O error (bummers) }
|
ioErr, { I/O error (bummers) }
|
||||||
bdNamErr { there may be no bad names in the final system! }
|
bdNamErr { there may be no bad names in the final system! }
|
||||||
:Inoutres:=1; //TODO Exchange to something better
|
:res:=1; //TODO Exchange to something better
|
||||||
fnOpnErr { File not open }
|
fnOpnErr { File not open }
|
||||||
:Inoutres:=103;
|
:res:=103;
|
||||||
eofErr, { End of file }
|
eofErr, { End of file }
|
||||||
posErr { tried to position to before start of file (r/w) }
|
posErr { tried to position to before start of file (r/w) }
|
||||||
:Inoutres:=100;
|
:res:=100;
|
||||||
mFulErr { memory full (open) or file won't fit (load) }
|
mFulErr { memory full (open) or file won't fit (load) }
|
||||||
:Inoutres:=1; //TODO Exchange to something better
|
:res:=1; //TODO Exchange to something better
|
||||||
tmfoErr { too many files open}
|
tmfoErr { too many files open}
|
||||||
:Inoutres:=4;
|
:res:=4;
|
||||||
fnfErr { File not found }
|
fnfErr { File not found }
|
||||||
:Inoutres:=2;
|
:res:=2;
|
||||||
wPrErr { diskette is write protected. }
|
wPrErr { diskette is write protected. }
|
||||||
:Inoutres:=150;
|
:res:=150;
|
||||||
fLckdErr { file is locked }
|
fLckdErr { file is locked }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
vLckdErr { volume is locked }
|
vLckdErr { volume is locked }
|
||||||
:Inoutres:=150;
|
:res:=150;
|
||||||
fBsyErr { File is busy (delete) }
|
fBsyErr { File is busy (delete) }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
dupFNErr { duplicate filename (rename) }
|
dupFNErr { duplicate filename (rename) }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
opWrErr { file already open with with write permission }
|
opWrErr { file already open with with write permission }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
rfNumErr, { refnum error }
|
rfNumErr, { refnum error }
|
||||||
gfpErr { get file position error }
|
gfpErr { get file position error }
|
||||||
:Inoutres:=1; //TODO Exchange to something better
|
:res:=1; //TODO Exchange to something better
|
||||||
volOffLinErr { volume not on line error (was Ejected) }
|
volOffLinErr { volume not on line error (was Ejected) }
|
||||||
:Inoutres:=152;
|
:res:=152;
|
||||||
permErr { permissions error (on file open) }
|
permErr { permissions error (on file open) }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
volOnLinErr{ drive volume already on-line at MountVol }
|
volOnLinErr{ drive volume already on-line at MountVol }
|
||||||
:Inoutres:=0; //TODO Exchange to something other
|
:res:=1; //TODO Exchange to something other
|
||||||
nsDrvErr { no such drive (tried to mount a bad drive num) }
|
nsDrvErr { no such drive (tried to mount a bad drive num) }
|
||||||
:Inoutres:=1; //TODO Perhaps exchange to something better
|
:res:=1; //TODO Perhaps exchange to something better
|
||||||
noMacDskErr, { not a mac diskette (sig bytes are wrong) }
|
noMacDskErr, { not a mac diskette (sig bytes are wrong) }
|
||||||
extFSErr { volume in question belongs to an external fs }
|
extFSErr { volume in question belongs to an external fs }
|
||||||
:Inoutres:=157; //TODO Perhaps exchange to something better
|
:res:=157; //TODO Perhaps exchange to something better
|
||||||
fsRnErr, { file system internal error:during rename the old
|
fsRnErr, { file system internal error:during rename the old
|
||||||
entry was deleted but could not be restored. }
|
entry was deleted but could not be restored. }
|
||||||
badMDBErr { bad master directory block }
|
badMDBErr { bad master directory block }
|
||||||
:Inoutres:=1; //TODO Exchange to something better
|
:res:=1; //TODO Exchange to something better
|
||||||
wrPermErr { write permissions error }
|
wrPermErr { write permissions error }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
dirNFErr { Directory not found }
|
dirNFErr { Directory not found }
|
||||||
:Inoutres:=3;
|
:res:=3;
|
||||||
tmwdoErr { No free WDCB available }
|
tmwdoErr { No free WDCB available }
|
||||||
:Inoutres:=1; //TODO Exchange to something better
|
:res:=1; //TODO Exchange to something better
|
||||||
badMovErr { Move into offspring error }
|
badMovErr { Move into offspring error }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
wrgVolTypErr { Wrong volume type error [operation not
|
wrgVolTypErr { Wrong volume type error [operation not
|
||||||
supported for MFS] }
|
supported for MFS] }
|
||||||
:Inoutres:=1; //TODO Exchange to something better
|
:res:=1; //TODO Exchange to something better
|
||||||
volGoneErr { Server volume has been disconnected. }
|
volGoneErr { Server volume has been disconnected. }
|
||||||
:Inoutres:=152;
|
:res:=152;
|
||||||
|
|
||||||
diffVolErr { files on different volumes }
|
diffVolErr { files on different volumes }
|
||||||
:Inoutres:=17;
|
:res:=17;
|
||||||
catChangedErr { the catalog has been modified }
|
catChangedErr { the catalog has been modified }
|
||||||
{ OR comment: when searching with PBCatSearch }
|
{ OR comment: when searching with PBCatSearch }
|
||||||
:Inoutres:=0; //TODO Exchange to something other
|
:res:=1; //TODO Exchange to something other
|
||||||
afpAccessDenied, { Insufficient access privileges for operation }
|
afpAccessDenied, { Insufficient access privileges for operation }
|
||||||
afpDenyConflict { Specified open/deny modes conflict with current open modes }
|
afpDenyConflict { Specified open/deny modes conflict with current open modes }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
afpNoMoreLocks { Maximum lock limit reached }
|
afpNoMoreLocks { Maximum lock limit reached }
|
||||||
:Inoutres:=5;
|
:res:=5;
|
||||||
afpRangeNotLocked, { Tried to unlock range that was not locked by user }
|
afpRangeNotLocked, { Tried to unlock range that was not locked by user }
|
||||||
afpRangeOverlap { Some or all of range already locked by same user }
|
afpRangeOverlap { Some or all of range already locked by same user }
|
||||||
:Inoutres:=1; //TODO Exchange to something better
|
:res:=1; //TODO Exchange to something better
|
||||||
afpObjectTypeErr { File/Directory specified where Directory/File expected }
|
afpObjectTypeErr { File/Directory specified where Directory/File expected }
|
||||||
:Inoutres:=3;
|
:res:=3;
|
||||||
afpCatalogChanged { OR comment: when searching with PBCatSearch }
|
afpCatalogChanged { OR comment: when searching with PBCatSearch }
|
||||||
:Inoutres:=0; //TODO Exchange to something other
|
:res:=1; //TODO Exchange to something other
|
||||||
afpSameObjectErr
|
afpSameObjectErr
|
||||||
:Inoutres:=5; //TODO Exchange to something better
|
:res:=5; //TODO Exchange to something better
|
||||||
|
|
||||||
memFullErr { Not enough room in heap zone }
|
memFullErr { Not enough room in heap zone }
|
||||||
:Inoutres:=203;
|
:res:=203;
|
||||||
else
|
else
|
||||||
InOutRes := 1; //TODO Exchange to something better
|
res := 1; //TODO Exchange to something better
|
||||||
end;
|
end;
|
||||||
|
MacOSErr2RTEerr:= res;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Procedure OSErr2InOutRes(err: OSErr);
|
||||||
|
begin
|
||||||
|
InOutRes:= MacOSErr2RTEerr(err);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function PathArgToFSSpec(s: string; var spec: FSSpec): Boolean;
|
function PathArgToFSSpec(s: string; var spec: FSSpec): Boolean;
|
||||||
@ -1141,7 +1148,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.12 2004-01-20 23:11:20 hajny
|
Revision 1.13 2004-02-04 15:17:16 olle
|
||||||
|
* internal changes
|
||||||
|
|
||||||
|
Revision 1.12 2004/01/20 23:11:20 hajny
|
||||||
* ExecuteProcess fixes, ProcessID and ThreadID added
|
* ExecuteProcess fixes, ProcessID and ThreadID added
|
||||||
|
|
||||||
Revision 1.11 2004/01/04 21:06:43 jonas
|
Revision 1.11 2004/01/04 21:06:43 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user