montanaro@GE-CRD (03/20/85)
Has anyone out there written a version of the 'stat' library routine for DEC C (VMS)? We are writing code that needs to check the file access permissions, but we would like it to be as portable as is reasonable. We don't need a complete implementation -- the impression I have is that DEC did not implement it because they couldn't do it perfectly. Thanks in advance. Skip Montanaro ARPA: montanaro @ ge-crd
cabral@lll-crg.ARPA (Brian Cabral) (03/20/85)
Skip, I have looked into that very problem and will have to eventually write one for the VMS version of the EMACS I am hacking on. I suspect someone has written one for the emacs you have since emacs checks the status of a file at some point. Stat can NOT be fully implemented by definition of the stat data structure which returns information about the inode which makes no since to VMS. So what you needs to be done is a routine that only fills in the part that it can othereise either ignores the call or returns a warning error. Actually the routine doesn't seem to hard to write because RMS should provide most of the info like last access time etc. If I was you I'd look thru the EMACS code to see if it calls stat and if there is hacked version there. Also I might write Bruce Dawson(i think he's at CCA) since he almost certainly would know where you could get a routine such as stat for VMS. B.c.
ndiamond@watdaisy.UUCP (Norman Diamond) (03/21/85)
From net.lang.c, but it fits net.jokes: > Has anyone out there written a version of the 'stat' library > routine for DEC C (VMS)? > -- the impression I have is that DEC did not > implement it because they couldn't do it perfectly. If DEC only implemented stuff they could do perfectly, we would never have heard of DEC. -- Norman Diamond UUCP: {decvax|utzoo|ihnp4|allegra}!watmath!watdaisy!ndiamond CSNET: ndiamond%watdaisy@waterloo.csnet ARPA: ndiamond%watdaisy%waterloo.csnet@csnet-relay.arpa "Opinions are those of the keyboard, and do not reflect on me or higher-ups."