rename src to utils

This commit is contained in:
Greg Wells
2025-06-06 20:14:51 -04:00
parent db55ccc0f0
commit 7e30aaabd7
13 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#include "stdlib.h"
// why would one use a linked list
typedef struct gnLinkedList {
void* data;
gnLinkedList* nextNode;
} gnLinkedList;
static gnLinkedList gnCreateLinkedList(int count) {
gnLinkedList list;
gnLinkedList* currentNode = &list;
for (int i = 0; i < count; i++) {
if ((i + 1) < count) {
currentNode->nextNode = (gnLinkedList*)malloc(sizeof(gnLinkedList));
currentNode = currentNode->nextNode;
}
}
return list;
}