summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src/utils.cpp')
-rw-r--r--plugins/Scriver/src/utils.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index 4e07d78598..5d92d914f6 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -36,6 +36,20 @@ int safe_wcslen(wchar_t *msg, int maxLen) {
return 0;
}
+wchar_t *a2w(const char *src, int len) {
+ wchar_t *wline;
+ int i;
+ if (len <0) {
+ len = (int)strlen(src);
+ }
+ wline = (wchar_t*)mir_alloc(2 * (len + 1));
+ for (i = 0; i < len; i ++) {
+ wline[i] = src[i];
+ }
+ wline[i] = 0;
+ return wline;
+}
+
static int mimFlags = 0;
enum MIMFLAGS {