summary refs log tree commit diff stats
path: root/src/fe-text/fe-text.c
diff options
context:
space:
mode:
authorbviktor <bviktor@outlook.com>2012-11-03 21:48:56 -0700
committerbviktor <bviktor@outlook.com>2012-11-03 21:48:56 -0700
commit3c5284f19de644e010d0dfe85d179fb5633c92fb (patch)
treecfcfb0f27d78dd65bb657f0e0caeabb42737cc03 /src/fe-text/fe-text.c
parente0b1724158d44370d34d108a5f07fe0b36e4e254 (diff)
parentc2c23894fc4e376ff10c9c3cbcfa5c350c1e3073 (diff)
Merge pull request #224 from Arnavion/utf8-everywhere
UTF-8 everywhere
Diffstat (limited to 'src/fe-text/fe-text.c')
-rw-r--r--src/fe-text/fe-text.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fe-text/fe-text.c b/src/fe-text/fe-text.c
index 19749a65..a970e537 100644
--- a/src/fe-text/fe-text.c
+++ b/src/fe-text/fe-text.c
@@ -23,6 +23,7 @@
 #include <strings.h>
 #endif
 #ifdef WIN32
+#include <io.h>
 #define STDIN_FILENO 0
 #define STDOUT_FILENO 1
 #else
@@ -513,15 +514,17 @@ fe_args (int argc, char *argv[])
 
 	if (arg_show_config)
 	{
-		printf ("%s\n", get_xdir_fs ());
+		printf ("%s\n", get_xdir ());
 		return 0;
 	}
 
 	if (arg_cfgdir)	/* we want filesystem encoding */
 	{
-		xdir_fs = strdup (arg_cfgdir);
-		if (xdir_fs[strlen (xdir_fs) - 1] == '/')
-			xdir_fs[strlen (xdir_fs) - 1] = 0;
+		if (xdir)
+			g_free (xdir);
+		xdir = strdup (arg_cfgdir);
+		if (xdir[strlen (xdir) - 1] == '/')
+			xdir[strlen (xdir) - 1] = 0;
 		g_free (arg_cfgdir);
 	}