NetBSD Problem Report #13532

Received: (qmail 3353 invoked from network); 22 Jul 2001 17:08:15 -0000
Message-Id: <20010722171143.A94EB1110F@www.netbsd.org>
Date: Sun, 22 Jul 2001 10:11:43 -0700 (PDT)
From: mw@blobulent.com
Sender: nobody@netbsd.org
Reply-To: mw@blobulent.com
To: gnats-bugs@gnats.netbsd.org
Subject: the HTML generated for INSTALL.html is atrocious
X-Send-Pr-Version: www-1.0

>Number:         13532
>Category:       install
>Synopsis:       the HTML generated for INSTALL.html is atrocious
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 22 17:09:00 +0000 2001
>Closed-Date:    
>Last-Modified:  Wed Jul 16 14:32:02 +0000 2003
>Originator:     michael wolfson
>Release:        1.5.1
>Organization:
>Environment:
>Description:
The HTML code generated in basesrc/distrib/notes is ghastly.  Here is an example from the 1.5.1 i386 INSTALL.html:

22.3 MB gzipped, 98.8 MB uncompressed
<p><dt>pkgsrc<dd>

In addition to this, the macppc INSTALL.html is unweildy enough that Internet Explorer 5 for MacOS choke on the file, and only displays the first half.

There is also a lot of whitespace in addition to useless tags, for example (from the same file):

/usr/src
with the command:
     <p>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
#( cd / ; tar -zxpf - ) < set_name.tgz
<br>
     <p>
The

By removing useless tags and whitespace, the HTML file will be smaller, quicker to load, and take up less space.
>How-To-Repeat:
build basesrc/distrib/notes/
>Fix:

>Release-Note:
>Audit-Trail:

From: Martin Husemann <martin@duskware.de>
To: mw@blobulent.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: install/13532: the HTML generated for INSTALL.html is atrocious
Date: Sun, 22 Jul 2001 19:56:20 +0200 (MEST)

 > In addition to this, the macppc INSTALL.html is unweildy enough that
 > Internet Explorer 5 for MacOS choke on the file, and only displays the first
 > half.

 Mozilla can not display it too, IE 5 and Netscape 4.75 on Win32 work though.

 Martin

From: Michael Wolfson <mw@blobulent.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: install/13532: the HTML generated for INSTALL.html is
 atrocious
Date: Sun, 22 Jul 2001 12:17:37 -0700

 At 7:56 PM +0200 7/22/01, Martin Husemann wrote:

 :)Mozilla can not display it too, IE 5 and Netscape 4.75 on Win32 work though.

 Yes, I was trying to point out that only a very limited set of PowerPC web
 browsers will display it properly, particularly under NetBSD or MacOS (the
 "native" OS for this platform).

 Yet another reason I filed PR install/13533 (to generate PDF versions of
 the INSTALL notes).

   -- MW



From: Havard Eidnes <he@netbsd.org>
To: mw@blobulent.com, martin@duskware.de
Cc: gnats-bugs@gnats.netbsd.org, releng-1-5@netbsd.org,
	ross@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Tue, 01 Jan 2002 22:16:00 +0100 (CET)

 ----Next_Part(Tue_Jan__1_22:16:00_2002_707)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit

 > The HTML code generated in basesrc/distrib/notes is ghastly.  Here is
 > an example from the 1.5.1 i386 INSTALL.html:
 >
 > ...
 >
 > There is also a lot of whitespace in addition to useless tags [...]
 >
 > By removing useless tags and whitespace, the HTML file will be
 > smaller, quicker to load, and take up less space.

 Hm, yes, but it's not just the useless tags and the whitespace which
 is fouling things up.  E.g. there exists OF prompts (unquoted >'s),
 and "<return>"s in some of the examples; which doesn't exactly improve
 things either.  (The install notes for sparc, sparc64, sun3 and vax
 (and probably more) also had similar problems, as you'll see.)

 I've toyed some with sed and awk this afternoon, and came up with the
 script below.  If the install notes from what's currently 1.5.3_ALPHA
 is pushed through this script, the result passes weblint's checks, and
 there are thus no more any empty elements.

 Admittedly, this may not be the correct solution in the long run, but
 I'm not qualified to tell whether the groff macros can be improved or
 how it should be done.  (I've taken the liberty to CC'ed some troff
 expertise above.)

 You'll also note that there's a fair numbe of special-purpose
 substitutions in the script to cater for unquoted >'s and <'s in some
 various odd places; these should probably be properly dealt with in
 the troff sources, where possible.  Also, continuing along that path
 is clearly not "scalable"...

 If you'd care to pass the current macppc INSTALL.html through this
 filter and see if the result is viewable on MacOS, it'd be
 appreciated; I can't tell from where I sit at the moment.

 I'm wondering if we should consider implanting such a post-processing
 step as shown below for the netbsd-1-5 branch, therefore CC'ed
 releng-1-5.

 Regards,

 - Havard

 ----Next_Part(Tue_Jan__1_22:16:00_2002_707)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline; filename="fixup-html.sh"

 #! /bin/sh

 #
 # Script to clean up the groff-generated HTML code for
 # the install notes.
 #
 # This makes weblint quiet about the result for all the ports
 # active in NetBSD-1.5.3_ALPHA; tweaks may be needed for other
 # versions.
 #

 sed -e '
     # remove empty elements
     s---g;
     s---g;
     s---g;
     s- --g;
     s---g;
     # replace absolute set to normal size with </font>
     s-<font size="+0">-</font>-g;
     # remove empty font settings
     s-<font[^>]*></font>--g;
     # push <p> to start of line for ease of later handling
     s-^     <p>$-<p>-;
     # remove font termination at end of document
     s-^</font></body>-</body>-;
     # empty <td> elements
     s-<td><td><td>-<td>-g;
     s-<td><td>-<td>-g;
     # misordered <td> / 
     s-<td>-<td>-g;
     # empty paragraphs
     s-<p></p>--g;
     # ftp commands
     s-ftp>-ftp\&gt;-;
     # i386 ddb commands
     s-db>-db\&gt;-g;
     # empty <td> element
     s-<td>-<td>-g;
     # mvme68k boot command
     s-Bug>-Bug\&gt;-g;
     # macppc <return> texts
     s-<return>-\&lt;return\&gt;-g;
     # sparc extraction command
     s-if=<aset>.tgz-if=\&lt;aset\&gt;.tgz-;
     # vax boot rom prompt (must come before sun old-prom boot prompt)
     s->>>-\&gt;\&gt;\&gt;-;
     # sparc old-prom boot prompt
     s->-\&gt;-g;
     # sparc64 labeling
     s-partition>-partition\&gt;-;
     # E-mail addresses, but not in mark-up
     s:<\([^>\" ]*\)@\([-_A-Za-z0-9.]*\)>:\&lt;\1@\2\&gt;:;
     # < followed by space -- quote <
     s-< -\&lt; -;
     # >> -- quote
     s- >>- \&gt;\&gt;-;
     # > preceded by space -- quote
     s- >- \&gt;-
     # *> -- sysinst menu entry
     s-\*>-*\&gt;-
     # -> -- OpenFirmware prompt
     s/\([^-]\)->/\1-\&gt;/g;
     # Kernighan and Ritchie...
     s/K&R/K\&amp;R/g;
 ' | awk '
     # Code to handle empty paragraphs via the "pseen" variable
     /^<p>$/{ pseen = 1; next; }
     /^<p>/{ pseen = 0; print; next; }
     /^<html>/{ pseen = 0; print; next; }
     /^<\/body>/ { pseen = 0; print; next; }
     /^<\/pre>/ { pseen = 0; print; next; }
     /^<\/font>/ { pseen = 0; print; next; }
     # Avoid multiple </html> statements
     /^<\/html>/ { if (!htmlend) { print; htmlend=1; } next; }
     # Substitute double quotes in otherwise non-marked-up lines
     /^[^<>]*"[^<>]*$/ { gsub("\"", "\\&quot;"); print $0; next; }
     // { if (pseen) { print "<p>"; pseen=0; }; print; }
     END { if (!htmlend) { print "</html>"; }}
 ' | egrep -v '^$'

 ----Next_Part(Tue_Jan__1_22:16:00_2002_707)----

From: Michael Wolfson <mw@blobulent.com>
To: Havard Eidnes <he@netbsd.org>
Cc: martin@duskware.de, gnats-bugs@gnats.netbsd.org, releng-1-5@netbsd.org,
   ross@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Wed, 2 Jan 2002 01:27:26 -0800

 At 10:16 PM +0100 1/1/02, Havard Eidnes wrote:

 :)If you'd care to pass the current macppc INSTALL.html through this
 :)filter and see if the result is viewable on MacOS, it'd be
 :)appreciated; I can't tell from where I sit at the moment.
 :)
 :)I'm wondering if we should consider implanting such a post-processing
 :)step as shown below for the netbsd-1-5 branch, therefore CC'ed
 :)releng-1-5.

 Havard,

 Thanks!  That script, and the recent revisions to the INSTALL.html
 generation have helped significantly.  I've gotten it to load just fine
 with Netscape 4.7, Internet Explorer 4.5 (for Classic), IE 5.5 for MacOS X,
 and OmniWeb 4 (for MacOS X).

 Load time and scrolling speed is dramatically increased.

 I agree that a post-groff script isn't the "right" solution given that the
 groff html generation needs to be fixed, but for the time being, we should
 at least manually run INSTALL.html through your script before releasing the
 1.5.3 INSTALL notes.

 I've just done an overhaul on the macppc INSTALL notes and placed a copy on
 my webserver (after running through your script).
 http://www.blobulent.com/~mw/INSTALL.html

 It does a good job of cleaning up, but weblint still finds some empty
 container element <P> and <A> tags, as well as trouble with one of my
 tables.

 Look at (for example) line 733 with a bunch of blank space ending with a <p>.
 At line 4100, after the <table> tag, there's
 	<br>
 	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 	<br>
 Additionally, and this really isn't much of a problem, the table of
 contents reference .To produces <a name="Introduction"></a>.

   -- MW



