Tk Source Code

Attachment Details
Login
Overview

Artifact ID: 9c1000edcbf338b5570c5c26345ac8d7c4fad0ba
Ticket: 554763ffffffffffffffffffffffffffffffffff
Date: 2002-06-21 14:09:12
User: lgac
Artifact Attached: 03303c025b41947b97c6eb98443f712fad64232f
Filename:tk8.4a4_patch3.txt
Description:feedback of TIP 104 discussions added
Content:
     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
   900
   901
   902
   903
   904
   905
   906
   907
   908
   909
   910
   911
   912
   913
   914
   915
   916
   917
   918
   919
   920
   921
   922
   923
   924
   925
   926
   927
   928
   929
   930
   931
   932
   933
   934
   935
   936
   937
   938
   939
   940
   941
   942
   943
   944
   945
   946
   947
   948
   949
   950
   951
   952
   953
   954
   955
   956
   957
   958
   959
   960
   961
   962
   963
   964
   965
   966
   967
   968
   969
   970
   971
   972
   973
   974
   975
   976
   977
   978
   979
   980
   981
   982
   983
   984
   985
   986
   987
   988
   989
   990
   991
   992
   993
   994
   995
   996
   997
   998
   999
  1000
  1001
  1002
  1003
  1004
  1005
  1006
  1007
  1008
  1009
  1010
  1011
  1012
  1013
  1014
  1015
  1016
  1017
  1018
  1019
  1020
  1021
  1022
  1023
  1024
  1025
  1026
  1027
  1028
  1029
  1030
  1031
  1032
  1033
  1034
  1035
  1036
  1037
  1038
  1039
  1040
  1041
  1042
  1043
  1044
  1045
  1046
  1047
  1048
  1049
  1050
  1051
  1052
  1053
  1054
  1055
  1056
  1057
  1058
  1059
  1060
  1061
  1062
  1063
  1064
  1065
  1066
  1067
  1068
  1069
  1070
  1071
  1072
  1073
  1074
  1075
  1076
  1077
  1078
  1079
  1080
  1081
  1082
  1083
  1084
  1085
  1086
  1087
  1088
  1089
  1090
  1091
  1092
  1093
  1094
  1095
  1096
  1097
  1098
  1099
  1100
  1101
  1102
  1103
  1104
  1105
  1106
  1107
  1108
  1109
  1110
  1111
  1112
  1113
  1114
  1115
  1116
  1117
  1118
  1119
  1120
  1121
  1122
  1123
  1124
  1125
  1126
  1127
  1128
  1129
  1130
  1131
  1132
  1133
  1134
  1135
  1136
  1137
  1138
  1139
  1140
  1141
  1142
  1143
  1144
  1145
  1146
  1147
  1148
  1149
  1150
  1151
  1152
  1153
  1154
  1155
  1156
  1157
  1158
  1159
  1160
  1161
  1162
  1163
  1164
  1165
  1166
  1167
  1168
  1169
  1170
  1171
  1172
  1173
  1174
  1175
  1176
  1177
  1178
  1179
  1180
  1181
  1182
  1183
  1184
  1185
  1186
  1187
  1188
  1189
  1190
  1191
  1192
  1193
  1194
  1195
  1196
  1197
  1198
  1199
  1200
  1201
  1202
  1203
  1204
  1205
  1206
  1207
  1208
  1209
  1210
  1211
  1212
  1213
  1214
  1215
  1216
  1217
  1218
  1219
  1220
  1221
  1222
  1223
  1224
  1225
  1226
  1227
  1228
  1229
  1230
  1231
  1232
  1233
  1234
  1235
  1236
  1237
  1238
  1239
  1240
  1241
  1242
  1243
  1244
  1245
  1246
  1247
  1248
  1249
  1250
  1251
  1252
  1253
  1254
  1255
  1256
  1257
  1258
  1259
  1260
  1261
  1262
  1263
  1264
  1265
  1266
  1267
  1268
  1269
  1270
  1271
  1272
  1273
  1274
  1275
  1276
  1277
  1278
  1279
  1280
  1281
  1282
  1283
  1284
  1285
  1286
  1287
  1288
  1289
  1290
  1291
  1292
  1293
  1294
  1295
  1296
  1297
  1298
  1299
  1300
  1301
  1302
  1303
  1304
  1305
  1306
  1307
  1308
  1309
  1310
  1311
  1312
  1313
  1314
  1315
  1316
  1317
  1318
  1319
  1320
  1321
  1322
  1323
  1324
  1325
  1326
  1327
  1328
  1329
  1330
  1331
  1332
  1333
  1334
  1335
  1336
  1337
  1338
  1339
  1340
  1341
  1342
  1343
  1344
  1345
  1346
  1347
  1348
  1349
  1350
  1351
  1352
  1353
  1354
  1355
  1356
  1357
  1358
  1359
  1360
  1361
  1362
  1363
  1364
  1365
  1366
  1367
  1368
  1369
  1370
  1371
  1372
  1373
  1374
  1375
  1376
  1377
  1378
  1379
  1380
  1381
  1382
  1383
  1384
  1385
  1386
  1387
  1388
  1389
  1390
  1391
  1392
  1393
  1394
  1395
  1396
  1397
  1398
  1399
  1400
  1401
  1402
  1403
  1404
  1405
  1406
  1407
  1408
  1409
  1410
  1411
  1412
  1413
  1414
  1415
  1416
  1417
  1418
  1419
  1420
  1421
  1422
  1423
  1424
  1425
  1426
  1427
  1428
  1429
  1430
  1431
  1432
  1433
  1434
  1435
  1436
  1437
  1438
  1439
  1440
  1441
  1442
  1443
  1444
  1445
  1446
  1447
  1448
  1449
  1450
  1451
  1452
  1453
  1454
  1455
  1456
  1457
  1458
  1459
  1460
  1461
  1462
  1463
  1464
  1465
  1466
  1467
  1468
  1469
  1470
  1471
  1472
  1473
  1474
  1475
  1476
  1477
  1478
  1479
  1480
  1481
  1482
  1483
  1484
  1485
  1486
  1487
  1488
  1489
  1490
  1491
  1492
  1493
  1494
  1495
  1496
  1497
  1498
  1499
  1500
  1501
  1502
  1503
  1504
  1505
  1506
  1507
  1508
  1509
  1510
  1511
  1512
  1513
  1514
  1515
  1516
  1517
  1518
  1519
  1520
  1521
  1522
  1523
  1524
  1525
  1526
  1527
  1528
  1529
  1530
  1531
  1532
  1533
  1534
  1535
  1536
  1537
  1538
  1539
  1540
  1541
  1542
  1543
  1544
  1545
  1546
  1547
  1548
  1549
  1550
  1551
  1552
  1553
  1554
  1555
  1556
  1557
  1558
  1559
  1560
  1561
  1562
  1563
  1564
  1565
  1566
  1567
  1568
  1569
  1570
  1571
  1572
  1573
  1574
  1575
  1576
  1577
  1578
  1579
  1580
  1581
  1582
  1583
  1584
  1585
  1586
  1587
  1588
  1589
  1590
  1591
  1592
  1593
  1594
  1595
  1596
  1597
  1598
  1599
  1600
  1601
  1602
  1603
  1604
  1605
  1606
  1607
  1608
  1609
  1610
  1611
  1612
  1613
  1614
  1615
  1616
  1617
  1618
  1619
  1620
  1621
  1622
  1623
  1624
  1625
  1626
  1627
  1628
  1629
  1630
  1631
  1632
  1633
  1634
  1635
  1636
  1637
  1638
  1639
  1640
  1641
  1642
  1643
  1644
  1645
  1646
  1647
  1648
  1649
  1650
  1651
  1652
  1653
  1654
  1655
  1656
  1657
  1658
  1659
  1660
  1661
  1662
  1663
  1664
  1665
  1666
  1667
  1668
  1669
  1670
  1671
  1672
  1673
  1674
  1675
  1676
  1677
  1678
  1679
  1680
  1681
  1682
  1683
  1684
  1685
  1686
  1687
  1688
  1689
  1690
  1691
  1692
  1693
  1694
  1695
  1696
  1697
  1698
  1699
  1700
  1701
  1702
  1703
  1704
  1705
  1706
  1707
  1708
  1709
  1710
  1711
  1712
  1713
  1714
  1715
  1716
  1717
  1718
  1719
  1720
  1721
  1722
  1723
  1724
  1725
  1726
  1727
  1728
  1729
  1730
  1731
  1732
  1733
  1734
  1735
  1736
  1737
  1738
  1739
  1740
  1741
  1742
  1743
  1744
  1745
  1746
  1747
  1748
  1749
  1750
  1751
  1752
  1753
  1754
  1755
  1756
  1757
  1758
  1759
  1760
  1761
  1762
  1763
  1764
  1765
  1766
  1767
  1768
  1769
  1770
  1771
  1772
  1773
  1774
  1775
  1776
  1777
  1778
  1779
  1780
  1781
  1782
  1783
  1784
  1785
  1786
  1787
  1788
  1789
  1790
  1791
  1792
  1793
  1794
  1795
  1796
  1797
  1798
  1799
  1800
  1801
  1802
  1803
  1804
  1805
  1806
  1807
  1808
  1809
  1810
  1811
  1812
  1813
  1814
  1815
  1816
  1817
  1818
  1819
  1820
  1821
  1822
  1823
  1824
  1825
  1826
  1827
  1828
  1829
  1830
  1831
  1832
  1833
  1834
  1835
  1836
  1837
  1838
  1839
  1840
  1841
  1842
  1843
  1844
  1845
  1846
  1847
  1848
  1849
  1850
  1851
  1852
  1853
  1854
  1855
  1856
  1857
  1858
  1859
  1860
  1861
  1862
  1863
  1864
  1865
  1866
  1867
  1868
  1869
  1870
  1871
  1872
  1873
  1874
  1875
  1876
  1877
  1878
  1879
  1880
  1881
  1882
  1883
  1884
  1885
  1886
  1887
  1888
  1889
  1890
  1891
  1892
  1893
  1894
  1895
  1896
  1897
  1898
  1899
  1900
  1901
  1902
  1903
  1904
  1905
  1906
  1907
  1908
  1909
  1910
  1911
  1912
  1913
  1914
  1915
  1916
  1917
  1918
  1919
  1920
  1921
  1922
  1923
  1924
  1925
  1926
  1927
  1928
  1929
  1930
  1931
  1932
  1933
  1934
  1935
  1936
  1937
  1938
  1939
  1940
  1941
  1942
  1943
  1944
  1945
  1946
  1947
  1948
  1949
  1950
  1951
  1952
  1953
  1954
  1955
  1956
  1957
  1958
  1959
  1960
  1961
  1962
  1963
  1964
  1965
  1966
  1967
  1968
  1969
  1970
  1971
  1972
  1973
  1974
  1975
  1976
  1977
  1978
  1979
  1980
  1981
  1982
  1983
  1984
  1985
  1986
  1987
  1988
  1989
  1990
  1991
  1992
  1993
  1994
  1995
  1996
  1997
  1998
  1999
  2000
  2001
  2002
  2003
  2004
  2005
  2006
  2007
  2008
  2009
  2010
  2011
  2012
  2013
  2014
  2015
  2016
  2017
  2018
  2019
  2020
  2021
  2022
  2023
  2024
  2025
  2026
  2027
  2028
  2029
  2030
  2031
  2032
  2033
  2034
  2035
  2036
  2037
  2038
  2039
  2040
  2041
  2042
  2043
  2044
  2045
  2046
  2047
  2048
  2049
  2050
  2051
  2052
  2053
  2054
  2055
  2056
  2057
  2058
  2059
  2060
  2061
  2062
  2063
  2064
  2065
  2066
  2067
  2068
  2069
  2070
  2071
  2072
  2073
  2074
  2075
  2076
  2077
  2078
  2079
  2080
  2081
  2082
  2083
  2084
  2085
  2086
  2087
  2088
  2089
  2090
  2091
  2092
  2093
  2094
  2095
  2096
  2097
  2098
  2099
  2100
  2101
  2102
  2103
  2104
  2105
  2106
  2107
  2108
  2109
  2110
  2111
  2112
  2113
  2114
  2115
  2116
  2117
  2118
  2119
  2120
  2121
  2122
  2123
  2124
  2125
  2126
  2127
  2128
  2129
  2130
  2131
  2132
  2133
  2134
  2135
  2136
  2137
  2138
  2139
  2140
  2141
  2142
  2143
  2144
  2145
  2146
  2147
  2148
  2149
  2150
  2151
  2152
  2153
  2154
  2155
  2156
  2157
  2158
  2159
  2160
  2161
  2162
  2163
  2164
  2165
  2166
  2167
  2168
  2169
  2170
  2171
  2172
  2173
  2174
  2175
  2176
  2177
  2178
  2179
  2180
  2181
  2182
  2183
  2184
  2185
  2186
  2187
  2188
  2189
  2190
  2191
  2192
  2193
  2194
  2195
  2196
  2197
  2198
  2199
  2200
  2201
  2202
  2203
  2204
  2205
  2206
  2207
  2208
  2209
  2210
  2211
  2212
  2213
  2214
  2215
  2216
  2217
  2218
  2219
  2220
  2221
  2222
  2223
  2224
  2225
  2226
  2227
  2228
  2229
  2230
  2231
  2232
  2233
  2234
  2235
  2236
  2237
  2238
  2239
  2240
  2241
  2242
  2243
  2244
  2245
  2246
  2247
  2248
  2249
  2250
  2251
  2252
  2253
  2254
  2255
  2256
  2257
  2258
  2259
  2260
  2261
  2262
  2263
  2264
  2265
  2266
  2267
  2268
  2269
  2270
  2271
  2272
  2273
  2274
  2275
  2276
  2277
  2278
  2279
  2280
  2281
  2282
  2283
  2284
  2285
  2286
  2287
  2288
  2289
  2290
  2291
  2292
  2293
  2294
  2295
  2296
  2297
  2298
  2299
  2300
  2301
  2302
  2303
  2304
  2305
  2306
  2307
  2308
  2309
  2310
  2311
  2312
  2313
  2314
  2315
  2316
  2317
  2318
  2319
  2320
  2321
  2322
  2323
  2324
  2325
  2326
  2327
  2328
  2329
  2330
  2331
  2332
  2333
  2334
  2335
  2336
  2337
  2338
  2339
  2340
  2341
  2342
  2343
  2344
  2345
  2346
  2347
  2348
  2349
  2350
  2351
  2352
  2353
  2354
  2355
  2356
  2357
  2358
  2359
  2360
  2361
  2362
  2363
  2364
  2365
  2366
  2367
  2368
  2369
  2370
  2371
  2372
  2373
  2374
  2375
  2376
  2377
  2378
  2379
  2380
  2381
  2382
  2383
  2384
  2385
  2386
  2387
  2388
  2389
  2390
  2391
  2392
  2393
  2394
  2395
  2396
  2397
  2398
  2399
  2400
  2401
  2402
  2403
  2404
  2405
  2406
  2407
  2408
  2409
  2410
  2411
  2412
  2413
  2414
  2415
  2416
  2417
  2418
  2419
  2420
  2421
  2422
  2423
  2424
  2425
  2426
  2427
  2428
  2429
  2430
  2431
  2432
  2433
  2434
  2435
  2436
  2437
  2438
  2439
  2440
  2441
  2442
  2443
  2444
  2445
  2446
  2447
  2448
  2449
  2450
  2451
  2452
  2453
  2454
  2455
  2456
  2457
  2458
  2459
  2460
  2461
  2462
  2463
  2464
  2465
  2466
  2467
  2468
  2469
  2470
  2471
  2472
  2473
  2474
  2475
  2476
  2477
  2478
  2479
  2480
  2481
  2482
  2483
  2484
  2485
  2486
  2487
  2488
  2489
  2490
  2491
  2492
  2493
  2494
  2495
  2496
  2497
  2498
  2499
  2500
  2501
  2502
  2503
  2504
  2505
  2506
  2507
  2508
  2509
  2510
  2511
  2512
  2513
  2514
  2515
  2516
  2517
  2518
  2519
  2520
  2521
  2522
  2523
  2524
  2525
  2526
  2527
  2528
  2529
  2530
  2531
  2532
  2533
  2534
  2535
  2536
  2537
  2538
  2539
  2540
  2541
  2542
  2543
  2544
  2545
  2546
  2547
  2548
  2549
  2550
  2551
  2552
  2553
  2554
  2555
  2556
  2557
  2558
  2559
  2560
  2561
  2562
  2563
  2564
  2565
  2566
  2567
  2568
  2569
  2570
  2571
  2572
  2573
  2574
  2575
  2576
  2577
  2578
  2579
  2580
  2581
  2582
  2583
  2584
  2585
  2586
  2587
  2588
  2589
  2590
  2591
  2592
  2593
  2594
  2595
  2596
  2597
  2598
  2599
  2600
  2601
  2602
  2603
  2604
  2605
  2606
  2607
  2608
  2609
  2610
  2611
  2612
  2613
  2614
  2615
  2616
  2617
  2618
  2619
  2620
  2621
  2622
  2623
  2624
  2625
  2626
  2627
  2628
  2629
  2630
  2631
  2632
  2633
  2634
  2635
  2636
  2637
  2638
  2639
  2640
  2641
  2642
  2643
  2644
  2645
  2646
  2647
  2648
  2649
  2650
  2651
  2652
  2653
  2654
  2655
  2656
  2657
  2658
  2659
  2660
  2661
  2662
  2663
  2664
  2665
  2666
  2667
  2668
  2669
  2670
  2671
  2672
  2673
  2674
  2675
  2676
  2677
  2678
  2679
  2680
  2681
  2682
  2683
  2684
  2685
  2686
  2687
  2688
  2689
  2690
  2691
  2692
  2693
  2694
  2695
  2696
  2697
  2698
  2699
  2700
  2701
  2702
  2703
  2704
  2705
  2706
  2707
  2708
  2709
  2710
  2711
  2712
  2713
  2714
  2715
  2716
  2717
  2718
  2719
  2720
  2721
  2722
  2723
  2724
  2725
  2726
  2727
  2728
  2729
  2730
  2731
  2732
  2733
  2734
  2735
  2736
  2737
  2738
  2739
  2740
  2741
  2742
  2743
  2744
  2745
  2746
  2747
  2748
  2749
  2750
  2751
  2752
  2753
  2754
  2755
  2756
  2757
  2758
  2759
  2760
  2761
  2762
  2763
  2764
  2765
  2766
  2767
  2768
  2769
  2770
  2771
  2772
  2773
  2774
  2775
  2776
  2777
  2778
  2779
  2780
  2781
  2782
  2783
  2784
  2785
  2786
  2787
  2788
  2789
  2790
  2791
  2792
  2793
  2794
  2795
  2796
  2797
  2798
  2799
  2800
  2801
  2802
  2803
  2804
  2805
  2806
  2807
  2808
  2809
  2810
  2811
  2812
  2813
  2814
  2815
  2816
  2817
  2818
  2819
  2820
  2821
  2822
  2823
  2824
  2825
  2826
  2827
  2828
  2829
  2830
  2831
  2832
  2833
  2834
  2835
  2836
  2837
  2838
  2839
  2840
  2841
  2842
  2843
  2844
  2845
  2846
  2847
  2848
  2849
  2850
  2851
  2852
  2853
  2854
  2855
  2856
  2857
  2858
  2859
  2860
  2861
  2862
  2863
  2864
  2865
  2866
  2867
  2868
  2869
  2870
  2871
  2872
  2873
  2874
  2875
  2876
  2877
  2878
  2879
  2880
  2881
  2882
  2883
  2884
  2885
  2886
  2887
  2888
  2889
  2890
  2891
  2892
  2893
  2894
  2895
  2896
  2897
  2898
  2899
  2900
  2901
  2902
  2903
  2904
  2905
  2906
  2907
  2908
  2909
  2910
  2911
  2912
  2913
  2914
  2915
  2916
  2917
  2918
  2919
  2920
  2921
  2922
  2923
  2924
  2925
  2926
  2927
  2928
  2929
  2930
  2931
  2932
  2933
  2934
  2935
  2936
  2937
  2938
  2939
  2940
  2941
  2942
  2943
  2944
  2945
  2946
  2947
  2948
  2949
  2950
  2951
  2952
  2953
  2954
  2955
  2956
  2957
  2958
  2959
  2960
  2961
  2962
  2963
  2964
  2965
  2966
  2967
  2968
  2969
  2970
  2971
  2972
  2973
  2974
  2975
  2976
  2977
  2978
  2979
  2980
  2981
  2982
  2983
  2984
  2985
  2986
  2987
  2988
  2989
  2990
  2991
  2992
  2993
  2994
  2995
  2996
  2997
  2998
  2999
  3000
  3001
  3002
  3003
  3004
  3005
  3006
  3007
  3008
  3009
  3010
  3011
  3012
  3013
  3014
  3015
  3016
  3017
  3018
  3019
  3020
  3021
  3022
  3023
  3024
  3025
  3026
  3027
  3028
  3029
  3030
  3031
  3032
  3033
  3034
  3035
  3036
  3037
  3038
  3039
  3040
  3041
  3042
  3043
  3044
  3045
  3046
  3047
  3048
  3049
  3050
  3051
  3052
  3053
  3054
  3055
  3056
  3057
  3058
  3059
  3060
  3061
  3062
  3063
  3064
  3065
  3066
  3067
  3068
  3069
  3070
  3071
  3072
  3073
  3074
  3075
  3076
  3077
  3078
  3079
  3080
  3081
  3082
  3083
  3084
  3085
  3086
  3087
  3088
  3089
  3090
  3091
  3092
  3093
  3094
  3095
  3096
  3097
  3098
  3099
  3100
