Mercurial > repos > blastem
diff util.h @ 1292:5905593d6828
Allow initial_path to contain variable references which allows the default value to be actually specified in the default config file
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 21 Mar 2017 00:40:25 -0700 |
parents | 4490c9c12272 |
children | 96ad1b9bbb3a |
line wrap: on
line diff
--- a/util.h Sun Mar 19 18:32:49 2017 -0700 +++ b/util.h Tue Mar 21 00:40:25 2017 -0700 @@ -21,6 +21,8 @@ char * alloc_concat(char const * first, char const * second); //Allocates a new string containing the concatenation of the strings pointed to by parts char * alloc_concat_m(int num_parts, char const ** parts); +//Returns a newly allocated string in which all variables in based are replaced with values from vars or the environment +char *replace_vars(char *base, tern_node *vars, uint8_t allow_env); //Byteswaps a ROM image in memory void byteswap_rom(int filesize, uint16_t *cart); //Returns the size of a file using fseek and ftell