From: Havard Eidnes <he@netbsd.org>
To: mw@blobulent.com
Cc: martin@duskware.de, gnats-bugs@gnats.netbsd.org,
	releng-1-5@netbsd.org, ross@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Wed, 02 Jan 2002 21:53:07 +0100 (CET)

 > It does a good job of cleaning up, but weblint still finds some empty=

 > container element <P> and <A> tags, as well as trouble with one of my=

 > tables.

 The new script I just posted will fix the empty <p> and <a>'s as well,
 once the < and >'s are properly quoted in the nroff sources.

 > Look at (for example) line 733 with a bunch of blank space ending wit=
 h a <p>.
 > At line 4100, after the <table> tag, there's
 > 	<br>
 > 	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 > 	<br>

 Well, there's no such sequence in my post-processed versions; I'm not
 on-line at the moment to verify other sources.

 > Additionally, and this really isn't much of a problem, the table of
 > contents reference .To produces <a name=3D"Introduction"></a>.

 I've added code to deal with that as well (should be in that latest
 copy); apparently this happens on deep nestings of header levels.

 Regards,

 - H=E5vard

From: Havard Eidnes <he@netbsd.org>
To: mw@blobulent.com
Cc: martin@duskware.de, gnats-bugs@gnats.netbsd.org,
	releng-1-5@netbsd.org, ross@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Wed, 02 Jan 2002 20:55:05 +0100 (CET)

 ----Next_Part(Wed_Jan__2_20:55:05_2002_022)--
 Content-Type: Text/Plain; charset=iso-8859-1
 Content-Transfer-Encoding: quoted-printable

 Hi,

 I've taken a stab at -current's install notes, and you can find
 attached diffs to the notes (basically quoting > and <'s), and a
 revised editing script.  With that diff (modulo the fact that the
 amiga install notes don't build on my netbsd-1-5 system (or at all?))
 weblint is quiet on the transformed html files in my case.

 I'll next take a new stab at the netbsd-1-5 notes, fixing them the
 "right" way.

 Regards,

 - H=E5vard

 ----Next_Part(Wed_Jan__2_20:55:05_2002_022)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit

 Index: alpha/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/alpha/install,v
 retrieving revision 1.21
 diff -u -r1.21 install
 --- alpha/install	2001/07/24 16:31:39	1.21
 +++ alpha/install	2002/01/02 19:45:23
 @@ -661,11 +661,11 @@
  .Dl # Ic mkdir /mnt/usr/release
  .Dl # Ic cd /mnt/usr/release
  .Dl # Ic ftp ftp.netbsd.org
 -.D1 Em "the following commands are given to the" Ic ftp Em "program after logging in"
 -.Dl ftp> Ic "prompt"
 -.Dl ftp> Ic "cd /pub/NetBSD/NetBSD-\*V/\*M/binary/sets"
 -.Dl ftp> Ic "mget *"
 -.Dl ftp> Ic "quit"
 +.D1 Em "the following commands are given to the " Ic ftp Em "program after logging in"
 +.Dl ftp\*> Ic "prompt"
 +.Dl ftp\*> Ic "cd /pub/NetBSD/NetBSD-\*V/\*M/binary/sets"
 +.Dl ftp\*> Ic "mget *"
 +.Dl ftp\*> Ic "quit"
  .Pp
  Feel free, of course, to leave off the sets that you don't need
  if you don't plan to install everything.
 Index: common/main
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/common/main,v
 retrieving revision 1.147
 diff -u -r1.147 main
 --- common/main	2001/12/13 08:53:54	1.147
 +++ common/main	2002/01/02 19:45:56
 @@ -252,7 +252,7 @@
  .Sx Older Open Firmware System Preparation
  .Pp
  You should have the Open Firmware
 -.Dq Pa "0 >"
 +.Dq Pa "0 \*>"
  prompt on your screen before attempting to boot
  .Nx*M .
  .\}
 @@ -961,7 +961,7 @@
  .Pa /usr/src
  with the command:
  .Pp
 -.Dl # Ic "( cd / ; tar -zxpf - ) < set_name.tgz"
 +.Dl # Ic "( cd / ; tar -zxpf - ) \*< set_name.tgz"
  .Pp
  The
  .Pa sets/Split/
 Index: common/postinstall
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/common/postinstall,v
 retrieving revision 1.29
 diff -u -r1.29 postinstall
 --- common/postinstall	2001/12/02 03:59:41	1.29
 +++ common/postinstall	2002/01/02 19:46:03
 @@ -301,7 +301,7 @@
  (though other locations work fine), with the commands:
  .Pp
  .Dl # Ic "mkdir /usr/pkgsrc"
 -.Dl # Ic "( cd /usr/pkgsrc ; tar -zxpf - ) < pkgsrc.tar.gz"
 +.Dl # Ic "( cd /usr/pkgsrc ; tar -zxpf - ) \*< pkgsrc.tar.gz"
  .Pp
  After extracting, then see the
  .Pa README
 Index: common/sysinst
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/common/sysinst,v
 retrieving revision 1.27
 diff -u -r1.27 sysinst
 --- common/sysinst	2001/12/02 03:59:41	1.27
 +++ common/sysinst	2002/01/02 19:46:27
 @@ -195,13 +195,13 @@
  .Ic write
  command to alter the variable values:
  .Pp
 -.Dl db> Ic "write pcic_isa_intr_alloc_mask 0x0a00"
 +.Dl db\*> Ic "write pcic_isa_intr_alloc_mask 0x0a00"
  .Dl "pcic_isa_intr_alloc_mask            0xff5f = 0xa00"
 -.Dl db> Ic "write pcic_isa_alloc_iobase 0x330"
 +.Dl db\*> Ic "write pcic_isa_alloc_iobase 0x330"
  .Dl "pcic_isa_alloc_iobase               0x400 = 0x330"
 -.Dl db> Ic "write pcic_isa_alloc_iosize 0x0bf"
 +.Dl db\*> Ic "write pcic_isa_alloc_iosize 0x0bf"
  .Dl "pcic_isa_alloc_iosize               0xbff = 0xbf"
 -.Dl db> Ic "continue"
 +.Dl db\*> Ic "continue"
  .Pp
  Note that, since some floppy images may not have symbol information in
  the kernel, you may have to consult the matching
 @@ -214,7 +214,7 @@
  .Va pcic_isa_intr_alloc_mask
  is equal to c0513e3c):
  .Pp
 -.Dl db> Ic "write 0xc0513e3c 0x0a00"
 +.Dl db\*> Ic "write 0xc0513e3c 0x0a00"
  .Pp

  After installation, this value can be permanently written to the kernel image
 @@ -399,7 +399,7 @@
    .***********************************************.
    * NetBSD-1.5.1 Install System                   *
    *                                               *
 -  *>a: Install NetBSD to hard disk                *
 +  *\*>a: Install NetBSD to hard disk                *
    * b: Upgrade NetBSD on a hard disk              *
    * c: Re-install sets or install additional sets *
    * d: Reboot the computer                        *
 @@ -731,7 +731,7 @@
  .Pa swap No ),
  for example:
  .Dl # Ic "mkdir /mnt/etc"
 -.Dl # Ic "cat > /mnt/etc/fstab"
 +.Dl # Ic "cat \*> /mnt/etc/fstab"
  .Dl "/dev/wd0a / ffs rw 1 1"
  .Dl "/dev/wd0b none swap sw 0 0"
  .Dl "/dev/wd0g /usr ffs rw 1 2"
 Index: evbarm/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/evbarm/install,v
 retrieving revision 1.1
 diff -u -r1.1 install
 --- evbarm/install	2001/11/30 23:48:51	1.1
 +++ evbarm/install	2002/01/02 19:46:29
 @@ -56,9 +56,9 @@
  Load the kernel from the TFTP server.
  .Pp
  .Bd -literal
 -RedBoot> load netbsd-iq80310-fxp0
 +RedBoot\*> load netbsd-iq80310-fxp0
  Entry point: 0xa0200000, address range: 0xa0200000-0xa035e07c
 -RedBoot>    
 +RedBoot\*>
  .Ed
  .It
  Start the kernel running.  The kernel will display boot message,
 @@ -71,12 +71,12 @@
  the system should boot into single-user mode.
  .Pp
  .Bd -literal
 -RedBoot> go
 +RedBoot\*> go

  NetBSD/evbarm (IQ80310) booting ...
  Resetting secondary PCI bus...
  initarm: Configuring system ...
 -physmemory: 8192 pages at 0xa0000000 -> 0xa1ffffff
 +physmemory: 8192 pages at 0xa0000000 -\*> 0xa1ffffff
  init subsystems: stacks vectors undefined pmap irq done.
   [ no symbols available ]
  Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
 @@ -110,7 +110,7 @@
  inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
  inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
  clock: hz=100 stathz=0 profhz=0
 -boot device: <unknown>
 +boot device: \*<unknown\*>
  root on fxp0
  nfs_boot: trying DHCP/BOOTP
  nfs_boot: DHCP next-server: 192.168.0.1
 Index: evbarm/prep
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/evbarm/prep,v
 retrieving revision 1.1
 diff -u -r1.1 prep
 --- evbarm/prep	2001/11/30 23:48:52	1.1
 +++ evbarm/prep	2002/01/02 19:46:31
 @@ -69,5 +69,5 @@
  RAM: 0xa0000000-0xa2000000
  FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
  IP: 192.168.0.10, Default server: 192.168.0.1
 -RedBoot> 
 +RedBoot\*>
  .Ed
 Index: hpcmips/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/hpcmips/install,v
 retrieving revision 1.7
 diff -u -r1.7 install
 --- hpcmips/install	2000/10/29 14:08:06	1.7
 +++ hpcmips/install	2002/01/02 19:46:34
 @@ -21,7 +21,7 @@
  failed with a
  .Dq cannot allocate heap
  error, configure more RAM for memory and less for disk with the dialog at
 -[Setting]->[ControlPanel]->[System]->[Memory] under
 +[Setting]-\*>[ControlPanel]-\*>[System]-\*>[Memory] under
  .Tn "Windows CE" .
  .Pp
  .
 Index: macppc/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/macppc/install,v
 retrieving revision 1.16
 diff -u -r1.16 install
 --- macppc/install	2001/08/17 07:04:42	1.16
 +++ macppc/install	2002/01/02 19:46:45
 @@ -51,16 +51,16 @@
  hardware path to a device.  You can find out
  what device aliases Open Firmware has on your machine by typing:
  .Pp
 -.Dl 0 > Ic devalias
 +.Dl 0 \*> Ic devalias
  .Pp
  To get a complete listing of what hardware is recognized by Open
  Firmware, type:
  .Pp
 -.Dl 0 > Ic dev / ls
 +.Dl 0 \*> Ic dev / ls
  .Pp
  To determine if a device is bootable, type:
  .Pp
 -.Dl 0 > Ic dev /path/to/device words
 +.Dl 0 \*> Ic dev /path/to/device words
  .Pp
  If
  .Sq open
 @@ -101,11 +101,11 @@
  .Note)
  All you need to do is:
  .Pp
 -.Dl 0 > Ic boot fd:0
 +.Dl 0 \*> Ic boot fd:0
  .Pp
  You can eject a floppy by typing:
  .Pp
 -.Dl 0 > Ic eject fd
 +.Dl 0 \*> Ic eject fd
  .It
  .Em Ethernet
  .br
 @@ -114,12 +114,12 @@
  .Pp
  You can try the simple form (i.e. that you are booting from ethernet):
  .Pp
 -.Dl 0 > Ic "boot enet"
 +.Dl 0 \*> Ic "boot enet"
  .Pp
  Or you may be more specific,
  specifying the bootloader filename and the kernel name:
  .Pp
 -.Dl 0 > Ic "boot enet:,ofwboot.xcf enet:,netbsd.ram.gz"
 +.Dl 0 \*> Ic "boot enet:,ofwboot.xcf enet:,netbsd.ram.gz"
  .(Note
  Some Open Firmware 1.0.5 machines have their MAC address stored
  incorrectly.  Make sure that your netboot server is using the same MAC
 @@ -138,12 +138,12 @@
  .Pp
  You can try the simple form (i.e. that you are booting from ethernet):
  .Pp
 -.Dl 0 > Ic "boot enet:0"
 +.Dl 0 \*> Ic "boot enet:0"
  .Pp
  Or you may be more specific,
  specifying the bootloader filename and the kernel name:
  .Pp
 -.Dl 0 > Ic "boot enet:0,ofwboot.xcf enet:0,netbsd.ram.gz"
 +.Dl 0 \*> Ic "boot enet:0,ofwboot.xcf enet:0,netbsd.ram.gz"
  .It
  .Em CD-ROM
  .br
 @@ -187,19 +187,19 @@
  disk with the following command (where
  .Pa scsi/sd@3:0
  is the device alias and path to your CD-ROM drive):
 -.Dl 0 > Ic "dir scsi/sd@3:0,\e\"
 +.Dl 0 \*> Ic "dir scsi/sd@3:0,\e\"
  If you have subdirectories, you can examine them as well:
 -.Dl 0 > Ic "dir scsi/sd@3:0,\e\\&subdirectory\e\"
 +.Dl 0 \*> Ic "dir scsi/sd@3:0,\e\\&subdirectory\e\"
  .Pp
  Here are some examples of what you might use to boot from CD-ROM (Apple
  usually sets their CD-ROM drives to SCSI ID 3):
  .Pp
 -.Dl 0 > Ic "boot scsi-int/sd@3:0,OFWBOOT.XCF NETBSD.MACPPC"
 -.Dl 0 > Ic "boot scsi/sd@3:0,OFWBOOT.XCF NETBSD.MACPPC"
 -.Dl 0 > Ic "boot scsi-ext/sd@3:0,OFWBOOT.XCF NETBSD.MACPPC"
 -.Dl 0 > Ic "boot ata/atapi-disk:0,OFWBOOT.XCF NETBSD.MACPPC"
 -.Dl 0 > Ic "boot ide1/disk@0:0,OFWBOOT.XCF NETBSD.MACPPC"
 -.Dl 0 > Ic "boot cd:0,ofwboot.xcf netbsd.macppc"
 +.Dl 0 \*> Ic "boot scsi-int/sd@3:0,OFWBOOT.XCF NETBSD.MACPPC"
 +.Dl 0 \*> Ic "boot scsi/sd@3:0,OFWBOOT.XCF NETBSD.MACPPC"
 +.Dl 0 \*> Ic "boot scsi-ext/sd@3:0,OFWBOOT.XCF NETBSD.MACPPC"
 +.Dl 0 \*> Ic "boot ata/atapi-disk:0,OFWBOOT.XCF NETBSD.MACPPC"
 +.Dl 0 \*> Ic "boot ide1/disk@0:0,OFWBOOT.XCF NETBSD.MACPPC"
 +.Dl 0 \*> Ic "boot cd:0,ofwboot.xcf netbsd.macppc"
  .It
  .Em "IDE or SCSI drive with a"
  .Sq "partition zero"
 @@ -220,13 +220,13 @@
  .Pp
  Here are some examples of what you might use to boot from such a drive:
  .Pp
 -.Dl 0 > Ic "boot scsi-int/sd@0:0"
 -.Dl 0 > Ic "boot scsi/sd@0:0"
 -.Dl 0 > Ic "boot scsi-ext/sd@0:0"
 -.Dl 0 > Ic "boot ata/ata-disk@0:0"
 -.Dl 0 > Ic "boot ata/ATA-Disk@0:0"
 -.Dl 0 > Ic "boot ide0/disk@0:0"
 -.Dl 0 > Ic "boot zip:0"
 +.Dl 0 \*> Ic "boot scsi-int/sd@0:0"
 +.Dl 0 \*> Ic "boot scsi/sd@0:0"
 +.Dl 0 \*> Ic "boot scsi-ext/sd@0:0"
 +.Dl 0 \*> Ic "boot ata/ata-disk@0:0"
 +.Dl 0 \*> Ic "boot ata/ATA-Disk@0:0"
 +.Dl 0 \*> Ic "boot ide0/disk@0:0"
 +.Dl 0 \*> Ic "boot zip:0"
  .It
  .Em "IDE or SCSI drive from an HFS or HFS+ partition"
  .br
 @@ -253,9 +253,9 @@
  drive with the following command (where
  .Pa hd-devalias
  is the device alias and path to your hard drive):
 -.Dl 0 > Ic "dir hd-devalias:,\e\"
 +.Dl 0 \*> Ic "dir hd-devalias:,\e\"
  If you have subdirectories, you can examine them as well:
 -.Dl 0 > Ic "dir hd-devalias:,\e\\&subdirectory\e\"
 +.Dl 0 \*> Ic "dir hd-devalias:,\e\\&subdirectory\e\"
  .Pp
  If bootloader is on a different partition from the
  .Nx
 @@ -268,16 +268,16 @@
  located on an HFS or HFS+ partition (note, you must use the path to the floppy
  image):
  .Pp
 -.Dl 0 > Ic "boot scsi/sd@0:9,ofwboot.xcf scsi/sd@0:9,boot.fs"
 -.Dl 0 > Ic "boot ide0/disk@0:10,ofwboot.xcf ide0/disk@0:9,boot.fs"
 -.Dl 0 > Ic "boot hd:9,ofwboot.xcf hd:9,boot.fs"
 +.Dl 0 \*> Ic "boot scsi/sd@0:9,ofwboot.xcf scsi/sd@0:9,boot.fs"
 +.Dl 0 \*> Ic "boot ide0/disk@0:10,ofwboot.xcf ide0/disk@0:9,boot.fs"
 +.Dl 0 \*> Ic "boot hd:9,ofwboot.xcf hd:9,boot.fs"
  .Pp
  Here are some examples of what you might use to boot a kernel located on the
  same HFS or HFS+ partition as the bootloader (note, you do not specify a 
  path to the kernel name):
  .Pp
 -.Dl 0 > Ic "boot ultra1:9,ofwboot.xcf netbsd.ram.gz"
 -.Dl 0 > Ic "boot hd:10,ofwboot.xcf netbsd.GENERIC.gz"
 +.Dl 0 \*> Ic "boot ultra1:9,ofwboot.xcf netbsd.ram.gz"
 +.Dl 0 \*> Ic "boot hd:10,ofwboot.xcf netbsd.GENERIC.gz"
  .bullet)
  .
  .Ss2 Example of a normal boot
 @@ -295,7 +295,7 @@
   To continue booting, type "mac-boot" and press return.
   To shut down, type "shut-down" and press return.
    ok
 -.No  0 > Ic "boot hd:ofwboot.xcf hd:boot.fs"
 +.No  0 \*> Ic "boot hd:ofwboot.xcf hd:boot.fs"
   loading XCOFF
   tsize=C280 dsize=14AC bsize=2620 entry=600000
   SECTIONS:
 @@ -306,8 +306,8 @@
   loading .data, done..
   clearing .bss, done..

 - >> NetBSD/macppc OpenFirmware Boot, Revision 1.3
 - >> (tsubai@mint.iri.co.jp, Sun Nov 26 01:41:27 JST 2000) 
 + \*>\*> NetBSD/macppc OpenFirmware Boot, Revision 1.3
 + \*>\*> (tsubai@mint.iri.co.jp, Sun Nov 26 01:41:27 JST 2000) 
   1701508+177748 [100+68176+55886]=0x1e9468

    start=0x100000
 @@ -398,9 +398,9 @@
  using the screen and keyboard. The only known workaround is to use a serial
  console (i.e. set your input and output devices to ttya or ttyb).
  .Pp
 -.Dl 0 > Ic "setenv output-device ttya"
 -.Dl 0 > Ic "setenv input-device ttya"
 -.Dl 0 > Ic "reset-all"
 +.Dl 0 \*> Ic "setenv output-device ttya"
 +.Dl 0 \*> Ic "setenv input-device ttya"
 +.Dl 0 \*> Ic "reset-all"
  .It
  .Dq Li "CLAIM failed"
  .Pp
 @@ -422,9 +422,9 @@
  keyboard. The only known workaround is to use a serial console
  (i.e. set your input and output devices to ttya or ttyb).
  .Pp
 -.Dl 0 > Ic "setenv output-device ttya"
 -.Dl 0 > Ic "setenv input-device ttya"
 -.Dl 0 > Ic "reset-all"
 +.Dl 0 \*> Ic "setenv output-device ttya"
 +.Dl 0 \*> Ic "setenv input-device ttya"
 +.Dl 0 \*> Ic "reset-all"
  .It
  .Dq Li "can't OPEN"
  .Pp
 @@ -464,9 +464,9 @@
  in Open Firmware or it got erased by your booting into
  .Tn MacOS .
  .Pp
 -.Dl 0 > Ic "setenv load-base 600000"
 -.Dl 0 > Ic "setenv real-base F00000"
 -.Dl 0 > Ic "reset-all"
 +.Dl 0 \*> Ic "setenv load-base 600000"
 +.Dl 0 \*> Ic "setenv real-base F00000"
 +.Dl 0 \*> Ic "reset-all"
  .It
  After the kernel loads, the first key you press repeats forever
  .Pp
 @@ -526,10 +526,10 @@
  .Sq "partition zero"
  style boot scheme, you would type something like the following:
  .Pp
 -.Dl 0 > Ic "setenv auto-boot? true"
 -.Dl 0 > Ic "setenv boot-device scsi/sd@0:0"
 -.Dl 0 > Ic "setenv boot-file netbsd"
 -.Dl 0 > Ic "reset-all"
 +.Dl 0 \*> Ic "setenv auto-boot? true"
 +.Dl 0 \*> Ic "setenv boot-device scsi/sd@0:0"
 +.Dl 0 \*> Ic "setenv boot-file netbsd"
 +.Dl 0 \*> Ic "reset-all"
  .Pp
  The last command resets the system so that these settings are stored.
  Replace
 @@ -538,16 +538,16 @@
  system tries booting before your hard drive has spun up, you may need to
  also enter something like:
  .Pp
 -.Dl 0 > Ic "setenv boot-command begin ['] boot catch 1000 ms cr again"
 +.Dl 0 \*> Ic "setenv boot-command begin ['] boot catch 1000 ms cr again"
  .Pp
  If you are not using a
  .Sq "partition zero"
  style boot scheme, then you can still plug in all the information you
  need:
  .Pp
 -.Dl 0 > Ic "setenv auto-boot? true"
 -.Dl 0 > Ic "setenv boot-device ide0/disk@0:8,ofwboot.xcf"
 -.Dl 0 > Ic "setenv boot-file ide0/disk@0:13,/netbsd"
 -.Dl 0 > Ic "setenv boot-command boot"
 -.Dl 0 > Ic "reset-all"
 +.Dl 0 \*> Ic "setenv auto-boot? true"
 +.Dl 0 \*> Ic "setenv boot-device ide0/disk@0:8,ofwboot.xcf"
 +.Dl 0 \*> Ic "setenv boot-file ide0/disk@0:13,/netbsd"
 +.Dl 0 \*> Ic "setenv boot-command boot"
 +.Dl 0 \*> Ic "reset-all"
  .Pp
 Index: macppc/prep
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/macppc/prep,v
 retrieving revision 1.22
 diff -u -r1.22 prep
 --- macppc/prep	2001/08/17 07:04:42	1.22
 +++ macppc/prep	2002/01/02 19:47:15
 @@ -181,12 +181,12 @@
  To continue booting, type "mac-boot" and press return.
  To shut down, type "shut-down" and press return.
   ok
 -0 >
 +0 \*>
  .disp)
  .Pp
  Now, set your system to always stop at the Open Firmware prompt.
  .Pp
 -.Dl 0 > Ic "setenv auto-boot? false
 +.Dl 0 \*> Ic "setenv auto-boot? false
  .Pp
  Skip down to the section on
  .Sx Setting up Open Firmware 3 to boot NetBSD
 @@ -221,13 +221,13 @@
  You should now see some introductory text and the Open Firmware command
  prompt on your terminal:
  .Pp
 -.Dl 0 >
 +.Dl 0 \*>
  .Pp
  Your screen will remain black.
  .Pp
  Now, set your system to always stop at the Open Firmware prompt.
  .Pp
 -.Dl 0 > Ic "setenv auto-boot? false
 +.Dl 0 \*> Ic "setenv auto-boot? false
  .Pp
  Skip down to the section on
  .Sx Setting up pre-Open Firmware 3 to boot NetBSD
 @@ -374,11 +374,11 @@
  .(disp
  Open Firmware, 1.0.5
  To continue booting the MacOS type:
 -BYE<return>
 +BYE\*<return\*>
  To continue booting from the default boot device type:
 -BOOT<return>
 +BOOT\*<return\*>
   ok
 -0 >
 +0 \*>
  .disp)
  .Pp
  If your screen is black, then your model does not support using the 
 @@ -392,14 +392,14 @@
  .Dq "Stop Boot at Open Firmware prompt"
  setting is persistent.  It is equivalent to the Open Firmware command
  .Pp
 -.Dl 0 > Ic "setenv auto-boot? false
 +.Dl 0 \*> Ic "setenv auto-boot? false
  .Note)
  .(Note
  Unfortunately, there are a few models that are better off without the System
  Disk patches.  If you find that your machine doesn't boot, then try:
  .Pp
 -.Dl 0 > Ic "setenv use-nvramrc? false"
 -.Dl 0 > Ic "reset-all"
 +.Dl 0 \*> Ic "setenv use-nvramrc? false"
 +.Dl 0 \*> Ic "reset-all"
  .Note)
  .
  .Ss2 Getting to the Open Firmware Prompt (Harder method using MacOS)
 @@ -470,11 +470,11 @@
  .(disp
  Open Firmware, 1.0.5
  To continue booting the MacOS type:
 -BYE<return>
 +BYE\*<return\*>
  To continue booting from the default boot device type:
 -BOOT<return>
 +BOOT\*<return\*>
   ok
 -0 >
 +0 \*>
  .disp)
  .Pp
  If your screen is black, then your model has defaulted to using a serial 
 @@ -487,7 +487,7 @@
  setting is persistent.  Your system will always stop at the Open Firmware
  prompt.  It is equivalent to the Open Firmware command
  .Pp
 -.Dl 0 > Ic "setenv auto-boot? false
 +.Dl 0 \*> Ic "setenv auto-boot? false
  .Note)
  .
  .Ss2 Getting to the Open Firmware Prompt (Without using MacOS)
 @@ -521,11 +521,11 @@
  .(disp
  Open Firmware, 1.0.5
  To continue booting the MacOS type:
 -BYE<return>
 +BYE\*<return\*>
  To continue booting from the default boot device type:
 -BOOT<return>
 +BOOT\*<return\*>
   ok
 -0 >
 +0 \*>
  .disp)
  .Pp
  If your screen is black, then your system has defaulted to using a serial
 @@ -536,7 +536,7 @@
  .Pp
  Now, set your system to always stop at the Open Firmware prompt.
  .Pp
 -.Dl 0 > Ic "setenv auto-boot? false
 +.Dl 0 \*> Ic "setenv auto-boot? false
  .Pp
  To use your on-board video and keyboard, look up the proper
  .Sq output-device
 @@ -552,9 +552,9 @@
  .Sq output-device
  for your model):
  .Pp
 -.Dl 0 > Ic "setenv output-device screen"
 -.Dl 0 > Ic "setenv input-device kbd"
 -.Dl 0 > Ic "reset-all"
 +.Dl 0 \*> Ic "setenv output-device screen"
 +.Dl 0 \*> Ic "setenv input-device kbd"
 +.Dl 0 \*> Ic "reset-all"
  .Pp
  Now you should see the Open Firmware prompt on your screen.
  .Pp
 @@ -574,7 +574,7 @@
  Double-check your Open Firmware version:
  .Pp
  .(disp
 -.No 0 > Ic "dev /openprom .properties"
 +.No 0 \*> Ic "dev /openprom .properties"
  name                    openprom
  model                   Open Firmware, 1.0.5
  relative-addressing
 @@ -589,9 +589,9 @@
  run these commands on Open Firmware 3 machines, as you may overwrite your
  firmware requiring a trip to Apple for repairs.
  .Pp
 -.Dl 0 > Ic "setenv load-base 600000"
 -.Dl 0 > Ic "setenv real-base F00000"
 -.Dl 0 > Ic "reset-all"
 +.Dl 0 \*> Ic "setenv load-base 600000"
 +.Dl 0 \*> Ic "setenv real-base F00000"
 +.Dl 0 \*> Ic "reset-all"
  .Pp
  The last command reboots your machine so that the
  .Li real-base
 @@ -600,7 +600,7 @@
  If you will be netbooting your system, you can look up your MAC address.
  .Pp
  .(disp
 -.No 0 > Ic "dev enet .properties"
 +.No 0 \*> Ic "dev enet .properties"
  [...]
  local-mac-address   CCCCCCCC CCCC
  [...]
 @@ -619,7 +619,7 @@
  .Pa printenv
  command:
  .(disp
 -.No 0 > Ic "printenv"
 +.No 0 \*> Ic "printenv"
  little-endian?      false               false
  real-mode?          false               false
  auto-boot?          false               true
 @@ -657,7 +657,7 @@
  Double-check your Open Firmware version:
  .Pp
  .(disp
 -.No 0 > Ic "dev /openprom .properties"
 +.No 0 \*> Ic "dev /openprom .properties"
  name                    openprom
  device_type             BootROM
  model                   OpenFirmware 3
 @@ -669,7 +669,7 @@
  If you will be netbooting your system, you can look up your MAC address.
  .Pp
  .(disp
 -.No 0 > Ic "dev enet .properties"
 +.No 0 \*> Ic "dev enet .properties"
  [...]
  local-mac-address   CCCCCCCC CCCC
  [...]
 @@ -688,7 +688,7 @@
  .Pa printenv
  command:
  .(disp
 -.No 0 > Ic "printenv"
 +.No 0 \*> Ic "printenv"
  -------------- Partition: common -------- Signature: 0x70 ---------------
  little-endian?      false               false
  real-mode?          false               false
 Index: mvme68k/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/mvme68k/install,v
 retrieving revision 1.14
 diff -u -r1.14 install
 --- mvme68k/install	2001/10/23 22:13:35	1.14
 +++ mvme68k/install	2002/01/02 19:47:27
 @@ -143,7 +143,7 @@
  use
  .Ic halt ,
  then at the Bug monitor prompt use a command like:
 -        	1x7Bug> bo 0,,b:
 +        	1x7Bug\*> bo 0,,b:

  To view this message again, type:  cat /.welcome
  ssh:
 Index: sandpoint/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/sandpoint/install,v
 retrieving revision 1.1
 diff -u -r1.1 install
 --- sandpoint/install	2001/10/24 18:30:35	1.1
 +++ sandpoint/install	2002/01/02 19:47:30
 @@ -11,7 +11,7 @@
  get an idea of what to expect (user-typed commands are in
  .Ic bold No Ns ).
  .(disp
 -.No DINK32>> Ic go 90000
 +.No DINK32\*>\*> Ic go 90000
  [ XXX - insert boot w/ installer on ramdisk instead of this example ]
  .disp)
  .
 Index: sparc/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/sparc/install,v
 retrieving revision 1.43
 diff -u -r1.43 install
 --- sparc/install	2001/11/04 06:00:03	1.43
 +++ sparc/install	2002/01/02 19:47:42
 @@ -420,7 +420,7 @@
  Your client will need installation tools (use
  .Pa installation/netboot/rootfs.tgz ) .
  .Pp
 -.Dl # Ic "gunzip < rootfs.tgz | (cd /export/client/root && tar -xpf -)"
 +.Dl # Ic "gunzip \*< rootfs.tgz | (cd /export/client/root && tar -xpf -)"
  .Pp
  Now, netboot your Sparc from the server by entering the appropriate
  .Ic boot command at the monitor prompt.
 @@ -460,7 +460,7 @@
  distribution sets from
  .Pq Pa binary/sets
  to the tape by using a series of additional
 -.Dl # Ic "dd if=<aset>.tgz of=/dev/nrst0 bs=4k"
 +.Dl # Ic "dd if=\*<aset\*>.tgz of=/dev/nrst0 bs=4k"
  commands.  See also the section
  .Sx Getting the NetBSD System on to Useful Media.
  Be sure to mark the location of these files on the tape; you'll need them
 @@ -471,7 +471,7 @@
  .Pp
  .(tag OpenBoot\ PROM\ 2\ (alternate) -offset indent -compact
  .It sunmon
 -.Li > Ic "b st()"
 +.Li \*> Ic "b st()"
  .It OpenBoot PROM 1
  .Li ok Ic "boot st()"
  .It OpenBoot PROM 2
 Index: sparc64/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/sparc64/install,v
 retrieving revision 1.10
 diff -u -r1.10 install
 --- sparc64/install	2001/11/21 19:14:23	1.10
 +++ sparc64/install	2002/01/02 19:47:55
 @@ -446,7 +446,8 @@
  .
  .Ss2 Installing NetBSD using Solaris
  .
 -These instructions were kindly contributed by Murray Stokely <murray@osd.bsdi.com>
 +These instructions were kindly contributed by
 +Murray Stokely \*<murray@osd.bsdi.com\*>
  .Pp
  .Ss2 Preparing the disk
  The first step is to format and label the disk that you would like to
 @@ -458,7 +459,7 @@
  partition and a swap partition, plus potentially a /usr or /var partitions,
  but of course you can layout the disk however you see fit.
  .Pp
 -.Dl "partition> pr"
 +.Dl "partition\*> pr"
  .Dl " Current partition table (original):"
  .Dl " Total disk cylinders available: 8186 + 2 (reserved cylinders)"
  .Dl " "
 Index: vax/install
 ===================================================================
 RCS file: /cvsroot/basesrc/distrib/notes/vax/install,v
 retrieving revision 1.10
 diff -u -r1.10 install
 --- vax/install	2001/07/24 18:27:09	1.10
 +++ vax/install	2002/01/02 19:47:57
 @@ -68,7 +68,7 @@
  of which VAX you have. To just boot from a device, type
  .Sq Ic B
  at the
 -.Li >>>
 +.Li \*>\*>\*>
  prompt. Device naming in the console monitor differs a lot from the
  .Ux
  counterparts. A device looks like

 ----Next_Part(Wed_Jan__2_20:55:05_2002_022)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline; filename="fixup-html.sh"

 #! /bin/sh

 # $Id: fixup-html.sh,v 1.2 2002/01/02 19:53:58 he Exp $

 #
 # Script to clean up the groff-generated HTML code for
 # the install notes.
 #
 # This makes weblint quiet about the result for all the ports
 # active in NetBSD-1.5.3_ALPHA; tweaks may be needed for other
 # versions.
 #

 sed -e '
     # remove empty elements
     s---g;
     s---g;
     s---g;
     s---g;
     s- --g;
     s---g;
     # replace absolute set to normal size with </font>
     s-<font size="+0">-</font>-g;
     # remove empty (no-op) font settings
     s-<font[^>]*></font>--g;
     # push <p> (and headings) to start of line for ease of later handling
     s-^  *<\([ph12345/]*\)>$-<\1>-;
     # remove font termination at end of document
     s-^</font></body>-</body>-;
     # empty <td> elements
     s-<td><td><td>-<td>-g;
     s-<td><td>-<td>-g;
     # misordered <td> / 
     s-<td>-<td>-g;
     # empty paragraphs
     s-<p></p>--g;
     # empty <td> element
     s-<td>-<td>-g;
 ' | awk '
     # Code to handle empty paragraphs and <p> before <html>
     /^<p>$/{ pseen = 1; next; }
     /^<p>/ { pseen = 0; print; next; }
     /<html>/{ pseen = 0; print; next; }
     /<\/body>/ { pseen = 0; print; next; }
     /<\/pre>/ { pseen = 0; print; next; }
     /<\/font>/ { pseen = 0; print; next; }
     # Undo empty <a> references on deep section nesting
     /<a name="[^"]*"><\/a>/ {
 	if (pseen) { print "<p>"; pseen = 0; }
 	gsub("</a>", "");
 	print;
 	getline;
 	if ($0 ~ /^/) {
 	    print;
 	    print "</a>";
 	} else {
 	    print "</a>";
 	    print;
 	}
 	next;
     }
     # Avoid multiple </html> statements
     /^<\/html>/ { if (!htmlend) { print; htmlend=1; } next; }
     # Substitute double quotes in otherwise non-marked-up lines
     /^[^<>]*"[^<>]*$/ {
 	if (pseen) { print "<p>"; pseen = 0; }
         gsub("\"", "\\&quot;");
 	print $0;
 	next;
     }
     // { if (pseen) { print "<p>"; pseen = 0; } print; }
     END { if (!htmlend) { print "</html>"; }}
 ' | egrep -v '^$'

 ----Next_Part(Wed_Jan__2_20:55:05_2002_022)----

From: Havard Eidnes <he@netbsd.org>
To: wiz@netbsd.org
Cc: mw@blobulent.com, ross@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Tue, 15 Jul 2003 22:22:56 +0200 (CEST)

 > I think that about sums it up.

 Actually, the awk script also goes:

 9) Get rid of <p> within the <pre> context; it's illegal there.

 Regards,

 - H=E5vard

From: Michael Wolfson <michael@nosflow.com>
To: Havard Eidnes <he@netbsd.org>
Cc: wiz@netbsd.org, ross@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Tue, 15 Jul 2003 15:23:53 -0700

 At 10:16 PM +0200 7/15/03, Havard Eidnes wrote:

 :)6) It removes text between <table> and the initial table element, be
 :)   that <th>, <td> or <tr>.  Some of the tables (eh, actually, the
 :)   single table...) have a <br> inserted there, which is illegal.

 I've got a table in the macppc INSTALL notes, and there are also a pile of
 unnecessary &nbsp; between table elements.

 :)> Btw, the macppc pages are supposed to be really badly formatted
 :)> for PostScript, perhaps you want to try your scripts on its
 :)> HTML version? :)
 :)
 :)Heh, maybe.  I think some of the problems mentioned in the orignal PR
 :)went away once the >'s in the text were replaced with proper markup;
 :)the diff which was applied is also part of the PR.

 Yes, that's right.  The macppc INSTALL pages render much better now.  I'm
 mostly satisfied with it, but the task of reaching true HTML compliance is
 a worthy goal.

 Thanks,
   -- MW



