summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-10-28 19:37:30 -0700
committerMike Pavone <pavone@retrodev.com>2013-10-28 19:37:30 -0700
commitda665eb04a793552ed32ed8944dffbeb5220d7ae (patch)
tree5532dd1d7f8e0d4f43d469f7823a5a3d9ccbfc1c /util.h
parent070b44e5440b966f911ee974490c7c99c91ec3d1 (diff)
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Diffstat (limited to 'util.h')
-rw-r--r--util.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/util.h b/util.h
new file mode 100644
index 0000000..e3e2e86
--- /dev/null
+++ b/util.h
@@ -0,0 +1,18 @@
+#ifndef UTIL_H_
+#define UTIL_H_
+
+#include <stdio.h>
+
+//Utility functions
+
+//Allocates a new string containing the concatenation of first and second
+char * alloc_concat(char * first, char * second);
+//Allocates a new string containing the concatenation of the strings pointed to by parts
+char * alloc_concat_m(int num_parts, char ** parts);
+//Returns the size of a file using fseek and ftell
+long file_size(FILE * f);
+//Strips whitespace and non-printable characters from the beginning and end of a string
+char * strip_ws(char * text);
+char * split_keyval(char * text);
+
+#endif //UTIL_H_