This is an example of a key only file.
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <stdint.h>
static char *btrieveFileName = (char *)"primes.btr";
#define MIN_X 1
#define MAX_X 255
typedef uint32_t _key_t;
{
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
leave:
return status;
}
{
{
goto leave;
}
leave:
return status;
}
{
_key_t key;
int i;
int j;
_key_t record;
for (i = MIN_X; i <= MAX_X; i++)
{
record = (_key_t)i;
{
goto leave;
}
}
for (j = 2; j <= (MAX_X / 2); j++)
{
for (i = j * 2; i <= MAX_X; i += j)
{
key = (_key_t)i;
{
continue;
}
{
goto leave;
}
}
}
leave:
return status;
}
{
{
goto leave;
}
leave:
return status;
}
{
{
goto leave;
}
leave:
return status;
}
{
{
printf("%u is prime.\n", *key);
goto leave;
}
{
printf("%u is not prime.\n", *key);
goto leave;
}
leave:
return status;
}
int
main(int argc, char *argv[])
{
_key_t key;
uint64_t integerValue;
if (argc != 2)
{
printf("Usage: %s <uint8_value greater than zero>\n", argv[0]);
goto leave;
}
integerValue = atoi(argv[1]);
if ((integerValue < MIN_X) || (integerValue > MAX_X))
{
printf("Usage: %s <uint8_value greater than zero>\n", argv[0]);
goto leave;
}
key = (_key_t)integerValue;
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
leave:
return 0;
return 1;
}