Showing
2 changed files
with
17 additions
and
0 deletions
... | ... | @@ -505,4 +505,19 @@ TR_cleanup() |
505 | 505 | #endif |
506 | 506 | } |
507 | 507 | |
508 | +char * | |
509 | +TR_strdup(const char * src) | |
510 | +{ | |
511 | + char * dup; | |
512 | + | |
513 | + if (NULL == src) { | |
514 | + return NULL; | |
515 | + } | |
516 | + | |
517 | + dup = TR_malloc(strlen(src)+1); | |
518 | + strcpy(dup, src); | |
519 | + | |
520 | + return dup; | |
521 | +} | |
522 | + | |
508 | 523 | // vim: set ts=4 sw=4: | ... | ... |
Please
register
or
login
to post a comment