comparison 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
comparison
equal deleted inserted replaced
492:dffc07104b09 495:39cad98d2789
1 #ifndef UTIL_H_
2 #define UTIL_H_
3
4 #include <stdio.h>
5
6 //Utility functions
7
8 //Allocates a new string containing the concatenation of first and second
9 char * alloc_concat(char * first, char * second);
10 //Allocates a new string containing the concatenation of the strings pointed to by parts
11 char * alloc_concat_m(int num_parts, char ** parts);
12 //Returns the size of a file using fseek and ftell
13 long file_size(FILE * f);
14 //Strips whitespace and non-printable characters from the beginning and end of a string
15 char * strip_ws(char * text);
16 char * split_keyval(char * text);
17
18 #endif //UTIL_H_