Read an option file.
argument informationstatus = PMDF_option_read (opt_context, filename)
| Argument | Data type | Access | Mechanism |
|---|---|---|---|
| opt_context | context pointer | write | reference |
| filename | descriptor | read | reference |
argument informationstatus = PMDFoptionRead
(opt_context, filename, filename_len)
int PMDFoptionRead (opt_context, filename, filename_len)
PMDF_opt **opt_context;
char *filename;
int filename_len;
opt_context
Pointer to context information generated by PMDF_option_read.filename
Full file specification specifying the option file to read. Length may not exceed ALFA_SIZE bytes.filename_len
Length in bytes of the filename.
PMDF_option_read is used to read PMDF-style option files. The values for options may then be obtained using the PMDF_option_get_integer, PMDF_option_get_real, and PMDF_option_get_string routines. When finished obtaining option values, dispose of the opt_context with a call to PMDF_option_dispose. Note that when no option file exists or the file contains no entries, the returned value for opt_context will be zero (nil). It is okay to pass a zero value for opt_context to the other routines which accept opt_context. This allows a program to blindly call the various option routines without regard to whether or not an option file exists.Return Values
| PMDF__OK | Normal, successful completion. |
| PMDF__DONE | Normal, successul completion. No option file existed. |
| PMDF__INVSTRDES | Invalid string descriptor for filename: descriptor has an invalid value in its DSC$B_CLASS field. Option file not processed. |
| PMDF__NO | Error reading option file; most likely means that there is a syntax error in the option file. |
| PMDF__STRTRUERR | Supplied filename string exceeds the maximum permitted length. Option file not processed. |