Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jan 1999 02:23:45 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Joe Abley <jabley@clear.co.nz>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: FICL and setting BTX variables 
Message-ID:  <199901111023.CAA88602@dingo.cdrom.com>
In-Reply-To: Your message of "Mon, 11 Jan 1999 21:05:58 %2B1300." <19990111210558.A29444@clear.co.nz> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > 
> > I'm not sure about the whole softwords/help text munging thing.  Using 
> > Perl scripts is bad for various reasons, but I'm not sure that I want 
> > to go to having committed generated files (like the kernel uses) or the 
> > other way to compiled special-purpose tools.  Anyone handy with awk 
> > want to try fixing these - both would probably succumb to the awesome 
> > power of awk.
> 
> Eh? <wakes up at mention of awk>
> 
> If someone needs some awk writing, and can describe clearly what needs
> doing, I'll do it.

There are two separate tasks, each with their own interesting 
requirements.  The easiest way to understand them is probably to look 
at what the current perl scripts are doing.  The first transforms the 
Forth softwords files into a large string array, stripping all the 
unnecessary bits; that's /sys/boot/ficl/softwords/softcore.pl.

Run it as per the Makefile to see the output it produces; inferring the 
rules from that should be pretty straightforward.

The second task is to construct a unified, sorted helpfile from two 
input files.  The helpfiles consist of records delimited thus:

##...
# T<topic> [S<subtopic>] D<multiword description>
...data
#

The records from each of the two files need to be sorted into topic 
order, with every subtopic record sorted in following its topic record, 
eg.

Tfoo
Tfoo Sbar
Tfoo Sbaz
Tfish
...

The input files are /sys/boot/common/help.common and 
/sys/boot/i386/loader/i386.help (i386) or
/sys/boot/alpha/boot2/alpha.help (alpha).

I can help more with syntax, examples etc. if you're interested.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901111023.CAA88602>