summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2014-07-09 17:37:14 (GMT)
committerjoye <joye>2014-07-09 17:37:14 (GMT)
commit938aacc356d7a55e0bc43182f313caf435dac3a1 (patch)
tree7c8a2c6d23077de8a99aacf8f37e1db2e5880f9d /src
parent9763506663a051a87b029e87cd8d5a645b64041f (diff)
downloadblt-938aacc356d7a55e0bc43182f313caf435dac3a1.zip
blt-938aacc356d7a55e0bc43182f313caf435dac3a1.tar.gz
blt-938aacc356d7a55e0bc43182f313caf435dac3a1.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltChain.C31
-rw-r--r--src/bltChain.h27
-rw-r--r--src/bltGrAxis.C2
-rw-r--r--src/bltGrAxis.h4
-rw-r--r--src/bltGrElem.C2
-rw-r--r--src/bltGrElem.h4
-rw-r--r--src/bltGrElemBar.C2
-rw-r--r--src/bltGrElemBar.h4
-rw-r--r--src/bltGrElemLine.h4
-rw-r--r--src/bltGrElemOp.C6
-rw-r--r--src/bltGrElemOption.C4
-rw-r--r--src/bltGrLegd.h2
-rw-r--r--src/bltGrXAxisOp.C2
-rw-r--r--src/bltGraph.C4
-rw-r--r--src/bltGraph.h6
-rw-r--r--src/bltGraphOp.C4
-rw-r--r--src/bltVecInt.h22
17 files changed, 54 insertions, 76 deletions
diff --git a/src/bltChain.C b/src/bltChain.C
index d629d57..b266e42 100644
--- a/src/bltChain.C
+++ b/src/bltChain.C
@@ -38,15 +38,11 @@ using namespace Blt;
(((size_t)a + (sizeof(double) - 1)) & (~(sizeof(double) - 1)))
#endif
-//typedef struct _Blt_ChainLink ChainLink;
-typedef struct _Blt_Chain Chain;
-
-Blt_Chain Blt::Chain_Create(void)
+Chain Blt::Chain_Create(void)
{
- Chain* chainPtr =(Chain*)malloc(sizeof(Chain));
- if (chainPtr) {
+ Chain chainPtr =(Chain)malloc(sizeof(_Chain));
+ if (chainPtr)
Chain_Init(chainPtr);
- }
return chainPtr;
}
@@ -75,7 +71,7 @@ ChainLink Blt::Chain_NewLink(void)
return linkPtr;
}
-void Blt::Chain_Reset(Chain* chainPtr)
+void Blt::Chain_Reset(Chain chainPtr)
{
if (chainPtr) {
ChainLink oldPtr;
@@ -90,7 +86,7 @@ void Blt::Chain_Reset(Chain* chainPtr)
}
}
-void Blt::Chain_Destroy(Chain* chainPtr)
+void Blt::Chain_Destroy(Chain chainPtr)
{
if (chainPtr) {
Chain_Reset(chainPtr);
@@ -99,14 +95,13 @@ void Blt::Chain_Destroy(Chain* chainPtr)
}
}
-void Blt::Chain_Init(Chain* chainPtr)
+void Blt::Chain_Init(Chain chainPtr)
{
chainPtr->nLinks = 0;
chainPtr->head = chainPtr->tail = NULL;
}
-void Blt::Chain_LinkAfter(Chain* chainPtr, ChainLink linkPtr,
- ChainLink afterPtr)
+void Blt::Chain_LinkAfter(Chain chainPtr, ChainLink linkPtr, ChainLink afterPtr)
{
if (chainPtr->head == NULL)
chainPtr->tail = chainPtr->head = linkPtr;
@@ -131,8 +126,8 @@ void Blt::Chain_LinkAfter(Chain* chainPtr, ChainLink linkPtr,
chainPtr->nLinks++;
}
-void Blt::Chain_LinkBefore(Chain* chainPtr, ChainLink linkPtr,
- ChainLink beforePtr)
+void Blt::Chain_LinkBefore(Chain chainPtr, ChainLink linkPtr,
+ ChainLink beforePtr)
{
if (chainPtr->head == NULL)
chainPtr->tail = chainPtr->head = linkPtr;
@@ -157,7 +152,7 @@ void Blt::Chain_LinkBefore(Chain* chainPtr, ChainLink linkPtr,
chainPtr->nLinks++;
}
-void Blt::Chain_UnlinkLink(Chain* chainPtr, ChainLink linkPtr)
+void Blt::Chain_UnlinkLink(Chain chainPtr, ChainLink linkPtr)
{
// Indicates if the link is actually remove from the chain
int unlinked;
@@ -185,14 +180,14 @@ void Blt::Chain_UnlinkLink(Chain* chainPtr, ChainLink linkPtr)
linkPtr->prev = linkPtr->next = NULL;
}
-void Blt::Chain_DeleteLink(Blt_Chain chain, ChainLink link)
+void Blt::Chain_DeleteLink(Chain chain, ChainLink link)
{
Chain_UnlinkLink(chain, link);
free(link);
link = NULL;
}
-ChainLink Blt::Chain_Append(Blt_Chain chain, ClientData clientData)
+ChainLink Blt::Chain_Append(Chain chain, ClientData clientData)
{
ChainLink link = Chain_NewLink();
Chain_LinkAfter(chain, link, (ChainLink)NULL);
@@ -200,7 +195,7 @@ ChainLink Blt::Chain_Append(Blt_Chain chain, ClientData clientData)
return link;
}
-ChainLink Blt::Chain_Prepend(Blt_Chain chain, ClientData clientData)
+ChainLink Blt::Chain_Prepend(Chain chain, ClientData clientData)
{
ChainLink link = Chain_NewLink();
Chain_LinkBefore(chain, link, (ChainLink)NULL);
diff --git a/src/bltChain.h b/src/bltChain.h
index 90631e2..b997baa 100644
--- a/src/bltChain.h
+++ b/src/bltChain.h
@@ -47,8 +47,8 @@
namespace Blt {
- typedef struct _Blt_Chain *Blt_Chain;
- typedef struct _ChainLink *ChainLink;
+ typedef struct _Chain* Chain;
+ typedef struct _ChainLink* ChainLink;
struct _ChainLink {
ChainLink prev; /* Link to the previous link */
@@ -56,25 +56,26 @@ namespace Blt {
ClientData clientData; /* Pointer to the data object */
};
- struct _Blt_Chain {
+ struct _Chain {
ChainLink head; /* Pointer to first element in chain */
ChainLink tail; /* Pointer to last element in chain */
long nLinks; /* Number of elements in chain */
};
- extern Blt_Chain Chain_Create(void);
+ extern Chain Chain_Create(void);
extern ChainLink Chain_AllocLink(size_t size);
extern void Chain_InitLink(ChainLink link);
- extern void Chain_Init(Blt_Chain chain);
+ extern void Chain_Init(Chain chain);
extern ChainLink Chain_NewLink(void);
- extern void Chain_Reset(Blt_Chain chain);
- extern void Chain_Destroy(Blt_Chain chain);
- extern void Chain_LinkAfter(Blt_Chain chain, ChainLink link, ChainLink after);
- extern void Chain_LinkBefore(Blt_Chain chain, ChainLink link, ChainLink before);
- extern void Chain_UnlinkLink(Blt_Chain chain, ChainLink link);
- extern void Chain_DeleteLink(Blt_Chain chain, ChainLink link);
- extern ChainLink Chain_Append(Blt_Chain chain, ClientData clientData);
- extern ChainLink Chain_Prepend(Blt_Chain chain, ClientData clientData);
+ extern void Chain_Reset(Chain chain);
+ extern void Chain_Destroy(Chain chain);
+ extern void Chain_LinkAfter(Chain chain, ChainLink link, ChainLink after);
+ extern void Chain_LinkBefore(Chain chain, ChainLink link, ChainLink before);
+ extern void Chain_UnlinkLink(Chain chain, ChainLink link);
+ extern void Chain_DeleteLink(Chain chain, ChainLink link);
+ extern ChainLink Chain_Append(Chain chain, ClientData clientData);
+ extern ChainLink Chain_Prepend(Chain chain, ClientData clientData);
extern int Chain_IsBefore(ChainLink first, ChainLink last);
};
+
#endif /* _BLT_CHAIN_H */
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index 8eeebd7..98870b6 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -1027,7 +1027,7 @@ int Axis::isHorizontal()
void Axis::freeTickLabels()
{
- Blt_Chain chain = tickLabels_;
+ Chain chain = tickLabels_;
for (ChainLink link=Chain_FirstLink(chain); link;
link = Chain_NextLink(link)) {
TickLabel* labelPtr = (TickLabel*)Chain_GetValue(link);
diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h
index e452bfb..8bcb186 100644
--- a/src/bltGrAxis.h
+++ b/src/bltGrAxis.h
@@ -172,7 +172,7 @@ namespace Blt {
int active_;
ChainLink link;
- Blt_Chain chain;
+ Chain chain;
Point2d titlePos_;
unsigned short int titleWidth_;
@@ -193,7 +193,7 @@ namespace Blt {
int margin_;
Segment2d *segments_;
int nSegments_;
- Blt_Chain tickLabels_;
+ Chain tickLabels_;
short int left_;
short int right_;
short int top_;
diff --git a/src/bltGrElem.C b/src/bltGrElem.C
index 70fd22d..08ba51a 100644
--- a/src/bltGrElem.C
+++ b/src/bltGrElem.C
@@ -265,7 +265,7 @@ PenStyle** Element::StyleMap()
return dataToStyle;
}
-void Element::freeStylePalette(Blt_Chain stylePalette)
+void Element::freeStylePalette(Chain stylePalette)
{
// Skip the first slot. It contains the built-in "normal" pen of the element
ChainLink link = Chain_FirstLink(stylePalette);
diff --git a/src/bltGrElem.h b/src/bltGrElem.h
index b828f6d..02a4a4b 100644
--- a/src/bltGrElem.h
+++ b/src/bltGrElem.h
@@ -138,7 +138,7 @@ namespace Blt {
ElemValues* yLow;
int hide;
int legendRelief;
- Blt_Chain stylePalette;
+ Chain stylePalette;
Pen* builtinPenPtr;
Pen* activePenPtr;
Pen* normalPenPtr;
@@ -189,7 +189,7 @@ namespace Blt {
virtual const char* className() =0;
virtual const char* typeName() =0;
- void freeStylePalette (Blt_Chain);
+ void freeStylePalette (Chain);
Tk_OptionTable optionTable() {return optionTable_;}
void* ops() {return ops_;}
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C
index f2fe6d2..6039665 100644
--- a/src/bltGrElemBar.C
+++ b/src/bltGrElemBar.C
@@ -838,7 +838,7 @@ void BarElement::printSymbol(PSOutput* psPtr, double x, double y, int size)
// Support
-void BarElement::ResetStylePalette(Blt_Chain stylePalette)
+void BarElement::ResetStylePalette(Chain stylePalette)
{
for (ChainLink link = Chain_FirstLink(stylePalette); link;
link = Chain_NextLink(link)) {
diff --git a/src/bltGrElemBar.h b/src/bltGrElemBar.h
index 0a1743b..c358d34 100644
--- a/src/bltGrElemBar.h
+++ b/src/bltGrElemBar.h
@@ -74,7 +74,7 @@ namespace Blt {
ElemValues* yLow;
int hide;
int legendRelief;
- Blt_Chain stylePalette;
+ Chain stylePalette;
BarPen* builtinPenPtr;
BarPen* activePenPtr;
BarPen* normalPenPtr;
@@ -98,7 +98,7 @@ namespace Blt {
GraphSegments yeb_;
protected:
- void ResetStylePalette(Blt_Chain);
+ void ResetStylePalette(Chain);
void checkStacks(Axis*, Axis*, double*, double*);
void mergePens(BarStyle**);
void mapActive();
diff --git a/src/bltGrElemLine.h b/src/bltGrElemLine.h
index 42e2504..d430576 100644
--- a/src/bltGrElemLine.h
+++ b/src/bltGrElemLine.h
@@ -82,7 +82,7 @@ namespace Blt {
ElemValues* yLow;
int hide;
int legendRelief;
- Blt_Chain stylePalette;
+ Chain stylePalette;
LinePen *builtinPenPtr;
LinePen *activePenPtr;
LinePen *normalPenPtr;
@@ -113,7 +113,7 @@ namespace Blt {
GraphSegments yeb_;
int symbolInterval_;
int symbolCounter_;
- Blt_Chain traces_;
+ Chain traces_;
void drawCircle(Display*, Drawable, LinePen*, int, Point2d*, int);
void drawSquare(Display*, Drawable, LinePen*, int, Point2d*, int);
diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C
index 7da85aa..11ce0dd 100644
--- a/src/bltGrElemOp.C
+++ b/src/bltGrElemOp.C
@@ -356,7 +356,7 @@ static int LowerOp(ClientData clientData, Tcl_Interp* interp,
// Move the links of lowered elements out of the display list into
// a temporary list
- Blt_Chain chain = Chain_Create();
+ Chain chain = Chain_Create();
for (int ii=3; ii<objc; ii++) {
Element* elemPtr;
@@ -421,7 +421,7 @@ static int RaiseOp(ClientData clientData, Tcl_Interp* interp,
{
Graph* graphPtr = (Graph*)clientData;
- Blt_Chain chain = Chain_Create();
+ Chain chain = Chain_Create();
for (int ii=3; ii<objc; ii++) {
Element* elemPtr;
@@ -461,7 +461,7 @@ static int ShowOp(ClientData clientData, Tcl_Interp* interp,
return TCL_ERROR;
// Collect the named elements into a list
- Blt_Chain chain = Chain_Create();
+ Chain chain = Chain_Create();
for (int ii=0; ii<elemObjc; ii++) {
Element* elemPtr;
if (graphPtr->getElement(elemObjv[ii], &elemPtr) != TCL_OK) {
diff --git a/src/bltGrElemOption.C b/src/bltGrElemOption.C
index c5dbeb5..bbf5998 100644
--- a/src/bltGrElemOption.C
+++ b/src/bltGrElemOption.C
@@ -228,7 +228,7 @@ int StyleSetProc(ClientData clientData, Tcl_Interp* interp,
Tk_Window tkwin, Tcl_Obj** objPtr, char* widgRec,
int offset, char* save, int flags)
{
- Blt_Chain stylePalette = *(Blt_Chain*)(widgRec + offset);
+ Chain stylePalette = *(Chain*)(widgRec + offset);
ElementOptions* ops = (ElementOptions*)(widgRec);
Element* elemPtr = ops->elemPtr;
size_t size = (size_t)clientData;
@@ -269,7 +269,7 @@ int StyleSetProc(ClientData clientData, Tcl_Interp* interp,
Tcl_Obj* StyleGetProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset)
{
- Blt_Chain stylePalette = *(Blt_Chain*)(widgRec + offset);
+ Chain stylePalette = *(Chain*)(widgRec + offset);
// count how many
int cnt =0;
diff --git a/src/bltGrLegd.h b/src/bltGrLegd.h
index 64aa3d5..7b2c6e2 100644
--- a/src/bltGrLegd.h
+++ b/src/bltGrLegd.h
@@ -131,7 +131,7 @@ namespace Blt {
Element* focusPtr_;
Element* selAnchorPtr_;
Element* selMarkPtr_;
- Blt_Chain selected_;
+ Chain selected_;
int titleWidth_;
int titleHeight_;
diff --git a/src/bltGrXAxisOp.C b/src/bltGrXAxisOp.C
index 8de1fdb..cb06c18 100644
--- a/src/bltGrXAxisOp.C
+++ b/src/bltGrXAxisOp.C
@@ -137,7 +137,7 @@ static int UseOp(ClientData clientData, Tcl_Interp* interp,
else
return TCL_ERROR;
- Blt_Chain chain = ops->margins[margin].axes;
+ Chain chain = ops->margins[margin].axes;
if (objc == 3) {
Tcl_Obj* listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
diff --git a/src/bltGraph.C b/src/bltGraph.C
index ba70588..c8b8342 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -876,7 +876,7 @@ int Graph::createAxes()
int isNew;
Tcl_HashEntry* hPtr =
Tcl_CreateHashEntry(&axes_.table, axisNames[ii].name, &isNew);
- Blt_Chain chain = Chain_Create();
+ Chain chain = Chain_Create();
Axis* axisPtr = new Axis(this, axisNames[ii].name, ii, hPtr);
if (!axisPtr)
@@ -973,7 +973,7 @@ void Graph::mapAxes()
int count =0;
int offset =0;
- Blt_Chain chain = ops->margins[ii].axes;
+ Chain chain = ops->margins[ii].axes;
for (ChainLink link=Chain_FirstLink(chain); link;
link = Chain_NextLink(link)) {
Axis *axisPtr = (Axis*)Chain_GetValue(link);
diff --git a/src/bltGraph.h b/src/bltGraph.h
index 1861a25..8be7369 100644
--- a/src/bltGraph.h
+++ b/src/bltGraph.h
@@ -80,14 +80,14 @@ namespace Blt {
short int maxTickWidth;
short int maxTickHeight;
unsigned int nAxes;
- Blt_Chain axes;
+ Chain axes;
int reqSize;
int site;
} Margin;
typedef struct {
Tcl_HashTable table;
- Blt_Chain displayList;
+ Chain displayList;
Tcl_HashTable tagTable;
} Component;
@@ -141,7 +141,7 @@ namespace Blt {
Component markers_;
Tcl_HashTable penTable_;
BindTable* bindTable_;
- Blt_Chain axisChain_[4];
+ Chain axisChain_[4];
Legend* legend_;
Crosshairs* crosshairs_;
diff --git a/src/bltGraphOp.C b/src/bltGraphOp.C
index 6a81724..cd488a5 100644
--- a/src/bltGraphOp.C
+++ b/src/bltGraphOp.C
@@ -55,7 +55,7 @@ using namespace Blt;
static Tcl_ObjCmdProc BarchartObjCmd;
static Tcl_ObjCmdProc GraphObjCmd;
-static Axis* GetFirstAxis(Blt_Chain chain);
+static Axis* GetFirstAxis(Chain chain);
int GraphObjConfigure(Graph* graphPtr, Tcl_Interp* interp,
int objc, Tcl_Obj* const objv[])
@@ -326,7 +326,7 @@ static const Ensemble graphEnsemble[] = {
// Support
-static Axis* GetFirstAxis(Blt_Chain chain)
+static Axis* GetFirstAxis(Chain chain)
{
ChainLink link = Chain_FirstLink(chain);
if (!link)
diff --git a/src/bltVecInt.h b/src/bltVecInt.h
index c09cf10..5b1ae3b 100644
--- a/src/bltVecInt.h
+++ b/src/bltVecInt.h
@@ -106,16 +106,11 @@ namespace Blt {
// If you change these fields, make sure you change the definition of
// Blt_Vector in blt.h too.
double *valueArr; /* Array of values (malloc-ed) */
-
int length; /* Current number of values in the array. */
-
int size; /* Maximum number of values that can be stored
* in the value array. */
-
double min, max; /* Minimum and maximum values in the vector */
-
int dirty; /* Indicates if the vector has been updated */
-
int reserved;
/* The following fields are local to this module */
@@ -123,44 +118,31 @@ namespace Blt {
const char *name; /* The namespace-qualified name of the vector.
* It points to the hash key allocated for the
* entry in the vector hash table. */
-
VectorInterpData *dataPtr;
- Tcl_Interp* interp; /* Interpreter associated with the
- * vector */
-
+ Tcl_Interp* interp; /* Interpreter associated with the vector */
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
* storage for the value array, Optionally can
* be one of the following: TCL_STATIC,
* TCL_DYNAMIC, or TCL_VOLATILE. */
-
const char *arrayName; /* The name of the TCL array variable mapped
* to the vector (malloc'ed). If NULL,
* indicates that the vector isn't mapped to
* any variable */
-
Tcl_Namespace *nsPtr; /* Namespace context of the vector itself. */
-
int offset; /* Offset from zero of the vector's starting
* index */
-
Tcl_Command cmdToken; /* Token for vector's TCL command. */
-
- Blt_Chain chain; /* List of clients using this vector */
-
+ Chain chain; /* List of clients using this vector */
int notifyFlags; /* Notification flags. See definitions
* below */
-
int varFlags; /* Indicate if the variable is global,
* namespace, or local */
-
int freeOnUnset; /* For backward compatibility only: If
* non-zero, free the vector when its variable
* is unset. */
int flush;
-
int first, last; /* Selected region of vector. This is used
* mostly for the math routines */
} Vector;