New function.

1998-06-18  Martin Baulig  <baulig@taurus.uni-trier.de>

	* lib/xmalloc.c (glibtop_strdup_r): New function.
This commit is contained in:
Martin Baulig
1998-06-18 13:06:40 +00:00
committed by Martin Baulig
parent 8b025ff2c2
commit 81c75477f4
3 changed files with 12 additions and 0 deletions

View File

@@ -59,6 +59,12 @@ glibtop_realloc_r (glibtop *server, void *ptr, size_t size)
return buf;
}
char *
glibtop_strdup_r (glibtop *server, const char *string)
{
return strcpy (glibtop_malloc_r (server, strlen (string) + 1), string);
}
void
glibtop_free_r (glibtop *server, void *ptr)
{