summaryrefslogtreecommitdiff
path: root/sys/src/cmd/unix/drawterm/libc/runestrdup.c
blob: f66b430b6ab3b8e8b7265d6a0ab5cc6208c0a94d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <u.h>
#include <libc.h>

Rune*
runestrdup(Rune *s) 
{  
	Rune *ns;

	ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
	if(ns == 0)
		return 0;

	return runestrcpy(ns, s);
}