From owner-freebsd-current Sun Jan 31 08:02:07 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA13335 for freebsd-current-outgoing; Sun, 31 Jan 1999 08:02:07 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA13329 for ; Sun, 31 Jan 1999 08:02:05 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id BAA08762; Mon, 1 Feb 1999 01:01:22 +0900 (JST) Message-ID: <36B47BA6.AA940054@newsguy.com> Date: Mon, 01 Feb 1999 00:49:58 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.5 [en] (Win98; I) X-Accept-Language: pt-BR,ja MIME-Version: 1.0 To: Mike Smith CC: Patrick Hartling , freebsd-current@FreeBSD.ORG Subject: Re: Reading a text file with BTX References: <199901311502.HAA06566@dingo.cdrom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'd like to suggest that nobody depends on the exact syntax below. Using "@" at the beginning of the lines is EVIL, and has to go away. Well, for *this* purpose, at least. Likewise, - at the beginning of the line is also very evil. Very, very evil. I have now, at last, a fully working version of "include" for forth source code. With that, we are finally able to actually *use* ficl in loader.rc and the likes. The down side, of course, is that we ought to stop treating things included as special cases of "builtin only" with special semantics. We get more power, but a few concessions must be mude. Specifically, "@", "#" and "-". Mike Smith wrote: > > Perhaps try something like: > > @set kernelname=kernel > @read -t 5 -p "Enter kernel name [kernel] : " kernelname > @load $kernelname > @include /boot/modules.default > -include /boot/modules.$kernelname > @autoboot 5 > > The 'include' commands make it easier to keep your module sets > organised, should you want to do that. And include is also recursive. Or, at least, it should be. :-) There is something smelly with the way errors are being treated, though it might not show up in the current version because it's recursive chain doesn't include bf_run(). Anyway, the above could be coded like this in my current version of loader: \ loader.rc \ <-- This is the new character for comments set kernelname=kernel \ Don't echo is now default read -t 5 -p "Enter kernel name [kernel] : " kernelname load ${kernelname} \ I thought {} was required include /boot/modules.default ~ include /boot/modules.$kernelname \ And this is the new way \ of ignoring errors autoboot 5 But the bottom line is that @#- are evil and must go away. :-) I even thought of preemptively removing then from loader.help, so nobody would get used to them... :-) -- Daniel C. Sobral (8-DCS) dcs@newsguy.com Would you mind not shooting at the thermonuclear weapons? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message