repo.or.cz
/
maemo-rb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix typo in german translation.
[maemo-rb.git]
/
apps
/
plugins
/
mikmod
/
strdup.c
blob
f8c1438bee6edb0569bb835d4b2e32205f9f4f5d
1
#ifdef HAVE_CONFIG_H
2
#include
"config.h"
3
#endif
4
5
#include <stdlib.h>
6
#include <string.h>
7
#include
"mikmod.h"
8
9
#undef strdup
10
11
char
*
strdup
(
const char
*
__s
)
12
{
13
char
*
charptr
;
14
15
if
(!
__s
)
16
return
NULL
;
17
18
charptr
=(
char
*)
MikMod_malloc
(
sizeof
(
char
) * (
strlen
(
__s
) +
1
));
19
if
(
charptr
)
20
strcpy
(
charptr
,
__s
);
21
22
return
charptr
;
23
}