Previous | Next | Contents | Index |
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(PMDF_opt **opt_context, char *filename, int filename_len) |
opt_context
Pointer to context information generated byPMDFoptionRead
.filename
Full file specification specifying the option file to read. Length can not exceedALFA_SIZE
bytes.filename_len
Length in bytes of the filename.
PMDFoptionRead
is used to read PMDF-style option files. The values for options can then be obtained using thePMDFoptionGetInteger
,PMDFoptionGetReal
, andPMDFoptionGetString
routines. When finished obtaining option values, dispose of the opt_context with a call toPMDFoptionDispose
. 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.
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.
Previous | Next | Contents | Index |