]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/make_sed.sh
ncurses 6.4 - patch 20240224
[ncurses.git] / man / make_sed.sh
index 2a290f0b1d9f7e0e5752e1e2c7d737b4e86b16c7..ee7df41775e07086699b860674eb723f9c7851af 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
-# $Id: make_sed.sh,v 1.16 2022/10/01 13:14:07 tom Exp $
+# $Id: make_sed.sh,v 1.19 2023/12/07 01:16:43 tom Exp $
 ##############################################################################
-# Copyright 2020-2021,2022 Thomas E. Dickey                                  #
+# Copyright 2020-2022,2023 Thomas E. Dickey                                  #
 # Copyright 1998-2005,2017 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
@@ -66,18 +66,20 @@ sed -e 's/^/s\/\\</' \
        -e 's/$/\//' >$UPPER
 
 {
+echo "# This script was generated from '$1' by man/make_sed.sh."
 echo "# Do the TH lines"
 sed    -e 's/\//\/TH /' \
        -e 's/  / /' \
-       -e 's/  / ""\/TH /' \
+       -e 's/  / \/TH /' \
        -e 's/  / /' \
-       -e 's/\/$/ ""\//' \
+       -e 's/\/$/ \//' \
        $UPPER
 
 echo "# Do the embedded references"
-sed    -e 's/</<fB/' \
+sed    -e 's/</<fB\\(\\\\%\\)\\?/' \
+       -e 's/\\%</\\%/' \
        -e 's/  /\\\\fP(/' \
-       -e 's/  /)\/fB/' \
+       -e 's/  /)\/fB\\\\%/' \
        -e 's/  /\\\\fP(/' \
        -e 's/\/$/)\//' \
        $UPPER