refactoring done, small bugfixes included, vectors and lists of non-primitive types are not working though
This commit is contained in:
+15
-12
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user