Mercurial > repos > blastem
comparison util.h @ 1581:7121daaa48c2
Fix drag and drop when using Nuklear UI
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 02 May 2018 00:03:22 -0700 |
parents | 5efeca06d942 |
children | eda8df5bc74c |
comparison
equal
deleted
inserted
replaced
1580:ea7d5ced2415 | 1581:7121daaa48c2 |
---|---|
41 //Determines whether a character is a valid path separator for the current platform | 41 //Determines whether a character is a valid path separator for the current platform |
42 char is_path_sep(char c); | 42 char is_path_sep(char c); |
43 //Determines whether a path is considered an absolute path on the current platform | 43 //Determines whether a path is considered an absolute path on the current platform |
44 char is_absolute_path(char *path); | 44 char is_absolute_path(char *path); |
45 //Returns the basename of a path with th extension (if any) stripped | 45 //Returns the basename of a path with th extension (if any) stripped |
46 char * basename_no_extension(char *path); | 46 char * basename_no_extension(const char *path); |
47 //Returns the extension from a path or NULL if there is no extension | 47 //Returns the extension from a path or NULL if there is no extension |
48 char *path_extension(char const *path); | 48 char *path_extension(char const *path); |
49 //Returns true if the given path matches one of the extensions in the list | 49 //Returns true if the given path matches one of the extensions in the list |
50 uint8_t path_matches_extensions(char *path, char **ext_list, uint32_t num_exts); | 50 uint8_t path_matches_extensions(char *path, char **ext_list, uint32_t num_exts); |
51 //Returns the directory portion of a path or NULL if there is no directory part | 51 //Returns the directory portion of a path or NULL if there is no directory part |
52 char *path_dirname(char *path); | 52 char *path_dirname(const char *path); |
53 //Gets the smallest power of two that is >= a certain value, won't work for values > 0x80000000 | 53 //Gets the smallest power of two that is >= a certain value, won't work for values > 0x80000000 |
54 uint32_t nearest_pow2(uint32_t val); | 54 uint32_t nearest_pow2(uint32_t val); |
55 //Should be called by main with the value of argv[0] for use by get_exe_dir | 55 //Should be called by main with the value of argv[0] for use by get_exe_dir |
56 void set_exe_str(char * str); | 56 void set_exe_str(char * str); |
57 //Returns the directory the executable is in | 57 //Returns the directory the executable is in |