77ae6d71f6755a4c6255728f7411c9a745eabd46
[yaz-moved-to-github.git] / util / nmemsdup.c
1 /*
2  * Copyright (c) 1997-2000, Index Data.
3  * See the file LICENSE for details.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: nmemsdup.c,v $
7  * Revision 1.4  2000-02-29 13:44:55  adam
8  * Check for config.h (currently not generated).
9  *
10  * Revision 1.3  1999/11/30 13:47:12  adam
11  * Improved installation. Moved header files to include/yaz.
12  *
13  * Revision 1.2  1998/02/11 11:53:36  adam
14  * Changed code so that it compiles as C++.
15  *
16  * Revision 1.1  1997/09/17 12:10:42  adam
17  * YAZ version 1.4.
18  *
19  */
20 #if HAVE_CONFIG_H
21 #include <config.h>
22 #endif
23
24 #include <string.h>
25 #include <yaz/nmem.h>
26
27 char *nmem_strdup (NMEM mem, const char *src)
28 {
29     char *dst = (char *)nmem_malloc (mem, strlen(src)+1);
30     strcpy (dst, src);
31     return dst;
32 }