Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/notes When creating the TOC file, strip all incoming...



details:   https://anonhg.NetBSD.org/src/rev/20b6eef2153b
branches:  trunk
changeset: 461476:20b6eef2153b
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Nov 27 15:58:12 2019 +0000

description:
When creating the TOC file, strip all incoming double quotes, but output
quotes around the third arg of the generated Ti macro invocation.
This fixes the TOC in non-html output. Pointed out by kre.

diffstat:

 distrib/notes/Makefile.inc |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 9b51cb70d442 -r 20b6eef2153b distrib/notes/Makefile.inc
--- a/distrib/notes/Makefile.inc        Wed Nov 27 10:19:20 2019 +0000
+++ b/distrib/notes/Makefile.inc        Wed Nov 27 15:58:12 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.46 2019/11/27 09:29:25 martin Exp $
+#      $NetBSD: Makefile.inc,v 1.47 2019/11/27 15:58:12 martin Exp $
 #
 
 # Ross Harvey <ross%NetBSD.org@localhost>
@@ -107,7 +107,9 @@
 # space taken by the TOC itself.
 #
 
-TOCPROC=          2>&1 >/dev/null | ${TOOL_GREP} -e '^\.Ti '
+TOCPROC=         2>&1 >/dev/null |\
+          ${TOOL_SED} -n -e 's/"//g' \
+          -e '/^\.Ti/{s/ \([A-Za-z]\)/ "\1/; s/ *$$/"/; p; }'
 
 ${TARG}.PostScript.toc: ${SRCS}
        ${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp



Home | Main Index | Thread Index | Old Index