PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFoptionRead

Read an option file.

PASCAL

status = PMDF_option_read (opt_context, filename)

argument information
Argument Data type Access Mechanism
opt_context context pointer write reference
filename descriptor read reference

C

status = PMDFoptionRead

(opt_context, filename, filename_len)

argument information


int PMDFoptionRead(PMDF_opt **opt_context, 
                   char      *filename, 
                   int        filename_len) 


Arguments

opt_context

Pointer to context information generated by PMDFoptionRead.

filename

Full file specification specifying the option file to read. Length can not exceed ALFA_SIZE bytes.

filename_len

Length in bytes of the filename.

Description

PMDFoptionRead is used to read PMDF-style option files. The values for options can then be obtained using the PMDFoptionGetInteger, PMDFoptionGetReal, and PMDFoptionGetString routines. When finished obtaining option values, dispose of the opt_context with a call to PMDFoptionDispose. 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.


Previous Next Contents Index