Revision 12269,
376 bytes
checked in by ghudson, 26 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r12268,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | #ifndef lint |
---|
2 | static char *RCSid = "$Revision: 1.1.1.3 $"; |
---|
3 | #endif |
---|
4 | |
---|
5 | |
---|
6 | #include <stdio.h> |
---|
7 | |
---|
8 | /* |
---|
9 | * Most systems don't have this (yet) |
---|
10 | */ |
---|
11 | char *strdup(str) |
---|
12 | char *str; |
---|
13 | { |
---|
14 | char *p; |
---|
15 | extern char *malloc(); |
---|
16 | extern char *strcpy(); |
---|
17 | |
---|
18 | if ((p = malloc(strlen(str)+1)) == NULL) |
---|
19 | return((char *) NULL); |
---|
20 | |
---|
21 | (void) strcpy(p, str); |
---|
22 | |
---|
23 | return(p); |
---|
24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.