X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=man%2Fmake_sed.sh;h=a0fdb0585822a60726057a6ab1464c8a63fa4de9;hp=0b794f86b0e83e29dcdf31c15fb1b4cfd4943dae;hb=67ea6645053c80c6eea47a4ff6d9153da83ac2ac;hpb=3f57ad09dfcb62c8ad444e13fa4d450c05e878ba diff --git a/man/make_sed.sh b/man/make_sed.sh index 0b794f86..a0fdb058 100755 --- a/man/make_sed.sh +++ b/man/make_sed.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: make_sed.sh,v 1.14 2022/02/05 20:38:54 tom Exp $ +# $Id: make_sed.sh,v 1.15 2022/07/16 20:20:00 tom Exp $ ############################################################################## # Copyright 2020-2021,2022 Thomas E. Dickey # # Copyright 1998-2005,2017 Free Software Foundation, Inc. # @@ -48,7 +48,7 @@ RESULT=result$$ rm -f $UPPER $SCRIPT $RESULT trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT; exit 1" 1 2 3 15 trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT" 0 -fgrep -v \# $1 | \ +fgrep -v \# "$1" | \ sed -e 's/[ ][ ]*/ /g' >$INPUT for F in 1 2 3 4 @@ -65,27 +65,29 @@ paste $COL.* | \ sed -e 's/^/s\/\\$UPPER -echo "# Do the TH lines" >>$RESULT +{ +echo "# Do the TH lines" sed -e 's/\//\/TH /' \ -e 's/ / /' \ -e 's/ / ""\/TH /' \ -e 's/ / /' \ -e 's/\/$/ ""\//' \ - $UPPER >>$RESULT + $UPPER -echo "# Do the embedded references" >>$RESULT +echo "# Do the embedded references" sed -e 's/>$RESULT + $UPPER -echo "# Do the \fBxxx\fP references in the .NAME section" >>$RESULT +echo '# Do the \\fBxxx\\fP references in the .NAME section' sed -e 's/\\>$RESULT + $UPPER +} >>$RESULT # Finally, send the result to standard output cat $RESULT