summaryrefslogtreecommitdiff
path: root/source/tcl/tix/tix.tcl8.5.patch
blob: 80b8cf88b91c11f530a14b0ea32b07447d8ac46b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
--- ./Makefile.in.orig	2006-11-16 16:33:42.000000000 -0600
+++ ./Makefile.in	2008-09-08 19:43:36.000000000 -0500
@@ -128,6 +128,7 @@
 SHLIB_LD_FLAGS	= @SHLIB_LD_FLAGS@
 SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
 STLIB_LD	= @STLIB_LD@
+TCL_VERSION	= @TCL_VERSION@
 TCL_DEFS	= @TCL_DEFS@
 TCL_SRC_DIR	= @TCL_SRC_DIR@
 TCL_BIN_DIR	= @TCL_BIN_DIR@
@@ -294,7 +295,7 @@
 
 pkgIndex.tcl:
 	(\
-	echo 'if {[catch {package require Tcl 8.4}]} return';\
+	echo 'if {[catch {package require Tcl $(TCL_VERSION)}]} return';\
 	echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
 	    [list load [file join $$dir $(PKG_LIB_FILE)] $(PACKAGE_NAME)]'\
 	) > pkgIndex.tcl
--- ./generic/tixImgXpm.h.orig	2000-05-17 06:08:42.000000000 -0500
+++ ./generic/tixImgXpm.h	2008-09-08 19:43:36.000000000 -0500
@@ -55,7 +55,7 @@
     int size[2];		/* width and height */
     int ncolors;		/* number of colors */
     int cpp;			/* characters per pixel */
-    char ** data;		/* The data that defines this pixmap 
+    CONST84 char ** data;	/* The data that defines this pixmap 
 				 * image (array of strings). It is
 				 * converted into an X Pixmap when this
 				 * image is instanciated
--- ./generic/tixImgXpm.c.orig	2008-02-27 22:05:29.000000000 -0600
+++ ./generic/tixImgXpm.c	2008-09-08 19:43:36.000000000 -0500
@@ -45,19 +45,19 @@
 			    int flags));
 static int		ImgXpmGetData _ANSI_ARGS_((Tcl_Interp *interp,
 			    PixmapMaster *masterPtr));
-static char ** 		ImgXpmGetDataFromFile _ANSI_ARGS_((Tcl_Interp * interp,
+static CONST84 char **	ImgXpmGetDataFromFile _ANSI_ARGS_((Tcl_Interp * interp,
 			    char * string, int * numLines_return));
-static char ** 		ImgXpmGetDataFromId _ANSI_ARGS_((Tcl_Interp * interp,
+static CONST84 char **	ImgXpmGetDataFromId _ANSI_ARGS_((Tcl_Interp * interp,
 			    CONST84 char * id));
-static char ** 		ImgXpmGetDataFromString _ANSI_ARGS_((Tcl_Interp*interp,
+static CONST84 char ** 	ImgXpmGetDataFromString _ANSI_ARGS_((Tcl_Interp*interp,
 			    char * string, int * numLines_return));
 static void 		ImgXpmGetPixmapFromData _ANSI_ARGS_((
 			    Tcl_Interp * interp,
 			    PixmapMaster *masterPtr,
 			    PixmapInstance *instancePtr));
-static char *		GetType _ANSI_ARGS_((char * colorDefn,
+static CONST84 char *	GetType _ANSI_ARGS_((CONST84 char * colorDefn,
 			    int  * type_ret));
-static char *		GetColor _ANSI_ARGS_((char * colorDefn,
+static CONST84 char *	GetColor _ANSI_ARGS_((CONST84 char * colorDefn,
 			    char * colorName, int * type_ret));
 
 /*
@@ -286,7 +286,7 @@
     Tcl_Interp *interp;			/* For reporting errors. */
     PixmapMaster *masterPtr;
 {
-    char ** data = NULL;
+    CONST84 char ** data = NULL;
     int  isAllocated = 0;	/* do we need to free "data"? */
     int listArgc;
     CONST84 char ** listArgv = NULL;
@@ -363,7 +363,7 @@
     return code;
 }
 
-static char ** ImgXpmGetDataFromId(interp, id)
+static CONST84 char ** ImgXpmGetDataFromId(interp, id)
     Tcl_Interp * interp;
     CONST84 char * id;
 {
@@ -378,13 +378,13 @@
     if (hashPtr == NULL) {
 	Tcl_AppendResult(interp, "unknown pixmap ID \"", id,
 	    "\"", NULL);
-	return (char**)NULL;
+	return NULL;
     } else {
-	return (char**)Tcl_GetHashValue(hashPtr);
+	return (CONST84 char**)Tcl_GetHashValue(hashPtr);
     }
 }
 
-static char ** ImgXpmGetDataFromString(interp, string, numLines_return)
+static CONST84 char ** ImgXpmGetDataFromString(interp, string, numLines_return)
     Tcl_Interp * interp;
     char * string;
     int * numLines_return;
@@ -392,7 +392,7 @@
     int quoted;
     char * p, * list;
     int numLines;
-    char ** data;
+    CONST84 char ** data;
 
     /* skip the leading blanks (leading blanks are not defined in the
      * the XPM definition, but skipping them shouldn't hurt. Also, the ability
@@ -510,17 +510,17 @@
 
   error:
     Tcl_AppendResult(interp, "File format error", NULL);
-    return (char**) NULL;
+    return NULL;
 }
 
-static char ** ImgXpmGetDataFromFile(interp, fileName, numLines_return)
+static CONST84 char ** ImgXpmGetDataFromFile(interp, fileName, numLines_return)
     Tcl_Interp * interp;
     char * fileName;
     int * numLines_return;
 {
     FILE * fd = NULL;
     int size, n;
-    char ** data;
+    CONST84 char ** data;
     char *cmdBuffer = NULL;
     Tcl_DString buffer;			/* initialized by Tcl_TildeSubst */
 
@@ -588,16 +588,16 @@
 	ckfree(cmdBuffer);
     }
     Tcl_DStringFree(&buffer);
