]> mj.ucw.cz Git - libucw.git/blob - lib/alloc_str.c
Improved heuristics for internal sorter capacity estimation.
[libucw.git] / lib / alloc_str.c
1 /*
2  *      UCW Library -- String Allocation
3  *
4  *      (c) 1997 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #include "lib/lib.h"
11
12 #include <string.h>
13
14 char *
15 xstrdup(const char *s)
16 {
17   uns l = strlen(s) + 1;
18   return memcpy(xmalloc(l), s, l);
19 }