forked from len0rd/rockbox
Add MikMod plugin, ported by Jason Yu, with some minor work by Craig Mann and William Peters (FS#8806)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28810 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d192bdf11e
commit
26f2bfde03
47 changed files with 22320 additions and 1 deletions
23
apps/plugins/mikmod/strdup.c
Normal file
23
apps/plugins/mikmod/strdup.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "mikmod.h"
|
||||
|
||||
#undef strdup
|
||||
|
||||
char* strdup(const char *__s)
|
||||
{
|
||||
char *charptr;
|
||||
|
||||
if (!__s)
|
||||
return NULL;
|
||||
|
||||
charptr=(char *)MikMod_malloc(sizeof(char) * (strlen(__s) + 1));
|
||||
if (charptr)
|
||||
strcpy(charptr, __s);
|
||||
|
||||
return charptr;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue