![]() |
OUFINF |
Equivalent PK functions: |
PK_PART_receive_version PK_PARTITION_receive_version PK_SESSION_receive_version |
OUFINF ( nchars, filnam, guise, format, selcod, ival, rval, string, nstrng, ============================================================================ ifail ) ======= Output information about the specified file Receives: KI_int_nchars *nchars --- number of characters in filename KI_chr_filename filnam[nchars] --- filename int *guise --- what sort of file it is int *format --- text or binary KI_cod_slfi *selcod --- selection code specifying what --- information is wanted Returns: int *ival --- returned information (integer) double *rval --- not yet used char string[nstrng] --- not yet used <KI_int_nchars> *nstrng --- not yet used KI_cod_error *ifail --- error code Specific errors: KI_corrupt_file file header not as expected bad header to file KI_file_access_error unexpected file access error KI_cant_find_file cannot find file KI_bad_filename invalid filename KI_wrong_format wrong format for specified guise KI_file_read_corruption corrupt data read, perhaps an NFS problem KI_schema_access_error file referred to non existent schema KI_applio_not_registered application i/o functions not registered KI_cant_open_file cannot open file KI_bad_file_format invalid value given for format KI_bad_file_guise invalid value given for guise Description: Currently, the only acceptable value for 'selcod' is SLFIVN (SLFI_VersioN), which causes OUFINF to return the modeller version number under which the file was generated: this is returned as an integer value in 'ival'. 'nchars', 'filnam', 'guise', 'format' should correspond to the parameters expected by the Frustrum function FFOPRD The following table gives the appropriate 'guise' and 'format' for the types of file for which OUFINF can be used :- guise format ----- ------ C-text-snapshot file FFCSNP FFTEXT C-binary-snapshot file FFCSNP FFBNRY C-journal file FFCJNL FFTEXT C-binary-transmit file FFCXMT FFBNRY C-text-transmit file FFCXMT FFTEXT Fortran-binary-transmit file FFCXMO FFBNRY Fortran-text-transmit file FFCXMO FFTEXT C-binary-Schema files FFCSCH FFBNRY C-text-Schema files FFCSCH FFTEXT Note that OUFINF does NOT verify that the contents of the file are correct, although it will return error KI_corrupt_file if the header information is not as expected. This error will also arise if the file does not match the guise and format specified; for example, if you try to open a Fortran transmit file using the guise for a C-transmit file.