summaryrefslogtreecommitdiffstats
path: root/source/xap/xv/xv-3.10a.patch
blob: 0bf8210f231602f9630172e671be0e424bf93160 (plain) (blame)
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
Installation Instructions:

This patch will update XV 3.10 to 3.10a.

Copy this file into the top-level XV source directory, and apply it using:
   patch -p0 <xv-3.10a.patch

Then do a 'make clean', followed by a 'make' (or 'make install').

Note:  if you don't have a copy of the 'patch' utility, you can get one
       via anonymous ftp on ftp.cis.upenn.edu, in pub/xv.  Of course,
       once you're there, it may be easier to just pick up the latest copy
       of the XV distribution, rather than try to patch your existing copy,
       but hey, that's up to you...



diff -c -r ../xv-3.10/CHANGELOG ./CHANGELOG
*** ../xv-3.10/CHANGELOG	Thu Dec 22 14:18:39 1994
--- ./CHANGELOG	Mon Jan 23 18:21:55 1995
***************
*** 1,12 ****
  Revision History
  ----------------
  
! Make_xv.com in vms directory wouldn't build xvxpm.c or xvfits.c (and thus, XV!)
! 				(Rick Dyson  (dyson@sunfish.Physics.UIowa.Edu))
  
  
! XV 3.10 Public Release  12/21/94
! -------------------------
  Bug Fix:  Greyscale downsampling bug in JPEG code fixed.
  				(Tom Lane  (tgl@sss.pgh.pa.us))
  
--- 1,84 ----
  Revision History
  ----------------
  
! XV 3.10a bug-fix release  12/29/94
! ----------------------------------
! Bug Fix:  Problems loading JPEG files in 8-bit mode on some systems.
! 				(Rick Richardson (rick@digibd.com))
! 				(Chad R. Larson  (chad@anasazi.com))
  
+ Bug Fix:  Added '-pkludge' command line option and 'popupKludge' boolean 
+ 	resource.  If true, selects the 'old-style' pop-up window positioning
+ 	code.  The various popup windows should appear with the Ok button
+ 	(or whatever) centered around the cursor.  If the windows routinely
+ 	pop up slightly off-center from the cursor, try turning this on.
  
! Bug Fix:  '3' and 'Q' characters in the Text Annotation character set were
! 	boogered up...		(Sidik Isani (si@acpub.duke.edu))
! 
! Bug Fix:  '-iconic' option wasn't working.
! 				(David Pesetsky  (iedsp@agt.gmeds.com))
! 
! Bug Fix:  Didn't properly read greyscale RLE files.
! 				(Robert Cunningham  (rkc@xn.ll.mit.edu))
! 
! Bug Fix:  'AutoCrop' on 24-bit images could produce 0x0 images.  A problem!
! 				(Leon Shaner  (leon@mtu.edu))
! 
! Bug Fix:  GIF reader would blow up if there were multiple comments.
! 				(Markus Gyger  (mgyger@itr.ch))
! 
! Bug Fix:  Behavior under virtual window managers may be improved.
! 				(steveg@pa.dec.com)
! 
! Enhancement:  Text in 'temperature gauge' (during slow operations) is now
! 	XOR'd on, so it isn't obscured by the filled area of the gauge.
! 				(Jerry Whelan  (jerryw@bnl.gov))
! 
! Enhancement:  man page for vdcomp written
! 				(James Ralston Crawford  (qralston+@pitt.edu))
! 
! Enhancement:  PCX code can now read 24-bit PCX files.
! 				(Dave Cohrs  (cohrs@legato.com))
! 
! Portability:  Patch for Linux	(David Hankins  (dhankins@oz.net))
! 
! Portability:  Patches for ISC 4.0 Interactive/SunSoft Unix
! 				(Jack Bailey  (jjb@jagware.bcc.com))
! 
! Portability:  Compiler noise (from Sun's Professional C compiler) cleaned up.
! 				(John Fritz  (jfritz@bpo-ess.ceco.com))
! 
! Portability:  Many nits picked by Pyramid compiler
! 				(Chad R. Larson  (chad@anasazi.com))
! 
! Portability:  Some malloc's in xvfits.c needed casting.
! 				(Bill Silvert  (sysop@biome.bio.ns.ca))
! 
! Portability:  Further VMS problems solved.
! 				(Rick Dyson (dyson@sunfish.physics.uiowa.edu))
! 
! Portability:  select() on HP-UX 9.x expects (int *) instead of (fd_set *)
! 				(Richard Allen  (ra@os.is))
! 
! Portability:  Removed 'const' from second parameter in decl. for decode_run()
! 	in tif_fax3.c.		(Glenn Spargo  (gspargo@ctron.com))
! 
! Portability:  Added 'fcntl.h' to xv.h, as some systems may not have O_RDONLY
! 	declared elsewhere.	(Mitchell Blank  (blankm@cae.wisc.edu))
! 
! Portability:  Font selection strings in xv.c didn't have enough '*'s in them.
! 	Would fail on some X servers.
! 				(Rick Richardson  (rick@digibd.com))
! 
! Second XV 3.10 Public Release  12/22/94
! ----------------------------------------
! Bug Fix:  Make_xv.com in vms directory wouldn't build xvxpm.c or xvfits.c 
! 	(and thus, XV!)		(Rick Dyson  (dyson@sunfish.Physics.UIowa.Edu))
! 
! 
! Initial XV 3.10 Public Release  12/21/94
! ----------------------------------------
  Bug Fix:  Greyscale downsampling bug in JPEG code fixed.
  				(Tom Lane  (tgl@sss.pgh.pa.us))
  
diff -c -r ../xv-3.10/Imakefile ./Imakefile
*** ../xv-3.10/Imakefile	Thu Dec 22 14:12:21 1994
--- ./Imakefile	Fri Jan 13 15:24:01 1995
***************
*** 264,269 ****
--- 264,270 ----
  InstallManPageLong(docs/bggen,$(MANDIR),bggen)
  InstallManPageLong(docs/xcmap,$(MANDIR),xcmap)
  InstallManPageLong(docs/xvp2p,$(MANDIR),xvpictoppm)
+ InstallManPageLong(docs/vdcomp,$(MANDIR),vdcomp)
  
  tar:
  	tar cf xv.tar Makefile* Imakefile *.c *.h bits docs \

diff -c -r ../xv-3.10/Makefile ./Makefile
*** ../xv-3.10/Makefile	Thu Jan 19 13:40:09 1995
--- ./Makefile	Mon Jan 23 15:20:54 1995
***************
*** 92,99 ****
--- 92,110 ----
  #MCHN= -Dhpux -D_HPUX_SOURCE
  # To use old HP compilers (HPUX 7.0 or so), you may need
  #MCHN= -Dhpux -D_HPUX_SOURCE +Ns4000
+ #
+ # also, if you're using HP's compiler, add '-Aa' to whichever of those
+ # two lines you're using, to turn on ANSI C mode.  Or so I'm told.
+ #
+ # note:  You may need to add '-I/usr/include/X11R5' (or R6, or whatever)
+ # to whichever of those lines you used, as HP tends to store their X11
+ # include files in a non-standard place...
  
  
+ ### for LINUX, uncomment the following line
+ #MCHN = -DLINUX
+ 
+ 
  # For SCO 1.1 (UNIX 3.2v2) machines, uncomment the following:
  #MCHN = -Dsco -DPOSIX
  #
***************
*** 111,120 ****
  #
  #MCHN = -q extensions=pcc_c -D__UMAXV__ -L/usr2/usr/lib/X11 -DSVR4
  
! # For Interactive Unix System machines 
! # you'll want to modify add the following options to the end of the 
! # LIBS definition (below) (or so I'm told)
! #     -lnsl_s -linet -lgen
  
  
  #----------'Roll Your Own' Options----------
--- 122,129 ----
  #
  #MCHN = -q extensions=pcc_c -D__UMAXV__ -L/usr2/usr/lib/X11 -DSVR4
  
! # For Interactive/SunSoft Unix ISC 4.0  (whatever *that* is!)
! #MCHN = -DSVR4 -DBSDTYPES
  
  
  #----------'Roll Your Own' Options----------
***************
*** 233,238 ****
--- 242,248 ----
  	cp docs/bggen.man  $(MANDIR)/bggen.$(MANSUF)
  	cp docs/xcmap.man  $(MANDIR)/xcmap.$(MANSUF)
  	cp docs/xvp2p.man  $(MANDIR)/xvpictoppm.$(MANSUF)
+ 	cp docs/vdcomp.man $(MANDIR)/vdcomp.$(MANSUF)
  	cp docs/xvdocs.ps* $(LIBDIR)
  
  tar:

diff -c -r ../xv-3.10/Makefile.std ./Makefile.std
*** ../xv-3.10/Makefile.std	Thu Dec 22 14:12:21 1994
--- ./Makefile.std	Mon Jan 23 20:06:26 1995
***************
*** 92,99 ****
--- 92,110 ----
  #MCHN= -Dhpux -D_HPUX_SOURCE
  # To use old HP compilers (HPUX 7.0 or so), you may need
  #MCHN= -Dhpux -D_HPUX_SOURCE +Ns4000
+ #
+ # also, if you're using HP's compiler, add '-Aa' to whichever of those
+ # two lines you're using, to turn on ANSI C mode.  Or so I'm told.
+ #
+ # note:  You may need to add '-I/usr/include/X11R5' (or R6, or whatever)
+ # to whichever of those lines you used, as HP tends to store their X11
+ # include files in a non-standard place...
  
  
+ ### for LINUX, uncomment the following line
+ #MCHN = -DLINUX
+ 
+ 
  # For SCO 1.1 (UNIX 3.2v2) machines, uncomment the following:
  #MCHN = -Dsco -DPOSIX
  #
***************
*** 111,120 ****
  #
  #MCHN = -q extensions=pcc_c -D__UMAXV__ -L/usr2/usr/lib/X11 -DSVR4
  
! # For Interactive Unix System machines 
! # you'll want to modify add the following options to the end of the 
! # LIBS definition (below) (or so I'm told)
! #     -lnsl_s -linet -lgen
  
  
  #----------'Roll Your Own' Options----------
--- 122,129 ----
  #
  #MCHN = -q extensions=pcc_c -D__UMAXV__ -L/usr2/usr/lib/X11 -DSVR4
  
! # For Interactive/SunSoft Unix ISC 4.0  (whatever *that* is!)
! #MCHN = -DSVR4 -DBSDTYPES
  
  
  #----------'Roll Your Own' Options----------
***************
*** 233,238 ****
--- 242,248 ----
  	cp docs/bggen.man  $(MANDIR)/bggen.$(MANSUF)
  	cp docs/xcmap.man  $(MANDIR)/xcmap.$(MANSUF)
  	cp docs/xvp2p.man  $(MANDIR)/xvpictoppm.$(MANSUF)
+ 	cp docs/vdcomp.man $(MANDIR)/vdcomp.$(MANSUF)
  	cp docs/xvdocs.ps* $(LIBDIR)
  
  tar:

diff -c -r ../xv-3.10/xcmap.c ./xcmap.c
*** ../xv-3.10/xcmap.c	Thu Dec 22 14:12:20 1994
--- ./xcmap.c	Tue Jan 03 16:14:52 1995
***************
*** 102,108 ****
        continue;
      }
      
!     strind = index(argv[i], ':');		/* old-style display */
      if(strind != NULL) {
        display = argv[i];
        continue;
--- 102,108 ----
        continue;
      }
      
