Commit 15b18336 by Bruce Korb Committed by Bruce Korb

inclhack.def (end_else_label): combined else_label and endif_label and fixed the sed expression.

	*fixinc/inclhack.def(end_else_label): combined else_label
	and endif_label and fixed the sed expression.
	*fixinc/{fixincl.x|inclhack.sh}: regen

From-SVN: r27703
parent 69f00f01
1999-06-22 Bruce Korb <ddsinc09@ix.netcom.com>
*fixinc/inclhack.def(end_else_label): combined else_label
and endif_label and fixed the sed expression.
*fixinc/{fixincl.x|inclhack.sh}: regen
Tue Jun 22 01:58:18 1999 Jeffrey A Law (law@cygnus.com) Tue Jun 22 01:58:18 1999 Jeffrey A Law (law@cygnus.com)
* rs6000.md (movdf_hardfloat32): Use %X instead of always emitting * rs6000.md (movdf_hardfloat32): Use %X instead of always emitting
......
...@@ -416,31 +416,13 @@ fix = { ...@@ -416,31 +416,13 @@ fix = {
/* /*
* Fix else directives that contain non-commentary text * Fix else and endif directives that contain non-commentary text
*
* The fixinc_eol stuff is to work around a bug in the sed
*/ */
fix = { fix = {
hackname = else_label; hackname = end_else_label;
select = "^[ \t]*#[ \t]*else[ \t]+[!-.0-~]";
sed = ":loop\n"
'/\\\\$/' "N\n"
's/\\\\$/\\\\+++fixinc_eol+++/' "\n"
'/\\\\$/' "b loop\n"
's/\\\\+++fixinc_eol+++/\\\\/g' "\n"
"s%^\\([ \t]*#[ \t]*else\\)[ \t]*/[^*].*%\\1%\n"
"s%^\\([ \t]*#[ \t]*else\\)[ \t]*[^/ \t].*%\\1%";
};
/*
* Fix endif directives that contain non-commentary text
*/
fix = {
hackname = endif_label;
/* /*
* Select files that contain '#endif' directives with * Select files that contain '#endif' or '#else' directives with
* some sort of following junk. (Between the ascii '.' * some sort of following junk. (Between the ascii '.'
* and '0' lies the character '/'. This will *NOT* * and '0' lies the character '/'. This will *NOT*
* match '#endif / * foo * /', but it also wont match * match '#endif / * foo * /', but it also wont match
...@@ -452,13 +434,14 @@ fix = { ...@@ -452,13 +434,14 @@ fix = {
* "#endif /% blah %/ which appear on OSF4.0A and AIX4.2 * "#endif /% blah %/ which appear on OSF4.0A and AIX4.2
* repsectively. * repsectively.
* *
* We use the pattern [!-.0-z{|}~] instead of [^/ \t] to match a noncomment * We use the pattern [!-.0-z{|}~] instead of [^/ \t] to match a
* following #else or #endif because some buggy egreps think [^/] matches * noncomment following #else or #endif because some buggy egreps
* newline, and they thus think `#else ' matches * think [^/] matches newline, and they thus think `#else ' matches
* `#e[ndiflse]*[ \t]+[^/ \t]'. * `#e[ndiflse]*[ \t]+[^/ \t]'.
* [!-.0-~] does not work properly on AIX 4.1. * [!-.0-~] does not work properly on AIX 4.1.
*/ */
select = "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z\{\|\}\~]|^[ \t]*#[ \t]*endif[ \t]+/[^\*]"; select = "^[ \t]*#[ \t]*(else|endif)[ \t]+"
"(" '[!-.0-z\{\|\}\~]' "|" '/[^\*]' ")";
/* /*
* First, join the continued input lines. * First, join the continued input lines.
...@@ -476,9 +459,11 @@ fix = { ...@@ -476,9 +459,11 @@ fix = {
'/\\\\$/' "b loop\n" '/\\\\$/' "b loop\n"
's/\\\\+++fixinc_eol+++/\\\\/g' "\n" 's/\\\\+++fixinc_eol+++/\\\\/g' "\n"
"s%^\\([ \t]*#[ \t]*endif\\)[ \t]*/[^*].*%\\1%\n" "s%^\\([ \t]*#[ \t]*else\\)[ \t][ \t]*/[^*].*%\\1%\n"
"s%^\\([ \t]*#[ \t]*endif\\)[ \t]*\\*[^/].*%\\1%\n" "s%^\\([ \t]*#[ \t]*else\\)[ \t][ \t]*[^/ \t].*%\\1%\n"
"s%^\\([ \t]*#[ \t]*endif\\)[ \t]*[^/* \t].*%\\1%"; "s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]*/[^*].*%\\1%\n"
"s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]*\*[^/].*%\\1%\n"
"s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]*[^/* \t].*%\\1%";
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment