summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-01-02 21:46:26 -0800
committerMichael Pavone <pavone@retrodev.com>2017-01-02 21:46:26 -0800
commitf6ab2dad74b981bd9e222f771a62cad34ae35c34 (patch)
treed1bf83a75fdea30abe5bef8eb9b0c2869795bdc2 /util.h
parent7d1a9bbb9b343e128cbfbc3567ab329f22edbd5a (diff)
Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Diffstat (limited to 'util.h')
-rw-r--r--util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/util.h b/util.h
index 7029d16..c29d040 100644
--- a/util.h
+++ b/util.h
@@ -35,6 +35,8 @@ char is_path_sep(char c);
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 @@ char const *get_config_dir();
//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