home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!EQL.CALTECH.EDU!rankin
- From: rankin@EQL.CALTECH.EDU (Pat Rankin)
- Newsgroups: comp.os.vms
- Subject: Re: Convert VMS condition value to errno code.
- Message-ID: <920729181505.234012f1@EQL.Caltech.Edu>
- Date: 30 Jul 92 01:15:42 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 18
-
- > Is there a function in the VAXC-library that converts a VMS condition
- > value the corresponding errno value?
-
- Yes, but you probably shouldn't use it. If you look in tables
- B-1 and B-2 in Appendix B of the _VAX_C_Run-Library_Reference_Manual_
- you'll find C$$TRANSLATE(). It sets `errno' rather than returning the
- converted value. However, it is only available if you link with object
- library VAXCRTL.OLB, not if you link with shareable image VAXCRTL.EXE.
-
- It's much simpler to use
- errno = EVMSERR;
- vaxc$errno = your_condition_value;
- than to worry about matching up miscellaneous codes. perror() will give
- two lines though, the first being "non-translatable VMS error code" or
- something close to that.
-
- Pat Rankin, rankin@eql.caltech.edu
-
-