diff --git a/distrib/notes/Makefile.inc b/distrib/notes/Makefile.inc index cf7644a42faa..a72e8f1ef965 100644 --- a/distrib/notes/Makefile.inc +++ b/distrib/notes/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.47 2019/11/27 15:58:12 martin Exp $ +# $NetBSD: Makefile.inc,v 1.48 2019/11/27 19:07:31 uwe Exp $ # # Ross Harvey @@ -107,9 +107,7 @@ ${TARG}.more: ${SRCS} ${TOC.more} ${DISTRIBVERDEP} # space taken by the TOC itself. # -TOCPROC= 2>&1 >/dev/null |\ - ${TOOL_SED} -n -e 's/"//g' \ - -e '/^\.Ti/{s/ \([A-Za-z]\)/ "\1/; s/ *$$/"/; p; }' +TOCPROC= 2>&1 >/dev/null | ${TOOL_GREP} -e '^\.Ti' ${TARG}.PostScript.toc: ${SRCS} ${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp diff --git a/distrib/notes/common/macros b/distrib/notes/common/macros index c36c2e1cf1b8..48c76a0beabb 100644 --- a/distrib/notes/common/macros +++ b/distrib/notes/common/macros @@ -1,4 +1,4 @@ -.\" $NetBSD: macros,v 1.44 2019/11/27 09:29:25 martin Exp $ +.\" $NetBSD: macros,v 1.45 2019/11/27 19:07:31 uwe Exp $ .\" .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -322,13 +322,17 @@ .. .\} .de Te -.ie rHTML \\$2 -.el \\$2 -.if dTOC \.tm .Ti \\$1 \\n% \\$2 +.nr Te-toc-level \\$1 +.shift +.ie rHTML \\$* +.el \\$* +.if dTOC .tm .Ti \\n[Te-toc-level] \\n% "\\$*" .. .de To -.if rHTML -.if dTOC \.tm .Ti \\$1 \\n% \\$2 +.nr To-toc-level \\$1 +.shift +.if rHTML +.if dTOC .tm .Ti \\n[To-toc-level] \\n% "\\$*" .. .de Ti .ie rHTML \{.ta (\n(.lu+\w''u)R