refactoring done, small bugfixes included, vectors and lists of non-primitive types are not working though

This commit is contained in:
Odweta
2024-02-05 00:16:25 +01:00
parent 8832a2a4aa
commit e40b61a21b
9 changed files with 631 additions and 797 deletions
+15 -12
View File
@@ -1,7 +1,9 @@
#ifndef UTIL_H
#define UTIL_H
#include <stdbool.h>
#undef bool
typedef enum { false, true } bool;
typedef enum {
LESS,
@@ -15,18 +17,19 @@ typedef enum {
typedef long unsigned int size_t;
typedef enum {
INT = 0,
FLOAT = 1,
CHAR = 2,
VECTOR = 3, // allows for multi-dimensional arrays
LIST = 4,
BOOL = 5
} dataType_e;
INT,
FLOAT,
CHAR,
VECTOR, // allows for multi-dimensional arrays
LIST,
BOOL,
STRING
} type_e;
char* intToString(int x); // convert an int into a string
char* int_to_string(int x); // convert an int into a string
long pow(int x, int n); // x^n
long pow(int x, int n); // x^n
int maxLowerPowerOf10(int x); // biggest power of 10 that is < x
int max_lower_power_of_10(int x); // biggest power of 10 that is < x
#endif
#endif // UTIL_H