r471 - trunk
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jan 25 05:51:39 EST 2008
Author: icculus
Date: 2008-01-25 05:51:39 -0500 (Fri, 25 Jan 2008)
New Revision: 471
Modified:
trunk/platform_unix.c
Log:
Whoops, don't need that splitString() function after all.
Modified: trunk/platform_unix.c
===================================================================
--- trunk/platform_unix.c 2008-01-25 10:42:56 UTC (rev 470)
+++ trunk/platform_unix.c 2008-01-25 10:51:39 UTC (rev 471)
@@ -1002,40 +1002,6 @@
} // shellEscape
-static char **splitString(const char *str, const char sep)
-{
- char **retval = NULL;
- int count = 0;
- const char *lastptr = NULL;
- const char *ptr = NULL;
- for (ptr = str; *ptr; ptr++)
- {
- if (*ptr == sep)
- count++;
- } // for
-
- retval = (char **) xmalloc(sizeof (char *) * (count + 1));
- for (lastptr = ptr = str; *ptr; ptr++)
- {
- if (*ptr == sep)
- {
- const size_t len = (size_t) (ptr - lastptr);
- if (len > 0)
- {
- retval[count] = (char *) xmalloc(len + 1);
- memcpy(retval[count], lastptr, len);
- retval[count][len] = '\0';
- count++;
- } // if
- lastptr = ptr + 1;
- } // if
- } // for
-
- retval[count] = NULL;
- return retval;
-} // splitString
-
-
static const char *defaultBrowsers(void)
{
const boolean ttyonly = ( (GGui == NULL) ||
More information about the mojosetup-commits
mailing list