next up previous contents
Next: cifFree Up: CIFLIB File Access Functions Previous: CIFLIB File Access Functions

cifInit

NAME cifInit

PROTOTYPE

#include "ciflib.h"

int cifInit(const char *ddlFilename,
            const int   verify,
            const int   verbose)
PURPOSE

cifInit performs all initialization functions for CIFLIB. This function must be called before any other CIFLIB functions. cifInit reads the named DDL file and optionally performs data integrity checks on this file with respect to the DDL 2.1 vocabulary. Normally, cifInit is called to read the DDL and to build the schema into which a dictionary can be loaded. A CIF dictionary is then read using cifReadFile and specifying the DDL as the validation dictionary. Data files are then read using cifReadFile and specifying the CIF dictionary as the validation dictionary. The value of the verify argument determines if integrity processing is performed in all subsequent read operations. If the verbose argument is selected then CIFLIB will generate informational messages describing its internal operations.

RECEIVES

 
Figure 1:  Functional diagram of CIFLIB
ddlFileName path name of DDL file
verify a non-zero value activates integrity checking
verbose a non-zero value activates verbose output of diagnostic and informational messages from all library functions

RETURN VALUE

Returns 1 if the function could successfully parse the input DDL file, or 0 if an unrecoverable parsing error occurs. Even if the file is successfully parsed, warning and error messages may exist which can be examined using the routines described in Section 2.14. cifInit returns the following additional codes:

CIF_ALLOCATION_FAILURE memory allocation error
CIF_NOT_EXIST missing DDL file
CIF_OPERATION_DISALLOWED miscellaneous error
CIF_OPERATION_PERMISSION_DENIED file permission error

REMARKS

See also: cifFree
  cifReadFile


next up previous contents
Next: cifFree Up: CIFLIB File Access Functions Previous: CIFLIB File Access Functions
Olivera Tosic
6/17/2002