2011-03-30 05:46:40 -07:00
|
|
|
#include <u.h>
|
|
|
|
#include <libc.h>
|
|
|
|
|
|
|
|
Rune*
|
2016-03-19 14:35:36 -07:00
|
|
|
runestrdup(Rune *s)
|
|
|
|
{
|
2011-03-30 05:46:40 -07:00
|
|
|
Rune *ns;
|
|
|
|
|
|
|
|
ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
|
|
|
|
if(ns == 0)
|
|
|
|
return 0;
|
2013-01-25 05:15:48 -08:00
|
|
|
setmalloctag(ns, getcallerpc(&s));
|
2011-03-30 05:46:40 -07:00
|
|
|
return runestrcpy(ns, s);
|
|
|
|
}
|