Mercurial > hg > nnchat
changeset 432:966c521e0954
Rename user home directory variable.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 24 May 2012 21:33:29 +0300 |
parents | a9b20b31cae1 |
children | edd67b882271 |
files | main.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/main.c Thu May 24 20:57:06 2012 +0300 +++ b/main.c Thu May 24 21:33:29 2012 +0300 @@ -1614,7 +1614,7 @@ int histPos = 0, histMax = 0; cfgitem_t *tmpcfg; - char *homeDir = NULL; + char *setHomeDir = NULL; memset(histBuf, 0, sizeof(histBuf)); @@ -1674,18 +1674,18 @@ { char tmpPath[MAX_PATH]; if (SHGetFolderPath(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, tmpPath) == S_OK) - homeDir = th_strdup(tmpPath); + setHomeDir = th_strdup(tmpPath); CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); } #else - homeDir = th_strdup(getenv("HOME")); + setHomeDir = th_strdup(getenv("HOME")); #endif - if (homeDir != NULL) + if (setHomeDir != NULL) { FILE *cfgfile; - setConfigFile = th_strdup_printf("%s" SET_DIR_SEPARATOR "%s", homeDir, SET_CONFIG_FILE); + setConfigFile = th_strdup_printf("%s" SET_DIR_SEPARATOR "%s", setHomeDir, SET_CONFIG_FILE); THMSG(0, "Reading configuration from '%s'.\n", setConfigFile); @@ -2296,7 +2296,7 @@ // Shutdown err_exit: th_cfg_free(cfg); - th_free(homeDir); + th_free(setHomeDir); th_llist_free_func(setIdleMessages, th_free); nn_userhash_free(nnUsers); nn_editbuf_free(editBuf);