wmii/libcext/estrdup.c

22 lines
334 B
C
Raw Normal View History

2005-11-18 18:54:58 +03:00
/*
2006-01-20 17:20:24 +03:00
* (C)opyright MMIV-MMVI Anselm R. Garbe <garbeam at gmail dot com>
2005-11-18 18:54:58 +03:00
* See LICENSE file for license details.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "cext.h"
2005-12-21 18:18:11 +03:00
char *
cext_estrdup(const char *s)
2005-11-18 18:54:58 +03:00
{
char *tmp;
2005-11-18 18:54:58 +03:00
tmp = (char *) cext_emallocz(strlen(s) + 1);
strcpy(tmp, (char *) s);
2005-11-18 18:54:58 +03:00
return tmp;
2005-11-18 18:54:58 +03:00
}