From ec7488755248fc6f8af40c45a6541178e71c85e7 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 18 Oct 2006 18:38:19 +0000 Subject: [PATCH] * another patch from J. Peter Mugaas, fixes #7618 and #7615 git-svn-id: trunk@4959 - --- utils/h2pas/h2pas.y | 2 +- utils/h2pas/scan.l | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/utils/h2pas/h2pas.y b/utils/h2pas/h2pas.y index a5dddc6fe4..4ffee689a3 100644 --- a/utils/h2pas/h2pas.y +++ b/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; diff --git a/utils/h2pas/scan.l b/utils/h2pas/scan.l index 3cad1541d1..b1ad1b25f0 100644 --- a/utils/h2pas/scan.l +++ b/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. +