VGetInputFiles
Name
VGetInputFiles - reads the files from the GLOBAL.COM file.
Synopsis
VGetInputFiles(files, num_of_files, opt, type_mask)
FileInfo **files; /*RETURN*/
int *num_of_files; /*RETURN*/
int opt, type_mask;
Description
VGetInputFiles reads the files from the GLOBAL.COM file. Opt can be
SINGLE_FILE or MULTIPLE_FILES to read one file or multiple files. If opt
is neither of these, VGetInputFiles prints the proper message to the standard
output device and exits from the current process. If GLOBAL.COM does not
exist, then VGetInputFiles returns an error. If opt is SINGLE, VGetInputFiles
returns the first valid file information to files and 1 to num_of_files.
If opt is MULTIPLE, VGetInputFiles returns all valid files information to
files and the number of files to num_of_files. If structure files are
requested, plan files referring to the same type of structures are also
returned.
Structures
typedef struct {
char filename[30]; /*input filename*/
short num_of_elem; /*the no. of elem. in min/max arrays(sd-2)*/
short *min; /*the min no. of n-1 scenes for each n*/
short *max; /*the max no. of n-1 scenes for each n*/
short *incr;
} FileInfo;
Return Value
0 - work successfully.
1 - memory allocation error.
2 - read error.
4 - file open error.
Parameters
files - returns a pointer to an array of structure FileInfo. The caller
should free this after use; first free the min, max and incr
pointers for each scene file.
num_of_files - returns the number of files in the array files.
opt - specifies the single or multiple files to be returned in the
filename array; SINGLE_FILE - returns the first valid file to files;
MULTIPLE_FILES - returns all the valid files to files.
type_mask - specifies the data type mask. This type is the bitwise OR of
one or more of the valid data type mask bits. The data type mask bits
are defined in <3DVIEWNIX.H> :
IM0 - scene of type IMAGE0
CIM - scene of type IMAGE0 with cubic cell
MV0 - display data of type MOVIE0
BIM - binary scene of type IMAGE0
CBI - scene of type IMAGE0 with cubic cell
SH0 - structure data of type SHELL 0
BS0 - structure data of type binary SHELL0
CV0 - structure data of type CURVE0
S03 - structure data of type SURFACE0 for 3D
S04 - structure data of type SURFACE0 for 4D
SH1 - structure data of type SHELL1
BS1 - structure data of type binary SHELL1
S13 - structure data of type SURFACE1 for 3D
Side Effects
None.
Entry Conditions
None.
Related Functions
None.