Changeset 3182 for trunk/psLib/src/sysUtils/psTrace.c
- Timestamp:
- Feb 9, 2005, 4:36:42 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sysUtils/psTrace.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psTrace.c
r3115 r3182 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-02- 03 00:54:11$11 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-02-10 02:36:42 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 40 40 #ifndef PS_NO_TRACE 41 41 42 #include <unistd.h> 42 43 #include <stdlib.h> 43 44 #include <stdio.h> … … 146 147 /***************************************************************************** 147 148 componentAdd(): Adds the component named "addNodeName" to the root tree. 148 149 NOTE: replace the call to strsep() with a call to strtok(), which conforms150 to ANSI-C.151 149 *****************************************************************************/ 152 150 static psBool componentAdd(const char *addNodeName, psS32 level) … … 180 178 181 179 strcpy(name, addNodeName); 182 pname = &name[1];180 pname = name+1; 183 181 // Iterate through the components of addNodeName. Strip off the first 184 182 // component of the name, find that in the root tree, or add it if it … … 186 184 187 185 while (pname != NULL) { 188 firstComponent = strsep(&pname, "."); 186 firstComponent = pname; 187 pname = strtok(pname, "."); 188 if (pname != NULL) { 189 *pname = '\0'; 190 pname++; 191 } 189 192 nodeExists = 0; 190 193 for (i = 0; i < currentNode->n; i++) { … … 324 327 pname = &name[1]; 325 328 while (pname != NULL) { 326 firstComponent = strsep(&pname, "."); 329 firstComponent = pname; 330 pname = strtok(pname, "."); 331 if (pname != NULL) { 332 *pname = '\0'; 333 pname++; 334 } 327 335 for (i = 0; i < currentNode->n; i++) { 328 336 if (NULL == currentNode->subcomp[i]) {
Note:
See TracChangeset
for help on using the changeset viewer.
