VCloseData


Name

VCloseData - closes the data file which was opened for writing.

Synopsis

VCloseData(fp)
FILE *fp;

Description

VCloseData writes the group length for the data group (SCENE, STRUCTURE, or DISPLAY), message length for the COMMAND group and IDENTIFICATION groups and closes the data file. VCloseData should be called to close a disk file after data has been written to it using the 3DVIEWNIX protocol.

Return Value

0 - work successfully.
2 - read error.
3 - write error.
5 - improper seeks.
100 - incorrect 3DVIEWNIX file header format.

Parameters

fp - a pointer to the output data file.

Side Effects

None.

Entry Conditions

If fp is NULL, VCloseData prints an error message to the standard error stream, produces a core dump file, and exits from the current process.

Related Functions

VWriteHeader, VWriteData.