Hi Thomas,
On 15/01/2005, you wrote:
It's actually very simple: You know that some functions like open return an integer as the file descriptor ? Normally, the C library keeps an array of structures that describe open files, and the int returned by open is used as an index into that array. The array keeps the "real" file handles, for example, it could be an array of BPTRs for DOS with the DOS file handles.
The csh code uses this array, copying stdin and stdout (which are normally index 0 and 1). Of course, this is nor portable, since every C library names this array differently, and uses a different layout of the array and structures. So basically, it's accessing internal data structures of the C library, which can't be easily ported over...
I see, so this version of csh depends on internal SAS runtime library structures. That doesn't sound too hard to fix (is that being naive?).
Anyway, we have a working binary at the moment, so making the source more portable does not seem like an urgent problem.
cheers