diff options
author | lanfer <lanfer@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-04-19 17:56:33 +0000 |
---|---|---|
committer | lanfer <lanfer@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-04-19 17:56:33 +0000 |
commit | c9de994e3be3f745c7fdea42da5055e36f2ecd04 (patch) | |
tree | 9ce24b049233ca4030ba7cbb3e9590bd13d9f398 /lib/sbin/c_file_processor.pl | |
parent | 87c5cfc0e4d0054a05b1eab67ab3a61303ec402a (diff) |
fix to correctly match the last } in a routine
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1602 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/c_file_processor.pl')
-rw-r--r-- | lib/sbin/c_file_processor.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sbin/c_file_processor.pl b/lib/sbin/c_file_processor.pl index b040bf92..d16619b5 100644 --- a/lib/sbin/c_file_processor.pl +++ b/lib/sbin/c_file_processor.pl @@ -92,17 +92,17 @@ while(<>) { ## Start adding first macro, deal with "return }"first, "}" after if ($domacro1) { - if (!($routine=~s/([ \t\f]*)(return\s*\S*\s*})$/$1$addmacro1\n$1$2/s)) + if (!($routine=~s/([ \t\f]*)(return\s*\S*\s*}\s*)$/$1$addmacro1\n$1$2/s)) { - ($routine=~s/(}$)/ $addmacro1\n$1/s) + ($routine=~s/(}\s*$)/ $addmacro1\n$1/s) } } ## Start adding second macro if ($domacro2) { - if (!($routine=~s/([ \t\f]*)(return\s*\S*\s*})$/$1$addmacro2\n$1$2/s)) + if (!($routine=~s/([ \t\f]*)(return\s*\S*\s*}\s*)$/$1$addmacro2\n$1$2/s)) { - ($routine=~s/(}$)/ $addmacro2\n$1/s) + ($routine=~s/(}\s*$)/ $addmacro2\n$1/s) } } $n_arg_braces = -2; |