[GRASS-SVN] r58452 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 12 01:45:52 PST 2013


Author: mmetz
Date: 2013-12-12 01:45:52 -0800 (Thu, 12 Dec 2013)
New Revision: 58452

Modified:
   grass/trunk/lib/gis/token.c
Log:
libgis: revert r58417

Modified: grass/trunk/lib/gis/token.c
===================================================================
--- grass/trunk/lib/gis/token.c	2013-12-12 07:49:59 UTC (rev 58451)
+++ grass/trunk/lib/gis/token.c	2013-12-12 09:45:52 UTC (rev 58452)
@@ -17,7 +17,6 @@
 #include <grass/gis.h>
 
 static char **tokenize(const char *, const char *, const char *);
-static char **tokenize_strtok(const char *, const char *);
 
 /*!
   \brief Tokenize string
@@ -86,31 +85,6 @@
     return tokenize(buf, delim, valchar);
 }
 
-/* strtok-based version of tokenize subroutine */
-char **tokenize_strtok(const char *buf, const char *delim)
-{
-    int i;
-    char **tokens;
-    char *p, *ptr;
-
-    p = G_store(buf);
-
-    i = 0;
-    tokens = (char **) G_malloc (sizeof (char *));
-    ptr = strtok(p, delim);
-    tokens[i] = ptr;
-    i++;
-    while(ptr != NULL) {
-        tokens = (char **) G_realloc(tokens, sizeof(char*) * (i + 1));
-        ptr = strtok(NULL, delim);
-        tokens[i] = ptr;
-        i++;
-    } 
-    
-    return tokens;
-}
-
-/* own version of tokenize subroutine */
 char **tokenize(const char *buf, const char *delim, const char *inchar)
 {
     int i, invalue;



More information about the grass-commit mailing list