Re: Accessing web with a C program



Keith Thompson wrote:

.... snip ...

Probably the most reasonable way to do this, on most systems, is
to provide a filesystem that's actually implemented on top of an
http interface, mapping URLs to file names somehow (the mapping
could be trivial or not). Some systems already provide hooks to
support this kind of thing. The details of implementing this
kind of thing are, of course, off-topic, but no more so than
implementing a filesystem that provides access to a local hard
drive. Once it's done, fopen() and friends will Just Work.

My PascalP runtime system of 25 years ago (which was also intended
to run C, but I never got around to the C compiler etc.)
implemented this through 7 arrays. The first tied device names to
device numbers. Anything beyond that table was considered to be a
disk file, and routed to the disk file system (if present). The
other 6 tables provided fopen, fclose, fread, fwrite, fstatus, and
fcntrl routine pointers.

With this I could easily tie any device into the system. One was a
LAN, which transmitted (and verified) medical test data to a
central system. Others included xy mapped terminals, terminals
with predetermined entry fields, printers with peculiar
requirements, A/D converters, etc. Everything was controlled by
the ISO standard procedures of Pascal.

Note the sly method of making this topical.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews


.



Relevant Pages