comparison util.h @ 768:2f48a3c187c6

Add support for reading cartridge memory map from ROM database, though without EEPROM support for now
author Michael Pavone <pavone@retrodev.com>
date Tue, 07 Jul 2015 19:33:33 -0700
parents 2e1b3b258523
children 724bbec47f86
comparison
equal deleted inserted replaced
767:ea525f600b1d 768:2f48a3c187c6
13 long file_size(FILE * f); 13 long file_size(FILE * f);
14 //Strips whitespace and non-printable characters from the beginning and end of a string 14 //Strips whitespace and non-printable characters from the beginning and end of a string
15 char * strip_ws(char * text); 15 char * strip_ws(char * text);
16 //Inserts a null after the first word, returns a pointer to the second word 16 //Inserts a null after the first word, returns a pointer to the second word
17 char * split_keyval(char * text); 17 char * split_keyval(char * text);
18 //Gets the smallest power of two that is >= a certain value, won't work for values > 0x80000000
19 uint32_t nearest_pow2(uint32_t val);
18 //Should be called by main with the value of argv[0] for use by get_exe_dir 20 //Should be called by main with the value of argv[0] for use by get_exe_dir
19 void set_exe_str(char * str); 21 void set_exe_str(char * str);
20 //Returns the directory the executable is in 22 //Returns the directory the executable is in
21 char * get_exe_dir(); 23 char * get_exe_dir();
22 //Returns the user's home directory 24 //Returns the user's home directory