From: Havard Eidnes <he@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc: mw@blobulent.com, ross@netbsd.org, wiz@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Tue, 15 Jul 2003 18:00:22 +0200 (CEST)

 ----Next_Part(Tue_Jul_15_18:00:22_2003_006)--
 Content-Type: Text/Plain; charset=iso-8859-1
 Content-Transfer-Encoding: quoted-printable

 Hi,

 I've again been toying with my "munge nroff-generated html code for
 install documentation" script, this time with the aim of actually
 making the result fully validate as standards-compliant HTML 4.01
 Transitional, verified by passing it through the W3C validator at

    http://validator.w3.org/

 While doing so, I found a couple of things which need fixing:

  o doc2html needs to be taught to use <pre>, and not the other
    way around.  <pre> cannot be a child of  according to the DTD
  o the literal html code in common/main which reduces the font size
    before including the "legal mumbo-jumbo" needs to install a "dummy"
    <object> because a <dl> cannot be the child of <font>, again
    according to the DTD

 Diffs for these fixes plus my new fixup-html.sh script which actually
 makes the sparc64 install notes pass the validator without warnings
 follows attached below.

 I'll admit that I'm not certain of the change in .Bd, i.e. whether the
 .if covers both lines or only the single line (not enough nroff macro
 clue in this end) -- feedback desired.

 I've even made a visual diff of the result, compared to the un-munged,
 using phoenix as the web browser, and there are now only minimal
 differences (as opposed to before, where the <p> in <p><li> was remove
 from all entries, as opposed to now where it's only removed from the
 first entry).

 Comments?

 Regards,

 - H=E5vard

 ----Next_Part(Tue_Jul_15_18:00:22_2003_006)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit

 Index: share/tmac/doc2html
 ===================================================================
 RCS file: /cvsroot/src/share/tmac/doc2html,v
 retrieving revision 1.44
 diff -u -r1.44 doc2html
 --- share/tmac/doc2html	2003/07/04 12:20:11	1.44
 +++ share/tmac/doc2html	2003/07/15 15:00:55
 @@ -406,15 +406,15 @@
  .		shift
  .	\}
  .	if \\n[Bd-offset] <dl compact><dt><dd>
 -.	if \\n[Bd-literal] 
 -<pre>\\" HOW DO WE GET RID OF THIS NEWLINE??
 +.	if \\n[Bd-literal] <pre>
 +\\" HOW DO WE GET RID OF THIS NEWLINE??
  .\\*[get-file]
  ..
  .de Ed
  .	DEBUG .tm Ed
 -</pre>
 +
  .	doc-pop .Ed
 -.	if \\n[Bd-literal] 
 +.	if \\n[Bd-literal] </pre>
  .	if \\n[Bd-offset] </dl>
  ..
  .de Bl
 @@ -1471,11 +1471,11 @@
  \&&lt;<font size=-1>CTRL/<font size=+0>\\$*&gt;
  ..
  .de DS
 -<pre>
 +<pre>
  ..
  .de DE
  .	DEBUG .tm DE
 -</pre>
 +</pre>
  ..
  .als Ds DS
  .als De DE
 Index: distrib/notes/common/main
 ===================================================================
 RCS file: /cvsroot/src/distrib/notes/common/main,v
 retrieving revision 1.232
 diff -u -r1.232 main
 --- distrib/notes/common/main	2003/06/05 12:40:23	1.232
 +++ distrib/notes/common/main	2003/07/15 15:15:32
 @@ -1940,12 +1940,12 @@
  .nr save_vs \n[.v]
  .ps 8
  .vs 9
 -.Ht <font size=-1>
 +.Ht <font size=-1><object>
  .(item -compact
  .so ../common/legal.common -----------------------------------------------
  .so legal -----------------------------------------------
  .item)
 -.Ht </font>
 +.Ht </object></font>
  .ps
  .vs
  .Ss "The End"

 ----Next_Part(Tue_Jul_15_18:00:22_2003_006)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 Content-Description: fixup-html.sh
 Content-Disposition: inline; filename="fixup-html.sh"

 #! /bin/sh

 # $Id: fixup-html.sh,v 1.5 2003/07/15 15:54:41 he Exp he $

 #
 # Script to clean up the groff-generated HTML code for
 # the install notes.
 #
 # This makes the w3c validator quiet about the result for sparc64
 # in NetBSD-current as of Jul 15 2003.  Tweaks may be needed for other
 # versions.
 #

 sed -e '
     # remove empty elements
     s---g;
     s---g;
     s---g;
     s---g;
     s- --g;
     s---g;
     # replace absolute set to normal size with </font>
     s-<font size="+0">-</font>-g;
     # remove empty (no-op) font settings
     s-<font[^>]*></font>--g;
     # push <p> (and headings) to start of line for ease of later handling
     s-^  *<\([ph12345/]*\)>$-<\1>-;
     # remove font termination at end of document
     s-^</font></body>-</body>-;
     # empty <td> elements
     s-<td><td><td>-<td>-g;
     s-<td><td>-<td>-g;
     # misordered <td> / 
     s-<td>-<td>-g;
     # misordered <td> / 
     s-<td>-<td>-g;
     # empty paragraphs
     s-<p></p>--g;
     # empty <td> element
     s-<td>-<td>-g;
 ' | awk '
     NR==1 {
 	print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
     }
     # Code to remove <p> in <head> element, and insert charset info
     /<head>/ {
 	print;
 	print "     <meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">";
 	getline;
 	while ($0 !~ /<\/head>/) {
 	    if ($0 !~ /<p>/) { print; }
 	    getline;
 	}
 	print;
 	next;
     }
     # Code to handle empty paragraphs and <p>, before <html>, and within <pre>
     # Also removes <p> before first list element
     /^<p>$/{ pseen = 1; if (preseen) { print " "; pseen = 0; } next; }
     /<html>/{ pseen = 0; print; next; }
     /<\/body>/ { pseen = 0; print; next; }
     /<pre>/ { preseen = 1; print; next; }
     /<\/pre>/ { pseen = 0; preseen = 0; print; next; }
     /<\/font>/ { pseen = 0; print; next; }
     /<\/ul>/ { pseen = 0; print; next; }
     /<dl/ { dlstart = 1; print; next; }
     /<p><dt>/ { if (dlstart) { gsub("<p>", ""); dlstart=0; } print; next; }
     /<dt>/ { if (dlstart) { pseen = 0; } print; next; }
     /<ul/ { liststart = 1; print; next; }
     /<ol>/ { liststart = 1; print; next; }
     /<p><li>/ { if (liststart) { gsub("<p>", ""); liststart=0; } print; next; }
     /<li>/ { if (liststart && pseen) { pseen = 0; } print; next; }
     /^<p>/ { pseen = 0; if (!liststart && !dlstart) { print; } next; }
     # Undo empty <a> references on deep section nesting
     /<a name="[^"]*"><\/a>/ {
 	if (pseen) { print "<p>"; }
 	pseen = 0;
 	gsub("</a>", "");
 	print;
 	getline;
 	if ($0 ~ /^/) {
 	    print;
 	    print "</a>";
 	} else {
 	    print "</a>";
 	    print;
 	}
 	next;
     }
     # eat text before <tr>, <th> or <td> in table
     /<table>/ {
 	if (pseen) { print "<p>"; pseen = 0; }
 	print;
 	getline;
 	while ($0 !~ /<th>/ && $0 !~ /<td>/ && $0 !~ /<tr>/) {
 	    getline;
 	}
     }
     # Avoid multiple </html> statements
     /^<\/html>/ { if (!htmlend) { print; htmlend=1; } next; }
     # Substitute double quotes in otherwise non-marked-up lines
     /^[^<>]*"[^<>]*$/ {
 	if (pseen) { print "<p>"; pseen = 0; }
         gsub("\"", "\\&quot;");
 	print $0;
 	next;
     }
     // { if (pseen) {
 	    if (preseen) { 
 		print " ";
 	    } else {
 		print "<p>";
 	    }
 	     pseen = 0;
 	}
 	print;
     }
     END { if (!htmlend) { print "</html>"; }}
 ' | egrep -v '^$'

 ----Next_Part(Tue_Jul_15_18:00:22_2003_006)----


