Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cxong/tinydir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLautis Sun <lautis0503@gmail.com>2016-07-03 15:41:48 +0300
committerGitHub <noreply@github.com>2016-07-03 15:41:48 +0300
commit5938c232d9144e92531311b6f3c69c36fbb2c985 (patch)
tree9e9192fec41b32a9c3a7f6e2e0c2959e8fde9218
parent4ebb8afd3d0a9324127d005bb868bfc7680b33f2 (diff)
Fix ansi list
Undefine _UNICODE and then we can list directory withou unicode
-rw-r--r--samples/list_to_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/list_to_file.c b/samples/list_to_file.c
index dd13a2c..618dbe8 100644
--- a/samples/list_to_file.c
+++ b/samples/list_to_file.c
@@ -14,14 +14,14 @@ int main(void) {
tinydir_open(&dir, TINYDIR_STRING("/path/to/dir"));
fp =
-#ifdef _WIN32
+#if ((defined _WIN32) && (defined _UNICODE))
_wfopen(
#else
fopen(
#endif
TINYDIR_STRING("/file/to/output"), TINYDIR_STRING("wb"));
-#ifdef _WIN32
+#if ((defined _WIN32) && (defined _UNICODE))
fwrite(bom, 1, 2, fp);
#endif