[cig-commits] commit: Fix to change 233, use reentrant strtok
Mercurial
hg at geodynamics.org
Tue Mar 23 10:36:22 PDT 2010
changeset: 221:fb021afae75c
branch: 1.4.x
user: Owen Kaluza <Owen.Kaluza at sci.monash.edu.au>
date: Wed Feb 24 15:27:50 2010 +1100
files: Base/src/Window.c
description:
Fix to change 233, use reentrant strtok
diff -r 797e3a7ba46d -r fb021afae75c Base/src/Window.c
--- a/Base/src/Window.c Fri Feb 19 12:35:55 2010 +1100
+++ b/Base/src/Window.c Wed Feb 24 15:27:50 2010 +1100
@@ -746,6 +746,7 @@ lucViewportInfo* lucWindow_ConstructView
lucViewportInfo* currViewportInfo;
Dictionary* dictionary = Dictionary_GetDictionary( cf->componentDict, self->name );
Name viewportName[16];
+ char* savePtr;
*viewportCount = 0;
@@ -763,11 +764,11 @@ lucViewportInfo* lucWindow_ConstructView
/* Find number of horizontal layers */
horizontalCount = 0;
char* horizVPstr_ptr = horizontalVP_String;
- charPtr = strtok( horizVPstr_ptr , breakChars );
+ charPtr = strtok_r( horizVPstr_ptr , breakChars, &savePtr);
while ( charPtr != NULL ) {
viewportName[horizontalCount] = StG_Strdup( charPtr );
horizontalCount++;
- charPtr = strtok( NULL , breakChars );
+ charPtr = strtok_r( NULL , breakChars, &savePtr);
if (horizontalCount == 16) {
/* Maximum 8 viewports across in single window */
if (charPtr != NULL)
More information about the CIG-COMMITS
mailing list