| read_idf (1) | UDF PROGRAMMERS MANUAL | read_idf (1) |
|---|
SYNOPSIS
| #include "libbase_udf.h" | ||
| ByTe_2 | read_idf | (u_ByTe_4 Key, ByTe_1 *Ext, u_ByTe_2 Ver, ByTe_1 *Var, ByTe_2 Quan, ByTe_2 Num, ByTe_4 Start, ByTe_2 NumV); |
INPUT DEFINITIONS
| Key | - | UDF data key |
| Ext | - | UDF file extension |
| Ver | - | Version number |
| Var | - | Output variable holding the returned VIDF data |
| Quan | - | The VIDF field to return |
| Num | - | The VIDF table or constant number valid only if table or constant data is being returned |
| Start | - | If the field is an array field, this is the offset into the array at which to begin acquisition |
| NumV | - | If the field is an array field, this is the number of elements to return. -1 is used to return full array. |
DESCRIPTION read_idf() accesses data fields from the VIDF identified with Key and Ver and returns the data in the variable Var. The field being returned is specified in Quan using the identifiers listed in the last column of the VIDF description tables. If retrieved field is an array quantity then the returned values can be any subset of the array. Start indicates the beginning position in the array at which to return data and NumV is the number of values to return. A NumV of -1 will cause all values up to an including the last value in the array to be returned.
If the quantity being returned is a field in either a TABLE or CONSTANT block then Num specifies which TABLE or CONSTANT the field is to be taken from.
It is the responsibility of the caller to ensure that Var is of sufficient size to hold all of the returned data.
Under normal conditions Ext should be set to a NULL string. Setting Ext to a non-NULL string will cause the file_pos routine to attempt to use the appropriate named UDF header and data files but with the string .Ext appended to it. The file must exist in the current working directory.
RETURN VALUE On success, ALL_OKAY is returned, otherwise an error code is returned.
ERRORS IDF_NOT_FOUND No opened file (file_open not called?) IDF_MANY_BYTES Requested more elements from array than exists. IDF_NO_ENTRY Requesed data not available IDF_TBL_NUM Requested table number larger than tables available IDF_CON_NUM Requested constant number larger than constants available
APPLICABLE FORMATS UDF V2.2, IDFS V2.1
RESTRICTIONS None.
SEE ALSO ret_codes(1H) idf_defs(1)
| UDF V2.2 | July 31, 1999 | UDF V2.2 |
|---|