diff options
author | Brian Paul <[email protected]> | 2008-05-28 12:54:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-28 12:54:33 -0600 |
commit | e94d383b9ba7964da9fefac2a55e10c00ee72392 (patch) | |
tree | d0a2171ec2125715dd79095f93136c39608fd298 /src/egl/main/eglstring.c | |
parent | 17ec3b3cc5100deb6ef96977d87b2a7f05814f72 (diff) |
egl: added eglstring.[ch]
Diffstat (limited to 'src/egl/main/eglstring.c')
-rw-r--r-- | src/egl/main/eglstring.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/egl/main/eglstring.c b/src/egl/main/eglstring.c new file mode 100644 index 00000000000..ba7406158c4 --- /dev/null +++ b/src/egl/main/eglstring.c @@ -0,0 +1,24 @@ +/** + * String utils. + */ + +#include <stdlib.h> +#include <string.h> +#include "eglstring.h" + + +char * +_eglstrdup(const char *s) +{ + if (s) { + int l = strlen(s); + char *s2 = malloc(l + 1); + if (s2) + strcpy(s2, s); + return s2; + } + return NULL; +} + + + |