examples/sfexamples/oggvorbiscodec/src/libogg/macos/compat/strdup.c

00001 #include <ogg/os_types.h>
00002 #include <sys/types.h>
00003 #include <string.h>
00004 #include <stdlib.h>
00005 
00006 char *strdup(const char *inStr)
00007 {
00008         char *outStr = NULL;
00009         
00010         if (inStr == NULL) {
00011                 return NULL;
00012         }
00013         
00014         outStr = _ogg_malloc(strlen(inStr) + 1);
00015         
00016         if (outStr != NULL) {
00017                 strcpy(outStr, inStr);
00018         }
00019         
00020         return outStr;
00021 }

Generated by  doxygen 1.6.2