summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tiledoll.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-09-17 01:53:41 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-09-17 01:56:35 +0200
commite65b29e9f2a9a79731f38787384f9c877eec430f (patch)
treedf729dca05bd679dccf7cc336974e4795099ce47 /crawl-ref/source/tiledoll.cc
parent0fac9b0ec9f22978b94594373d65c5a70a4441fd (diff)
downloadcrawl-ref-e65b29e9f2a9a79731f38787384f9c877eec430f.tar.gz
crawl-ref-e65b29e9f2a9a79731f38787384f9c877eec430f.zip
Handle filenames with non-ascii characters.
Only iostreams functions are left; on Windows they don't support Unicode so a workaround will be needed.
Diffstat (limited to 'crawl-ref/source/tiledoll.cc')
-rw-r--r--crawl-ref/source/tiledoll.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/tiledoll.cc b/crawl-ref/source/tiledoll.cc
index 10a6056a06..421aafcb39 100644
--- a/crawl-ref/source/tiledoll.cc
+++ b/crawl-ref/source/tiledoll.cc
@@ -14,6 +14,7 @@
#include <sys/stat.h>
#include "files.h"
+#include "syscalls.h"
#include "tilebuf.h"
#include "tiledef-player.h"
#include "tilepick-p.h"
@@ -60,7 +61,7 @@ bool save_doll_data(int mode, int num, const dolls_data* dolls)
: dollsTxtString.c_str();
FILE *fp = NULL;
- if ((fp = fopen(dollsTxt, "w+")) != NULL)
+ if ((fp = fopen_u(dollsTxt, "w+")) != NULL)
{
fprintf(fp, "MODE=%s\n",
(mode == TILEP_MODE_EQUIP) ? "EQUIP" :
@@ -106,7 +107,7 @@ bool load_doll_data(const char *fn, dolls_data *dolls, int max,
: dollsTxtString.c_str();
- if ( (fp = fopen(dollsTxt, "r")) == NULL )
+ if ( (fp = fopen_u(dollsTxt, "r")) == NULL )
{
// File doesn't exist. By default, use equipment settings.
*mode = TILEP_MODE_EQUIP;