diff options
author | Clint Adams <clint@debian.org> | 2017-01-04 20:39:58 -0500 |
---|---|---|
committer | Clint Adams <clint@debian.org> | 2017-01-04 20:39:58 -0500 |
commit | 29d3f78df4630dbee0a141e2be8e77275724b3a8 (patch) | |
tree | 89a97129c5b799046be2af10bde88ea035b59bd1 /doc/groupify.sed | |
parent | d75f3c567505ad7acd2c1943207b367593652739 (diff) |
New upstream version 4.3
Diffstat (limited to 'doc/groupify.sed')
-rwxr-xr-x | doc/groupify.sed | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/doc/groupify.sed b/doc/groupify.sed deleted file mode 100755 index 2430710..0000000 --- a/doc/groupify.sed +++ /dev/null @@ -1,59 +0,0 @@ -#! /bin/sed -nf -# Script to add @group...@end group tags to sed.texi.in -# so that comments are not separated from the instructions -# that they refer to. - -# Step 1: search for the conventional "@c start----" comment -1a\ -@c Do not edit this file!! It is automatically generated from sed-in.texi. -p -/^@c start-*$/! b - -# Step 2: loop until we find a @ command -:a -n -p -/^@/! ba - -# Step 3: process everything until a "@end" command - -# Step 3.1: Print the blank lines before the group. If we reach the "@end", -# we go back to step 1. -:b -n -/^@end/ { - p - b -} -/^[ ]*$/ { - p - bb -} - -# Step 3.2: Add to hold space every line until an empty one or "@end" -h -:c -n -/^@end example/! { - /^[ ]*$/! { - H - bc - } -} - -# Step 3.3: Working in hold space, add @group...@end group if there are -# at least two lines. Then print the lines we processed and -# switch back to pattern space. -x -/\n/ { - s/.*/@group\ -&\ -@end group/ -} -p - -# Step 3.4: Switch back to pattern space, print the first blank line -# and possibly go back to step 3.1 -x -p -/^@end/ !bb |