This is an example of file information use.
#include <stdio.h>
{
{
goto leave;
}
leave:
return status;
}
{
{
goto leave;
}
leave:
return status;
}
{
const char *c;
int i;
int indexCount;
int segmentCount;
long long cursorPosition;
long long recordCount;
long long uniqueValueCount;
{
goto leave;
}
{
goto leave;
}
printf("BalancedIndexes = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("ClientTransactions = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetDuplicateRecordConflictCursorPosition():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("DuplicateRecordConflictCursorPosition = %lld\n", cursorPosition);
{
goto leave;
}
{
goto leave;
}
printf("ContinuousOperation = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("ExplicitLocks = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("FixedRecordLength = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("GatewayMajorVersion = %d\n", i);
{
goto leave;
}
printf("GatewayMinorVersion = %d\n", i);
{
goto leave;
}
printf("GatewayName = %s\n", c);
{
goto leave;
}
printf("GatewayPatchLevel = %d\n", i);
{
goto leave;
}
printf("GatewayPlatform = %d\n", i);
{
goto leave;
}
printf("HandleCount = %d\n", i);
{
goto leave;
}
printf("Identifier = %d\n", i);
{
goto leave;
}
printf("IndexCount = %d\n", indexCount);
if ((i = btrieveFileInformation.
GetKeyOnly()) < 0)
{
goto leave;
}
printf("KeyOnly = %s\n", i > 0 ? "Yes" : "No");
for (int keySegmentNumber = 1, indexNumber = 0; indexNumber < indexCount; keySegmentNumber++)
{
{
goto leave;
}
printf("KeySegmentNumber = %d\n", keySegmentNumber);
{
goto leave;
}
{
goto leave;
}
printf("\tACSNumber = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("\tDescendingSortOrder = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
printf("\tKeyContinues = %s\n", i > 0 ? "Yes" : "No");
if (i == 0)
{
indexNumber++;
}
{
goto leave;
}
printf("\tLength = %d\n", i);
{
goto leave;
}
printf("\tModifiable = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("\tNullValue = %d\n", i);
{
goto leave;
}
printf("\tOffset = %d\n", i);
{
goto leave;
}
printf("\tUniqueValueCount = %lld\n", uniqueValueCount);
}
{
goto leave;
}
printf("LockOwnerClientIdentifier = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("LockOwnerFileLock = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("LockOwnerImplicitLock = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("LockOwnerName = %s\n", c);
{
goto leave;
}
{
goto leave;
}
printf("LockOwnerRecordLock = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("LockOwnerSameProcess = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("LockOwnerServiceAgentIdentifier = %d\n", i);
{
goto leave;
}
printf("LockOwnerTimeInTransaction = %d\n", i);
{
goto leave;
}
printf("LockOwnerTransactionLevel = %d\n", i);
{
goto leave;
}
printf("LockOwnerWriteHold = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("LockOwnerWriteNoWait = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("Loggable = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("OpenTimestamp = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("PageCompression = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("PagePreallocation = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("ReadOnly = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("RecordCount = %lld\n", recordCount);
{
goto leave;
}
printf("ReferentialIntegrityConstraints = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetReferentialIntegrityCursorPosition():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("ReferentialIntegrityCursorPosition = %lld\n", cursorPosition);
{
goto leave;
}
printf("ReferentialIntegrityFileName = %s\n", c);
{
goto leave;
}
printf("ReferentialIntegrityOperationCode = %d\n", i);
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseAuthenticationByDatabase():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseAuthenticationByDatabase = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseAuthorizationByDatabase():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseAuthorizationByDatabase = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseBtpasswd = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseExplicit = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseImplicit = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseName = %s\n", c);
{
goto leave;
}
printf("SecurityCurrentDatabasePAM = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseRTSSComplete():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseRTSSComplete = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseRTSSDisabled():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseRTSSDisabled = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseRTSSPreauthorized():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseRTSSPreauthorized = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseTrusted = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseWindowsNamedPipe():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseWindowsNamedPipe = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseWorkgroup = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentUserName = %s\n", c);
{
printf(
"Error: BtrieveFileInformation::GetSecurityHandleAuthenticationByDatabase():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityHandleAuthenticationByDatabase = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityHandleAuthorizationByDatabase():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityHandleAuthorizationByDatabase = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleBtpasswd = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleDatabaseName = %s\n", c);
{
goto leave;
}
printf("SecurityHandleExplicit = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleImplicit = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandlePAM = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleRTSSComplete = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleRTSSDisabled = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleRTSSPreauthorized = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleTableName = %s\n", c);
{
goto leave;
}
printf("SecurityHandleTrusted = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleUserName = %s\n", c);
{
goto leave;
}
printf("SecurityHandleWindowsNamedPipe = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleWorkgroup = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionAlter = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionCreateFile = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityPermissionCreateStoredProcedure():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityPermissionCreateStoredProcedure = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionCreateView = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionDelete = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionExecute = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionCreateRecord = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionNoRights = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionOpen = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionRead = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionRefer = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionUpdate = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("Segmented = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SegmentCount = %d\n", segmentCount);
for (i = 1; i <= segmentCount; i++)
{
{
goto leave;
}
printf("SegmentFileName = %s\n", c);
}
{
goto leave;
}
{
goto leave;
}
printf("SystemIndexPresent = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SystemIndexSize = %d\n", i);
{
goto leave;
}
printf("SystemIndexUsed = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SystemIndexVersion = %d\n", i);
{
goto leave;
}
printf("UnusedDuplicatePointerCount = %d\n", i);
{
goto leave;
}
printf("UnusedPageCount = %d\n", i);
{
goto leave;
}
printf("UsageCount = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("WrongOwner = %s\n", i > 0 ? "Yes" : "No");
leave:
return status;
}
int
main(int argc, char *argv[])
{
static const char *usage = "Usage: %s btrieveFileName\n";
char *btrieveFileName;
if (argc != 2)
{
printf(usage, argv[0]);
goto leave;
}
btrieveFileName = argv[1];
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
leave:
return 0;
return 1;
}