Fix minor grammatical error in documentation
[pspp] / src / data / make-file.c
index af1dc5742b6849f8e2c1d73c014d5ac74b30f898..3cbf00623d200e22075c8c06f61500bf1d5a0c80 100644 (file)
@@ -45,7 +45,6 @@
 
 #if defined _WIN32 || defined __WIN32__
 #define WIN32_LEAN_AND_MEAN  /* avoid including junk */
-#define UNICODE 1
 #include <windows.h>
 #define TS_stat _stat
 #define Tunlink _wunlink
@@ -149,11 +148,11 @@ Trename (TCHAR const *src, TCHAR const *dst)
   return -1;
 }
 
-static TCHAR * 
+TCHAR * 
 convert_to_filename_encoding (const char *s, size_t len, const char *current_encoding)
 {
   const char *enc = current_encoding;
-  if (0 == strcmp (current_encoding, "Auto"))
+  if (NULL == enc || 0 == strcmp (enc, "Auto"))
     enc = locale_charset ();
 
   return (TCHAR *) recode_string ("UTF-16LE", enc, s, len);
@@ -161,14 +160,13 @@ convert_to_filename_encoding (const char *s, size_t len, const char *current_enc
 
 
 #else
-typedef char TCHAR;
 #define TS_stat stat
 #define Trename rename
 #define Tunlink unlink
 #define Topen open
 #define Tstat stat
 
-static TCHAR * 
+TCHAR * 
 convert_to_filename_encoding (const char *s, size_t len UNUSED, const char *current_encoding UNUSED)
 {
   /* Non-windows systems don't care about the encoding.