summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 27550be2..99e21978 100644
--- a/utf8.c
+++ b/utf8.c
@@ -371,3 +371,13 @@ FILE *w_popen(const wchar_t *wcmd, const wchar_t *wmode)
free(mode);
return f;
}
+
+FILE *w_freopen(const wchar_t *wname, const wchar_t *wmode, FILE *fold)
+{
+ char *name = utf8_dup_to(wname);
+ char *mode = utf8_dup_to(wmode);
+ FILE *f = freopen(name, mode, fold);
+ free(name);
+ free(mode);
+ return f;
+}