pub unsafe extern "C" fn cqdb_writer(
    fp: *mut FILE,
    flag: c_int
) -> *mut cqdb_writer_t
Expand description

Create a new CQDB writer on a seekable stream.

This function initializes a database on the seekable stream and returns the pointer to a ::cqdb_writer_t instance to write the database. The stream must have the writable and binary flags. The database creation flag must be zero except when the reverse lookup array is unnecessary; specifying ::CQDB_ONEWAY flag will save the storage space for the reverse lookup array. Once calling this function, one should avoid accessing the seekable stream directly until calling cqdb_writer_close().

@param fp The pointer to the writable and seekable stream. @param flag Database creation flag. @retval cqdb_writer_t* The pointer to the new ::cqdb_writer_t instance if successful; otherwise \c NULL.