Hi,
Here's Olaf's anser for regarding the NameFromFH thingy...
If you have a file handle, can't you duplicate it with DupLock ?
Regards,
On 2005-01-20, Thomas Frieden wrote:
Hi,
Here's Olaf's anser for regarding the NameFromFH thingy...
Thanks. That clarifies things a bit. I will just have to work around it. (Not a big thing, but it will be a bit more work)
If you have a file handle, can't you duplicate it with DupLock ?
Unfortunately, no. I wanted to minimise the effort and the easiest way would have been if there was a simple, compiler-portable way of creating a stdio FILE from a BPTR returned from Open().
-Peter aka. Archprogrammer
Reality is for people who cannot face ScienceFiction. Only lefthanded people are in their right minds.
Hi Peter,
On 20/01/2005, you wrote:
If you have a file handle, can't you duplicate it with DupLock ?
Unfortunately, no. I wanted to minimise the effort and the easiest way would have been if there was a simple, compiler-portable way of creating a stdio FILE from a BPTR returned from Open().
Could you not just make an array of type FILE *[], indexed by the integer form of stdin/out/err? You would have to fill in the three values provided, and allow room for later additions.
cheers
On 2005-01-20, Tony Wyatt wrote:
Hi Peter,
On 20/01/2005, you wrote:
<SNIP>
Could you not just make an array of type FILE *[], indexed by the integer form of stdin/out/err? You would have to fill in the three values provided, and allow room for later additions.
That would not take care of e.g.:
fh=Open(any_file,MODE_NEWFILE); fp=FILE_from_fh(fh);
But as I said, it is not that great a problem - I was mostly trying to save myself a bit of work. :-)
-Peter aka. Archprogrammer
Reality is for people who cannot face ScienceFiction. Only lefthanded people are in their right minds.