[Coco] (Nitr)OS-9 and path numbers in MWC

Jeff Teunissen deek at d2dc.net
Mon Dec 4 08:36:06 EST 2006


A question for the OS-9 guys. :) I'm modifying the Vu program to be able to
use stdin as the input file (a la "less" in *nix), and I was wondering if I
could do the following [pseudocode] like I would in *nix:

infile = dup (0);	/* stdin */
close (0);		/* close stdin */
ignored = dup (1);	/* fd 0 now a duplicate of 1 (stdout) */

and then read from the infile just like "Vu" while taking user input from the
new fd 0.

Obviously there'd be no ability to seek backwards on an SCF file, so some of
that code would have to be modified as well to use memory, or write the input
to a temp file on a RAM disk or /DD/TEMP or something.

Also, has anyone thought of using a per-user data module for mocking up an
environment space? Say, an 8K module named ENV<uid> that would be read from a
random or sequential file by the Shell (or LOGIN, on multi-user systems) to
hold shell variables like the PATH, Multi-Vue information, the user's "home"
directory, etc.

-- 
| Jeff Teunissen -=- Pres., Dusk To Dawn Computing -=- deek at d2dc.net
| GPG: 1024D/9840105A 7102 808A 7733 C2F3 097B 161B 9222 DAB8 9840 105A
| Core developer, The QuakeForge Project     http://www.quakeforge.net/
| Specializing in Debian GNU/Linux           http://www.d2dc.net/~deek/



More information about the Coco mailing list