diff options
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -11,6 +11,27 @@ #define MAX_NEST 30 //way more than I'll ever need +#ifdef _WIN32 +char * strtok_r(char * input, char * sep, char ** state) +{ + if (input) { + *state = input; + } + char * ret = *state; + while (**state && **state != *sep) + { + ++*state; + } + if (**state) + { + **state = 0; + ++*state; + return ret; + } + return NULL; +} +#endif + tern_node * parse_config(char * config_data) { char *state, *curline; @@ -101,7 +122,7 @@ open_fail: tern_node * load_config() { char * exe_dir; - char * home = getenv("HOME"); + char * home = get_home_dir(); if (!home) { goto load_in_app_dir; } |