amunits: removed pastoc dependency from icon unit. also removed two BumpRevision() overlays which were simply broken since day 1. (newname is an output buffer the caller must allocate, not an input parameter)

git-svn-id: trunk@32694 -
This commit is contained in:
Károly Balogh 2015-12-21 22:34:13 +00:00
parent 61e60bd46f
commit 49e4ea153a

View File

@ -373,21 +373,19 @@ FUNCTION LayoutIconA(icon : pDiskObject location 'a0'; screen : pScreen location
PROCEDURE ChangeToSelectedIconColor(cr : pColorRegister location 'a0'); syscall IconBase 198; PROCEDURE ChangeToSelectedIconColor(cr : pColorRegister location 'a0'); syscall IconBase 198;
{ overlay } { overlay }
FUNCTION BumpRevision(newname : string;const oldname : pCHAR) : pCHAR; FUNCTION BumpRevision(newname : pCHar; const oldname : RawByteString) : pCHAR;
FUNCTION BumpRevision(newname : pCHar;const oldname : string) : pCHAR; FUNCTION DeleteDiskObject(const name : RawByteString) : BOOLEAN;
FUNCTION BumpRevision(newname : string;const oldname : string) : pCHAR; FUNCTION FindToolType(const toolTypeArray : POINTER;const typeName : RawByteString) : pCHAR;
FUNCTION DeleteDiskObject(const name : string) : BOOLEAN; FUNCTION GetDiskObject(const name : RawByteString) : pDiskObject;
FUNCTION FindToolType(const toolTypeArray : POINTER;const typeName : string) : pCHAR; FUNCTION GetDiskObjectNew(const name : RawByteString) : pDiskObject;
FUNCTION GetDiskObject(const name : string) : pDiskObject; FUNCTION MatchToolValue(const typeString : RawByteString;const value : pCHAR) : BOOLEAN;
FUNCTION GetDiskObjectNew(const name : string) : pDiskObject; FUNCTION MatchToolValue(const typeString : pCHAR;const value : RawByteString) : BOOLEAN;
FUNCTION MatchToolValue(const typeString :string;const value : pCHAR) : BOOLEAN; FUNCTION MatchToolValue(const typeString : RawByteString;const value : RawByteString) : BOOLEAN;
FUNCTION MatchToolValue(const typeString : pCHAR;const value : string) : BOOLEAN; FUNCTION PutDiskObject(const name : RawByteString;const diskobj : pDiskObject) : BOOLEAN;
FUNCTION MatchToolValue(const typeString : string;const value : string) : BOOLEAN;
FUNCTION PutDiskObject(const name : string;const diskobj : pDiskObject) : BOOLEAN;
{ version 44 overlay} { version 44 overlay}
FUNCTION GetIconTagList(CONST name : string; CONST tags : pTagItem) : pDiskObject; FUNCTION GetIconTagList(CONST name : RawByteString; CONST tags : pTagItem) : pDiskObject;
FUNCTION PutIconTagList(CONST name : string; CONST icon : pDiskObject; CONST tags : pTagItem) : BOOLEAN; FUNCTION PutIconTagList(CONST name : RawByteString; CONST icon : pDiskObject; CONST tags : pTagItem) : BOOLEAN;
{macros} {macros}
function PACK_ICON_ASPECT_RATIO(num,den : longint) : longint; function PACK_ICON_ASPECT_RATIO(num,den : longint) : longint;
@ -406,11 +404,11 @@ var
IMPLEMENTATION IMPLEMENTATION
uses
{$ifndef dont_use_openlib} {$ifndef dont_use_openlib}
amsgbox, uses
amsgbox;
{$endif dont_use_openlib} {$endif dont_use_openlib}
pastoc;
function PACK_ICON_ASPECT_RATIO(num,den : longint) : longint; function PACK_ICON_ASPECT_RATIO(num,den : longint) : longint;
begin begin
@ -418,69 +416,59 @@ begin
end; end;
FUNCTION BumpRevision(newname : string;const oldname : pCHAR) : pCHAR; FUNCTION BumpRevision(newname : pCHar;const oldname : RawByteString) : pCHAR;
begin begin
BumpRevision := BumpRevision(pas2c(newname),oldname); BumpRevision := BumpRevision(newname,PChar(oldname));
end; end;
FUNCTION BumpRevision(newname : pCHar;const oldname : string) : pCHAR; FUNCTION DeleteDiskObject(const name : RawByteString) : BOOLEAN;
begin begin
BumpRevision := BumpRevision(newname,pas2c(oldname)); DeleteDiskObject := DeleteDiskObject(PChar(name));
end; end;
FUNCTION BumpRevision(newname : string;const oldname : string) : pCHAR; FUNCTION FindToolType(const toolTypeArray : POINTER;const typeName : RawByteString) : pCHAR;
begin begin
BumpRevision := BumpRevision(pas2c(newname),pas2c(oldname)); FindToolType := FindToolType(toolTypeArray,PChar(typeName));
end; end;
FUNCTION DeleteDiskObject(const name : string) : BOOLEAN; FUNCTION GetDiskObject(const name : RawByteString) : pDiskObject;
begin begin
DeleteDiskObject := DeleteDiskObject(pas2c(name)); GetDiskObject := GetDiskObject(PChar(name));
end; end;
FUNCTION FindToolType(const toolTypeArray : POINTER;const typeName : string) : pCHAR; FUNCTION GetDiskObjectNew(const name : RawByteString) : pDiskObject;
begin begin
FindToolType := FindToolType(toolTypeArray,pas2c(typeName)); GetDiskObjectNew := GetDiskObjectNew(PChar(name));
end; end;
FUNCTION GetDiskObject(const name : string) : pDiskObject; FUNCTION MatchToolValue(const typeString : RawByteString;const value : pCHAR) : BOOLEAN;
begin begin
GetDiskObject := GetDiskObject(pas2c(name)); MatchToolValue := MatchToolValue(PChar(typeString),value);
end; end;
FUNCTION GetDiskObjectNew(const name : string) : pDiskObject; FUNCTION MatchToolValue(const typeString : pCHAR;const value : RawByteString) : BOOLEAN;
begin begin
GetDiskObjectNew := GetDiskObjectNew(pas2c(name)); MatchToolValue := MatchToolValue(typeString,PChar(value));
end; end;
FUNCTION MatchToolValue(const typeString : string;const value : pCHAR) : BOOLEAN; FUNCTION MatchToolValue(const typeString : RawByteString;const value : RawByteString) : BOOLEAN;
begin begin
MatchToolValue := MatchToolValue(pas2c(typeString),value); MatchToolValue := MatchToolValue(PChar(typeString),PChar(value));
end; end;
FUNCTION MatchToolValue(const typeString : pCHAR;const value : string) : BOOLEAN; FUNCTION PutDiskObject(const name : RawByteString;const diskobj : pDiskObject) : BOOLEAN;
begin begin
MatchToolValue := MatchToolValue(typeString,pas2c(value)); PutDiskObject := PutDiskObject(PChar(name),diskobj);
end; end;
FUNCTION MatchToolValue(const typeString : string;const value : string) : BOOLEAN; FUNCTION GetIconTagList(CONST name : RawByteString; CONST tags : pTagItem) : pDiskObject;
begin begin
MatchToolValue := MatchToolValue(pas2c(typeString),pas2c(value)); GetIconTagList := GetIconTagList(PChar(name),tags);
end; end;
FUNCTION PutDiskObject(const name : string;const diskobj : pDiskObject) : BOOLEAN; FUNCTION PutIconTagList(CONST name : RawByteString; CONST icon : pDiskObject; CONST tags : pTagItem) : BOOLEAN;
begin begin
PutDiskObject := PutDiskObject(pas2c(name),diskobj); PutIconTagList := PutIconTagList(PChar(name),icon,tags);
end;
FUNCTION GetIconTagList(CONST name : string; CONST tags : pTagItem) : pDiskObject;
begin
GetIconTagList := GetIconTagList(pas2c(name),tags);
end;
FUNCTION PutIconTagList(CONST name : string; CONST icon : pDiskObject; CONST tags : pTagItem) : BOOLEAN;
begin
PutIconTagList := PutIconTagList(pas2c(name),icon,tags);
end; end;
const const