mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
xmalloc: add xwcsdup()
This commit is contained in:
parent
c66ad118b7
commit
8aba25a477
2 changed files with 9 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <syslog.h>
|
||||
#include "xmalloc.h"
|
||||
|
||||
|
|
@ -54,6 +55,12 @@ xstrdup(const char *str)
|
|||
return check_alloc(strdup(str));
|
||||
}
|
||||
|
||||
wchar_t *
|
||||
xwcsdup(const wchar_t *str)
|
||||
{
|
||||
return check_alloc(wcsdup(str));
|
||||
}
|
||||
|
||||
char *
|
||||
xstrndup(const char *str, size_t n)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue