source:
bootcd/isolinux/syslinux-6.03/com32/lib/lstrdup.c
@
e16e8f2
Last change on this file since e16e8f2 was e16e8f2, checked in by , 3 years ago | |
---|---|
|
|
File size: 212 bytes |
Rev | Line | |
---|---|---|
[e16e8f2] | 1 | /* |
2 | * lstrdup.c | |
3 | */ | |
4 | ||
5 | #include <string.h> | |
6 | #include <stdlib.h> | |
7 | #include <com32.h> | |
8 | ||
9 | char *lstrdup(const char *s) | |
10 | { | |
11 | int l = strlen(s) + 1; | |
12 | char *d = lmalloc(l); | |
13 | ||
14 | if (d) | |
15 | memcpy(d, s, l); | |
16 | ||
17 | return d; | |
18 | } |
Note: See TracBrowser
for help on using the repository browser.