[net.micro.6809] help with listc.c program

stoner@qumix.UUCP (David Stone) (11/30/84)

Hello,sorry to post this to the net but I lost the address of the person
that listed the listc.c utility.PLEASE DON'T FLAME ME !!! :-)


     In trying to compile your listc.c program I found out that I don't
have #include files:<sys/types.h> and <sys/stat.h>. What I was wondering
was,are these standard include files that you renamed or newer created 
files that aren't? 

    If they aren't standard files could you send me these files via mail?

    Thanks in advance 

p.s. I probably should mention that I'm using a GIMIX system running OS9
     level II and a Microware 'C' compiler.Any response would be appreciated.

stoner@qumix
David A. Stone
Qume Corp.
San Jose,Calif.

emjej@uokvax.UUCP (12/04/84)

/***** uokvax:net.micro.6809 / qumix!stoner /  8:19 am  Dec  1, 1984 */
     In trying to compile your listc.c program I found out that I don't
have #include files:<sys/types.h> and <sys/stat.h>. What I was wondering
was,are these standard include files that you renamed or newer created 
files that aren't? 

    If they aren't standard files could you send me these files via mail?
/* ---------- */

I post this in case others could use the info:

<sys/stat.h> contains the moral equivalent of a subset of what Microware C
users will find in <direct.h> and <modes.h>, namely what corresponds to
the stuff in the file descriptor sector, along with the values for various
access modes. <sys/types.h> contains typedefs and such for Unix system
internals, some of which are used in <sys/stat.h>.

Therefore, you don't need copies of them; just include <direct.h> and
<modes.h>.

Now, the author of listc.c may have used stat() or fstat() (net.sources
is locked here, so I don't know). The OS-9 operation that corresponds to
that is a GetStat 14 (read file descriptor sector). Unfortunately, it's
not documented in some versions of the manuals; look in <os9.h> or
OS9Defs (I think--it's the file with all the defines for system calls,
error codes, etc.; among them are the S$*, which are the Get/SetStat
codes). Note that this doesn't correspond exactly to fstat(), since you
have to have the file open (you specify it by path number, not by name).

						James Jones

emjej@uokvax.UUCP (12/09/84)

[It was, of course, Jascha Heifetz...]

/***** uokvax:net.micro.6809 / emjej /  8:39 am  Dec  4, 1984 */
Now, the author of listc.c may have used stat() or fstat() (net.sources
is locked here, so I don't know). The OS-9 operation that corresponds to
that is a GetStat 14 (read file descriptor sector).
/* ---------- */

I lose. It's 15, not 14. Recommendation: include <os9.h> and use the
#define, which is SS_FD, I think.

						James Jones