aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/graph/include/light11.bitmap2
-rw-r--r--src/graph/include/mouse11.bitmap2
-rw-r--r--src/graph/include/mouse11.mask2
-rw-r--r--src/graph/include/purty/volume.bitmap2
-rw-r--r--src/graph/include/purty/volume.mask2
-rw-r--r--src/graph/include/spadBitmap.bitmap2
-rw-r--r--src/graph/include/spadMask.mask2
-rw-r--r--src/graph/view2D/control2d.c6
-rw-r--r--src/graph/view2D/main2d.c6
-rw-r--r--src/graph/view2D/viewport2D.c7
-rw-r--r--src/graph/view2D/write2d.c8
-rw-r--r--src/graph/view3D/control3d.c10
-rw-r--r--src/graph/view3D/main3d.c4
-rw-r--r--src/graph/view3D/spadAction3d.c6
-rw-r--r--src/graph/view3D/write3d.c8
15 files changed, 36 insertions, 33 deletions
diff --git a/src/graph/include/light11.bitmap b/src/graph/include/light11.bitmap
index d79dd52c..0ed44f44 100644
--- a/src/graph/include/light11.bitmap
+++ b/src/graph/include/light11.bitmap
@@ -2,7 +2,7 @@
#define lightBitmap_height 16
#define lightBitmap_x_hot 8
#define lightBitmap_y_hot 0
-static char lightBitmap_bits[] = {
+static const unsigned char lightBitmap_bits[] = {
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x40, 0xc8, 0x27, 0x20, 0x08,
0x10, 0x10, 0x16, 0x10, 0x10, 0xd0, 0x10, 0x10, 0x24, 0x08, 0x42, 0x44,
0x40, 0x84, 0x80, 0x02, 0x80, 0x02, 0x00, 0x01};
diff --git a/src/graph/include/mouse11.bitmap b/src/graph/include/mouse11.bitmap
index 231c6630..6af67f08 100644
--- a/src/graph/include/mouse11.bitmap
+++ b/src/graph/include/mouse11.bitmap
@@ -2,7 +2,7 @@
#define mouseBitmap_height 16
#define mouseBitmap_x_hot 8
#define mouseBitmap_y_hot 0
-static char mouseBitmap_bits[] = {
+static const unsigned char mouseBitmap_bits[] = {
0x00, 0x01, 0x00, 0x01, 0x80, 0x02, 0x40, 0x04, 0xc0, 0x06, 0x20, 0x08,
0x20, 0x08, 0x30, 0x18, 0x50, 0x14, 0x58, 0x34, 0x90, 0x12, 0x20, 0x08,
0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/graph/include/mouse11.mask b/src/graph/include/mouse11.mask
index 6e5621f4..69d00e53 100644
--- a/src/graph/include/mouse11.mask
+++ b/src/graph/include/mouse11.mask
@@ -1,6 +1,6 @@
#define mouseMask_width 16
#define mouseMask_height 16
-static char mouseMask_bits[] = {
+static const unsigned char mouseMask_bits[] = {
0x00, 0x01, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x07, 0xe0, 0x0f,
0xe0, 0x0f, 0xf0, 0x1f, 0xf0, 0x1f, 0xf8, 0x3f, 0xf0, 0x1f, 0xe0, 0x0f,
0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/graph/include/purty/volume.bitmap b/src/graph/include/purty/volume.bitmap
index c5b65e29..50c09d1c 100644
--- a/src/graph/include/purty/volume.bitmap
+++ b/src/graph/include/purty/volume.bitmap
@@ -2,7 +2,7 @@
#define volumeBitmap_height 16
#define volumeBitmap_x_hot 5
#define volumeBitmap_y_hot 1
-static char volumeBitmap_bits[] = {
+static const unsigned char volumeBitmap_bits[] = {
0x00, 0x00, 0x60, 0x00, 0x90, 0x00, 0x10, 0x01, 0x10, 0x07, 0x10, 0x09,
0x0c, 0x39, 0x1a, 0x51, 0x32, 0x50, 0x22, 0x40, 0x22, 0x40, 0x04, 0x60,
0x04, 0x30, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/purty/volume.mask b/src/graph/include/purty/volume.mask
index 98e377dc..3b52edd9 100644
--- a/src/graph/include/purty/volume.mask
+++ b/src/graph/include/purty/volume.mask
@@ -2,7 +2,7 @@
#define volumeMask_height 16
#define volumeMask_x_hot 5
#define volumeMask_y_hot 1
-static char volumeMask_bits[] = {
+static const unsigned char volumeMask_bits[] = {
0x00, 0x00, 0x60, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xf0, 0x07, 0xf0, 0x0f,
0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfc, 0x7f,
0xfc, 0x3f, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/spadBitmap.bitmap b/src/graph/include/spadBitmap.bitmap
index dfb3cce8..42eaf7d8 100644
--- a/src/graph/include/spadBitmap.bitmap
+++ b/src/graph/include/spadBitmap.bitmap
@@ -2,7 +2,7 @@
#define spadBitmap_height 20
#define spadBitmap_x_hot 15
#define spadBitmap_y_hot 10
-static const char spadBitmap_bits[] = {
+static const unsigned char spadBitmap_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
diff --git a/src/graph/include/spadMask.mask b/src/graph/include/spadMask.mask
index 21ba6a89..e0443d4b 100644
--- a/src/graph/include/spadMask.mask
+++ b/src/graph/include/spadMask.mask
@@ -2,7 +2,7 @@
#define spadMask_height 20
#define spadMask_x_hot 15
#define spadMask_y_hot 10
-static const char spadMask_bits[] = {
+static const unsigned char spadMask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
0x01, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0xfe,
diff --git a/src/graph/view2D/control2d.c b/src/graph/view2D/control2d.c
index ea79102d..051184c4 100644
--- a/src/graph/view2D/control2d.c
+++ b/src/graph/view2D/control2d.c
@@ -450,9 +450,11 @@ makeControlPanel(void)
cXY = getControlXY(0);
/* Define and assign a mouse cursor. */
- mousebits = XCreateBitmapFromData(dsply,rtWindow,mouseBitmap_bits,
+ mousebits = XCreateBitmapFromData(dsply,rtWindow,
+ (const char*) mouseBitmap_bits,
mouseBitmap_width,mouseBitmap_height);
- mousemask = XCreateBitmapFromData(dsply,rtWindow,mouseMask_bits,
+ mousemask = XCreateBitmapFromData(dsply,rtWindow,
+ (const char*) mouseMask_bits,
mouseMask_width,mouseMask_height);
cwAttrib.background_pixel = backgroundColor; /* controlBackground; */
cwAttrib.border_pixel = foregroundColor;
diff --git a/src/graph/view2D/main2d.c b/src/graph/view2D/main2d.c
index 9cd10c6e..29c3b3d7 100644
--- a/src/graph/view2D/main2d.c
+++ b/src/graph/view2D/main2d.c
@@ -156,7 +156,7 @@ main(void)
{
XGCValues controlGCVals;
- int i,code;
+ int i;
view2DStruct viewData;
char property[256];
@@ -418,7 +418,7 @@ main(void)
/**** Get Data from the Viewport Manager ****/
i = 123;
- code=check(write(Socket,&i,intSize));
+ check(write(Socket,&i,intSize));
/* Check if I am getting stuff from OpenAxiom or, if I am viewAlone. */
readViewman(&viewAloned,intSize);
@@ -464,7 +464,7 @@ mergeDatabases(void)
XrmDatabase homeDB,serverDB,applicationDB;
char filenamebuf[1024];
char *filename = &filenamebuf[0];
- char *classname = "OpenAxiom";
+ const char *classname = "OpenAxiom";
char name[255];
(void) XrmInitialize();
diff --git a/src/graph/view2D/viewport2D.c b/src/graph/view2D/viewport2D.c
index 50e571db..2a09856e 100644
--- a/src/graph/view2D/viewport2D.c
+++ b/src/graph/view2D/viewport2D.c
@@ -107,7 +107,7 @@ drawTheViewport(int dFlag)
Vertex *anX10Point;
float jj,diffX, diffY, tickStart,oneTickUnit;
int i,j,k,ii,halfSize;
- int charlength,strlength,halflength,halfheight;
+ int charlength,strlength,halflength;
int ptX,ptY,ptX1,ptY1,clipped, clipped1;
int xAxis,yAxis,dummyInt, ascent, descent;
int unitWidth,boxX,boxY,boxW,boxH;
@@ -120,7 +120,6 @@ drawTheViewport(int dFlag)
aspectR = (float)vwInfo.width/(float)vwInfo.height;
XTextExtents(unitFont,"o",1,&dummyInt,&ascent,&descent,&overall);
- halfheight = (ascent + descent) / 2;
/* Calculate various factors for use in projection. */
/* Scale the plot, so that the scaling between the axes remains
@@ -594,10 +593,10 @@ makeViewport(const char* title,int vX,int vY,int vW,int vH,int showCP)
/**** Make the windows for the viewport ****/
spadbits = XCreateBitmapFromData(dsply,rtWindow,
- spadBitmap_bits,
+ (const char*) spadBitmap_bits,
spadBitmap_width,spadBitmap_height);
spadmask = XCreateBitmapFromData(dsply,rtWindow,
- spadMask_bits,
+ (const char*) spadMask_bits,
spadMask_width,spadMask_height);
viewAttrib.background_pixel = backgroundColor;
viewAttrib.border_pixel = foregroundColor;
diff --git a/src/graph/view2D/write2d.c b/src/graph/view2D/write2d.c
index 99dfe667..4431da08 100644
--- a/src/graph/view2D/write2d.c
+++ b/src/graph/view2D/write2d.c
@@ -56,7 +56,7 @@ writeViewport(int thingsToWrite)
FILE *viewDataFile;
char viewDirName[80],
viewBitmapFilename[80],viewDataFilename[80],command[80];
- int i,j,k,code,ii;
+ int i,j,k,ii;
pointListStruct *aList;
pointStruct *aPoint;
XWindowAttributes vwInfo;
@@ -64,7 +64,7 @@ writeViewport(int thingsToWrite)
XGetWindowAttributes(dsply,viewport->titleWindow,&vwInfo);
sprintf(viewDirName,"%s%s",filename,".VIEW");
sprintf(command,"%s%s%s","rm -r ",viewDirName," > /dev/null 2>&1");
- code = system(command);
+ system(command);
sprintf(command,"%s%s%s","mkdir ",viewDirName," > /dev/null 2>&1");
if (system(command)) {
fprintf(stderr," Error: Cannot create %s\n",viewDirName);
@@ -153,7 +153,7 @@ writeViewport(int thingsToWrite)
/*** Create the bitmap (bitmaps need leaf name) ***/
sprintf(viewBitmapFilename,"%s%s",viewDirName,"/image.bm");
XGetWindowAttributes(dsply,viewport->viewWindow,&vwInfo);
- code = XWriteBitmapFile(dsply,viewBitmapFilename,
+ XWriteBitmapFile(dsply,viewBitmapFilename,
viewport->titleWindow,vwInfo.width,
vwInfo.height+vwInfo.border_width+20,-1,-1);
break;
@@ -173,7 +173,7 @@ writeViewport(int thingsToWrite)
drawViewport(Xoption);
writeTitle();
sprintf(viewBitmapFilename,"%s%s%s",viewDirName,"/","image.bm");
- code = XWriteBitmapFile(dsply,viewBitmapFilename,
+ XWriteBitmapFile(dsply,viewBitmapFilename,
viewport->titleWindow,vwInfo.width,
vwInfo.height+vwInfo.border_width+20,-1,-1);
mono = 0;
diff --git a/src/graph/view3D/control3d.c b/src/graph/view3D/control3d.c
index 9099d1f5..2fb407e6 100644
--- a/src/graph/view3D/control3d.c
+++ b/src/graph/view3D/control3d.c
@@ -874,7 +874,7 @@ makeControlPanel (void)
{
Window cw;
- int i, num;
+ int i;
controlPanelStruct *control;
buttonStruct *buttons;
controlXY cXY;
@@ -891,9 +891,11 @@ makeControlPanel (void)
cXY = getControlXY(0);
- mousebits = XCreateBitmapFromData(dsply,rtWindow, mouseBitmap_bits,
+ mousebits = XCreateBitmapFromData(dsply,rtWindow,
+ (const char*) mouseBitmap_bits,
mouseBitmap_width, mouseBitmap_height);
- mousemask = XCreateBitmapFromData(dsply,rtWindow, mouseMask_bits,
+ mousemask = XCreateBitmapFromData(dsply,rtWindow,
+ (const char*) mouseMask_bits,
mouseMask_width, mouseMask_height);
cwAttrib.background_pixel = backgroundColor;
cwAttrib.border_pixel = foregroundColor;
@@ -925,7 +927,7 @@ makeControlPanel (void)
/* Define and assign a mouse cursor */
control->controlWindow = cw;
- num = initButtons(control->buttonQueue);
+ initButtons(control->buttonQueue);
buttons = control->buttonQueue;
for (i=controlButtonsStart3D; i<(controlButtonsEnd3D); i++) {
controlAttrib.event_mask = (control->buttonQueue[i]).mask;
diff --git a/src/graph/view3D/main3d.c b/src/graph/view3D/main3d.c
index 63805c25..90616192 100644
--- a/src/graph/view3D/main3d.c
+++ b/src/graph/view3D/main3d.c
@@ -253,7 +253,7 @@ main(void)
{
XGCValues controlGCVals;
- int i, code;
+ int i;
char property[256];
char *prop = &property[0];
@@ -520,7 +520,7 @@ main(void)
/**** Get Data from the Viewport Manager ****/
i = 123; /* Used in viewman, what is this for? */
- code = check(write(Socket,&i,intSize));
+ check(write(Socket,&i,intSize));
/* Check if I am getting stuff from OpenAxiom or, if I am viewAlone. */
readViewman(&viewAloned,intSize);
diff --git a/src/graph/view3D/spadAction3d.c b/src/graph/view3D/spadAction3d.c
index c9af638b..0c3861f3 100644
--- a/src/graph/view3D/spadAction3d.c
+++ b/src/graph/view3D/spadAction3d.c
@@ -81,7 +81,7 @@ scalePoint (viewTriple *p)
int
spadAction (void)
{
- int code, viewCommand;
+ int viewCommand;
float f1, f2, f3;
int i1, i2, i3;
@@ -271,7 +271,7 @@ spadAction (void)
break;
case closeAll:
- code = check(write(Socket,&ack,intSize));
+ check(write(Socket,&ack,intSize));
goodbye(-1);
@@ -387,7 +387,7 @@ spadAction (void)
ack++;
- code = check(write(Socket,&ack,intSize));
+ check(write(Socket,&ack,intSize));
return(0);
}
diff --git a/src/graph/view3D/write3d.c b/src/graph/view3D/write3d.c
index d84f0c13..724fe5cc 100644
--- a/src/graph/view3D/write3d.c
+++ b/src/graph/view3D/write3d.c
@@ -58,7 +58,7 @@ int
writeViewport (int thingsToWrite)
{
- int i, j, k, ii, code, *anIndex;
+ int i, j, k, ii, *anIndex;
LLPoint *anLLPoint;
LPoint *anLPoint;
viewTriple *aPt;
@@ -71,7 +71,7 @@ writeViewport (int thingsToWrite)
XGetWindowAttributes(dsply,viewport->titleWindow,&vwInfo);
sprintf(viewDirName,"%s%s",filename,".VIEW");
sprintf(command,"%s%s%s","rm -r ",viewDirName," > /dev/null 2>&1");
- code = system(command);
+ system(command);
sprintf(command,"%s%s%s","mkdir ",viewDirName," > /dev/null 2>&1");
system(command);
if (0) {
@@ -142,7 +142,7 @@ writeViewport (int thingsToWrite)
/*** Create the pixmap (bitmaps need leaf name) ***/
sprintf(viewBitmapFilename,"%s%s%s",viewDirName,"/","image.bm");
XGetWindowAttributes(dsply,viewport->viewWindow,&vwInfo);
- code = XWriteBitmapFile(dsply,viewBitmapFilename,
+ XWriteBitmapFile(dsply,viewBitmapFilename,
viewport->titleWindow,vwInfo.width,
vwInfo.height+vwInfo.border_width+20,-1,-1);
break;
@@ -183,7 +183,7 @@ writeViewport (int thingsToWrite)
drawViewport(Xoption);
writeTitle();
sprintf(viewBitmapFilename,"%s%s%s",viewDirName,"/","image.bm");
- code = XWriteBitmapFile(dsply,viewBitmapFilename,
+ XWriteBitmapFile(dsply,viewBitmapFilename,
viewport->titleWindow,vwInfo.width,
vwInfo.height+vwInfo.border_width+20,-1,-1);