summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>2011-07-26 16:57:40 -0400
committerJeff Muizelaar <jmuizelaar@mozilla.com>2011-07-26 16:57:40 -0400
commitc6945882dc38ea75dd8feb4b90ba11cf46d69bdb (patch)
treece657dfbb39faa40d75a4be6de88f41c54ed252f
parent845bce103c408dca8f7275469bd055b021aca806 (diff)
Add qcms_profile_from_unicode_path for loading from wchar_t paths.
From Mozilla bug 613440
-rw-r--r--iccread.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/iccread.c b/iccread.c
index f8c50f4..54e6475 100644
--- a/iccread.c
+++ b/iccread.c
@@ -822,3 +822,17 @@ qcms_profile* qcms_profile_from_path(const char *path)
}
return profile;
}
+
+#ifdef _WIN32
+/* Unicode path version */
+qcms_profile* qcms_profile_from_unicode_path(const wchar_t *path)
+{
+ qcms_profile *profile = NULL;
+ FILE *file = _wfopen(path, L"rb");
+ if (file) {
+ profile = qcms_profile_from_file(file);
+ fclose(file);
+ }
+ return profile;
+}
+#endif