summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bltGrMarkerBitmap.h2
-rw-r--r--src/bltConfig.h2
-rw-r--r--src/bltGrAxis.C4
-rw-r--r--src/bltGrAxis.h2
-rw-r--r--src/bltGrAxisOp.C4
-rw-r--r--src/bltGrAxisOption.h2
-rw-r--r--src/bltGrBind.h2
-rw-r--r--src/bltGrElem.C2
-rw-r--r--src/bltGrElem.h3
-rw-r--r--src/bltGrElemBar.C3
-rw-r--r--src/bltGrElemBar.h5
-rw-r--r--src/bltGrElemLine.C3
-rw-r--r--src/bltGrElemLine.h2
-rw-r--r--src/bltGrElemOption.h2
-rw-r--r--src/bltGrHairs.h2
-rw-r--r--src/bltGrLegd.C5
-rw-r--r--src/bltGrLegd.h2
-rw-r--r--src/bltGrLegdOp.C5
-rw-r--r--src/bltGrMarker.C3
-rw-r--r--src/bltGrMarker.h2
-rw-r--r--src/bltGrMarkerLine.C3
-rw-r--r--src/bltGrMarkerText.C2
-rw-r--r--src/bltGrMarkerText.h2
-rw-r--r--src/bltGrMisc.C12
-rw-r--r--src/bltGrMisc.h8
-rw-r--r--src/bltGrPSOutput.C2
-rw-r--r--src/bltGrPSOutput.h2
-rw-r--r--src/bltGrPen.h2
-rw-r--r--src/bltGrPenBar.h2
-rw-r--r--src/bltGrPostscript.C2
-rw-r--r--src/bltGrPostscript.h2
-rw-r--r--src/bltGrText.C3
-rw-r--r--src/bltGrText.h2
-rw-r--r--src/bltGraph.h2
-rw-r--r--src/bltGraphBar.h2
-rw-r--r--src/bltGraphLine.h2
-rw-r--r--src/bltGraphOp.C4
-rw-r--r--src/bltGraphOp.h2
-rw-r--r--src/bltGraphSup.C2
39 files changed, 95 insertions, 20 deletions
diff --git a/bltGrMarkerBitmap.h b/bltGrMarkerBitmap.h
index 02b2bf8..fc181a9 100644
--- a/bltGrMarkerBitmap.h
+++ b/bltGrMarkerBitmap.h
@@ -30,6 +30,8 @@
#ifndef __BltGrMarkerBitmap_h__
#define __BltGrMarkerBitmap_h__
+#include <tk.h>
+
#include "bltGrMarker.h"
namespace Blt {
diff --git a/src/bltConfig.h b/src/bltConfig.h
index c1d033a..5da8ca7 100644
--- a/src/bltConfig.h
+++ b/src/bltConfig.h
@@ -33,6 +33,8 @@
#ifndef BLT_CONFIG_H
#define BLT_CONFIG_H
+#include <tk.h>
+
#define BLT_STATE_NORMAL (0)
#define BLT_STATE_ACTIVE (1<<0)
#define BLT_STATE_DISABLED (1<<1)
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index 594d0bd..19cb963 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -27,7 +27,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "bltMath.h"
+#include <math.h>
extern "C" {
#include "bltInt.h"
@@ -43,6 +43,8 @@ extern "C" {
using namespace Blt;
+#define EXP10(x) (pow(10.0,(x)))
+#define ROUND(x) ((int)((x) + (((x)<0.0) ? -0.5 : 0.5)))
#define AXIS_PAD_TITLE 2
#define UROUND(x,u) (Round((x)/(u))*(u))
diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h
index 5980770..c0090cd 100644
--- a/src/bltGrAxis.h
+++ b/src/bltGrAxis.h
@@ -38,6 +38,8 @@
#include <iomanip>
using namespace std;
+#include <tk.h>
+
extern "C" {
#include "bltBind.h"
#include "bltChain.h"
diff --git a/src/bltGrAxisOp.C b/src/bltGrAxisOp.C
index 17f6040..73ca461 100644
--- a/src/bltGrAxisOp.C
+++ b/src/bltGrAxisOp.C
@@ -27,8 +27,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "bltMath.h"
-
extern "C" {
#include "bltInt.h"
#include "bltOp.h"
@@ -42,6 +40,8 @@ extern "C" {
using namespace Blt;
+#define EXP10(x) (pow(10.0,(x)))
+
static int GetAxisScrollInfo(Tcl_Interp* interp,
int objc, Tcl_Obj* const objv[],
double *offsetPtr, double windowSize,
diff --git a/src/bltGrAxisOption.h b/src/bltGrAxisOption.h
index f5f1fa6..4efa8ee 100644
--- a/src/bltGrAxisOption.h
+++ b/src/bltGrAxisOption.h
@@ -30,6 +30,8 @@
#ifndef __BltGrAxisOption_h__
#define __BltGrAxisOption_h__
+#include <tk.h>
+
extern Tk_ObjCustomOption xAxisObjOption;
extern Tk_ObjCustomOption yAxisObjOption;
extern Tk_ObjCustomOption limitObjOption;
diff --git a/src/bltGrBind.h b/src/bltGrBind.h
index ac824a9..2f6dd92 100644
--- a/src/bltGrBind.h
+++ b/src/bltGrBind.h
@@ -30,6 +30,8 @@
#ifndef _BLT_BIND_H
#define _BLT_BIND_H
+#include <tk.h>
+
#include <bltList.h>
typedef struct _Blt_BindTable *Blt_BindTable;
diff --git a/src/bltGrElem.C b/src/bltGrElem.C
index 498b4ff..a5a5223 100644
--- a/src/bltGrElem.C
+++ b/src/bltGrElem.C
@@ -27,6 +27,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <float.h>
+
#include "bltGrElem.h"
#include "bltGrElemOp.h"
#include "bltGrPen.h"
diff --git a/src/bltGrElem.h b/src/bltGrElem.h
index 3500a74..e59ad72 100644
--- a/src/bltGrElem.h
+++ b/src/bltGrElem.h
@@ -35,6 +35,8 @@
#include <iomanip>
using namespace std;
+#include <tk.h>
+
extern "C" {
#include "bltVector.h"
};
@@ -51,6 +53,7 @@ extern "C" {
* in the legend should be drawn in its active
* foreground and background colors. */
+#define MIN(a,b) (((a)<(b))?(a):(b))
#define NUMBEROFPOINTS(e) MIN( (e)->coords.x ? (e)->coords.x->nValues : 0, \
(e)->coords.y ? (e)->coords.y->nValues : 0 )
#define NORMALPEN(e) ((((e)->normalPenPtr == NULL) ? \
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C
index bb66837..ea71727 100644
--- a/src/bltGrElemBar.C
+++ b/src/bltGrElemBar.C
@@ -27,8 +27,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "bltMath.h"
-
extern "C" {
#include "bltInt.h"
};
@@ -47,6 +45,7 @@ extern "C" {
using namespace Blt;
#define CLAMP(x,l,h) ((x) = (((x)<(l))? (l) : ((x)>(h)) ? (h) : (x)))
+#define MIN3(a,b,c) (((a)<(b))?(((a)<(c))?(a):(c)):(((b)<(c))?(b):(c)))
#define PointInRectangle(r,x0,y0) \
(((x0) <= (int)((r)->x + (r)->width - 1)) && ((x0) >= (int)(r)->x) && \
diff --git a/src/bltGrElemBar.h b/src/bltGrElemBar.h
index ee6ad48..fc6143d 100644
--- a/src/bltGrElemBar.h
+++ b/src/bltGrElemBar.h
@@ -35,6 +35,11 @@
#include <iomanip>
using namespace std;
+#include <tk.h>
+#ifdef USE_TK_STUBS
+#include <tkInt.h>
+#endif
+
#include "bltGrElem.h"
#include "bltGrPenBar.h"
diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C
index 6dac4ca..82170fa 100644
--- a/src/bltGrElemLine.C
+++ b/src/bltGrElemLine.C
@@ -27,8 +27,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "bltMath.h"
-
#include "bltSpline.h"
#include "bltGrElemLine.h"
#include "bltGrElemOption.h"
@@ -57,6 +55,7 @@ using namespace Blt;
#define SCALE_SYMBOL (1<<10)
+#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))
#define BROKEN_TRACE(dir,last,next) \
diff --git a/src/bltGrElemLine.h b/src/bltGrElemLine.h
index d0b8c3c..b196825 100644
--- a/src/bltGrElemLine.h
+++ b/src/bltGrElemLine.h
@@ -30,6 +30,8 @@
#ifndef __BltGrElemLine_h__
#define __BltGrElemLine_h__
+#include <tk.h>
+
#include "bltGrElem.h"
#include "bltGrPenLine.h"
diff --git a/src/bltGrElemOption.h b/src/bltGrElemOption.h
index a792159..4312691 100644
--- a/src/bltGrElemOption.h
+++ b/src/bltGrElemOption.h
@@ -30,6 +30,8 @@
#ifndef __BltGrElemOption_h__
#define __BltGrElemOption_h__
+#include <tk.h>
+
extern const char* fillObjOption[];
extern Tk_CustomOptionSetProc StyleSetProc;
extern Tk_CustomOptionGetProc StyleGetProc;
diff --git a/src/bltGrHairs.h b/src/bltGrHairs.h
index 68f9cd5..4d2101b 100644
--- a/src/bltGrHairs.h
+++ b/src/bltGrHairs.h
@@ -38,6 +38,8 @@
#include <iomanip>
using namespace std;
+#include <tk.h>
+
#include "bltGrMisc.h"
class Graph;
diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C
index 1402eea..c9eb3d9 100644
--- a/src/bltGrLegd.C
+++ b/src/bltGrLegd.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
+
extern "C" {
#include "bltBind.h"
};
diff --git a/src/bltGrLegd.h b/src/bltGrLegd.h
index f4b27e1..0a7a4bd 100644
--- a/src/bltGrLegd.h
+++ b/src/bltGrLegd.h
@@ -38,6 +38,8 @@
#include <iomanip>
using namespace std;
+#include <tk.h>
+
#include "bltGrMisc.h"
#include "bltText.h"
diff --git a/src/bltGrLegdOp.C b/src/bltGrLegdOp.C
index f80cda7..169e544 100644
--- a/src/bltGrLegdOp.C
+++ b/src/bltGrLegdOp.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
+
extern "C" {
#include "bltOp.h"
#include "bltBind.h"
diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C
index 57845d3..ec611cc 100644
--- a/src/bltGrMarker.C
+++ b/src/bltGrMarker.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 "bltBind.h"
};
diff --git a/src/bltGrMarker.h b/src/bltGrMarker.h
index e0d3b2d..0dae3e2 100644
--- a/src/bltGrMarker.h
+++ b/src/bltGrMarker.h
@@ -35,6 +35,8 @@
#include <iomanip>
using namespace std;
+#include <tk.h>
+
#include "bltGraph.h" // Axis2d
class Graph;
diff --git a/src/bltGrMarkerLine.C b/src/bltGrMarkerLine.C
index 91906fb..7aa2eda 100644
--- a/src/bltGrMarkerLine.C
+++ b/src/bltGrMarkerLine.C
@@ -27,6 +27,9 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <math.h>
+#include <float.h>
+
#include "bltGrMarkerLine.h"
#include "bltGrMarkerOption.h"
#include "bltGrMisc.h"
diff --git a/src/bltGrMarkerText.C b/src/bltGrMarkerText.C
index 93d4e8e..8bf5b3b 100644
--- a/src/bltGrMarkerText.C
+++ b/src/bltGrMarkerText.C
@@ -27,6 +27,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <math.h>
+
#include "bltGrMarkerText.h"
#include "bltGrMarkerOption.h"
#include "bltGrMisc.h"
diff --git a/src/bltGrMarkerText.h b/src/bltGrMarkerText.h
index fef62f8..9ce9418 100644
--- a/src/bltGrMarkerText.h
+++ b/src/bltGrMarkerText.h
@@ -30,6 +30,8 @@
#ifndef __BltGrMarkerText_h__
#define __BltGrMarkerText_h__
+#include <tk.h>
+
#include "bltGrMarker.h"
namespace Blt {
diff --git a/src/bltGrMisc.C b/src/bltGrMisc.C
index c9ac657..6b983ea 100644
--- a/src/bltGrMisc.C
+++ b/src/bltGrMisc.C
@@ -27,11 +27,23 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <math.h>
+#include <limits.h>
+#include <float.h>
+#include <string.h>
+#include <stdlib.h>
+
+#ifdef USE_TK_STUBS
+#include <tkInt.h>
+#endif
+
#include "bltGraph.h"
#include "bltGrMisc.h"
using namespace Blt;
+#define MIN(a,b) (((a)<(b))?(a):(b))
+
char* Blt::dupstr(const char* str)
{
char* copy =NULL;
diff --git a/src/bltGrMisc.h b/src/bltGrMisc.h
index 0e1871f..6656ea8 100644
--- a/src/bltGrMisc.h
+++ b/src/bltGrMisc.h
@@ -30,15 +30,7 @@
#ifndef __BltGrMisc_h__
#define __BltGrMisc_h__
-//#include <tcl.h>
-//#ifdef USE_TCL_STUBS
-//#include <tclInt.h>
-//#endif
-
#include <tk.h>
-//#ifdef USE_TK_STUBS
-//#include <tkInt.h>
-//#endif
/*
* Bit flags definitions:
diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C
index 613b905..353c880 100644
--- a/src/bltGrPSOutput.C
+++ b/src/bltGrPSOutput.C
@@ -28,6 +28,8 @@
*
*/
+#include <math.h>
+
extern "C" {
#include <tkPort.h>
#include <tk3d.h>
diff --git a/src/bltGrPSOutput.h b/src/bltGrPSOutput.h
index 263c4ed..0d3915c 100644
--- a/src/bltGrPSOutput.h
+++ b/src/bltGrPSOutput.h
@@ -30,6 +30,8 @@
#ifndef _BLT_PS_H
#define _BLT_PS_H
+#include <tk.h>
+
#include "bltConfig.h"
#include "bltText.h"
diff --git a/src/bltGrPen.h b/src/bltGrPen.h
index 2a7c2bf..21cb2a2 100644
--- a/src/bltGrPen.h
+++ b/src/bltGrPen.h
@@ -35,6 +35,8 @@
#include <iomanip>
using namespace std;
+#include <tk.h>
+
#include "bltText.h"
class Graph;
diff --git a/src/bltGrPenBar.h b/src/bltGrPenBar.h
index da31986..f97b67e 100644
--- a/src/bltGrPenBar.h
+++ b/src/bltGrPenBar.h
@@ -35,6 +35,8 @@
#include <iomanip>
using namespace std;
+#include <tk.h>
+
#include "bltGrPen.h"
typedef struct {
diff --git a/src/bltGrPostscript.C b/src/bltGrPostscript.C
index f287aee..9bb3174 100644
--- a/src/bltGrPostscript.C
+++ b/src/bltGrPostscript.C
@@ -27,6 +27,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <stdlib.h>
+
#include "bltGraph.h"
#include "bltGrPageSetup.h"
#include "bltConfig.h"
diff --git a/src/bltGrPostscript.h b/src/bltGrPostscript.h
index 104cb88..4f4e24f 100644
--- a/src/bltGrPostscript.h
+++ b/src/bltGrPostscript.h
@@ -30,6 +30,8 @@
#ifndef __BltGrPageSetup_h__
#define __BltGrPageSetup_h__
+#include <tk.h>
+
typedef struct {
int center;
const char **comments;
diff --git a/src/bltGrText.C b/src/bltGrText.C
index ecc5ea6..9012c79 100644
--- a/src/bltGrText.C
+++ b/src/bltGrText.C
@@ -27,7 +27,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "bltMath.h"
+#include <math.h>
extern "C" {
#include <tk.h>
@@ -39,6 +39,7 @@ extern "C" {
#include "bltText.h"
+#define ROUND(x) ((int)((x) + (((x)<0.0) ? -0.5 : 0.5)))
#define ROTATE_0 0
#define ROTATE_90 1
#define ROTATE_180 2
diff --git a/src/bltGrText.h b/src/bltGrText.h
index 51589ef..af166e6 100644
--- a/src/bltGrText.h
+++ b/src/bltGrText.h
@@ -30,6 +30,8 @@
#ifndef _BLT_TEXT_H
#define _BLT_TEXT_H
+#include <tk.h>
+
#include "bltGrMisc.h"
#define UPDATE_GC 1
diff --git a/src/bltGraph.h b/src/bltGraph.h
index c577084..18280db 100644
--- a/src/bltGraph.h
+++ b/src/bltGraph.h
@@ -30,6 +30,8 @@
#ifndef __BltGraph_h__
#define __BltGraph_h__
+#include <tk.h>
+
extern "C" {
#include "bltChain.h"
#include "bltBind.h"
diff --git a/src/bltGraphBar.h b/src/bltGraphBar.h
index 7c0ebb0..6ad846f 100644
--- a/src/bltGraphBar.h
+++ b/src/bltGraphBar.h
@@ -30,6 +30,8 @@
#ifndef __BltGraphBar_h__
#define __BltGraphBar_h__
+#include <tk.h>
+
#include "bltGraph.h"
typedef struct {
diff --git a/src/bltGraphLine.h b/src/bltGraphLine.h
index 57b2e19..6e4580f 100644
--- a/src/bltGraphLine.h
+++ b/src/bltGraphLine.h
@@ -30,6 +30,8 @@
#ifndef __BltGraphLine_h__
#define __BltGraphLine_h__
+#include <tk.h>
+
#include "bltGraph.h"
typedef struct {
diff --git a/src/bltGraphOp.C b/src/bltGraphOp.C
index 46efd32..b7f1beb 100644
--- a/src/bltGraphOp.C
+++ b/src/bltGraphOp.C
@@ -27,8 +27,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "bltMath.h"
-
extern "C" {
#include "bltInt.h"
#include "bltList.h"
@@ -60,6 +58,8 @@ using namespace Blt;
static Tcl_ObjCmdProc BarchartObjCmd;
static Tcl_ObjCmdProc GraphObjCmd;
+#define ROUND(x) ((int)((x) + (((x)<0.0) ? -0.5 : 0.5)))
+
int Blt_GraphCmdInitProc(Tcl_Interp* interp)
{
static Blt_InitCmdSpec graphSpec =
diff --git a/src/bltGraphOp.h b/src/bltGraphOp.h
index 42c8af5..6fbfbdf 100644
--- a/src/bltGraphOp.h
+++ b/src/bltGraphOp.h
@@ -30,6 +30,8 @@
#ifndef __BltGraphOp_h__
#define __BltGraphOp_h__
+#include <tk.h>
+
extern int GraphObjConfigure(Tcl_Interp* interp, Graph* graphPtr,
int objc, Tcl_Obj* const objv[]);
diff --git a/src/bltGraphSup.C b/src/bltGraphSup.C
index 37fe5db..ea7fd77 100644
--- a/src/bltGraphSup.C
+++ b/src/bltGraphSup.C
@@ -27,8 +27,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "bltMath.h"
-
#include "bltGraph.h"
#include "bltGrAxis.h"
#include "bltGrElem.h"