From: Havard Eidnes <he@netbsd.org>
To: wiz@netbsd.org
Cc: mw@blobulent.com, ross@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Tue, 15 Jul 2003 22:16:51 +0200 (CEST)

 > .if only concerns the line itself.
 > If you want to .if a bigger block, you have to add curly braces:
 > .if something \{
 > foo
 > bar
 > .\}

 Hm, OK.  Let's see if I can find a better fix; I'll probably have to
 reorder the stuff.

 > >     s-<font size=3D"+0">-</font>-g;
 >
 > This looks really strange, since you replace an opening tag
 > with a closing tag. I guess it works for the particular
 > page, perhaps because of the
 > >     s-^</font></body>-</body>-;
 > below, but still...

 Yep.  However, this may be a leftover from the original version where
 I toyed with this, on the netbsd-1-5 branch.  At that time I recall
 there essentially being no </font> entries in the generated HTML, and
 the current output doesn't contain any "<font size=3D"+0">" entries.

 > >     # misordered <td> / 
 > >     s-<td>-<td>-g;
 >
 > The macro that generates them in the wrong order should be
 > fixed, if possible.
 >
 > >     # misordered <td> / 
 > >     s-<td>-<td>-g;
 >
 > Here too.
 >
 > >     # empty <td> element
 > >     s-<td>-<td>-g;
 >
 > And here.

 Agreed.  However, my current nroff macro abilities do not manage to
 spot the appropriate fix in these cases.

 > I didn't really read the awk script, since it doesn't describe
 > why it's doing what it's doing.

 Heh, well, I'll try to explain what it fixes up:

 1) It inserts an appropriate <!DOCTYPE line at the front.
 2) It removes the <p> before <html> which is otherwise there
 3) It inserts a charset specification in the header
 4) It collapses multiple occurrances of <p>, each on a line by itself
    to a single occurrances (that's what the "pseen" variable is about)
    That, however, appears to have been a problem of the past.
 5) Many lists have a <p> between the list opening (<ul>, <ol>, <dl>)
    and the first list element, which isn't allowed.  That's what the
    "dlstart" / "liststart" variables try to do.  The list entries
    themselves can have trailing <p>'s, however, so I leave those alone
    (they appear as <p><li> in the generated output, so the groff
    macros probably thinks it sticks them in at the front of each
    item...)
 6) It removes text between <table> and the initial table element, be
    that <th>, <td> or <tr>.  Some of the tables (eh, actually, the
    single table...) have a <br> inserted there, which is illegal.
 7) Earlier versions had multiple </html> elements, which this script
    sees to becomes only a single such element.  That's a problem which
    is now gone.
 8) It substitutes &quot; for " in lines without any markup.  I think
    this was partly for convenience when I used emacs to view the
    result; some of the install notes have unblanced double quotes, and
    I was using "fontifying"...

 I think that about sums it up.

 > Btw, the macppc pages are supposed to be really badly formatted
 > for PostScript, perhaps you want to try your scripts on its
 > HTML version? :)

 Heh, maybe.  I think some of the problems mentioned in the orignal PR
 went away once the >'s in the text were replaced with proper markup;
 the diff which was applied is also part of the PR.

 > I still hope someone will rewrite doc2html to make use of groff-1.19
 > features, but for now, this looks like a usable workaround.

 OK.

 - H=E5vard


