diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2009-10-09 12:37:33 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2009-10-09 12:37:33 +0000 |
commit | 51db0bad4e0a1c0b007f05c5b0f5132c31adb34b (patch) | |
tree | 1cdab59fb177af172d15f14d39f82abe163e87e3 /utils/h2pas/h2pas.pas | |
parent | ba5147928691287ac36028ab9b23c3dbc75cd708 (diff) | |
download | fpc-51db0bad4e0a1c0b007f05c5b0f5132c31adb34b.tar.gz |
* handle postfix type declations in typedefs properly
* small indention fixes
* omit empty lines after TypeName
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@13822 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'utils/h2pas/h2pas.pas')
-rw-r--r-- | utils/h2pas/h2pas.pas | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/h2pas/h2pas.pas b/utils/h2pas/h2pas.pas index 4ee4e5bd15..c6a7938651 100644 --- a/utils/h2pas/h2pas.pas +++ b/utils/h2pas/h2pas.pas @@ -1970,7 +1970,9 @@ begin writeln(outfile); writeln(outfile,aktspace,'type'); block_type:=bt_type; - end; + end + else + writeln(outfile); no_pop:=assigned(yyv[yysp-2]) and (yyv[yysp-2]^.str='no_pop'); shift(3); (* Get the name to write the type definition for, try @@ -1987,7 +1989,6 @@ begin end; (* write type definition *) is_procvar:=false; - writeln(outfile); TN:=TypeName(ph^.p); PN:=PointerName(ph^.p); if UsePPointers and (Uppercase(tn)<>Uppercase(pn)) and @@ -1996,7 +1997,7 @@ begin (* write new type name *) write(outfile,aktspace,TN,' = '); shift(2); - write_type_specifier(outfile,yyv[yysp-3]); + write_p_a_def(outfile,yyv[yysp-1]^.p1^.p1,yyv[yysp-3]); popshift; (* if no_pop it is normal fpc calling convention *) if is_procvar and @@ -2047,10 +2048,11 @@ begin writeln(outfile); writeln(outfile,aktspace,'type'); block_type:=bt_type; - end; + end + else + writeln(outfile); shift(3); (* write as pointer *) - writeln(outfile); writeln(outfile,'(* generic typedef *)'); writeln(outfile,aktspace,yyv[yysp-1]^.p,' = pointer;'); flush(outfile); |