Remove everything after #endif, instead of trying

to turn it into comments, which loses inside comments.

From-SVN: r4811
This commit is contained in:
Paul Eggert 1993-07-01 07:46:15 +00:00
parent c980ac4985
commit 6fa42ed8b0
1 changed files with 4 additions and 2 deletions

View File

@ -162,8 +162,10 @@ while [ $# != 0 ]; do
# The change of u_char, etc, to u_int
# applies to bit fields.
sed -e '
s%^\([ ]*#[ ]*endif[ ]*\)\([^/ ].*\)$%\1/* \2 */%
s%^\([ ]*#[ ]*else[ ]*\)\([^/ ].*\)$%\1/* \2 */%
s%^\([ ]*#[ ]*else\)[ ]*/[^*].*%\1%
s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%
s%^\([ ]*#[ ]*endif\)[ ]*/[^*].*%\1%
s%^\([ ]*#[ ]*endif\)[ ]*[^/ ].*%\1%
s/#lint(on)/defined(lint)/g
s/#lint(off)/!defined(lint)/g
s/#machine(\([^)]*\))/defined(__\1__)/g