From 6cd8cfd53dd4383bd48e2d45aeec5844b3b7179e Mon Sep 17 00:00:00 2001 From: joye Date: Fri, 17 Jan 2014 16:06:16 +0000 Subject: *** empty log message *** --- src/bltGraph.C | 14 +++++------ src/bltVecInt.h | 14 +++++------ src/bltVecMath.C | 38 ++++++++++++++--------------- src/bltVector.C | 74 ++++++++++++++++++++++++++++---------------------------- 4 files changed, 70 insertions(+), 70 deletions(-) diff --git a/src/bltGraph.C b/src/bltGraph.C index d1e7d7b..c693605 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -848,13 +848,13 @@ CreateGraph(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, ClassId classId) Blt_Ts_InitStyle(graphPtr->titleTextStyle); Blt_Ts_SetAnchor(graphPtr->titleTextStyle, TK_ANCHOR_N); - Tcl_InitHashTable(&graphPtr->axes.table, BLT_STRING_KEYS); - Tcl_InitHashTable(&graphPtr->axes.tagTable, BLT_STRING_KEYS); - Tcl_InitHashTable(&graphPtr->elements.table, BLT_STRING_KEYS); - Tcl_InitHashTable(&graphPtr->elements.tagTable, BLT_STRING_KEYS); - Tcl_InitHashTable(&graphPtr->markers.table, BLT_STRING_KEYS); - Tcl_InitHashTable(&graphPtr->markers.tagTable, BLT_STRING_KEYS); - Tcl_InitHashTable(&graphPtr->dataTables, BLT_STRING_KEYS); + Tcl_InitHashTable(&graphPtr->axes.table, TCL_STRING_KEYS); + Tcl_InitHashTable(&graphPtr->axes.tagTable, TCL_STRING_KEYS); + Tcl_InitHashTable(&graphPtr->elements.table, TCL_STRING_KEYS); + Tcl_InitHashTable(&graphPtr->elements.tagTable, TCL_STRING_KEYS); + Tcl_InitHashTable(&graphPtr->markers.table, TCL_STRING_KEYS); + Tcl_InitHashTable(&graphPtr->markers.tagTable, TCL_STRING_KEYS); + Tcl_InitHashTable(&graphPtr->dataTables, TCL_STRING_KEYS); graphPtr->elements.displayList = Blt_Chain_Create(); graphPtr->markers.displayList = Blt_Chain_Create(); graphPtr->axes.displayList = Blt_Chain_Create(); diff --git a/src/bltVecInt.h b/src/bltVecInt.h index a44282f..4eb4b7f 100644 --- a/src/bltVecInt.h +++ b/src/bltVecInt.h @@ -55,9 +55,9 @@ #define FFT_SPECTRUM (1<<2) typedef struct { - Blt_HashTable vectorTable; /* Table of vectors */ - Blt_HashTable mathProcTable; /* Table of vector math functions */ - Blt_HashTable indexProcTable; + Tcl_HashTable vectorTable; /* Table of vectors */ + Tcl_HashTable mathProcTable; /* Table of vector math functions */ + Tcl_HashTable indexProcTable; Tcl_Interp *interp; unsigned int nextId; } VectorInterpData; @@ -109,7 +109,7 @@ typedef struct { Tcl_Interp *interp; /* Interpreter associated with the * vector */ - Blt_HashEntry *hashPtr; /* If non-NULL, pointer in a hash table to + Tcl_HashEntry *hashPtr; /* If non-NULL, pointer in a hash table to * track the vectors in use. */ Tcl_FreeProc *freeProc; /* Address of procedure to call to release @@ -183,11 +183,11 @@ typedef struct { } \ } -extern void Blt_Vec_InstallSpecialIndices(Blt_HashTable *tablePtr); +extern void Blt_Vec_InstallSpecialIndices(Tcl_HashTable *tablePtr); -extern void Blt_Vec_InstallMathFunctions(Blt_HashTable *tablePtr); +extern void Blt_Vec_InstallMathFunctions(Tcl_HashTable *tablePtr); -extern void Blt_Vec_UninstallMathFunctions(Blt_HashTable *tablePtr); +extern void Blt_Vec_UninstallMathFunctions(Tcl_HashTable *tablePtr); extern VectorInterpData *Blt_Vec_GetInterpData (Tcl_Interp *interp); diff --git a/src/bltVecMath.C b/src/bltVecMath.C index 80c9d1e..fd7db6a 100644 --- a/src/bltVecMath.C +++ b/src/bltVecMath.C @@ -740,7 +740,7 @@ ParseMathFunction( * must have initialized pv field * correctly. */ { - Blt_HashEntry *hPtr; + Tcl_HashEntry *hPtr; MathFunction *mathPtr; /* Info about math function. */ char *p; VectorInterpData *dataPtr; /* Interpreter-specific data. */ @@ -763,7 +763,7 @@ ParseMathFunction( } dataPtr = valuePtr->vPtr->dataPtr; *p = '\0'; - hPtr = Blt_FindHashEntry(&dataPtr->mathProcTable, piPtr->nextPtr); + hPtr = Tcl_FindHashEntry(&dataPtr->mathProcTable, piPtr->nextPtr); *p = '('; if (hPtr == NULL) { return TCL_RETURN; /* Name doesn't match any known function */ @@ -780,7 +780,7 @@ ParseMathFunction( piPtr->expr, "\"", (char *)NULL); return TCL_ERROR; /* Missing right parenthesis */ } - mathPtr = Blt_GetHashValue(hPtr); + mathPtr = Tcl_GetHashValue(hPtr); proc = mathPtr->proc; if ((*proc) (mathPtr->clientData, interp, valuePtr->vPtr) != TCL_OK) { return TCL_ERROR; /* Function invocation error */ @@ -1765,30 +1765,30 @@ static MathFunction mathFunctions[] = }; void -Blt_Vec_InstallMathFunctions(Blt_HashTable *tablePtr) +Blt_Vec_InstallMathFunctions(Tcl_HashTable *tablePtr) { MathFunction *mathPtr; for (mathPtr = mathFunctions; mathPtr->name != NULL; mathPtr++) { - Blt_HashEntry *hPtr; + Tcl_HashEntry *hPtr; int isNew; - hPtr = Blt_CreateHashEntry(tablePtr, mathPtr->name, &isNew); - Blt_SetHashValue(hPtr, (ClientData)mathPtr); + hPtr = Tcl_CreateHashEntry(tablePtr, mathPtr->name, &isNew); + Tcl_SetHashValue(hPtr, (ClientData)mathPtr); } } void -Blt_Vec_UninstallMathFunctions(Blt_HashTable *tablePtr) +Blt_Vec_UninstallMathFunctions(Tcl_HashTable *tablePtr) { - Blt_HashEntry *hPtr; - Blt_HashSearch cursor; + Tcl_HashEntry *hPtr; + Tcl_HashSearch cursor; - for (hPtr = Blt_FirstHashEntry(tablePtr, &cursor); hPtr != NULL; - hPtr = Blt_NextHashEntry(&cursor)) { + for (hPtr = Tcl_FirstHashEntry(tablePtr, &cursor); hPtr != NULL; + hPtr = Tcl_NextHashEntry(&cursor)) { MathFunction *mathPtr; - mathPtr = Blt_GetHashValue(hPtr); + mathPtr = Tcl_GetHashValue(hPtr); if (mathPtr->name == NULL) { free(mathPtr); } @@ -1798,7 +1798,7 @@ Blt_Vec_UninstallMathFunctions(Blt_HashTable *tablePtr) static void InstallIndexProc( - Blt_HashTable *tablePtr, + Tcl_HashTable *tablePtr, const char *string, Blt_VectorIndexProc *procPtr) /* Pointer to function to be called * when the vector finds the named index. @@ -1806,19 +1806,19 @@ InstallIndexProc( * the index from the table. */ { - Blt_HashEntry *hPtr; + Tcl_HashEntry *hPtr; int dummy; - hPtr = Blt_CreateHashEntry(tablePtr, string, &dummy); + hPtr = Tcl_CreateHashEntry(tablePtr, string, &dummy); if (procPtr == NULL) { - Blt_DeleteHashEntry(tablePtr, hPtr); + Tcl_DeleteHashEntry(hPtr); } else { - Blt_SetHashValue(hPtr, (ClientData)procPtr); + Tcl_SetHashValue(hPtr, (ClientData)procPtr); } } void -Blt_Vec_InstallSpecialIndices(Blt_HashTable *tablePtr) +Blt_Vec_InstallSpecialIndices(Tcl_HashTable *tablePtr) { InstallIndexProc(tablePtr, "min", Blt_VecMin); InstallIndexProc(tablePtr, "max", Blt_VecMax); diff --git a/src/bltVector.C b/src/bltVector.C index 8ceb184..dd68ef2 100644 --- a/src/bltVector.C +++ b/src/bltVector.C @@ -127,13 +127,13 @@ FindVectorInNamespace( { Tcl_DString dString; const char *name; - Blt_HashEntry *hPtr; + Tcl_HashEntry *hPtr; name = Blt_MakeQualifiedName(objNamePtr, &dString); - hPtr = Blt_FindHashEntry(&dataPtr->vectorTable, name); + hPtr = Tcl_FindHashEntry(&dataPtr->vectorTable, name); Tcl_DStringFree(&dString); if (hPtr != NULL) { - return Blt_GetHashValue(hPtr); + return Tcl_GetHashValue(hPtr); } return NULL; } @@ -250,12 +250,12 @@ Blt_Vec_GetIndex( return TCL_OK; } if (procPtrPtr != NULL) { - Blt_HashEntry *hPtr; + Tcl_HashEntry *hPtr; - hPtr = Blt_FindHashEntry(&vPtr->dataPtr->indexProcTable, string); + hPtr = Tcl_FindHashEntry(&vPtr->dataPtr->indexProcTable, string); if (hPtr != NULL) { *indexPtr = SPECIAL_INDEX; - *procPtrPtr = Blt_GetHashValue(hPtr); + *procPtrPtr = Tcl_GetHashValue(hPtr); return TCL_OK; } } @@ -1174,7 +1174,7 @@ Blt_Vec_Free(Vector *vPtr) } } if (vPtr->hashPtr != NULL) { - Blt_DeleteHashEntry(&vPtr->dataPtr->vectorTable, vPtr->hashPtr); + Tcl_DeleteHashEntry(vPtr->hashPtr); } #ifdef NAMESPACE_DELETE_NOTIFY if (vPtr->nsPtr != NULL) { @@ -1241,7 +1241,7 @@ Blt_Vec_Create( int isNew; Blt_ObjectName objName; char *qualName; - Blt_HashEntry *hPtr; + Tcl_HashEntry *hPtr; Tcl_Interp *interp = dataPtr->interp; isNew = 0; @@ -1259,7 +1259,7 @@ Blt_Vec_Create( sprintf_s(string, 200, "vector%d", dataPtr->nextId++); objName.name = string; qualName = Blt_MakeQualifiedName(&objName, &dString); - hPtr = Blt_FindHashEntry(&dataPtr->vectorTable, qualName); + hPtr = Tcl_FindHashEntry(&dataPtr->vectorTable, qualName); } while (hPtr != NULL); } else { const char *p; @@ -1277,17 +1277,17 @@ Blt_Vec_Create( NULL, NS_SEARCH_CURRENT); } if (vPtr == NULL) { - hPtr = Blt_CreateHashEntry(&dataPtr->vectorTable, qualName, &isNew); + hPtr = Tcl_CreateHashEntry(&dataPtr->vectorTable, qualName, &isNew); vPtr = Blt_Vec_New(dataPtr); vPtr->hashPtr = hPtr; vPtr->nsPtr = objName.nsPtr; - vPtr->name = Blt_GetHashKey(&dataPtr->vectorTable, hPtr); + vPtr->name = Tcl_GetHashKey(&dataPtr->vectorTable, hPtr); #ifdef NAMESPACE_DELETE_NOTIFY Blt_CreateNsDeleteNotify(interp, objName.nsPtr, vPtr, VectorInstDeleteProc); #endif /* NAMESPACE_DELETE_NOTIFY */ - Blt_SetHashValue(hPtr, vPtr); + Tcl_SetHashValue(hPtr, vPtr); } if (cmdName != NULL) { Tcl_CmdInfo cmdInfo; @@ -1392,27 +1392,27 @@ VectorNamesOp( listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL); if (objc == 2) { - Blt_HashEntry *hPtr; - Blt_HashSearch cursor; + Tcl_HashEntry *hPtr; + Tcl_HashSearch cursor; - for (hPtr = Blt_FirstHashEntry(&dataPtr->vectorTable, &cursor); - hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) { + for (hPtr = Tcl_FirstHashEntry(&dataPtr->vectorTable, &cursor); + hPtr != NULL; hPtr = Tcl_NextHashEntry(&cursor)) { char *name; - name = Blt_GetHashKey(&dataPtr->vectorTable, hPtr); + name = Tcl_GetHashKey(&dataPtr->vectorTable, hPtr); Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(name, -1)); } } else { - Blt_HashEntry *hPtr; - Blt_HashSearch cursor; + Tcl_HashEntry *hPtr; + Tcl_HashSearch cursor; - for (hPtr = Blt_FirstHashEntry(&dataPtr->vectorTable, &cursor); - hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) { + for (hPtr = Tcl_FirstHashEntry(&dataPtr->vectorTable, &cursor); + hPtr != NULL; hPtr = Tcl_NextHashEntry(&cursor)) { char *name; int i; - name = Blt_GetHashKey(&dataPtr->vectorTable, hPtr); + name = Tcl_GetHashKey(&dataPtr->vectorTable, hPtr); for (i = 2; i < objc; i++) { char *pattern; @@ -1766,24 +1766,24 @@ VectorInterpDeleteProc( Tcl_Interp *interp) { VectorInterpData *dataPtr = clientData; - Blt_HashEntry *hPtr; - Blt_HashSearch cursor; + Tcl_HashEntry *hPtr; + Tcl_HashSearch cursor; - for (hPtr = Blt_FirstHashEntry(&dataPtr->vectorTable, &cursor); - hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) { + for (hPtr = Tcl_FirstHashEntry(&dataPtr->vectorTable, &cursor); + hPtr != NULL; hPtr = Tcl_NextHashEntry(&cursor)) { Vector *vPtr; - vPtr = Blt_GetHashValue(hPtr); + vPtr = Tcl_GetHashValue(hPtr); vPtr->hashPtr = NULL; Blt_Vec_Free(vPtr); } - Blt_DeleteHashTable(&dataPtr->vectorTable); + Tcl_DeleteHashTable(&dataPtr->vectorTable); /* If any user-defined math functions were installed, remove them. */ Blt_Vec_UninstallMathFunctions(&dataPtr->mathProcTable); - Blt_DeleteHashTable(&dataPtr->mathProcTable); + Tcl_DeleteHashTable(&dataPtr->mathProcTable); - Blt_DeleteHashTable(&dataPtr->indexProcTable); + Tcl_DeleteHashTable(&dataPtr->indexProcTable); Tcl_DeleteAssocData(interp, VECTOR_THREAD_KEY); free(dataPtr); } @@ -1802,9 +1802,9 @@ Blt_Vec_GetInterpData(Tcl_Interp *interp) dataPtr->nextId = 0; Tcl_SetAssocData(interp, VECTOR_THREAD_KEY, VectorInterpDeleteProc, dataPtr); - Blt_InitHashTable(&dataPtr->vectorTable, BLT_STRING_KEYS); - Blt_InitHashTable(&dataPtr->mathProcTable, BLT_STRING_KEYS); - Blt_InitHashTable(&dataPtr->indexProcTable, BLT_STRING_KEYS); + Tcl_InitHashTable(&dataPtr->vectorTable, TCL_STRING_KEYS); + Tcl_InitHashTable(&dataPtr->mathProcTable, TCL_STRING_KEYS); + Tcl_InitHashTable(&dataPtr->indexProcTable, TCL_STRING_KEYS); Blt_Vec_InstallMathFunctions(&dataPtr->mathProcTable); Blt_Vec_InstallSpecialIndices(&dataPtr->indexProcTable); srand48(time((time_t *) NULL)); @@ -2406,15 +2406,15 @@ Blt_InstallIndexProc(Tcl_Interp *interp, const char *string, Blt_VectorIndexProc *procPtr) { VectorInterpData *dataPtr; /* Interpreter-specific data. */ - Blt_HashEntry *hPtr; + Tcl_HashEntry *hPtr; int isNew; dataPtr = Blt_Vec_GetInterpData(interp); - hPtr = Blt_CreateHashEntry(&dataPtr->indexProcTable, string, &isNew); + hPtr = Tcl_CreateHashEntry(&dataPtr->indexProcTable, string, &isNew); if (procPtr == NULL) { - Blt_DeleteHashEntry(&dataPtr->indexProcTable, hPtr); + Tcl_DeleteHashEntry(hPtr); } else { - Blt_SetHashValue(hPtr, procPtr); + Tcl_SetHashValue(hPtr, procPtr); } } -- cgit v0.12