Beispiel #1
0
Rune16*
runes16dup(Rune16 *r)
{
	int n;
	Rune16 *s;

	n = runes16len(r) + 1;
	s = malloc(n * sizeof(Rune16));
	if(s == nil)
		error(Enomem);
	memmove(s, r, n * sizeof(Rune16));
	return s;
}
Beispiel #2
0
uchar*
clipreadunicode(HANDLE h)
{
	Rune16 *p;
	int n;
	uchar *q;

	p = GlobalLock(h);
	n = rune16nlen(p, runes16len(p)+1);
	q = malloc(n);
	runes16toutf(q, p, n);
	GlobalUnlock(h);

	return q;
}