PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFoptionGetString

Get the value of an string-valued option from an option file.

PASCAL

status = PMDF_option_get_string

(opt_context, name, value, value_len)

argument information
Argument Data type Access Mechanism
opt_context context pointer read value
name descriptor read reference
value descriptor read/write reference
value_len unsigned word write reference

C

status = PMDFoptionGetString

(opt_context, name, name_len, value, value_len, max_len)

argument information


int PMDFoptionGetString(PMDF_opt *opt_context, 
                        char     *name, 
                        int       name_len, 
                        char     *value, 
                        int      *value_len, 
                        int       max_len) 


Arguments

opt_context

Pointer to context information generated by a previous call to PMDFoptionRead.

name

Name of the option to obtain the value of. Name can not exceed a length in bytes of SHORT_ALFA. Option names are treated as case insensitive strings.

name_len

Length in bytes of the option name.

value

Value of the specified option. String must be large enough to receive at least BIGALFA_SIZE+1 bytes.

value_len

Length in bytes of the returned value.

max_len

The maximum length in bytes of value, not including any NULL terminator.

Description

PMDFoptionGetString returns in value the value of the specified option. If the option was not specified in the option file or if opt_context is zero (nil), then the content of value and value_len is left unchanged.

Return Values

PMDF__OK Normal, successful completion.
PMDF__FATERRLIB Call to LIB$SCOPY_R_DX failed owing to a fatal internal error in the OpenVMS Run Time Library. No value returned.
PMDF__INSVIRMEM Insufficient virtual memory: call to LIB$GET_VM made by LIB$SCOPY_R_DX has failed. No value returned.
PMDF__INVSTRDES Invalid string descriptor for either name or value or both: descriptor for one or both has an invalid value in its DSC$B_CLASS field. No option value returned.
PMDF__STRTRU Supplied value string was too short. Option value truncated to fit in value.
PMDF__STRTRUERR Supplied name string exceeds the maximum permitted length. No option value returned.


Previous Next Contents Index