Przeglądaj źródła

* another patch from J. Peter Mugaas, fixes #7618 and #7615

git-svn-id: trunk@4959 -
florian 19 lat temu
rodzic
commit
ec74887552
2 zmienionych plików z 12 dodań i 1 usunięć
  1. 1 1
      utils/h2pas/h2pas.y
  2. 11 0
      utils/h2pas/scan.l

+ 1 - 1
utils/h2pas/h2pas.y

@@ -901,7 +901,7 @@ program h2pas;
               end;
             { what can we do with void defs  ? }
             t_void :
-              write(outfile,'void');
+              write(outfile,'pointer');
             t_pointerdef :
               begin
                  pointerwritten:=false;

+ 11 - 0
utils/h2pas/scan.l

@@ -695,11 +695,21 @@ D [0-9]
                           if not stripinfo then
                             writeln(outfile,'{ C++ extern C conditionnal removed }');
                         end;
+"#ifdef cplusplus"[ \t]*\n"extern \"C\" {"\n"#endif"
+                        begin
+                          if not stripinfo then
+                            writeln(outfile,'{ C++ extern C conditionnal removed }');
+                        end;                        
 "#ifdef __cplusplus"[ \t]*\n"}"\n"#endif"
                         begin
                           if not stripinfo then
                             writeln(outfile,'{ C++ end of extern C conditionnal removed }');
                         end;
+"#ifdef cplusplus"[ \t]*\n"}"\n"#endif"
+                        begin
+                          if not stripinfo then
+                            writeln(outfile,'{ C++ end of extern C conditionnal removed }');
+                        end;                        
 "#"[ \t]*"else"         begin
                            writeln(outfile,'{$else}');
                            block_type:=bt_no;
@@ -865,3 +875,4 @@ end;
 end.
 
 
+