From: Thomas Klausner <wiz@netbsd.org>
To: Havard Eidnes <he@netbsd.org>
Cc: mw@blobulent.com, ross@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: install/13532 the HTML generated for INSTALL.html is atrocious
Date: Tue, 15 Jul 2003 21:07:40 +0200

 On Tue, Jul 15, 2003 at 06:00:22PM +0200, Havard Eidnes wrote:
 > I'll admit that I'm not certain of the change in .Bd, i.e. whether the
 > .if covers both lines or only the single line (not enough nroff macro
 > clue in this end) -- feedback desired.

 .if only concerns the line itself.
 If you want to .if a bigger block, you have to add curly braces:
 .if something \{
 foo
 bar
 .\}

 >     s-<font size="+0">-</font>-g;

 This looks really strange, since you replace an opening tag
 with a closing tag. I guess it works for the particular
 page, perhaps because of the
 >     s-^</font></body>-</body>-;
 below, but still...

 >     # misordered <td> / 
 >     s-<td>-<td>-g;

 The macro that generates them in the wrong order should be
 fixed, if possible.

 >     # misordered <td> / 
 >     s-<td>-<td>-g;

 Here too.

 >     # empty <td> element
 >     s-<td>-<td>-g;

 And here.

 I didn't really read the awk script, since it doesn't describe
 why it's doing what it's doing.

 Btw, the macppc pages are supposed to be really badly formatted
 for PostScript, perhaps you want to try your scripts on its
 HTML version? :)

 I still hope someone will rewrite doc2html to make use of groff-1.19
 features, but for now, this looks like a usable workaround.
 Thanks!
  Thomas


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.