diff util.h @ 495:39cad98d2789

Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
author Mike Pavone <pavone@retrodev.com>
date Mon, 28 Oct 2013 19:37:30 -0700
parents
children 6fc71114d145
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/util.h	Mon Oct 28 19:37:30 2013 -0700
@@ -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_