home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
vsiftp.vmssoftware.com
/
VSIPUBLIC@vsiftp.vmssoftware.com.tar
/
FREEWARE
/
FREEWARE40.ZIP
/
xjig
/
vms_strdup.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-12-30
|
409b
|
23 lines
/*
* strdup.c
*
* Simple version of strdup for machines without it (ie DEC Ultrix 4.2)
*
* By David Chatterton
* 29 July 1993
*
* You can do anything you like to this... :)
* I've stolen it from xpilot and added it to the xvmstuils MPJZ ;-)
*/
#include <stdlib.h>
#include <string.h>
char* strdup (const char* s1)
{
char* s2;
if (s2 = (char*)malloc(strlen(s1)+1))
strcpy(s2,s1);
return s2;
}