Files
befpc/bepascal/source/tools/codegen/pas/typmap.pp
ocoursiere ba236b2df5 Now there is a Jamfile for compiling
----------------------------------------------------------------------
2003-09-11 17:56:43 +00:00

52 lines
951 B
ObjectPascal

unit typmap;
interface
uses
SysUtils, Classes;
function CppToPas(CppType : string) : string;
function PasToCpp(PasType : string) : string;
implementation
const
TypMapFileName = 'typemap.txt';
var
aTypMap : TStringList;
NewTypMap : TStringList;
function CppToPas(CppType : string) : string;
var
i : integer;
begin
Result := aTypMap.Values[CppType];
if Result = '' then
begin
if not NewTypMap.Find(CppType + '=', i) then
NewTypMap.Add(CppType + '=');
end;
end;
function PasToCpp(PasType : string) : string;
begin
// To implement if necessary
Result := '';
end;
initialization
aTypMap := TStringList.Create;
aTypMap.LoadFromFile(TypMapFileName);
aTypMap.Sorted := True;
NewTypMap := TStringList.Create;
NewTypMap.Sorted := True;
finalization
// WriteLn(aTypMap.Text);
aTypMap.SaveToFile(TypMapFileName);
aTypMap.Free;
NewTypMap.SaveToFile(TypMapFileName + '.new');
NewTypMap.Free;
end.