Mercurial > repos > blastem
comparison util.h @ 1103:22e87b739ad6
WIP split of ROM loading/argument parsing from Genesis emulation code. Compiles and doesn't crash, but nothing works. Still a few too many globals as well.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 09 Dec 2016 09:48:48 -0800 |
parents | 51885857c019 |
children | 4490c9c12272 |
comparison
equal
deleted
inserted
replaced
1102:c15896605bf2 | 1103:22e87b739ad6 |
---|---|
19 | 19 |
20 //Allocates a new string containing the concatenation of first and second | 20 //Allocates a new string containing the concatenation of first and second |
21 char * alloc_concat(char const * first, char const * second); | 21 char * alloc_concat(char const * first, char const * second); |
22 //Allocates a new string containing the concatenation of the strings pointed to by parts | 22 //Allocates a new string containing the concatenation of the strings pointed to by parts |
23 char * alloc_concat_m(int num_parts, char const ** parts); | 23 char * alloc_concat_m(int num_parts, char const ** parts); |
24 //Byteswaps a ROM image in memory | |
25 void byteswap_rom(int filesize, uint16_t *cart); | |
24 //Returns the size of a file using fseek and ftell | 26 //Returns the size of a file using fseek and ftell |
25 long file_size(FILE * f); | 27 long file_size(FILE * f); |
26 //Strips whitespace and non-printable characters from the beginning and end of a string | 28 //Strips whitespace and non-printable characters from the beginning and end of a string |
27 char * strip_ws(char * text); | 29 char * strip_ws(char * text); |
28 //Inserts a null after the first word, returns a pointer to the second word | 30 //Inserts a null after the first word, returns a pointer to the second word |