diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2015-06-14 12:32:13 +0100 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2015-06-14 12:32:13 +0100 |
| commit | 89dfe4bea0ef29d57db26cade21924eb38402e02 (patch) | |
| tree | 3c1d63e095ae2070c1e2bc595639d23fc5c4bf6f /emu/Nt/win.c | |
| parent | 62d7827bc358c000db9ff48fe61bd28ac352a884 (diff) | |
handle 16-bit unicode from Windows in clipboard and fs names
Diffstat (limited to 'emu/Nt/win.c')
| -rw-r--r-- | emu/Nt/win.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/emu/Nt/win.c b/emu/Nt/win.c index b6330b16..c1bccfa7 100644 --- a/emu/Nt/win.c +++ b/emu/Nt/win.c @@ -32,10 +32,10 @@ #include <draw.h> #include "keyboard.h" #include "cursor.h" +#include "r16.h" extern ulong displaychan; -extern char* runes16toutf(char*, Rune*, int); extern int bytesperline(Rectangle, int); extern int main(int argc, char **argv); static void dprint(char*, ...); @@ -698,12 +698,12 @@ drawcursor(Drawcursor* c) static char* clipreadunicode(HANDLE h) { - Rune *p; + Rune16 *p; int n; char *q; p = GlobalLock(h); - n = runenlen(p, runestrlen(p)+1); + n = rune16nlen(p, runes16len(p)+1); q = malloc(n); if(q != nil) runes16toutf(q, p, n); @@ -753,7 +753,7 @@ clipwrite(char *buf) { HANDLE h; char *p; - Rune *rp; + Rune16 *rp; int n; n = 0; @@ -767,7 +767,7 @@ clipwrite(char *buf) return -1; } - h = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE, (n+1)*sizeof(Rune)); + h = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE, (n+1)*sizeof(Rune16)); if(h == NULL) error(Enovmem); rp = GlobalLock(h); |
