diff util.h @ 1140:4490c9c12272

Detect system type from filename if header based methods fail. Allow overriding system type from command line.
author Michael Pavone <pavone@retrodev.com>
date Mon, 02 Jan 2017 21:46:26 -0800
parents 22e87b739ad6
children 5905593d6828
line wrap: on
line diff
--- a/util.h	Mon Jan 02 16:33:03 2017 -0800
+++ b/util.h	Mon Jan 02 21:46:26 2017 -0800
@@ -35,6 +35,8 @@
 char is_absolute_path(char *path);
 //Returns the basename of a path with th extension (if any) stripped
 char * basename_no_extension(char *path);
+//Returns the extension from a path or NULL if there is no extension
+char *path_extension(char *path);
 //Gets the smallest power of two that is >= a certain value, won't work for values > 0x80000000
 uint32_t nearest_pow2(uint32_t val);
 //Should be called by main with the value of argv[0] for use by get_exe_dir
@@ -48,7 +50,7 @@
 //Returns an appropriate path for saving non-config data like savestates
 char const *get_save_dir();
 //Reads a file bundled with the executable
-char *read_bundled_file(char *name, long *sizeret);
+char *read_bundled_file(char *name, uint32_t *sizeret);
 //Retunrs an array of normal files and directories residing in a directory
 dir_entry *get_dir_list(char *path, size_t *numret);
 //Frees a dir list returned by get_dir_list