Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/libogg-1.1.3/macos/compat/strdup.c @ 15

Last change on this file since 15 was 15, checked in by landauf, 17 years ago

added libogg

  • Property svn:executable set to *
File size: 305 bytes
Line 
1#include <ogg/os_types.h>
2#include <sys/types.h>
3#include <string.h>
4#include <stdlib.h>
5
6char *strdup(const char *inStr)
7{
8        char *outStr = NULL;
9       
10        if (inStr == NULL) {
11                return NULL;
12        }
13       
14        outStr = _ogg_malloc(strlen(inStr) + 1);
15       
16        if (outStr != NULL) {
17                strcpy(outStr, inStr);
18        }
19       
20        return outStr;
21}
Note: See TracBrowser for help on using the repository browser.