diff -c -P -r orig/tk8.4a4/doc/text.n patch3/tk8.4a4/doc/text.n
*** orig/tk8.4a4/doc/text.n	Thu Nov 15 22:27:54 2001
--- patch3/tk8.4a4/doc/text.n	Fri Jun 21 07:18:35 2002
***************
*** 732,738 ****
  .VS 8.4
  The text widget has an unlimited undo and redo mechanism (when the
  \fB-undo\fR widget option is true) which records every insert and
! delete action is recorded on a stack.
  .PP
  Boundaries (called "separators") are inserted between edit actions.
  The purpose of these separators is to group inserts and deletes into
--- 732,738 ----
  .VS 8.4
  The text widget has an unlimited undo and redo mechanism (when the
  \fB-undo\fR widget option is true) which records every insert and
! delete action on a stack.
  .PP
  Boundaries (called "separators") are inserted between edit actions.
  The purpose of these separators is to group inserts and deletes into
***************
*** 746,758 ****
  Separators are inserted automatically when the \fB-autoseparators\fR
  widget option is true.  You can insert separators programatically as
  well.  If a separator is already present at the top of the undo stack
! no other will inserted.  That means that two separators on the undo
  stack are always separated by at least one insert or delete action.
  .PP
  The undo mechanism is also linked to the modified flag.  This means
  that undoing or redoing changes can take a modified text widget back
  to the unmodified state or vice versa.  The modified flag will be set
! to automatically to the appropriate state.  This automatic coupling
  does not work when the modified flag has been set by the user, until
  the flag has been reset again.
  .PP
--- 746,758 ----
  Separators are inserted automatically when the \fB-autoseparators\fR
  widget option is true.  You can insert separators programatically as
  well.  If a separator is already present at the top of the undo stack
! no other will be inserted.  That means that two separators on the undo
  stack are always separated by at least one insert or delete action.
  .PP
  The undo mechanism is also linked to the modified flag.  This means
  that undoing or redoing changes can take a modified text widget back
  to the unmodified state or vice versa.  The modified flag will be set
! automatically to the appropriate state.  This automatic coupling
  does not work when the modified flag has been set by the user, until
  the flag has been reset again.
  .PP
diff -c -P -r orig/tk8.4a4/generic/tkText.c patch3/tk8.4a4/generic/tkText.c
*** orig/tk8.4a4/generic/tkText.c	Tue Feb 26 02:58:25 2002
--- patch3/tk8.4a4/generic/tkText.c	Fri Jun 21 07:32:37 2002
***************
*** 20,25 ****
--- 20,26 ----
  #include "default.h"
  #include "tkPort.h"
  #include "tkInt.h"
+ #include "tkUndo.h"
  
  #ifdef MAC_TCL
  #define Style TkStyle
***************
*** 311,328 ****
  static int		DumpSegment _ANSI_ARGS_((Tcl_Interp *interp, char *key,
  			    char *value, char * command, TkTextIndex *index,
  			    int what));
! static int		TextEditUndo _ANSI_ARGS_((Tcl_Interp * interp,
! 			    TkText *textPtr));
! static int		TextEditRedo _ANSI_ARGS_((Tcl_Interp * interp,
! 			    TkText *textPtr));
  static void		TextGetText _ANSI_ARGS_((TkTextIndex * index1,
  			    TkTextIndex * index2, Tcl_DString *dsPtr));
- static void		pushStack _ANSI_ARGS_(( TkTextEditAtom ** stack, 
- 			    TkTextEditAtom * elem ));
- 
- static TkTextEditAtom * popStack   _ANSI_ARGS_((TkTextEditAtom ** stack));
- static void		clearStack _ANSI_ARGS_((TkTextEditAtom ** stack));
- static void		insertSeparator _ANSI_ARGS_((TkTextEditAtom ** stack));
  static void		updateDirtyFlag _ANSI_ARGS_((TkText *textPtr));
  
  /*
--- 312,321 ----
  static int		DumpSegment _ANSI_ARGS_((Tcl_Interp *interp, char *key,
  			    char *value, char * command, TkTextIndex *index,
  			    int what));
! static int		TextEditUndo _ANSI_ARGS_((TkText *textPtr));
! static int		TextEditRedo _ANSI_ARGS_((TkText *textPtr));
  static void		TextGetText _ANSI_ARGS_((TkTextIndex * index1,
  			    TkTextIndex * index2, Tcl_DString *dsPtr));
  static void		updateDirtyFlag _ANSI_ARGS_((TkText *textPtr));
  
  /*
***************
*** 412,420 ****
--- 405,415 ----
      TkTextSetYView(textPtr, &startIndex, 0);
      textPtr->exportSelection = 1;
      textPtr->pickEvent.type = LeaveNotify;
+     textPtr->undoStack = TkUndoInitStack(interp);
      textPtr->undo = 1;
      textPtr->isDirtyIncrement = 1;
      textPtr->autoSeparators = 1;
+     textPtr->lastEditMode = TK_TEXT_EDIT_OTHER;
  
      /*
       * Create the "sel" tag and the "current" and "insert" marks.
***************
*** 811,818 ****
      if (textPtr->bindingTable != NULL) {
  	Tk_DeleteBindingTable(textPtr->bindingTable);
      }
!     clearStack(&(textPtr->undoStack));
!     clearStack(&(textPtr->redoStack));
  
      /*
       * NOTE: do NOT free up selBorder, selBdString, or selFgColorPtr:
--- 806,812 ----
      if (textPtr->bindingTable != NULL) {
  	Tk_DeleteBindingTable(textPtr->bindingTable);
      }
!     TkUndoFreeStack(textPtr->undoStack);
  
      /*
       * NOTE: do NOT free up selBorder, selBdString, or selFgColorPtr:
***************
*** 1193,1199 ****
  {
      int lineIndex, resetView, offset;
      TkTextIndex newTop;
-     TkTextEditAtom * insertion;
      char indexBuffer[TK_POS_CHARS];
  
      /*
--- 1187,1192 ----
***************
*** 1229,1251 ****
       */
  
      if ( textPtr->undo ) {
!         if (textPtr->autoSeparators && textPtr->undoStack &&
!             textPtr->undoStack->type != TK_EDIT_INSERT) {
!             insertSeparator(&(textPtr->undoStack));
          }
          
!         insertion = (TkTextEditAtom *) ckalloc(sizeof(TkTextEditAtom));
!         insertion->type = TK_EDIT_INSERT;
          
          TkTextPrintIndex(indexPtr,indexBuffer);
!         insertion->index = (char *) ckalloc(strlen(indexBuffer) + 1);
!         strcpy(insertion->index,indexBuffer);
          
!         insertion->string = (char *) ckalloc(strlen(string) + 1);
!         strcpy(insertion->string,string);
  
-         pushStack(&(textPtr->undoStack),insertion);
-         clearStack(&(textPtr->redoStack));
      }
      updateDirtyFlag(textPtr);
  
