diff options
author | joye <joye> | 2014-04-24 16:27:43 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-24 16:27:43 (GMT) |
commit | 672793e3b2f23fdeefb22f7be6437d2048930188 (patch) | |
tree | 585706134eaccfd75dfdf129682a98f4fff4c815 | |
parent | 930a8fe1233c690bf375a2add02fd610d4bbf3d1 (diff) | |
download | blt-672793e3b2f23fdeefb22f7be6437d2048930188.zip blt-672793e3b2f23fdeefb22f7be6437d2048930188.tar.gz blt-672793e3b2f23fdeefb22f7be6437d2048930188.tar.bz2 |
*** empty log message ***
-rw-r--r-- | src/bltConfig.C | 2 | ||||
-rw-r--r-- | src/bltGrAxis.C | 1 | ||||
-rw-r--r-- | src/bltGrAxisOp.C | 4 | ||||
-rw-r--r-- | src/bltGrAxisOp.h | 7 | ||||
-rw-r--r-- | src/bltGrAxisOption.C | 2 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 2 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 4 | ||||
-rw-r--r-- | src/bltGrElemOp.C | 2 | ||||
-rw-r--r-- | src/bltGrElemOp.h | 7 | ||||
-rw-r--r-- | src/bltGrElemOption.C | 3 | ||||
-rw-r--r-- | src/bltGrHairsOp.C | 2 | ||||
-rw-r--r-- | src/bltGrHairsOp.h | 7 | ||||
-rw-r--r-- | src/bltGrLegdOp.C | 4 | ||||
-rw-r--r-- | src/bltGrLegdOp.h | 9 | ||||
-rw-r--r-- | src/bltGrMarkerOp.C | 2 | ||||
-rw-r--r-- | src/bltGrMarkerOp.h | 7 | ||||
-rw-r--r-- | src/bltGrMarkerOption.C | 2 | ||||
-rw-r--r-- | src/bltGrMisc.C | 1 | ||||
-rw-r--r-- | src/bltGrPenOp.C | 2 | ||||
-rw-r--r-- | src/bltGrPenOp.h | 7 | ||||
-rw-r--r-- | src/bltGrPostscriptOp.C | 7 | ||||
-rw-r--r-- | src/bltGrPostscriptOp.h | 7 | ||||
-rw-r--r-- | src/bltGrXAxisOp.C | 2 | ||||
-rw-r--r-- | src/bltGrXAxisOp.h | 7 | ||||
-rw-r--r-- | src/bltGraph.C | 4 | ||||
-rw-r--r-- | src/bltGraph.h | 11 | ||||
-rw-r--r-- | src/bltGraphOp.C | 3 | ||||
-rw-r--r-- | src/bltInt.C | 5 | ||||
-rw-r--r-- | src/bltSwitch.C | 2 | ||||
-rw-r--r-- | src/bltVecCmd.C | 3 | ||||
-rw-r--r-- | src/bltVecMath.C | 3 | ||||
-rw-r--r-- | src/bltVector.C | 3 |
32 files changed, 76 insertions, 58 deletions
diff --git a/src/bltConfig.C b/src/bltConfig.C index e93c08e..cfddd47 100644 --- a/src/bltConfig.C +++ b/src/bltConfig.C @@ -37,6 +37,8 @@ */ #include <stdarg.h> +#include <stdlib.h> +#include <string.h> extern "C" { #include "bltInt.h" diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C index f0edb23..6a17c3a 100644 --- a/src/bltGrAxis.C +++ b/src/bltGrAxis.C @@ -28,6 +28,7 @@ */ #include <math.h> +#include <float.h> extern "C" { #include "bltInt.h" diff --git a/src/bltGrAxisOp.C b/src/bltGrAxisOp.C index 166cd04..2b2b119 100644 --- a/src/bltGrAxisOp.C +++ b/src/bltGrAxisOp.C @@ -27,6 +27,8 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <math.h> + extern "C" { #include "bltInt.h" #include "bltBind.h" @@ -352,7 +354,7 @@ static int ViewOp(ClientData clientData, Tcl_Interp* interp, return AxisViewOp(axisPtr, interp, objc-1, objv+1); } -const TkEnsemble axisEnsemble[] = { +const Ensemble axisEnsemble[] = { {"activate", ActivateOp, 0}, {"bind", BindOp, 0}, {"cget", CgetOp,0 }, diff --git a/src/bltGrAxisOp.h b/src/bltGrAxisOp.h index 4d7affb..621a3e4 100644 --- a/src/bltGrAxisOp.h +++ b/src/bltGrAxisOp.h @@ -30,12 +30,9 @@ #ifndef __BltGrAxisOp_h__ #define __BltGrAxisOp_h__ -#include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif +#include "bltGraph.h" -extern const TkEnsemble axisEnsemble[]; +extern const Ensemble axisEnsemble[]; extern int AxisObjConfigure(Axis* axisPtr, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]); diff --git a/src/bltGrAxisOption.C b/src/bltGrAxisOption.C index 027c6e0..e6a47e6 100644 --- a/src/bltGrAxisOption.C +++ b/src/bltGrAxisOption.C @@ -27,6 +27,8 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <math.h> + extern "C" { #include "bltInt.h" }; diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index 2ae740e..ee96f07 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -27,6 +27,8 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <float.h> + extern "C" { #include "bltInt.h" }; diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 40f754a..3ebcdfd 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -27,6 +27,9 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <float.h> +#include <math.h> + #include "bltGraph.h" #include "bltSpline.h" #include "bltGrElemLine.h" @@ -54,6 +57,7 @@ using namespace Blt; #define SCALE_SYMBOL (1<<10) +#define MAX(a,b) (((a)>(b))?(a):(b)) #define MIN3(a,b,c) (((a)<(b))?(((a)<(c))?(a):(c)):(((b)<(c))?(b):(c))) #define PointInRegion(e,x,y) (((x) <= (e)->right) && ((x) >= (e)->left) && ((y) <= (e)->bottom) && ((y) >= (e)->top)) diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index 0d1f27c..2c01054 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -521,7 +521,7 @@ static int TypeOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } -const TkEnsemble elementEnsemble[] = { +const Ensemble elementEnsemble[] = { {"activate", ActivateOp, 0}, {"bind", BindOp, 0}, {"cget", CgetOp, 0}, diff --git a/src/bltGrElemOp.h b/src/bltGrElemOp.h index 96f83f1..24cd4d5 100644 --- a/src/bltGrElemOp.h +++ b/src/bltGrElemOp.h @@ -30,12 +30,9 @@ #ifndef __BltGrElemOp_h__ #define __BltGrElemOp_h__ -#include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif +#include "bltGraph.h" -extern const TkEnsemble elementEnsemble[]; +extern const Ensemble elementEnsemble[]; extern int ElementObjConfigure(Element* elemPtr, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]); diff --git a/src/bltGrElemOption.C b/src/bltGrElemOption.C index 5d63c06..cea59e1 100644 --- a/src/bltGrElemOption.C +++ b/src/bltGrElemOption.C @@ -27,6 +27,9 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <math.h> +#include <float.h> + extern "C" { #include "bltInt.h" #include "bltChain.h" diff --git a/src/bltGrHairsOp.C b/src/bltGrHairsOp.C index 33bf62d..af3e0ec 100644 --- a/src/bltGrHairsOp.C +++ b/src/bltGrHairsOp.C @@ -160,7 +160,7 @@ static int ToggleOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } -const TkEnsemble crosshairsEnsemble[] = { +const Ensemble crosshairsEnsemble[] = { {"cget", CgetOp, 0}, {"configure", ConfigureOp, 0}, {"off", OffOp, 0}, diff --git a/src/bltGrHairsOp.h b/src/bltGrHairsOp.h index 2c645ff..8306af8 100644 --- a/src/bltGrHairsOp.h +++ b/src/bltGrHairsOp.h @@ -33,11 +33,8 @@ #ifndef __BltGrHairsOp_h__ #define __BltGrHairsOp_h__ -#include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif +#include "bltGraph.h" -extern const TkEnsemble crosshairsEnsemble[]; +extern const Ensemble crosshairsEnsemble[]; #endif diff --git a/src/bltGrLegdOp.C b/src/bltGrLegdOp.C index b6605e4..c76b72f 100644 --- a/src/bltGrLegdOp.C +++ b/src/bltGrLegdOp.C @@ -307,7 +307,7 @@ static int GetOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } -const TkEnsemble legendEnsemble[] = { +const Ensemble legendEnsemble[] = { {"activate", ActivateOp, 0}, {"bind", BindOp, 0}, {"cget", CgetOp, 0}, @@ -486,7 +486,7 @@ static int SelectionSetOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } -const TkEnsemble selectionEnsemble[] = { +const Ensemble selectionEnsemble[] = { {"anchor", SelectionAnchorOp, 0}, {"clear", SelectionSetOp, 0}, {"clearall", SelectionClearallOp, 0}, diff --git a/src/bltGrLegdOp.h b/src/bltGrLegdOp.h index f705b20..1aa3c6e 100644 --- a/src/bltGrLegdOp.h +++ b/src/bltGrLegdOp.h @@ -30,12 +30,9 @@ #ifndef __BltGrLegdOp_h__ #define __BltGrLegdOp_h__ -#include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif +#include "bltGraph.h" -extern const TkEnsemble legendEnsemble[]; -extern const TkEnsemble selectionEnsemble[]; +extern const Ensemble legendEnsemble[]; +extern const Ensemble selectionEnsemble[]; #endif diff --git a/src/bltGrMarkerOp.C b/src/bltGrMarkerOp.C index 0312ab5..61c56f3 100644 --- a/src/bltGrMarkerOp.C +++ b/src/bltGrMarkerOp.C @@ -437,7 +437,7 @@ static int TypeOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } -const TkEnsemble markerEnsemble[] = { +const Ensemble markerEnsemble[] = { {"bind", BindOp, 0}, {"cget", CgetOp, 0}, {"configure", ConfigureOp, 0}, diff --git a/src/bltGrMarkerOp.h b/src/bltGrMarkerOp.h index d6aa9dd..39ba808 100644 --- a/src/bltGrMarkerOp.h +++ b/src/bltGrMarkerOp.h @@ -30,11 +30,8 @@ #ifndef __Blt_GrMarkerOp_h__ #define __Blt_GrMarkerOp_h__ -#include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif +#include "bltGraph.h" -extern const TkEnsemble markerEnsemble[]; +extern const Ensemble markerEnsemble[]; #endif diff --git a/src/bltGrMarkerOption.C b/src/bltGrMarkerOption.C index 342171e..0fca358 100644 --- a/src/bltGrMarkerOption.C +++ b/src/bltGrMarkerOption.C @@ -27,6 +27,8 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <float.h> + extern "C" { #include "bltInt.h" }; diff --git a/src/bltGrMisc.C b/src/bltGrMisc.C index 6b983ea..9fa461f 100644 --- a/src/bltGrMisc.C +++ b/src/bltGrMisc.C @@ -33,6 +33,7 @@ #include <string.h> #include <stdlib.h> +#include <tk.h> #ifdef USE_TK_STUBS #include <tkInt.h> #endif diff --git a/src/bltGrPenOp.C b/src/bltGrPenOp.C index beb86b9..d96aab0 100644 --- a/src/bltGrPenOp.C +++ b/src/bltGrPenOp.C @@ -206,7 +206,7 @@ static int TypeOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } -const TkEnsemble penEnsemble[] = { +const Ensemble penEnsemble[] = { {"cget", CgetOp, 0}, {"configure", ConfigureOp, 0}, {"create", CreateOp, 0}, diff --git a/src/bltGrPenOp.h b/src/bltGrPenOp.h index f23291c..58bdc85 100644 --- a/src/bltGrPenOp.h +++ b/src/bltGrPenOp.h @@ -30,12 +30,9 @@ #ifndef __BltGrPenOp_h__ #define __BltGrPenOp_h__ -#include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif +#include "bltGraph.h" -extern const TkEnsemble penEnsemble[]; +extern const Ensemble penEnsemble[]; extern int PenObjConfigure(Graph* graphPtr, Pen* penPtr, Tcl_Interp* interp, diff --git a/src/bltGrPostscriptOp.C b/src/bltGrPostscriptOp.C index 2b968bb..85f83e1 100644 --- a/src/bltGrPostscriptOp.C +++ b/src/bltGrPostscriptOp.C @@ -27,6 +27,11 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <tk.h> +#ifdef USE_TK_STUBS +#include <tkInt.h> +#endif + #include "bltGraph.h" #include "bltGrPageSetup.h" #include "bltGrPageSetupOp.h" @@ -170,7 +175,7 @@ static int OutputOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } -const TkEnsemble pageSetupEnsemble[] = { +const Ensemble pageSetupEnsemble[] = { {"cget", CgetOp, 0}, {"configure", ConfigureOp, 0}, {"output", OutputOp, 0}, diff --git a/src/bltGrPostscriptOp.h b/src/bltGrPostscriptOp.h index 4257138..4ca61c5 100644 --- a/src/bltGrPostscriptOp.h +++ b/src/bltGrPostscriptOp.h @@ -30,12 +30,9 @@ #ifndef __BltGrPageSetupOp_h__ #define __BltGrPageSetupOp_h__ -#include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif +#include "bltGraph.h" -extern const TkEnsemble pageSetupEnsemble[]; +extern const Ensemble pageSetupEnsemble[]; extern int PageSetupObjConfigure(Graph* graphPtr, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]); diff --git a/src/bltGrXAxisOp.C b/src/bltGrXAxisOp.C index 13861e2..00c5061 100644 --- a/src/bltGrXAxisOp.C +++ b/src/bltGrXAxisOp.C @@ -206,7 +206,7 @@ static int ViewOp(ClientData clientData, Tcl_Interp* interp, return AxisViewOp(axisPtr, interp, objc, objv); } -const TkEnsemble xaxisEnsemble[] = { +const Ensemble xaxisEnsemble[] = { {"activate", ActivateOp, 0}, {"bind", BindOp, 0}, {"cget", CgetOp, 0}, diff --git a/src/bltGrXAxisOp.h b/src/bltGrXAxisOp.h index f8a9790..c4318ab 100644 --- a/src/bltGrXAxisOp.h +++ b/src/bltGrXAxisOp.h @@ -30,11 +30,8 @@ #ifndef __BltGrXAxisOp_h__ #define __BltGrXAxisOp_h__ -#include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif +#include "bltGraph.h" -extern const TkEnsemble xaxisEnsemble[]; +extern const Ensemble xaxisEnsemble[]; #endif diff --git a/src/bltGraph.C b/src/bltGraph.C index 799dfcc..4b06ea2 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -27,6 +27,8 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <float.h> + extern "C" { #include "bltInt.h" #include "bltList.h" @@ -504,7 +506,7 @@ void Graph::extents(Region2d* regionPtr) regionPtr->bottom = (double)(vOffset_ + vRange_ + ops->yPad); } -int Graph::invoke(const TkEnsemble* ensemble, int cmdIndex, +int Graph::invoke(const Ensemble* ensemble, int cmdIndex, int objc, Tcl_Obj* const objv[]) { while (cmdIndex < objc) { diff --git a/src/bltGraph.h b/src/bltGraph.h index d040145..e1bb1d6 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -31,9 +31,6 @@ #define __BltGraph_h__ #include <tk.h> -#ifdef USE_TK_STUBS -#include <tkInt.h> -#endif extern "C" { #include "bltChain.h" @@ -57,6 +54,12 @@ namespace Blt { class Marker; }; +typedef struct Ensemble { + const char *name; + Tcl_ObjCmdProc *proc; + const struct Ensemble *subensemble; +} Ensemble; + typedef struct { int halo; int mode; @@ -218,7 +221,7 @@ class Graph { void eventuallyRedraw(); int print(const char*, Blt_Ps); void extents(Region2d*); - int invoke(const TkEnsemble*, int, int, Tcl_Obj* const []); + int invoke(const Ensemble*, int, int, Tcl_Obj* const []); void reconfigure(); void enableCrosshairs(); diff --git a/src/bltGraphOp.C b/src/bltGraphOp.C index d374306..dc2cd03 100644 --- a/src/bltGraphOp.C +++ b/src/bltGraphOp.C @@ -32,6 +32,7 @@ extern "C" { #include "bltList.h" } +#include "bltGraph.h" #include "bltGraphLine.h" #include "bltGraphBar.h" #include "bltGraphOp.h" @@ -309,7 +310,7 @@ static int TransformOp(ClientData clientData, Tcl_Interp* interp, int objc, return TCL_OK; } -static const TkEnsemble graphEnsemble[] = { +static const Ensemble graphEnsemble[] = { {"axis", 0, axisEnsemble}, {"bar", 0, elementEnsemble}, {"cget", CgetOp, 0}, diff --git a/src/bltInt.C b/src/bltInt.C index 5082a69..6c65f39 100644 --- a/src/bltInt.C +++ b/src/bltInt.C @@ -29,12 +29,13 @@ extern "C" { #include "bltInt.h" - -Tcl_AppInitProc Blt_VectorCmdInitProc; Tcl_AppInitProc Tkblt_Init; Tcl_AppInitProc Tkblt_SafeInit; +Tcl_AppInitProc Blt_VectorCmdInitProc; }; +#include <tk.h> + Tcl_AppInitProc Blt_GraphCmdInitProc; int Tkblt_Init(Tcl_Interp* interp) diff --git a/src/bltSwitch.C b/src/bltSwitch.C index a34d3a2..9cf8ae2 100644 --- a/src/bltSwitch.C +++ b/src/bltSwitch.C @@ -27,7 +27,9 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <string.h> #include <stdarg.h> +#include <stdlib.h> extern "C" { #include "bltInt.h" diff --git a/src/bltVecCmd.C b/src/bltVecCmd.C index e5e8af5..3579e2e 100644 --- a/src/bltVecCmd.C +++ b/src/bltVecCmd.C @@ -48,6 +48,9 @@ #include <math.h> #include <float.h> +#include <string.h> +#include <stdlib.h> +#include <ctype.h> #include "bltInt.h" #include "bltVecInt.h" diff --git a/src/bltVecMath.C b/src/bltVecMath.C index 1d5fd21..bb09906 100644 --- a/src/bltVecMath.C +++ b/src/bltVecMath.C @@ -32,6 +32,9 @@ #include <float.h> #include <math.h> +#include <stdlib.h> +#include <errno.h> +#include <ctype.h> #include "bltInt.h" #include "bltVecInt.h" diff --git a/src/bltVector.C b/src/bltVector.C index 09300e3..89b482e 100644 --- a/src/bltVector.C +++ b/src/bltVector.C @@ -46,6 +46,9 @@ #include <float.h> #include <math.h> #include <time.h> +#include <string.h> +#include <stdlib.h> +#include <ctype.h> #include "bltInt.h" #include "bltVecInt.h" |