Huge File Creation ExampleThis example demonstrates creation of ISAM files supporting 8-byte file addresses. For simplicity, it uses a single data file with a single index with a single segment. /* define extended file attributes */ XCREblk creblks[2] = {
{ ctFILEPOS8, /* x8mode: support HUGE data file */
0, 0, 0, 0, 1048576}, /* lxtsiz: 1MB file extensions */ { ctFILEPOS8, /* x8mode: support HUGE index file */
0, 0, 0, 0, 1048576} /* lxtsiz: 1MB file extensions */ };
ISEG seg = { 4, 6, 0};
/* Note that the segment is 6 bytes, but the key allows * duplicates, so the key length is 14, allowing 8 bytes * for the offset tiebreaker. */
ctSHARED | ctVLENGTH | ctTRNLOG, 1, 0, ctSHARED | ctVIRTUAL | ctTRNLOG, &idx}; InitISAM(10,5,32); /* Initialize c-tree Plus */
CreateIFileXtd8( &fil, NULL, NULL, 0L, NULL, NULL, creblks /* pointer to array of XCREblks */ );
OpenIFileXtd(&fil,NULL,NULL,NULL); CloseISAM();
* initial creation of the file. The file type is invisible to * the application unless low level calls are used or an * explicit reference is made to a file offset. */ |
|||