--- 1222,1280 ----
       */
  
      if ( textPtr->undo ) {
!         TkTextIndex     toIndex;
! 
!         Tcl_DString actionCommand;
!         Tcl_DString revertCommand;
!         
!         if (textPtr->autoSeparators &&
!             textPtr->lastEditMode != TK_TEXT_EDIT_INSERT) {
!             TkUndoInsertUndoSeparator(textPtr->undoStack);
          }
          
!         textPtr->lastEditMode = TK_TEXT_EDIT_INSERT;
!         
!         Tcl_DStringInit(&actionCommand);
!         Tcl_DStringInit(&revertCommand);
!         
!         Tcl_DStringAppend(&actionCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
!         Tcl_DStringAppend(&actionCommand," insert ",-1);
!         TkTextPrintIndex(indexPtr,indexBuffer);
!         Tcl_DStringAppend(&actionCommand,indexBuffer,-1);
!         Tcl_DStringAppend(&actionCommand," ",-1);
!         Tcl_DStringAppendElement(&actionCommand,string);
!         Tcl_DStringAppend(&actionCommand,";",-1);
!         Tcl_DStringAppend(&actionCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
!         Tcl_DStringAppend(&actionCommand," mark set insert ",-1);
!         TkTextIndexForwBytes(indexPtr, (int) strlen(string),
! 			&toIndex);
!         TkTextPrintIndex(&toIndex, indexBuffer);
!         Tcl_DStringAppend(&actionCommand,indexBuffer,-1);
!         Tcl_DStringAppend(&actionCommand,"; ",-1);
!         Tcl_DStringAppend(&actionCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
!         Tcl_DStringAppend(&actionCommand," see insert",-1);
          
+         Tcl_DStringAppend(&revertCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
+         Tcl_DStringAppend(&revertCommand," delete ",-1);
+         TkTextPrintIndex(indexPtr,indexBuffer);
+         Tcl_DStringAppend(&revertCommand,indexBuffer,-1);
+         Tcl_DStringAppend(&revertCommand," ",-1);
+         TkTextPrintIndex(&toIndex, indexBuffer);
+         Tcl_DStringAppend(&revertCommand,indexBuffer,-1);
+         Tcl_DStringAppend(&revertCommand," ;",-1);
+         Tcl_DStringAppend(&revertCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
+         Tcl_DStringAppend(&revertCommand," mark set insert ",-1);
          TkTextPrintIndex(indexPtr,indexBuffer);
!         Tcl_DStringAppend(&revertCommand,indexBuffer,-1);
!         Tcl_DStringAppend(&revertCommand,"; ",-1);
!         Tcl_DStringAppend(&revertCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
!         Tcl_DStringAppend(&revertCommand," see insert",-1);
          
!         TkUndoPushAction(textPtr->undoStack,&actionCommand, &revertCommand);
! 
!      	Tcl_DStringFree(&actionCommand);
!      	Tcl_DStringFree(&revertCommand);
  
      }
      updateDirtyFlag(textPtr);
  
***************
*** 1292,1298 ****
  {
      int line1, line2, line, byteIndex, resetView;
      TkTextIndex index1, index2;
-     TkTextEditAtom * deletion;
      char indexBuffer[TK_POS_CHARS];
  
      /*
--- 1321,1326 ----
***************
*** 1412,1438 ****
  
      if (textPtr->undo) {
  	Tcl_DString ds;
  
! 	if (textPtr->autoSeparators && (textPtr->undoStack != NULL)
! 		&& (textPtr->undoStack->type != TK_EDIT_DELETE)) {
! 	   insertSeparator(&(textPtr->undoStack));
! 	}
  
! 	deletion = (TkTextEditAtom *) ckalloc(sizeof(TkTextEditAtom));
! 	deletion->type = TK_EDIT_DELETE;
  
! 	TkTextPrintIndex(&index1, indexBuffer);
! 	deletion->index = (char *) ckalloc(strlen(indexBuffer) + 1);
! 	strcpy(deletion->index, indexBuffer);
  
! 	TextGetText(&index1, &index2, &ds);
! 	deletion->string =
! 	    (char *) ckalloc((unsigned int) Tcl_DStringLength(&ds) + 1);
! 	strcpy(deletion->string, Tcl_DStringValue(&ds));
! 	Tcl_DStringFree(&ds);
  
- 	pushStack(&(textPtr->undoStack), deletion);
- 	clearStack(&(textPtr->redoStack));
      }
      updateDirtyFlag(textPtr);
  
--- 1440,1497 ----
  
      if (textPtr->undo) {
  	Tcl_DString ds;
+         Tcl_DString actionCommand;
+         Tcl_DString revertCommand;
+     
+ 	if (textPtr->autoSeparators
+ 		&& (textPtr->lastEditMode != TK_TEXT_EDIT_DELETE)) {
+ 	   TkUndoInsertUndoSeparator(textPtr->undoStack);
+ 	}
+ 
+ 	textPtr->lastEditMode = TK_TEXT_EDIT_DELETE;
+ 
+         Tcl_DStringInit(&actionCommand);
+         Tcl_DStringInit(&revertCommand);
+ 
+         Tcl_DStringAppend(&actionCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
+         Tcl_DStringAppend(&actionCommand," delete ",-1);
+         TkTextPrintIndex(&index1,indexBuffer);
+         Tcl_DStringAppend(&actionCommand,indexBuffer,-1);
+         Tcl_DStringAppend(&actionCommand," ",-1);
+         TkTextPrintIndex(&index2, indexBuffer);
+         Tcl_DStringAppend(&actionCommand,indexBuffer,-1);
+         Tcl_DStringAppend(&actionCommand,"; ",-1);
+         Tcl_DStringAppend(&actionCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
+         Tcl_DStringAppend(&actionCommand," mark set insert ",-1);
+         TkTextPrintIndex(&index1,indexBuffer);
+         Tcl_DStringAppend(&actionCommand,indexBuffer,-1);
+ 
+         Tcl_DStringAppend(&actionCommand,"; ",-1);
+         Tcl_DStringAppend(&actionCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
+         Tcl_DStringAppend(&actionCommand," see insert",-1);
  
! 	TextGetText(&index1, &index2, &ds);
  
!         Tcl_DStringAppend(&revertCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
!         Tcl_DStringAppend(&revertCommand," insert ",-1);
!         TkTextPrintIndex(&index1,indexBuffer);
!         Tcl_DStringAppend(&revertCommand,indexBuffer,-1);
!         Tcl_DStringAppend(&revertCommand," ",-1);
!         Tcl_DStringAppendElement(&revertCommand,Tcl_DStringValue(&ds));
!         Tcl_DStringAppend(&revertCommand,"; ",-1);
!         Tcl_DStringAppend(&revertCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
!         Tcl_DStringAppend(&revertCommand," mark set insert ",-1);
!         TkTextPrintIndex(&index2, indexBuffer);
!         Tcl_DStringAppend(&revertCommand,indexBuffer,-1);
!         Tcl_DStringAppend(&revertCommand,"; ",-1);
!         Tcl_DStringAppend(&revertCommand,Tcl_GetCommandName(textPtr->interp,textPtr->widgetCmd),-1);
!         Tcl_DStringAppend(&revertCommand," see insert",-1);
  
!         TkUndoPushAction(textPtr->undoStack,&actionCommand, &revertCommand);
  
!         Tcl_DStringFree(&actionCommand);
!         Tcl_DStringFree(&revertCommand);
  
      }
      updateDirtyFlag(textPtr);
  
***************
*** 2483,2580 ****
  }
  
  /*
-  * pushStack
-  *    Push elem on the stack identified by stack.
-  *
-  * Results:
-  *    None
-  *
-  * Side effects:
-  *    None.
-  */
-  
- static void pushStack ( stack, elem )
-     TkTextEditAtom ** stack;
-     TkTextEditAtom *  elem;
- { 
-     elem->next = *stack;
-     *stack = elem;
- }
- 
- /*
-  * popStack --
-  *    Remove and return the top element from the stack identified by 
-  *      stack.
-  *
-  * Results:
-  *    None
-  *
-  * Side effects:
-  *    None.
-  */
-  
- static TkTextEditAtom * popStack ( stack )
-     TkTextEditAtom ** stack ;
- { 
-     TkTextEditAtom * elem = NULL;
-     if (*stack != NULL ) {
-         elem   = *stack;
-         *stack = elem->next;
-     }
-     return elem;
- }
- 
- /*
-  * insertSeparator --
-  *    insert a separator on the stack, indicating a border for
-  *      an undo/redo chunk.
-  *
-  * Results:
-  *    None
-  *
-  * Side effects:
-  *    None.
-  */
-  
- static void insertSeparator ( stack )
-     TkTextEditAtom ** stack;
- {
-     TkTextEditAtom * separator;
- 
-     if ( *stack != NULL && (*stack)->type != TK_EDIT_SEPARATOR ) {
-         separator = (TkTextEditAtom *) ckalloc(sizeof(TkTextEditAtom));
-         separator->type = TK_EDIT_SEPARATOR;
-         pushStack(stack,separator);
-     }
- }
- 
- /*
-  * clearStack --
-  *    Clear an entire undo or redo stack and destroy all elements in it.
-  *
-  * Results:
-  *    None
-  *
-  * Side effects:
-  *    None.
-  */
- 
- static void clearStack ( stack )
-     TkTextEditAtom ** stack;      /* An Undo or Redo stack */
- {
-     TkTextEditAtom * elem;
- 
-     while ( (elem = popStack(stack)) ) {
-         if ( elem->type != TK_EDIT_SEPARATOR ) {
-             ckfree(elem->index);
-             ckfree(elem->string);
-         }
-         ckfree((char *)elem);
-     }
-     *stack = NULL;
- }
- 
- /*
   * TextEditUndo --
   *    undo the last change.
   *
--- 2542,2547 ----
***************
*** 2585,2598 ****
   *    None.
   */
   
! static int TextEditUndo (interp,textPtr)
!     Tcl_Interp * interp;
      TkText     * textPtr;          /* Overall information about text widget. */
  {
!     TkTextEditAtom * elem;
!     TkTextIndex      fromIndex, toIndex;
!     char             buffer[TK_POS_CHARS];
!     char             viewIndex[TK_POS_CHARS];
      
      if ( ! textPtr->undo ) {
         return TCL_OK;
--- 2552,2561 ----
   *    None.
   */
   
! static int TextEditUndo (textPtr)
      TkText     * textPtr;          /* Overall information about text widget. */
  {
!     int status;
      
      if ( ! textPtr->undo ) {
         return TCL_OK;
***************
*** 2602,2665 ****
  
      textPtr->undo = 0;
  
!     /* insert a separator on the redo stack */
! 
!     insertSeparator(&(textPtr->redoStack));
  
!     /* Pop and skip the first separator if there is one*/
  
-     elem = popStack(&(textPtr->undoStack));
- 
-     if ( elem == NULL ) {
-         textPtr->undo = 1;
-         return TCL_ERROR;
-     }
- 
-     if ( ( elem != NULL ) && ( elem->type == TK_EDIT_SEPARATOR ) ) {
-         ckfree((char *) elem);
-         elem = popStack(&(textPtr->undoStack));
-     }
-     
-     while ( elem && (elem->type != TK_EDIT_SEPARATOR) ) {
-         switch ( elem->type ) {
-             case TK_EDIT_INSERT:
-                 TkTextGetIndex(interp,textPtr,elem->index,&toIndex);
-                 strcpy(viewIndex,elem->index);
-                 TkTextIndexForwBytes(&toIndex,(int)strlen(elem->string),&toIndex);
-                 TkTextPrintIndex(&toIndex,buffer);
-                 textPtr->isDirtyIncrement = -1;
-                 DeleteChars(textPtr,elem->index,buffer);
-                 textPtr->isDirtyIncrement = 1;
-                 break;
-             case TK_EDIT_DELETE: 
-                 TkTextGetIndex(interp,textPtr,elem->index,&fromIndex);
-                 textPtr->isDirtyIncrement = -1;
-                 InsertChars(textPtr,&fromIndex,elem->string);
-                 TkTextIndexForwBytes(&fromIndex,(int)strlen(elem->string),&toIndex);
-                 TkTextPrintIndex(&toIndex,viewIndex);
-                 textPtr->isDirtyIncrement = 1;
-                 break;
-             default:
-                 return TCL_ERROR;
-         }
-         pushStack(&(textPtr->redoStack),elem);
-         elem = popStack(&(textPtr->undoStack));
-     }
-     
-     /* view the last changed position */
-     
-     TkTextGetIndex(interp,textPtr,viewIndex,&toIndex);
-     TkTextSetMark(textPtr, "insert", &toIndex);
- 
-     /* insert a separator on the undo stack */
-     
-     insertSeparator(&(textPtr->undoStack));
-     
      /* Turn back on the undo feature */
      
      textPtr->undo = 1;
      
!     return TCL_OK;
  }
  
  /*
--- 2565,2579 ----
  
      textPtr->undo = 0;
  
!     /* revert one compound action */
  
!     status = TkUndoRevert(textPtr->undoStack);
  
      /* Turn back on the undo feature */
      
      textPtr->undo = 1;
      
!     return status;
  }
  
  /*
***************
*** 2673,2686 ****
   *    None.
   */
  
! static int TextEditRedo (interp,textPtr)
!     Tcl_Interp * interp;
      TkText     * textPtr;       /* Overall information about text widget. */
  {
!     TkTextEditAtom *elem;
!     TkTextIndex     fromIndex, toIndex;
!     char            buffer[TK_POS_CHARS];
!     char            viewIndex[TK_POS_CHARS];
  
      if (!textPtr->undo) {
         return TCL_OK;
--- 2587,2596 ----
   *    None.
   */
  
! static int TextEditRedo (textPtr)
      TkText     * textPtr;       /* Overall information about text widget. */
  {
!     int status;
  
      if (!textPtr->undo) {
         return TCL_OK;
***************
*** 2690,2751 ****
  
      textPtr->undo = 0;
  
!     /* insert a separator on the undo stack */
! 
!     insertSeparator(&(textPtr->undoStack));
! 
!     /* Pop and skip the first separator if there is one*/
  
!     elem = popStack(&(textPtr->redoStack));
! 
!     if ( elem == NULL ) {
!        textPtr->undo = 1;
!        return TCL_ERROR;
!     }
! 
!     if ( ( elem != NULL ) && ( elem->type == TK_EDIT_SEPARATOR ) ) {
!         ckfree((char *) elem);
!         elem = popStack(&(textPtr->redoStack));
!     }
! 
!     while ( elem && (elem->type != TK_EDIT_SEPARATOR) ) {
!         switch ( elem->type ) {
!             case TK_EDIT_INSERT:
!                 TkTextGetIndex(interp, textPtr, elem->index, &fromIndex);
!                 InsertChars(textPtr, &fromIndex, elem->string);
!                 TkTextIndexForwBytes(&fromIndex, (int) strlen(elem->string),
! 			&toIndex);
!                 TkTextPrintIndex(&toIndex, viewIndex);
!                 break;
!             case TK_EDIT_DELETE: 
!                 TkTextGetIndex(interp, textPtr, elem->index, &toIndex);
!                 strcpy(viewIndex, elem->index);
!                 TkTextIndexForwBytes(&toIndex, (int) strlen(elem->string),
! 			&toIndex);
!                 TkTextPrintIndex(&toIndex, buffer);
!                 DeleteChars(textPtr, elem->index, buffer);
!                 break;
!             default:
!                 return TCL_ERROR;
!         }
!         pushStack(&(textPtr->undoStack), elem);
!         elem = popStack(&(textPtr->redoStack));
!     }
! 
!     /* view the last changed position */
! 
!     TkTextGetIndex(interp, textPtr, viewIndex, &toIndex);
!     TkTextSetMark(textPtr, "insert", &toIndex);
! 
!     /* insert a separator on the undo stack */
!     
!     insertSeparator(&(textPtr->undoStack));
  
      /* Turn back on the undo feature */
      
      textPtr->undo = 1;
      
!     return TCL_OK;
  }
  
  /*
--- 2600,2614 ----
  
      textPtr->undo = 0;
  
!     /* reapply one compound action */
  
!     status = TkUndoApply(textPtr->undoStack);
  
      /* Turn back on the undo feature */
      
      textPtr->undo = 1;
      
!     return status;
  }
  
  /*
***************
*** 2823,2829 ****
  		    argv[0], " edit redo\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
!         if ( TextEditRedo(interp,textPtr) ) {
              Tcl_AppendResult(interp, "nothing to redo", (char *) NULL);
  	    return TCL_ERROR;
          }
--- 2686,2692 ----
  		    argv[0], " edit redo\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
!         if ( TextEditRedo(textPtr) ) {
              Tcl_AppendResult(interp, "nothing to redo", (char *) NULL);
  	    return TCL_ERROR;
          }
***************
*** 2834,2855 ****
  		    argv[0], " edit reset\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
!         clearStack(&(textPtr->undoStack));
!         clearStack(&(textPtr->redoStack));
      } else if ((c == 's') && (strncmp(argv[2], "separator", length) == 0)) {
  	if (argc != 3) {
  	    Tcl_AppendResult(interp, "wrong # args: should be \"",
  		    argv[0], " edit separator\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
!         insertSeparator(&(textPtr->undoStack));
      } else if ((c == 'u') && (strncmp(argv[2], "undo", length) == 0)) {
  	if (argc != 3) {
  	    Tcl_AppendResult(interp, "wrong # args: should be \"",
  		    argv[0], " edit undo\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
!         if ( TextEditUndo(interp,textPtr) ) {
              Tcl_AppendResult(interp, "nothing to undo",
  		    (char *) NULL);
  	    return TCL_ERROR;
--- 2697,2717 ----
  		    argv[0], " edit reset\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
!         TkUndoClearStacks(textPtr->undoStack);
      } else if ((c == 's') && (strncmp(argv[2], "separator", length) == 0)) {
  	if (argc != 3) {
  	    Tcl_AppendResult(interp, "wrong # args: should be \"",
  		    argv[0], " edit separator\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
!         TkUndoInsertUndoSeparator(textPtr->undoStack);
      } else if ((c == 'u') && (strncmp(argv[2], "undo", length) == 0)) {
  	if (argc != 3) {
  	    Tcl_AppendResult(interp, "wrong # args: should be \"",
  		    argv[0], " edit undo\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
!         if ( TextEditUndo(textPtr) ) {
              Tcl_AppendResult(interp, "nothing to undo",
  		    (char *) NULL);
  	    return TCL_ERROR;
diff -c -P -r orig/tk8.4a4/generic/tkText.h patch3/tk8.4a4/generic/tkText.h
*** orig/tk8.4a4/generic/tkText.h	Sat Jan 26 01:41:28 2002
--- patch3/tk8.4a4/generic/tkText.h	Fri Jun 21 07:18:35 2002
***************
*** 20,25 ****
--- 20,29 ----
  #include "tk.h"
  #endif
  
+ #ifndef _TKUNDO
+ #include "tkUndo.h"
+ #endif
+ 
  #ifdef BUILD_tk
  # undef TCL_STORAGE_CLASS
  # define TCL_STORAGE_CLASS DLLEXPORT
***************
*** 451,474 ****
  					 * BE THE LAST IN THE STRUCTURE. */
  } TkTextTabArray;
  
! /* enum definining the types used in an edit stack */
  
  typedef enum {
!     TK_EDIT_SEPARATOR,			/* Marker */
!     TK_EDIT_INSERT,			/* The undo is an insert */
!     TK_EDIT_DELETE			/* The undo is a delete */
! } TkTextEditType;
! 
! /* strcut defining the basic undo/redo stack element */
! 
! typedef struct TkTextEditAtom {
!     TkTextEditType type;		/* The type that will trigger the
! 					 * required action*/
!     char * index;			/* The starting index of the range */
!     char * string;			/* The text to be inserted / deleted */
!     struct TkTextEditAtom * next;	/* Pointer to the next element in the
! 					 * stack */
! } TkTextEditAtom;
  
  /*
   * A data structure of the following type is kept for each text widget that
--- 455,467 ----
  					 * BE THE LAST IN THE STRUCTURE. */
  } TkTextTabArray;
  
! /* enum definining the edit modes of */
  
  typedef enum {
!     TK_TEXT_EDIT_INSERT,			/* insert mode */
!     TK_TEXT_EDIT_DELETE,			/* delete mode */
!     TK_TEXT_EDIT_OTHER			   /* none of the above */
! } TkTextEditMode;
  
  /*
   * A data structure of the following type is kept for each text widget that
***************
*** 649,657 ****
       * Information related to the undo/redo functonality
       */
       
!     TkTextEditAtom * undoStack; /* The undo stack */
!     
!     TkTextEditAtom * redoStack; /* The redo stack */
      
      int undo;			/* non zero means the undo/redo behaviour is 
  				 * enabled */
--- 642,648 ----
       * Information related to the undo/redo functonality
       */
       
!     TkUndoRedoStack * undoStack; /* The undo/redo stack */
      
      int undo;			/* non zero means the undo/redo behaviour is 
  				 * enabled */
***************
*** 672,677 ****
--- 663,671 ----
  				 * incremented every edit action
  				 */
  
+     TkTextEditMode lastEditMode;	/* Keeps track of what the last edit mode was
+ 				 */
+ 
  } TkText;
  
  /*
diff -c -P -r orig/tk8.4a4/generic/tkUndo.c patch3/tk8.4a4/generic/tkUndo.c
*** orig/tk8.4a4/generic/tkUndo.c	Thu Jan  1 01:00:00 1970
--- patch3/tk8.4a4/generic/tkUndo.c	Fri Jun 21 08:14:59 2002
***************
*** 0 ****
--- 1,318 ----
+ /* 
+  * tkUndo.c --
+  *
+  *	This module provides the implementation of an undo stack.
+  *
+  * Copyright (c) 2002 by Ludwig Callewaert.
+  *
+  * See the file "license.terms" for information on usage and redistribution
+  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+  *
+  * RCS: @(#) $Id: tkUndo.c,v 1.26 2002/02/26 01:58:25 lgac Exp $
+  */
+ 
+ #include "tkUndo.h"
+ 
+ 
+ /*
+  * TkUndoPushStack
+  *    Push elem on the stack identified by stack.
+  *
+  * Results:
+  *    None
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ void TkUndoPushStack ( stack, elem )
+     TkUndoAtom ** stack;
+     TkUndoAtom *  elem;
+ { 
+     elem->next = *stack;
+     *stack = elem;
+ }
+ 
+ /*
+  * TkUndoPopStack --
+  *    Remove and return the top element from the stack identified by 
+  *      stack.
+  *
+  * Results:
+  *    None
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ TkUndoAtom * TkUndoPopStack ( stack )
+     TkUndoAtom ** stack ;
+ { 
+     TkUndoAtom * elem = NULL;
+     if (*stack != NULL ) {
+         elem   = *stack;
+         *stack = elem->next;
+     }
+     return elem;
+ }
+ 
+ /*
+  * TkUndoInsertSeparator --
+  *    insert a separator on the stack, indicating a border for
+  *      an undo/redo chunk.
+  *
+  * Results:
+  *    None
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ void TkUndoInsertSeparator ( stack )
+     TkUndoAtom ** stack;
+ {
+     TkUndoAtom * separator;
+ 
+     if ( *stack != NULL && (*stack)->type != TK_UNDO_SEPARATOR ) {
+         separator = (TkUndoAtom *) ckalloc(sizeof(TkUndoAtom));
+         separator->type = TK_UNDO_SEPARATOR;
+         TkUndoPushStack(stack,separator);
+     }
+ }
+ 
+ /*
+  * TkUndoClearStack --
+  *    Clear an entire undo or redo stack and destroy all elements in it.
+  *
+  * Results:
+  *    None
+  *
+  * Side effects:
+  *    None.
+  */
+ 
+ void TkUndoClearStack ( stack )
+     TkUndoAtom ** stack;      /* An Undo or Redo stack */
+ {
+     TkUndoAtom * elem;
+ 
+     while ( (elem = TkUndoPopStack(stack)) ) {
+         if ( elem->type != TK_UNDO_SEPARATOR ) {
+             Tcl_DecrRefCount(elem->apply);
+             Tcl_DecrRefCount(elem->revert);
+         }
+         ckfree((char *)elem);
+     }
+     *stack = NULL;
+ }
+ 
+ /*
+  * TkUndoPushAction
+  *    Push a new elem on the stack identified by stack.
+  *    action and revert are given through Tcl_DStrings
+  *
+  * Results:
+  *    None
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ void TkUndoPushAction ( stack, actionScript, revertScript )
+     TkUndoRedoStack * stack;      /* An Undo or Redo stack */
+     Tcl_DString * actionScript; /* The script to get the action (redo) */
+     Tcl_DString * revertScript; /* The script to revert the action (undo) */
+ { 
+     TkUndoAtom * atom;
+ 
+     atom = (TkUndoAtom *) ckalloc(sizeof(TkUndoAtom));
+     atom->type = TK_UNDO_ACTION;
+ 
+     atom->apply = Tcl_NewStringObj(Tcl_DStringValue(actionScript),Tcl_DStringLength(actionScript));
+     Tcl_IncrRefCount(atom->apply);
+ 
+     atom->revert = Tcl_NewStringObj(Tcl_DStringValue(revertScript),Tcl_DStringLength(revertScript));
+     Tcl_IncrRefCount(atom->revert);
+ 
+     TkUndoPushStack(&(stack->undoStack), atom);
+     TkUndoClearStack(&(stack->redoStack));
+ }
+ 
+ 
+ /*
+  * TkUndoInitStack
+  *    Initialize a new undo/redo stack
+  *
+  * Results:
+  *    un Undo/Redo stack pointer
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ TkUndoRedoStack * TkUndoInitStack ( interp )
+     Tcl_Interp * interp;          /* The interpreter */
+ { 
+     TkUndoRedoStack * stack;      /* An Undo/Redo stack */
+     stack = (TkUndoRedoStack *) ckalloc(sizeof(TkUndoRedoStack));
+     stack->undoStack = NULL;
+     stack->redoStack = NULL;
+     stack->interp    = interp;
+     return stack;
+ }
+ 
+ 
+ /*
+  * TkUndoClearStacks
+  *    Clear both the undo and redo stack
+  *
+  * Results:
+  *    None
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ void TkUndoClearStacks ( stack )
+     TkUndoRedoStack * stack;      /* An Undo/Redo stack */
+ { 
+    TkUndoClearStack(&(stack->undoStack));
+    TkUndoClearStack(&(stack->redoStack));
+ }
+ 
+ 
+ /*
+  * TkUndoFreeStack
+  *    Clear both the undo and redo stack
+  *    also free the memory allocated to the u/r stack pointer
+  *
+  * Results:
+  *    None
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ void TkUndoFreeStack ( stack )
+     TkUndoRedoStack * stack;      /* An Undo/Redo stack */
+ { 
+    TkUndoClearStacks(stack);
+ /*   ckfree((TkUndoRedoStack *) stack); */
+    ckfree((char *) stack);
+ }
+ 
+ 
+ /*
+  * TkUndoInsertUndoSeparator --
+  *    insert a separator on the undo stack, indicating a border for
+  *      an undo/redo chunk.
+  *
+  * Results:
+  *    None
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ void TkUndoInsertUndoSeparator ( stack )
+     TkUndoRedoStack * stack;
+ {
+    TkUndoInsertSeparator(&(stack->undoStack));
+ }
+ 
+ 
+ /*
+  * TkUndoRevert --
+  *    Undo a compound action on the stack.
+  *
+  * Results:
+  *    A TCL status code
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ int TkUndoRevert ( stack )
+     TkUndoRedoStack * stack;
+ {
+     TkUndoAtom * elem;
+ 
+     /* insert a separator on the redo stack */
+ 
+     TkUndoInsertSeparator(&(stack->redoStack));
+ 
+     /* Pop and skip the first separator if there is one*/
+ 
+     elem = TkUndoPopStack(&(stack->undoStack));
+ 
+     if ( elem == NULL ) {
+         return TCL_ERROR;
+     }
+ 
+     if ( ( elem != NULL ) && ( elem->type == TK_UNDO_SEPARATOR ) ) {
+         ckfree((char *) elem);
+         elem = TkUndoPopStack(&(stack->undoStack));
+     }
+     
+     while ( elem && (elem->type != TK_UNDO_SEPARATOR) ) {
+         Tcl_EvalObjEx(stack->interp,elem->revert,TCL_EVAL_GLOBAL);
+         
+         TkUndoPushStack(&(stack->redoStack),elem);
+         elem = TkUndoPopStack(&(stack->undoStack));
+     }
+     
+     /* insert a separator on the undo stack */
+     
+     TkUndoInsertSeparator(&(stack->undoStack));
+     
+     return TCL_OK;
+ }
+ 
+ 
+ /*
+  * TkUndoApply --
+  *    Redo a compound action on the stack.
+  *
+  * Results:
+  *    A TCL status code
+  *
+  * Side effects:
+  *    None.
+  */
+  
+ int TkUndoApply ( stack )
+     TkUndoRedoStack * stack;
+ {
+     TkUndoAtom *elem;
+ 
+     /* insert a separator on the undo stack */
+ 
+     TkUndoInsertSeparator(&(stack->undoStack));
+ 
+     /* Pop and skip the first separator if there is one*/
+ 
+     elem = TkUndoPopStack(&(stack->redoStack));
+ 
+     if ( elem == NULL ) {
+        return TCL_ERROR;
+     }
+ 
+     if ( ( elem != NULL ) && ( elem->type == TK_UNDO_SEPARATOR ) ) {
+         ckfree((char *) elem);
+         elem = TkUndoPopStack(&(stack->redoStack));
+     }
+ 
+     while ( elem && (elem->type != TK_UNDO_SEPARATOR) ) {
+         Tcl_EvalObjEx(stack->interp,elem->apply,TCL_EVAL_GLOBAL);
+         
+         TkUndoPushStack(&(stack->undoStack), elem);
+         elem = TkUndoPopStack(&(stack->redoStack));
+     }
+ 
+     /* insert a separator on the undo stack */
+     
+     TkUndoInsertSeparator(&(stack->undoStack));
+ 
+     return TCL_OK;
+ }
+ 
diff -c -P -r orig/tk8.4a4/generic/tkUndo.h patch3/tk8.4a4/generic/tkUndo.h
*** orig/tk8.4a4/generic/tkUndo.h	Thu Jan  1 01:00:00 1970
--- patch3/tk8.4a4/generic/tkUndo.h	Fri Jun 21 07:24:33 2002
***************
*** 0 ****
--- 1,76 ----
+ /*
+  * tkUndo.h --
+  *
+  *	Declarations shared among the files that implement an undo
+  *	stack.
+  *
+  * Copyright (c) 2002 Ludwig Callewaert.
+  *
+  * See the file "license.terms" for information on usage and redistribution
+  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+  *
+  * RCS: @(#) $Id: tkUndo.h,v 1.10 2002/01/25 21:09:37 lgac Exp $
+  */
+ 
+ #ifndef _TKUNDO
+ #define _TKUNDO
+ 
+ #ifndef _TK
+ #include "tk.h"
+ #endif
+ 
+ /* enum definining the types used in an undo stack */
+ 
+ typedef enum {
+     TK_UNDO_SEPARATOR,			/* Marker */
+     TK_UNDO_ACTION			   /* Command */
+ } TkUndoAtomType;
+ 
+ /* struct defining the basic undo/redo stack element */
+ 
+ typedef struct TkUndoAtom {
+     TkUndoAtomType type;		 /* The type that will trigger the
+ 					 * required action*/
+     Tcl_Obj * apply;			   /* Command to apply the action that was taken */
+     Tcl_Obj * revert;			/* The command to undo the action */
+     struct TkUndoAtom * next;	/* Pointer to the next element in the
+ 					 * stack */
+ } TkUndoAtom;
+ 
+ /* struct defining the basic undo/redo stack element */
+ 
+ typedef struct TkUndoRedoStack {
+     TkUndoAtom * undoStack;		 /* The undo stack */
+     TkUndoAtom * redoStack;		 /* The redo stack */
+     Tcl_Interp * interp   ;       /* The interpreter in which to execute the revert and apply scripts */
+ } TkUndoRedoStack;
+ 
+ /* basic functions */
+ 
+ EXTERN void TkUndoPushStack  _ANSI_ARGS_((TkUndoAtom ** stack,
+     TkUndoAtom *  elem));
+ 
+ EXTERN TkUndoAtom * TkUndoPopStack _ANSI_ARGS_((TkUndoAtom ** stack));
+  
+ EXTERN void TkUndoInsertSeparator _ANSI_ARGS_((TkUndoAtom ** stack));
+ 
+ EXTERN void TkUndoClearStack _ANSI_ARGS_((TkUndoAtom ** stack));
+ 
+ /* functions working on an undo/redo stack */
+ 
+ EXTERN TkUndoRedoStack * TkUndoInitStack _ANSI_ARGS_((Tcl_Interp * interp));
+ 
+ EXTERN void TkUndoClearStacks _ANSI_ARGS_((TkUndoRedoStack * stack));
+ 
+ EXTERN void TkUndoFreeStack _ANSI_ARGS_((TkUndoRedoStack * stack));
+ 
+ EXTERN void TkUndoInsertUndoSeparator _ANSI_ARGS_((TkUndoRedoStack * stack));
+ 
+ EXTERN void TkUndoPushAction _ANSI_ARGS_((TkUndoRedoStack * stack,
+     Tcl_DString * actionScript, Tcl_DString * revertScript));
+ 
+ EXTERN int TkUndoRevert _ANSI_ARGS_((TkUndoRedoStack *  stack));
+  
+ EXTERN int TkUndoApply _ANSI_ARGS_((TkUndoRedoStack *  stack));
+ 
+ #endif /* _TKUNDO */
diff -c -P -r orig/tk8.4a4/library/text.tcl patch3/tk8.4a4/library/text.tcl
*** orig/tk8.4a4/library/text.tcl	Tue Feb 19 01:01:35 2002
--- patch3/tk8.4a4/library/text.tcl	Fri Jun 21 07:18:36 2002
***************
*** 339,353 ****
  }
  
  bind Text <<Undo>> {
!     if { ! [ catch { %W edit undo } ] } {
!        %W see insert
!     }
  }
  
  bind Text <<Redo>> {
!     if { ! [ catch { %W edit redo } ] } {
!        %W see insert
!     }
  }
  
  if {[string compare $tcl_platform(platform) "windows"]} {
--- 339,349 ----
  }
  
  bind Text <<Undo>> {
!     catch { %W edit undo }
  }
  
  bind Text <<Redo>> {
!     catch { %W edit redo }
  }
  
  if {[string compare $tcl_platform(platform) "windows"]} {
***************
*** 635,641 ****
  
  proc ::tk::TextPaste {w x y} {
      $w mark set insert [TextClosestGap $w $x $y]
-     catch {$w insert insert [::tk::GetSelection $w PRIMARY]}
      catch {
  	set oldSeparator [$w cget -autoseparators]
  	if {$oldSeparator} {
--- 631,636 ----
diff -c -P -r orig/tk8.4a4/unix/Makefile patch3/tk8.4a4/unix/Makefile
*** orig/tk8.4a4/unix/Makefile	Thu Jan  1 01:00:00 1970
--- patch3/tk8.4a4/unix/Makefile	Fri Jun 21 07:33:51 2002
***************
*** 0 ****
--- 1,1278 ----
+ # Generated automatically from Makefile.in by configure.
+ #
+ # This file is a Makefile for Tk.  If it has the name "Makefile.in"
+ # then it is a template for a Makefile;  to generate the actual Makefile,
+ # run "./configure", which is a configuration script generated by the
+ # "autoconf" program (constructs like "@foo@" will get replaced in the
+ # actual Makefile.
+ #
+ # RCS: @(#) $Id: Makefile.in,v 1.64 2002/03/05 19:44:43 davygrvy Exp $
+ 
+ # Current Tk version;  used in various names.
+ 
+ TCLVERSION		= 8.4
+ VERSION			= 8.4
+ LOCALES			= de en es fr
+ 
+ #----------------------------------------------------------------
+ # Things you can change to personalize the Makefile for your own
+ # site (you can make these changes in either Makefile.in or
+ # Makefile, but changes to Makefile will get lost if you re-run
+ # the configuration script).
+ #----------------------------------------------------------------
+ 
+ # Default top-level directories in which to install architecture-
+ # specific files (exec_prefix) and machine-independent files such
+ # as scripts (prefix).  The values specified here may be overridden
+ # at configure-time with the --exec-prefix and --prefix options
+ # to the "configure" script.
+ 
+ prefix			= /usr/local
+ exec_prefix		= /usr/local
+ bindir			= ${exec_prefix}/bin
+ libdir			= /usr/local/lib
+ includedir		= ${prefix}/include
+ mandir			= ${prefix}/man
+ 
+ # The following definition can be set to non-null for special systems
+ # like AFS with replication.  It allows the pathnames used for installation
+ # to be different than those used for actually reference files at
+ # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
+ # when installing files.
+ INSTALL_ROOT		=
+ 
+ # Directory from which applications will reference the library of Tcl
+ # scripts (note: you can set the TK_LIBRARY environment variable at
+ # run-time to override the compiled-in location):
+ TK_LIBRARY		= $(prefix)/lib/tk$(VERSION)
+ 
+ # Path to use at runtime to refer to LIB_INSTALL_DIR:
+ LIB_RUNTIME_DIR		= $(libdir)
+ 
+ # Directory in which to install the program wish:
+ BIN_INSTALL_DIR		= $(INSTALL_ROOT)$(bindir)
+ 
+ # Directory in which to install the .a or .so binary for the Tk library:
+ LIB_INSTALL_DIR		= $(INSTALL_ROOT)$(libdir)
+ 
+ # Path name to use when installing library scripts:
+ SCRIPT_INSTALL_DIR	= $(INSTALL_ROOT)$(TK_LIBRARY)
+ 
+ # Directory in which to install the include file tk.h:
+ INCLUDE_INSTALL_DIR	= $(INSTALL_ROOT)$(includedir)
+ 
+ # Top-level directory for manual entries:
+ MAN_INSTALL_DIR		= $(INSTALL_ROOT)$(mandir)
+ 
+ # Directory in which to install manual entry for wish:
+ MAN1_INSTALL_DIR	= $(MAN_INSTALL_DIR)/man1
+ 
+ # Directory in which to install manual entries for Tk's C library
+ # procedures:
+ MAN3_INSTALL_DIR	= $(MAN_INSTALL_DIR)/man3
+ 
+ # Directory in which to install manual entries for the built-in
+ # Tcl commands implemented by Tk:
+ MANN_INSTALL_DIR	= $(MAN_INSTALL_DIR)/mann
+ 
+ # The directory containing the Tcl sources and headers appropriate
+ # for this version of Tk ("srcdir" will be replaced or has already
+ # been replaced by the configure script):
+ TCL_GENERIC_DIR		= /home/ludwig/tcltk/patch3/tcl8.4a4/generic
+ 
+ # The directory containing the Tcl library archive file appropriate
+ # for this version of Tk:
+ TCL_BIN_DIR		= /home/ludwig/tcltk/patch3/tcl8.4a4/unix
+ 
+ # The linker flags needed to link in the Tcl library (ex: -ltcl8.2)
+ TCL_LIB_FLAG		= -ltcl8.4
+ 
+ # Libraries built with optimization switches have this additional extension
+ TK_DBGX			= 
+ 
+ # warning flags
+ CFLAGS_WARNING		= -Wall -Wconversion -Wno-implicit-int
+ 
+ # The default switches for optimization or debugging
+ CFLAGS_DEBUG		= -g
+ CFLAGS_OPTIMIZE		= -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES
+ 
+ # To change the compiler switches, for example to change from optimization to
+ # debugging symbols, change the following line:
+ #CFLAGS			= $(CFLAGS_DEBUG)
+ #CFLAGS			= $(CFLAGS_OPTIMIZE)
+ #CFLAGS			= $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
+ CFLAGS			=  $(CFLAGS_OPTIMIZE)
+ 
+ # Flags to pass to the linker
+ LDFLAGS_DEBUG		= 
+ LDFLAGS_OPTIMIZE	= 
+ LDFLAGS			= -rdynamic $(LDFLAGS_OPTIMIZE)
+ 
+ # A "-I" switch that can be used when compiling to make all of the
+ # X11 include files accessible (the configure script will try to
+ # set this value, and will cause it to be an empty string if the
+ # include files are accessible via /usr/include).
+ X11_INCLUDES		= -I/usr/X11R6/include
+ 
+ # Linker switch(es) to use to link with the X11 library archive (the
+ # configure script will try to set this value automatically, but you
+ # can override it).
+ X11_LIB_SWITCHES	= -L/usr/X11R6/lib -lX11
+ 
+ 
+ # To turn off the security checks that disallow incoming sends when
+ # the X server appears to be insecure, reverse the comments on the
+ # following lines:
+ SECURITY_FLAGS		=
+ #SECURITY_FLAGS		= -DTK_NO_SECURITY
+ 
+ # To disable ANSI-C procedure prototypes reverse the comment characters
+ # on the following lines:
+ PROTO_FLAGS		=
+ #PROTO_FLAGS		= -DNO_PROTOTYPE
+ 
+ # To enable memory debugging reverse the comment characters on the following
+ # lines.  Warning:  if you enable memory debugging, you must do it
+ # *everywhere*, including all the code that calls Tcl, and you must use
+ # ckalloc and ckfree everywhere instead of malloc and free.
+ MEM_DEBUG_FLAGS		=
+ #MEM_DEBUG_FLAGS	= -DTCL_MEM_DEBUG
+ 
+ # If your X server is X11R4 or earlier, then you may wish to reverse
+ # the comment characters on the following two lines.  This will enable
+ # extra code to speed up XStringToKeysym.  In X11R5 and later releases
+ # XStringToKeysym is plenty fast, so you needn't define REDO_KEYSYM_LOOKUP.
+ KEYSYM_FLAGS		=
+ #KEYSYM_FLAGS		= -DREDO_KEYSYM_LOOKUP
+ 
+ # Tk does not used deprecated Tcl constructs so it should
+ # compile fine with -DTCL_NO_DEPRECATED. To remove its own
+ # set of deprecated code uncomment the second line.
+ NO_DEPRECATED_FLAGS	= -DTCL_NO_DEPRECATED
+ #NO_DEPRECATED_FLAGS	= -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED
+ 
+ # Some versions of make, like SGI's, use the following variable to
+ # determine which shell to use for executing commands:
+ SHELL			= /bin/sh
+ 
+ # Tk used to let the configure script choose which program to use
+ # for installing, but there are just too many different versions of
+ # "install" around;  better to use the install-sh script that comes
+ # with the distribution, which is slower but guaranteed to work.
+ 
+ INSTALL			= /home/ludwig/tcltk/patch3/tk8.4a4/unix/install-sh -c
+ INSTALL_PROGRAM		= ${INSTALL}
+ INSTALL_DATA		= ${INSTALL} -m 644
+ 
+ # TCL_EXE is the name of a tclsh executable that is available *BEFORE*
+ # running make for the first time. Certain build targets (make genstubs)
+ # need it to be available on the PATH. This executable should *NOT* be
+ # required just to do a normal build although it can be required to run
+ # make dist.
+ TCL_EXE			= tclsh
+ 
+ # The symbols below provide support for dynamic loading and shared
+ # libraries.  The values of the symbols are normally set by the
+ # configure script.  You shouldn't normally need to modify any of
+ # these definitions by hand.
+ 
+ SHLIB_CFLAGS		= -fPIC
+ 
+ # To enable support for stubs in Tcl.
+ STUB_LIB_FILE		= libtkstub8.4.a
+ 
+ TK_STUB_LIB_FILE	= libtkstub8.4.a
+ #TK_STUB_LIB_FILE	= libtkstub.a
+ 
+ TK_STUB_LIB_FLAG	= -ltkstub8.4
+ #TK_STUB_LIB_FLAG	= -ltkstub
+ 
+ TK_LIB_FILE		= libtk8.4.so
+ #TK_LIB_FILE		= libtk.a
+ 
+ TK_LIB_FLAG		= -ltk8.4
+ #TK_LIB_FLAG		= -ltk
+ 
+ TCL_LIB_SPEC		= -L/home/ludwig/tcltk/patch3/tcl8.4a4/unix -ltcl8.4
+ TCL_STUB_LIB_SPEC	= -L/home/ludwig/tcltk/patch3/tcl8.4a4/unix -ltclstub8.4
+ TCL_STUB_LIB_FLAG	= -ltclstub8.4
+ TK_EXP_FILE		= 
+ TK_BUILD_EXP_FILE	= 
+ 
+ TCL_STUB_FLAGS		= -DUSE_TCL_STUBS
+ 
+ # Libraries to use when linking.  This definition is determined by the
+ # configure script.
+ LIBS =  $(X11_LIB_SWITCHES) -ldl -lieee -lm
+ WISH_LIBS = $(TCL_LIB_SPEC)  $(X11_LIB_SWITCHES) -ldl -lieee -lm
+ 
+ # The symbol below provides support for dynamic loading and shared
+ # libraries.  See configure.in for a description of what it means.
+ # The values of the symbolis normally set by the configure script.
+ 
+ STLIB_LD		= ${AR} cr
+ SHLIB_LD		= gcc -pipe -shared
+ SHLIB_LD_LIBS		= ${LIBS}
+ 
+ # Additional search flags needed to find the various shared libraries
+ # at run-time.  The first symbol is for use when creating a binary
+ # with cc, and the second is for use when running ld directly.
+ TK_CC_SEARCH_FLAGS	= -Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/X11R6/lib
+ TK_LD_SEARCH_FLAGS	= -Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/X11R6/lib
+ 
+ #----------------------------------------------------------------
+ # The information below is modified by the configure script when
+ # Makefile is generated from Makefile.in.  You shouldn't normally
+ # modify any of this stuff by hand.
+ #----------------------------------------------------------------
+ 
+ AC_FLAGS		=   -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 
+ AR			= ar
+ RANLIB			= :
+ SRC_DIR			= /home/ludwig/tcltk/patch3/tk8.4a4/unix/..
+ TOP_DIR			= /home/ludwig/tcltk/patch3/tk8.4a4/unix/..
+ GENERIC_DIR		= $(TOP_DIR)/generic
+ UNIX_DIR		= /home/ludwig/tcltk/patch3/tk8.4a4/unix
+ BMAP_DIR		= $(TOP_DIR)/bitmaps
+ TOOL_DIR		= /home/ludwig/tcltk/patch3/tcl8.4a4/tools
+ 
+ #----------------------------------------------------------------
+ # The information below should be usable as is.  The configure
+ # script won't modify it and you shouldn't need to modify it
+ # either.
+ #----------------------------------------------------------------
+ 
+ CC			= gcc -pipe
+ 
+ CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
+ -I${UNIX_DIR} -I${GENERIC_DIR} \
+ -I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \
+ ${AC_FLAGS} ${PROTO_FLAGS} \
+ ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} ${NO_DEPRECATED_FLAGS}
+ 
+ CC_SWITCHES = ${CC_SWITCHES_NO_STUBS} ${TCL_STUB_FLAGS} 
+ 
+ DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \
+ -I${BMAP_DIR} \
+ -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \
+ ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \
+ ${KEYSYM_FLAGS}
+ 
+ WISH_OBJS = tkAppInit.o
+ 
+ TCLTEST_OBJS = ${TCL_BIN_DIR}/tclTest.o ${TCL_BIN_DIR}/tclThreadTest.o \
+         ${TCL_BIN_DIR}/tclUnixTest.o
+ TKTEST_OBJS = $(TCLTEST_OBJS) tkTestInit.o tkTest.o tkSquare.o
+ 
+ WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
+ 	tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o \
+ 	tkPanedWindow.o tkScale.o tkScrollbar.o
+ 
+ CANVOBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o \
+ 	tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o \
+ 	tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o
+ 
+ IMAGEOBJS = tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o
+ 
+ TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \
+ 	tkTextMark.o tkTextTag.o tkTextWind.o
+ 
+ UNDOOBJS = tkUndo.o
+ 
+ UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o \
+ 	tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o \
+ 	tkUnixFocus.o tkUnixFont.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o \
+ 	tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o \
+ 	tkUnixSend.o tkUnixWm.o tkUnixXId.o tkStubInit.o tkStubLib.o
+ 
+ STUB_LIB_OBJS = tkStubLib.o tkStubImg.o
+ 
+ OBJS =  tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o \
+ 	tkColor.o tkConfig.o tkConsole.o tkCursor.o tkError.o tkEvent.o \
+ 	tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o \
+ 	tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o \
+ 	tkSelect.o tkUtil.o tkVisual.o tkWindow.o  \
+ 	$(UNIXOBJS) $(WIDGOBJS) $(CANVOBJS) $(IMAGEOBJS) $(TEXTOBJS) $(UNDOOBJS)
+ 
+ TK_DECLS = \
+ 	$(GENERIC_DIR)/tk.decls \
+ 	$(GENERIC_DIR)/tkInt.decls
+ 
+ SRCS = \
+ 	$(GENERIC_DIR)/tk3d.c $(GENERIC_DIR)/tkArgv.c \
+ 	$(GENERIC_DIR)/tkAtom.c $(GENERIC_DIR)/tkBind.c	\
+ 	$(GENERIC_DIR)/tkBitmap.c $(GENERIC_DIR)/tkClipboard.c \
+ 	$(GENERIC_DIR)/tkCmds.c $(GENERIC_DIR)/tkColor.c \
+ 	$(GENERIC_DIR)/tkConfig.c $(GENERIC_DIR)/tkCursor.c \
+ 	$(GENERIC_DIR)/tkError.c $(GENERIC_DIR)/tkEvent.c \
+ 	$(GENERIC_DIR)/tkFocus.c $(GENERIC_DIR)/tkFont.c \
+ 	$(GENERIC_DIR)/tkGet.c $(GENERIC_DIR)/tkGC.c \
+ 	$(GENERIC_DIR)/tkGeometry.c $(GENERIC_DIR)/tkGrab.c \
+ 	$(GENERIC_DIR)/tkGrid.c $(GENERIC_DIR)/tkConsole.c \
+ 	$(GENERIC_DIR)/tkMain.c $(GENERIC_DIR)/tkOption.c \
+ 	$(GENERIC_DIR)/tkPack.c $(GENERIC_DIR)/tkPlace.c \
+ 	$(GENERIC_DIR)/tkSelect.c $(GENERIC_DIR)/tkUtil.c \
+ 	$(GENERIC_DIR)/tkVisual.c $(GENERIC_DIR)/tkWindow.c \
+ 	$(GENERIC_DIR)/tkButton.c $(GENERIC_DIR)/tkObj.c \
+ 	$(GENERIC_DIR)/tkEntry.c $(GENERIC_DIR)/tkFrame.c \
+ 	$(GENERIC_DIR)/tkListbox.c $(GENERIC_DIR)/tkMenu.c \
+ 	$(GENERIC_DIR)/tkMenubutton.c $(GENERIC_DIR)/tkMenuDraw.c \
+ 	$(GENERIC_DIR)/tkMessage.c \
+ 	$(GENERIC_DIR)/tkPanedWindow.c \
+ 	$(GENERIC_DIR)/tkScale.c $(GENERIC_DIR)/tkScrollbar.c \
+ 	$(GENERIC_DIR)/tkCanvas.c $(GENERIC_DIR)/tkCanvArc.c \
+ 	$(GENERIC_DIR)/tkCanvBmap.c $(GENERIC_DIR)/tkCanvImg.c \
+ 	$(GENERIC_DIR)/tkCanvLine.c $(GENERIC_DIR)/tkCanvPoly.c \
+ 	$(GENERIC_DIR)/tkCanvPs.c $(GENERIC_DIR)/tkCanvText.c \
+ 	$(GENERIC_DIR)/tkCanvUtil.c \
+ 	$(GENERIC_DIR)/tkCanvWind.c $(GENERIC_DIR)/tkRectOval.c \
+ 	$(GENERIC_DIR)/tkTrig.c $(GENERIC_DIR)/tkImage.c \
+ 	$(GENERIC_DIR)/tkImgBmap.c $(GENERIC_DIR)/tkImgGIF.c \
+ 	$(GENERIC_DIR)/tkImgPPM.c \
+ 	$(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkText.c \
+ 	$(GENERIC_DIR)/tkTextBTree.c $(GENERIC_DIR)/tkTextDisp.c \
+ 	$(GENERIC_DIR)/tkTextImage.c \
+ 	$(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \
+ 	$(GENERIC_DIR)/tkTextTag.c $(GENERIC_DIR)/tkTextWind.c \
+ 	$(GENERIC_DIR)/tkOldConfig.c \
+ 	$(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \
+ 	$(GENERIC_DIR)/tkStubInit.c $(GENERIC_DIR)/tkStubLib.c \
+ 	$(GENERIC_DIR)/tkUndo.c \
+ 	$(UNIX_DIR)/tkAppInit.c $(UNIX_DIR)/tkUnix.c \
+ 	$(UNIX_DIR)/tkUnix3d.c \
+ 	$(UNIX_DIR)/tkUnixButton.c $(UNIX_DIR)/tkUnixColor.c \
+ 	$(UNIX_DIR)/tkUnixConfig.c \
+ 	$(UNIX_DIR)/tkUnixCursor.c \
+ 	$(UNIX_DIR)/tkUnixDraw.c \
+ 	$(UNIX_DIR)/tkUnixEmbed.c $(UNIX_DIR)/tkUnixEvent.c \
+ 	$(UNIX_DIR)/tkUnixFocus.c \
+ 	$(UNIX_DIR)/tkUnixFont.c $(UNIX_DIR)/tkUnixInit.c \
+ 	$(UNIX_DIR)/tkUnixKey.c \
+ 	$(UNIX_DIR)/tkUnixMenu.c $(UNIX_DIR)/tkUnixMenubu.c \
+ 	$(UNIX_DIR)/tkUnixScale.c $(UNIX_DIR)/tkUnixScrlbr.c \
+ 	$(UNIX_DIR)/tkUnixSelect.c \
+ 	$(UNIX_DIR)/tkUnixSend.c $(UNIX_DIR)/tkUnixWm.c \
+ 	$(UNIX_DIR)/tkUnixXId.c
+ 
+ 
+ HDRS = bltList.h \
+ 	default.h ks_names.h tkPatch.h tk.h tkButton.h tkCanvas.h tkInt.h  \
+ 	tkPort.h tkScrollbar.h tkText.h
+ 
+ DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
+ 
+ all: binaries libraries doc
+ 
+ binaries: ${TK_LIB_FILE} ${STUB_LIB_FILE} wish
+ 
+ libraries:
+ 
+ $(SRC_DIR)/doc/man.macros:
+ 	chmod +x $(UNIX_DIR)/install-sh
+ 	$(INSTALL_DATA) /home/ludwig/tcltk/patch3/tcl8.4a4/doc/man.macros $(SRC_DIR)/doc/man.macros
+ 
+ doc: $(SRC_DIR)/doc/man.macros
+ 
+ # The following target is configured by autoconf to generate either
+ # a shared library or non-shared library for Tk.
+ ${TK_LIB_FILE}: ${OBJS}
+ 	rm -f ${TK_LIB_FILE}
+ 	${SHLIB_LD} -o $@ ${OBJS} $(TK_LD_SEARCH_FLAGS) ${TCL_STUB_LIB_SPEC} ${SHLIB_LD_LIBS}
+ 	$(RANLIB) ${TK_LIB_FILE}
+ 
+ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
+ 	rm -f ${STUB_LIB_FILE}
+ 	${STLIB_LD} $@ ${STUB_LIB_OBJS}
+ 	$(RANLIB) ${STUB_LIB_FILE}
+ 
+ # Make target which outputs the list of the .o contained in the Tk lib
+ # usefull to build a single big shared library containing Tcl/Tk and other
+ # extensions.  used for the Tcl Plugin.  -- dl
+ tkLibObjs:
+ 	@echo ${OBJS}
+ 
+ # This targets actually build the objects needed for the lib in the above
+ # case
+ objs: ${OBJS}
+ 
+ 
+ wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE)
+ 	$(CC) $(LDFLAGS) $(WISH_OBJS) \
+ 		-L/home/ludwig/tcltk/patch3/tk8.4a4/unix -ltk8.4 \
+ 		$(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o wish
+ 
+ # This rule is executed if the user tried to run tktest without first
+ # building tcltest in the Tcl bin directory. Just do it for them.
+ ${TCL_BIN_DIR}/tcltest:
+ 	cd ${TCL_BIN_DIR} ; \
+ 	$(MAKE) tcltest
+ 
+ # Resetting the LIB_RUNTIME_DIR below is required so that
+ # the generated tktest executable gets the build directory
+ # burned into its ld search path. This keeps tktest from
+ # picking up an already installed version of the Tcl or
+ # Tk shared libraries.
+ 
+ tktest: ${TCL_BIN_DIR}/tcltest $(TKTEST_OBJS) $(TK_LIB_FILE)
+ 	$(MAKE) tktest-real LIB_RUNTIME_DIR=`pwd`:$(TCL_BIN_DIR)
+ 
+ tktest-real:
+ 	${CC} $(LDFLAGS) $(TKTEST_OBJS) \
+ 		-L/home/ludwig/tcltk/patch3/tk8.4a4/unix -ltk8.4 \
+ 		$(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o tktest
+ 
+ # FIXME: This xttest rule seems to be broken in a number of ways.
+ # It should use TK_CC_SEARCH_FLAGS, it does not include the shared
+ # lib location logic from tktest, and it is not clear where this
+ # test.o object file comes from.
+ xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
+ 	${CC} $(LDFLAGS) test.o tkTest.o tkSquare.o \
+ 		-L/home/ludwig/tcltk/patch3/tk8.4a4/unix -ltk8.4 \
+ 		$(WISH_LIBS) $(TK_LD_SEARCH_FLAGS) -lXt -o xttest
+ 
+ # Note, in the target below TCL_LIBRARY needs to be set or else
+ # "make test" won't work in the case where the compilation directory
+ # isn't the same as the source directory.
+ # Specifying TESTFLAGS on the command line is the standard way to pass
+ # args to tcltest, ie:
+ #	% make test TESTFLAGS="-verbose bps -file fileName.test"
+ 
+ test: tktest
+ 	TCL_LIBRARY=/home/ludwig/tcltk/patch3/tcl8.4a4/library; export TCL_LIBRARY; \
+ 	TK_LIBRARY=/home/ludwig/tcltk/patch3/tk8.4a4/library; export TK_LIBRARY; \
+ 	./tktest $(TOP_DIR)/tests/all.tcl -geometry +0+0 \
+ 	$(TESTFLAGS) $(TCLTESTARGS)
+ 
+ # Tests with different languages
+ testlang: tktest
+ 	TCL_LIBRARY=/home/ludwig/tcltk/patch3/tcl8.4a4/library; export TCL_LIBRARY; \
+ 	TK_LIBRARY=/home/ludwig/tcltk/patch3/tk8.4a4/library; export TK_LIBRARY; \
+ 	for lang in $(LOCALES) ;  \
+ 	do \
+ 	LANG=$(lang); export LANG; \
+ 	./tktest $(TOP_DIR)/tests/all.tcl -geometry +0+0 \
+ 	$(TESTFLAGS) $(TCLTESTARGS); \
+ 	done
+ 
+ # Useful target to launch a built tktest with the proper path,...
+ runtest: tktest
+ 	TCL_LIBRARY=/home/ludwig/tcltk/patch3/tcl8.4a4/library; export TCL_LIBRARY; \
+ 	TK_LIBRARY=/home/ludwig/tcltk/patch3/tk8.4a4/library; export TK_LIBRARY; \
+ 	./tktest
+ 
+ # This target can be used to run wish from the build directory
+ # via `make shell` or `make shell SCRIPT=/tmp/foo.tcl`
+ shell: wish
+ 	LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; \
+ 	export LD_LIBRARY_PATH; \
+ 	LIBPATH=`pwd`:${TCL_BIN_DIR}:${LIBPATH}; export LIBPATH; \
+ 	SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}; \
+ 	export SHLIB_PATH; \
+ 	TCL_LIBRARY=/home/ludwig/tcltk/patch3/tcl8.4a4/library; export TCL_LIBRARY; \
+ 	TK_LIBRARY=/home/ludwig/tcltk/patch3/tk8.4a4/library; export TK_LIBRARY; \
+ 	./wish $(SCRIPT)
+ 
+ # This target can be used to run wish inside either gdb or insight
+ gdb: wish
+ 	@echo "set env LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}" > gdb.run
+ 	@echo "set env LIBPATH=`pwd`:${TCL_BIN_DIR}:${LIBPATH}" >> gdb.run
+ 	@echo "set env SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}" >> gdb.run
+ 	@echo "set env TCL_LIBRARY=/home/ludwig/tcltk/patch3/tcl8.4a4/library" >> gdb.run
+ 	@echo "set env TK_LIBRARY=/home/ludwig/tcltk/patch3/tk8.4a4/library" >> gdb.run
+ 	gdb ./wish --command=gdb.run
+ 	rm gdb.run
+ 
+ install: all install-binaries install-libraries install-demos install-doc
+ 
+ # Note: before running ranlib below, must cd to target directory because
+ # some ranlibs write to current directory, and this might not always be
+ # possible (e.g. if installing as root).
+ 
+ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
+ 	@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
+ 	    do \
+ 	    if [ ! -d $$i ] ; then \
+ 		echo "Making directory $$i"; \
+ 		mkdir -p $$i; \
+ 		chmod 755 $$i; \
+ 		else true; \
+ 		fi; \
+ 	    done;
+ 	@if test ! -x $(UNIX_DIR)/install-sh; then \
+ 	    chmod +x $(UNIX_DIR)/install-sh; \
+ 	    fi
+ 	@if test ! -x $(UNIX_DIR)/mkLinks; then \
+ 	    chmod +x $(UNIX_DIR)/mkLinks; \
+ 	    fi
+ 	@echo "Installing $(TK_LIB_FILE) to $(LIB_INSTALL_DIR)/"
+ 	@$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
+ 	@(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE))
+ 	@chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
+ 	@echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)"
+ 	@$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
+ 	@echo "Installing tkConfig.sh to $(LIB_INSTALL_DIR)/"
+ 	@$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh
+ 	@if test "$(TK_BUILD_EXP_FILE)" != ""; then \
+ 	    echo "Installing $(TK_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \
+ 	    $(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \
+ 			$(LIB_INSTALL_DIR)/$(TK_EXP_FILE); \
+ 	    fi
+ 	@if test "$(TK_STUB_LIB_FILE)" != "" ; then \
+ 	    echo "Installing $(TK_STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \
+ 	    $(INSTALL_DATA) $(STUB_LIB_FILE) \
+ 			 $(LIB_INSTALL_DIR)/$(TK_STUB_LIB_FILE); \
+ 	    fi
+ 
+ install-libraries:
+ 	@for i in $(INCLUDE_INSTALL_DIR) \
+ 		$(SCRIPT_INSTALL_DIR) $(SCRIPT_INSTALL_DIR)/images \
+ 		$(SCRIPT_INSTALL_DIR)/msgs; \
+ 	    do \
+ 	    if [ ! -d $$i ] ; then \
+ 		echo "Making directory $$i"; \
+ 		mkdir -p $$i; \
+ 		chmod 755 $$i; \
+ 		else true; \
+ 		fi; \
+ 	    done;
+ 	@if test ! -x $(UNIX_DIR)/install-sh; then \
+ 	    chmod +x $(UNIX_DIR)/install-sh; \
+ 	    fi
+ 	@echo "Installing header files";
+ 	@for i in $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDecls.h \
+ 		$(GENERIC_DIR)/tkPlatDecls.h ; \
+ 	    do \
+ 	    $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \
+ 	    done;
+ 	@echo "Installing library files to $(SCRIPT_INSTALL_DIR)";
+ 	@for i in $(SRC_DIR)/library/*.tcl $(GENERIC_DIR)/prolog.ps \
+ 	        $(SRC_DIR)/library/tclIndex $(UNIX_DIR)/tkAppInit.c; \
+ 	    do \
+ 	    $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
+ 	    done;
+ 	@echo "Installing library images directory";
+ 	@for i in $(SRC_DIR)/library/images/*; \
+ 	    do \
+ 	    if [ -f $$i ] ; then \
+ 		$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/images; \
+ 	    fi; \
+ 	    done;
+ 	@echo "Installing translation directory";
+ 	@for i in $(SRC_DIR)/library/msgs/*.msg; \
+ 	    do \
+ 	    if [ -f $$i ] ; then \
+ 		$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/msgs; \
+ 	    fi; \
+ 	    done;
+ 
+ install-demos:
+ 	@for i in $(SCRIPT_INSTALL_DIR) \
+ 		$(SCRIPT_INSTALL_DIR)/demos \
+ 		$(SCRIPT_INSTALL_DIR)/demos/images ; \
+ 	    do \
+ 	    if [ ! -d $$i ] ; then \
+ 		echo "Making directory $$i"; \
+ 		mkdir -p $$i; \
+ 		chmod 755 $$i; \
+ 		else true; \
+ 		fi; \
+ 	    done;
+ 	@echo "Installing demos to $(SCRIPT_INSTALL_DIR)/demos/";
+ 	@for i in $(SRC_DIR)/library/demos/*; \
+ 	    do \
+ 	    if [ -f $$i ] ; then \
+ 		sed -e '3 s|exec wish|exec wish$(VERSION)|' \
+ 			$$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \
+ 	    fi; \
+ 	    done;
+ 	@for i in $(DEMOPROGS); \
+ 	    do \
+ 	    chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \
+ 	    done;
+ 	@echo "Installing demo images";
+ 	@for i in $(SRC_DIR)/library/demos/images/*; \
+ 	    do \
+ 	    if [ -f $$i ] ; then \
+ 		$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
+ 		fi; \
+ 	    done;
+ 
+ install-doc:
+ 	@for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
+ 	    do \
+ 	    if [ ! -d $$i ] ; then \
+ 		echo "Making directory $$i"; \
+ 		mkdir -p $$i; \
+ 		chmod 755 $$i; \
+ 		else true; \
+ 		fi; \
+ 	    done;
+ 	@echo "Installing top-level (.1) docs";
+ 	@cd $(SRC_DIR)/doc; for i in *.1; \
+ 	    do \
+ 	    rm -f $(MAN1_INSTALL_DIR)/$$i; \
+ 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
+ 		    $$i > $(MAN1_INSTALL_DIR)/$$i; \
+ 	    chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
+ 	    done;
+ 	@echo "Cross-linking top-level (.1) docs";
+ 	@$(UNIX_DIR)/mkLinks $(MAN1_INSTALL_DIR)
+ 	@echo "Installing C API (.3) docs";
+ 	@cd $(SRC_DIR)/doc; for i in *.3; \
+ 	    do \
+ 	    rm -f $(MAN3_INSTALL_DIR)/$$i; \
+ 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
+ 		    $$i > $(MAN3_INSTALL_DIR)/$$i; \
+ 	    chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
+ 	    done;
+ 	@echo "Cross-linking top-level (.3) docs";
+ 	@$(UNIX_DIR)/mkLinks $(MAN3_INSTALL_DIR)
+ 	@echo "Installing command (.n) docs";
+ 	@cd $(SRC_DIR)/doc; for i in *.n; \
+ 	    do \
+ 	    rm -f $(MANN_INSTALL_DIR)/$$i; \
+ 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
+ 		    $$i > $(MANN_INSTALL_DIR)/$$i; \
+ 	    chmod 444 $(MANN_INSTALL_DIR)/$$i; \
+ 	    done;
+ 	@echo "Cross-linking command (.n) docs";
+ 	@$(UNIX_DIR)/mkLinks $(MANN_INSTALL_DIR)
+ 
+ Makefile: $(UNIX_DIR)/Makefile.in
+ 	$(SHELL) config.status
+ 
+ clean:
+ 	rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out errors \
+ 		tktest wish config.info lib.exp
+ 
+ distclean: clean
+ 	rm -f Makefile config.status config.cache config.log tkConfig.sh \
+ 		$(PACKAGE).* prototype
+ 
+ depend:
+ 	makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
+ 
+ # Test binaries.  The rule for tkTestInit.o is complicated because
+ # it is is compiled from tkAppInit.c.  Can't use the "-o" option
+ # because this doesn't work on some strange compilers (e.g. UnixWare).
+ 
+ tkTestInit.o: $(UNIX_DIR)/tkAppInit.c
+ 	@if test -f tkAppInit.o ; then \
+ 	    rm -f tkAppInit.sav; \
+ 	    mv tkAppInit.o tkAppInit.sav; \
+ 	fi;
+ 	$(CC) -c $(CC_SWITCHES_NO_STUBS) -DTK_TEST $(UNIX_DIR)/tkAppInit.c
+ 	rm -f tkTestInit.o
+ 	mv tkAppInit.o tkTestInit.o
+ 	@if test -f tkAppInit.sav ; then \
+ 	    mv tkAppInit.sav tkAppInit.o; \
+ 	fi;
+ 
+ tkAppInit.o: $(UNIX_DIR)/tkAppInit.c
+ 	$(CC) -c $(CC_SWITCHES_NO_STUBS) $(UNIX_DIR)/tkAppInit.c
+ 
+ tk3d.o: $(GENERIC_DIR)/tk3d.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tk3d.c
+ 
+ tkArgv.o: $(GENERIC_DIR)/tkArgv.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkArgv.c
+ 
+ tkAtom.o: $(GENERIC_DIR)/tkAtom.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkAtom.c
+ 
+ tkBind.o: $(GENERIC_DIR)/tkBind.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkBind.c
+ 
+ tkBitmap.o: $(GENERIC_DIR)/tkBitmap.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkBitmap.c
+ 
+ tkClipboard.o: $(GENERIC_DIR)/tkClipboard.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkClipboard.c
+ 
+ tkCmds.o: $(GENERIC_DIR)/tkCmds.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCmds.c
+ 
+ tkColor.o: $(GENERIC_DIR)/tkColor.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkColor.c
+ 
+ tkConfig.o: $(GENERIC_DIR)/tkConfig.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkConfig.c
+ 
+ tkConsole.o: $(GENERIC_DIR)/tkConsole.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkConsole.c
+ 
+ tkCursor.o: $(GENERIC_DIR)/tkCursor.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCursor.c
+ 
+ tkError.o: $(GENERIC_DIR)/tkError.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkError.c
+ 
+ tkEvent.o: $(GENERIC_DIR)/tkEvent.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkEvent.c
+ 
+ tkFocus.o: $(GENERIC_DIR)/tkFocus.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFocus.c
+ 
+ tkFont.o: $(GENERIC_DIR)/tkFont.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFont.c
+ 
+ tkGet.o: $(GENERIC_DIR)/tkGet.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGet.c
+ 
+ tkGC.o: $(GENERIC_DIR)/tkGC.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGC.c
+ 
+ tkGeometry.o: $(GENERIC_DIR)/tkGeometry.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGeometry.c
+ 
+ tkGrab.o: $(GENERIC_DIR)/tkGrab.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGrab.c
+ 
+ tkGrid.o: $(GENERIC_DIR)/tkGrid.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGrid.c
+ 
+ tkMain.o: $(GENERIC_DIR)/tkMain.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMain.c
+ 
+ tkObj.o: $(GENERIC_DIR)/tkObj.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkObj.c
+ 
+ tkOldConfig.o: $(GENERIC_DIR)/tkOldConfig.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkOldConfig.c
+ 
+ tkOption.o: $(GENERIC_DIR)/tkOption.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkOption.c
+ 
+ tkPack.o: $(GENERIC_DIR)/tkPack.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPack.c
+ 
+ tkPlace.o: $(GENERIC_DIR)/tkPlace.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPlace.c
+ 
+ tkSelect.o: $(GENERIC_DIR)/tkSelect.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkSelect.c
+ 
+ tkUtil.o: $(GENERIC_DIR)/tkUtil.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkUtil.c
+ 
+ tkVisual.o: $(GENERIC_DIR)/tkVisual.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c
+ 
+ tkWindow.o: $(GENERIC_DIR)/tkWindow.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkWindow.c
+ 
+ tkButton.o: $(GENERIC_DIR)/tkButton.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c
+ 
+ tkEntry.o: $(GENERIC_DIR)/tkEntry.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkEntry.c
+ 
+ tkFrame.o: $(GENERIC_DIR)/tkFrame.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFrame.c
+ 
+ tkListbox.o: $(GENERIC_DIR)/tkListbox.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkListbox.c
+ 
+ tkMenu.o: $(GENERIC_DIR)/tkMenu.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenu.c
+ 
+ tkMenubutton.o: $(GENERIC_DIR)/tkMenubutton.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenubutton.c
+ 
+ tkMenuDraw.o: $(GENERIC_DIR)/tkMenuDraw.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenuDraw.c
+ 
+ tkMessage.o: $(GENERIC_DIR)/tkMessage.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMessage.c
+ 
+ tkPanedWindow.o: $(GENERIC_DIR)/tkPanedWindow.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPanedWindow.c
+ 
+ tkScale.o: $(GENERIC_DIR)/tkScale.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScale.c
+ 
+ tkScrollbar.o: $(GENERIC_DIR)/tkScrollbar.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScrollbar.c
+ 
+ tkSquare.o: $(GENERIC_DIR)/tkSquare.c
+ 	$(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkSquare.c
+ 
+ tkCanvas.o: $(GENERIC_DIR)/tkCanvas.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvas.c
+ 
+ tkCanvArc.o: $(GENERIC_DIR)/tkCanvArc.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvArc.c
+ 
+ tkCanvBmap.o: $(GENERIC_DIR)/tkCanvBmap.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvBmap.c
+ 
+ tkCanvImg.o: $(GENERIC_DIR)/tkCanvImg.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvImg.c
+ 
+ tkCanvLine.o: $(GENERIC_DIR)/tkCanvLine.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvLine.c
+ 
+ tkCanvPoly.o: $(GENERIC_DIR)/tkCanvPoly.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvPoly.c
+ 
+ tkCanvPs.o: $(GENERIC_DIR)/tkCanvPs.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvPs.c
+ 
+ tkCanvText.o: $(GENERIC_DIR)/tkCanvText.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvText.c
+ 
+ tkCanvUtil.o: $(GENERIC_DIR)/tkCanvUtil.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvUtil.c
+ 
+ tkCanvWind.o: $(GENERIC_DIR)/tkCanvWind.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvWind.c
+ 
+ tkRectOval.o: $(GENERIC_DIR)/tkRectOval.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkRectOval.c
+ 
+ tkTrig.o: $(GENERIC_DIR)/tkTrig.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTrig.c
+ 
+ tkImage.o: $(GENERIC_DIR)/tkImage.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImage.c
+ 
+ tkImgBmap.o: $(GENERIC_DIR)/tkImgBmap.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgBmap.c
+ 
+ tkImgGIF.o: $(GENERIC_DIR)/tkImgGIF.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgGIF.c
+ 
+ tkImgPPM.o: $(GENERIC_DIR)/tkImgPPM.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPPM.c
+ 
+ tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhoto.c
+ 
+ tkTest.o: $(GENERIC_DIR)/tkTest.c
+ 	$(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkTest.c
+ 
+ tkText.o: $(GENERIC_DIR)/tkText.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkText.c
+ 
+ tkTextBTree.o: $(GENERIC_DIR)/tkTextBTree.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextBTree.c
+ 
+ tkTextDisp.o: $(GENERIC_DIR)/tkTextDisp.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextDisp.c
+ 
+ tkTextImage.o: $(GENERIC_DIR)/tkTextImage.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextImage.c
+ 
+ tkTextIndex.o: $(GENERIC_DIR)/tkTextIndex.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextIndex.c
+ 
+ tkTextMark.o: $(GENERIC_DIR)/tkTextMark.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextMark.c
+ 
+ tkTextTag.o: $(GENERIC_DIR)/tkTextTag.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextTag.c
+ 
+ tkTextWind.o: $(GENERIC_DIR)/tkTextWind.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextWind.c
+ 
+ tkStubInit.o: $(GENERIC_DIR)/tkStubInit.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubInit.c
+ 
+ # Stub library binaries, these must be compiled for use in a shared library
+ # even though they will be placed in a static archive
+ 
+ tkStubLib.o: $(GENERIC_DIR)/tkStubLib.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubLib.c
+ 
+ tkStubImg.o: $(GENERIC_DIR)/tkStubImg.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubImg.c
+ 
+ tkUndo.o: $(GENERIC_DIR)/tkUndo.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkUndo.c
+ 
+ tkUnix.o: $(UNIX_DIR)/tkUnix.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix.c
+ 
+ tkUnix3d.o: $(UNIX_DIR)/tkUnix3d.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix3d.c
+ 
+ tkUnixButton.o: $(UNIX_DIR)/tkUnixButton.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixButton.c
+ 
+ tkUnixColor.o: $(UNIX_DIR)/tkUnixColor.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixColor.c
+ 
+ tkUnixConfig.o: $(UNIX_DIR)/tkUnixConfig.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixConfig.c
+ 
+ tkUnixCursor.o: $(UNIX_DIR)/tkUnixCursor.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixCursor.c
+ 
+ tkUnixDraw.o: $(UNIX_DIR)/tkUnixDraw.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixDraw.c
+ 
+ tkUnixEmbed.o: $(UNIX_DIR)/tkUnixEmbed.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixEmbed.c
+ 
+ tkUnixEvent.o: $(UNIX_DIR)/tkUnixEvent.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixEvent.c
+ 
+ tkUnixFocus.o: $(UNIX_DIR)/tkUnixFocus.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixFocus.c
+ 
+ tkUnixFont.o: $(UNIX_DIR)/tkUnixFont.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixFont.c
+ 
+ tkUnixInit.o: $(UNIX_DIR)/tkUnixInit.c $(GENERIC_DIR)/tkInitScript.h tkConfig.sh
+ 	$(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" \
+ 	    $(UNIX_DIR)/tkUnixInit.c
+ 
+ tkUnixKey.o: $(UNIX_DIR)/tkUnixKey.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixKey.c
+ 
+ tkUnixMenu.o: $(UNIX_DIR)/tkUnixMenu.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixMenu.c
+ 
+ tkUnixMenubu.o: $(UNIX_DIR)/tkUnixMenubu.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixMenubu.c
+ 
+ tkUnixScale.o: $(UNIX_DIR)/tkUnixScale.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixScale.c
+ 
+ tkUnixScrlbr.o: $(UNIX_DIR)/tkUnixScrlbr.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixScrlbr.c
+ 
+ tkUnixSelect.o: $(UNIX_DIR)/tkUnixSelect.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixSelect.c
+ 
+ tkUnixSend.o: $(UNIX_DIR)/tkUnixSend.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixSend.c
+ 
+ tkUnixWm.o: $(UNIX_DIR)/tkUnixWm.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixWm.c
+ 
+ tkUnixXId.o: $(UNIX_DIR)/tkUnixXId.c
+ 	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixXId.c
+ 
+ .c.o:
+ 	$(CC) -c $(CC_SWITCHES) $<
+ 
+ #
+ # Target to check for proper usage of UCHAR macro.
+ #
+ 
+ checkuchar:
+ 	-egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit\|toupper\|tolower $(SRCS) | grep -v UCHAR
+ 
+ #
+ # Target to make sure that only symbols with "Tk" prefixes are
+ # exported.
+ #
+ 
+ checkexports: $(TK_LIB_FILE)
+ 	-nm -p $(TK_LIB_FILE) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]k'
+ 
+ 
+ #
+ # Regenerate the stubs files.
+ #
+ 
+ $(GENERIC_DIR)/tkStubInit.c: $(GENERIC_DIR)/tk.decls \
+ 		$(GENERIC_DIR)/tkInt.decls
+ 	@echo "Warning: run \"make genstubs\" to regenerate tkStubInit.c"
+ 
+ genstubs:
+ 	$(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \
+ 		$(GENERIC_DIR)/tk.decls $(GENERIC_DIR)/tkInt.decls
+ 
+ #
+ # Target to check that all exported functions have an entry in the stubs
+ # tables.
+ #
+ 
+ checkstubs:
+ 	-@for i in `nm -p $(TK_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
+ 		| sort -n`; do \
+ 		match=0; \
+ 		for j in $(TK_DECLS); do \
+ 		    if [ `grep -c $$i $$j` -gt 0 ]; then \
+ 			match=1; \
+ 		    fi; \
+ 		done; \
+ 		if [ $$match -eq 0 ]; then echo $$i; fi \
+ 	done
+ 
+ 
+ #
+ # Target to create a Tk RPM for Linux.  Requires that you be on a Linux
+ # system.
+ #
+ 
+ rpm: all /bin/rpm
+ 	rm -f THIS.TCL.SPEC
+ 	echo "%define _builddir `pwd`" > THIS.TK.SPEC
+ 	echo "%define _rpmdir `pwd`/RPMS" >> THIS.TK.SPEC
+ 	cat tk.spec >> THIS.TK.SPEC
+ 	mkdir -p RPMS/i386
+ 	rpm -bb THIS.TK.SPEC
+ 	mv RPMS/i386/*.rpm .
+ 	rm -rf RPMS THIS.TK.SPEC
+ 
+ #
+ # Target to create a proper Tk distribution from information in the
+ # master source directory.  DISTDIR must be defined to indicate where
+ # to put the distribution.  DISTDIR must be an absolute path name.
+ #
+ 
+ DISTROOT = /tmp/dist
+ DISTNAME =	tk8.4a4
+ ZIPNAME =	tk84a4.zip
+ DISTDIR =	$(DISTROOT)/$(DISTNAME)
+ TCLDIR = 	/home/ludwig/tcltk/patch3/tcl8.4a4
+ $(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in
+ 	autoconf $(UNIX_DIR)/configure.in > $(UNIX_DIR)/configure
+ 
+ dist:   $(UNIX_DIR)/configure
+ 	rm -rf $(DISTDIR)
+ 	mkdir -p $(DISTDIR)
+ 	mkdir $(DISTDIR)/unix
+ 	cp -p $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix
+ 	cp $(TOP_DIR)/license.terms $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
+ 	chmod 664 $(DISTDIR)/unix/Makefile.in
+ 	cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in $(UNIX_DIR)/tk.spec \
+ 		$(UNIX_DIR)/aclocal.m4 $(UNIX_DIR)/tcl.m4 \
+ 		$(UNIX_DIR)/tkConfig.sh.in $(TCLDIR)/unix/install-sh \
+ 		$(UNIX_DIR)/README $(DISTDIR)/unix
+ 	chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in
+ 	chmod +x $(DISTDIR)/unix/install-sh
+ 	$(TCL_EXE) $(TCLDIR)/unix/mkLinks.tcl $(TOP_DIR)/doc/*.[13n] \
+ 		> $(DISTDIR)/unix/mkLinks
+ 	chmod +x $(DISTDIR)/unix/mkLinks
+ 	mkdir $(DISTDIR)/bitmaps
+ 	@(cd $(TOP_DIR); for i in bitmaps/* ; do \
+ 	    if [ -f $$i ] ; then \
+ 		sed -e 's/static char/static unsigned char/' \
+ 		       $$i > $(DISTDIR)/$$i; \
+ 	    fi; \
+ 	done;)
+ 	mkdir $(DISTDIR)/generic
+ 	cp -p $(GENERIC_DIR)/*.c $(GENERIC_DIR)/*.h $(GENERIC_DIR)/prolog.ps \
+ 		$(DISTDIR)/generic
+ 	cp -p $(GENERIC_DIR)/*.decls $(DISTDIR)/generic
+ 	cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic
+ 	cp -p $(TOP_DIR)/changes $(TOP_DIR)/ChangeLog $(TOP_DIR)/README \
+ 		$(TOP_DIR)/license.terms $(DISTDIR)
+ 	rm -f $(DISTDIR)/generic/blt*.[ch]
+ 	mkdir $(DISTDIR)/win
+ 	cp $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win
+ 	cp $(TOP_DIR)/win/configure.in \
+ 		$(TOP_DIR)/win/configure \
+ 		$(TOP_DIR)/win/tkConfig.sh.in \
+ 		$(TOP_DIR)/win/aclocal.m4 $(TOP_DIR)/win/tcl.m4 \
+ 		$(DISTDIR)/win
+ 	cp -p $(TOP_DIR)/win/*.c $(TOP_DIR)/win/*.h $(DISTDIR)/win
+ 	cp -p $(TOP_DIR)/win/*.bat $(DISTDIR)/win
+ 	$(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/*.bat
+ 	cp -p $(TOP_DIR)/win/makefile.* $(DISTDIR)/win
+ 	$(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/makefile.*
+ 	cp -p $(TOP_DIR)/win/rules.vc $(DISTDIR)/win
+ 	$(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/rules.vc
+ 	cp -p $(TOP_DIR)/win/README $(DISTDIR)/win
+ 	cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win
+ 	mkdir $(DISTDIR)/win/rc
+ 	cp -p $(TOP_DIR)/win/rc/*.rc $(TOP_DIR)/win/rc/*.cur \
+ 		$(TOP_DIR)/win/rc/*.ico $(TOP_DIR)/win/rc/*.bmp \
+ 		$(DISTDIR)/win/rc
+ 	mkdir $(DISTDIR)/mac
+ 	cp -p $(TOP_DIR)/mac/tkMacProjects.sea.hqx $(DISTDIR)/mac
+ 	cp -p $(TOP_DIR)/mac/*.c $(TOP_DIR)/mac/*.h $(TOP_DIR)/mac/*.r \
+ 		$(DISTDIR)/mac
+ 	cp -p $(TOP_DIR)/mac/README $(DISTDIR)/mac
+ 	cp -p $(TOP_DIR)/license.terms $(DISTDIR)/mac
+ 	cp -p $(TOP_DIR)/mac/*.pch $(DISTDIR)/mac
+ 	cp -p $(TOP_DIR)/mac/*.doc $(DISTDIR)/mac
+ 	cp -p $(TOP_DIR)/mac/*.tcl $(DISTDIR)/mac
+ 	mkdir $(DISTDIR)/compat
+ 	cp -p $(TOP_DIR)/license.terms $(TCLDIR)/compat/unistd.h \
+ 		$(TCLDIR)/compat/stdlib.h $(TCLDIR)/compat/limits.h \
+ 		$(DISTDIR)/compat
+ 	mkdir $(DISTDIR)/xlib
+ 	cp -p $(TOP_DIR)/xlib/*.h $(TOP_DIR)/xlib/*.c $(DISTDIR)/xlib
+ 	cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib
+ 	mkdir $(DISTDIR)/xlib/X11
+ 	cp -p $(TOP_DIR)/xlib/X11/*.h $(DISTDIR)/xlib/X11
+ 	cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib/X11
+ 	mkdir $(DISTDIR)/library
+ 	cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
+ 		$(TOP_DIR)/library/tclIndex \
+ 		$(DISTDIR)/library
+ 	mkdir $(DISTDIR)/library/images
+ 	@(cd $(TOP_DIR); for i in library/images/* ; do \
+ 	    if [ -f $$i ] ; then \
+ 		cp $$i $(DISTDIR)/$$i; \
+ 	    fi; \
+ 	done;)
+ 	mkdir $(DISTDIR)/library/msgs
+ 	@(cd $(TOP_DIR); for i in library/msgs/*.msg ; do \
+ 	    if [ -f $$i ] ; then \
+ 		cp $$i $(DISTDIR)/$$i; \
+ 	    fi; \
+ 	done;)
+ 	mkdir $(DISTDIR)/library/demos
+ 	cp -pr $(TOP_DIR)/library/demos/*.tcl \
+ 		$(TOP_DIR)/library/demos/tclIndex \
+ 		$(TOP_DIR)/library/demos/browse \
+ 		$(TOP_DIR)/library/demos/hello $(TOP_DIR)/library/demos/ixset \
+ 		$(TOP_DIR)/library/demos/rmt $(TOP_DIR)/library/demos/rolodex \
+ 		$(TOP_DIR)/library/demos/square \
+ 		$(TOP_DIR)/library/demos/tcolor \
+ 		$(TOP_DIR)/library/demos/timer \
+ 		$(TOP_DIR)/library/demos/widget \
+ 		$(TOP_DIR)/library/demos/README \
+ 		$(TOP_DIR)/license.terms $(DISTDIR)/library/demos
+ 	mkdir $(DISTDIR)/library/demos/images
+ 	@(cd $(TOP_DIR); for i in library/demos/images/* ; do \
+ 	    if [ -f $$i ] ; then \
+ 		cp $$i $(DISTDIR)/$$i; \
+ 	    fi; \
+ 	done;)
+ 	mkdir $(DISTDIR)/doc
+ 	cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/doc/*.[13n] \
+ 		$(TCLDIR)/doc/man.macros $(DISTDIR)/doc
+ 	mkdir $(DISTDIR)/tests
+ 	cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/tests/*.test \
+ 		$(TOP_DIR)/tests/*.tcl $(TOP_DIR)/tests/README \
+ 		$(TOP_DIR)/tests/option.file* $(DISTDIR)/tests
+ 
+ #
+ # The following target can only be used for non-patch releases.  Use
+ # the "allpatch" target below for patch releases.
+ #
+ 
+ alldist: dist
+ 	rm -f $(DISTROOT)/$(DISTNAME).tar.Z \
+ 		$(DISTROOT)/$(DISTNAME).tar.gz \
+ 		$(DISTROOT)/$(ZIPNAME)
+ 	cd $(DISTROOT); tar cf $(DISTNAME).tar $(DISTNAME); \
+ 		gzip -9 -c $(DISTNAME).tar > $(DISTNAME).tar.gz; \
+ 		compress $(DISTNAME).tar; zip -qr8 $(ZIPNAME) $(DISTNAME)
+ 
+ #
+ # The target below is similar to "alldist" except it works for patch
+ # releases.  It is needed because patch releases are peculiar: the
+ # patch designation appears in the name of the compressed file
+ # (e.g. tcl8.0p1.tar.gz) but the extracted source directory doesn't
+ # include the patch designation (e.g. tcl8.0).
+ #
+ 
+ allpatch: dist
+ 	rm -f $(DISTROOT)/$(DISTNAME).tar.Z \
+ 		$(DISTROOT)/$(DISTNAME).tar.gz \
+ 		$(DISTROOT)/$(ZIPNAME)
+ 	mv $(DISTROOT)/tk${VERSION} $(DISTROOT)/old
+ 	mv $(DISTROOT)/$(DISTNAME) $(DISTROOT)/tk${VERSION}
+ 	cd $(DISTROOT); tar cf $(DISTNAME).tar tk${VERSION}; \
+ 		gzip -9 -c $(DISTNAME).tar > $(DISTNAME).tar.gz; \
+ 		compress $(DISTNAME).tar; zip -r8 $(ZIPNAME) tk${VERSION}
+ 	mv $(DISTROOT)/tk${VERSION} $(DISTROOT)/$(DISTNAME)
+ 	mv $(DISTROOT)/old $(DISTROOT)/tk${VERSION}
+ 
+ #
+ # Target to create a Macintosh version of the distribution.  This will
+ # do a normal distribution and then massage the output to prepare it
+ # for moving to the Mac platform.  This requires a few scripts and
+ # programs found only in the Tcl greoup's tool workspace.
+ #
+ 
+ macdist: dist
+ 	rm -f $(DISTDIR)/mac/tkMacProjects.sea.hqx
+ 	$(TCL_EXE) $(TOOL_DIR)/man2html.tcl $(DISTDIR)/tmp ../.. tk$(VERSION)
+ 	mv $(DISTDIR)/tmp/tk$(VERSION) $(DISTDIR)/html
+ 	rm -rf $(DISTDIR)/doc
+ 	rm -rf $(DISTDIR)/tmp
+ 	$(TCL_EXE) $(TOOL_DIR)/cvtEOL.tcl $(DISTDIR)
+ 
+ #
+ # Targets to build Solaris package of the distribution for the current
+ # architecture.  To build stream packages for both sun4 and i86pc
+ # architectures: 
+ #
+ #   On the sun4 machine, execute the following:
+ #     make distclean; ./configure
+ #     make DISTDIR=<distdir> package
+ #
+ #   Once the build is complete, execute the following on the i86pc
+ #   machine:
+ #     make DISTDIR=<distdir> package-quick
+ #
+ # <distdir> is the absolute path to a directory where the build should
+ # take place.  These steps will generate the $(PACKAGE).sun4 and
+ # $(PACKAGE).i86pc stream packages.  It is important that the packages be
+ # built in this fashion in order to ensure that the architecture
+ # independent files are exactly the same, including timestamps, in
+ # both packages.
+ #
+ 
+ PACKAGE=SCRPtk
+ 
+ package: dist package-config package-common package-binaries package-generate
+ package-quick: package-config package-binaries package-generate
+ 
+ #
+ # Configure for the current architecture in the dist directory.
+ #
+ package-config:
+ 	mkdir -p $(DISTDIR)/unix/`arch`
+ 	cd $(DISTDIR)/unix/`arch`; \
+         ../configure --prefix=/opt/SUNWtcl/$(TCLVERSION) \
+ 		--exec_prefix=/opt/SUNWtcl/$(TCLVERSION)/`arch` \
+ 		--with-tcl=$(DISTDIR)/../tcl$(TCLVERSION)/unix/`arch` \
+ 		--enable-shared
+ 	mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)
+ 	mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
+ 
+ #
+ # Build and install the architecture independent files in the dist directory.
+ #
+ 
+ package-common:
+ 	cd $(DISTDIR)/unix/`arch`;\
+ 	$(MAKE); \
+ 	$(MAKE) install-libraries install-doc \
+ 		prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION) \
+ 		exec_prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
+ 	mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin
+ 	sed -e "s/TCLVERSION/$(TCLVERSION)/g" \
+ 		-e "s/TKVERSION/$(VERSION)/g" < $(UNIX_DIR)/wish.sh \
+ 		> $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wish$(VERSION)
+ 	chmod 755 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wish$(VERSION)
+ 
+ #
+ # Build and install the architecture specific files in the dist directory.
+ #
+ 
+ package-binaries: 
+ 	cd $(DISTDIR)/unix/`arch`; \
+ 	$(MAKE); \
+ 	$(MAKE) install-binaries prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION) \
+ 		exec_prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
+ 
+ #
+ # Generate a package from the installed files in the dist directory for the
+ # current architecture.
+ #
+ 
+ package-generate:
+ 	pkgproto $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin=bin \
+ 		 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/include=include \
+ 		 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/lib=lib \
+ 		 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/man=man \
+ 		 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`=`arch` \
+ 	| $(TCL_EXE) $(TCLDIR)/unix/mkProto.tcl $(TCLVERSION) \
+ 		$(UNIX_DIR) > prototype
+ 	pkgmk -o -d . -f prototype -a `arch`
+ 	pkgtrans -s . $(PACKAGE).`arch` $(PACKAGE)
+ 	rm -rf $(PACKAGE)
+ 
+ # DO NOT DELETE THIS LINE -- make depend depends on it.
diff -c -P -r orig/tk8.4a4/unix/Makefile.in patch3/tk8.4a4/unix/Makefile.in
*** orig/tk8.4a4/unix/Makefile.in	Wed Mar  6 09:51:50 2002
--- patch3/tk8.4a4/unix/Makefile.in	Fri Jun 21 07:18:36 2002
***************
*** 277,282 ****
--- 277,284 ----
  TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \
  	tkTextMark.o tkTextTag.o tkTextWind.o
  
+ UNDOOBJS = tkUndo.o
+ 
  UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o \
  	tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o \
  	tkUnixFocus.o tkUnixFont.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o \
***************
*** 290,296 ****
  	tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o \
  	tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o \
  	tkSelect.o tkUtil.o tkVisual.o tkWindow.o  \
! 	$(UNIXOBJS) $(WIDGOBJS) $(CANVOBJS) $(IMAGEOBJS) $(TEXTOBJS)
  
  TK_DECLS = \
  	$(GENERIC_DIR)/tk.decls \
--- 292,298 ----
  	tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o \
  	tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o \
  	tkSelect.o tkUtil.o tkVisual.o tkWindow.o  \
! 	$(UNIXOBJS) $(WIDGOBJS) $(CANVOBJS) $(IMAGEOBJS) $(TEXTOBJS) $(UNDOOBJS)
  
  TK_DECLS = \
  	$(GENERIC_DIR)/tk.decls \
***************
*** 335,340 ****
--- 337,343 ----
  	$(GENERIC_DIR)/tkOldConfig.c \
  	$(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \
  	$(GENERIC_DIR)/tkStubInit.c $(GENERIC_DIR)/tkStubLib.c \
+ 	$(GENERIC_DIR)/tkUndo.c \
  	$(UNIX_DIR)/tkAppInit.c $(UNIX_DIR)/tkUnix.c \
  	$(UNIX_DIR)/tkUnix3d.c \
  	$(UNIX_DIR)/tkUnixButton.c $(UNIX_DIR)/tkUnixColor.c \
***************
*** 884,889 ****
--- 887,895 ----
  tkStubImg.o: $(GENERIC_DIR)/tkStubImg.c
  	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubImg.c
  
+ tkUndo.o: $(GENERIC_DIR)/tkUndo.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkUndo.c
+ 
  tkUnix.o: $(UNIX_DIR)/tkUnix.c
  	$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix.c
  
diff -c -P -r orig/tk8.4a4/unix/config.cache patch3/tk8.4a4/unix/config.cache
*** orig/tk8.4a4/unix/config.cache	Thu Jan  1 01:00:00 1970
--- patch3/tk8.4a4/unix/config.cache	Fri Jun 21 07:33:46 2002
***************
*** 0 ****
--- 1,47 ----
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+ # scripts and configure runs.  It is not useful on other systems.
+ # If it contains results you don't want to keep, you may remove or edit it.
+ #
+ # By default, configure uses ./config.cache as the cache file,
+ # creating it if it does not exist already.  You can give configure
+ # the --cache-file=FILE option to use a different cache file; that is
+ # what configure does when it calls configure scripts in
+ # subdirectories, so they share the cache.
+ # Giving --cache-file=/dev/null disables caching, for debugging configure.
+ # config.status only pays attention to the cache file if you give it the
+ # --recheck option to rerun configure.
+ #
+ ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned=no}
+ ac_cv_c_tclconfig=${ac_cv_c_tclconfig=/home/ludwig/tcltk/patch3/tcl8.4a4/unix}
+ ac_cv_func_connect=${ac_cv_func_connect=yes}
+ ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname=yes}
+ ac_cv_func_sin=${ac_cv_func_sin=no}
+ ac_cv_func_strtod=${ac_cv_func_strtod=yes}
+ ac_cv_have_x=${ac_cv_have_x=$'have_x=yes \t\tac_x_includes=/usr/X11R6/include ac_x_libraries=/usr/X11R6/lib'}
+ ac_cv_header_limits_h=${ac_cv_header_limits_h=yes}
+ ac_cv_header_stdc=${ac_cv_header_stdc=yes}
+ ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes}
+ ac_cv_header_time=${ac_cv_header_time=yes}
+ ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes}
+ ac_cv_lib_Xbsd_main=${ac_cv_lib_Xbsd_main=no}
+ ac_cv_lib_dl_dlopen=${ac_cv_lib_dl_dlopen=yes}
+ ac_cv_lib_ieee_main=${ac_cv_lib_ieee_main=yes}
+ ac_cv_prog_AR=${ac_cv_prog_AR=ar}
+ ac_cv_prog_CC=${ac_cv_prog_CC=gcc}
+ ac_cv_prog_CPP=${ac_cv_prog_CPP=$'gcc -E'}
+ ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib}
+ ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no}
+ ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
+ ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes}
+ ac_cv_prog_gcc=${ac_cv_prog_gcc=yes}
+ ac_cv_type_mode_t=${ac_cv_type_mode_t=yes}
+ ac_cv_type_pid_t=${ac_cv_type_pid_t=yes}
+ ac_cv_type_size_t=${ac_cv_type_size_t=yes}
+ ac_cv_type_uid_t=${ac_cv_type_uid_t=yes}
+ tcl_cv_flag__isoc99_source=${tcl_cv_flag__isoc99_source=no}
+ tcl_cv_flag__largefile64_source=${tcl_cv_flag__largefile64_source=yes}
+ tcl_cv_struct_dirent64=${tcl_cv_struct_dirent64=no}
+ tcl_cv_struct_stat64=${tcl_cv_struct_stat64=yes}
+ tcl_cv_type_64bit=${tcl_cv_type_64bit=$'long long'}
+ tcl_cv_type_off64_t=${tcl_cv_type_off64_t=yes}
diff -c -P -r orig/tk8.4a4/unix/config.log patch3/tk8.4a4/unix/config.log
*** orig/tk8.4a4/unix/config.log	Thu Jan  1 01:00:00 1970
--- patch3/tk8.4a4/unix/config.log	Fri Jun 21 07:33:46 2002
***************
*** 0 ****
--- 1,145 ----
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+ 
+ configure:578: checking for gcc
+ configure:691: checking whether the C compiler (gcc  ) works
+ configure:707: gcc -o conftest    conftest.c  1>&5
+ configure:733: checking whether the C compiler (gcc  ) is a cross-compiler
+ configure:738: checking whether we are using GNU C
+ configure:747: gcc -E conftest.c
+ configure:766: checking whether gcc accepts -g
+ configure:800: checking for ranlib
+ configure:833: checking how to run the C preprocessor
+ configure:854: gcc -E  conftest.c >/dev/null 2>conftest.out
+ configure:916: checking for unistd.h
+ configure:926: gcc -E  conftest.c >/dev/null 2>conftest.out
+ configure:916: checking for limits.h
+ configure:926: gcc -E  conftest.c >/dev/null 2>conftest.out
+ configure:959: checking for building with threads
+ configure:1290: checking if the compiler understands -pipe
+ configure:1301: gcc -pipe -c   conftest.c 1>&5
+ configure:1321: checking for required early compiler flags
+ configure:1335: gcc -pipe -c   conftest.c 1>&5
+ configure:1384: gcc -pipe -c   conftest.c 1>&5
+ configure: In function `main':
+ configure:1380: storage size of `buf' isn't known
+ configure: failed program was:
+ #line 1377 "configure"
+ #include "confdefs.h"
+ #include <sys/stat.h>
+ int main() {
+ struct stat64 buf; int i = stat64("/", &buf);
+ ; return 0; }
+ configure:1400: gcc -pipe -c   conftest.c 1>&5
+ configure:1429: checking for 64-bit integer type
+ configure:1442: gcc -pipe -c   conftest.c 1>&5
+ configure: In function `main':
+ configure:1438: `__int64' undeclared (first use in this function)
+ configure:1438: (Each undeclared identifier is reported only once
+ configure:1438: for each function it appears in.)
+ configure:1438: parse error before `value'
+ configure: failed program was:
+ #line 1435 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ __int64 value = (__int64) 0;
+ ; return 0; }
+ configure:1460: gcc -pipe -o conftest    conftest.c  1>&5
+ configure:1485: checking for struct dirent64
+ configure:1499: gcc -pipe -c   conftest.c 1>&5
+ configure:1493:24: sys/dirent.h: No such file or directory
+ configure: In function `main':
+ configure:1495: storage size of `p' isn't known
+ configure: failed program was:
+ #line 1491 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/dirent.h>
+ int main() {
+ struct dirent64 p;
+ ; return 0; }
+ configure:1520: checking for struct stat64
+ configure:1534: gcc -pipe -c   conftest.c 1>&5
+ configure:1555: checking for off64_t
+ configure:1569: gcc -pipe -c   conftest.c 1>&5
+ configure:1611: checking for Tcl configuration
+ configure:1684: checking for existence of /home/ludwig/tcltk/patch3/tcl8.4a4/unix/tclConfig.sh
+ configure:1742: checking if 64bit support is requested
+ configure:1762: checking if 64bit Sparc VIS support is requested
+ configure:1786: checking system version (for dynamic loading)
+ configure:1812: checking for dlopen in -ldl
+ configure:1831: gcc -pipe -o conftest    conftest.c -ldl   1>&5
+ configure:1875: checking for ar
+ configure:3012: checking for build with symbols
+ configure:3056: checking for sin
+ configure:3084: gcc -pipe -o conftest   -rdynamic conftest.c  1>&5
+ configure:3068: warning: conflicting types for built-in function `sin'
+ /tmp/ccOt9PPx.o: In function `main':
+ /tmp/ccOt9PPx.o(.text+0x7): undefined reference to `sin'
+ collect2: ld returned 1 exit status
+ configure: failed program was:
+ #line 3061 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char sin(); below.  */
+ #include <assert.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char sin();
+ 
+ int main() {
+ 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_sin) || defined (__stub___sin)
+ choke me
+ #else
+ sin();
+ #endif
+ 
+ ; return 0; }
+ configure:3105: checking for main in -lieee
+ configure:3120: gcc -pipe -o conftest   -rdynamic conftest.c -lieee   1>&5
+ configure:3201: checking stdlib.h
+ configure:3264: checking fd_set and sys/select
+ configure:3273: gcc -pipe -c   conftest.c 1>&5
+ configure:3317: checking for ANSI C header files
+ configure:3330: gcc -E  conftest.c >/dev/null 2>conftest.out
+ configure:3397: gcc -pipe -o conftest   -rdynamic conftest.c  1>&5
+ configure:3421: checking for mode_t
+ configure:3454: checking for pid_t
+ configure:3487: checking for size_t
+ configure:3520: checking for uid_t in sys/types.h
+ configure:3562: checking for sys/time.h
+ configure:3572: gcc -E  conftest.c >/dev/null 2>conftest.out
+ configure:3599: checking whether time.h and sys/time.h may both be included
+ configure:3613: gcc -pipe -c   conftest.c 1>&5
+ configure:3639: checking pw_gecos in struct pwd
+ configure:3648: gcc -pipe -c   conftest.c 1>&5
+ configure:3681: checking for X
+ configure:4107: checking for main in -lXbsd
+ configure:4122: gcc -pipe -o conftest   -rdynamic conftest.c -lXbsd   1>&5
+ /usr/bin/ld: cannot find -lXbsd
+ collect2: ld returned 1 exit status
+ configure: failed program was:
+ #line 4115 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ main()
+ ; return 0; }
+ configure:4145: checking for connect
+ configure:4173: gcc -pipe -o conftest   -rdynamic conftest.c  1>&5
+ configure:4286: checking for gethostbyname
+ configure:4314: gcc -pipe -o conftest   -rdynamic conftest.c  1>&5
+ configure:4431: checking for sin
+ configure:4480: checking for main in -lieee
+ configure:4522: checking whether char is unsigned
+ configure:4594: checking for strtod
+ configure:4622: gcc -pipe -o conftest   -rdynamic conftest.c  1>&5
+ configure:4644: checking for Solaris2.4/Tru64 strtod bugs
+ configure:4669: gcc -pipe -o conftest   -rdynamic conftest.c  1>&5
+ configure:4701: checking how to build libraries
diff -c -P -r orig/tk8.4a4/unix/config.status patch3/tk8.4a4/unix/config.status
*** orig/tk8.4a4/unix/config.status	Thu Jan  1 01:00:00 1970
--- patch3/tk8.4a4/unix/config.status	Fri Jun 21 07:33:46 2002
***************
*** 0 ****
--- 1,208 ----
+ #! /bin/sh
+ # Generated automatically by configure.
+ # Run this file to recreate the current configuration.
+ # This directory was configured as follows,
+ # on host localhost.localdomain:
+ #
+ # ./configure 
+ #
+ # Compiler output produced by configure, useful for debugging
+ # configure, is in ./config.log if it exists.
+ 
+ ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
+ for ac_option
+ do
+   case "$ac_option" in
+   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+     echo "running ${CONFIG_SHELL-/bin/sh} ./configure  --no-create --no-recursion"
+     exec ${CONFIG_SHELL-/bin/sh} ./configure  --no-create --no-recursion ;;
+   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+     echo "./config.status generated by autoconf version 2.13"
+     exit 0 ;;
+   -help | --help | --hel | --he | --h)
+     echo "$ac_cs_usage"; exit 0 ;;
+   *) echo "$ac_cs_usage"; exit 1 ;;
+   esac
+ done
+ 
+ ac_given_srcdir=/home/ludwig/tcltk/patch3/tk8.4a4/unix
+ 
+ trap 'rm -fr Makefile tkConfig.sh conftest*; exit 1' 1 2 15
+ 
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
+  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+ 
+ 
+ s%@SHELL@%/bin/sh%g
+ s%@CFLAGS@%%g
+ s%@CPPFLAGS@%%g
+ s%@CXXFLAGS@%%g
+ s%@FFLAGS@%%g
+ s%@DEFS@% -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 %g
+ s%@LDFLAGS@%-rdynamic%g
+ s%@LIBS@%%g
+ s%@exec_prefix@%/usr/local%g
+ s%@prefix@%/usr/local%g
+ s%@program_transform_name@%s,x,x,%g
+ s%@bindir@%${exec_prefix}/bin%g
+ s%@sbindir@%${exec_prefix}/sbin%g
+ s%@libexecdir@%${exec_prefix}/libexec%g
+ s%@datadir@%${prefix}/share%g
+ s%@sysconfdir@%${prefix}/etc%g
+ s%@sharedstatedir@%${prefix}/com%g
+ s%@localstatedir@%${prefix}/var%g
+ s%@libdir@%/usr/local/lib%g
+ s%@includedir@%${prefix}/include%g
+ s%@oldincludedir@%/usr/include%g
+ s%@infodir@%${prefix}/info%g
+ s%@mandir@%${prefix}/man%g
+ s%@CC@%gcc -pipe%g
+ s%@RANLIB@%:%g
+ s%@CPP@%gcc -E%g
+ s%@TCL_THREADS@%0%g
+ s%@TCL_VERSION@%8.4%g
+ s%@TCL_BIN_DIR@%/home/ludwig/tcltk/patch3/tcl8.4a4/unix%g
+ s%@TCL_SRC_DIR@%/home/ludwig/tcltk/patch3/tcl8.4a4%g
+ s%@TCL_LIB_FILE@%libtcl8.4.so%g
+ s%@TCL_LIB_FLAG@%-ltcl8.4%g
+ s%@TCL_LIB_SPEC@%-L/home/ludwig/tcltk/patch3/tcl8.4a4/unix -ltcl8.4%g
+ s%@TCL_STUB_LIB_FILE@%libtclstub8.4.a%g
+ s%@TCL_STUB_LIB_FLAG@%-ltclstub8.4%g
+ s%@TCL_STUB_LIB_SPEC@%-L/home/ludwig/tcltk/patch3/tcl8.4a4/unix -ltclstub8.4%g
+ s%@AR@%ar%g
+ s%@DL_LIBS@%-ldl%g
+ s%@CFLAGS_DEBUG@%-g%g
+ s%@CFLAGS_OPTIMIZE@%-O -D__NO_STRING_INLINES -D__NO_MATH_INLINES%g
+ s%@CFLAGS_WARNING@%-Wall -Wconversion -Wno-implicit-int%g
+ s%@TK_VERSION@%8.4%g
+ s%@TK_MAJOR_VERSION@%8%g
+ s%@TK_MINOR_VERSION@%4%g
+ s%@TK_PATCH_LEVEL@%a4%g
+ s%@TK_DBGX@%%g
+ s%@TK_STUB_LIB_FILE@%libtkstub8.4.a%g
+ s%@TK_STUB_LIB_FLAG@%-ltkstub8.4%g
+ s%@TK_BUILD_STUB_LIB_SPEC@%-L/home/ludwig/tcltk/patch3/tk8.4a4/unix -ltkstub8.4%g
+ s%@TK_STUB_LIB_SPEC@%-L/usr/local/lib -ltkstub8.4%g
+ s%@TK_BUILD_STUB_LIB_PATH@%/home/ludwig/tcltk/patch3/tk8.4a4/unix/libtkstub8.4.a%g
+ s%@TK_STUB_LIB_PATH@%/usr/local/lib/libtkstub8.4.a%g
+ s%@MAKE_STUB_LIB@%${STLIB_LD} $@ ${STUB_LIB_OBJS}%g
+ s%@TK_STUB_FLAGS@%%g
+ s%@TK_BUILD_EXP_FILE@%%g
+ s%@TK_EXP_FILE@%%g
+ s%@TCL_STUB_FLAGS@%-DUSE_TCL_STUBS%g
+ s%@CFLAGS_DEFAULT@%$(CFLAGS_OPTIMIZE)%g
+ s%@LDFLAGS_DEFAULT@%$(LDFLAGS_OPTIMIZE)%g
+ s%@LDFLAGS_DEBUG@%%g
+ s%@LDFLAGS_OPTIMIZE@%%g
+ s%@EXTRA_CFLAGS@%%g
+ s%@MATH_LIBS@%-lieee -lm%g
+ s%@MAKE_LIB@%${SHLIB_LD} -o $@ ${OBJS} $(TK_LD_SEARCH_FLAGS) ${TCL_STUB_LIB_SPEC} ${SHLIB_LD_LIBS}%g
+ s%@SHLIB_CFLAGS@%-fPIC%g
+ s%@TK_SHLIB_CFLAGS@%-fPIC%g
+ s%@STLIB_LD@%${AR} cr%g
+ s%@SHLIB_LD@%gcc -pipe -shared%g
+ s%@SHLIB_LD_LIBS@%${LIBS}%g
+ s%@SHLIB_SUFFIX@%.so%g
+ s%@SHLIB_VERSION@%%g
+ s%@TK_BUILD_LIB_SPEC@%-L/home/ludwig/tcltk/patch3/tk8.4a4/unix -ltk8.4%g
+ s%@TK_CC_SEARCH_FLAGS@%-Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/X11R6/lib%g
+ s%@TK_LD_SEARCH_FLAGS@%-Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/X11R6/lib%g
+ s%@TK_LIB_FILE@%libtk8.4.so%g
+ s%@TK_LIB_FLAG@%-ltk8.4%g
+ s%@TK_LIB_SPEC@%-L/usr/local/lib -ltk8.4%g
+ s%@TK_SRC_DIR@%/home/ludwig/tcltk/patch3/tk8.4a4%g
+ s%@XINCLUDES@%-I/usr/X11R6/include%g
+ s%@XLIBSW@%-L/usr/X11R6/lib -lX11%g
+ s%@TK_SHARED_BUILD@%1%g
+ s%@LOCALES@%de en es fr%g
+ 
+ CEOF
+ 
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ ac_file=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=""
+ while $ac_more_lines; do
+   if test $ac_beg -gt 1; then
+     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+   else
+     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+   fi
+   if test ! -s conftest.s$ac_file; then
+     ac_more_lines=false
+     rm -f conftest.s$ac_file
+   else
+     if test -z "$ac_sed_cmds"; then
+       ac_sed_cmds="sed -f conftest.s$ac_file"
+     else
+       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+     fi
+     ac_file=`expr $ac_file + 1`
+     ac_beg=$ac_end
+     ac_end=`expr $ac_end + $ac_max_sed_cmds`
+   fi
+ done
+ if test -z "$ac_sed_cmds"; then
+   ac_sed_cmds=cat
+ fi
+ 
+ CONFIG_FILES=${CONFIG_FILES-"Makefile tkConfig.sh"}
+ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+   case "$ac_file" in
+   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+   *) ac_file_in="${ac_file}.in" ;;
+   esac
+ 
+   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+ 
+   # Remove last slash and all that follows it.  Not all systems have dirname.
+   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+     # The file is in a subdirectory.
+     test ! -d "$ac_dir" && mkdir "$ac_dir"
+     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+     # A "../" for each directory in $ac_dir_suffix.
+     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+   else
+     ac_dir_suffix= ac_dots=
+   fi
+ 
+   case "$ac_given_srcdir" in
+   .)  srcdir=.
+       if test -z "$ac_dots"; then top_srcdir=.
+       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+   *) # Relative path.
+     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+     top_srcdir="$ac_dots$ac_given_srcdir" ;;
+   esac
+ 
+ 
+   echo creating "$ac_file"
+   rm -f "$ac_file"
+   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+   case "$ac_file" in
+   *Makefile*) ac_comsub="1i\\
+ # $configure_input" ;;
+   *) ac_comsub= ;;
+   esac
+ 
+   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+   sed -e "$ac_comsub
+ s%@configure_input@%$configure_input%g
+ s%@srcdir@%$srcdir%g
+ s%@top_srcdir@%$top_srcdir%g
+ " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+ fi; done
+ rm -f conftest.s*
+ 
+ 
+ 
+ exit 0
diff -c -P -r orig/tk8.4a4/unix/tkConfig.sh patch3/tk8.4a4/unix/tkConfig.sh
*** orig/tk8.4a4/unix/tkConfig.sh	Thu Jan  1 01:00:00 1970
--- patch3/tk8.4a4/unix/tkConfig.sh	Fri Jun 21 07:33:51 2002
***************
*** 0 ****
--- 1,93 ----
+ # tkConfig.sh --
+ # 
+ # This shell script (for sh) is generated automatically by Tk's
+ # configure script.  It will create shell variables for most of
+ # the configuration options discovered by the configure script.
+ # This script is intended to be included by the configure scripts
+ # for Tk extensions so that they don't have to figure this all
+ # out for themselves.  This file does not duplicate information
+ # already provided by tclConfig.sh, so you may need to use that
+ # file in addition to this one.
+ #
+ # The information in this file is specific to a single platform.
+ #
+ # RCS: @(#) $Id: tkConfig.sh.in,v 1.7 1999/03/10 07:04:45 stanton Exp $
+ 
+ # Tk's version number.
+ TK_VERSION='8.4'
+ TK_MAJOR_VERSION='8'
+ TK_MINOR_VERSION='4'
+ TK_PATCH_LEVEL='a4'
+ 
+ # -D flags for use with the C compiler.
+ TK_DEFS=' -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 '
+ 
+ # Flag, 1: we built a shared lib, 0 we didn't
+ TK_SHARED_BUILD=1
+ 
+ # This indicates if Tk was build with debugging symbols
+ TK_DBGX=
+ 
+ # The name of the Tk library (may be either a .a file or a shared library):
+ TK_LIB_FILE='libtk8.4.so'
+ 
+ # Additional libraries to use when linking Tk.
+ TK_LIBS='-L/usr/X11R6/lib -lX11 -ldl  -lieee -lm'
+ 
+ # Top-level directory in which Tcl's platform-independent files are
+ # installed.
+ TK_PREFIX='/usr/local'
+ 
+ # Top-level directory in which Tcl's platform-specific files (e.g.
+ # executables) are installed.
+ TK_EXEC_PREFIX='/usr/local'
+ 
+ # -I switch(es) to use to make all of the X11 include files accessible:
+ TK_XINCLUDES='-I/usr/X11R6/include'
+ 
+ # Linker switch(es) to use to link with the X11 library archive.
+ TK_XLIBSW='-L/usr/X11R6/lib -lX11'
+ 
+ # -l flag to pass to the linker to pick up the Tcl library
+ TK_LIB_FLAG='-ltk8.4'
+ 
+ # String to pass to linker to pick up the Tk library from its
+ # build directory.
+ TK_BUILD_LIB_SPEC='-L/home/ludwig/tcltk/patch3/tk8.4a4/unix -ltk8.4'
+ 
+ # String to pass to linker to pick up the Tk library from its
+ # installed directory.
+ TK_LIB_SPEC='-L/usr/local/lib -ltk8.4'
+ 
+ # Location of the top-level source directory from which Tk was built.
+ # This is the directory that contains a README file as well as
+ # subdirectories such as generic, unix, etc.  If Tk was compiled in a
+ # different place than the directory containing the source files, this
+ # points to the location of the sources, not the location where Tk was
+ # compiled.
+ TK_SRC_DIR='/home/ludwig/tcltk/patch3/tk8.4a4'
+ 
+ # Needed if you want to make a 'fat' shared library library
+ # containing tk objects or link a different wish.
+ TK_CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/X11R6/lib'
+ TK_LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/X11R6/lib'
+ 
+ # The name of the Tk stub library (.a):
+ TK_STUB_LIB_FILE='libtkstub8.4.a'
+ 
+ # -l flag to pass to the linker to pick up the Tk stub library
+ TK_STUB_LIB_FLAG='-ltkstub8.4'
+ 
+ # String to pass to linker to pick up the Tk stub library from its
+ # build directory.
+ TK_BUILD_STUB_LIB_SPEC='-L/home/ludwig/tcltk/patch3/tk8.4a4/unix -ltkstub8.4'
+ 
+ # String to pass to linker to pick up the Tk stub library from its
+ # installed directory.
+ TK_STUB_LIB_SPEC='-L/usr/local/lib -ltkstub8.4'
+ 
+ # Path to the Tk stub library in the build directory.
+ TK_BUILD_STUB_LIB_PATH='/home/ludwig/tcltk/patch3/tk8.4a4/unix/libtkstub8.4.a'
+ 
+ # Path to the Tk stub library in the install directory.
+ TK_STUB_LIB_PATH='/usr/local/lib/libtkstub8.4.a'
diff -c -P -r orig/tk8.4a4/win/Makefile.in patch3/tk8.4a4/win/Makefile.in
*** orig/tk8.4a4/win/Makefile.in	Wed Mar  6 09:51:52 2002
--- patch3/tk8.4a4/win/Makefile.in	Fri Jun 21 07:18:36 2002
***************
*** 339,344 ****
--- 339,345 ----
  	tkTextTag.$(OBJEXT) \
  	tkTextWind.$(OBJEXT) \
  	tkTrig.$(OBJEXT) \
+ 	tkUndo.$(OBJEXT) \
  	tkUtil.$(OBJEXT) \
  	tkVisual.$(OBJEXT) \
  	tkStubInit.$(OBJEXT) \