From d8c6ea5a6f7f22ba91b84d5a2f2c91d9d355f708 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 6 Apr 2005 09:51:50 +0000 Subject: Improvements to man2html script to handle .IP better --- ChangeLog | 3 +++ tools/man2html2.tcl | 15 ++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20af680..6b11c41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-04-06 Donal K. Fellows + * tools/man2html2.tcl (IPmacro): Rewrote to understand what .IP + really is (.IP and .TP are really just two ways of doing the same + thing). Change below made this relevant. * doc/re_syntax.n: Change some uses of .TP to .IP to work around bugs in various *roff implementations. Also reworded the atom descriptions slightly. diff --git a/tools/man2html2.tcl b/tools/man2html2.tcl index d206cbd..b9388cb 100644 --- a/tools/man2html2.tcl +++ b/tools/man2html2.tcl @@ -5,7 +5,7 @@ # # Copyright (c) 1996 by Sun Microsystems, Inc. # -# $Id: man2html2.tcl,v 1.7 2004/11/24 11:24:34 dkf Exp $ +# $Id: man2html2.tcl,v 1.8 2005/04/06 09:52:00 dkf Exp $ # package require Tcl 8.4 @@ -719,17 +719,14 @@ proc IPmacro argList { nest para UL LI return } - if {$length == 1} { + if {[regexp {^\[\d+\]$} [lindex $argList 0]]} { nest para OL LI return } - if {$length > 1} { - nest para DL DT - formattedText [lindex $argList 0] - puts $file "\n
" - return - } - puts stderr "Bad .IP macro: .IP [join $argList " "]" + nest para DL DT + formattedText [lindex $argList 0] + puts $file "\n
" + return } -- cgit v0.12