diff options
author | Michael Pavone <pavone@retrodev.com> | 2015-05-28 23:05:32 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2015-05-28 23:05:32 -0700 |
commit | d597043be9f8d1c22ac6a2365e5cbb9f82e7ea46 (patch) | |
tree | 131c7ea0f3ec03882bb8183a734f04c757918180 /config.c | |
parent | 391656eca9eb35b7e3937b2af1316460d5639306 (diff) | |
parent | 66aedc9c1a87c8811be4dba263dbcd7ec026cc70 (diff) |
Merge
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; } |