add struct for levels within entry in node, lots of renaming

This commit is contained in:
Gregory Burd 2024-04-02 13:18:07 -04:00
parent 52c85316f6
commit d725cfc297
2 changed files with 1033 additions and 1022 deletions

View file

@ -18,10 +18,10 @@
// Local demo application OPTIONS:
// ---------------------------------------------------------------------------
#define TEST_ARRAY_SIZE 50
#define TEST_ARRAY_SIZE 1000
#define VALIDATE
#define SNAPSHOTS
#define DOT
//define SNAPSHOTS
//define DOT
#ifdef DOT
size_t gen = 0;
FILE *of = 0;
@ -182,7 +182,7 @@ SKIPLIST_DECL_DOT(esempio, api_, entries)
void
sprintf_esempio_node(esempio_node_t *node, char *buf)
{
sprintf(buf, "%d:%s (hits: %lu)", node->key, node->value, node->entries.sle_hits);
sprintf(buf, "%d:%s (hits: %lu)", node->key, node->value, node->entries.sle_levels[0]->hits);
//TODO sprintf(buf, "%d:%s", node->key, node->value);
}
@ -224,6 +224,10 @@ int_to_roman_numeral(int num)
res[0] = '0';
return res;
}
if (num > 10000) {
sprintf(res, "The person you were looking for is not here, their mailbox is full, good bye.");
return res;
}
while (num) { // while input number is not zero
while (num / del[i]) { // while a number contains the largest key value possible
strcat(res, sym[i]); // append the symbol for this key value to res string

File diff suppressed because it is too large Load diff