This is an example of file attributes use written in C++.
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <stdint.h>
static char *btrieveFileName = (char *)"squaresAndSquareRoots.btr";
{
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
leave:
return status;
}
{
{
goto leave;
}
leave:
return status;
}
{
int i;
{
goto leave;
}
{
goto leave;
}
printf("BalancedIndexes = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
printf("FixedRecordLength = %d\n", i);
{
goto leave;
}
printf("PageCompression = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("PagePreallocation = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
printf("UnusedDuplicatePointerCount = %d\n", i);
{
goto leave;
}
printf("UnusedPageCount = %d\n", i);
{
goto leave;
}
leave:
return status;
}
{
{
goto leave;
}
leave:
return status;
}
{
{
goto leave;
}
leave:
return status;
}
int
main(int argc, char *argv[])
{
static const char *usage = "Usage: %s\n";
if (argc != 1)
{
printf(usage, argv[0]);
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
leave:
return 0;
return 1;
}
The Btrieve client class.
Definition btrieveCpp.h:1388
Btrieve::StatusCode FileCreate(BtrieveFileAttributes *btrieveFileAttributes, const char *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Create a file.
Btrieve::StatusCode FileClose(BtrieveFile *btrieveFile)
Close a file.
Btrieve::StatusCode FileDelete(const char *fileName)
Delete a file.
Btrieve::StatusCode FileOpen(BtrieveFile *btrieveFile, const char *fileName, const char *ownerName, Btrieve::OpenMode openMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Open a file.
The Btrieve file attributes class.
Definition btrieveCpp.h:2448
Btrieve::StatusCode SetFileVersion(Btrieve::FileVersion fileVersion)
Set the file version.
Btrieve::StatusCode SetVariableLengthRecordsMode(Btrieve::VariableLengthRecordsMode variableLengthRecordsMode)
Set the variable length records mode.
Btrieve::StatusCode SetPageSize(Btrieve::PageSize pageSize, bool enablePageCompression=false)
Set the page size.
Btrieve::StatusCode SetPreallocatedPageCount(int preallocatedPageCount)
Set the preallocated page count.
Btrieve::StatusCode SetReservedDuplicatePointerCount(int reservedDuplicatePointerCount)
Set the reserved duplicate pointer count.
Btrieve::StatusCode SetRecordCompressionMode(Btrieve::RecordCompressionMode recordCompressionMode)
Set record compression mode.
Btrieve::StatusCode SetSystemDataMode(Btrieve::SystemDataMode systemDataMode)
Set the system data mode.
Btrieve::StatusCode SetFreeSpaceThreshold(Btrieve::FreeSpaceThreshold freeSpaceThreshold)
Set the free space threshold.
Btrieve::StatusCode SetBalancedIndexes(bool enableBalancedIndexes)
Set balanced indexes.
Btrieve::StatusCode SetFixedRecordLength(int fixedRecordLength)
Set the fixed record length.
The Btrieve file class.
Definition btrieveCpp.h:1729
Btrieve::StatusCode GetInformation(BtrieveFileInformation *btrieveFileInformation)
Get the file information.
VariableLengthRecordsMode
The Btrieve variable length records modes.
Definition btrieveCpp.h:1239
@ VARIABLE_LENGTH_RECORDS_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:1247
@ VARIABLE_LENGTH_RECORDS_MODE_YES_VARIABLE_ALLOCATION_TAILS
Yes with variable allocation tails.
Definition btrieveCpp.h:1245
static const char * PageSizeToString(PageSize pageSize)
Return a page size as a string.
static const char * FreeSpaceThresholdToString(FreeSpaceThreshold freeSpaceThreshold)
Return a free space threshold as a string.
static const char * VariableLengthRecordsModeToString(VariableLengthRecordsMode variableLengthRecordsMode)
Return a variable length records mode as a string.
static const char * RecordCompressionModeToString(RecordCompressionMode recordCompressionMode)
Return an record compression mode as a string.
SystemDataMode
The Btrieve system data modes.
Definition btrieveCpp.h:1200
@ SYSTEM_DATA_MODE_NO
No.
Definition btrieveCpp.h:1204
@ SYSTEM_DATA_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:1210
FileVersion
The Btrieve file versions.
Definition btrieveCpp.h:267
@ FILE_VERSION_9_5
File version 9.5.
Definition btrieveCpp.h:279
@ FILE_VERSION_UNKNOWN
Unknown.
Definition btrieveCpp.h:287
static const char * StatusCodeToString(StatusCode statusCode)
Return a status code as a string.
PageSize
The Btrieve page sizes.
Definition btrieveCpp.h:671
@ PAGE_SIZE_16384
Page size 16384.
Definition btrieveCpp.h:689
@ PAGE_SIZE_UNKNOWN
Unknown.
Definition btrieveCpp.h:693
@ CREATE_MODE_OVERWRITE
Overwrite.
Definition btrieveCpp.h:72
StatusCode
The Btrieve status codes.
Definition btrieveCpp.h:713
@ STATUS_CODE_UNKNOWN
-7 - Unknown.
Definition btrieveCpp.h:1194
@ STATUS_CODE_NO_ERROR
0 - No error.
Definition btrieveCpp.h:715
static const char * SystemDataModeToString(SystemDataMode systemDataMode)
Return a system data mode as a string.
FreeSpaceThreshold
The Btrieve free space thresholds.
Definition btrieveCpp.h:293
@ FREE_SPACE_THRESHOLD_UNKNOWN
Unknown.
Definition btrieveCpp.h:303
@ FREE_SPACE_THRESHOLD_10_PERCENT
Free space threshold 10%.
Definition btrieveCpp.h:295
@ OPEN_MODE_NORMAL
Normal.
Definition btrieveCpp.h:606
RecordCompressionMode
The Btrieve record compression modes.
Definition btrieveCpp.h:699
@ RECORD_COMPRESSION_MODE_RUN_LENGTH_ENCODING
Run length encoding.
Definition btrieveCpp.h:705
@ RECORD_COMPRESSION_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:707
static const char * FileVersionToString(FileVersion fileVersion)
Return a file version as a string.