-    return (char**)NULL;
+    return NULL;
 }
 
 
-static char *
+static CONST84 char *
 GetType(colorDefn, type_ret)
-    char * colorDefn;
+    CONST84 char * colorDefn;
     int  * type_ret;
 {
-    char * p = colorDefn;
+    CONST84 char * p = colorDefn;
 
     /* skip white spaces */
     while (*p && isspace(*p)) {
@@ -642,9 +642,9 @@
 /*
  * colorName is guaranteed to be big enough
  */
-static char *
+static CONST84 char *
 GetColor(colorDefn, colorName, type_ret)
-    char * colorDefn;
+    CONST84 char * colorDefn;
     char * colorName;		/* if found, name is copied to this array */
     int  * type_ret;
 {
@@ -751,7 +751,7 @@
     }
 
     for (i=0; i<masterPtr->ncolors; i++) {
-	char * colorDefn;		/* the color definition line */
+	CONST84 char * colorDefn;	/* the color definition line */
 	char * colorName;		/* temp place to hold the color name
 					 * defined for one type of visual */
 	char * useName;			/* the color name used for this
@@ -842,7 +842,7 @@
      * Parse the main body of the image
      */
     for (i=0; i<masterPtr->size[1]; i++) {
-	char * p = masterPtr->data[i+lOffset];
+	CONST84 char * p = masterPtr->data[i+lOffset];
 
 	for (j=0; j<masterPtr->size[0]; j++) {
 	    if (masterPtr->cpp == 1) {
--- ./generic/tixInt.h.orig	2008-02-27 22:29:17.000000000 -0600
+++ ./generic/tixInt.h	2008-09-08 19:43:36.000000000 -0500
@@ -23,6 +23,10 @@
 #include <tixPort.h>
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
 /*----------------------------------------------------------------------
  *
  *		Tix Display Item Types