diff options
author | joye <joye> | 2014-02-28 17:02:46 (GMT) |
---|---|---|
committer | joye <joye> | 2014-02-28 17:02:46 (GMT) |
commit | b34b353473819e0c5907dbd8140a26db0c5cfb09 (patch) | |
tree | d3de96e852dd024b7ff8e4770a44c1a0c14fce76 /src | |
parent | d23f63bc4b2b6e246a4542ddd4ad6bd60044805e (diff) | |
download | blt-b34b353473819e0c5907dbd8140a26db0c5cfb09.zip blt-b34b353473819e0c5907dbd8140a26db0c5cfb09.tar.gz blt-b34b353473819e0c5907dbd8140a26db0c5cfb09.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrAxis.h | 8 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 30 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 66 | ||||
-rw-r--r-- | src/bltGrElemOp.C | 2 | ||||
-rw-r--r-- | src/bltGrElemOp.h | 2 | ||||
-rw-r--r-- | src/bltGrHairs.C | 2 | ||||
-rw-r--r-- | src/bltGrLegd.C | 12 | ||||
-rw-r--r-- | src/bltGrMarker.C | 38 | ||||
-rw-r--r-- | src/bltGrPSOutput.C | 12 | ||||
-rw-r--r-- | src/bltGrPSOutput.h | 6 | ||||
-rw-r--r-- | src/bltGrPenOp.C | 22 | ||||
-rw-r--r-- | src/bltGrText.h | 4 | ||||
-rw-r--r-- | src/bltGraph.h | 10 |
13 files changed, 94 insertions, 120 deletions
diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h index 669f87f..27cfe82 100644 --- a/src/bltGrAxis.h +++ b/src/bltGrAxis.h @@ -52,7 +52,7 @@ typedef struct { * array of alternatingly drawn pixel * values. */ int lineWidth; /* Width of the grid lines */ - XColor *color; /* Color of the grid lines */ + XColor* color; /* Color of the grid lines */ GC gc; /* Graphics context for the grid. */ Segment2d *segments; /* Array of line segments representing the @@ -278,7 +278,7 @@ typedef struct { short int width, height; /* Extents of axis */ short int maxTickWidth, maxTickHeight; Tk_3DBorder normalBg; - XColor *activeFgColor; + XColor* activeFgColor; int relief; int borderWidth; @@ -288,7 +288,7 @@ typedef struct { Tk_Font tickFont; Tk_Anchor tickAnchor; Tk_Anchor reqTickAnchor; - XColor *tickColor; + XColor* tickColor; GC tickGC; /* Graphics context for axis and tick * labels */ GC activeTickGC; @@ -297,7 +297,7 @@ typedef struct { Tk_Font titleFont; Tk_Anchor titleAnchor; Tk_Justify titleJustify; - XColor *titleColor; + XColor* titleColor; Grid major, minor; /* Axis grid information. */ diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index be16ecd..fc97294 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -67,7 +67,7 @@ typedef struct { Graph* graphPtr; /* Graph that the pen is associated * with. */ /* Barchart specific pen fields start here. */ - XColor *outlineColor; /* Outline (foreground) color of bar */ + XColor* outlineColor; /* Outline (foreground) color of bar */ Tk_3DBorder fill; /* 3D border and fill (background) * color */ int borderWidth; /* 3D border width of bar */ @@ -83,7 +83,7 @@ typedef struct { int errorBarLineWidth; /* Width of the error bar segments. */ int errorBarCapWidth; - XColor *errorBarColor; /* Color of the error bar. */ + XColor* errorBarColor; /* Color of the error bar. */ GC errorBarGC; /* Error bar graphics context. */ @@ -100,7 +100,7 @@ typedef struct { typedef struct { Weight weight; /* Weight range where this pen is * valid. */ - BarPen *penPtr; /* Pen to use. */ + BarPen* penPtr; /* Pen to use. */ XRectangle *bars; /* Indicates starting location in bar * array for this pen. */ @@ -533,7 +533,7 @@ static int ConfigurePenProc(Graph* graphPtr, Pen *basePtr) // errorBarGC gcMask = GCForeground | GCLineWidth; - XColor *colorPtr = penPtr->errorBarColor; + XColor* colorPtr = penPtr->errorBarColor; if (!colorPtr) colorPtr = penPtr->outlineColor; gcValues.foreground = colorPtr->pixel; @@ -1363,7 +1363,7 @@ static void DrawSymbolProc(Graph* graphPtr, Drawable drawable, Element *basePtr, int x, int y, int size) { BarElement *elemPtr = (BarElement *)basePtr; - BarPen *penPtr; + BarPen* penPtr; int radius; penPtr = NORMALPEN(elemPtr); @@ -1420,7 +1420,7 @@ static void UnsetBackgroundClipRegion(Tk_Window tkwin, Tk_3DBorder border) XSetClipMask(display, gc, None); } -static void DrawBarSegments(Graph* graphPtr, Drawable drawable, BarPen *penPtr, +static void DrawBarSegments(Graph* graphPtr, Drawable drawable, BarPen* penPtr, XRectangle *bars, int nBars) { TkRegion rgn; @@ -1484,7 +1484,7 @@ static void DrawBarSegments(Graph* graphPtr, Drawable drawable, BarPen *penPtr, static void DrawBarValues(Graph* graphPtr, Drawable drawable, BarElement *elemPtr, - BarPen *penPtr, XRectangle *bars, int nBars, + BarPen* penPtr, XRectangle *bars, int nBars, int *barToData) { XRectangle *rp, *rend; @@ -1543,7 +1543,7 @@ static void DrawNormalBarProc(Graph* graphPtr, Drawable drawable, for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link; link = Blt_Chain_NextLink(link)) { BarStyle *stylePtr; - BarPen *penPtr; + BarPen* penPtr; stylePtr = Blt_Chain_GetValue(link); penPtr = stylePtr->penPtr; @@ -1574,7 +1574,7 @@ static void DrawActiveBarProc(Graph* graphPtr, Drawable drawable, BarElement *elemPtr = (BarElement *)basePtr; if (elemPtr->activePenPtr) { - BarPen *penPtr = elemPtr->activePenPtr; + BarPen* penPtr = elemPtr->activePenPtr; if (elemPtr->nActiveIndices > 0) { if (elemPtr->flags & ACTIVE_PENDING) { @@ -1602,7 +1602,7 @@ static void SymbolToPostScriptProc(Graph* graphPtr, Blt_Ps ps, Element *basePtr, double x, double y, int size) { BarElement *elemPtr = (BarElement *)basePtr; - BarPen *penPtr; + BarPen* penPtr; penPtr = NORMALPEN(elemPtr); if (!penPtr->fill && !penPtr->outlineColor) @@ -1635,7 +1635,7 @@ static void SymbolToPostScriptProc(Graph* graphPtr, Blt_Ps ps, Element *basePtr, Blt_Ps_Format(ps, "%g %g %d Sq\n", x, y, size); } -static void SegmentsToPostScript(Graph* graphPtr, Blt_Ps ps, BarPen *penPtr, +static void SegmentsToPostScript(Graph* graphPtr, Blt_Ps ps, BarPen* penPtr, XRectangle *bars, int nBars) { XRectangle *rp, *rend; @@ -1675,7 +1675,7 @@ static void SegmentsToPostScript(Graph* graphPtr, Blt_Ps ps, BarPen *penPtr, static void BarValuesToPostScript(Graph* graphPtr, Blt_Ps ps, BarElement *elemPtr, - BarPen *penPtr, XRectangle *bars, int nBars, + BarPen* penPtr, XRectangle *bars, int nBars, int *barToData) { XRectangle *rp, *rend; @@ -1727,7 +1727,7 @@ static void ActiveBarToPostScriptProc(Graph* graphPtr, Blt_Ps ps, BarElement *elemPtr = (BarElement *)basePtr; if (elemPtr->activePenPtr) { - BarPen *penPtr = elemPtr->activePenPtr; + BarPen* penPtr = elemPtr->activePenPtr; if (elemPtr->nActiveIndices > 0) { if (elemPtr->flags & ACTIVE_PENDING) { @@ -1761,8 +1761,8 @@ static void NormalBarToPostScriptProc(Graph* graphPtr, Blt_Ps ps, for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link; link = Blt_Chain_NextLink(link)) { BarStyle *stylePtr; - BarPen *penPtr; - XColor *colorPtr; + BarPen* penPtr; + XColor* colorPtr; stylePtr = Blt_Chain_GetValue(link); penPtr = stylePtr->penPtr; diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 98902c3..9bdb77e 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -91,13 +91,13 @@ typedef struct { int size; /* Requested size of symbol in pixels */ - XColor *outlineColor; /* Outline color */ + XColor* outlineColor; /* Outline color */ int outlineWidth; /* Width of the outline */ GC outlineGC; /* Outline graphics context */ - XColor *fillColor; /* Normal fill color */ + XColor* fillColor; /* Normal fill color */ GC fillGC; /* Fill graphics context */ @@ -147,9 +147,9 @@ typedef struct { Blt_Dashes traceDashes; /* Dash on-off list value */ - XColor *traceColor; /* Line segment color */ + XColor* traceColor; /* Line segment color */ - XColor *traceOffColor; /* Line segment dash gap color */ + XColor* traceOffColor; /* Line segment dash gap color */ GC traceGC; /* Line segment graphics context */ @@ -161,7 +161,7 @@ typedef struct { int errorBarCapWidth; /* Width of the cap on error bars. */ - XColor *errorBarColor; /* Color of the error bar. */ + XColor* errorBarColor; /* Color of the error bar. */ GC errorBarGC; /* Error bar graphics context. */ @@ -178,7 +178,7 @@ typedef struct { typedef struct { Weight weight; /* Weight range where this pen is * valid. */ - LinePen *penPtr; /* Pen to use. */ + LinePen* penPtr; /* Pen to use. */ GraphPoints symbolPts; GraphSegments lines; /* Points to start of the line segments @@ -255,8 +255,8 @@ typedef struct { /* Drawing-related data structures. */ /* Area-under-curve fill attributes. */ - XColor *fillFgColor; - XColor *fillBgColor; + XColor* fillFgColor; + XColor* fillBgColor; GC fillGC; Tk_3DBorder fillBg; /* Background for fill area. */ @@ -693,7 +693,7 @@ Element * Blt_LineElement(Graph* graphPtr, const char *name, ClassId classId) Pen* Blt_LinePen(Graph* graphPtr, const char* penName) { - LinePen *penPtr = calloc(1, sizeof(LinePen)); + LinePen* penPtr = calloc(1, sizeof(LinePen)); InitLinePen(graphPtr, penPtr); penPtr->name = Blt_Strdup(penName); penPtr->classId = CID_ELEM_LINE; @@ -820,7 +820,7 @@ static int ConfigurePenProc(Graph* graphPtr, Pen* basePtr) unsigned long gcMask; GC newGC; XGCValues gcValues; - XColor *colorPtr; + XColor* colorPtr; // Set the outline GC for this pen: GCForeground is outline color. // GCBackground is the fill color (only used for bitmap symbols). @@ -2064,7 +2064,7 @@ static void MapLineProc(Graph* graphPtr, Element *basePtr) for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link; link = Blt_Chain_NextLink(link)) { LineStyle *stylePtr; - LinePen *penPtr; + LinePen* penPtr; stylePtr = Blt_Chain_GetValue(link); penPtr = (LinePen *)stylePtr->penPtr; @@ -2412,7 +2412,7 @@ static void ClosestLineProc(Graph* graphPtr, Element *basePtr, mode = searchPtr->mode; if (mode == SEARCH_AUTO) { - LinePen *penPtr; + LinePen* penPtr; penPtr = NORMALPEN(elemPtr); mode = SEARCH_POINTS; @@ -2456,7 +2456,7 @@ static void ClosestLineProc(Graph* graphPtr, Element *basePtr, #define MAX_DRAWARCS(d) Blt_MaxRequestSize(d, sizeof(XArc)) static void DrawCircles(Display *display, Drawable drawable, - LineElement *elemPtr, LinePen *penPtr, + LineElement *elemPtr, LinePen* penPtr, int nSymbolPts, Point2d *symbolPts, int radius) { int i; @@ -2516,7 +2516,7 @@ static void DrawCircles(Display *display, Drawable drawable, } static void DrawSquares(Display *display, Drawable drawable, - LineElement *elemPtr, LinePen *penPtr, + LineElement *elemPtr, LinePen* penPtr, int nSymbolPts, Point2d *symbolPts, int r) { XRectangle *rectangles; @@ -2573,7 +2573,7 @@ static void DrawSquares(Display *display, Drawable drawable, } static void DrawSymbols(Graph* graphPtr, Drawable drawable, - LineElement *elemPtr, LinePen *penPtr, + LineElement *elemPtr, LinePen* penPtr, int size, int nSymbolPts, Point2d *symbolPts) { XPoint pattern[13]; /* Template for polygon symbols */ @@ -3106,7 +3106,7 @@ static void DrawSymbolProc(Graph* graphPtr, Drawable drawable, Element *basePtr, int x, int y, int size) { LineElement *elemPtr = (LineElement *)basePtr; - LinePen *penPtr; + LinePen* penPtr; penPtr = NORMALPEN(elemPtr); if (penPtr->traceWidth > 0) { @@ -3129,7 +3129,7 @@ static void DrawSymbolProc(Graph* graphPtr, Drawable drawable, } static void DrawTraces(Graph* graphPtr, Drawable drawable, - LineElement *elemPtr, LinePen *penPtr) + LineElement *elemPtr, LinePen* penPtr) { Blt_ChainLink link; XPoint *points; @@ -3200,7 +3200,7 @@ static void DrawTraces(Graph* graphPtr, Drawable drawable, } static void DrawValues(Graph* graphPtr, Drawable drawable, - LineElement *elemPtr, LinePen *penPtr, + LineElement *elemPtr, LinePen* penPtr, int length, Point2d *points, int *map) { Point2d *pp, *endp; @@ -3242,7 +3242,7 @@ static void DrawActiveLineProc(Graph* graphPtr, Drawable drawable, Element *basePtr) { LineElement *elemPtr = (LineElement *)basePtr; - LinePen *penPtr = (LinePen *)elemPtr->activePenPtr; + LinePen* penPtr = (LinePen *)elemPtr->activePenPtr; int symbolSize; if (penPtr == NULL) { @@ -3325,7 +3325,7 @@ static void DrawNormalLineProc(Graph* graphPtr, Drawable drawable, for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link; link = Blt_Chain_NextLink(link)) { LineStyle *stylePtr; - LinePen *penPtr; + LinePen* penPtr; stylePtr = Blt_Chain_GetValue(link); penPtr = (LinePen *)stylePtr->penPtr; @@ -3336,7 +3336,7 @@ static void DrawNormalLineProc(Graph* graphPtr, Drawable drawable, } } } else { - LinePen *penPtr; + LinePen* penPtr; penPtr = NORMALPEN(elemPtr); if ((Blt_Chain_GetLength(elemPtr->traces) > 0) && @@ -3366,7 +3366,7 @@ static void DrawNormalLineProc(Graph* graphPtr, Drawable drawable, for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link; link = Blt_Chain_NextLink(link)) { LineStyle *stylePtr; - LinePen *penPtr; + LinePen* penPtr; stylePtr = Blt_Chain_GetValue(link); penPtr = (LinePen *)stylePtr->penPtr; @@ -3395,7 +3395,7 @@ static void DrawNormalLineProc(Graph* graphPtr, Drawable drawable, } static void GetSymbolPostScriptInfo(Graph* graphPtr, Blt_Ps ps, - LinePen *penPtr, int size) + LinePen* penPtr, int size) { /* Set line and foreground attributes */ XColor* fillColor = penPtr->symbol.fillColor; @@ -3468,7 +3468,7 @@ static void GetSymbolPostScriptInfo(Graph* graphPtr, Blt_Ps ps, Blt_Ps_Append(ps, "} def\n\n"); } -static void SymbolsToPostScript(Graph* graphPtr, Blt_Ps ps, LinePen *penPtr, +static void SymbolsToPostScript(Graph* graphPtr, Blt_Ps ps, LinePen* penPtr, int size, int nSymbolPts, Point2d *symbolPts) { double symbolSize; @@ -3514,7 +3514,7 @@ static void SymbolToPostScriptProc(Graph* graphPtr, Blt_Ps ps, int size) { LineElement *elemPtr = (LineElement *)basePtr; - LinePen *penPtr; + LinePen* penPtr; penPtr = NORMALPEN(elemPtr); if (penPtr->traceWidth > 0) { @@ -3535,7 +3535,7 @@ static void SymbolToPostScriptProc(Graph* graphPtr, Blt_Ps ps, } } -static void SetLineAttributes(Blt_Ps ps, LinePen *penPtr) +static void SetLineAttributes(Blt_Ps ps, LinePen* penPtr) { /* Set the attributes of the line (color, dashes, linewidth) */ Blt_Ps_XSetLineAttributes(ps, penPtr->traceColor, penPtr->traceWidth, @@ -3552,7 +3552,7 @@ static void SetLineAttributes(Blt_Ps ps, LinePen *penPtr) } } -static void TracesToPostScript(Blt_Ps ps, LineElement *elemPtr, LinePen *penPtr) +static void TracesToPostScript(Blt_Ps ps, LineElement *elemPtr, LinePen* penPtr) { Blt_ChainLink link; @@ -3571,7 +3571,7 @@ static void TracesToPostScript(Blt_Ps ps, LineElement *elemPtr, LinePen *penPtr) } } -static void ValuesToPostScript(Blt_Ps ps, LineElement *elemPtr, LinePen *penPtr, +static void ValuesToPostScript(Blt_Ps ps, LineElement *elemPtr, LinePen* penPtr, int nSymbolPts, Point2d *symbolPts, int *pointToData) { @@ -3608,7 +3608,7 @@ static void ActiveLineToPostScriptProc(Graph* graphPtr, Blt_Ps ps, Element *basePtr) { LineElement *elemPtr = (LineElement *)basePtr; - LinePen *penPtr = (LinePen *)elemPtr->activePenPtr; + LinePen* penPtr = (LinePen *)elemPtr->activePenPtr; int symbolSize; if (penPtr == NULL) { @@ -3683,7 +3683,7 @@ static void NormalLineToPostScriptProc(Graph* graphPtr, Blt_Ps ps, for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link; link = Blt_Chain_NextLink(link)) { LineStyle *stylePtr; - LinePen *penPtr; + LinePen* penPtr; stylePtr = Blt_Chain_GetValue(link); penPtr = (LinePen *)stylePtr->penPtr; @@ -3696,7 +3696,7 @@ static void NormalLineToPostScriptProc(Graph* graphPtr, Blt_Ps ps, } } } else { - LinePen *penPtr; + LinePen* penPtr; penPtr = NORMALPEN(elemPtr); if ((Blt_Chain_GetLength(elemPtr->traces) > 0) && @@ -3711,8 +3711,8 @@ static void NormalLineToPostScriptProc(Graph* graphPtr, Blt_Ps ps, for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link; link = Blt_Chain_NextLink(link)) { LineStyle *stylePtr; - LinePen *penPtr; - XColor *colorPtr; + LinePen* penPtr; + XColor* colorPtr; stylePtr = Blt_Chain_GetValue(link); penPtr = (LinePen *)stylePtr->penPtr; diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index 18da82f..1f67bc6 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -1036,7 +1036,7 @@ static int GetPenStyleFromObj(Tcl_Interp *interp, Graph* graphPtr, Tcl_Obj *objPtr, ClassId classId, PenStyle *stylePtr) { - Pen *penPtr; + Pen* penPtr; Tcl_Obj **objv; int objc; diff --git a/src/bltGrElemOp.h b/src/bltGrElemOp.h index 46186eb..f15eb6e 100644 --- a/src/bltGrElemOp.h +++ b/src/bltGrElemOp.h @@ -111,7 +111,7 @@ typedef struct { } PenStyle; typedef struct { - XColor *color; /* Color of error bar */ + XColor* color; /* Color of error bar */ int lineWidth; /* Width of the error bar segments. */ GC gc; int show; /* Flags for errorbars: none, x, y, or both */ diff --git a/src/bltGrHairs.C b/src/bltGrHairs.C index 2ae1899..f115bfa 100644 --- a/src/bltGrHairs.C +++ b/src/bltGrHairs.C @@ -55,7 +55,7 @@ struct _Crosshairs { int lineWidth; /* Width of the simulated crosshair lines */ XSegment segArr[2]; /* Positions of line segments representing the * simulated crosshairs. */ - XColor *colorPtr; /* Foreground color of crosshairs */ + XColor* colorPtr; /* Foreground color of crosshairs */ GC gc; /* Graphics context for crosshairs. Set to * GXxor to not require redraws of graph */ }; diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index 226efcc..526e6dd 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -113,10 +113,10 @@ struct _Legend { int maxSymSize; /* Size of largest symbol to be * displayed. Used to calculate size * of legend */ - XColor *fgColor; + XColor* fgColor; Tk_3DBorder activeBg; /* Active legend entry background * color. */ - XColor *activeFgColor; + XColor* activeFgColor; int activeRelief; /* 3-D effect on active entry. */ int entryBW; /* Border width around each entry in * legend. */ @@ -130,13 +130,13 @@ struct _Legend { int selRelief; int selBW; - XColor *selInFocusFgColor; /* Text color of a selected entry. */ - XColor *selOutFocusFgColor; + XColor* selInFocusFgColor; /* Text color of a selected entry. */ + XColor* selOutFocusFgColor; Tk_3DBorder selInFocusBg; Tk_3DBorder selOutFocusBg; - XColor *focusColor; + XColor* focusColor; Blt_Dashes focusDashes; /* Dash on-off value. */ GC focusGC; /* Graphics context for the active * label. */ @@ -1693,7 +1693,7 @@ void Blt_DrawLegend(Graph* graphPtr, Drawable drawable) count++; if (legendPtr->focusPtr == elemPtr) { /* Focus outline */ if (isSelected) { - XColor *color; + XColor* color; color = (legendPtr->flags & FOCUS) ? legendPtr->selInFocusFgColor : diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C index 19f1e3d..b4d031b 100644 --- a/src/bltGrMarker.C +++ b/src/bltGrMarker.C @@ -245,7 +245,7 @@ typedef struct { Point2d anchorPt; /* Translated anchor point. */ XColor *outlineColor; /* Foreground color */ - XColor *fillColor; /* Background color */ + XColor* fillColor; /* Background color */ GC gc; /* Private graphic context */ GC fillGC; /* Shared graphic context */ @@ -367,8 +367,8 @@ typedef struct { int state; - XColor *fillColor; - XColor *outlineColor; /* Foreground and background colors */ + XColor* fillColor; + XColor* outlineColor; /* Foreground and background colors */ int lineWidth; /* Line width. */ int capStyle; /* Cap style. */ @@ -656,7 +656,7 @@ typedef struct { TextStyle style; /* Text attributes (font, fg, anchor, * etc) */ Point2d outline[5]; - XColor *fillColor; + XColor* fillColor; GC fillGC; } TextMarker; @@ -1158,7 +1158,7 @@ GetColorPair( ColorPair *pairPtr, int allowDefault) { - XColor *fgColor, *bgColor; + XColor* fgColor, *bgColor; const char *string; fgColor = bgColor = NULL; @@ -1286,20 +1286,7 @@ ObjToColorPairProc( return TCL_OK; } -/* - *--------------------------------------------------------------------------- - * - * NameOfColor -- - * - * Convert the color option value into a string. - * - * Results: - * The static string representing the color option is returned. - * - *--------------------------------------------------------------------------- - */ -static const char * -NameOfColor(XColor *colorPtr) +static const char* NameOfColor(XColor* colorPtr) { if (colorPtr == NULL) { return ""; @@ -1310,19 +1297,6 @@ NameOfColor(XColor *colorPtr) } } -/* - *--------------------------------------------------------------------------- - * - * ColorPairToObjProc -- - * - * Convert the color pairs into color names. - * - * Results: - * The string representing the symbol color is returned. - * - *--------------------------------------------------------------------------- - */ -/*ARGSUSED*/ static Tcl_Obj * ColorPairToObjProc( ClientData clientData, /* Not used. */ diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C index fb72293..30c79a7 100644 --- a/src/bltGrPSOutput.C +++ b/src/bltGrPSOutput.C @@ -413,7 +413,7 @@ Blt_Ps_IncludeFile(Tcl_Interp *interp, Blt_Ps ps, const char *fileName) *--------------------------------------------------------------------------- */ static void -XColorToPostScript(Blt_Ps ps, XColor *colorPtr) +XColorToPostScript(Blt_Ps ps, XColor* colorPtr) { /* * Shift off the lower byte before dividing because some versions of Tk @@ -426,7 +426,7 @@ XColorToPostScript(Blt_Ps ps, XColor *colorPtr) } void -Blt_Ps_XSetBackground(PostScript *psPtr, XColor *colorPtr) +Blt_Ps_XSetBackground(PostScript *psPtr, XColor* colorPtr) { /* If the color name exists in TCL array variable, use that translation */ if ((psPtr->setupPtr != NULL) && (psPtr->setupPtr->colorVarName != NULL)) { @@ -447,7 +447,7 @@ Blt_Ps_XSetBackground(PostScript *psPtr, XColor *colorPtr) } void -Blt_Ps_XSetForeground(PostScript *psPtr, XColor *colorPtr) +Blt_Ps_XSetForeground(PostScript *psPtr, XColor* colorPtr) { /* If the color name exists in TCL array variable, use that translation */ if ((psPtr->setupPtr != NULL) && (psPtr->setupPtr->colorVarName != NULL)) { @@ -688,7 +688,7 @@ Blt_Ps_XSetDashes(Blt_Ps ps, Blt_Dashes *dashesPtr) void Blt_Ps_XSetLineAttributes( Blt_Ps ps, - XColor *colorPtr, + XColor* colorPtr, int lineWidth, Blt_Dashes *dashesPtr, int capStyle, @@ -810,8 +810,8 @@ Blt_Ps_Draw3DRectangle( { Point2d points[7]; TkBorder *borderPtr = (TkBorder *) border; - XColor *lightPtr, *darkPtr; - XColor *topPtr, *bottomPtr; + XColor* lightPtr, *darkPtr; + XColor* topPtr, *bottomPtr; XColor light, dark; int twiceWidth = (borderWidth * 2); diff --git a/src/bltGrPSOutput.h b/src/bltGrPSOutput.h index 9c3c34f..d97b193 100644 --- a/src/bltGrPSOutput.h +++ b/src/bltGrPSOutput.h @@ -134,18 +134,18 @@ extern int Blt_Ps_SaveFile(Tcl_Interp *interp, Blt_Ps ps, extern void Blt_Ps_XSetLineWidth(Blt_Ps ps, int lineWidth); -extern void Blt_Ps_XSetBackground(Blt_Ps ps, XColor *colorPtr); +extern void Blt_Ps_XSetBackground(Blt_Ps ps, XColor* colorPtr); extern void Blt_Ps_XSetBitmapData(Blt_Ps ps, Display *display, Pixmap bitmap, int width, int height); -extern void Blt_Ps_XSetForeground(Blt_Ps ps, XColor *colorPtr); +extern void Blt_Ps_XSetForeground(Blt_Ps ps, XColor* colorPtr); extern void Blt_Ps_XSetFont(Blt_Ps ps, Tk_Font font); extern void Blt_Ps_XSetDashes(Blt_Ps ps, Blt_Dashes *dashesPtr); -extern void Blt_Ps_XSetLineAttributes(Blt_Ps ps, XColor *colorPtr, +extern void Blt_Ps_XSetLineAttributes(Blt_Ps ps, XColor* colorPtr, int lineWidth, Blt_Dashes *dashesPtr, int capStyle, int joinStyle); extern void Blt_Ps_XSetStipple(Blt_Ps ps, Display *display, Pixmap bitmap); diff --git a/src/bltGrPenOp.C b/src/bltGrPenOp.C index c9825f4..195f50f 100644 --- a/src/bltGrPenOp.C +++ b/src/bltGrPenOp.C @@ -75,7 +75,7 @@ static int PenSetProc(ClientData clientData, Tcl_Interp *interp, *penPtrPtr = NULL; } else { - Pen *penPtr; + Pen* penPtr; Graph* graphPtr = Blt_GetGraphFromWindowData(tkwin); ClassId classId = (ClassId)clientData; /* Element type. */ @@ -109,7 +109,7 @@ int Blt_CreatePen(Graph* graphPtr, Tcl_Interp* interp, const char* penName, ClassId classId, int objc, Tcl_Obj* const objv[]) { - Pen *penPtr; + Pen* penPtr; int isNew; Tcl_HashEntry *hPtr = Tcl_CreateHashEntry(&graphPtr->penTable, penName, &isNew); @@ -175,7 +175,7 @@ static int CgetOp(Tcl_Interp* interp, Graph* graphPtr, return TCL_ERROR; } - Pen *penPtr; + Pen* penPtr; if (GetPenFromObj(interp, graphPtr, objv[3], &penPtr) != TCL_OK) return TCL_ERROR; @@ -270,7 +270,7 @@ static int DeleteOp(Tcl_Interp *interp, Graph* graphPtr, int i; for (i = 3; i < objc; i++) { - Pen *penPtr; + Pen* penPtr; if (GetPenFromObj(interp, graphPtr, objv[i], &penPtr) != TCL_OK) { return TCL_ERROR; @@ -301,7 +301,7 @@ static int NamesOp(Tcl_Interp *interp, Graph* graphPtr, for (hPtr = Tcl_FirstHashEntry(&graphPtr->penTable, &iter); hPtr != NULL; hPtr = Tcl_NextHashEntry(&iter)) { - Pen *penPtr; + Pen* penPtr; penPtr = Tcl_GetHashValue(hPtr); if ((penPtr->flags & DELETE_PENDING) == 0) { @@ -315,7 +315,7 @@ static int NamesOp(Tcl_Interp *interp, Graph* graphPtr, for (hPtr = Tcl_FirstHashEntry(&graphPtr->penTable, &iter); hPtr != NULL; hPtr = Tcl_NextHashEntry(&iter)) { - Pen *penPtr; + Pen* penPtr; penPtr = Tcl_GetHashValue(hPtr); if ((penPtr->flags & DELETE_PENDING) == 0) { @@ -341,7 +341,7 @@ static int NamesOp(Tcl_Interp *interp, Graph* graphPtr, static int TypeOp(Tcl_Interp *interp, Graph* graphPtr, int objc, Tcl_Obj *const *objv) { - Pen *penPtr; + Pen* penPtr; if (GetPenFromObj(interp, graphPtr, objv[3], &penPtr) != TCL_OK) return TCL_ERROR; @@ -382,7 +382,7 @@ void Blt_DestroyPens(Graph* graphPtr) for (hPtr = Tcl_FirstHashEntry(&graphPtr->penTable, &iter); hPtr != NULL; hPtr = Tcl_NextHashEntry(&iter)) { - Pen *penPtr; + Pen* penPtr; penPtr = Tcl_GetHashValue(hPtr); penPtr->hashPtr = NULL; @@ -391,7 +391,7 @@ void Blt_DestroyPens(Graph* graphPtr) Tcl_DeleteHashTable(&graphPtr->penTable); } -void Blt_FreePen(Pen *penPtr) +void Blt_FreePen(Pen* penPtr) { if (penPtr != NULL) { penPtr->refCount--; @@ -404,7 +404,7 @@ void Blt_FreePen(Pen *penPtr) int Blt_GetPenFromObj(Tcl_Interp *interp, Graph* graphPtr, Tcl_Obj *objPtr, ClassId classId, Pen **penPtrPtr) { - Pen *penPtr = NULL; + Pen* penPtr = NULL; const char *name = Tcl_GetString(objPtr); Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&graphPtr->penTable, name); if (hPtr != NULL) { @@ -438,7 +438,7 @@ static int GetPenFromObj(Tcl_Interp *interp, Graph* graphPtr, Tcl_Obj *objPtr, Pen **penPtrPtr) { Tcl_HashEntry *hPtr; - Pen *penPtr; + Pen* penPtr; const char *name; penPtr = NULL; diff --git a/src/bltGrText.h b/src/bltGrText.h index 069eccc..3f1cc61 100644 --- a/src/bltGrText.h +++ b/src/bltGrText.h @@ -48,7 +48,7 @@ typedef struct { unsigned int state; /* If non-zero, indicates to draw text * in the active color */ - XColor *color; /* Color to draw the text. */ + XColor* color; /* Color to draw the text. */ Tk_Font font; /* Font to use to draw text */ double angle; /* Rotation of text in degrees. */ Tk_Justify justify; /* Justification of the text @@ -112,7 +112,7 @@ extern void Blt_Ts_DrawText(Tk_Window tkwin, Drawable drawable, #define Blt_Ts_InitStyle(ts) \ ((ts).anchor = TK_ANCHOR_NW, \ - (ts).color = (XColor *)NULL, \ + (ts).color = (XColor*)NULL, \ (ts).font = NULL, \ (ts).justify = TK_JUSTIFY_LEFT, \ (ts).leader = 0, \ diff --git a/src/bltGraph.h b/src/bltGraph.h index bba786e..5b9f79c 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -173,8 +173,8 @@ typedef struct _Pen Pen; typedef struct _Marker Marker; typedef Pen *(PenCreateProc)(void); -typedef int (PenConfigureProc)(Graph* graphPtr, Pen *penPtr); -typedef void (PenDestroyProc)(Graph* graphPtr, Pen *penPtr); +typedef int (PenConfigureProc)(Graph* graphPtr, Pen* penPtr); +typedef void (PenDestroyProc)(Graph* graphPtr, Pen* penPtr); /* *--------------------------------------------------------------------------- @@ -255,10 +255,10 @@ struct _Graph { * draw around widget when it has the * focus. <= 0 means don't draw a * highlight. */ - XColor *highlightBgColor; /* Color for drawing traversal + XColor* highlightBgColor; /* Color for drawing traversal * highlight area when highlight is * off. */ - XColor *highlightColor; /* Color for drawing traversal + XColor* highlightColor; /* Color for drawing traversal * highlight. */ const char *title; /* Graph title */ short int titleX, titleY; /* Position of title on graph. */ @@ -566,7 +566,7 @@ extern int Blt_InitLinePens(Graph* graphPtr); extern int Blt_InitBarPens(Graph* graphPtr); -extern void Blt_FreePen(Pen *penPtr); +extern void Blt_FreePen(Pen* penPtr); extern int Blt_VirtualAxisOp(Graph* graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); |