]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - misc.h
New centralised helper function dup_mb_to_wc().
[PuTTY.git] / misc.h
diff --git a/misc.h b/misc.h
index f63cd969f75179c7ecfa05fb25b121a0706fd4a0..8c8377f9e823007a4118af6848571baf4675678d 100644 (file)
--- a/misc.h
+++ b/misc.h
@@ -39,6 +39,15 @@ char *dupprintf(const char *fmt, ...)
 char *dupvprintf(const char *fmt, va_list ap);
 void burnstr(char *string);
 
+/* String-to-Unicode converters that auto-allocate the destination and
+ * work around the rather deficient interface of mb_to_wc.
+ *
+ * These actually live in miscucs.c, not misc.c (the distinction being
+ * that the former is only linked into tools that also have the main
+ * Unicode support). */
+wchar_t *dup_mb_to_wc_c(int codepage, int flags, const char *string, int len);
+wchar_t *dup_mb_to_wc(int codepage, int flags, const char *string);
+
 int toint(unsigned);
 
 char *fgetline(FILE *fp);