diff options
Diffstat (limited to 'src/graph')
28 files changed, 44 insertions, 41 deletions
diff --git a/src/graph/Gdraws/Gfun.c b/src/graph/Gdraws/Gfun.c index 07237838..e931b0ad 100644 --- a/src/graph/Gdraws/Gfun.c +++ b/src/graph/Gdraws/Gfun.c @@ -246,7 +246,7 @@ GDrawImageString( GC gc, /* graphics context */ Window wid, /* window id */ int x, int y, - char *string, + const char* string, int length, int dFlag) { int s; @@ -562,7 +562,7 @@ GDrawPushButton( GC gc1, GC gc2, GC gc3, Window windowId, short int x,short int y,short int width,short int height, - int isOn, char *text, + int isOn, const char *text, unsigned long buttonColor, unsigned long color, int dFlag) { @@ -597,7 +597,7 @@ GDrawString( GC gc, /* graphics context */ Window wid, /* window id */ int x, int y, - char *string, /* string to be drawn */ + const char* string, /* string to be drawn */ int length, int dFlag) { int s; @@ -827,7 +827,7 @@ PSInit(Window vw, Window tw) int PSCreateContext( GC gc, /* graphics context */ - char *C_gc, /* GC name to be used as postscript variable */ + const char *C_gc, /* GC name to be used as postscript variable */ int lineWidth, int capStyle, int joinStyle, float bg, float fg) { @@ -1074,7 +1074,7 @@ PSClose(void) int -centerX (GC viewGCx,char * theString,int strlength,int windowWidth) +centerX (GC viewGCx, const char* theString,int strlength,int windowWidth) { XFontStruct *fontStruct; GContext con; diff --git a/src/graph/Gdraws/data.c b/src/graph/Gdraws/data.c index d3f58173..e448f18d 100644 --- a/src/graph/Gdraws/data.c +++ b/src/graph/Gdraws/data.c @@ -47,12 +47,12 @@ Gdraws_data(int dFlag) static Vertex vlist[5]; static int vcount = 5; static int x0, y0, x1, y1; - static char *str = "This is a text string."; + static const char* str = "This is a text string."; static int x, y; static int FirstTime = yes; static int Rx, Ry, Rwidth, Rheight; static int Ix, Iy; - static char *Istr = "Image text string."; + static const char* Istr = "Image text string."; static XPoint points[7]; static XPoint p1[7]; static int np1 = 7; diff --git a/src/graph/Gdraws/menu.c b/src/graph/Gdraws/menu.c index 7380065a..91443a60 100644 --- a/src/graph/Gdraws/menu.c +++ b/src/graph/Gdraws/menu.c @@ -42,7 +42,8 @@ extern GC gc; void Gdraws_draw_menu(Window menu, char *str, int width, int height) { - char *str1 = "y e s", *str2 = "n o"; + const char* str1 = "y e s"; + const char* str2 = "n o"; int x0=0, y0=0; XDrawString(dsply, menu, gc, 30, height/4+3, str, strlen(str)); diff --git a/src/graph/include/Gfun.H1 b/src/graph/include/Gfun.H1 index 081ccda2..31fb7762 100644 --- a/src/graph/include/Gfun.H1 +++ b/src/graph/include/Gfun.H1 @@ -1,22 +1,22 @@ extern int PSCreateFile(int , Window , Window , char * ); extern int Gdraws_drawFrame(int , Window , Window , char * ); extern int Gdraws_setDimension(Window , Window ); -extern int GDrawImageString(GC , Window , int , int , char * , int , int ); +extern int GDrawImageString(GC , Window , int , int , const char* , int , int ); extern int GDrawArc(GC , Window , int , int , unsigned int , unsigned int , int , int , int ); extern int GDrawLine(GC , Window , int , int , int , int , int ); extern int GDrawLines(GC , Window , XPoint * , int , int , int ); extern int GDrawPoint(Window , GC , int , int , int ); -extern int GDrawString(GC , Window , int , int , char * , int , int ); +extern int GDrawString(GC , Window , int , int , const char* , int , int ); extern int GFillArc(GC , Window , int , int , unsigned int , unsigned int , int , int , int ); extern int PSGlobalInit(void ); extern int PSInit(Window , Window ); -extern int PSCreateContext(GC , char * , int , int , int , float , float ); +extern int PSCreateContext(GC , const char* , int , int , int , float , float ); extern char * PSfindGC(GC ); extern int GSetForeground(GC , float , int ); extern int GSetBackground(GC , float , int ); extern int GSetLineAttributes(GC , int , int , int , int , int ); extern int PSClose(void ); -extern int centerX(GC , char * , int , int ); +extern int centerX(GC , const char* , int , int ); extern int centerY(GC , int ); extern int PSColorPolygon(float , float , float , XPoint * , int ); extern int PSColorwOutline(float , float , float , XPoint * , int ); @@ -30,7 +30,8 @@ extern void XDeleteAssoc(Display * , HashTable * , Window ); extern int GDrawRectangle(GC , Window , short , short , short , short , int ); extern int GDraw3DButtonOut(GC , Window , short , short , short , short , int ); extern int GDraw3DButtonIn(GC , Window , short , short , short , short , int ); -extern int GDrawPushButton(Display * , GC , GC , GC , Window , short , short , short , short , int , char * , unsigned long , unsigned long , int ); +extern int GDrawPushButton(Display * , GC , GC , GC , Window , short , +short , short , short , int , const char* , unsigned long , unsigned long , int ); #ifdef _GFUN_C static void filecopy(FILE * , FILE * ); static int TrivEqual(Window , Window ); diff --git a/src/graph/include/bitmaps/spad11.bitmap b/src/graph/include/bitmaps/spad11.bitmap index 0be6b15d..d2af8427 100644 --- a/src/graph/include/bitmaps/spad11.bitmap +++ b/src/graph/include/bitmaps/spad11.bitmap @@ -1,6 +1,6 @@ #define spadBitmap_width 30 #define spadBitmap_height 16 -static char spadBitmap_bits[] = { +static const char spadBitmap_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x20, 0x00, 0x00, 0x12, 0x70, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xa8, 0x39, 0xb7, 0x1d, 0x24, 0xa6, 0x59, 0x12, diff --git a/src/graph/include/bitmaps/spad11.mask b/src/graph/include/bitmaps/spad11.mask index 05329be6..e8c7882d 100644 --- a/src/graph/include/bitmaps/spad11.mask +++ b/src/graph/include/bitmaps/spad11.mask @@ -2,7 +2,7 @@ #define spad11_height 16 #define spad11_x_hot -1 #define spad11_y_hot -1 -static char spad11_bits[] = { +static const char spad11_bits[] = { 0x00, 0x20, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x39, 0xb6, 0x1d, 0x32, 0x26, 0x49, 0x12, 0x21, 0xa6, 0x50, 0x12, 0x21, 0xa6, 0x50, 0x12, diff --git a/src/graph/include/purty/slicer.bitmap b/src/graph/include/purty/slicer.bitmap index 6f871847..0fb13785 100644 --- a/src/graph/include/purty/slicer.bitmap +++ b/src/graph/include/purty/slicer.bitmap @@ -5,7 +5,7 @@ #else #define slicer_height 100 #endif -static char slicer_bits[] = { +static const char slicer_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/src/graph/include/purty/spadBitmap.bitmap b/src/graph/include/purty/spadBitmap.bitmap index f8b9d7d8..dfb3cce8 100644 --- a/src/graph/include/purty/spadBitmap.bitmap +++ b/src/graph/include/purty/spadBitmap.bitmap @@ -2,7 +2,7 @@ #define spadBitmap_height 20 #define spadBitmap_x_hot 15 #define spadBitmap_y_hot 10 -static char spadBitmap_bits[] = { +static const 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/purty/spadMask.mask b/src/graph/include/purty/spadMask.mask index 40954629..21ba6a89 100644 --- a/src/graph/include/purty/spadMask.mask +++ b/src/graph/include/purty/spadMask.mask @@ -2,7 +2,7 @@ #define spadMask_height 20 #define spadMask_x_hot 15 #define spadMask_y_hot 10 -static char spadMask_bits[] = { +static const 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/include/spadBitmap.bitmap b/src/graph/include/spadBitmap.bitmap index f8b9d7d8..dfb3cce8 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 char spadBitmap_bits[] = { +static const 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 40954629..21ba6a89 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 char spadMask_bits[] = { +static const 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/include/viewport2D.H1 b/src/graph/include/viewport2D.H1 index 55163d03..5d41df84 100644 --- a/src/graph/include/viewport2D.H1 +++ b/src/graph/include/viewport2D.H1 @@ -1,5 +1,5 @@ extern void writeTitle(void); extern void drawTheViewport(int ); -extern viewPoints * makeViewport(char * , int , int , int , int , int ); +extern viewPoints * makeViewport(const char* , int , int , int , int , int ); extern viewPoints * makeView2D(view2DStruct * ); diff --git a/src/graph/view2D/control2d.c b/src/graph/view2D/control2d.c index 191a0619..ea79102d 100644 --- a/src/graph/view2D/control2d.c +++ b/src/graph/view2D/control2d.c @@ -164,7 +164,7 @@ drawControlPanel(void) controlPanelStruct *cp; int i,strlength; - char *s; + const char* s; cp = viewport->controlPanel; /* Draw border lines to separate the potentiometer, message, graph select diff --git a/src/graph/view2D/globals2.h b/src/graph/view2D/globals2.h index 1544471d..c7b8d9b3 100644 --- a/src/graph/view2D/globals2.h +++ b/src/graph/view2D/globals2.h @@ -54,7 +54,7 @@ extern GC processGC; extern viewPoints *viewport; extern controlPanelStruct *control; extern XGCValues gcVals; -extern char *s; +extern const char* s; extern int someInt; extern unsigned long foregroundColor, backgroundColor; diff --git a/src/graph/view2D/main2d.c b/src/graph/view2D/main2d.c index 1c176729..9cd10c6e 100644 --- a/src/graph/view2D/main2d.c +++ b/src/graph/view2D/main2d.c @@ -86,10 +86,10 @@ char scaleXReport[5], scaleYReport[5], deltaXReport[5], deltaYReport[5], - *s, errorStr[80], filename[256], /** For writing viewport data out to a file **/ *xDefault; /** used for accessing .XDefaults **/ +const char* s; unsigned long *spadColors; diff --git a/src/graph/view2D/viewport2D.c b/src/graph/view2D/viewport2D.c index 0d5aaf30..50e571db 100644 --- a/src/graph/view2D/viewport2D.c +++ b/src/graph/view2D/viewport2D.c @@ -559,7 +559,7 @@ drawTheViewport(int dFlag) ************************************/ viewPoints * -makeViewport(char *title,int vX,int vY,int vW,int vH,int showCP) +makeViewport(const char* title,int vX,int vY,int vW,int vH,int showCP) { Pixmap spadbits,spadmask; XSetWindowAttributes viewAttrib; diff --git a/src/graph/view3D/control3d.c b/src/graph/view3D/control3d.c index a7e45760..9099d1f5 100644 --- a/src/graph/view3D/control3d.c +++ b/src/graph/view3D/control3d.c @@ -229,7 +229,7 @@ drawControlPanel(void ) int offShade=14; controlPanelStruct *cp; int i, strlength; - char *s; + const char* s; cp = viewport->controlPanel; diff --git a/src/graph/view3D/globals.h b/src/graph/view3D/globals.h index 5734564c..2c727617 100644 --- a/src/graph/view3D/globals.h +++ b/src/graph/view3D/globals.h @@ -58,7 +58,7 @@ extern GC processGC; extern viewPoints *viewport; extern controlPanelStruct *control; extern XGCValues gcVals; -extern char *s; +extern const char* s; extern int someInt; extern unsigned long foregroundColor, backgroundColor; diff --git a/src/graph/view3D/header.h b/src/graph/view3D/header.h index ed4b5c45..53dd24ab 100644 --- a/src/graph/view3D/header.h +++ b/src/graph/view3D/header.h @@ -267,7 +267,7 @@ typedef struct _buttonStruct { int buttonKey, pot, mask; short buttonX, buttonY, buttonWidth, buttonHeight, xHalf, yHalf; Window self; - char *text; + const char* text; int textColor,textHue,textShade; } buttonStruct; diff --git a/src/graph/view3D/lighting3d.c b/src/graph/view3D/lighting3d.c index dc7f34ab..ff6f9dad 100644 --- a/src/graph/view3D/lighting3d.c +++ b/src/graph/view3D/lighting3d.c @@ -377,7 +377,7 @@ void drawLightingPanel(void) { - char *s; + const char* s; int i,strlength; /* Draw border lines to separate the lighting window, potentiometers, diff --git a/src/graph/view3D/main3d.c b/src/graph/view3D/main3d.c index d04b7724..63805c25 100644 --- a/src/graph/view3D/main3d.c +++ b/src/graph/view3D/main3d.c @@ -81,7 +81,7 @@ GC processGC; viewPoints *viewport; controlPanelStruct *control; XGCValues gcVals; -char *s; +const char* s; int someInt; /* check /usr/include/X11 for current implementation of @@ -601,7 +601,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/view3D/process3d.c b/src/graph/view3D/process3d.c index 77eb8782..5c5e7d68 100644 --- a/src/graph/view3D/process3d.c +++ b/src/graph/view3D/process3d.c @@ -68,7 +68,8 @@ void buttonAction (int bKey) { - char *s1, *s2; + const char* s1; + const char* s2; int strL, strL1, strL2, offShade=14; /* Button colors which are offColor, RED, are turned off, and those which diff --git a/src/graph/view3D/quit3d.c b/src/graph/view3D/quit3d.c index 0978e329..4a76103b 100644 --- a/src/graph/view3D/quit3d.c +++ b/src/graph/view3D/quit3d.c @@ -132,7 +132,7 @@ void drawQuitPanel(void) { - char *s; + const char* s; int i,strlength; s = "Really?"; diff --git a/src/graph/view3D/save3d.c b/src/graph/view3D/save3d.c index 94cccd32..5c41eb72 100644 --- a/src/graph/view3D/save3d.c +++ b/src/graph/view3D/save3d.c @@ -133,7 +133,7 @@ void drawSavePanel(void) { - char *s; + const char* s; int i,strlength; GSetForeground(saveGC,(float)saveButtonColor,Xoption); diff --git a/src/graph/view3D/testcol.c b/src/graph/view3D/testcol.c index 4db2a7f9..9eaea909 100644 --- a/src/graph/view3D/testcol.c +++ b/src/graph/view3D/testcol.c @@ -96,7 +96,7 @@ XSizeHints viewSizeHints; GC processGC; viewPoints *viewport; controlPanelStruct *control; -char *s; +const char* s; int someInt; /* check /usr/include/X11 for current implementation of diff --git a/src/graph/view3D/volume3d.c b/src/graph/view3D/volume3d.c index 3fdfa3be..1a44affc 100644 --- a/src/graph/view3D/volume3d.c +++ b/src/graph/view3D/volume3d.c @@ -96,17 +96,17 @@ /* someotherFont holds title font (see main.c) */ #define clipMessDy (globalFont->max_bounds.ascent/2 + \ globalFont->max_bounds.descent) -static char *clipMess = "Clip Volume"; +static const char* clipMess = "Clip Volume"; #define eyeMess1Dy clipMessDy #define eyeMess1X 7 #define eyeMess1Y (frustrumY + 40 + 3*eyeMess1Dy) -static char *eyeMess1 = "Eye"; +static const char* eyeMess1 = "Eye"; #define eyeMess2X (globalFont->max_bounds.width + 14) #define eyeMess2Y (frustrumY + 40) #define eyeMess2Dy eyeMess1Dy -static char *eyeMess2 = "Reference"; +static const char* eyeMess2 = "Reference"; /* global stuff */ diff --git a/src/graph/viewman/globalsM.h b/src/graph/viewman/globalsM.h index 0dd1690b..54edf88b 100644 --- a/src/graph/viewman/globalsM.h +++ b/src/graph/viewman/globalsM.h @@ -40,7 +40,7 @@ extern fd_set filedes; extern int acknow; extern int graphKey; extern graphStruct *graphList; -extern char *s1; +extern const char* s1; extern Display *dsply; extern int defDsply; extern Window root; diff --git a/src/graph/viewman/viewman.c b/src/graph/viewman/viewman.c index 5085a3e9..e5940302 100644 --- a/src/graph/viewman/viewman.c +++ b/src/graph/viewman/viewman.c @@ -82,8 +82,8 @@ int viewType, fd_set filedes; graphStruct *graphList; graphStateStruct currentGraphState; -char *s1, - propertyBuffer[256];/* XProperty buffer */ +const char* s1; +char propertyBuffer[256];/* XProperty buffer */ int |