From 60e3ed5d175e1e9f6fe2f1ff6bfcee5ca889b7fb Mon Sep 17 00:00:00 2001 From: benfry Date: Fri, 29 Aug 2008 04:11:11 +0000 Subject: [PATCH] fix problems with new 'abstract' methods --- core/preproc.pl | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/core/preproc.pl b/core/preproc.pl index 189734f4e..cb3c56c96 100755 --- a/core/preproc.pl +++ b/core/preproc.pl @@ -78,30 +78,38 @@ while ($line = shift(@contents)) { } else { $returns = ''; } - if ($line =~ /^(\s+)abstract\s+([^;]+);/) { - $line = $1 . $2 . " {\n"; - #print "found $1\n"; - # hrm - } + +# if ($line =~ /^(\s+)abstract\s+([^;]+);/) { +# $line = $1 . $2 . " {\n"; +# #print "found $1\n"; +# # hrm +# } + # remove the 'abstract' modifier + $line =~ s/\sabstract\s/ /; + + # replace semicolons with a start def + $line =~ s/\;\s*$/ {\n/; + print OUT "\n\n$line"; - if ($got_interface == 1) { - $iline = $line; - $iline =~ s/ \{/\;/; -# print INTF "\n$iline"; - } +# if ($got_interface == 1) { +# $iline = $line; +# $iline =~ s/ \{/\;/; +## print INTF "\n$iline"; +# } $decl .= $line; while (!($line =~ /\)/)) { $line = shift (@contents); $decl .= $line; + $line =~ s/\;\s*$/ {\n/; print OUT $line; - if ($got_interface == 1) { - $iline = $line; - $iline =~ s/ \{/\;/; -# print INTF $iline; - } +# if ($got_interface == 1) { +# $iline = $line; +# $iline =~ s/ \{/\;/; +## print INTF $iline; +# } } #$g_line = '';