Back to home page

Enduro/X

 
 

    


0001 #include <stdlib.h>
0002 #include <string.h>
0003 #include "utils.h"
0004 
0005 #ifdef __cplusplus
0006 namespace cgreen {
0007 #endif
0008 
0009 
0010 char *string_dup(const char *string) {
0011     char *dup = (char *)malloc(strlen(string)+1);
0012     if (dup)
0013         strcpy(dup, string);
0014     return dup;
0015 }
0016 
0017 #ifdef __cplusplus
0018 } // namespace cgreen
0019 #endif