|
@@ -261,12 +261,10 @@ program h2pas;
|
|
|
var i : Integer;
|
|
|
begin
|
|
|
IsACType := True;
|
|
|
- WriteLn('IsACType '+s);
|
|
|
for i := 0 to MAX_CTYPESARRAY do
|
|
|
begin
|
|
|
if s = CTypesArray[i] then
|
|
|
begin
|
|
|
- WriteLn('IsACType True');
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
@@ -887,6 +885,14 @@ program h2pas;
|
|
|
t_id :
|
|
|
begin
|
|
|
if pointerprefix then
|
|
|
+ if UseCtypesUnit then
|
|
|
+ begin
|
|
|
+ if not IsACType(p^.p) then
|
|
|
+ begin
|
|
|
+ PTypeList.Add('P'+p^.str);
|
|
|
+ end;
|
|
|
+ end
|
|
|
+ else
|
|
|
PTypeList.Add('P'+p^.str);
|
|
|
if p^.intname then
|
|
|
write(outfile,p^.p)
|
|
@@ -922,14 +928,21 @@ program h2pas;
|
|
|
end;
|
|
|
if not pointerwritten then
|
|
|
begin
|
|
|
-
|
|
|
- if in_args then
|
|
|
- begin
|
|
|
- write(outfile,'P');
|
|
|
- pointerprefix:=true;
|
|
|
- end
|
|
|
+ if in_args then
|
|
|
+ begin
|
|
|
+ if UseCTypesUnit and (IsACType(p^.p1^.p)=False) then
|
|
|
+ write(outfile,'P')
|
|
|
+ else
|
|
|
+ write(outfile,'p');
|
|
|
+ pointerprefix:=true;
|
|
|
+ end
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ if UseCTypesUnit and (IsACType(p^.p1^.p)=False) then
|
|
|
+ write(outfile,'^')
|
|
|
else
|
|
|
- write(outfile,'^');
|
|
|
+ write(outfile,'p');
|
|
|
+ end;
|
|
|
write_type_specifier(outfile,p^.p1);
|
|
|
pointerprefix:=false;
|
|
|
end;
|
|
@@ -940,7 +953,8 @@ program h2pas;
|
|
|
(p^.p2^.typ=t_id) then
|
|
|
begin
|
|
|
if pointerprefix then
|
|
|
- PTypeList.Add('P'+p^.p2^.str);
|
|
|
+ if UseCTypesUnit and (IsACType( p^.p2^.p )=False) then
|
|
|
+ PTypeList.Add('P'+p^.p2^.str);
|
|
|
write(outfile,p^.p2^.p);
|
|
|
end
|
|
|
else
|
|
@@ -1030,7 +1044,8 @@ program h2pas;
|
|
|
(p^.p1=nil) and (p^.p2^.typ=t_id) then
|
|
|
begin
|
|
|
if pointerprefix then
|
|
|
- PTypeList.Add('P'+p^.p2^.str);
|
|
|
+ if UseCTypesUnit and (IsACType(p^.p2^.str)=false) then
|
|
|
+ PTypeList.Add('P'+p^.p2^.str);
|
|
|
write(outfile,TypeName(p^.p2^.p));
|
|
|
end
|
|
|
else
|