summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-05-28 23:05:32 -0700
committerMichael Pavone <pavone@retrodev.com>2015-05-28 23:05:32 -0700
commitd597043be9f8d1c22ac6a2365e5cbb9f82e7ea46 (patch)
tree131c7ea0f3ec03882bb8183a734f04c757918180 /config.c
parent391656eca9eb35b7e3937b2af1316460d5639306 (diff)
parent66aedc9c1a87c8811be4dba263dbcd7ec026cc70 (diff)
Merge
Diffstat (limited to 'config.c')
-rw-r--r--config.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/config.c b/config.c
index d1efc87..eab0308 100644
--- a/config.c
+++ b/config.c
@@ -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;
}