!     strind = (char *) index(argv[i], ':');	/* old-style display */
      if(strind != NULL) {
        display = argv[i];
        continue;

diff -c -r ../xv-3.10/xv.c ./xv.c
*** ../xv-3.10/xv.c	Thu Dec 22 14:12:15 1994
--- ./xv.c	Thu Jan 19 13:08:43 1995
***************
*** 25,33 ****
  
  
  /* program needs one of the following fonts.  Trys them in ascending order */
! #define FONT1 "-*-lucida-medium-r-*-*-12-*"
! #define FONT2 "-*-helvetica-medium-r-*-*-12-*"
! #define FONT3 "-*-helvetica-medium-r-*-*-11-*"
  #define FONT4 "6x13"
  #define FONT5 "fixed"
  
--- 25,33 ----
  
  
  /* program needs one of the following fonts.  Trys them in ascending order */
! #define FONT1 "-*-lucida-medium-r-*-*-12-*-*-*-*-*-*-*"
! #define FONT2 "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*"
! #define FONT3 "-*-helvetica-medium-r-*-*-11-*-*-*-*-*-*-*"
  #define FONT4 "6x13"
  #define FONT5 "fixed"
  
***************
*** 218,224 ****
    fgstr = "#000000";  bgstr = "#B2C0DC";
    histr = "#C6D5E2";  lostr = "#8B99B5";
  
!   cmd = rindex(argv[0],'/');
    if (!cmd) cmd = argv[0]; else cmd++;
  
    tmpstr = (char *) getenv("TMPDIR");
--- 218,224 ----
    fgstr = "#000000";  bgstr = "#B2C0DC";
    histr = "#C6D5E2";  lostr = "#8B99B5";
  
!   cmd = (char *) rindex(argv[0],'/');
    if (!cmd) cmd = argv[0]; else cmd++;
  
    tmpstr = (char *) getenv("TMPDIR");
***************
*** 261,267 ****
    xorMasks[6] = 0xc4c4c4c5;
    xorMasks[7] = 0xffffffff;
  
!   kludge_offx = kludge_offy = 0;
  
    conv24 = CONV24_SLOW;  /* use 'slow' algorithm by default */
  
--- 261,267 ----
    xorMasks[6] = 0xc4c4c4c5;
    xorMasks[7] = 0xffffffff;
  
!   kludge_offx = kludge_offy = winCtrPosKludge = 0;
  
    conv24 = CONV24_SLOW;  /* use 'slow' algorithm by default */
  
***************
*** 1107,1112 ****
--- 1107,1113 ----
    if (rd_flag("nostat"))         nostat      = def_int;
    if (rd_flag("ownCmap"))        owncmap     = def_int;
    if (rd_flag("perfect"))        perfect     = def_int;
+   if (rd_flag("popupKludge"))    winCtrPosKludge = def_int;
    if (rd_str ("print"))          strncpy(printCmd, def_str, 
  					 (size_t) PRINTCMDLEN);
    if (rd_flag("pscompress"))     pscomp      = def_int;
***************
*** 1361,1366 ****
--- 1362,1368 ----
      else if (!argcmp(argv[i],"-nostat",    4,1,&nostat));     /* nostat */
      else if (!argcmp(argv[i],"-owncmap",   2,1,&owncmap));    /* own cmap */
      else if (!argcmp(argv[i],"-perfect",   3,1,&perfect));    /* -perfect */
+     else if (!argcmp(argv[i],"-pkludge",   3,1,&winCtrPosKludge));
      else if (!argcmp(argv[i],"-poll",      3,1,&polling));    /* chk mod? */
  
      else if (!argcmp(argv[i],"-preset",3,0,&pm))      /* preset */
***************
*** 1615,1620 ****
--- 1617,1623 ----
    printoption("[-/+nostat]");
    printoption("[-/+owncmap]");
    printoption("[-/+perfect]");
+   printoption("[-/+pkludge]");
    printoption("[-/+poll]");
    printoption("[-preset #]");
    printoption("[-quick24]");
***************
*** 1683,1689 ****
  
    int i;
  
!   if (strlen(a1) < minlen || strlen(a2) < minlen) return 1;
    if (strlen(a1) > strlen(a2)) return 1;
  
    if (strncmp(a1+1, a2+1, strlen(a1)-1)) return 1;
--- 1686,1693 ----
  
    int i;
  
!   if ((strlen(a1) < (size_t) minlen) || (strlen(a2) < (size_t) minlen))
!     return 1;
    if (strlen(a1) > strlen(a2)) return 1;
  
    if (strncmp(a1+1, a2+1, strlen(a1)-1)) return 1;
***************
*** 1860,1866 ****
  
  
    /* chop off trailing ".Z", ".z", or ".gz" from displayed basefname, if any */
!   if (strlen(basefname)>2 && strcmp(basefname+strlen(basefname)-2,".Z")==0)
      basefname[strlen(basefname)-2]='\0';
    else {
  #ifdef GUNZIP
--- 1864,1871 ----
  
  
    /* chop off trailing ".Z", ".z", or ".gz" from displayed basefname, if any */
!   if (strlen(basefname) > (size_t) 2     && 
!       strcmp(basefname+strlen(basefname)-2,".Z")==0)
      basefname[strlen(basefname)-2]='\0';
    else {
  #ifdef GUNZIP
***************
*** 2698,2705 ****
       to what it was.  necessary because uncompress doesn't handle files
       that don't end with '.Z' */
  
!   if (strlen(name)>=2 && strcmp(name + strlen(name)-2,".Z")!=0 &&
!                          strcmp(name + strlen(name)-2,".z")!=0) {
      strcpy(namez, name);
      strcat(namez,".Z");
  
--- 2703,2711 ----
       to what it was.  necessary because uncompress doesn't handle files
       that don't end with '.Z' */
  
!   if (strlen(name) >= (size_t) 2            && 
!       strcmp(name + strlen(name)-2,".Z")!=0 &&
!       strcmp(name + strlen(name)-2,".z")!=0) {
      strcpy(namez, name);
      strcat(namez,".Z");
  
***************
*** 2890,2896 ****
    char fullcmd[512], tmpname[64], str[512];
    int i;
  
!   if (!cmd || strlen(cmd)<2) return 1;
  
    sprintf(tmpname,"%s/xvXXXXXX", tmpdir);
    mktemp(tmpname);
--- 2896,2902 ----
    char fullcmd[512], tmpname[64], str[512];
    int i;
  
!   if (!cmd || (strlen(cmd) < (size_t) 2)) return 1;
  
    sprintf(tmpname,"%s/xvXXXXXX", tmpdir);
    mktemp(tmpname);
***************
*** 3270,3276 ****
  
    xwmh.icon_pixmap = iconPix;  
    xwmh.icon_mask   = iconmask;  
!   xwmh.flags |= ( IconPixmapHint | IconMaskHint) ;
  
  
    if (startIconic && firstTime) {
--- 3276,3282 ----
  
    xwmh.icon_pixmap = iconPix;  
    xwmh.icon_mask   = iconmask;  
!   xwmh.flags |= (IconPixmapHint | IconMaskHint);
  
  
    if (startIconic && firstTime) {
***************
*** 3787,3793 ****
--- 3793,3802 ----
  		     | EnterWindowMask | LeaveWindowMask );
  
  	StoreDeleteWindowProp(mainW);
+ 	XFlush(theDisp);
  	XMapWindow(theDisp,mainW);
+ 	XFlush(theDisp);
+ 	if (startIconic) sleep(2);   /* give it time to get the window up...*/
        }
      }
  
diff -c -r ../xv-3.10/xv.h ./xv.h
*** ../xv-3.10/xv.h	Thu Dec 22 14:12:15 1994
--- ./xv.h	Mon Jan 23 15:22:23 1995
***************
*** 8,15 ****
  #include "config.h"
  
  
! #define REVDATE   "Version 3.10  Rev: 12/16/94"
! #define VERSTR    "3.10"
  
  /*
   * uncomment the following, and modify for your site, but only if you've
--- 8,15 ----
  #include "config.h"
  
  
! #define REVDATE   "Version 3.10a  Rev: 12/29/94"
! #define VERSTR    "3.10a"
  
  /*
   * uncomment the following, and modify for your site, but only if you've
***************
*** 62,67 ****
--- 62,74 ----
  #endif
  
  
+ #ifdef LINUX
+ #  ifndef _LINUX_LIMITS_H
+ #    include <linux/limits.h>
+ #  endif
+ #endif
+ 
+ 
  #include <X11/Xos.h>     /* need type declarations immediately */
  
  /*********************************************************/
***************
*** 198,203 ****
--- 205,217 ----
  #    include <limits.h>
  #  endif
  
+ /*** for select() call ***/
+ #  ifdef __hpux
+ #    define XV_FDTYPE (int *)
+ #  else
+ #    define XV_FDTYPE (fd_set *)
+ #  endif
+ 
  #endif  /* NEEDSTIME */
  
  
***************
*** 214,219 ****
--- 228,237 ----
  #      include <dirent.h>
  #    endif
  
+ #    if defined(SVR4) || defined(SYSV)
+ #      include <fcntl.h>
+ #    endif
+ 
  #    include <sys/param.h>
  #    include <sys/stat.h>
  
***************
*** 961,966 ****
--- 979,985 ----
  WHERE int           ch_offx,ch_offy; /* ChngAttr ofst for reparented windows */
  WHERE int           kludge_offx,     /* WM kludges for SetWindowPos routine */ 
                      kludge_offy;
+ WHERE int           winCtrPosKludge; /* kludge for popup positioning... */
  
  WHERE int            ignoreConfigs;  /* an evil kludge... */
  
diff -c -r ../xv-3.10/xv24to8.c ./xv24to8.c
*** ../xv-3.10/xv24to8.c	Thu Dec 22 14:12:15 1994
--- ./xv24to8.c	Fri Jan 13 14:49:21 1995
***************
*** 374,382 ****
  
  #define PPM_DEPTH(newp,p,oldmaxval,newmaxval) \
      PPM_ASSIGN( (newp), \
! 	        (int) PPM_GETR(p) * (newmaxval) / ((int)oldmaxval), \
! 	        (int) PPM_GETG(p) * (newmaxval) / ((int)oldmaxval), \
! 	        (int) PPM_GETB(p) * (newmaxval) / ((int)oldmaxval) )
  
  
  /* Luminance macro. */
--- 374,382 ----
  
  #define PPM_DEPTH(newp,p,oldmaxval,newmaxval) \
      PPM_ASSIGN( (newp), \
! 	        ((int) PPM_GETR(p)) * ((int)newmaxval) / ((int)oldmaxval), \
! 	        ((int) PPM_GETG(p)) * ((int)newmaxval) / ((int)oldmaxval), \
! 	        ((int) PPM_GETB(p)) * ((int)newmaxval) / ((int)oldmaxval) )
  
  
  /* Luminance macro. */

diff -c -r ../xv-3.10/xvbrowse.c ./xvbrowse.c
*** ../xv-3.10/xvbrowse.c	Thu Dec 22 14:12:20 1994
--- ./xvbrowse.c	Thu Jan 19 12:49:17 1995
***************
*** 20,26 ****
  #define NEEDSDIR
  #include "xv.h"
  
! #ifdef VMS
  typedef unsigned int mode_t;  /* file mode bits */
  #endif
  
--- 20,26 ----
  #define NEEDSDIR
  #include "xv.h"
  
! #if defined(VMS) || defined(isc)
  typedef unsigned int mode_t;  /* file mode bits */
  #endif
  
***************
*** 2579,2585 ****
    int rv;
  
    /* temporarily excise trailing '/' char from br->path */
!   if (strlen(br->path)>2 && br->path[strlen(br->path)-1] == '/')
      br->path[strlen(br->path)-1] = '\0';
  
    rv = chdir(br->path);
--- 2579,2585 ----
    int rv;
  
    /* temporarily excise trailing '/' char from br->path */
!   if ((strlen(br->path) > (size_t) 2) && br->path[strlen(br->path)-1] == '/')
      br->path[strlen(br->path)-1] = '\0';
  
    rv = chdir(br->path);
***************
*** 3544,3550 ****
    case RFT_PBM:      if (xv_strstr(pinfo.fullInfo, "raw")) strcat(str,"Raw ");
                       else strcat(str,"Ascii ");
      
!                      for (i=0; i<3 && strlen(pinfo.fullInfo)>3; i++) {
  		       str1[0] = pinfo.fullInfo[i];  str1[1] = '\0';
  		       strcat(str, str1);
  		     }
--- 3544,3550 ----
    case RFT_PBM:      if (xv_strstr(pinfo.fullInfo, "raw")) strcat(str,"Raw ");
                       else strcat(str,"Ascii ");
      
!                      for (i=0; i<3 && (strlen(pinfo.fullInfo)>(size_t)3); i++){
  		       str1[0] = pinfo.fullInfo[i];  str1[1] = '\0';
  		       strcat(str, str1);
  		     }
***************
*** 4521,4527 ****
  
    /* try to delete a thumbnail file, as well.  ignore errors */
    strcpy(buf1, name);          /* tmp1 = leading path of name */
!   tmp = rindex(buf1, '/');
    if (!tmp) strcpy(buf1,".");
    else *tmp = '\0';
    
--- 4521,4527 ----
  
    /* try to delete a thumbnail file, as well.  ignore errors */
    strcpy(buf1, name);          /* tmp1 = leading path of name */
!   tmp = (char *) rindex(buf1, '/');
    if (!tmp) strcpy(buf1,".");
    else *tmp = '\0';
    
diff -c -r ../xv-3.10/xvbutt.c ./xvbutt.c
*** ../xv-3.10/xvbutt.c	Thu Dec 22 14:12:16 1994
--- ./xvbutt.c	Tue Jan 03 16:19:51 1995
***************
*** 961,967 ****
  
      /* truncate at TAB, if any */
      strcpy(stbuf, str);
!     if ((str = index(stbuf, '\t')) != NULL) *str = '\0';
      str = stbuf;
  
      x1 = CENTERX(mfinfo, x + w/2, str);
--- 961,967 ----
  
      /* truncate at TAB, if any */
      strcpy(stbuf, str);
!     if ((str = (char *) index(stbuf, '\t')) != NULL) *str = '\0';
      str = stbuf;
  
      x1 = CENTERX(mfinfo, x + w/2, str);
***************
*** 1073,1079 ****
        char *sp, str[256];
  
        strcpy(str, mb->list[i]);
!       sp = index(str, '\t');
        j = StringWidth(sp+1);
        if (j>mtabwide) mtabwide = j;
  
--- 1073,1079 ----
        char *sp, str[256];
  
        strcpy(str, mb->list[i]);
!       sp = (char *) index(str, '\t');
        j = StringWidth(sp+1);
        if (j>mtabwide) mtabwide = j;
  
***************
*** 1139,1145 ****
    for (i=0; i<mb->nlist; i++) {
      char txtstr[256], *tabstr;
      strcpy(txtstr, mb->list[i]);
!     if ((tabstr = index(txtstr, '\t'))) {
        *tabstr = '\0';  tabstr++;
      }
  
--- 1139,1145 ----
    for (i=0; i<mb->nlist; i++) {
      char txtstr[256], *tabstr;
      strcpy(txtstr, mb->list[i]);
!     if ((tabstr = (char *) index(txtstr, '\t'))) {
        *tabstr = '\0';  tabstr++;
      }
  
diff -c -r ../xv-3.10/xvcolor.c ./xvcolor.c
*** ../xv-3.10/xvcolor.c	Thu Dec 22 14:12:17 1994
--- ./xvcolor.c	Fri Jan 06 14:29:23 1995
***************
*** 616,622 ****
  	    *foo = "No r/w cells available.  Using r/o color.";
  
  	tmp = GetISTR(ISTR_WARNING);
! 	if (strlen(tmp)>0) sprintf(tstr, "%s  %s", tmp, foo);
  	else sprintf(tstr, "%s", foo);
  	SetISTR(ISTR_WARNING,tstr);
  
--- 616,622 ----
  	    *foo = "No r/w cells available.  Using r/o color.";
  
  	tmp = GetISTR(ISTR_WARNING);
! 	if (strlen(tmp) > (size_t) 0) sprintf(tstr, "%s  %s", tmp, foo);
  	else sprintf(tstr, "%s", foo);
  	SetISTR(ISTR_WARNING,tstr);
  
***************
*** 790,799 ****
  }
  
  
! void xvFreeColors(dp, cm,pixels, npixels, planes)
       Display *dp;
       Colormap cm;
!      unsigned long pixels[];
       int npixels;
       unsigned long planes;
  {
--- 790,799 ----
  }
  
  
! void xvFreeColors(dp, cm, pixels, npixels, planes)
       Display *dp;
       Colormap cm;
!      unsigned long *pixels;
       int npixels;
       unsigned long planes;
  {

diff -c -r ../xv-3.10/xvcut.c ./xvcut.c
*** ../xv-3.10/xvcut.c	Thu Dec 22 14:12:21 1994
--- ./xvcut.c	Fri Jan 13 14:55:48 1995
***************
*** 760,766 ****
        len |= ((int) data[2])<<16;
        len |= ((int) data[3])<<24;
  
!       XFree(data);
  
        /* read the rest of the data (len bytes) */
        i = XGetWindowProperty(theDisp, rootW, clipAtom, 1L, 
--- 760,766 ----
        len |= ((int) data[2])<<16;
        len |= ((int) data[3])<<24;
  
!       XFree((void *) data);
  
        /* read the rest of the data (len bytes) */
        i = XGetWindowProperty(theDisp, rootW, clipAtom, 1L, 
***************
*** 774,780 ****
  
  	data1 = (byte *) malloc((size_t) len);
  	if (!data1) {
! 	  XFree(data);
  	  ErrPopUp("Insufficient memory to retrieve clipboard!", "\nShucks!");
  	  return (byte *) NULL;
  	}
--- 774,780 ----
  
  	data1 = (byte *) malloc((size_t) len);
  	if (!data1) {
! 	  XFree((void *) data);
  	  ErrPopUp("Insufficient memory to retrieve clipboard!", "\nShucks!");
  	  return (byte *) NULL;
  	}
***************
*** 785,791 ****
  	data1[3] = (len>>24) & 0xff;
  	xvbcopy((char *) data, (char *) data1+4, (size_t) len-4);
  
! 	XFree(data);
  	return data1;
        }
      }
--- 785,791 ----
  	data1[3] = (len>>24) & 0xff;
  	xvbcopy((char *) data, (char *) data1+4, (size_t) len-4);
  
! 	XFree((void *) data);
  	return data1;
        }
      }

diff -c -r ../xv-3.10/xvdial.c ./xvdial.c
*** ../xv-3.10/xvdial.c	Thu Dec 22 14:12:17 1994
--- ./xvdial.c	Tue Jan 03 16:20:31 1995
***************
*** 358,364 ****
  
    if (dp->units) strcat(foo,dp->units);
    foo1[0] = '\0';
!   if (strlen(foo)<i) {
      for (i = i - strlen(foo); i>0; i--) strcat(foo1," ");
    }
    strcat(foo1, foo);
--- 358,364 ----
  
    if (dp->units) strcat(foo,dp->units);
    foo1[0] = '\0';
!   if (strlen(foo) < (size_t) i) {
      for (i = i - strlen(foo); i>0; i--) strcat(foo1," ");
    }
    strcat(foo1, foo);

diff -c -r ../xv-3.10/xvdir.c ./xvdir.c
*** ../xv-3.10/xvdir.c	Thu Dec 22 14:12:16 1994
--- ./xvdir.c	Tue Jan 03 16:21:39 1995
***************
*** 650,656 ****
    changedDir = strcmp(path, oldpath);
    strcpy(oldpath, path);
  
!   if (strlen(path)>1 && path[strlen(path)-1] != '/')
      strcat(path,"/");   /* tack on a trailing '/' to make path consistent */
  
    /* path will be something like: "/u3/bradley/src/weiner/whatever/" */
--- 650,656 ----
    changedDir = strcmp(path, oldpath);
    strcpy(oldpath, path);
  
!   if ((strlen(path) > (size_t) 1) && path[strlen(path)-1] != '/')
      strcat(path,"/");   /* tack on a trailing '/' to make path consistent */
  
    /* path will be something like: "/u3/bradley/src/weiner/whatever/" */
***************
*** 851,857 ****
      xvbcopy(&filename[curPos], &filename[curPos-1], (size_t) (len-curPos+1));
      curPos--;
  
!     if (strlen(filename)>0) scrollToFileName();
    }
  
    else if (c=='\025') {                 /* ^U: clear entire line */
--- 851,857 ----
      xvbcopy(&filename[curPos], &filename[curPos-1], (size_t) (len-curPos+1));
      curPos--;
  
!     if (strlen(filename) > (size_t) 0) scrollToFileName();
    }
  
    else if (c=='\025') {                 /* ^U: clear entire line */
***************
*** 1023,1029 ****
      XDrawLine(theDisp, dnamW, theGC, 2,0,2,LINEHIGH+5);
    }
  
!   if (enPos<strlen(filename)) {  /* draw a "there's more over here" doowah */
      XDrawLine(theDisp, dnamW, theGC, DNAMWIDE+5,0,DNAMWIDE+5,LINEHIGH+5);
      XDrawLine(theDisp, dnamW, theGC, DNAMWIDE+4,0,DNAMWIDE+4,LINEHIGH+5);
      XDrawLine(theDisp, dnamW, theGC, DNAMWIDE+3,0,DNAMWIDE+3,LINEHIGH+5);
--- 1023,1030 ----
      XDrawLine(theDisp, dnamW, theGC, 2,0,2,LINEHIGH+5);
    }
  
!   if ((size_t) enPos < strlen(filename)) { 
!     /* draw a "there's more over here" doowah */
      XDrawLine(theDisp, dnamW, theGC, DNAMWIDE+5,0,DNAMWIDE+5,LINEHIGH+5);
      XDrawLine(theDisp, dnamW, theGC, DNAMWIDE+4,0,DNAMWIDE+4,LINEHIGH+5);
      XDrawLine(theDisp, dnamW, theGC, DNAMWIDE+3,0,DNAMWIDE+3,LINEHIGH+5);
***************
*** 1538,1544 ****
    if (*fname != '~') return 0; /* doesn't start with a tilde, don't expand */
  
    /* look for the first '/' after the tilde */
!   sp = index(fname,'/');
    if (sp == 0) {               /* no '/' after the tilde */
      sp = fname+strlen(fname);  /* sp = end of string */
    }
--- 1539,1545 ----
    if (*fname != '~') return 0; /* doesn't start with a tilde, don't expand */
  
    /* look for the first '/' after the tilde */
!   sp = (char *) index(fname,'/');
    if (sp == 0) {               /* no '/' after the tilde */
      sp = fname+strlen(fname);  /* sp = end of string */
    }

diff -c -r ../xv-3.10/xvevent.c ./xvevent.c
*** ../xv-3.10/xvevent.c	Thu Dec 22 14:12:17 1994
--- ./xvevent.c	Mon Jan 23 18:20:24 1995
***************
*** 1407,1413 ****
  	  okay = 0;
  	  do {
  	    i = GetStrPopUp(txt, labels, 2, buf, 64, "0123456789", 1);
! 	    if (!i && strlen(buf)>0) {   /* hit 'Ok', had a string entered */
  	      /* check for page in range */
  	      j = atoi(buf);
  	      if (j>=1 && j<=numPages) {
--- 1407,1414 ----
  	  okay = 0;
  	  do {
  	    i = GetStrPopUp(txt, labels, 2, buf, 64, "0123456789", 1);
! 	    if (!i && strlen(buf) > (size_t) 0) {
! 	      /* hit 'Ok', had a string entered */
  	      /* check for page in range */
  	      j = atoi(buf);
  	      if (j>=1 && j<=numPages) {
***************
*** 2030,2035 ****
--- 2031,2037 ----
    xwc.height = xwa->height;
  
  
+ #ifdef BAD_IDEA
    /* if there is a virtual window manager running, then we should translate
       the coordinates that are in terms of 'real' screen into coordinates
       that are in terms of the 'virtual' root window 
***************
*** 2043,2049 ****
  		       xwc.x,xwc.y,x1,y1);
      xwc.x = x1;  xwc.y = y1;
    }
!   
  
  
    if (DEBUG) {
--- 2045,2051 ----
  		       xwc.x,xwc.y,x1,y1);
      xwc.x = x1;  xwc.y = y1;
    }
! #endif  
  
  
    if (DEBUG) {

diff -c -r ../xv-3.10/xvfits.c ./xvfits.c
*** ../xv-3.10/xvfits.c	Thu Dec 22 14:12:21 1994
--- ./xvfits.c	Wed Dec 28 02:43:29 1994
***************
*** 69,75 ****
    char  basename[64];
  
    if (fits_block == NULL) {
!     fits_block = malloc((size_t) BLOCKSIZE);
      if (!fits_block) FatalError("Insufficient memory for FITS block buffer");
    }
    
--- 69,75 ----
    char  basename[64];
  
    if (fits_block == NULL) {
!     fits_block = (char *) malloc((size_t) BLOCKSIZE);
      if (!fits_block) FatalError("Insufficient memory for FITS block buffer");
    }
    
***************
*** 170,176 ****
    byte  rgb[256];
    
    if (!fits_block) {
!     fits_block = malloc((size_t) BLOCKSIZE);
      if (!fits_block) FatalError("Insufficient memory for FITS block buffer");
    }
    
--- 170,176 ----
    byte  rgb[256];
    
    if (!fits_block) {
!     fits_block = (char *) malloc((size_t) BLOCKSIZE);
      if (!fits_block) FatalError("Insufficient memory for FITS block buffer");
    }
    
***************
*** 498,504 ****
        j++;                          /* make j length of comment */
        if (j > 0) {                  /* skip blank comment cards */
  	if (fs->comment == NULL) {
! 	  fs->comment = malloc((size_t) commsize);
  	  if (fs->comment == NULL)
  	    FatalError("Insufficient memory for comment buffer");
  	}
--- 498,504 ----
        j++;                          /* make j length of comment */
        if (j > 0) {                  /* skip blank comment cards */
  	if (fs->comment == NULL) {
! 	  fs->comment = (char *) malloc((size_t) commsize);
  	  if (fs->comment == NULL)
  	    FatalError("Insufficient memory for comment buffer");
  	}

diff -c -r ../xv-3.10/xvgam.c ./xvgam.c
*** ../xv-3.10/xvgam.c	Thu Dec 22 14:12:15 1994
--- ./xvgam.c	Fri Jan 13 14:51:14 1995
***************
*** 1838,1844 ****
        gMap[i] = gcmap[i];
        bMap[i] = bcmap[i];
        if (!ncols) 
! 	cols[i] = (rMap[i] + gMap[i] + bMap[i] >= 128*3) ? white : black;
      }
    }
  }
--- 1838,1845 ----
        gMap[i] = gcmap[i];
        bMap[i] = bcmap[i];
        if (!ncols) 
! 	cols[i] = (((int)rMap[i]) + ((int)gMap[i]) + ((int)bMap[i]) >= 128*3)
! 	  ? white : black;
      }
    }
  }
***************
*** 1903,1909 ****
    bMap[col] = bGraf.func[bv];
  
    if (!ncols) 
!     cols[col] = (rMap[col] + gMap[col] + bMap[col] >= 128*3) ? white : black;
  
    if (DEBUG>1) fprintf(stderr," -> %d,%d,%d\n",rMap[col],gMap[col],bMap[col]);
  }
--- 1904,1912 ----
    bMap[col] = bGraf.func[bv];
  
    if (!ncols) 
!     cols[col] = 
!       (((int)rMap[col]) + ((int)gMap[col]) + ((int)bMap[col]) >= 128*3) 
! 	? white : black;
  
    if (DEBUG>1) fprintf(stderr," -> %d,%d,%d\n",rMap[col],gMap[col],bMap[col]);
  }

diff -c -r ../xv-3.10/xvgif.c ./xvgif.c
*** ../xv-3.10/xvgif.c	Thu Dec 22 14:12:15 1994
--- ./xvgif.c	Tue Jan 10 14:54:41 1995
***************
*** 254,260 ****
  
  
  	if (cmtlen>0) {   /* build into one un-blocked comment */
! 	  cmt = (byte *) malloc((size_t) cmtlen);
  	  if (!cmt) gifWarning("couldn't malloc space for comments\n");
  	  else {
  	    sp = cmt;
--- 254,260 ----
  
  
  	if (cmtlen>0) {   /* build into one un-blocked comment */
! 	  cmt = (byte *) malloc((size_t) (cmtlen + 1));
  	  if (!cmt) gifWarning("couldn't malloc space for comments\n");
  	  else {
  	    sp = cmt;
***************
*** 262,270 ****
  	      sbsize = (*ptr1++);
  	      for (j=0; j<sbsize; j++, sp++, ptr1++) *sp = *ptr1;
  	    } while (sbsize);
  
  	    if (pinfo->comment) {    /* have to strcat onto old comments */
! 	      cmt1 = (byte *) malloc(strlen(pinfo->comment) + cmtlen);
  	      if (!cmt1) {
  		gifWarning("couldn't malloc space for comments\n");
  		free(cmt);
--- 262,271 ----
  	      sbsize = (*ptr1++);
  	      for (j=0; j<sbsize; j++, sp++, ptr1++) *sp = *ptr1;
  	    } while (sbsize);
+ 	    *sp = '\0';
  
  	    if (pinfo->comment) {    /* have to strcat onto old comments */
! 	      cmt1 = (byte *) malloc(strlen(pinfo->comment) + cmtlen + 2);
  	      if (!cmt1) {
  		gifWarning("couldn't malloc space for comments\n");
  		free(cmt);
***************
*** 271,276 ****
--- 272,278 ----
  	      }
  	      else {
  		strcpy((char *) cmt1, (char *) pinfo->comment);
+ 		strcat((char *) cmt1, (char *) "\n");
  		strcat((char *) cmt1, (char *) cmt);
  		free(pinfo->comment);
  		free(cmt);

diff -c -r ../xv-3.10/xvgifwr.c ./xvgifwr.c
*** ../xv-3.10/xvgifwr.c	Thu Dec 22 14:12:16 1994
--- ./xvgifwr.c	Tue Jan 03 16:22:21 1995
***************
*** 141,147 ****
      fprintf(stderr,"WrGIF: pic=%lx, w,h=%dx%d, numcols=%d, Bits%d,Cmap=%d\n",
  	    (u_long) pic8, w,h,numcols,BitsPerPixel,ColorMapSize);
  
!   if (comment && strlen(comment)>0)
      fwrite("GIF89a", (size_t) 1, (size_t) 6, fp);    /* the GIF magic number */
    else
      fwrite("GIF87a", (size_t) 1, (size_t) 6, fp);    /* the GIF magic number */
--- 141,147 ----
      fprintf(stderr,"WrGIF: pic=%lx, w,h=%dx%d, numcols=%d, Bits%d,Cmap=%d\n",
  	    (u_long) pic8, w,h,numcols,BitsPerPixel,ColorMapSize);
  
!   if (comment && strlen(comment) > (size_t) 0)
      fwrite("GIF89a", (size_t) 1, (size_t) 6, fp);    /* the GIF magic number */
    else
      fwrite("GIF87a", (size_t) 1, (size_t) 6, fp);    /* the GIF magic number */
***************
*** 175,181 ****
      }
    }
  
!   if (comment && strlen(comment)>0) {   /* write comment blocks */
      char *sp;
      int   i, blen;
  
--- 175,181 ----
      }
    }
  
!   if (comment && strlen(comment) > (size_t) 0) {   /* write comment blocks */
      char *sp;
      int   i, blen;
  
diff -c -r ../xv-3.10/xviff.c ./xviff.c
*** ../xv-3.10/xviff.c	Thu Dec 22 14:12:20 1994
--- ./xviff.c	Fri Jan 13 14:54:54 1995
***************
*** 463,469 ****
      
      if (codeByte < 0x80) {
        codeByte++;
!       if ((slen > codeByte) && (dlen >= codeByte)) {
          slen -= codeByte + 1;
          dlen -= codeByte;
          while (codeByte > 0) {
--- 463,469 ----
      
      if (codeByte < 0x80) {
        codeByte++;
!       if ((slen > (long) codeByte) && (dlen >= (long) codeByte)) {
          slen -= codeByte + 1;
          dlen -= codeByte;
          while (codeByte > 0) {
***************
*** 476,482 ****
  
      else if (codeByte > 0x80) {
        codeByte = 0x81 - (codeByte & 0x7f);
!       if ((slen > 0) && (dlen >= codeByte)) {
  	dataByte = *sptr++;
  	slen -= 2;
  	dlen -= codeByte;
--- 476,482 ----
  
      else if (codeByte > 0x80) {
        codeByte = 0x81 - (codeByte & 0x7f);
!       if ((slen > (long) 0) && (dlen >= (long) codeByte)) {
  	dataByte = *sptr++;
  	slen -= 2;
  	dlen -= codeByte;

diff -c -r ../xv-3.10/xvimage.c ./xvimage.c
*** ../xv-3.10/xvimage.c	Thu Dec 22 14:12:17 1994
--- ./xvimage.c	Fri Jan 13 19:11:36 1995
***************
*** 675,680 ****
--- 675,682 ----
  # define inabsrange(a,n) ( (a) < n && (a) > -n )
    
  
+   if (cHIGH<3 || cWIDE<3) return 0;
+ 
    ctop = cbot = cleft = cright = 0;
  
    if (picType != PIC24) FatalError("doAutoCrop24 called when pic!=PIC24");
***************
*** 780,787 ****
  
    /* do the actual cropping */
    if (cleft || ctop || cbot || cright) {
      DoCrop(cXOFF+cleft, cYOFF+ctop, 
! 	    cWIDE-(cleft+cright), cHIGH-(ctop+cbot));
      return 1;
    }
  
--- 782,792 ----
  
    /* do the actual cropping */
    if (cleft || ctop || cbot || cright) {
+     if (cWIDE - (cleft + cright) < 1 ||
+ 	cHIGH - (ctop  + cbot  ) < 1) return 0;    /* sanity check */
+     
      DoCrop(cXOFF+cleft, cYOFF+ctop, 
! 	   cWIDE-(cleft+cright), cHIGH-(ctop+cbot));
      return 1;
    }
  
***************
*** 859,865 ****
    eWIDE = (int) (cWIDE * expw);  
    eHIGH = (int) (cHIGH * exph);
  
!   if (eWIDE > maxWIDE || h > maxHIGH) {  /* make 'normal' size */
      if (cWIDE>maxWIDE || cHIGH>maxHIGH) {
        double r,wr,hr;
        wr = ((double) cWIDE) / maxWIDE;
--- 864,870 ----
    eWIDE = (int) (cWIDE * expw);  
    eHIGH = (int) (cHIGH * exph);
  
!   if (eWIDE>maxWIDE || eHIGH>maxHIGH) {  /* make 'normal' size */
      if (cWIDE>maxWIDE || cHIGH>maxHIGH) {
        double r,wr,hr;
        wr = ((double) cWIDE) / maxWIDE;
***************
*** 873,878 ****
--- 878,886 ----
    }
  
  
+   if (eWIDE<1) eWIDE = 1;
+   if (eHIGH<1) eHIGH = 1;
+ 
    SetCursors(-1);
  }
  
***************
*** 2823,2831 ****
  	  }
  	  
  	  if (omode == PAD_ORGB) {
! 	    rval = (r * fg) / 100 + (p24[0] * bg) / 100;
! 	    gval = (g * fg) / 100 + (p24[1] * bg) / 100;
! 	    bval = (b * fg) / 100 + (p24[2] * bg) / 100;
  	  }
  	  else {       /* one of the HSV modes */
  	    double fh,fs,fv,fw, bh,bs,bv,bw, h,s,v;
--- 2831,2839 ----
  	  }
  	  
  	  if (omode == PAD_ORGB) {
! 	    rval = (r * fg) / 100 + ((int) p24[0] * bg) / 100;
! 	    gval = (g * fg) / 100 + ((int) p24[1] * bg) / 100;
! 	    bval = (b * fg) / 100 + ((int) p24[2] * bg) / 100;
  	  }
  	  else {       /* one of the HSV modes */
  	    double fh,fs,fv,fw, bh,bs,bv,bw, h,s,v;

diff -c -r ../xv-3.10/xvjpeg.c ./xvjpeg.c
*** ../xv-3.10/xvjpeg.c	Thu Dec 22 14:12:16 1994
--- ./xvjpeg.c	Thu Jan 05 03:17:13 1995
***************
*** 612,620 ****
    }
  
    
-   jpeg_finish_decompress(&cinfo);
  
- 
    /* return 'PICINFO' structure to XV */
  
    pinfo->pic = pic;
--- 612,618 ----
***************
*** 646,655 ****
    
    pinfo->comment = comment;
  
    jpeg_destroy_decompress(&cinfo);
    fclose(fp);
  
!   comment = NULL;
    return 1;
  }
    
--- 644,654 ----
    
    pinfo->comment = comment;
  
+   jpeg_finish_decompress(&cinfo);
    jpeg_destroy_decompress(&cinfo);
    fclose(fp);
  
!   comment = (char *) NULL;
    return 1;
  }
    
***************
*** 806,812 ****
         If none, add 2.   If one, add 1.  If two or more, add none. */
  
      sp = comment + strlen(comment);
!     for (i=0; i<3 && i<strlen(comment); i++) {
        sp--;
        if (*sp != '\n') break;
      }
--- 805,811 ----
         If none, add 2.   If one, add 1.  If two or more, add none. */
  
      sp = comment + strlen(comment);
!     for (i=0; i<3 && ((size_t) i < strlen(comment)); i++) {
        sp--;
        if (*sp != '\n') break;
      }

diff -c -r ../xv-3.10/xvmisc.c ./xvmisc.c
*** ../xv-3.10/xvmisc.c	Thu Dec 22 14:12:15 1994
--- ./xvmisc.c	Fri Jan 13 18:41:34 1995
***************
*** 729,735 ****
       'simple' name ('weenie.gif').  Note that it does not make a copy of
       the name, so don't be modifying it... */
  
!   basname = rindex(fname, '/');
    if (!basname) basname = fname;
    else basname++;
  
--- 729,735 ----
       'simple' name ('weenie.gif').  Note that it does not make a copy of
       the name, so don't be modifying it... */
  
!   basname = (char *) rindex(fname, '/');
    if (!basname) basname = fname;
    else basname++;
  
***************
*** 770,802 ****
      XSetForeground(theDisp, theGC, fg);
      XFillRectangle(theDisp,win,theGC, x+3, y+3, (u_int) barwide, (u_int) h-5);
  
!     if (barwide < maxwide) {
!       if (numchars) {
  	XSetForeground(theDisp, theGC, bg);
  	XFillRectangle(theDisp, win, theGC, x+3+barwide, y+3, 
  		       (u_int) (maxwide-barwide), (u_int) (h-5));
- 
- 	XSetForeground(theDisp, theGC, fg);
- 	XDrawString(theDisp, win, theGC, CENTERX(mfinfo, (x+w/2), str), 
- 		    CENTERY(mfinfo, (y+h/2)), str, numchars);
        }
-       else {
- 	XDrawLine(theDisp,win,theGC,x+3+barwide, y+h/2 + 0, x+w-3, y+h/2 + 0);
-       
- 	XSetForeground(theDisp, theGC, lo);
- 	XDrawLine(theDisp,win,theGC,x+3+barwide, y+h/2 + 1, x+w-3, y+h/2 + 1);
  	
! 	XSetForeground(theDisp, theGC, hi);
! 	XDrawLine(theDisp,win,theGC,x+3+barwide, y+h/2 + 2, x+w-3, y+h/2 + 2);
! 	
! 	XSetForeground(theDisp, theGC, bg);
! 	XFillRectangle(theDisp, win, theGC, x+3+barwide, y+3, 
! 		       (u_int) (maxwide-barwide), (u_int) (h/2 - 3));
! 	
! 	XFillRectangle(theDisp, win, theGC, x+3+barwide, y+h/2 + 3, 
! 		       (u_int) (maxwide-barwide),(u_int)((h-3) - (h/2+3)) + 1);
!       }
      }
    }
  
    else {
--- 770,808 ----
      XSetForeground(theDisp, theGC, fg);
      XFillRectangle(theDisp,win,theGC, x+3, y+3, (u_int) barwide, (u_int) h-5);
  
!     if (numchars) {      /* do string */
!       if (barwide < maxwide) {
  	XSetForeground(theDisp, theGC, bg);
  	XFillRectangle(theDisp, win, theGC, x+3+barwide, y+3, 
  		       (u_int) (maxwide-barwide), (u_int) (h-5));
        }
  	
!       XSetFunction(theDisp, theGC, GXinvert);
!       XSetPlaneMask(theDisp, theGC, fg ^ bg);
! 
!       XDrawString(theDisp, win, theGC, CENTERX(mfinfo, (x+w/2), str), 
! 		  CENTERY(mfinfo, (y+h/2)), str, numchars);
! 
!       XSetFunction(theDisp, theGC, GXcopy);
!       XSetPlaneMask(theDisp, theGC, AllPlanes);
      }
+ 
+     else if (barwide < maxwide) {
+       XDrawLine(theDisp,win,theGC,x+3+barwide, y+h/2 + 0, x+w-3, y+h/2 + 0);
+       
+       XSetForeground(theDisp, theGC, lo);
+       XDrawLine(theDisp,win,theGC,x+3+barwide, y+h/2 + 1, x+w-3, y+h/2 + 1);
+       
+       XSetForeground(theDisp, theGC, hi);
+       XDrawLine(theDisp,win,theGC,x+3+barwide, y+h/2 + 2, x+w-3, y+h/2 + 2);
+       
+       XSetForeground(theDisp, theGC, bg);
+       XFillRectangle(theDisp, win, theGC, x+3+barwide, y+3, 
+ 		     (u_int) (maxwide-barwide), (u_int) (h/2 - 3));
+       
+       XFillRectangle(theDisp, win, theGC, x+3+barwide, y+h/2 + 3, 
+ 		     (u_int) (maxwide-barwide),(u_int)((h-3) - (h/2+3)) + 1);
+     }
    }
  
    else {
***************
*** 806,832 ****
      XSetForeground(theDisp, theGC, fg);
      XFillRectangle(theDisp,win,theGC, x+1, y+1, (u_int) barwide, (u_int) h-1);
  
!     if (barwide < maxwide) {
!       if (numchars) {
  	XSetForeground(theDisp, theGC, bg);
  	XFillRectangle(theDisp, win, theGC, x+1+barwide, y+1, 
  		       (u_int) (maxwide-barwide), (u_int) (h-1));
- 
- 	XSetForeground(theDisp, theGC, fg);
- 	XDrawString(theDisp, win, theGC, CENTERX(mfinfo, (x+w/2), str), 
- 		    CENTERY(mfinfo, (y+h/2)), str, numchars);
        }
!       else {
! 	XDrawLine(theDisp, win, theGC, x+1+barwide, y+h/2, x+w-1, y+h/2);
! 	
! 	XSetForeground(theDisp, theGC, bg);
! 	XFillRectangle(theDisp, win, theGC, x+1+barwide, y+1, 
! 		       (u_int) (maxwide-barwide), (u_int) (h/2 - 1));
! 	
! 	XFillRectangle(theDisp, win, theGC, x+1+barwide, y+h/2 + 1, 
! 		       (u_int)(maxwide-barwide),(u_int)(((h-1) - (h/2+1))+1));
!       }
      }
    }
  
    XFlush(theDisp);
--- 812,844 ----
      XSetForeground(theDisp, theGC, fg);
      XFillRectangle(theDisp,win,theGC, x+1, y+1, (u_int) barwide, (u_int) h-1);
  
!     if (numchars) {
!       if (barwide < maxwide) {
  	XSetForeground(theDisp, theGC, bg);
  	XFillRectangle(theDisp, win, theGC, x+1+barwide, y+1, 
  		       (u_int) (maxwide-barwide), (u_int) (h-1));
        }
!       
!       XSetFunction(theDisp, theGC, GXinvert);
!       XSetPlaneMask(theDisp, theGC, fg ^ bg);
! 
!       XDrawString(theDisp, win, theGC, CENTERX(mfinfo, (x+w/2), str), 
! 		  CENTERY(mfinfo, (y+h/2)), str, numchars);
! 
!       XSetFunction(theDisp, theGC, GXcopy);
!       XSetPlaneMask(theDisp, theGC, AllPlanes);
      }
+     
+     else if (barwide < maxwide) {
+       XDrawLine(theDisp, win, theGC, x+1+barwide, y+h/2, x+w-1, y+h/2);
+       
+       XSetForeground(theDisp, theGC, bg);
+       XFillRectangle(theDisp, win, theGC, x+1+barwide, y+1, 
+ 		     (u_int) (maxwide-barwide), (u_int) (h/2 - 1));
+       
+       XFillRectangle(theDisp, win, theGC, x+1+barwide, y+h/2 + 1, 
+ 		     (u_int)(maxwide-barwide),(u_int)(((h-1) - (h/2+1))+1));
+     }
    }
  
    XFlush(theDisp);
***************
*** 1117,1124 ****
  
      time.tv_sec = usec / 1000000L;
      time.tv_usec = usec % 1000000L;
!     select(0, (fd_set *) NULL, (fd_set *) NULL, (fd_set *) NULL, &time);
    }
  #endif /* VMS */
  }
  
--- 1129,1137 ----
  
      time.tv_sec = usec / 1000000L;
      time.tv_usec = usec % 1000000L;
!     select(0, XV_FDTYPE NULL, XV_FDTYPE NULL, XV_FDTYPE NULL, &time);
    }
  #endif /* VMS */
  }
+ 
  
diff -c -r ../xv-3.10/xvpbm.c ./xvpbm.c
*** ../xv-3.10/xvpbm.c	Thu Dec 22 14:12:16 1994
--- ./xvpbm.c	Tue Jan 03 16:23:44 1995
***************
*** 353,359 ****
        *sp++ = '\n';
        *sp   = '\0';
  
!       if (strlen(cmt) > 0) {    /* add to pinfo->comment */
  	if (!pinfo->comment) {
  	  pinfo->comment = (char *) malloc(strlen(cmt)+1);
  	  if (!pinfo->comment) FatalError("malloc failure in xvpbm.c getint");
--- 353,359 ----
        *sp++ = '\n';
        *sp   = '\0';
  
!       if (strlen(cmt) > (size_t) 0) {    /* add to pinfo->comment */
  	if (!pinfo->comment) {
  	  pinfo->comment = (char *) malloc(strlen(cmt)+1);
  	  if (!pinfo->comment) FatalError("malloc failure in xvpbm.c getint");
***************
*** 438,444 ****
        *sp++ = '\n';
        *sp = '\0';
  
!       if (strlen(cmt) > 0) {    /* add to pinfo->comment */
  	if (!pinfo->comment) {
  	  pinfo->comment = (char *) malloc(strlen(cmt)+1);
  	  if (!pinfo->comment) FatalError("malloc failure in xvpbm.c getint");
--- 438,444 ----
        *sp++ = '\n';
        *sp = '\0';
  
!       if (strlen(cmt) > (size_t) 0) {    /* add to pinfo->comment */
  	if (!pinfo->comment) {
  	  pinfo->comment = (char *) malloc(strlen(cmt)+1);
  	  if (!pinfo->comment) FatalError("malloc failure in xvpbm.c getint");

diff -c -r ../xv-3.10/xvpcx.c ./xvpcx.c
*** ../xv-3.10/xvpcx.c	Thu Dec 22 14:12:20 1994
--- ./xvpcx.c	Tue Jan 10 18:06:37 1995
***************
*** 36,44 ****
  #define PCX_MAPSTART 0x0c	/* Start of appended colormap	*/
  
  
! static int  pcxLoadImage  PARM((char *, FILE *, byte *, byte *, int, int));
! static void pcxLoadRaster PARM((FILE *, byte *, int, byte *, int, int));
! static int  pcxError      PARM((char *, char *));
  
  
  
--- 36,45 ----
  #define PCX_MAPSTART 0x0c	/* Start of appended colormap	*/
  
  
! static int  pcxLoadImage8  PARM((char *, FILE *, PICINFO *, byte *));
! static int  pcxLoadImage24 PARM((char *, FILE *, PICINFO *, byte *));
! static void pcxLoadRaster  PARM((FILE *, byte *, int, byte *, int, int));
! static int  pcxError       PARM((char *, char *));
  
  
  
***************
*** 52,58 ****
    long   filesize;
    char  *bname, *errstr;
    byte   hdr[128], *image;
!   int    i, colors, gray;
  
    pinfo->type = PIC8;
    pinfo->pic     = (byte *) NULL;
--- 53,59 ----
    long   filesize;
    char  *bname, *errstr;
    byte   hdr[128], *image;
!   int    i, colors, gray, fullcolor;
  
    pinfo->type = PIC8;
    pinfo->pic     = (byte *) NULL;
***************
*** 92,97 ****
--- 93,99 ----
    pinfo->w++;  pinfo->h++;
  
    colors = 1 << (hdr[PCX_BPP] * hdr[PCX_PLANES]);
+   fullcolor = (hdr[PCX_BPP] == 8 && hdr[PCX_PLANES] == 3);
  
    if (DEBUG) {
      fprintf(stderr,"PCX: %dx%d image, version=%d, encoding=%d\n", 
***************
*** 102,108 ****
  	    colors);
    }
  
!   if (colors>256) {
      fclose(fp);
      return pcxError(bname,"No more than 256 colors allowed in PCX file.");
    }
--- 104,110 ----
  	    colors);
    }
  
!   if (colors>256 && !fullcolor) {
      fclose(fp);
      return pcxError(bname,"No more than 256 colors allowed in PCX file.");
    }
***************
*** 112,134 ****
      return pcxError(bname,"Unsupported PCX encoding format.");
    }
  
!   /* note:  overallocation to make life easier... */
!   image = (byte *) malloc((size_t) (pinfo->h + 1) * pinfo->w + 16);
!   if (!image) FatalError("Can't alloc 'image' in LoadPCX()");
! 
!   xvbzero((char *) image, (size_t) ((pinfo->h+1) * pinfo->w + 16));
! 
!   if (!pcxLoadImage(bname, fp, image, hdr, pinfo->w, pinfo->h)) {
!     free(image);
!     fclose(fp);
!     return 0;
    }
  
  
    if (ferror(fp) | feof(fp))    /* just a warning */
      pcxError(bname, "PCX file appears to be truncated.");
  
!   if (colors>16) {       /* handle trailing colormap */
      while (1) {
        i=getc(fp);
        if (i==PCX_MAPSTART || i==EOF) break;
--- 114,138 ----
      return pcxError(bname,"Unsupported PCX encoding format.");
    }
  
!   /* load the image, the image function fills in pinfo->pic */
!   if (!fullcolor) {
!     if (!pcxLoadImage8(bname, fp, pinfo, hdr)) {
!       fclose(fp);
!       return 0;
!     }
    }
+   else {
+     if (!pcxLoadImage24(bname, fp, pinfo, hdr)) {
+       fclose(fp);
+       return 0;
+     }
+   }
  
  
    if (ferror(fp) | feof(fp))    /* just a warning */
      pcxError(bname, "PCX file appears to be truncated.");
  
!   if (colors>16 && !fullcolor) {       /* handle trailing colormap */
      while (1) {
        i=getc(fp);
        if (i==PCX_MAPSTART || i==EOF) break;
***************
*** 171,185 ****
    /* finally, convert into XV internal format */
  
  
!   pinfo->pic     = image;
!   pinfo->type    = PIC8;
    pinfo->frmType = -1;    /* no default format to save in */
  
    /* check for grayscaleitude */
!   for (i=0; i<colors; i++) {
!     if ((pinfo->r[i] != pinfo->g[i]) || (pinfo->r[i] != pinfo->b[i])) break;
    }
-   gray = (i==colors) ? 1 : 0;
  
  
    if (colors > 2 || (colors==2 && !gray)) {  /* grayscale or PseudoColor */
--- 175,191 ----
    /* finally, convert into XV internal format */
  
  
!   pinfo->type    = fullcolor ? PIC24 : PIC8;
    pinfo->frmType = -1;    /* no default format to save in */
  
    /* check for grayscaleitude */
!   gray = 0;
!   if (!fullcolor) {
!     for (i=0; i<colors; i++) {
!       if ((pinfo->r[i] != pinfo->g[i]) || (pinfo->r[i] != pinfo->b[i])) break;
!     }
!     gray = (i==colors) ? 1 : 0;
    }
  
  
    if (colors > 2 || (colors==2 && !gray)) {  /* grayscale or PseudoColor */
***************
*** 205,227 ****
  
  
  /*****************************/
! static int pcxLoadImage(fname, fp, image, hdr, w, h)
!      char *fname;
!      FILE *fp;
!      byte *image, *hdr;
!      int   w, h;
  {
    switch (hdr[PCX_BPP]) {
!   case 1:   pcxLoadRaster(fp, image, 1, hdr, w, h);   break;
!   case 8:   pcxLoadRaster(fp, image, 8, hdr, w, h);   break;
    default:
      pcxError(fname, "Unsupported # of bits per plane.");
      return (0);
    }
  
    return 1;
  }
  
  
  
  
--- 211,317 ----
  
  
  /*****************************/
! static int pcxLoadImage8(fname, fp, pinfo, hdr)
!      char    *fname;
!      FILE    *fp;
!      PICINFO *pinfo;
!      byte    *hdr;
  {
+   /* load an image with at most 8 bits per pixel */
+   
+   byte *image;
+   
+   /* note:  overallocation to make life easier... */
+   image = (byte *) malloc((size_t) (pinfo->h + 1) * pinfo->w + 16);
+   if (!image) FatalError("Can't alloc 'image' in pcxLoadImage8()");
+   
+   xvbzero((char *) image, (size_t) ((pinfo->h+1) * pinfo->w + 16));
+   
    switch (hdr[PCX_BPP]) {
!   case 1:   pcxLoadRaster(fp, image, 1, hdr, pinfo->w, pinfo->h);   break;
!   case 8:   pcxLoadRaster(fp, image, 8, hdr, pinfo->w, pinfo->h);   break;
    default:
      pcxError(fname, "Unsupported # of bits per plane.");
+     free(image);
      return (0);
    }
  
+   pinfo->pic = image;
    return 1;
  }
  
+ 
+ /*****************************/
+ static int pcxLoadImage24(fname, fp, pinfo, hdr)
+      char *fname;
+      FILE *fp;
+      PICINFO *pinfo;
+      byte *hdr;
+ {
+   byte *pix, *pic24, scale[256];
+   int   c, i, j, w, h, maxv, cnt, planes, bperlin, nbytes;
+   
+   w = pinfo->w;  h = pinfo->h;
+   
+   planes = (int) hdr[PCX_PLANES];
+   bperlin = hdr[PCX_BPRL] + ((int) hdr[PCX_BPRH]<<8);
+   
+   /* allocate 24-bit image */
+   pic24 = (byte *) malloc((size_t) w*h*planes);
+   if (!pic24) FatalError("couldn't malloc 'pic24'");
+   
+   xvbzero((char *) pic24, (size_t) w*h*planes);
+   
+   maxv = 0;
+   pix = pinfo->pic = pic24;
+   i = 0;      /* planes, in this while loop */
+   j = 0;      /* bytes per line, in this while loop */
+   nbytes = bperlin*h*planes;
+  
+   while (nbytes > 0 && (c = getc(fp)) != EOF) {
+     if ((c & 0xC0) == 0xC0) {   /* have a rep. count */
+       cnt = c & 0x3F;
+       c = getc(fp);
+       if (c == EOF) { getc(fp); break; }
+     }
+     else cnt = 1;
+     
+     if (c > maxv)  maxv = c;
+     
+     while (cnt-- > 0) {
+       if (j < w) {
+ 	*pix = c;
+ 	pix += planes;
+       }
+       j++;
+       nbytes--;
+       if (j == bperlin) {
+ 	j = 0;
+ 	if (++i < planes) {
+ 	  pix -= (w*planes)-1;  /* next plane on this line */
+ 	}
+ 	else {
+ 	  pix -= (planes-1);    /* start of next line, first plane */
+ 	  i = 0;
+ 	}
+       }
+     }
+   }
+   
+   
+   /* scale all RGB to range 0-255, if they aren't */
+ 
+   if (maxv<255) { 
+     for (i=0; i<=maxv; i++) scale[i] = (i * 255) / maxv;
+     
+     for (i=0, pix=pic24; i<h; i++) {
+       if ((i&0x3f)==0) WaitCursor();
+       for (j=0; j<w*planes; j++, pix++) *pix = scale[*pix];
+     }
+   }
+   
+   return 1;
+ }
  
  
  
diff -c -r ../xv-3.10/xvpds.c ./xvpds.c
*** ../xv-3.10/xvpds.c	Thu Dec 22 14:12:17 1994
--- ./xvpds.c	Tue Jan 03 16:25:52 1995
***************
*** 513,519 ****
        } else if ((sscanf(scanbuff," EXPOSURE_DURATION = %s", exposure) == 1)
  	      || (sscanf(scanbuff," INSTRUMENT_EXPOSURE_DURATION = %s",
  			 exposure) == 1)) {
! 	tmptmp = index(scanbuff,'=');
  	tmptmp++;
  	while((*tmptmp) == ' ')
  	    tmptmp++;
--- 513,519 ----
        } else if ((sscanf(scanbuff," EXPOSURE_DURATION = %s", exposure) == 1)
  	      || (sscanf(scanbuff," INSTRUMENT_EXPOSURE_DURATION = %s",
  			 exposure) == 1)) {
! 	tmptmp = (char *) index(scanbuff,'=');
  	tmptmp++;
  	while((*tmptmp) == ' ')
  	    tmptmp++;
***************
*** 521,527 ****
  	lastwasinote=FALSE; continue;
  
        } else if (sscanf(scanbuff, "NOTE = %s", inote) == 1) {
! 	tmptmp = index(scanbuff,'='); tmptmp++;
  	while (((*tmptmp) == ' ') || ((*tmptmp)  == '"')) tmptmp++;
  	strcpy(inote,tmptmp);
  	strcat(inote," ");
--- 521,527 ----
  	lastwasinote=FALSE; continue;
  
        } else if (sscanf(scanbuff, "NOTE = %s", inote) == 1) {
! 	tmptmp = (char *) index(scanbuff,'='); tmptmp++;
  	while (((*tmptmp) == ' ') || ((*tmptmp)  == '"')) tmptmp++;
  	strcpy(inote,tmptmp);
  	strcat(inote," ");
***************
*** 884,892 ****
  
    /* check whether histogram file exists */
  #ifdef VMS
!   c = rindex(strcpy(name, (c = rindex(fname, ':')) ? c+1 : fname), ']');
  #else
!   c = rindex(strcpy(name, fname), '/');
  #endif /* VMS */
    (void)strcpy(c ? c+1 : name, "hist.tab");
  
--- 884,894 ----
  
    /* check whether histogram file exists */
  #ifdef VMS
!   c = (char *) rindex(strcpy(name, 
! 			     (c = (char *) rindex(fname, ':')) ? c+1 : fname),
! 		      ']');
  #else
!   c = (char *) rindex(strcpy(name, fname), '/');
  #endif /* VMS */
    (void)strcpy(c ? c+1 : name, "hist.tab");
  
***************
*** 979,987 ****
    int     i, n, r, g, b;
    
  #ifdef VMS
!   c = rindex(strcpy(name, (c = rindex(fname, ':')) ? c+1 : fname), ']');
  #else
!   c = rindex(strcpy(name, fname), '/');
  #endif /* VMS */
    (void)strcpy(c ? c+1 : name, "palette.tab");
    
--- 981,991 ----
    int     i, n, r, g, b;
    
  #ifdef VMS
!   c = (char *) rindex(strcpy(name, 
! 			     (c = (char *) rindex(fname, ':')) ? c+1 : fname),
! 		      ']');
  #else
!   c = (char *) rindex(strcpy(name, fname), '/');
  #endif /* VMS */
    (void)strcpy(c ? c+1 : name, "palette.tab");
    
diff -c -r ../xv-3.10/xvpictoppm.c ./xvpictoppm.c
*** ../xv-3.10/xvpictoppm.c	Thu Dec 22 14:12:24 1994
--- ./xvpictoppm.c	Fri Jan 13 14:57:14 1995
***************
*** 124,132 ****
  
    /* convert icon from 332 to 24-bit image */
    for (i=0, ip=icon8, pp=pic24;  i<w*h;  i++, ip++, pp+=3) {
!     pp[0] = (((*ip >> 5) & 0x07) * 255) / 7;
!     pp[1] = (((*ip >> 2) & 0x07) * 255) / 7;
!     pp[2] = (((*ip >> 0) & 0x03) * 255) / 3;
    }
  
    free(icon8);
--- 124,132 ----
  
    /* convert icon from 332 to 24-bit image */
    for (i=0, ip=icon8, pp=pic24;  i<w*h;  i++, ip++, pp+=3) {
!     pp[0] = ( ((int) ((*ip >> 5) & 0x07)) * 255) / 7;
!     pp[1] = ( ((int) ((*ip >> 2) & 0x07)) * 255) / 7;
!     pp[2] = ( ((int) ((*ip >> 0) & 0x03)) * 255) / 3;
    }
  
    free(icon8);

diff -c -r ../xv-3.10/xvpopup.c ./xvpopup.c
*** ../xv-3.10/xvpopup.c	Thu Dec 22 14:12:16 1994
--- ./xvpopup.c	Thu Jan 19 13:09:31 1995
***************
*** 150,161 ****
      if (wy + h > dispHIGH) wy = dispHIGH - h;
    }
  
!   /* wx -= (p_offx + ch_offx);
!      wy -= (p_offy + ch_offy); */
  
-   wx -= (ch_offx);
-   wy -= (ch_offy);
- 
    if (!XGetNormalHints(theDisp, win, &hints)) hints.flags = 0;
    hints.width  = hints.min_width  = hints.max_width  = w;
    hints.height = hints.min_height = hints.max_height = h;
--- 150,165 ----
      if (wy + h > dispHIGH) wy = dispHIGH - h;
    }
  
!   
!   if (winCtrPosKludge) {
!     wx -= (p_offx + ch_offx);
!     wy -= (p_offy + ch_offy);
!   } 
!   else {
!     wx -= (ch_offx);
!     wy -= (ch_offy);
!   }
  
    if (!XGetNormalHints(theDisp, win, &hints)) hints.flags = 0;
    hints.width  = hints.min_width  = hints.max_width  = w;
    hints.height = hints.min_height = hints.max_height = h;
***************
*** 249,255 ****
  
    if (poptyp == ISGRAB) {
      BTSetActive(&bts[0], (int) strlen(gsBuf));
!     BTSetActive(&bts[1], (strlen(gsBuf)>0 && atoi(gsBuf)>0));
    }
    else if (poptyp == ISPAD) {
      BTSetActive(&bts[0], (int) strlen(gsBuf));
--- 253,259 ----
  
    if (poptyp == ISGRAB) {
      BTSetActive(&bts[0], (int) strlen(gsBuf));
!     BTSetActive(&bts[1], (strlen(gsBuf)>(size_t)0 && atoi(gsBuf)>(size_t)0));
    }
    else if (poptyp == ISPAD) {
      BTSetActive(&bts[0], (int) strlen(gsBuf));
***************
*** 350,356 ****
    gsx = 10 + icon_width + 20;
    gsy = 10+(PUHIGH-30-BUTTH-gsh)/2;
  
!   if (strlen(txt) > 60)
      gsy = PUHIGH - 10 - BUTTH - 10 - gsh - 20;
  
    gsw = PUWIDE - gsx - 10;
--- 354,360 ----
    gsx = 10 + icon_width + 20;
    gsy = 10+(PUHIGH-30-BUTTH-gsh)/2;
  
!   if (strlen(txt) > (size_t) 60)
      gsy = PUHIGH - 10 - BUTTH - 10 - gsh - 20;
  
    gsw = PUWIDE - gsx - 10;
***************
*** 558,564 ****
  	strncpy(nams[*lenp], vals[*lenp], (size_t) 31);
        }
        
!       if (strlen(nams[*lenp]) > 20) {   /* fix long names */
  	char *sp = nams[*lenp] + 18;
  	*sp++ = '.';  *sp++ = '.';  *sp++ = '.';  *sp++ = '\0';
        }
--- 562,568 ----
  	strncpy(nams[*lenp], vals[*lenp], (size_t) 31);
        }
        
!       if (strlen(nams[*lenp]) > (size_t) 20) {   /* fix long names */
  	char *sp = nams[*lenp] + 18;
  	*sp++ = '.';  *sp++ = '.';  *sp++ = '.';  *sp++ = '\0';
        }
***************
*** 1154,1166 ****
      /* if we have a string of any sort, turn on the default '\n' button
         (if there is one) */
      for (i=0; i<nbts && accel[i]!='\n'; i++);
!     if (i<nbts) BTSetActive(&bts[i], strlen(gsBuf)>0);
    }
    else if (popUp == ISGRAB) {
      /* need a string of length 1 to enable Grab (bts[0]), and a string
         with an atoi() of at least '1' to enable AutoGrab (bts[1]) */
!     BTSetActive(&bts[0], strlen(gsBuf)>0);
!     BTSetActive(&bts[1], (strlen(gsBuf)>0 && atoi(gsBuf)>0));
    }
  
    return(0);
--- 1158,1170 ----
      /* if we have a string of any sort, turn on the default '\n' button
         (if there is one) */
      for (i=0; i<nbts && accel[i]!='\n'; i++);
!     if (i<nbts) BTSetActive(&bts[i], (strlen(gsBuf) > (size_t) 0));
    }
    else if (popUp == ISGRAB) {
      /* need a string of length 1 to enable Grab (bts[0]), and a string
         with an atoi() of at least '1' to enable AutoGrab (bts[1]) */
!     BTSetActive(&bts[0], (strlen(gsBuf) > (size_t) 0));
!     BTSetActive(&bts[1], (strlen(gsBuf)>(size_t)0 && atoi(gsBuf)>(size_t)0));
    }
  
    return(0);
***************
*** 1219,1225 ****
      XDrawLine(theDisp, popW, theGC, gsx+3, gsy+1, gsx+3, gsy + gsh-1);
    }
  
!   if (gsEnPos<strlen(gsBuf)) {  /* draw a "there's more over here" doowah */
      XDrawLine(theDisp, popW, theGC, gsx+gsw-3, gsy+1, gsx+gsw-3, gsy+gsh-1);
      XDrawLine(theDisp, popW, theGC, gsx+gsw-2, gsy+1, gsx+gsw-2, gsy+gsh-1);
      XDrawLine(theDisp, popW, theGC, gsx+gsw-1, gsy+1, gsx+gsw-1, gsy+gsh-1);
--- 1223,1230 ----
      XDrawLine(theDisp, popW, theGC, gsx+3, gsy+1, gsx+3, gsy + gsh-1);
    }
  
!   if ((size_t) gsEnPos < strlen(gsBuf)) {
!     /* draw a "there's more over here" doowah */
      XDrawLine(theDisp, popW, theGC, gsx+gsw-3, gsy+1, gsx+gsw-3, gsy+gsh-1);
      XDrawLine(theDisp, popW, theGC, gsx+gsw-2, gsy+1, gsx+gsw-2, gsy+gsh-1);
      XDrawLine(theDisp, popW, theGC, gsx+gsw-1, gsy+1, gsx+gsw-1, gsy+gsh-1);

diff -c -r ../xv-3.10/xvrle.c ./xvrle.c
*** ../xv-3.10/xvrle.c	Thu Dec 22 14:12:22 1994
--- ./xvrle.c	Thu Jan 19 12:27:47 1995
***************
*** 257,263 ****
  
    if (ncolors == 1) {     /* grayscale or PseudoColor */
      pinfo->type = PIC8;
!     if (ncmap == 1) {
        pinfo->colType = F_GREYSCALE;
        sprintf(pinfo->fullInfo, "Greyscale RLE.  (%ld bytes)", filesize);
        for (i=0; i<256; i++) 
--- 257,263 ----
  
    if (ncolors == 1) {     /* grayscale or PseudoColor */
      pinfo->type = PIC8;
!     if (ncmap == 0 || ncmap == 1) {   /* grey, or grey with gamma curve */
        pinfo->colType = F_GREYSCALE;
        sprintf(pinfo->fullInfo, "Greyscale RLE.  (%ld bytes)", filesize);
        for (i=0; i<256; i++) 

diff -c -r ../xv-3.10/xvtext.c ./xvtext.c
*** ../xv-3.10/xvtext.c	Thu Dec 22 14:12:20 1994
--- ./xvtext.c	Fri Jan 13 18:46:28 1995
***************
*** 1220,1226 ****
    LC("the xv distribution.  Do *not* send mail unless absolutely necessary");
    LC("(ie, you don't have ftp capability).");
    LC("");
!   LC("Note:  The documentation ('xvdocs.ps') may be installed in '/usr/local'.");
    LC("");
    LC("If you're viewing this information via the 'About XV' command, and");
    LC("you'd like to print it out, a copy of this info can be found in the ");
--- 1220,1226 ----
    LC("the xv distribution.  Do *not* send mail unless absolutely necessary");
    LC("(ie, you don't have ftp capability).");
    LC("");
!   LC("Note:  The docs (xvdocs.ps) may be installed in '/usr/local/lib'.");
    LC("");
    LC("If you're viewing this information via the 'About XV' command, and");
    LC("you'd like to print it out, a copy of this info can be found in the ");

diff -c -r ../xv-3.10/xvtiff.c ./xvtiff.c
*** ../xv-3.10/xvtiff.c	Thu Dec 22 14:12:20 1994
--- ./xvtiff.c	Fri Jan 13 14:53:34 1995
***************
*** 120,126 ****
    desc = (char *) NULL;
  
    TIFFGetField(tif, TIFFTAG_IMAGEDESCRIPTION, &desc);
!   if (desc && strlen(desc)>0) {
      /* kludge:  tiff library seems to return bizarre comments */
      if (strlen(desc)==4 && strcmp(desc, "\367\377\353\370")==0) {} 
      else {
--- 120,126 ----
    desc = (char *) NULL;
  
    TIFFGetField(tif, TIFFTAG_IMAGEDESCRIPTION, &desc);
!   if (desc && strlen(desc) > (size_t) 0) {
      /* kludge:  tiff library seems to return bizarre comments */
      if (strlen(desc)==4 && strcmp(desc, "\367\377\353\370")==0) {} 
      else {
***************
*** 1381,1388 ****
    }
  }
  
! /* #define Code2V(c, RB, RW, CR)  ((((c)-(int)RB)*(float)CR)/(float)(RW-RB)) */
! #define Code2V(c, RB, RW, CR)     ((((c)-RB)*(float)CR)/(float)(RW-RB))
  
  #define	CLAMP(f,min,max) \
      (int)((f)+.5 < (min) ? (min) : (f)+.5 > (max) ? (max) : (f)+.5)
--- 1381,1387 ----
    }
  }
  
! #define Code2V(c, RB, RW, CR)  ((((c)-(int)RB)*(float)CR)/(float)(RW-RB))
  
  #define	CLAMP(f,min,max) \
      (int)((f)+.5 < (min) ? (min) : (f)+.5 > (max) ? (max) : (f)+.5)

diff -c -r ../xv-3.10/xvtiffwr.c ./xvtiffwr.c
*** ../xv-3.10/xvtiffwr.c	Thu Dec 22 14:12:20 1994
--- ./xvtiffwr.c	Tue Jan 03 16:28:13 1995
***************
*** 70,76 ****
    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, h);
    TIFFSetField(tif, TIFFTAG_COMPRESSION, comp);
  
!   if (comment && strlen(comment)>0) {
      TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, comment);
    }
  
--- 70,76 ----
    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, h);
    TIFFSetField(tif, TIFFTAG_COMPRESSION, comp);
  
!   if (comment && strlen(comment) > (size_t) 0) {
      TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, comment);
    }
  
diff -c -r ../xv-3.10/bits/font5x9.h ./bits/font5x9.h
*** ../xv-3.10/bits/font5x9.h	Thu Dec 22 14:12:58 1994
--- ./bits/font5x9.h	Tue Jan 03 15:18:06 1995
***************
*** 21,27 ****
    {0x0e, 0x11, 0x19, 0x15, 0x13, 0x11, 0x0e, 0x00, 0x00},   /* 0 */
    {0x04, 0x06, 0x05, 0x04, 0x04, 0x04, 0x1f, 0x00, 0x00},   /* 1 */
    {0x0e, 0x11, 0x10, 0x0c, 0x02, 0x01, 0x1f, 0x00, 0x00},   /* 2 */
!   {0x0e, 0x11, 0x10, 0x0c, 0x02, 0x01, 0x1f, 0x00, 0x00},   /* 3 */
    {0x09, 0x09, 0x09, 0x1f, 0x08, 0x08, 0x08, 0x00, 0x00},   /* 4 */
    {0x1f, 0x01, 0x01, 0x0f, 0x10, 0x10, 0x0f, 0x00, 0x00},   /* 5 */
    {0x0e, 0x01, 0x01, 0x0f, 0x11, 0x11, 0x0e, 0x00, 0x00},   /* 6 */
--- 21,27 ----
    {0x0e, 0x11, 0x19, 0x15, 0x13, 0x11, 0x0e, 0x00, 0x00},   /* 0 */
    {0x04, 0x06, 0x05, 0x04, 0x04, 0x04, 0x1f, 0x00, 0x00},   /* 1 */
    {0x0e, 0x11, 0x10, 0x0c, 0x02, 0x01, 0x1f, 0x00, 0x00},   /* 2 */
!   {0x0f, 0x10, 0x10, 0x0e, 0x10, 0x10, 0x0f, 0x00, 0x00},   /* 3 */
    {0x09, 0x09, 0x09, 0x1f, 0x08, 0x08, 0x08, 0x00, 0x00},   /* 4 */
    {0x1f, 0x01, 0x01, 0x0f, 0x10, 0x10, 0x0f, 0x00, 0x00},   /* 5 */
    {0x0e, 0x01, 0x01, 0x0f, 0x11, 0x11, 0x0e, 0x00, 0x00},   /* 6 */
***************
*** 51,57 ****
    {0x11, 0x13, 0x13, 0x15, 0x19, 0x19, 0x11, 0x00, 0x00},   /* N */
    {0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e, 0x00, 0x00},   /* O */
    {0x0f, 0x11, 0x11, 0x0f, 0x01, 0x01, 0x01, 0x00, 0x00},   /* P */
!   {0x0f, 0x11, 0x11, 0x0f, 0x01, 0x01, 0x01, 0x00, 0x00},   /* Q */
    {0x0f, 0x11, 0x11, 0x0f, 0x05, 0x09, 0x11, 0x00, 0x00},   /* R */
    {0x0e, 0x11, 0x01, 0x0e, 0x10, 0x11, 0x0e, 0x00, 0x00},   /* S */
    {0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00},   /* T */
--- 51,57 ----
    {0x11, 0x13, 0x13, 0x15, 0x19, 0x19, 0x11, 0x00, 0x00},   /* N */
    {0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e, 0x00, 0x00},   /* O */
    {0x0f, 0x11, 0x11, 0x0f, 0x01, 0x01, 0x01, 0x00, 0x00},   /* P */
!   {0x0e, 0x11, 0x11, 0x11, 0x11, 0x15, 0x0e, 0x18, 0x00},   /* Q */
    {0x0f, 0x11, 0x11, 0x0f, 0x05, 0x09, 0x11, 0x00, 0x00},   /* R */
    {0x0e, 0x11, 0x01, 0x0e, 0x10, 0x11, 0x0e, 0x00, 0x00},   /* S */
    {0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00},   /* T */

diff -c -r ../xv-3.10/bits/xv_rev ./bits/xv_rev
*** ../xv-3.10/bits/xv_rev	Thu Dec 22 14:12:54 1994
--- ./bits/xv_rev	Fri Jan 13 17:37:10 1995
***************
*** 11,29 ****
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
!    0x00, 0x00, 0xa0, 0x03, 0x00, 0x04, 0x10, 0x00, 0x00, 0x20, 0x3c, 0x10,
!    0xe1, 0x41, 0x3c, 0x10, 0x01, 0x00, 0x20, 0x60, 0x04, 0x00, 0x04, 0x10,
!    0x00, 0x00, 0x30, 0x42, 0x90, 0x11, 0x42, 0x42, 0x18, 0x01, 0x00, 0xa0,
!    0x21, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x41, 0x48, 0x09, 0x20,
     0x41, 0x14, 0x01, 0xc7, 0x7b, 0xe0, 0x80, 0x09, 0xc5, 0x13, 0x27, 0x13,
!    0x20, 0x20, 0x08, 0x89, 0x23, 0x71, 0x14, 0x81, 0x28, 0x23, 0x60, 0x60,
!    0x8a, 0x24, 0x93, 0xe8, 0x12, 0x20, 0x10, 0x04, 0x65, 0x14, 0x4e, 0x12,
!    0x01, 0xae, 0x24, 0xa0, 0xe0, 0x51, 0xa4, 0x54, 0x28, 0x02, 0x20, 0x0c,
!    0x04, 0x15, 0x14, 0x40, 0x79, 0x81, 0x49, 0x24, 0x21, 0x11, 0x50, 0x44,
!    0x54, 0x28, 0x02, 0x20, 0x02, 0x04, 0x09, 0x92, 0xa0, 0x16, 0x5d, 0x0c,
!    0xa2, 0x20, 0x16, 0x23, 0x04, 0x52, 0x24, 0x12, 0x20, 0x41, 0x02, 0x09,
!    0x89, 0x11, 0x10, 0x83, 0xeb, 0x61, 0x20, 0xe8, 0x20, 0xe4, 0x91, 0x23,
!    0x12, 0x20, 0x7f, 0x02, 0xf1, 0x08, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--- 11,29 ----
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
!    0x00, 0x00, 0xa0, 0x03, 0x00, 0x04, 0x10, 0x00, 0x00, 0x84, 0x07, 0xf1,
!    0xe0, 0x41, 0x3c, 0x10, 0x01, 0x00, 0x20, 0x60, 0x04, 0x00, 0x04, 0x10,
!    0x00, 0x00, 0x46, 0x08, 0x09, 0x11, 0x42, 0x42, 0x18, 0x01, 0x00, 0xa0,
!    0x21, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x88, 0x04, 0x09, 0x22,
     0x41, 0x14, 0x01, 0xc7, 0x7b, 0xe0, 0x80, 0x09, 0xc5, 0x13, 0x27, 0x13,
!    0x04, 0x84, 0x80, 0x88, 0x23, 0x71, 0x14, 0x81, 0x28, 0x23, 0x60, 0x60,
!    0x8a, 0x24, 0x93, 0xe8, 0x12, 0x04, 0x42, 0x40, 0x70, 0x12, 0x4e, 0x12,
!    0x01, 0xae, 0x24, 0xa0, 0xe0, 0x51, 0xa4, 0x54, 0x28, 0x02, 0x84, 0x41,
!    0x30, 0x00, 0x12, 0x40, 0x79, 0x81, 0x49, 0x24, 0x21, 0x11, 0x50, 0x44,
!    0x54, 0x28, 0x02, 0x44, 0x40, 0x08, 0x04, 0x91, 0xa0, 0x16, 0x5d, 0x0c,
!    0xa2, 0x20, 0x16, 0x23, 0x04, 0x52, 0x24, 0x12, 0x24, 0x28, 0x04, 0x8d,
!    0x88, 0x11, 0x10, 0x83, 0xeb, 0x61, 0x20, 0xe8, 0x20, 0xe4, 0x91, 0x23,
!    0x12, 0xe4, 0x2f, 0xfc, 0x71, 0x08, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

diff -c -r ../xv-3.10/bits/xv_ver ./bits/xv_ver
*** ../xv-3.10/bits/xv_ver	Thu Dec 22 14:12:58 1994
--- ./bits/xv_ver	Fri Jan 13 17:34:48 1995
***************
*** 6,20 ****
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00,
!    0x00, 0x08, 0x00, 0x80, 0x1f, 0x04, 0x07, 0x00, 0x82, 0x00, 0x00, 0x08,
!    0x00, 0x80, 0x08, 0x86, 0x08, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00,
!    0x04, 0x45, 0x10, 0x00, 0x24, 0x98, 0xe4, 0x89, 0x23, 0x03, 0x1c, 0x24,
!    0x10, 0x00, 0x24, 0xa6, 0x97, 0x49, 0xe4, 0x02, 0x23, 0x24, 0x10, 0x00,
!    0x14, 0x9e, 0x50, 0x2a, 0x24, 0x02, 0x20, 0x24, 0x10, 0x00, 0x18, 0x81,
!    0x20, 0x2a, 0x24, 0x42, 0x20, 0x24, 0x08, 0x00, 0x08, 0xb1, 0x00, 0x29,
!    0x22, 0x42, 0x98, 0x24, 0x06, 0x00, 0x08, 0x8e, 0xf0, 0xc8, 0x21, 0x82,
!    0x87, 0xc4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--- 6,20 ----
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
!    0x00, 0x02, 0x00, 0xe0, 0x07, 0xc1, 0x01, 0x00, 0x41, 0x00, 0x00, 0x02,
!    0x00, 0x20, 0x82, 0x21, 0x02, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00,
!    0x41, 0x11, 0x04, 0x00, 0x12, 0x26, 0x79, 0xe2, 0xc8, 0x00, 0x07, 0x09,
!    0xc4, 0x01, 0x92, 0xe9, 0x65, 0x12, 0xb9, 0xc0, 0x08, 0x09, 0x24, 0x02,
!    0x8a, 0x27, 0x94, 0x0a, 0x89, 0x00, 0x08, 0x09, 0x84, 0x03, 0x4c, 0x20,
!    0x88, 0x0a, 0x89, 0x10, 0x08, 0x09, 0x62, 0x02, 0x44, 0x2c, 0x40, 0x8a,
!    0x88, 0x10, 0x26, 0x89, 0x11, 0x03, 0x84, 0x23, 0x3c, 0x72, 0x88, 0xe0,
!    0x21, 0x71, 0xe0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

diff -c -r ../xv-3.10/tiff/tif_fax3.c ./tiff/tif_fax3.c
*** ../xv-3.10/tiff/tif_fax3.c	Thu Dec 22 14:12:41 1994
--- ./tiff/tif_fax3.c	Fri Dec 23 17:39:28 1994
***************
*** 370,376 ****
   * Decode a code and return the associated run length.
   */
  static int32
! decode_run(TIFF* tif, const u_short fsm[][256])
  {
  	Fax3DecodeState *sp = (Fax3DecodeState *)tif->tif_data;
  	int state = sp->b.bit;
--- 370,376 ----
   * Decode a code and return the associated run length.
   */
  static int32
! decode_run(TIFF* tif, /*const*/ u_short fsm[][256])
  {
  	Fax3DecodeState *sp = (Fax3DecodeState *)tif->tif_data;
  	int state = sp->b.bit;

diff -c -r ../xv-3.10/tiff/tiffcomp.h ./tiff/tiffcomp.h
*** ../xv-3.10/tiff/tiffcomp.h	Thu Dec 22 14:12:42 1994
--- ./tiff/tiffcomp.h	Thu Jan 19 12:47:56 1995
***************
*** 67,72 ****
--- 67,76 ----
  #endif
  #endif
  
+ #ifdef isc
+ #define BSDTYPES
+ #endif
+ 
  /*
   * Workarounds for BSD lseek definitions.
   */

diff -c -r ../xv-3.10/vms/Makefile.mms ./vms/Makefile.mms
*** ../xv-3.10/vms/Makefile.mms	Thu Dec 22 14:12:37 1994
--- ./vms/Makefile.mms	Sun Dec 25 03:21:22 1994
***************
*** 11,30 ****
  #			15-APR-1993 for v3.00 (DEC C changes)
  #			25-MAY-1993 merged ALPHA.MMS and MAKEFILE.MMS
  #                       27-APR-1994 for v3.01
! #			 6-DEC-1994 for v3.10
  #
  # 	Modeled after the original Unix Makefile for xv
  #	Most of the Unix comments have been left intact to help debug any
  #	problems.
  
- #********
- #
- # REQUIRED USER EDIT POINT!!!!!!!!!!!
- #       You must put in the correct place where the root of this XV
- #       directory is located
- #
- #********
- XVDIR = [XV-3_10]
  
  # BE SURE TO SET THIS TO YOUR SITE'S DESTINATION DIRECTORY...!!!
  BINDIR = Sys$Disk:[]
--- 11,22 ----
  #			15-APR-1993 for v3.00 (DEC C changes)
  #			25-MAY-1993 merged ALPHA.MMS and MAKEFILE.MMS
  #                       27-APR-1994 for v3.01
! #			23-DEC-1994 for v3.10
  #
  # 	Modeled after the original Unix Makefile for xv
  #	Most of the Unix comments have been left intact to help debug any
  #	problems.
  
  
  # BE SURE TO SET THIS TO YOUR SITE'S DESTINATION DIRECTORY...!!!
  BINDIR = Sys$Disk:[]
***************
*** 57,64 ****
  #  VMS MMS USERS!!!
  #
  # 	if you don't use the JPEG package as supplied with XV, you
! # 	will need fill in the complete directory specifications for
! #	BOTH JPEGDIR and XVDIR!!
  #
  JPEG = ,HAVE_JPEG
  JPEGDIR = [.JPEG]
--- 49,55 ----
  #  VMS MMS USERS!!!
  #
  # 	if you don't use the JPEG package as supplied with XV, you
! # 	will need fill in the complete directory specifications for JPEGDIR.
  #
  JPEG = ,HAVE_JPEG
  JPEGDIR = [.JPEG]
***************
*** 72,79 ****
  # Also, comment out the LIBTIFF dependancy at the end of this Makefile
  #
  # 	if you don't use the TIFF package as supplied with XV, you
! # 	will need to fill in the complete directory specifications for
! #	BOTH TIFFDIR and XVDIR!!
  #
  TIFF = ,HAVE_TIFF
  TIFFDIR = [.TIFF]
--- 63,69 ----
  # Also, comment out the LIBTIFF dependancy at the end of this Makefile
  #
  # 	if you don't use the TIFF package as supplied with XV, you
! # 	will need to fill in the complete directory specifications for TIFFDIR.
  #
  TIFF = ,HAVE_TIFF
  TIFFDIR = [.TIFF]
***************
*** 135,145 ****
  	@- Define /NoLog Sys DECC$Library_Include
  .else
  .ifdef DECC
! ×	@- Define /NoLog Sys DECC$Library_Include
  .else
  	@- Define /NoLog Sys Sys$Library
  .endif
  	@- Define /NoLog X11 DECW$Include
  .endif
  
  all : 		$(BITS) $(OPTS) lib xv bggen decompress xcmap xvpictoppm help
--- 125,136 ----
  	@- Define /NoLog Sys DECC$Library_Include
  .else
  .ifdef DECC
! 	@- Define /NoLog Sys DECC$Library_Include
  .else
  	@- Define /NoLog Sys Sys$Library
  .endif
  	@- Define /NoLog X11 DECW$Include
+ 	@- XVDIR = F$Environment ("Default")
  .endif
  
  all : 		$(BITS) $(OPTS) lib xv bggen decompress xcmap xvpictoppm help
***************
*** 181,204 ****
  $(JPEGLIB) :
  	Set Default $(JPEGDIR)
  .ifdef ALPHA
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.$(MMS) /Macro = "ALPHA = 1" LIBJPEG.OLB
  .else
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.$(MMS) LIBJPEG.OLB
  .endif
! 	Set Default $(XVDIR)
  
  $(TIFFLIB) :
  	Set Default $(TIFFDIR)
  .ifdef ALPHA
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.$(MMS) /Macro = "ALPHA = 1" LIBTIFF.OLB
  .else
  .ifdef DECC
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.$(MMS) /Macro = "ALPHA = 1" LIBTIFF.OLB
  .else
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.$(MMS) LIBTIFF.OLB
  .endif
  .endif
! 	Set Default $(XVDIR)
  
  $(XVLIB) :	$(OBJS)
          If "''F$Search ("$(XVLIB)")'" .eqs. "" Then Library /Create $(XVLIB)
--- 172,195 ----
  $(JPEGLIB) :
  	Set Default $(JPEGDIR)
  .ifdef ALPHA
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.MMS /Macro = "ALPHA = 1" LIBJPEG.OLB
  .else
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.MMS LIBJPEG.OLB
  .endif
! 	Set Default 'XVDIR'
  
  $(TIFFLIB) :
  	Set Default $(TIFFDIR)
  .ifdef ALPHA
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.MMS /Macro = "ALPHA = 1" LIBTIFF.OLB
  .else
  .ifdef DECC
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.MMS /Macro = "ALPHA = 1" LIBTIFF.OLB
  .else
! 	$(MMS) $(MMSDEFAULTS) /Description = MAKEFILE.MMS LIBTIFF.OLB
  .endif
  .endif
! 	Set Default 'XVDIR'
  
  $(XVLIB) :	$(OBJS)
          If "''F$Search ("$(XVLIB)")'" .eqs. "" Then Library /Create $(XVLIB)
***************
*** 273,280 ****
  	- Delete /NoConfirm /NoLog *.obj;*,*.exe;*,*.log;*,*.olb;*,*.hlb;*
  	- Purge /NoConfirm /NoLog
  	Set Default [.JPEG]
! 	$(MMS) /Description = MAKEFILE.$(MMS) clean
  	- Delete /NoConfirm /NoLog *.olb;*
  	Set Default [-.TIFF]
! 	$(MMS) /Description = MAKEFILE.$(MMS) clean
  	Set Default [-]
--- 264,271 ----
  	- Delete /NoConfirm /NoLog *.obj;*,*.exe;*,*.log;*,*.olb;*,*.hlb;*
  	- Purge /NoConfirm /NoLog
  	Set Default [.JPEG]
! 	$(MMS) /Description = MAKEFILE.MMS clean
  	- Delete /NoConfirm /NoLog *.olb;*
  	Set Default [-.TIFF]
! 	$(MMS) /Description = MAKEFILE.MMS clean
  	Set Default [-]

diff -c -r ../xv-3.10/vms/README.vms ./vms/README.vms
*** ../xv-3.10/vms/README.vms	Thu Dec 22 14:12:37 1994
--- ./vms/README.vms	Sun Dec 25 03:21:22 1994
***************
*** 1,9 ****
!                                                               6-Dec-1994
  
!         First, read the release notes for the Unix version of XV as well
!     as these.  You can ignore the Unix specific comments,  but there are
!     references to the config.h file for local configurations and general
!     use of the program that are relevant to VMS users as well.
  
          Release notes  for  building XV (v3.10) on a VMS platform.  This
      includes the newer  ALPHA/VMS machines.  As in the previous release,
--- 1,10 ----
!                                                              23-DEC-1994
  
!         First, read the various INSTALL and README  files  for  the Unix
!     version of XV as well as these.   You  can  ignore the Unix specific
!     comments,  but there are references to the config.h file  for  local
!     configurations  and general use of the program that are relevant  to
!     VMS users as well.
  
          Release notes  for  building XV (v3.10) on a VMS platform.  This
      includes the newer  ALPHA/VMS machines.  As in the previous release,
***************
*** 24,42 ****
  
      SETUP.COM
          A simple  command  procedure  to  setup  the  final  compiled XV
!         package of programs.   It can be executed by itself or used with
!         many  of  the  commonly  available  SETUP  packages  (i.e.,  the
!         FERMILAB version).  If it  is  kept in the same directory as the
!         binaries, it will be able to  get  the  necessary  symbols setup
!         anywhere the directory structure is located WITHOUT  the need to
!         edit the command procedure.  Move them all  around  together and
!         you will be OK.
  
      MAKEFILE.MMS (in the top level directory)
!         This is a MMS description file for the VMS  MMS  utility.    YOU
!         SHOULD EDIT THE FILE FIRST TO MAKE SURE THE CUSTOMIZING FEATURES
!         ARE APPROPRIATE FOR YOUR SYSTEM.  For users without MMS you will
!         need to use MAKE_XV.COM instead.
  
  Installation Instructions:
  
--- 25,48 ----
  
      SETUP.COM
          A simple  command  procedure  to  setup  the  final  compiled XV
!         package of programs.    It helps the aux programs of XV be found
!         by DCL foreign symbols.    If  you don't want to use the names I
!         have chosen for them, you  should  be able to alter the CONFIG.H
!         file to point to the names  you  want  to use instead.  This has
!         not been tested by me, so let  me  know  if  you  try  this.  It
!         should work!  :) It can be executed  by itself or used with many
!         of  the  commonly  available  SETUP packages (i.e., the FERMILAB
!         version).  If it is kept in the same directory  as the binaries,
!         it will be able to get the necessary symbols setup anywhere  the
!         directory structure  is  located  WITHOUT  the  need to edit the
!         command procedure.   Move  them all around together and you will
!         be OK.
  
      MAKEFILE.MMS (in the top level directory)
!         This is a description file for  the  VMS  MMS  (or  the  PD MMK)
!         utility.    YOU SHOULD  BROWSE  THE  FILE FIRST TO MAKE SURE THE
!         CUSTOMIZING FEATURES ARE APPROPRIATE FOR YOUR SYSTEM.  For users
!         without MMS (MMK) you will need to use MAKE_XV.COM instead.
  
  Installation Instructions:
  
***************
*** 100,114 ****
          to  resolve  first!!!  Note specifically the references to  JPEG
          and TIFF.  This is also true for the MAKEFILE.MMS  in  the  JPEG
          sub-directory  and  the    MAKEFILE.MMS    file    in  the  TIFF
!         sub-directory.   Also  check the top-level directory name at the
!         top of the MMS  file.    You have to put in your local choice of
!         name.  (I was lazy in not trying to autodetect it, sorry.)
! 
          
!             EXCEPT  for  the destination of the binaries,  root  of  the
!         directory  tree, and X11 Window interface, I *think*  it  should
!         work  for  everyone  without  any  modifications.   (famous last
!         words...)
  
              When you  are  satisfied that everything is correct for your
          site, just type
--- 106,116 ----
          to  resolve  first!!!  Note specifically the references to  JPEG
          and TIFF.  This is also true for the MAKEFILE.MMS  in  the  JPEG
          sub-directory  and  the    MAKEFILE.MMS    file    in  the  TIFF
!         sub-directory.
          
!             EXCEPT for the  destination  of the binaries, and X11 Window
!         interface, I *think* it  should  work  for  everyone without any
!         modifications.  (famous last words...)
  
              When you  are  satisfied that everything is correct for your
          site, just type

diff -c -r ../xv-3.10/vms/tiff.patches ./vms/tiff.patches
*** ../xv-3.10/vms/tiff.patches	Thu Dec 22 14:12:38 1994
--- ./vms/tiff.patches	Thu Jan 19 12:47:14 1995
***************
*** 5,10 ****
--- 5,11 ----
  In tiff/Makefile.hpux, you need to add -D_HPUX_SOURCE to CFLAGS.
  Otherwise libtiff won't build under gcc or strict-ANSI cc.
  
+ In tiff/tiffcomp.h, add '#ifdef isc ...  #define BSDTYPES ...   #endif'
  
  Index: tiff/Makefile.mms
  *** /dev/null	Wed Dec 14 08:22:27 1994


*** /dev/null	Mon Jan 23 20:08:17 1995
--- BUGS	Thu Jan 19 13:10:07 1995
***************
*** 0 ****
--- 1,21 ----
+ DOCS:
+   File docs/xvdoc.ps has an error in the banner for page 2. The page title is 
+   "Section 2: The Image Window" when it should be "Section 1: Overview".
+ 
+   Add mention of '-pkludge' and 'popupKludge' 
+ 
+   Hall of Fame:  Lester Ingber should be 'ingber@alumni.caltech.edu'
+ 
+ 
+ From: James Ralston Crawford (qralston+@pitt.edu)
+   When deleting files in 'xv controls' window, it should also delete 
+   thumbnail file, if any
+ 
+ 
+ From: Mitchell Blank Jr <blankm@cae.wisc.edu>
+   (try an use schnauzer in /usr/feh/foo, where feh is rwx--x--x.  Need to
+    set a var each time chdir is successfully called (make xv_chdir).  
+    Then in xv_getwd, if getcwd() fails, try stat()'ing the var.  
+    If it exists, assume we're there, and return the var.  Otherwise, fall back
+    to other directories...
+ 

*** /dev/null	Mon Jan 23 20:08:17 1995
--- docs/vdcomp.man	Fri Jan 13 15:18:47 1995
***************
*** 0 ****
--- 1,82 ----
+ .\"
+ .\" $Id: vdcomp.man,v 1.2 1995/01/12 23:35:28 qralston Exp $
+ .\"
+ .\" $Log: vdcomp.man,v $
+ .\" Revision 1.2  1995/01/12  23:35:28  qralston
+ .\" Created from the information in the comments in vdcomp.c.
+ .\" James Ralston Crawford <qralston+@pitt.edu>
+ .\"
+ .TH vdcomp 1
+ .SH Name
+ \fIvdcomp\fP - decompress a compressed PDS image
+ .SH Synopsis
+ \fIvdcomp\fP [ infile ] [ outfile ] [ format-code ]
+ .SH Description
+ The \fIvdcomp\fP program reads a variable length compressed PDS image
+ and outputs a fixed length uncompressed image file in PDS format with
+ labels, image histogram, engineering table, line header table and an
+ image with PDS, FITS, VICAR or no labels.
+ .PP
+ If used on a non-byte-swapped machine the image histogram is
+ un-swapped.
+ .SH Options
+ \fIVdcomp\fP will prompt for any options that are not supplied on the
+ command-line.
+ .PP
+ \fIinfile\fP
+ .br
+ .RS
+ The name of compressed image file.
+ .RE
+ .PP
+ \fIoutfile\fP
+ .br
+ .RS
+ The name of uncompressed image file.
+ .RE
+ .PP
+ \fIformat-code\fP
+ .br
+ .RS
+ Select from the following list:
+ .br
+ .RS
+ \fI1\fP - SFDU/PDS format [default]
+ .br
+ \fI2\fP - FITS format
+ .br
+ \fI3\fP - VICAR format
+ .br
+ \fI4\fP - unlabelled binary array
+ .RE
+ .RE
+ .SH Limitations
+ This program has been tested on a VAX 780 (VMS 4.6), SUN Workstation
+ (UNIX 4.2, release 3.4), an IBM PC (MICROSOFT 5.1 compiler) and
+ Macintosh IIx using Lightspeed C version 3.0.  When converting to
+ other systems, check for portability conflicts.
+ .SH Credits
+ This program uses Kris Becker's subroutine DECOMP.C (which is included
+ in this program in a shortened version).
+ .SH History
+ bradley@cis.upenn.edu 06-23-94 ansi-fied program
+ .PP
+ datri@convex.com, 11-15-91 added recognition of - as stdout for output
+ filename; disabled various messages; directed messages to stderr;
+ added exit status
+ .PP
+ DEC89 Modified program to handle both Voyager and Viking images.
+ .PP
+ OCT89 Converted Voyager decompression program to handle Viking
+ compressed images.  Changed obuf to 'unsigned' to simplify computation
+ of checksum.
+ .PP
+ AUG89 Added code to get command line arguments for filenames and
+ output format; routines to free memory used by the Huffman tree);
+ fixed the SFDU label output length; and modified the I/O routines so
+ that the open for Host type 2 uses binary I/O.
+ .PP
+ JUN89 Fixed READVAR, to get length on 16-bit unswapped hosts.
+ .PP
+ JUL88 C driver to decompress standard Voyager Compressed images by
+ Mike Martin 1989/12/02.

*** /dev/null	Mon Jan 23 20:23:48 1995
--- docs/xv.ann	Tue Jan 03 13:58:15 1995
***************
*** 0 ****
--- 1,38 ----
+ They said it couldn't be done.  They said it never *would* be done.  
+ They smiled knowingly to themselves as each predicted release date 
+ inevitably passed by, unmarked by the emergence of a new version...
+ 
+ Well, who asked them!  And who do they think they are, anyhow!?!
+ 
+ Announcing the Exciting New Release of XV, Version 3.10!
+ 
+ Finally, all the stuff you've been waiting for:  image cut & paste, pixel
+ editing, text annotation (of a sort), nifty new algorithms, new image formats 
+ (Targa, XPM, FITS, XWD, IFF), improved schnauzing capabilities, a spiffy
+ new 'pad' command, and whatnot.  Plenty of whatnot.
+ 
+ Of course, we're particularly proud of our Exclusive 3-D Fish Technology.
+ 
+ At the moment, you can get this decidedly 'fine' piece of software via 
+ anonymous ftp on the following sites:
+ 
+    Hostname			Directory
+    --------			---------
+    ftp.cis.upenn.edu:		pub/xv
+    ftp.upenn.edu:		data/bradley
+    ftp.duke.edu:		pub/archive/xv
+    gatekeeper.dec.com:		pub/graphics/xv
+ 
+ The file is called 'xv-3.10.tar.gz' (or 'xv-3.10.tar.Z' if you don't have 
+ the 'gunzip' program).
+ 
+ BTW, if any of you fine folks can get these files put up on one of the major
+ ftp sites (wustl, gatekeeper, etc.) please do so, and let me know!
+ 
+ Enjoy!
+ 
+ John Bradley
+ 
+ -------------------------
+ Note:  These tar files (xv-3.10.tar.Z and xv-3.10.tar.gz) have been replaced
+   as of 12/22/94, as the initial ones wouldn't build correctly on VMS.