home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!miclon!nreadwin
- From: nreadwin@micrognosis.co.uk (Neil Readwin)
- Newsgroups: comp.os.vms
- Subject: Re: Problem with file open detection
- Message-ID: <BzqDzu.2pu@micrognosis.co.uk>
- Date: 23 Dec 92 21:21:29 GMT
- References: <1992Dec23.024625.20490@ee.ubc.ca> <1h9rbcINN1c9@gap.caltech.edu>
- Sender: news@micrognosis.co.uk
- Organization: Micrognosis, a division of CSK(UK) Ltd
- Lines: 24
-
- In article <1h9rbcINN1c9@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
- |> (I thought there was a "vmserr" variable, but a quick look at HELP CC
- |> RUN didn't show it [...]
-
- Close, it's vaxc$errno. A C routine with a similar function to yours would
- be:
-
- #include <stdio.h>
- #include <rmsdef.h>
- #include <errno.h>
-
- int is_open(char *file_spec) {
- int x;
- FILE *f = fopen(file_spec, "a");
-
- x = ((f == NULL) && (errno == EVMSERR) && (vaxc$errno == RMS$_FLK));
- if (f) fclose(f);
- return x;
- }
-
- Neil.
- --
- Phone: +44 71 815 5283 E-mail: nreadwin@micrognosis.co.uk
- Anything is a cause for sorrow that my mind or body has made
-