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