| 1 |
Description: Patch deletes or comments out all unused variables. |
| 2 |
Author: Sergei Golovan |
| 3 |
Last-Modified: Wed, 09 Jul 2014 19:18:23 +0400 |
| 4 |
|
| 5 |
--- a/generic/bltTree.c |
| 6 |
+++ b/generic/bltTree.c |
| 7 |
@@ -1234,7 +1234,7 @@ |
| 8 |
int |
| 9 |
Blt_TreeRelabelNode(TreeClient *clientPtr, Node *nodePtr, CONST char *string) |
| 10 |
{ |
| 11 |
|
| 12 |
+ int result; |
| 13 |
if ((result=NotifyClients(clientPtr, clientPtr->treeObject, nodePtr, |
| 14 |
TREE_NOTIFY_RELABEL)) != TCL_OK) { |
| 15 |
return result; |
| 16 |
@@ -1245,7 +1245,6 @@ |
| 17 |
* been created. |
| 18 |
*/ |
| 19 |
SetModified(nodePtr); |
| 20 |
|
| 21 |
result = NotifyClients(clientPtr, clientPtr->treeObject, nodePtr, |
| 22 |
TREE_NOTIFY_RELABELPOST); |
| 23 |
return result; |
| 24 |
--- a/generic/bltTreeCmd.c |
| 25 |
+++ b/generic/bltTreeCmd.c |
| 26 |
@@ -2078,10 +2078,8 @@ |
| 27 |
SetValues(TreeCmd *cmdPtr, Blt_TreeNode node, int objc, Tcl_Obj *CONST *objv) |
| 28 |
{ |
| 29 |
register int i; |
| 30 |
|
| 31 |
char *string; |
| 32 |
|
| 33 |
|
| 34 |
for (i = 0; i < objc; i += 2) { |
| 35 |
string = Tcl_GetString(objv[i]); |
| 36 |
if ((i + 1) == objc) { |
| 37 |
@@ -2108,11 +2106,10 @@ |
| 38 |
{ |
| 39 |
register int i; |
| 40 |
char *string; |
| 41 |
|
| 42 |
+ int result = TCL_OK; |
| 43 |
Tcl_DString dStr; |
| 44 |
Tcl_Interp *interp = cmdPtr->interp; |
| 45 |
|
| 46 |
|
| 47 |
if (objc % 2) { |
| 48 |
Tcl_AppendResult(interp, "odd # values", (char *)NULL); |
| 49 |
return TCL_ERROR; |
| 50 |
@@ -4552,7 +4549,7 @@ |
| 51 |
Blt_TreeNode parent = NULL, child = NULL; |
| 52 |
int cnt = 0, i, n, m, vobjc, tobjc, dobjc, pobjc, optInd, iPos = -1, incr = 0; |
| 53 |
int hasoffs = 0, seqlabel = 0, seqVal = 0, hasstart = 0, start; |
| 54 |
|
| 55 |
+ int fixed = 0, hcnt = 0; |
| 56 |
char *prefix = NULL, *string; |
| 57 |
Tcl_Obj **vobjv = NULL; |
| 58 |
Tcl_Obj **tobjv = NULL; |
| 59 |
@@ -4628,7 +4625,6 @@ |
| 60 |
if (Tcl_GetIntFromObj(interp, objv[3], &cnt) != TCL_OK) { |
| 61 |
return TCL_ERROR; |
| 62 |
} |
| 63 |
|
| 64 |
hcnt++; |
| 65 |
if (cnt<0 || cnt>10000000) { |
| 66 |
Tcl_AppendResult(interp, "count must be >= 0 and <= 10M", (char *)NULL); |
| 67 |
@@ -4982,13 +4978,13 @@ |
| 68 |
Tcl_Obj *listObjPtr, *objPtr; |
| 69 |
register int i; |
| 70 |
int isNew, len; |
| 71 |
|
| 72 |
+ /*char *string;*/ |
| 73 |
TagSearch tagIter = {0}; |
| 74 |
|
| 75 |
Blt_InitHashTableWithPool(&keyTable, BLT_ONE_WORD_KEYS); |
| 76 |
listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL); |
| 77 |
for (i = 2; i < objc; i++) { |
| 78 |
|
| 79 |
+ /*string =*/ Tcl_GetStringFromObj(objv[i],&len); |
| 80 |
if (len == 0) continue; |
| 81 |
if (FindTaggedNodes(interp, cmdPtr, objv[i], &tagIter) != TCL_OK) { |
| 82 |
Blt_DeleteHashTable(&keyTable); |
| 83 |
@@ -6525,7 +6521,7 @@ |
| 84 |
Blt_TreeNode node; |
| 85 |
char *string; |
| 86 |
Tcl_Obj *valuePtr; |
| 87 |
|
| 88 |
+ int i, result = TCL_OK; |
| 89 |
Tcl_DString dStr; |
| 90 |
|
| 91 |
if (GetNode(cmdPtr, objv[2], &node) != TCL_OK) { |
| 92 |
@@ -6540,7 +6536,6 @@ |
| 93 |
cmdPtr->updTyp = 0; |
| 94 |
} |
| 95 |
Tcl_DStringInit(&dStr); |
| 96 |
|
| 97 |
for (i=3; i<objc; i+=2) { |
| 98 |
string = Tcl_GetString(objv[i]); |
| 99 |
if (Blt_TreeGetValue(interp, cmdPtr->tree, node, string, |
| 100 |
@@ -6599,11 +6594,11 @@ |
| 101 |
Tcl_Obj *CONST *objv) |
| 102 |
{ |
| 103 |
Blt_TreeNode node; |
| 104 |
|
| 105 |
+ /*char *string;*/ |
| 106 |
int count = 0, len; |
| 107 |
TagSearch cursor = {0}; |
| 108 |
|
| 109 |
|
| 110 |
+ /*string =*/ Tcl_GetStringFromObj(objv[2],&len); |
| 111 |
if (len == 0) { |
| 112 |
Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); |
| 113 |
return TCL_OK; |
| 114 |
@@ -6834,7 +6829,7 @@ |
| 115 |
Tcl_Obj *CONST *objv) |
| 116 |
{ |
| 117 |
Blt_TreeNode node; |
| 118 |
|
| 119 |
+ /*char *string;*/ |
| 120 |
int count = 0, result = TCL_OK, len; |
| 121 |
Tcl_DString dStr; |
| 122 |
TagSearch cursor = {0}; |
| 123 |
@@ -6844,7 +6839,7 @@ |
| 124 |
return TCL_ERROR; |
| 125 |
} |
| 126 |
if (objc<=3) return TCL_OK; |
| 127 |
|
| 128 |
+ /*string =*/ Tcl_GetStringFromObj(objv[2], &len); |
| 129 |
if (len == 0) { |
| 130 |
Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); |
| 131 |
return TCL_OK; |
| 132 |
@@ -7169,7 +7164,6 @@ |
| 133 |
Blt_TreeNode node; |
| 134 |
Tcl_Obj *listObjPtr; |
| 135 |
Tcl_Obj *objPtr; |
| 136 |
|
| 137 |
int isNew; |
| 138 |
register int i; |
| 139 |
|
| 140 |
@@ -7177,7 +7171,6 @@ |
| 141 |
for (i = 3; i < objc; i++) { |
| 142 |
TagSearch tcursor = {0}; |
| 143 |
|
| 144 |
|
| 145 |
if (FindTaggedNodes(interp, cmdPtr, objv[i], &tcursor) != TCL_OK) { |
| 146 |
Tcl_ResetResult(interp); |
| 147 |
DoneTaggedNodes(&tcursor); |
| 148 |
@@ -7756,12 +7749,9 @@ |
| 149 |
Tcl_Obj *CONST *objv) |
| 150 |
{ |
| 151 |
Blt_TreeNode node; |
| 152 |
|
| 153 |
int count = 0; |
| 154 |
TagSearch cursor = {0}; |
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
if (FindTaggedNodes(interp, cmdPtr, objv[2], &cursor) != TCL_OK) { |
| 159 |
return TCL_ERROR; |
| 160 |
} |
| 161 |
@@ -8084,7 +8074,7 @@ |
| 162 |
Tcl_Obj *valuePtr, *varObj, *nullObj = NULL, *nodeObj = NULL; |
| 163 |
Tcl_Obj *hashObj = NULL, *starObj = NULL; |
| 164 |
Blt_TreeKeySearch keyIter; |
| 165 |
|
| 166 |
+ int vobjc, kobjc, i, result = TCL_OK, len, cnt = 0/*, isar */; |
| 167 |
int nobreak = 0, noupdate = 0, unset = 0, init = 0, aLen; |
| 168 |
char *var, *string, *aName = NULL, *aPat = NULL; |
| 169 |
int klen, kl, j; |
| 170 |
@@ -8251,7 +8241,7 @@ |
| 171 |
} |
| 172 |
} |
| 173 |
|
| 174 |
|
| 175 |
+ /* isar = 0; */ |
| 176 |
if (arrName != NULL) { |
| 177 |
kl = strlen(aName); |
| 178 |
|
| 179 |
@@ -8526,7 +8516,7 @@ |
| 180 |
{ |
| 181 |
Blt_TreeNode node; |
| 182 |
int len, result; |
| 183 |
|
| 184 |
+ char *var/*, *string*/; |
| 185 |
TagSearch cursor = {0}; |
| 186 |
|
| 187 |
var = Tcl_GetString(objv[2]); |
| 188 |
@@ -8535,7 +8525,7 @@ |
| 189 |
Tcl_AppendResult(interp, "wrong number of args ", 0); |
| 190 |
return TCL_ERROR; |
| 191 |
} |
| 192 |
|
| 193 |
+ /*string =*/ Tcl_GetStringFromObj(objv[3],&len); |
| 194 |
if (len == 0) { |
| 195 |
Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); |
| 196 |
return TCL_OK; |
| 197 |
@@ -8894,6 +8884,7 @@ |
| 198 |
* Obj Callback for sqlload. |
| 199 |
* |
| 200 |
*/ |
| 201 |
+#if 0 |
| 202 |
static int SqlCallbackObj(SqlData *sqlPtr, int argc, Tcl_Obj **objv, Tcl_Obj **azColName) |
| 203 |
{ |
| 204 |
int i, j, rid, lid, n, tcid, vobjc, tobjc; |
| 205 |
@@ -9122,6 +9113,7 @@ |
| 206 |
return 1; |
| 207 |
} |
| 208 |
#endif |
| 209 |
+#endif |
| 210 |
|
| 211 |
#ifndef OMIT_SQLITE3_LOAD |
| 212 |
/* #include <sqlite3.h> */ |
| 213 |
--- a/generic/bltInit.c |
| 214 |
+++ b/generic/bltInit.c |
| 215 |
@@ -438,9 +438,9 @@ |
| 216 |
{ |
| 217 |
Tcl_DString dString; |
| 218 |
CONST char *value; |
| 219 |
+#ifndef TCL_ONLY |
| 220 |
static int tkisinit = 0; |
| 221 |
|
| 222 |
|
| 223 |
if (!tkisinit) { |
| 224 |
struct TileHandlers *thPtr; |
| 225 |
|
| 226 |
@@ -510,7 +510,9 @@ |
| 227 |
Tcl_Interp *interp; /* Interpreter to add extra commands */ |
| 228 |
{ |
| 229 |
int flags; |
| 230 |
+#ifdef USE_BLT_STUBS |
| 231 |
int dostub = 0; |
| 232 |
+#endif |
| 233 |
|
| 234 |
flags = (int)Tcl_GetAssocData(interp, BLT_THREAD_KEY, NULL); |
| 235 |
if ((flags & BLT_TCL_CMDS) == 0) { |
| 236 |
--- a/generic/bltColor.c |
| 237 |
+++ b/generic/bltColor.c |
| 238 |
@@ -77,7 +77,7 @@ |
| 239 |
|
| 240 |
#define NCOLORS 256 |
| 241 |
|
| 242 |
|
| 243 |
+#if 0 |
| 244 |
static void |
| 245 |
GetPaletteSizes(nColors, nRedsPtr, nGreensPtr, nBluesPtr) |
| 246 |
int nColors; /* Number of colors requested. */ |
| 247 |
@@ -129,6 +129,7 @@ |
| 248 |
} |
| 249 |
|
| 250 |
} |
| 251 |
+#endif |
| 252 |
|
| 253 |
/* |
| 254 |
*---------------------------------------------------------------------- |
| 255 |
@@ -200,6 +201,7 @@ |
| 256 |
return numAvail; |
| 257 |
} |
| 258 |
|
| 259 |
+#if 0 |
| 260 |
static void |
| 261 |
FindClosestColor(colorPtr, mapColors, numMapColors) |
| 262 |
ColorInfo *colorPtr; |
| 263 |
@@ -342,6 +344,7 @@ |
| 264 |
colorTabPtr->nPixels = nImageColors; |
| 265 |
return 1; |
| 266 |
} |
| 267 |
+#endif |
| 268 |
|
| 269 |
ColorTable |
| 270 |
Blt_CreateColorTable(tkwin) |
| 271 |
@@ -510,6 +513,7 @@ |
| 272 |
return colorTabPtr; |
| 273 |
} |
| 274 |
|
| 275 |
+#if 0 |
| 276 |
/* |
| 277 |
* First attempt: |
| 278 |
* Allocate colors all the colors in the image (up to NCOLORS). Bail out |
| 279 |
@@ -548,6 +552,7 @@ |
| 280 |
Blt_DeleteHashTable(&colorTable); |
| 281 |
return nColors; |
| 282 |
} |
| 283 |
+#endif |
| 284 |
|
| 285 |
#define Blt_DefaultColormap(tkwin) \ |
| 286 |
DefaultColormap(Tk_Display(tkwin), Tk_ScreenNumber(tkwin)) |
| 287 |
@@ -563,11 +568,11 @@ |
| 288 |
int keepColors = 0; |
| 289 |
register int i; |
| 290 |
XColor usedColors[NCOLORS]; |
| 291 |
|
| 292 |
+ int nUsedColors; |
| 293 |
Colormap colorMap; |
| 294 |
int inUse[NCOLORS]; |
| 295 |
XColor *colorPtr; |
| 296 |
|
| 297 |
+ /* XColor *imageColors; */ |
| 298 |
|
| 299 |
/* |
| 300 |
* Create a private colormap if one doesn't already exist for the |
| 301 |
@@ -582,7 +587,7 @@ |
| 302 |
XFreeColors(colorTabPtr->display, colorTabPtr->colorMap, |
| 303 |
colorTabPtr->pixelValues, colorTabPtr->nPixels, 0); |
| 304 |
} |
| 305 |
|
| 306 |
+ QueryColormap(colorTabPtr->display, colorMap, usedColors, |
| 307 |
&nUsedColors); |
| 308 |
memset((char *)inUse, 0, sizeof(int) * NCOLORS); |
| 309 |
if ((nUsedColors == 0) && (keepColors > 0)) { |
| 310 |
@@ -592,7 +597,7 @@ |
| 311 |
* have been used in the default colormap. |
| 312 |
*/ |
| 313 |
|
| 314 |
|
| 315 |
+ QueryColormap(colorTabPtr->display, |
| 316 |
Blt_DefaultColormap(tkwin), usedColors, &nUsedColors); |
| 317 |
|
| 318 |
/* |
| 319 |
@@ -622,7 +627,7 @@ |
| 320 |
* image as we can fit. If necessary, we'll cheat and reduce the number |
| 321 |
* of colors by quantizing. |
| 322 |
*/ |
| 323 |
|
| 324 |
+ /* imageColors = usedColors + nUsedColors; */ |
| 325 |
|
| 326 |
Tk_SetWindowColormap(tkwin, colorMap); |
| 327 |
} |
| 328 |
--- a/generic/bltTabset.c |
| 329 |
+++ b/generic/bltTabset.c |
| 330 |
@@ -3916,12 +3916,9 @@ |
| 331 |
{ |
| 332 |
int x, y; /* Screen coordinates of the test point. */ |
| 333 |
Tab *tabPtr; |
| 334 |
|
| 335 |
char coords[200]; |
| 336 |
|
| 337 |
coords[0] = 0; |
| 338 |
|
| 339 |
|
| 340 |
tabPtr = NULL; |
| 341 |
if ((Tk_GetPixels(interp, setPtr->tkwin, argv[2], &x) != TCL_OK) || |
| 342 |
(Tk_GetPixels(interp, setPtr->tkwin, argv[3], &y) != TCL_OK)) { |
| 343 |
@@ -5247,18 +5244,14 @@ |
| 344 |
Tab *startPtr, *nextPtr; |
| 345 |
Blt_ChainLink *linkPtr; |
| 346 |
register Tab *tabPtr; |
| 347 |
|
| 348 |
+ int x, maxWidth, sImg; |
| 349 |
int vert = (setPtr->side & SIDE_VERTICAL); |
| 350 |
|
| 351 |
sImg = 0; |
| 352 |
|
| 353 |
|
| 354 |
if (setPtr->startImage) { |
| 355 |
sImg = (vert?setPtr->startImage->height:setPtr->startImage->width); |
| 356 |
} |
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
tabsPerTier = (nTabs + (setPtr->nTiers - 1)) / setPtr->nTiers; |
| 362 |
x = sImg; |
| 363 |
--- a/generic/bltTile.c |
| 364 |
+++ b/generic/bltTile.c |
| 365 |
@@ -1176,10 +1176,7 @@ |
| 366 |
} |
| 367 |
if (clientPtr->tilePtr->mask != None) { |
| 368 |
Pixmap mask; |
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
mask = RectangleMask(display, drawable, x, y, width, height, |
| 374 |
tilePtr->mask, clientPtr->xOrigin, clientPtr->yOrigin); |
| 375 |
XSetClipMask(display, tilePtr->gc, mask); |
| 376 |
--- a/generic/bltTreeView.c |
| 377 |
+++ b/generic/bltTreeView.c |
| 378 |
@@ -5042,7 +5042,7 @@ |
| 379 |
&& strlen(Tcl_GetString(tvPtr->imageCmd))) { |
| 380 |
Tcl_DString cmdString; |
| 381 |
char *string; |
| 382 |
|
| 383 |
+ int /*result,*/ rcnt; |
| 384 |
Tcl_Interp *interp = tvPtr->interp; |
| 385 |
|
| 386 |
string = Blt_GetHashKey(&tvPtr->iconTable, icon->hashPtr); |
| 387 |
@@ -5052,7 +5052,7 @@ |
| 388 |
if (entryPtr) Tcl_Preserve(entryPtr); |
| 389 |
if (columnPtr) Tcl_Preserve(columnPtr); |
| 390 |
Blt_TreeViewPercentSubst(tvPtr, entryPtr, columnPtr, Tcl_GetString(tvPtr->imageCmd), string, &cmdString); |
| 391 |
|
| 392 |
+ /* result = */ Tcl_GlobalEval(interp, Tcl_DStringValue(&cmdString)); |
| 393 |
rcnt = icon->refCount; |
| 394 |
Blt_TreeViewFreeIcon(tvPtr, icon); |
| 395 |
if ((tvPtr->flags & TV_DELETED) |
| 396 |
@@ -5286,10 +5286,10 @@ |
| 397 |
TreeViewIcon *icons; |
| 398 |
TreeViewIcon icon; |
| 399 |
|
| 400 |
|
| 401 |
+ int isActive/*, hasFocus*/; |
| 402 |
|
| 403 |
isActive = (entryPtr == tvPtr->activePtr); |
| 404 |
|
| 405 |
+ /*hasFocus = (entryPtr == tvPtr->focusPtr);*/ |
| 406 |
icons = NULL; |
| 407 |
if (tvPtr->flags & TV_HIDE_ICONS) { |
| 408 |
return NULL; |
| 409 |
@@ -5879,9 +5879,9 @@ |
| 410 |
int x0, cx, xOffset; |
| 411 |
TreeViewStyle *sPtr; |
| 412 |
TreeViewIcon icon; |
| 413 |
|
| 414 |
+ int mw/*, mh*/; |
| 415 |
mw = Tk_Width(tvPtr->tkwin) - tvPtr->padX; |
| 416 |
|
| 417 |
+ /* mh = Tk_Height(tvPtr->tkwin) - tvPtr->padY; */ |
| 418 |
|
| 419 |
if (tvPtr->titleHeight < 1) { |
| 420 |
return; |
| 421 |
--- a/generic/bltTreeViewCmd.c |
| 422 |
+++ b/generic/bltTreeViewCmd.c |
| 423 |
@@ -668,10 +668,8 @@ |
| 424 |
hPtr = Blt_FirstHashEntry(tablePtr, &infoPtr->cursor); |
| 425 |
if (hPtr != NULL) { |
| 426 |
Blt_TreeNode node; |
| 427 |
|
| 428 |
|
| 429 |
node = Blt_GetHashValue(hPtr); |
| 430 |
|
| 431 |
infoPtr->entryPtr = Blt_NodeToEntry(tvPtr, node); |
| 432 |
if (infoPtr->entryPtr == NULL && cnt++ == 0) { |
| 433 |
/* fprintf(stderr, "Dangling node: %d\n", node->inode); */ |
| 434 |
@@ -1689,13 +1687,11 @@ |
| 435 |
TreeViewEntry *entryPtr; |
| 436 |
TreeViewColumn *columnPtr; |
| 437 |
int n, result; |
| 438 |
|
| 439 |
char *left, *string; |
| 440 |
|
| 441 |
if (GetEntryFromObj(tvPtr, objv[3], &entryPtr) != TCL_OK) { |
| 442 |
return TCL_ERROR; |
| 443 |
} |
| 444 |
|
| 445 |
string = Tcl_GetString(objv[4]); |
| 446 |
if (Blt_TreeViewGetColumnKey(interp, tvPtr, objv[4], &columnPtr, &left) |
| 447 |
!= TCL_OK || columnPtr == NULL) { |
| 448 |
@@ -1777,7 +1773,6 @@ |
| 449 |
{ |
| 450 |
TreeViewEntry *entryPtr; |
| 451 |
TreeViewColumn *columnPtr; |
| 452 |
|
| 453 |
double dVal, dIncr = 1.0; |
| 454 |
int iVal, iIncr = 1, isInt = 0; |
| 455 |
Tcl_Obj *objPtr, *valueObjPtr; |
| 456 |
@@ -1786,7 +1781,6 @@ |
| 457 |
if (GetEntryFromObj(tvPtr, objv[3], &entryPtr) != TCL_OK) { |
| 458 |
return TCL_ERROR; |
| 459 |
} |
| 460 |
|
| 461 |
string = Tcl_GetString(objv[4]); |
| 462 |
if (Blt_TreeViewGetColumnKey(interp, tvPtr, objv[4], &columnPtr, &left) |
| 463 |
!= TCL_OK || columnPtr == NULL) { |
| 464 |
@@ -1841,7 +1835,6 @@ |
| 465 |
Tcl_Obj *CONST *objv; |
| 466 |
{ |
| 467 |
TreeViewEntry *entryPtr; |
| 468 |
|
| 469 |
char *key; |
| 470 |
Tcl_Obj *objPtr; |
| 471 |
|
| 472 |
@@ -1877,7 +1870,6 @@ |
| 473 |
return TCL_OK; |
| 474 |
} |
| 475 |
key = Tcl_GetString(objv[4]); |
| 476 |
|
| 477 |
Tcl_Release(entryPtr); |
| 478 |
if (Blt_TreeGetValue(tvPtr->interp, tvPtr->tree, entryPtr->node, |
| 479 |
key, &objPtr) != TCL_OK) { |
| 480 |
@@ -2656,7 +2648,7 @@ |
| 481 |
TreeViewEntry *entryPtr; |
| 482 |
char *string; |
| 483 |
int isRoot, isTest; |
| 484 |
|
| 485 |
+ int x, y; |
| 486 |
int rootX, rootY; |
| 487 |
|
| 488 |
Tk_GetRootCoords(tvPtr->tkwin, &rootX, &rootY); |
| 489 |
@@ -2693,8 +2685,6 @@ |
| 490 |
(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) { |
| 491 |
return TCL_ERROR; |
| 492 |
} |
| 493 |
|
| 494 |
|
| 495 |
if (isRoot) { |
| 496 |
x -= rootX; |
| 497 |
y -= rootY; |
| 498 |
@@ -3768,7 +3758,7 @@ |
| 499 |
int nMatches, maxMatches, result, length, ocnt, useformat,userow, isvis; |
| 500 |
int depth, maxdepth, mindepth, mask, istree, isleaf, invis, ismap, uselabel; |
| 501 |
int isopen, isclosed, notop, nocase, isfull, cmdLen, docount, optInd, reldepth; |
| 502 |
|
| 503 |
+ int isnull, retLabel, isret; |
| 504 |
char *colStr, *keysub; |
| 505 |
Tcl_Obj *cmdObj, *cmdArgs; |
| 506 |
Tcl_Obj **aobjv; |
| 507 |
@@ -3815,7 +3805,6 @@ |
| 508 |
reldepth = notop = 0; |
| 509 |
nocase = 0, isfull = 0, useformat = 0; |
| 510 |
keysub = colStr = NULL; |
| 511 |
|
| 512 |
curValue = NULL; |
| 513 |
cmdObj = NULL; |
| 514 |
cmdArgs = NULL; |
| 515 |
@@ -4663,7 +4652,7 @@ |
| 516 |
register int i; |
| 517 |
int length, depth = -1, maxdepth = -1, mindepth = -1, noArgs, usefull = 0; |
| 518 |
int result, nocase, uselabel = 0, optInd, ocnt; |
| 519 |
|
| 520 |
+ char *curValue; |
| 521 |
Blt_List options; |
| 522 |
TreeViewEntry *entryPtr; |
| 523 |
register Blt_ListNode node; |
| 524 |
@@ -4918,7 +4907,6 @@ |
| 525 |
!= TCL_OK) { |
| 526 |
goto error; /* This shouldn't happen. */ |
| 527 |
} |
| 528 |
|
| 529 |
objPtr = Tcl_GetObjResult(interp); |
| 530 |
result = (*compareProc)(interp, Tcl_GetString(objPtr), kPtr, nocase); |
| 531 |
if (result == invertMatch) { |
| 532 |
@@ -5192,10 +5180,10 @@ |
| 533 |
TreeViewColumn *columnPtr; |
| 534 |
TreeViewEntry *entryPtr; |
| 535 |
Tcl_DString dStr; |
| 536 |
|
| 537 |
+ int optSkips, i, m, start, nOptions/*, inode*/; |
| 538 |
|
| 539 |
useid = -1; |
| 540 |
|
| 541 |
+ /*inode = -1;*/ |
| 542 |
optSkips = 0; |
| 543 |
sobjc = 0; |
| 544 |
tobjc = 0; |
| 545 |
@@ -5289,7 +5277,7 @@ |
| 546 |
} |
| 547 |
addpath: |
| 548 |
node = NULL; |
| 549 |
|
| 550 |
+ /*inode = -1;*/ |
| 551 |
if (oLen == 5 |
| 552 |
&& (tvPtr->pathSep == SEPARATOR_NONE || tvPtr->pathSep == NULL) |
| 553 |
&& path[0] == '#' && strcmp(path, "#auto") == 0) { |
| 554 |
@@ -5420,7 +5408,7 @@ |
| 555 |
goto error; |
| 556 |
} |
| 557 |
makeent: |
| 558 |
|
| 559 |
+ /*inode = node->inode;*/ |
| 560 |
if (Blt_TreeViewCreateEntry(tvPtr, node, 0, options, BLT_CONFIG_OBJV_ONLY) != TCL_OK) { |
| 561 |
goto opterror; |
| 562 |
} |
| 563 |
--- a/generic/bltTreeViewColumn.c |
| 564 |
+++ b/generic/bltTreeViewColumn.c |
| 565 |
@@ -413,7 +413,6 @@ |
| 566 |
char *string; |
| 567 |
int objc; |
| 568 |
register int i; |
| 569 |
|
| 570 |
TreeView *tvPtr; |
| 571 |
|
| 572 |
string = Tcl_GetString(objPtr); |
| 573 |
@@ -431,7 +430,6 @@ |
| 574 |
"\" must be in even name-value pairs", (char *)NULL); |
| 575 |
return TCL_ERROR; |
| 576 |
} |
| 577 |
|
| 578 |
tvPtr = entryPtr->tvPtr; |
| 579 |
for (i = 0; i < objc; i += 2) { |
| 580 |
int result; |
| 581 |
@@ -709,11 +707,9 @@ |
| 582 |
{ |
| 583 |
int n = 0; |
| 584 |
Blt_ChainLink *linkPtr; |
| 585 |
|
| 586 |
|
| 587 |
for (linkPtr = Blt_ChainFirstLink(tvPtr->colChainPtr); linkPtr != NULL; |
| 588 |
linkPtr = Blt_ChainNextLink(linkPtr)) { |
| 589 |
|
| 590 |
n++; |
| 591 |
} |
| 592 |
return n; |
| 593 |
@@ -2477,7 +2473,7 @@ |
| 594 |
Tcl_Obj *CONST *objv; |
| 595 |
{ |
| 596 |
TreeViewColumn *colPtr; |
| 597 |
|
| 598 |
+ int width; |
| 599 |
Tk_Anchor anchor; |
| 600 |
int left, right; |
| 601 |
char *string; |
| 602 |
@@ -2508,7 +2504,6 @@ |
| 603 |
return TCL_OK; |
| 604 |
} |
| 605 |
width = VPORTWIDTH(tvPtr); |
| 606 |
|
| 607 |
|
| 608 |
left = tvPtr->xOffset; |
| 609 |
right = tvPtr->xOffset + width; |
| 610 |
@@ -3342,11 +3337,11 @@ |
| 611 |
Tcl_IncrRefCount(entryPtr->dataObjPtr); |
| 612 |
} |
| 613 |
} else { |
| 614 |
|
| 615 |
+ /*Blt_TreeKey key;*/ |
| 616 |
Tcl_Obj *objPtr; |
| 617 |
int isFmt; |
| 618 |
|
| 619 |
|
| 620 |
+ /*key = tvPtr->sortColumnPtr->key;*/ |
| 621 |
isFmt = Blt_TreeViewStyleIsFmt(tvPtr, tvPtr->sortColumnPtr->stylePtr); |
| 622 |
for(p = tvPtr->flatArr; *p != NULL; p++) { |
| 623 |
TreeViewValue *valuePtr; |
| 624 |
--- a/generic/bltTreeViewStyle.c |
| 625 |
+++ b/generic/bltTreeViewStyle.c |
| 626 |
@@ -1600,15 +1600,13 @@ |
| 627 |
int textX, textY, textHeight; |
| 628 |
int gap, columnWidth, ttlWidth; |
| 629 |
int bool; |
| 630 |
|
| 631 |
+ /* int borderWidth, relief; */ |
| 632 |
TextLayout *textPtr; |
| 633 |
int boxX, boxY, boxWidth, boxHeight; |
| 634 |
TreeViewStyle *csPtr, sRec = *stylePtr; |
| 635 |
int valWidth = (valuePtr->textPtr?valuePtr->width:(icon?TreeViewIconWidth(icon):0)); |
| 636 |
|
| 637 |
int showValue; |
| 638 |
|
| 639 |
|
| 640 |
showValue = (tvPtr->hideStyleText ? 0 : cbPtr->showValue); |
| 641 |
|
| 642 |
columnPtr = valuePtr->columnPtr; |
| 643 |
@@ -1617,13 +1615,13 @@ |
| 644 |
drawTextBox(tvPtr, drawable, entryPtr, valuePtr, stylePtr, icon, x, y, &sRec); |
| 645 |
gc = sRec.gc; |
| 646 |
|
| 647 |
|
| 648 |
+ /* if (gc != stylePtr->activeGC) { |
| 649 |
borderWidth = 0; |
| 650 |
relief = TK_RELIEF_FLAT; |
| 651 |
} else { |
| 652 |
borderWidth = 1; |
| 653 |
relief = TK_RELIEF_RAISED; |
| 654 |
|
| 655 |
+ } */ |
| 656 |
|
| 657 |
columnWidth = columnPtr->width - PADDING(columnPtr->pad); |
| 658 |
if (!valuePtr->string) { |
| 659 |
@@ -2629,15 +2627,10 @@ |
| 660 |
TreeViewStyle *csPtr, sRec = *stylePtr; |
| 661 |
int valWidth = (valuePtr->textPtr?valuePtr->width:(icon?TreeViewIconWidth(icon):0)); |
| 662 |
double curValue; |
| 663 |
|
| 664 |
TextStyle ts; |
| 665 |
XColor *color; |
| 666 |
|
| 667 |
int showValue = (tvPtr->hideStyleText ? 0 : cbPtr->showValue); |
| 668 |
|
| 669 |
|
| 670 |
|
| 671 |
|
| 672 |
textPtr = NULL; |
| 673 |
columnPtr = valuePtr->columnPtr; |
| 674 |
csPtr = columnPtr->stylePtr; |
| 675 |
@@ -3417,7 +3410,6 @@ |
| 676 |
{ |
| 677 |
TreeViewColumn *columnPtr; |
| 678 |
TreeViewWindowBox *tbPtr = (TreeViewWindowBox *)stylePtr; |
| 679 |
|
| 680 |
int width, height, diff; |
| 681 |
WindowCell *wcPtr; |
| 682 |
TreeViewStyle sRec = *stylePtr; |
| 683 |
@@ -3438,7 +3430,6 @@ |
| 684 |
int columnWidth = columnPtr->width - |
| 685 |
(2 * columnPtr->borderWidth + PADDING(columnPtr->pad)); |
| 686 |
|
| 687 |
|
| 688 |
width = columnWidth; |
| 689 |
height = entryPtr->height-1; |
| 690 |
if ((diff = (y-tvPtr->titleHeight- tvPtr->insetY))<0) { |
| 691 |
--- a/generic/bltUnixDnd.c |
| 692 |
+++ b/generic/bltUnixDnd.c |
| 693 |
@@ -1459,6 +1459,7 @@ |
| 694 |
* |
| 695 |
* ------------------------------------------------------------------------ |
| 696 |
*/ |
| 697 |
+#if 0 |
| 698 |
static void |
| 699 |
MorphToken(dndPtr) |
| 700 |
Dnd *dndPtr; /* Drag-and-drop manager (source). */ |
| 701 |
@@ -1511,6 +1512,7 @@ |
| 702 |
} |
| 703 |
RaiseToken(dndPtr); |
| 704 |
} |
| 705 |
+#endif |
| 706 |
|
| 707 |
static void |
| 708 |
GetTokenPosition(dndPtr, x, y) |
| 709 |
--- a/generic/bltWinop.c |
| 710 |
+++ b/generic/bltWinop.c |
| 711 |
@@ -913,7 +913,7 @@ |
| 712 |
Tk_PhotoHandle srcPhoto; |
| 713 |
Tk_PhotoImageBlock src; |
| 714 |
Blt_ColorImage srcImage; |
| 715 |
|
| 716 |
+ int x, y, isalph, iscnt, isNew, cnt; |
| 717 |
int i, rng[4], from = 0; |
| 718 |
register Pix32 *srcPtr; |
| 719 |
Tcl_Obj *listPtr; |
| 720 |
@@ -922,7 +922,6 @@ |
| 721 |
Blt_HashTable hTbl; |
| 722 |
Blt_HashSearch cursor; |
| 723 |
|
| 724 |
|
| 725 |
isalph = 0; |
| 726 |
iscnt = 0; |
| 727 |
while (argc > 3) { |
| 728 |
@@ -1524,7 +1523,7 @@ |
| 729 |
{ |
| 730 |
double range[3]; |
| 731 |
double left[3]; |
| 732 |
|
| 733 |
+ int x, width; |
| 734 |
double t; |
| 735 |
XColor C; |
| 736 |
XColor *leftPtr, *rightPtr; |
| 737 |
@@ -1554,7 +1553,6 @@ |
| 738 |
range[1] = (double)((rightPtr->green - leftPtr->green) / 257.0); |
| 739 |
range[2] = (double)((rightPtr->blue - leftPtr->blue) / 257.0); |
| 740 |
|
| 741 |
|
| 742 |
for (x = 0; x < width; x++) { |
| 743 |
char cbuf[100]; |
| 744 |
t = ((double)( sin(M_PI_2 * (double)x / (double)width))); |
| 745 |
@@ -1574,7 +1572,7 @@ |
| 746 |
XColor *leftPtr, *rightPtr; |
| 747 |
double range[3]; |
| 748 |
double left[3]; |
| 749 |
|
| 750 |
+ int x, width; |
| 751 |
double t; |
| 752 |
XColor **destPtr, C; |
| 753 |
|
| 754 |
@@ -1587,7 +1585,6 @@ |
| 755 |
range[1] = (double)((rightPtr->green - leftPtr->green) / 257.0); |
| 756 |
range[2] = (double)((rightPtr->blue - leftPtr->blue) / 257.0); |
| 757 |
|
| 758 |
|
| 759 |
width = gradPtr->width; |
| 760 |
if (gradPtr->grads) { |
| 761 |
Blt_FreeGradient(gradPtr); |
| 762 |
--- a/generic/tkButton.c |
| 763 |
+++ b/generic/tkButton.c |
| 764 |
@@ -352,11 +352,9 @@ |
| 765 |
char *string, char *widgRec, int offset, char *strList[], char *label ) |
| 766 |
{ |
| 767 |
int *namePtr = (int *)(widgRec + offset); |
| 768 |
|
| 769 |
int i; |
| 770 |
|
| 771 |
for (i=0; strList[i]; i++) { |
| 772 |
|
| 773 |
if (strcmp(string, strList[i]) == 0) { |
| 774 |
*namePtr = i; |
| 775 |
return TCL_OK; |
| 776 |
@@ -898,11 +896,10 @@ |
| 777 |
{ |
| 778 |
Button *butPtr = (Button*)widgRec;; |
| 779 |
int argc = 0; |
| 780 |
|
| 781 |
+ int i; |
| 782 |
char **argv; |
| 783 |
Tk_Image imgs[9], image; |
| 784 |
|
| 785 |
|
| 786 |
if (string && Tcl_SplitList(interp, string, &argc, &argv) != TCL_OK) { |
| 787 |
return TCL_ERROR; |
| 788 |
} |
| 789 |
@@ -1703,7 +1700,7 @@ |
| 790 |
Tk_Image image; |
| 791 |
char *oldTextVar = NULL, *oldSelVar = NULL; |
| 792 |
Blt_Tree oldTree; |
| 793 |
|
| 794 |
+ int result = TCL_OK; |
| 795 |
char * oldABdStr = butPtr->activeBdImageString; |
| 796 |
char * oldDBStr = butPtr->disabledBdImageString; |
| 797 |
char * oldBDStr = butPtr->bdImageString; |
| 798 |
@@ -1712,7 +1709,6 @@ |
| 799 |
|
| 800 |
winPtr = (Tk_FakeWin *) (butPtr->tkwin); |
| 801 |
oldTree = butPtr->tree; |
| 802 |
|
| 803 |
|
| 804 |
if (oldTree == NULL) { |
| 805 |
oldTextVar = (butPtr->textVarName?strdup(butPtr->textVarName):NULL); |
| 806 |
@@ -2219,7 +2215,7 @@ |
| 807 |
* the text to make the button appear to |
| 808 |
* move up and down as the relief changes. */ |
| 809 |
Blt_Tile tile, bgTile, inTile; |
| 810 |
|
| 811 |
+ int drawBorder; |
| 812 |
int textXOffset, textYOffset; |
| 813 |
int haveImage = 0, haveText = 0; |
| 814 |
int imageWidth, imageHeight; |
| 815 |
@@ -2305,7 +2301,6 @@ |
| 816 |
bgTile = TILECHOOSE(bgTile,butPtr->innerTile); |
| 817 |
} |
| 818 |
border = butPtr->normalBorder; |
| 819 |
|
| 820 |
|
| 821 |
gc = butPtr->normalTextGC; |
| 822 |
|
| 823 |
--- a/generic/bltScrollbar.c |
| 824 |
+++ b/generic/bltScrollbar.c |
| 825 |
@@ -1017,7 +1017,9 @@ |
| 826 |
{ |
| 827 |
register Scrollbar *scrollPtr = clientData; |
| 828 |
register Tk_Window tkwin = scrollPtr->tkwin; |
| 829 |
+#ifdef notdef |
| 830 |
XPoint points[7]; |
| 831 |
+#endif |
| 832 |
Tk_3DBorder border; |
| 833 |
int relief, width, elementBorderWidth; |
| 834 |
Pixmap pixmap; |
| 835 |
--- a/generic/bltTed.c |
| 836 |
+++ b/generic/bltTed.c |
| 837 |
@@ -306,10 +306,14 @@ |
| 838 |
static void DisplayTed _ANSI_ARGS_((ClientData clientData)); |
| 839 |
static void DestroyTed _ANSI_ARGS_((DestroyData destroyData)); |
| 840 |
static void DisplayEntry _ANSI_ARGS_((ClientData clientData)); |
| 841 |
+#if 0 |
| 842 |
static void DestroyEntry _ANSI_ARGS_((DestroyData destoryData)); |
| 843 |
+#endif |
| 844 |
|
| 845 |
static Tcl_CmdProc TedCmd; |
| 846 |
+#if 0 |
| 847 |
static Tk_EventProc EntryEventProc; |
| 848 |
+#endif |
| 849 |
static Tk_EventProc TedEventProc; |
| 850 |
|
| 851 |
/* |
| 852 |
@@ -360,6 +364,7 @@ |
| 853 |
* |
| 854 |
*---------------------------------------------------------------------- |
| 855 |
*/ |
| 856 |
+#if 0 |
| 857 |
static void |
| 858 |
EventuallyRedrawEntry(repPtr) |
| 859 |
EntryRep *repPtr; /* Information about editor. */ |
| 860 |
@@ -369,6 +374,7 @@ |
| 861 |
Tcl_DoWhenIdle(DisplayEntry, repPtr); |
| 862 |
} |
| 863 |
} |
| 864 |
+#endif |
| 865 |
|
| 866 |
/* |
| 867 |
* -------------------------------------------------------------- |
| 868 |
@@ -387,6 +393,7 @@ |
| 869 |
* |
| 870 |
* -------------------------------------------------------------- |
| 871 |
*/ |
| 872 |
+#if 0 |
| 873 |
static void |
| 874 |
EntryEventProc(clientData, eventPtr) |
| 875 |
ClientData clientData; /* Information about window. */ |
| 876 |
@@ -408,6 +415,7 @@ |
| 877 |
Tcl_EventuallyFree(repPtr, DestroyEntry); |
| 878 |
} |
| 879 |
} |
| 880 |
+#endif |
| 881 |
|
| 882 |
/* |
| 883 |
* -------------------------------------------------------------- |
| 884 |
@@ -548,6 +556,7 @@ |
| 885 |
* |
| 886 |
* ---------------------------------------------------------------------------- |
| 887 |
*/ |
| 888 |
+#if 0 |
| 889 |
static int |
| 890 |
CreateEntry(tedPtr, entryPtr) |
| 891 |
Ted *tedPtr; |
| 892 |
@@ -614,6 +623,7 @@ |
| 893 |
} |
| 894 |
} |
| 895 |
} |
| 896 |
+#endif |
| 897 |
|
| 898 |
/* |
| 899 |
* ---------------------------------------------------------------------------- |