]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/make_sed.sh
ncurses 5.5
[ncurses.git] / man / make_sed.sh
index 766801d551a8b0e980c7dfbfab834c4295ab3521..f2afac93ebc8668643b27481dff68beaeab2b90c 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
-# $Id: make_sed.sh,v 1.7 2003/10/25 20:33:16 tom Exp $
+# $Id: make_sed.sh,v 1.9 2005/07/16 18:15:31 tom Exp $
 ##############################################################################
-# Copyright (c) 1998,2003 Free Software Foundation, Inc.                     #
+# Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
 # authorization.                                                             #
 ##############################################################################
 #
-# Author: Thomas E. Dickey 1997
+# Author: Thomas E. Dickey 1997-2005
 #
 # Construct a sed-script to perform renaming within man-pages.  Originally
 # written in much simpler form, this one accounts for the common cases of
@@ -63,7 +63,7 @@ paste $COL.* | \
 sed    -e 's/^/s\/\\</' \
        -e 's/$/\//' >$UPPER
 
-# Do the TH lines
+echo "# Do the TH lines" >>$RESULT
 sed    -e 's/\//\/TH /' \
        -e 's/  / /' \
        -e 's/  / ""\/TH /' \
@@ -71,7 +71,7 @@ sed   -e 's/\//\/TH /' \
        -e 's/\/$/ ""\//' \
        $UPPER >>$RESULT
 
-# Do the embedded references
+echo "# Do the embedded references" >>$RESULT
 sed    -e 's/</<fB/' \
        -e 's/  /\\\\fR(/' \
        -e 's/  /)\/fB/' \
@@ -79,5 +79,11 @@ sed  -e 's/</<fB/' \
        -e 's/\/$/)\//' \
        $UPPER >>$RESULT
 
+echo "# Do the \fBxxx\fR references in the .NAME section" >>$RESULT
+sed    -e 's/\\</^\\\\fB/' \
+       -e 's/  [^      ]*      /\\\\f[RP] -\/\\\\fB/' \
+       -e 's/  .*$/\\\\fR -\//' \
+       $UPPER >>$RESULT
+
 # Finally, send the result to standard output
 cat $RESULT