wmii/libcext/estrdup.c

21 lines
332 B
C
Raw Normal View History

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