delorie.com/archives/browse.cgi | search |
From: | "Edmund Horner" <ejrh AT paradise DOT net DOT nz> |
Newsgroups: | comp.os.msdos.djgpp |
References: | <icsmusk3dhkau8p8g28a38p0qhh23ujpcg AT 4ax DOT com> |
Subject: | Re: Guru Question!! |
Lines: | 48 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
Organization: | Paradise Net |
Message-ID: | <971755261.616651@shelley.paradise.net.nz> |
Cache-Post-Path: | shelley.paradise.net.nz!unknown AT 203-79-65-99 DOT tnt8 DOT paradise DOT net DOT nz |
X-Cache: | nntpcache 2.4.0b5 (see http://www.nntpcache.org/) |
Date: | Tue, 17 Oct 2000 17:01:45 +1300 |
NNTP-Posting-Host: | 203.96.152.26 |
X-Complaints-To: | newsadmin AT xtra DOT co DOT nz |
X-Trace: | news.xtra.co.nz 971755262 203.96.152.26 (Tue, 17 Oct 2000 17:01:02 NZDT) |
NNTP-Posting-Date: | Tue, 17 Oct 2000 17:01:02 NZDT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Yes, there are at least two ways of doing this. 1. I think there's a file-system extension mechanism in DJGPP that's intented to allow a more Unix-like flexibility. Run: "info libc fun file file" for more infomation. 2. Another way would be to make a few wrapper functions for file access. When these functions are called on normal files, they simply call the existing DJGPP file functions. When called on "memory files", they do what you want them to do, i.e. access that memory. I am not sure that it's worth your while trying all this, except that of course you're likely to gain a lot of experience. Edmund. "Radical NetSurfer" <radsmail AT juno DOT com> wrote in message news:icsmusk3dhkau8p8g28a38p0qhh23ujpcg AT 4ax DOT com... > Paging all DJGPP Guru's! > > Is the following possible ?? > > Creating a buffer dynamically with malloc at runtime > which is then able to be treated > as if it were actually > a > > FILE* openfile("ram_buffer","rb"); > [i.e. AFTER this operation actually takes place] > > SUCH THAT > > any and all file i/o functions could be used on that > __buffer__ even though its actually something that is created > in RAM at runtime? > [treated as if it were the contents of a file referenced with FILE*, > etc.] > > Is there some kind of emulation for this kind of operation > even though FILE I/O isn't what it might be called? > > ANY discussion appreciated.... > > email: radsmail AT juno DOT com > http://members.tripod.com/~RadSurfer/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |