summaryrefslogtreecommitdiff
blob: 6a850959d24061d110207a78243205126caf570e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
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
diff -rNu ispell-3.1.clean/Makefile ispell-3.1/Makefile
--- ispell-3.1.clean/Makefile	Thu Oct 12 14:04:06 1995
+++ ispell-3.1/Makefile	Thu Aug 16 17:50:38 2001
@@ -165,6 +165,10 @@
 SHELL = /bin/sh
 MAKE = make
 
+ifeq ($(RPM_OPT_FLAGS),)
+	RPM_OPT_FLAGS	=	-O2
+endif
+
 #
 #	Set this to "-vx" in the make command line if you need to
 #	debug the complex shell commands.
@@ -315,7 +319,7 @@
 	  cd $$LIBDIR; \
 	  if [ $$MASTERHASH != $DEFHASH ]; then \
 	    rm -f $$DEFHASH; \
-	    ln $$MASTERHASH $$DEFHASH; \
+	    ln -s $$MASTERHASH $$DEFHASH; \
 	  fi
 
 ispell.info:	config.sh ispell.texinfo
@@ -505,8 +509,8 @@
 	  >> config.h
 
 #	Create a sample local.h if no such file currently exists
-local.h:
-	set +e; [ -r local.h ]  ||  cp local.h.samp local.h
+local.h:	local.h.samp
+	set +e; sed "s/.[{(]\?CFLAGS -pipe[})]\?/\$(CFLAGS) -pipe/" < local.h.samp > local.h
 
 msgs.h:	config.sh FRC
 	@. ./config.sh; \
@@ -521,7 +525,7 @@
 	    :; \
 	  else \
 	    set -x; \
-	    rm -f msgs.h; ln $$msgs msgs.h  ||  cp $$msgs msgs.h; \
+	    rm -f msgs.h; ln -s $$msgs msgs.h  ||  cp $$msgs msgs.h; \
 	  fi
 
 FRC:
diff -rNu ispell-3.1.clean/Makefile.Linux ispell-3.1/Makefile.Linux
--- ispell-3.1.clean/Makefile.Linux	Wed Dec 31 18:00:00 1969
+++ ispell-3.1/Makefile.Linux	Thu Aug 16 17:50:38 2001
@@ -0,0 +1,31 @@
+#
+#
+#
+# Makefile.Linux to integrate package into source tree of SuSE-Linux.
+#
+# Copyright (c) 1996 SuSE GmbH Fuerth, Germany.   
+#
+# please send bugfixes or comments to feedback@suse.de.
+#
+# Author: Werner fink, <werner@suse.de>
+#
+
+DICTDIR		=	/usr/share/dict
+
+all: compile
+
+local.h:  local.h.samp
+	make local.h
+
+compile: local.h
+	make all
+
+install:
+	make install
+	rm -f /usr/share/emacs/site-lisp/ispell.el*
+	mkdir -p /usr/doc/packages/ispell
+	mkdir -p /usr/lib/ispell/emacs
+	install -m 0444 suse/ispell-emacs-menu.el /usr/lib/ispell/
+	install -m 0444 suse/emacs/american.el /usr/lib/ispell/emacs/
+	install -m 0444 suse/emacs/british.el  /usr/lib/ispell/emacs/
+
diff -rNu ispell-3.1.clean/buildhash.c ispell-3.1/buildhash.c
--- ispell-3.1.clean/buildhash.c	Mon Jan 23 12:28:24 1995
+++ ispell-3.1/buildhash.c	Thu Aug 16 17:50:38 2001
@@ -211,7 +211,7 @@
     {
     register FILE *		houtfile;
     register struct dent *	dp;
-    int				strptr;
+    intptr_t			strptr;
     int				n;
     int				i;
     int				maxplen;
@@ -336,7 +336,7 @@
 	{
 	if (dp->next != 0)
 	    {
-	    int		x;
+	    intptr_t	x;
 	    x = dp->next - hashtbl;
 	    dp->next = (struct dent *)x;
 	    }
diff -rNu ispell-3.1.clean/correct.c ispell-3.1/correct.c
--- ispell-3.1.clean/correct.c	Thu Oct 12 14:04:06 1995
+++ ispell-3.1/correct.c	Thu Aug 16 17:50:38 2001
@@ -179,7 +179,7 @@
 
     if (interactive)
 	{
-	erase ();
+	ierase ();
 	helpout = stdout;
 	}
     else
@@ -304,7 +304,7 @@
     if (good (itok, 0, 0, 0, 0)  ||  compoundgood (itok, 0))
 	return;
 
-    erase ();
+    ierase ();
     (void) printf ("    %s", ctok);
     if (currentfile)
 	(void) printf (CORR_C_FILE_LABEL, currentfile);
@@ -338,9 +338,9 @@
     for (i = 0; i < pcount; i++)
 	{
 #ifdef BOTTOMCONTEXT
-	move (2 + (i % col_ht), (maxposslen + 8) * (i / col_ht));
+	imove (2 + (i % col_ht), (maxposslen + 8) * (i / col_ht));
 #else /* BOTTOMCONTEXT */
-	move (3 + contextsize + (i % col_ht), (maxposslen + 8) * (i / col_ht));
+	imove (3 + contextsize + (i % col_ht), (maxposslen + 8) * (i / col_ht));
 #endif /* BOTTOMCONTEXT */
 	if (i >= easypossibilities)
 	    (void) printf ("??: %s", possibilities[i]);
@@ -351,9 +351,9 @@
 	}
 
 #ifdef BOTTOMCONTEXT
-    move (li - contextsize - 1 - minimenusize, 0);
+    imove (li - contextsize - 1 - minimenusize, 0);
 #else /* BOTTOMCONTEXT */
-    move (2, 0);
+    imove (2, 0);
 #endif /* BOTTOMCONTEXT */
     for (i = contextsize;  --i > 0;  )
 	show_line (contextbufs[i], contextbufs[i], 0);
@@ -378,7 +378,7 @@
 
     if (minimenusize != 0)
 	{
-	move (li - 2, 0);
+	imove (li - 2, 0);
 	(void) printf (CORR_C_MINI_MENU);
 	}
 
@@ -389,10 +389,10 @@
 	    {
 	    case 'Z' & 037:
 		stop ();
-		erase ();
+		ierase ();
 		goto checkagain;
 	    case ' ':
-		erase ();
+		ierase ();
 		(void) fflush (stdout);
 		return;
 	    case 'q': case 'Q':
@@ -406,7 +406,7 @@
 		    c = 'y';
 		if (c == 'y' || c == 'Y')
 		    {
-		    erase ();
+		    ierase ();
 		    (void) fflush (stdout);
 		    done (0);
 		    }
@@ -414,7 +414,7 @@
 	    case 'i': case 'I':
 		treeinsert (ichartosstr (strtosichar (ctok, 0), 1),
 		 ICHARTOSSTR_SIZE, 1);
-		erase ();
+		ierase ();
 		(void) fflush (stdout);
 		changes = 1;
 		return;
@@ -422,14 +422,14 @@
 		itok = strtosichar (ctok, 0);
 		lowcase (itok);
 		treeinsert (ichartosstr (itok, 1), ICHARTOSSTR_SIZE, 1);
-		erase ();
+		ierase ();
 		(void) fflush (stdout);
 		changes = 1;
 		return;
 	    case 'a': case 'A':
 		treeinsert (ichartosstr (strtosichar (ctok, 0), 1),
 		  ICHARTOSSTR_SIZE, 0);
-		erase ();
+		ierase ();
 		(void) fflush (stdout);
 		return;
 	    case 'L' & 037:
@@ -441,12 +441,12 @@
 		{
 		char	buf[200];
 
-		move (li - 1, 0);
+		imove (li - 1, 0);
 		(void) putchar ('!');
 		if (getline (buf) == NULL)
 		    {
 		    (void) putchar (7);
-		    erase ();
+		    ierase ();
 		    (void) fflush (stdout);
 		    goto checkagain;
 		    }
@@ -457,11 +457,11 @@
 #else
 		(void) shellescape (buf);
 #endif
-		erase ();
+		ierase ();
 		goto checkagain;
 		}
 	    case 'r': case 'R':
-		move (li - 1, 0);
+		imove (li - 1, 0);
 		if (readonly)
 		    {
 		    (void) putchar (7);
@@ -485,7 +485,7 @@
 			}
 		    changes = 1;
 		    }
-		erase ();
+		ierase ();
 		if (icharlen (itok) <= minword)
 		    return;		/* Accept very short replacements */
 		goto checkagain;
@@ -509,10 +509,10 @@
 		    changes = 1;
 		    inserttoken (contextbufs[0],
 			begintoken, ctok, curchar);
-		    erase ();
+		    ierase ();
 		    if (readonly)
 			{
-			move (li - 1, 0);
+			imove (li - 1, 0);
 			(void) putchar (7);
 			(void) printf ("%s", CORR_C_READONLY);
 			(void) fflush (stdout);
@@ -528,23 +528,23 @@
 	    case 'l': case 'L':
 		{
 		char	buf[100];
-		move (li - 1, 0);
+		imove (li - 1, 0);
 		(void) printf (CORR_C_LOOKUP_PROMPT);
 		if (getline (buf) == NULL)
 		    {
 		    (void) putchar (7);
-		    erase ();
+		    ierase ();
 		    goto checkagain;
 		    }
 		(void) printf ("\r\n");
 		(void) fflush (stdout);
 		lookharder (buf);
-		erase ();
+		ierase ();
 		goto checkagain;
 		}
 	    case 'x': case 'X':
 		quit = 1;
-		erase ();
+		ierase ();
 		(void) fflush (stdout);
 		return;
 	    default:
diff -rNu ispell-3.1.clean/fields.c ispell-3.1/fields.c
--- ispell-3.1.clean/fields.c	Tue Jan 25 12:31:54 1994
+++ ispell-3.1/fields.c	Thu Aug 16 17:50:38 2001
@@ -34,6 +34,7 @@
 #include <stdio.h>
 #include "config.h"
 #include "fields.h"
+#include "ispell.h"
 
 field_t *	fieldread P ((FILE * file, char * delims,
 				  int flags, int maxf));
@@ -59,10 +60,14 @@
 #endif /* USG */
 
 extern void	free ();
-extern char *	malloc ();
-extern char *	realloc ();
+extern VOID *	malloc ();
+extern VOID *	realloc ();
 extern char *	strchr ();
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+extern size_t	strlen ();
+#else
 extern int	strlen ();
+#endif
 
 /*
  * Read one line of the given file into a buffer, break it up into
diff -rNu ispell-3.1.clean/ijoin.c ispell-3.1/ijoin.c
--- ispell-3.1.clean/ijoin.c	Wed Nov  2 12:44:21 1994
+++ ispell-3.1/ijoin.c	Thu Aug 16 17:50:38 2001
@@ -133,7 +133,9 @@
 static int		unpairable1 = 0; /* NZ if -a1 */
 static int		unpairable2 = 0; /* NZ if -a2 */
 
+#ifndef strcmp
 extern int	strcmp ();
+#endif
 
 int main (argc, argv)			/* Join files */
     int			argc;		/* Argument count */
diff -rNu ispell-3.1.clean/ispell.1X ispell-3.1/ispell.1X
--- ispell-3.1.clean/ispell.1X	Mon Jan 23 12:28:25 1995
+++ ispell-3.1/ispell.1X	Thu Aug 16 17:50:38 2001
@@ -373,7 +373,7 @@
 key will not.
 .PP
 References for the
-.IR tib (1)
+.I tib
 bibliography system, that is, text between a ``[.'' or ``<.'' and
 ``.]'' or ``.>'' will always be ignored in TeX/LaTeX mode.
 .PP
@@ -1307,6 +1307,17 @@
 Default dictionary to use, if no
 .B \-d
 flag is given.
+.IP CHARSET
+Only read if
+.B DICTIONARY
+is set. Default formatter type or character encoding to use, if no
+.B \-T
+or
+.B \-t
+or
+.B \-n
+flag is given.
+Usefull if formatter type is recognized in affix-file.
 .IP WORDLIST
 Personal dictionary file name
 .IP INCLUDE_STRING
@@ -1334,10 +1345,9 @@
 .IR look (1),
 .IR join (1),
 .IR sort (1),
-.IR sq (1L),
-.IR tib (1L),
-.IR ispell (4L),
-.IR english (4L)
+.IR sq (1),
+.IR ispell (5),
+.IR english (5)
 .SH BUGS
 It takes several to many seconds for
 .I ispell
diff -rNu ispell-3.1.clean/ispell.4 ispell-3.1/ispell.4
--- ispell-3.1.clean/ispell.4	Thu Oct 12 14:04:06 1995
+++ ispell-3.1/ispell.4	Thu Aug 16 17:50:38 2001
@@ -60,7 +60,7 @@
 .\" Get rid of all old RCS log lines in preparation for the 3.1 release.
 .\"
 .\"
-.TH ISPELL 4 local
+.TH ISPELL 5 local
 .SH NAME
 ispell \- format of ispell dictionaries and affix files
 .SH DESCRIPTION
diff -rNu ispell-3.1.clean/ispell.c ispell-3.1/ispell.c
--- ispell-3.1.clean/ispell.c	Thu Oct 12 14:04:07 1995
+++ ispell-3.1/ispell.c	Thu Aug 16 17:50:38 2001
@@ -134,6 +134,7 @@
 #include "version.h"
 #include <ctype.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 static void	usage P ((void));
 static void	initckch P ((char * wchars));
@@ -255,6 +256,7 @@
     static char	outbuf[BUFSIZ];
     int		argno;
     int		arglen;
+    int		dictdeft = 0;
 
     Cmd = *argv;
 
@@ -263,6 +265,7 @@
     p = getenv ("DICTIONARY");
     if (p != NULL)
 	{
+	dictdeft++;
 	if (index (p, '/') != NULL)
 	    (void) strcpy (hashname, p);
 	else
@@ -279,6 +282,7 @@
 	p = rindex (libdictname, '.');
 	if (p != NULL)
 	    *p = '\0';
+	preftype = getenv ("CHARSET");
 	}
     else
 	(void) sprintf (hashname, "%s/%s", LIBDIR, DEFHASH);
@@ -489,7 +493,7 @@
 		    usage ();
 		tflag = 0;		/* nroff/troff mode */
 		deftflag = 0;
-		if (preftype == NULL)
+		if (preftype == NULL || dictdeft)
 		    preftype = "nroff";
 		break;
 	    case 't':			/* TeX mode */
@@ -497,7 +501,7 @@
 		    usage ();
 		tflag = 1;
 		deftflag = 1;
-		if (preftype == NULL)
+		if (preftype == NULL || dictdeft)
 		    preftype = "tex";
 		break;
 	    case 'T':			/* Set preferred file type */
diff -rNu ispell-3.1.clean/ispell.h ispell-3.1/ispell.h
--- ispell-3.1.clean/ispell.h	Thu Oct 12 14:04:08 1995
+++ ispell-3.1/ispell.h	Thu Aug 16 17:50:38 2001
@@ -89,6 +89,7 @@
  */
 
 #include <stdio.h>
+#include <curses.h>
 
 #ifdef __STDC__
 #define P(x)	x
@@ -508,7 +509,11 @@
 # define EXTERN extern
 #endif
 
+#ifdef NCURSES_VERSION
+extern char *	BC;	/* backspace if not ^H */
+#else
 EXTERN char *	BC;	/* backspace if not ^H */
+#endif
 EXTERN char *	cd;	/* clear to end of display */
 EXTERN char *	cl;	/* clear display */
 EXTERN char *	cm;	/* cursor movement */
diff -rNu ispell-3.1.clean/ispell.texinfo ispell-3.1/ispell.texinfo
--- ispell-3.1.clean/ispell.texinfo	Wed Nov  2 12:44:23 1994
+++ ispell-3.1/ispell.texinfo	Thu Aug 16 17:55:05 2001
@@ -3,12 +3,17 @@
 @setfilename ispell.info
 @settitle ISPELL V3.1
 @comment %**end of header (This is for running Texinfo on a region.)
-
 @iftex
 @finalout
 @end iftex
 
 @ifinfo
+@format
+INFO-DIR-SECTION Utilities
+START-INFO-DIR-ENTRY
+* Spell Checker: (ispell). interactively check spelling of text files
+END-INFO-DIR-ENTRY
+@end format
 This file documents ISPELL, an interactive spelling corrector.
 
 Copyright 1988, 1990, 1991, 1992, 1993  Free Software Foundation, Inc.
@@ -73,6 +78,9 @@
 by the Foundation.
 
 @end titlepage
+
+@node Top, Emacs, (dir), (dir)
+
 @menu
 * Emacs::			Using ispell from emacs
 * Old Emacs::			Old Emacs
@@ -91,8 +99,6 @@
 * Multiple Dictionaries::	Using Multiple Dictionaries
 @end menu
 
-@node Top, Emacs, (dir), (dir)
-
 @iftex
 @chapter ISPELL
 @code{Ispell} is a program that helps you to correct spelling and
@@ -198,7 +204,7 @@
 the shell.
 @end table
 
-Of course, you can also type @kbd{@ctrl{G}} to stop the command without
+Of course, you can also type @kbd{C-g} to stop the command without
 changing anything.
 
 If you make a change that you don't like, just use emacs' normal undo
@@ -215,7 +221,7 @@
 
 When you finish with one word, the cursor is automatically moved to the
 next.  If you want to stop in the middle of the list type @kbd{X} or
-@kbd{@ctrl{G}}.
+@kbd{C-g}.
 
 @node Region, Multiple Dictionaries, Buffer, Emacs
 @subsection Checking a region
diff -rNu ispell-3.1.clean/languages/altamer/Makefile ispell-3.1/languages/altamer/Makefile
--- ispell-3.1.clean/languages/altamer/Makefile	Wed Nov  2 12:44:31 1994
+++ ispell-3.1/languages/altamer/Makefile	Thu Aug 16 17:50:38 2001
@@ -143,7 +143,7 @@
 	  cd $$LIBDIR; \
 	  chmod 644 english.aff $(HASHFILES); \
 	  for i in $(HASHFILES); do \
-	    ln $$i $(LANGUAGE).hash; \
+	    ln -s $$i $(LANGUAGE).hash; \
 	    break; \
 	  done
 	@. $(CONFIG); \
@@ -231,7 +231,7 @@
 
 $(DBUILD)altamer.sml:	$(DBUILD)english.sml
 	rm -f altamer.sml
-	ln english.sml altamer.sml
+	ln -s english.sml altamer.sml
 
 $(DBUILD)english.sml:	$(CONFIG)
 $(DBUILD)english.sml:	english.0
@@ -244,7 +244,7 @@
 
 $(DBUILD)altamer.sml+:	$(DBUILD)english.sml+
 	rm -f altamer.sml+
-	ln english.sml+ altamer.sml+
+	ln -s english.sml+ altamer.sml+
 
 $(DBUILD)english.sml+:	$(CONFIG)
 $(DBUILD)english.sml+:	english.0
@@ -257,7 +257,7 @@
 
 $(DBUILD)altamer.med:	$(DBUILD)english.med
 	rm -f altamer.med
-	ln english.med altamer.med
+	ln -s english.med altamer.med
 
 $(DBUILD)english.med:	$(CONFIG)
 $(DBUILD)english.med:	english.0
@@ -270,7 +270,7 @@
 
 $(DBUILD)altamer.med+:	$(DBUILD)english.med+
 	rm -f altamer.med+
-	ln english.med+ altamer.med+
+	ln -s english.med+ altamer.med+
 
 $(DBUILD)english.med+:	$(CONFIG)
 $(DBUILD)english.med+:	english.0
@@ -283,7 +283,7 @@
 
 $(DBUILD)altamer.lrg:	$(DBUILD)english.lrg
 	rm -f altamer.lrg
-	ln english.lrg altamer.lrg
+	ln -s english.lrg altamer.lrg
 
 $(DBUILD)english.lrg:	$(CONFIG)
 $(DBUILD)english.lrg:	english.0
@@ -296,7 +296,7 @@
 
 $(DBUILD)altamer.lrg+:	$(DBUILD)english.lrg+
 	rm -f altamer.lrg+
-	ln english.lrg+ altamer.lrg+
+	ln -s english.lrg+ altamer.lrg+
 
 $(DBUILD)english.lrg+:	$(CONFIG)
 $(DBUILD)english.lrg+:	english.0
@@ -309,7 +309,7 @@
 
 $(DBUILD)altamer.xlg:	$(DBUILD)english.xlg
 	rm -f altamer.xlg
-	ln english.xlg altamer.xlg
+	ln -s english.xlg altamer.xlg
 
 $(DBUILD)english.xlg:	$(CONFIG)
 $(DBUILD)english.xlg:	english.0
@@ -322,7 +322,7 @@
 
 $(DBUILD)altamer.xlg+:	$(DBUILD)english.xlg+
 	rm -f altamer.xlg+
-	ln english.xlg+ altamer.xlg+
+	ln -s english.xlg+ altamer.xlg+
 
 $(DBUILD)english.xlg+:	$(CONFIG)
 $(DBUILD)english.xlg+:	english.0
@@ -364,7 +364,7 @@
 	for i in english.0 english.1 english.2 english.3 \
 	  american.0 american.1 american.2 altamer.0 altamer.1 altamer.2 \
 	  british.0 british.1 british.2; do \
-	    ln -s $(DICTSRC)/$$i .  ||  ln $(DICTSRC)/$$i . \
+	    ln -s $(DICTSRC)/$$i .  ||  ln -s $(DICTSRC)/$$i . \
 	      ||  cp $(DICTSRC)/$$i .; \
 	done
 
diff -rNu ispell-3.1.clean/languages/american/Makefile ispell-3.1/languages/american/Makefile
--- ispell-3.1.clean/languages/american/Makefile	Mon Jan 23 12:28:29 1995
+++ ispell-3.1/languages/american/Makefile	Thu Aug 16 17:50:38 2001
@@ -146,7 +146,7 @@
 	  cd $$LIBDIR; \
 	  chmod 644 english.aff $(HASHFILES); \
 	  for i in $(HASHFILES); do \
-	    ln $$i $(LANGUAGE).hash; \
+	    ln -s $$i $(LANGUAGE).hash; \
 	    break; \
 	  done
 	@. $(CONFIG); \
@@ -234,7 +234,7 @@
 
 $(DBUILD)american.sml:	$(DBUILD)english.sml
 	rm -f american.sml
-	ln english.sml american.sml
+	ln -s english.sml american.sml
 
 $(DBUILD)english.sml:	$(CONFIG)
 $(DBUILD)english.sml:	english.0
@@ -246,7 +246,7 @@
 
 $(DBUILD)american.sml+:	$(DBUILD)english.sml+
 	rm -f american.sml+
-	ln english.sml+ american.sml+
+	ln -s english.sml+ american.sml+
 
 $(DBUILD)english.sml+:	$(CONFIG)
 $(DBUILD)english.sml+:	english.0
@@ -258,7 +258,7 @@
 
 $(DBUILD)american.med:	$(DBUILD)english.med
 	rm -f american.med
-	ln english.med american.med
+	ln -s english.med american.med
 
 $(DBUILD)english.med:	$(CONFIG)
 $(DBUILD)english.med:	english.0
@@ -270,7 +270,7 @@
 
 $(DBUILD)american.med+:	$(DBUILD)english.med+
 	rm -f american.med+
-	ln english.med+ american.med+
+	ln -s english.med+ american.med+
 
 $(DBUILD)english.med+:	$(CONFIG)
 $(DBUILD)english.med+:	english.0
@@ -282,7 +282,7 @@
 
 $(DBUILD)american.lrg:	$(DBUILD)english.lrg
 	rm -f american.lrg
-	ln english.lrg american.lrg
+	ln -s english.lrg american.lrg
 
 $(DBUILD)english.lrg:	$(CONFIG)
 $(DBUILD)english.lrg:	english.0
@@ -294,7 +294,7 @@
 
 $(DBUILD)american.lrg+:	$(DBUILD)english.lrg+
 	rm -f american.lrg+
-	ln english.lrg+ american.lrg+
+	ln -s english.lrg+ american.lrg+
 
 $(DBUILD)english.lrg+:	$(CONFIG)
 $(DBUILD)english.lrg+:	english.0
@@ -306,7 +306,7 @@
 
 $(DBUILD)american.xlg:	$(DBUILD)english.xlg
 	rm -f american.xlg
-	ln english.xlg american.xlg
+	ln -s english.xlg american.xlg
 
 $(DBUILD)english.xlg:	$(CONFIG)
 $(DBUILD)english.xlg:	english.0
@@ -318,7 +318,7 @@
 
 $(DBUILD)american.xlg+:	$(DBUILD)english.xlg+
 	rm -f american.xlg+
-	ln english.xlg+ american.xlg+
+	ln -s english.xlg+ american.xlg+
 
 $(DBUILD)english.xlg+:	$(CONFIG)
 $(DBUILD)english.xlg+:	english.0
@@ -360,7 +360,7 @@
 	for i in english.0 english.1 english.2 english.3 \
 	  american.0 american.1 american.2 altamer.0 altamer.1 altamer.2 \
 	  british.0 british.1 british.2; do \
-	    ln -s $(DICTSRC)/$$i .  ||  ln $(DICTSRC)/$$i . \
+	    ln -s $(DICTSRC)/$$i .  ||  ln -s $(DICTSRC)/$$i . \
 	      ||  cp $(DICTSRC)/$$i .; \
 	done
 
diff -rNu ispell-3.1.clean/languages/british/Makefile ispell-3.1/languages/british/Makefile
--- ispell-3.1.clean/languages/british/Makefile	Mon Jan 23 12:28:29 1995
+++ ispell-3.1/languages/british/Makefile	Thu Aug 16 17:50:38 2001
@@ -146,7 +146,7 @@
 	  cd $$LIBDIR; \
 	  chmod 644 english.aff $(HASHFILES); \
 	  for i in $(HASHFILES); do \
-	    ln $$i $(LANGUAGE).hash; \
+	    ln -s $$i $(LANGUAGE).hash; \
 	    break; \
 	  done
 	@. $(CONFIG); \
@@ -234,7 +234,7 @@
 
 $(DBUILD)british.sml:	$(DBUILD)english.sml
 	rm -f british.sml
-	ln english.sml british.sml
+	ln -s english.sml british.sml
 
 $(DBUILD)english.sml:	$(CONFIG)
 $(DBUILD)english.sml:	english.0
@@ -246,7 +246,7 @@
 
 $(DBUILD)british.sml+:	$(DBUILD)english.sml+
 	rm -f british.sml+
-	ln english.sml+ british.sml+
+	ln -s english.sml+ british.sml+
 
 $(DBUILD)english.sml+:	$(CONFIG)
 $(DBUILD)english.sml+:	english.0
@@ -258,7 +258,7 @@
 
 $(DBUILD)british.med:	$(DBUILD)english.med
 	rm -f british.med
-	ln english.med british.med
+	ln -s english.med british.med
 
 $(DBUILD)english.med:	$(CONFIG)
 $(DBUILD)english.med:	english.0
@@ -270,7 +270,7 @@
 
 $(DBUILD)british.med+:	$(DBUILD)english.med+
 	rm -f british.med+
-	ln english.med+ british.med+
+	ln -s english.med+ british.med+
 
 $(DBUILD)english.med+:	$(CONFIG)
 $(DBUILD)english.med+:	english.0
@@ -282,7 +282,7 @@
 
 $(DBUILD)british.lrg:	$(DBUILD)english.lrg
 	rm -f british.lrg
-	ln english.lrg british.lrg
+	ln -s english.lrg british.lrg
 
 $(DBUILD)english.lrg:	$(CONFIG)
 $(DBUILD)english.lrg:	english.0
@@ -294,7 +294,7 @@
 
 $(DBUILD)british.lrg+:	$(DBUILD)english.lrg+
 	rm -f british.lrg+
-	ln english.lrg+ british.lrg+
+	ln -s english.lrg+ british.lrg+
 
 $(DBUILD)english.lrg+:	$(CONFIG)
 $(DBUILD)english.lrg+:	english.0
@@ -306,7 +306,7 @@
 
 $(DBUILD)british.xlg:	$(DBUILD)english.xlg
 	rm -f british.xlg
-	ln english.xlg british.xlg
+	ln -s english.xlg british.xlg
 
 $(DBUILD)english.xlg:	$(CONFIG)
 $(DBUILD)english.xlg:	english.0
@@ -318,7 +318,7 @@
 
 $(DBUILD)british.xlg+:	$(DBUILD)english.xlg+
 	rm -f british.xlg+
-	ln english.xlg+ british.xlg+
+	ln -s english.xlg+ british.xlg+
 
 $(DBUILD)english.xlg+:	$(CONFIG)
 $(DBUILD)english.xlg+:	english.0
diff -rNu ispell-3.1.clean/languages/deutsch/Makefile ispell-3.1/languages/deutsch/Makefile
--- ispell-3.1.clean/languages/deutsch/Makefile	Wed Nov  2 12:44:32 1994
+++ ispell-3.1/languages/deutsch/Makefile	Thu Aug 16 17:50:38 2001
@@ -95,8 +95,31 @@
 # If you change DICTOPTIONS in your local.h file, you will have to do
 # "make dictclean" to clear out the old dictionary before you re-make.
 #
-DICTALWAYS	=	adjektive.txt worte.txt verben.txt
-DICTOPTIONS	=	Use_LANGUAGES_from_config.X
+DICTALWAYS	= worte.txt \
+		  verben.txt \
+		  adjektive.txt \
+		  klein.txt \
+		  imperat.txt \
+		  abkuerz.txt \
+		  vornamen.txt \
+		  geographie.txt \
+		  latein.txt \
+		  oesterreich.txt \
+		  informatik.txt \
+		  infoabk.txt \
+		  elektronik.txt \
+		  alphabeta.txt \
+		  roemisch.txt \
+		  orgabk.txt \
+		  marken.txt
+
+DICTXLARGE	= worte2.txt \
+		  zusammen.txt \
+		  technik.txt \
+		  compeng.txt \
+		  geogra2.txt \
+		  vornam2.txt \
+		  namen.txt
 
 #
 # The following variables may be overridden by the superior Makefile,
@@ -112,26 +135,34 @@
 #
 SHELLDEBUG = +vx
 
-all:	deutsch.hash
+all:	deutschmed.hash deutschlxg.hash
 
 install: all $(CONFIG)
 	@. $(CONFIG); \
 	  set -x; \
 	  [ -d $$LIBDIR ]  ||  (mkdir $$LIBDIR; chmod 755 $$LIBDIR); \
-	  cd $$LIBDIR; rm -f deutsch.aff deutsch.hash
+	  cd $$LIBDIR; rm -f deutsch.aff deutschmed.hash deutschlxg.hash
 	@. $(CONFIG); \
 	  set -x; \
-	  cp deutsch.aff deutsch.hash $$LIBDIR
+	  cp deutsch.aff deutschmed.hash deutschlxg.hash $$LIBDIR
 	@. $(CONFIG); \
 	  set -x; \
 	  cd $$LIBDIR; \
-	  chmod 644 deutsch.aff deutsch.hash
+	  chmod 644 deutsch.aff deutschmed.hash deutschlxg.hash; \
+	  ln -sf deutschlxg.hash deutsch.hash
 
-deutsch.hash:	$(BUILDHASH) $(AFFIXES) deutsch.dict
-	rm -f deutsch.hash
-	$(BUILDHASH) deutsch.dict $(AFFIXES) deutsch.hash
+deutschmed.hash:	$(BUILDHASH) $(AFFIXES) deutsch.med
+	rm -f deutschmed.hash
+	$(BUILDHASH) deutsch.med $(AFFIXES) deutschmed.hash
 
-$(AFFIXES):	deutsch.7bit $(FIX8BIT)
+deutschlxg.hash:	$(BUILDHASH) $(AFFIXES) deutsch.lxg
+	rm -f deutschlxg.hash
+	$(BUILDHASH) deutsch.lxg $(AFFIXES) deutschlxg.hash
+
+$(AFFIXES):	deutsch.aff-hk $(FIX8BIT)
+	$(FIX8BIT) -8 < deutsch.aff-hk > $(AFFIXES)
+
+deutsch-isp.aff:	deutsch.7bit $(FIX8BIT)
 	$(FIX8BIT) -8 < deutsch.7bit > $(AFFIXES)
 
 deutsch-alt.aff:	deutsch-alt.7bit $(FIX8BIT)
@@ -140,10 +171,17 @@
 $(FIX8BIT):	../fix8bit.c
 	cd ..; $(MAKE) fix8bit
 
-deutsch.dict:	$(DICTALWAYS) $(DICTOPTIONS)
-	. $(CONFIG); \
-	  eval sort -f -o deutsch.dict $$MAKE_SORTTMP \
-	    $(DICTALWAYS) $(DICTOPTIONS)
+deutsch.med:	$(DICTALWAYS) README $(AFFIXES)
+	@. $(CONFIG); \
+	  set -x; \
+	  eval sort -u -t/ +0f -1 +0 $$MAKE_SORTTMP -o deutsch.med \
+	    $(DICTALWAYS)
+
+deutsch.lxg:	$(DICTALWAYS) $(DICTXLARGE) README $(AFFIXES)
+	@. $(CONFIG); \
+	  set -x; \
+	  eval sort -u -t/ +0f -1 +0 $$MAKE_SORTTMP -o deutsch.lxg \
+	    $(DICTALWAYS) $(DICTXLARGE)
 
 #
 #	The following dependency can be executed when ispell is unpacked,
@@ -179,7 +217,7 @@
 #	dictionary file.
 #
 dictclean:
-	rm -f deutsch.dict
+	rm -f deutsch.med deutsch.lxg
 
 #	required to be present in all other language Makefiles as
 #	well, even though it doesn't have to do anything in those
diff -rNu ispell-3.1.clean/languages/english/english.4l ispell-3.1/languages/english/english.4l
--- ispell-3.1.clean/languages/english/english.4l	Tue Jan 25 12:31:59 1994
+++ ispell-3.1/languages/english/english.4l	Thu Aug 16 17:50:38 2001
@@ -42,17 +42,17 @@
 .\" Get rid of all old RCS log lines in preparation for the 3.1 release.
 .\"
 .\"
-.TH ENGLISH 4
+.TH ENGLISH 5
 .SH NAME
-english \- flag format for English \fIokspell\fP dictionaries
+english \- flag format for English \fIispell\fP dictionaries
 .SH DESCRIPTION
 English dictionaries for
-.IR okspell (1)
+.IR ispell (1)
 supports 3 prefix and 14 suffix flags.
 For a detailed description of how
-.I okspell
+.I ispell
 handles flags and capitalization, see
-.IR okspell (4).
+.IR ispell (5).
 This manual page only describes flags usable in dictionaries built
 using the
 .I english.aff
@@ -71,7 +71,7 @@
 .PP
 In the following list, an asterisk indicates that a flag participates in
 cross-product formation (see
-.IR okspell (4)).
+.IR ispell (5)).
 .PP
 The meaning of the prefix flags is as follows:
 .IP "*A"
@@ -271,4 +271,4 @@
 .fi
 .RE
 .SH "SEE ALSO"
-okspell(1), okspell(4)
+ispell(1), ispell(5)
diff -rNu ispell-3.1.clean/languages/english/english.aff ispell-3.1/languages/english/english.aff
--- ispell-3.1.clean/languages/english/english.aff	Mon Jan 23 12:28:30 1995
+++ ispell-3.1/languages/english/english.aff	Thu Aug 16 17:50:38 2001
@@ -68,6 +68,7 @@
 wordchars [a-z] [A-Z]
 
 altstringtype "tex" "tex" ".tex" ".bib"
+altstringtype "latin1" "nroff" ".txt" ".tex"
 
 # Here's a record of flags used, in case you want to add new ones.
 # Right now, we fit within the minimal MASKBITS definition.
diff -rNu ispell-3.1.clean/languages/espanol/Makefile ispell-3.1/languages/espanol/Makefile
--- ispell-3.1.clean/languages/espanol/Makefile	Mon Jan 23 12:28:45 1995
+++ ispell-3.1/languages/espanol/Makefile	Thu Aug 16 17:50:38 2001
@@ -56,17 +56,18 @@
 SHELL = /bin/sh
 MAKE = make
 
+CONFIG		=	../../config.sh
 PATHADDER	=	../..
-BUILDHASH	=	buildhash
-UNSQ		=	unsq
-FIX8BIT		=	fix8bit
+BUILDHASH	=	../../buildhash
+UNSQ		=	../../unsq
+FIX8BIT		=	../fix8bit
 
 #
 # The following variables make it easy to adapt this Makefile to
 # numerous languages.
 #
 LANGUAGE	=	espanol
-DICTIONARY	=	$(LANGUAGE).words
+DICTIONARY	=	$(LANGUAGE).dict
 HASHFILE	=	$(LANGUAGE).hash
 
 #
@@ -76,6 +77,19 @@
 AFFIXES	=	./$(LANGUAGE).aff
 
 all:	$(HASHFILE)
+
+install: all $(CONFIG)
+	@. $(CONFIG); \
+	  set -x; \
+	  [ -d $$LIBDIR ]  ||  (mkdir $$LIBDIR; chmod 755 $$LIBDIR); \
+	  cd $$LIBDIR; rm -f $(LANGUAGE).aff $(HASHFILE)
+	@. $(CONFIG); \
+	  set -x; \
+	  cp $(LANGUAGE).aff $(HASHFILE) $$LIBDIR
+	@. $(CONFIG); \
+	  set -x; \
+	  cd $$LIBDIR; \
+	  chmod 644 $(LANGUAGE).aff $(HASHFILE)
 
 $(HASHFILE):	$(AFFIXES) $(DICTIONARY)
 	rm -f $(HASHFILE)
diff -rNu ispell-3.1.clean/languages/fix8bit.c ispell-3.1/languages/fix8bit.c
--- ispell-3.1.clean/languages/fix8bit.c	Tue Jan 25 12:32:02 1994
+++ ispell-3.1/languages/fix8bit.c	Thu Aug 16 17:50:38 2001
@@ -160,9 +160,9 @@
 		    if (ch >= '0'  &&  ch <= '9')
 			backch = (backch << 4) | (ch - '0');
 		    else if (ch >= 'a'  &&  ch <= 'f')
-			backch = (ch << 4) - 'a' + 0xA;
+			backch = (backch << 4) | (ch - 'a' + 0xA);
 		    else if (ch >= 'A'  &&  ch <= 'F')
-			backch = (ch << 4) - 'A' + 0xA;
+			backch = (backch << 4) | (ch - 'A' + 0xA);
 		    else
 			{
 			(void) putchar (backch);
diff -rNu ispell-3.1.clean/languages/portugues/Makefile ispell-3.1/languages/portugues/Makefile
--- ispell-3.1.clean/languages/portugues/Makefile	Thu Oct 12 14:04:47 1995
+++ ispell-3.1/languages/portugues/Makefile	Thu Aug 16 17:50:38 2001
@@ -50,10 +50,11 @@
 SHELL = /bin/sh
 MAKE = make
 
+CONFIG		=	../../config.sh
 PATHADDER	=	../..
-BUILDHASH	=	buildhash
-UNSQ		=	unsq
-FIX8BIT		=	fix8bit
+BUILDHASH	=	../../buildhash
+UNSQ		=	../../unsq
+FIX8BIT		=	../fix8bit
 
 #
 # The following variables make it easy to adapt this Makefile to
@@ -70,6 +71,19 @@
 AFFIXES	=	./$(LANGUAGE).aff
 
 all:	$(HASHFILE)
+
+install: all $(CONFIG)
+	@. $(CONFIG); \
+	  set -x; \
+	  [ -d $$LIBDIR ]  ||  (mkdir $$LIBDIR; chmod 755 $$LIBDIR); \
+	  cd $$LIBDIR; rm -f $(LANGUAGE).aff $(HASHFILE)
+	@. $(CONFIG); \
+	  set -x; \
+	  cp $(LANGUAGE).aff $(HASHFILE) $$LIBDIR
+	@. $(CONFIG); \
+	  set -x; \
+	  cd $$LIBDIR; \
+	  chmod 644 $(LANGUAGE).aff $(HASHFILE)
 
 $(HASHFILE):	$(AFFIXES) $(DICTIONARY)
 	rm -f $(HASHFILE)
diff -rNu ispell-3.1.clean/local.h.samp ispell-3.1/local.h.samp
--- ispell-3.1.clean/local.h.samp	Mon Jan 23 12:28:27 1995
+++ ispell-3.1/local.h.samp	Thu Aug 16 17:50:38 2001
@@ -80,19 +80,49 @@
  */
 
 #define MINIMENU	/* Display a mini-menu at the bottom of the screen */
-#define NO8BIT		/* Remove this if you use ISO character sets */
-#undef USG		/* Define this on System V */
+#undef  NO8BIT		/* Remove this if you use ISO character sets */
+#define USG		/* Define this on System V */
+#define HAS_RENAME
+#define INSTALL         "install"
 
 /*
  * Important directory paths
  */
-#define BINDIR	"/usr/local/bin"
-#define LIBDIR	"/usr/local/lib"
-#define ELISPDIR "/usr/local/lib/emacs/site-lisp"
-#define TEXINFODIR "/usr/local/info"
-#define MAN1DIR	"/usr/local/man/man1"
-#define MAN4DIR	"/usr/local/man/man4"
+#define BINDIR		"/usr/bin"
+#define LIBDIR		"/usr/lib/ispell"
+#define ELISPDIR	"/usr/share/emacs/site-lisp"
+#define TEXINFODIR	"/usr/share/info"
+#define WORDS		"/usr/share/dict/words"
+#define MAN1DIR		"/usr/share/man/man1"
+#define MAN4DIR		"/usr/share/man/man5"
+#define MAN4EXT		".5"
 
 /*
  * Place any locally-required #include statements here
  */
+#define CC		"gcc"
+#define YACC		"bison -y"
+#define CFLAGS		"$CFLAGS -pipe"
+#define TERMLIB		"-lncurses"
+#define LANGUAGES       "{american,MASTERDICTS=american.xlg,HASHFILES=americanxlg.hash,EXTRADICT=} {british,MASTERDICTS=british.xlg,HASHFILES=britishxlg.hash,EXTRADICT=} {american,MASTERDICTS=american.med,HASHFILES=americanmed.hash,EXTRADICT=} {british,MASTERDICTS=british.med,HASHFILES=britishmed.hash,EXTRADICT=}"
+
+/*
+ * Settings
+ */
+
+#define MASKBITS	64
+#define INPUTWORDLEN	128
+#define MAXAFFIXLEN	32
+#define MAXSTRINGCHARS	128
+#define MASTERHASH	"britishxlg.hash"
+#define HAS_RENAME
+#define DEFNOBACKUPFLAG 0
+#define BAKEXT          "~"
+#define DEFTEXFLAG      1
+#define EGREPCMD	"/usr/bin/grep -E"
+#define LOOK		"/usr/bin/look -df"
+#define MAKE_SORTTMP	"-T ${TMPDIR-/var/tmp}"
+#define SORTPERSONAL	2000
+#define USESH
+#define COMMANDFORSPACE
+
diff -rNu ispell-3.1.clean/lookup.c ispell-3.1/lookup.c
--- ispell-3.1.clean/lookup.c	Mon Jan 23 12:28:27 1995
+++ ispell-3.1/lookup.c	Thu Aug 16 17:50:38 2001
@@ -59,6 +59,7 @@
 #include "ispell.h"
 #include "proto.h"
 #include "msgs.h"
+#include <unistd.h>
 
 int		linit P ((void));
 #ifdef INDEXDUMP
@@ -212,22 +213,22 @@
 	    if (dp->word == (char *) -1)
 		dp->word = NULL;
 	    else
-		dp->word = &hashstrings [ (int)(dp->word) ];
+		dp->word = &hashstrings [ (intptr_t)(dp->word) ];
 	    if (dp->next == (struct dent *) -1)
 		dp->next = NULL;
 	    else
-		dp->next = &hashtbl [ (int)(dp->next) ];
+		dp->next = &hashtbl [ (intptr_t)(dp->next) ];
 	    }
 	}
 
     for (i = numsflags + numpflags, entry = sflaglist; --i >= 0; entry++)
 	{
 	if (entry->stripl)
-	    entry->strip = (ichar_t *) &hashstrings[(int) entry->strip];
+	    entry->strip = (ichar_t *) &hashstrings[(intptr_t) entry->strip];
 	else
 	    entry->strip = NULL;
 	if (entry->affl)
-	    entry->affix = (ichar_t *) &hashstrings[(int) entry->affix];
+	    entry->affix = (ichar_t *) &hashstrings[(intptr_t) entry->affix];
 	else
 	    entry->affix = NULL;
 	}
diff -rNu ispell-3.1.clean/parse.y ispell-3.1/parse.y
--- ispell-3.1.clean/parse.y	Mon Nov 21 12:26:05 1994
+++ ispell-3.1/parse.y	Thu Aug 16 17:50:38 2001
@@ -677,7 +677,10 @@
 				      toupper (hashheader.compoundbit);
 #endif /* MASKBITS */
 #if MASKBITS <= 64
-				if (!isalpha (hashheader.compoundbit))
+				/*
+				 * isalpha() does not include char 91 to 96
+				 */
+				if (!(hashheader.compoundbit >= 'A' && hashheader.compoundbit <= 'z'))
 				    yyerror (PARSE_Y_BAD_FLAG);
 #endif /* MASKBITS */
 				hashheader.compoundbit =
@@ -870,7 +873,10 @@
 				flagbit = toupper (flagbit);
 #endif /* MASKBITS */
 #if MASKBITS <= 64
-			    if (!isalpha (flagbit))
+			    /*
+			     * isalpha() does not include char 91 to 96
+			     */
+			    if (!(flagbit >= 'A' && flagbit <= 'z'))
 				yyerror (PARSE_Y_BAD_FLAG);
 #endif /* MASKBITS */
 			    flagbit = CHARTOBIT (flagbit);
@@ -902,7 +908,10 @@
 				flagbit = toupper (flagbit);
 #endif /* MASKBITS */
 #if MASKBITS <= 64
-			    if (!isalpha (flagbit))
+			    /*
+			     * isalpha() does not include char 91 to 96
+			     */
+			    if (!(flagbit >= 'A' && flagbit <= 'z'))
 				yyerror (PARSE_Y_BAD_FLAG);
 #endif /* MASKBITS */
 			    flagbit = CHARTOBIT (flagbit);
diff -rNu ispell-3.1.clean/proto.h ispell-3.1/proto.h
--- ispell-3.1.clean/proto.h	Wed Nov  2 12:44:27 1994
+++ ispell-3.1/proto.h	Thu Aug 16 17:50:38 2001
@@ -73,6 +73,21 @@
  *
  */
 
+#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 0) || (__GLIBC__ > 2))
+# include <stdint.h>
+#endif
+#if defined(__WORDSIZE) && __WORDSIZE == 64
+# ifndef intptr_t
+typedef long int	intptr_t;
+#  define intptr_t intptr_t
+# endif
+//#else
+//# ifndef intptr_t
+//typedef int		intptr_t;
+//#  define intptr_t intptr_t
+//# endif
+#endif
+
 extern int	addvheader P ((struct dent * ent));
 extern void	askmode P ((void));
 extern void	backup P ((void));
@@ -93,7 +108,7 @@
 extern char *	do_regex_lookup P ((char * expr, int whence));
 extern SIGNAL_TYPE done P ((int));
 extern void	dumpmode P ((void));
-extern void	erase P ((void));
+extern void	ierase P ((void));
 extern int	expand_pre P ((char * croot, ichar_t * rootword,
 		  MASKTYPE mask[], int option, char *extra));
 extern int	expand_suf P ((char * croot, ichar_t * rootword,
@@ -125,7 +140,7 @@
 extern void	lowcase P ((ichar_t * string));
 extern int	makedent P ((char * lbuf, int lbuflen, struct dent * d));
 extern void	makepossibilities P ((ichar_t * word));
-extern void	move P ((int row, int col));
+extern void	imove P ((int row, int col));
 extern void	normal P ((void));
 extern char *	printichar P ((int in));
 #ifdef USESH
@@ -250,9 +265,12 @@
 extern int	system P ((const char * command));
 extern int	unlink P ((const char * file));
 extern int	wait P ((int * statusp));
+
 #else /* NO_STDLIB_H */
+#include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+//#include <strings.h>
+
 #endif /* NO_STDLIB_H */
 
 #ifndef USG
diff -rNu ispell-3.1.clean/sq.c ispell-3.1/sq.c
--- ispell-3.1.clean/sq.c	Tue Jan 25 12:32:18 1994
+++ ispell-3.1/sq.c	Thu Aug 16 17:50:38 2001
@@ -49,6 +49,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 
 #ifdef __STDC__
 #define P(x)	x
diff -rNu ispell-3.1.clean/suse/LIESMICH ispell-3.1/suse/LIESMICH
--- ispell-3.1.clean/suse/LIESMICH	Wed Dec 31 18:00:00 1969
+++ ispell-3.1/suse/LIESMICH	Thu Aug 16 17:50:38 2001
@@ -0,0 +1,107 @@
+
+  Kurzbeschreibung
+  ================
+
+Ispell ist ein schnelles bildschirmorientiertes Programm zur
+�berpr�fung der Rechtschreibung.  Als Vorbild diente das spell
+Programm vom ITS (auf Twenex Systemen auch ispell genannt).
+Es zeigt gefundene Fehler im textuellen Kontext an und schl�gt m�gliche
+Verbesserungen vor.
+
+Im Vergleich mit dem UNIX-Programm spell ist ispell schneller und
+wesentlich einfacher zu benutzen. Ispell kann neben der englischen
+auch andere Sprachen. Ispell hat eine lange Geschichte, und viele
+Entwickler haben daran gearbeitet. Mehr �ber die Entwicklungsgeschichte
+finden Sie der Manual-Seite von ispell. 
+
+Die allgemeinste Gebrauchsweise ist `ispell filename'. In diesem Fall
+zeigt ispell jedes Wort, das nicht im W�rterbuch steht, in der
+obersten Zeile an und erlaubt es, dieses zu �ndern. Stehen im
+W�rterbuch �hnlich geschriebene W�rter (solche, die sich nur durch
+einen Buchstaben, ein Paar von vertauschten Buchstaben oder
+Leerstellen unterscheiden), so werden diese in den darunterliegenden
+Zeilen angezeigt.  Ebenso schl�gt ispell W�rter vor, welche vom
+gleichen Stamm abgeleitet werden. Die Zeile, die das Wort enth�lt, und
+die vorhergehende Zeile werden am unteren Rand des Bildschirms
+dargestellt.  Wenn m�glich, wird das Wort invertiert dargestellt. Man
+kann nun das Wort vollst�ndig ersetzen oder eines der vorgeschlagenen
+W�rter w�hlen.
+
+Die Default-Sprache ist Englisch, was durch die Environment-Variable
+DICTIONARY oder durch die Verwendung der Option `-d <Sprache>'
+ge�ndert werden kann.  Durch die Option `-T <Format>' kann auf
+verschiedene Umlautformate bzw. Umlautkodierungen umgeschaltet werden.
+So erm�glicht `-T latin1' bei der deutsche Sprache das Lesen deutscher
+Umlaute nach der ISO-Spezifikation 8859-1.  Wenn nach `-T latin1' noch
+die Option `-t' gesetzt ist, so k�nnen mit ispell (Version 3.1.20)
+auch (La)TeX-Texte mit echten ISO-8859-1-Umlauten auf Rechtschreibung
+�berpr�ft werden.  Ohne die Option `-T latin1' achtet ispell auf die
+Endungen der zu �berpr�fenden Dateien.  Welche Endungen und
+Kodierungen f�r die `-T'-Option m�glich sind, k�nnen Sie aus den
+`.aff'-Dateien der gew�hlten Sprache unter /usr/lib/ispell/ erfahren.
+Alle Silbenregeln und die Umlautkodierungen werden in diesen
+sprachabh�ngigen `.aff'-Dateien festgelegt. So ist es beispielsweise
+bei Verwendung der deutschen Sprache nicht mehr n�tig, ispell die
+Umlaute durch die Option `-w' bekannt zu geben.
+
+Wir haben neben den englischen auch andere Lexika zum Installieren
+
+Ispell verwendet diese Worttabellen nicht direkt, sondern �ber die
+gr��eren Hash-Dateien, die ein schnelleres Lesen erm�glichen.  Wie Sie
+solche Hash-Dateien selbst erstellen k�nnen, erfahren Sie ebenfalls
+aus der Manual-Seite zu ispell.
+
+Auf Rechnern mit wenig Speicher kann es bei Verwendung der gro�en
+Hash-Dateien zu Performance-Problemen kommen.  Wechseln Sie in diesem
+Fall in das Verzeichnis /usr/lib/ispell/ und l�schen die
+symbolischen Links deutsch.hash bzw. english.hash um Sie danach mit
+
+  `ln -s deutschmed.hash deutsch.hash'  und
+
+  `ln -s britishmed.hash english.hash'  neu anzulegen.
+
+Die m�glichen Hash-Dateien f�r diese ispell-Implementierung sind
+f�r Englisch:
+
+    americanmed.hash  (klein)
+
+    americanxlg.hash  (gro�)
+
+    britishmed.hash   (klein)
+
+    britishxlg.hash   (gro�)
+
+f�r Deutsch (Paket igerman):
+
+    deutschmed.hash   (mittel)
+
+    deutschxlg.hash   (gro�)
+
+f�r D�nisch (Paket idanish):
+
+    dansk.hash        (mittel)
+
+f�r Spanisch (Paket ispanish):
+
+    espanol.hash      (gro�)
+
+f�r Franz�sisch (Paket ifrensh):
+
+    francais.hash     (mittel)
+
+f�r Italienisch (Paket iitalian):
+
+    italian.hash      (mittel)
+
+f�r Niederl�ndisch (Paket idutch):
+
+    nederlands.hash   (gro�)
+
+f�r Schwedisch (Paket iswedish):
+
+    svenska.hash      (klein)
+
+f�r Norwegisch (Paket inorsk):
+
+    norsk.hash        (mittel)
+
diff -rNu ispell-3.1.clean/suse/README ispell-3.1/suse/README
--- ispell-3.1.clean/suse/README	Wed Dec 31 18:00:00 1969
+++ ispell-3.1/suse/README	Thu Aug 16 17:50:38 2001
@@ -0,0 +1,97 @@
+
+     Short description
+     =================
+
+Ispell is a fast screen-oriented spelling checker that shows you your
+errors in the context of the original file, and suggests possible 
+corrections when it can figure them out.  Compared to UNIX spell, it
+is faster and much easier to use.  Ispell can also handle languages
+other than English. Ispell has a long history, and many people have
+contributed to the current version - some of the major contributors
+include R. E. Gorin, Pace Willisson, Walt Buehring, and Geoff 
+Kuenning. 
+
+The easiest usage is 'ispell filename'. In this case ispell presents you
+every word it couldn't find in the dictionary and asks you for a correction.
+Are there any similar words (only differ in letters, a pair of mixed up
+letters or even blanks) they are shown in the line beneath.
+Ispell even shows you a list of words that derive from the same stem. Both
+lines are posted on the lower edge of the monitor. If possible ispell
+inverts the word. Now you can totally replace or choose one of the suggested
+words.
+The default language is English which can be set using the environment
+variable DICTIONARY or the startup option '-d <languag>'. Using the 
+'-T <format>' switch one can use special 'umlaut' modes' or turn them off.
+'-T latin1' e.g. enables you to read German umlauts according to 
+iso 8859-1.  If you set the '-t' flag you can (works with 3.1.20) check
+(La)TeX texts with real ISO-8859-1 umlauts for misspelling. Without the
+'-T latin1' the correct extension of the files are compelling. The 
+possible extensions and codes for the '-T' flag are to be found in the
+appropriate file which resides under '<language>.aff'. All syllable rules
+and codings are put into these '.aff' files therefore it is not longer
+necessary to invoke ispell with the '-w' switch for German umlauts.
+
+Besides the English dictionaries there are German dictionaries under
+/usr/lib/ispell. The German word tables have been retrieved from the
+dicts-package (hk-deutsch).
+
+Ispell doesn't 'directly' use those tables but the larger hash tables which
+enable you a better and faster reading. How to create hash tables is
+explained also in those above-mentioned README files or ask the man page
+of ispell for help.
+
+On computer with low RAM, problems can occur with those large hash tables.
+If this is your problem just change directory to /usr/lib/ispell and delete
+the symbolic links deutsch.hash or english.hash and recreate them 
+using the following syntax:
+
+    `ln -s deutschmed.hash deutsch.hash'
+
+    `ln -s britishmed.hash english.hash'
+
+The following hash tables are used with this version of ispell:
+for English:
+
+    americanmed.hash  (small)                                             
+
+    americanxlg.hash  (big)                                              
+
+    britishmed.hash   (small)                                             
+
+    britishxlg.hash   (big)                                              
+
+for German (package igerman):                                             
+
+    deutschmed.hash   (middle)                                            
+
+    deutschxlg.hash   (big)      
+
+for Danish (package idanish):
+
+    dansk.hash        (middle)
+
+for Spanish (package ispanish):
+
+    espanol.hash      (big)
+
+for French (package ifrensh):
+
+    francais.hash     (middle)
+
+for Italian (package iitalian):
+
+    italian.hash      (middle)
+
+for Dutch (package idutch):
+
+    nederlands.hash   (big)
+
+for Swedish (package iswedish):
+
+    svenska.hash      (small)
+
+for Norwegian (package inorsk):
+
+    norsk.hash        (mittel)
+
+
diff -rNu ispell-3.1.clean/suse/emacs/american.el ispell-3.1/suse/emacs/american.el
--- ispell-3.1.clean/suse/emacs/american.el	Wed Dec 31 18:00:00 1969
+++ ispell-3.1/suse/emacs/american.el	Thu Aug 16 17:50:38 2001
@@ -0,0 +1,12 @@
+;; Used by ispell-emacs-menu.el
+;; Do *not* byte-compile this file because its loaded by both emacs and xemacs
+
+(append-ispell-dict-alist	"english.hash"
+   '("english"  "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "english")  nil nil))
+
+(append-ispell-dict-alist	"american.hash"
+   '("american" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "american") nil nil))
+
+(append-ispell-dict-alist	"british.hash"
+   '("british"  "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "british")  nil nil))
+
diff -rNu ispell-3.1.clean/suse/emacs/british.el ispell-3.1/suse/emacs/british.el
--- ispell-3.1.clean/suse/emacs/british.el	Wed Dec 31 18:00:00 1969
+++ ispell-3.1/suse/emacs/british.el	Thu Aug 16 17:50:38 2001
@@ -0,0 +1,12 @@
+;; Used by ispell-emacs-menu.el
+;; Do *not* byte-compile this file because its loaded by both emacs and xemacs
+
+(append-ispell-dict-alist	"english.hash"
+   '("english"  "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "english")  nil nil))
+
+(append-ispell-dict-alist	"british.hash"
+   '("british"  "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "british")  nil nil))
+
+(append-ispell-dict-alist	"american.hash"
+   '("american" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "american") nil nil))
+
diff -rNu ispell-3.1.clean/suse/ispell-emacs-menu.el ispell-3.1/suse/ispell-emacs-menu.el
--- ispell-3.1.clean/suse/ispell-emacs-menu.el	Wed Dec 31 18:00:00 1969
+++ ispell-3.1/suse/ispell-emacs-menu.el	Thu Aug 16 17:50:38 2001
@@ -0,0 +1,43 @@
+;;; ispell-emacs-menu.el --- Produce the (x)emacs (i)spell menu on the fly
+
+;; Copyright (c) 1999 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
+;; Author: Werner Fink, <werner@suse.de> 1999/03/04
+
+;;; Note:
+
+;; Do *not* byte-compile this file because its loaded by both emacs and xemacs
+
+;;; The code:
+
+(defvar ispell-library-path "/usr/lib/ispell/")
+
+(defun  append-ispell-dict-alist (hash alist)
+    (if (file-exists-p (concat ispell-library-path hash))
+	(setq ispell-dictionary-alist
+	   (append ispell-dictionary-alist (list alist)))))
+
+(if (string-match "XEmacs\\|Lucid" emacs-version)
+      (progn  ;; The name of the game: xemacsen have their own menu
+	      ;; and an other function for define-coding-system-alias
+	(copy-coding-system 'iso-8859-1 'iso-latin-1)
+	(copy-coding-system 'iso-8859-2 'iso-latin-2)
+	(copy-coding-system 'iso-8859-3 'iso-latin-3)
+	(copy-coding-system 'iso-8859-4 'iso-latin-4)
+	(copy-coding-system 'iso-8859-5 'iso-latin-5)
+	(copy-coding-system 'iso-8859-7 'iso-latin-7)
+	(copy-coding-system 'iso-8859-8 'iso-latin-8)
+	(copy-coding-system 'iso-8859-9 'iso-latin-9)
+	(setq ispell-menu-xemacs nil))
+    (setq ispell-menu-map nil))
+
+(setq ispell-dictionary-alist '((nil "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil nil)))
+
+(let ((dir (directory-files (concat ispell-library-path "emacs/") t ".*\\.el$")))
+     (while dir (load (car dir) nil t t) (setq dir (cdr dir))))
+
+;;
+;; Now load the library to recreate the Spell menu in the Edit pulldown
+;;
+(load "ispell" nil t)
+
+;;; ispell-emacs-menu.el end here
diff -rNu ispell-3.1.clean/term.c ispell-3.1/term.c
--- ispell-3.1.clean/term.c	Wed Nov  2 12:44:28 1994
+++ ispell-3.1/term.c	Thu Aug 16 17:50:38 2001
@@ -70,9 +70,10 @@
 #include <sgtty.h>
 #endif
 #include <signal.h>
+#include <unistd.h>
 
-void		erase P ((void));
-void		move P ((int row, int col));
+void		ierase P ((void));
+void		imove P ((int row, int col));
 void		inverse P ((void));
 void		normal P ((void));
 void		backup P ((void));
@@ -88,7 +89,7 @@
 void		shescape P ((char * buf));
 #endif /* USESH */
 
-void erase ()
+void ierase ()
     {
 
     if (cl)
@@ -103,7 +104,7 @@
 	}
     }
 
-void move (row, col)
+void imove (row, col)
     int		row;
     int		col;
     {
@@ -136,8 +137,13 @@
     }
 
 #ifdef USG
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+static struct termios	sbuf;
+static struct termios	osbuf;
+#else
 static struct termio	sbuf;
 static struct termio	osbuf;
+#endif
 #else
 static struct sgttyb	sbuf;
 static struct sgttyb	osbuf;
@@ -161,9 +167,13 @@
     int			tpgrp;
 #else
 #ifdef TIOCGPGRP
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    pid_t		tpgrp;
+#else
     int			tpgrp;
 #endif
 #endif
+#endif
 #ifdef TIOCGWINSZ
     struct winsize	wsize;
 #endif /* TIOCGWINSZ */
@@ -247,7 +257,11 @@
 	(void) fprintf (stderr, TERM_C_NO_BATCH);
 	exit (1);
 	}
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    (void) tcgetattr (0, &osbuf);
+#else
     (void) ioctl (0, TCGETA, (char *) &osbuf);
+#endif
     termchanged = 1;
 
     sbuf = osbuf;
@@ -256,7 +270,11 @@
     sbuf.c_iflag &= ~(INLCR | IGNCR | ICRNL);
     sbuf.c_cc[VMIN] = 1;
     sbuf.c_cc[VTIME] = 1;
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    (void) tcsetattr (0, TCSADRAIN, &sbuf);
+#else
     (void) ioctl (0, TCSETAW, (char *) &sbuf);
+#endif
 
     uerasechar = osbuf.c_cc[VERASE];
     ukillchar = osbuf.c_cc[VKILL];
@@ -269,7 +287,11 @@
 #endif
 #endif
 #ifdef TIOCGPGRP
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    if ((tpgrp = tcgetpgrp (0)) == -1)
+#else
     if (ioctl (0, TIOCGPGRP, (char *) &tpgrp) != 0)
+#endif
 	{
 	(void) fprintf (stderr, TERM_C_NO_BATCH);
 	exit (1);
@@ -344,7 +366,11 @@
 	if (te)
 	    tputs (te, 1, putch);
 #ifdef USG
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+	(void) tcsetattr (0, TCSADRAIN, &osbuf);
+#else
 	(void) ioctl (0, TCSETAW, (char *) &osbuf);
+#endif
 #else
 	(void) ioctl (0, TIOCSETP, (char *) &osbuf);
 #ifdef TIOCSLTC
@@ -360,7 +386,11 @@
     int		signo;
     {
 #ifdef USG
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    (void) tcsetattr (0, TCSADRAIN, &osbuf);
+#else
     (void) ioctl (0, TCSETAW, (char *) &osbuf);
+#endif
 #else
     (void) ioctl (0, TIOCSETP, (char *) &osbuf);
 #ifdef TIOCSLTC
@@ -375,7 +405,11 @@
     /* stop here until continued */
     (void) signal (signo, onstop);
 #ifdef USG
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    (void) tcsetattr (0, TCSADRAIN, &sbuf);
+#else
     (void) ioctl (0, TCSETAW, (char *) &sbuf);
+#endif
 #else
     (void) ioctl (0, TIOCSETP, (char *) &sbuf);
 #ifdef TIOCSLTC
@@ -391,7 +425,7 @@
     onstop (SIGTSTP);
 #else
     /* for System V */
-    move (li - 1, 0);
+    imove (li - 1, 0);
     (void) fflush (stdout);
     if (getenv ("SHELL"))
 	(void) shellescape (getenv ("SHELL"));
@@ -435,7 +469,11 @@
     argv[i] = NULL;
 
 #ifdef USG
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    (void) tcsetattr (0, TCSADRAIN, &osbuf);
+#else
     (void) ioctl (0, TCSETAW, (char *) &osbuf);
+#endif
 #else
     (void) ioctl (0, TIOCSETP, (char *) &osbuf);
 #ifdef TIOCSLTC
@@ -481,7 +519,11 @@
 #endif
 
 #ifdef USG
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    (void) tcsetattr (0, TCSADRAIN, &sbuf);
+#else
     (void) ioctl (0, TCSETAW, (char *) &sbuf);
+#endif
 #else
     (void) ioctl (0, TIOCSETP, (char *) &sbuf);
 #ifdef TIOCSLTC
@@ -514,7 +556,11 @@
 #endif
 
 #ifdef USG
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    (void) tcsetattr (0, TCSADRAIN, &osbuf);
+#else
     (void) ioctl (0, TCSETAW, (char *) &osbuf);
+#endif
 #else
     (void) ioctl (0, TIOCSETP, (char *) &osbuf);
 #ifdef TIOCSLTC
@@ -546,7 +592,11 @@
 #endif
 
 #ifdef USG
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+    (void) tcsetattr (0, TCSADRAIN, &sbuf);
+#else
     (void) ioctl (0, TCSETAW, (char *) &sbuf);
+#endif
 #else
     (void) ioctl (0, TIOCSETP, (char *) &sbuf);
 #ifdef TIOCSLTC
diff -rNu ispell-3.1.clean/tree.c ispell-3.1/tree.c
--- ispell-3.1.clean/tree.c	Mon Jan 23 12:28:28 1995
+++ ispell-3.1/tree.c	Thu Aug 16 17:50:38 2001
@@ -61,6 +61,7 @@
 
 #include <ctype.h>
 #include <errno.h>
+#include <unistd.h>
 #include "config.h"
 #include "ispell.h"
 #include "proto.h"
diff -rNu ispell-3.1.clean/unsq.c ispell-3.1/unsq.c
--- ispell-3.1.clean/unsq.c	Tue Jan 25 12:32:18 1994
+++ ispell-3.1/unsq.c	Thu Aug 16 17:50:38 2001
@@ -49,6 +49,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 #include "msgs.h"
 
 #ifdef __STDC__
@@ -76,6 +77,7 @@
     };
 
 #define MAX_PREFIX	(sizeof (size_encodings) - 1)
+#define UNSEQBUFSIZE	257
 
 extern void	exit P ((int status));
 
@@ -83,8 +85,8 @@
     int			argc;
     char *		argv[];
     {
-    char		word[257];
-    static char		prev[257] = "";
+    char		word[UNSEQBUFSIZE];
+    static char		prev[UNSEQBUFSIZE] = "";
 
     while (!expand (word, prev))
         puts (word);
@@ -97,8 +99,10 @@
     {
     register char *	wordp;
     register char *	prevp;
+    register char *	nl;
     register int	same_count;
     register int	count_char;
+    register int	size;
 
     count_char = getchar ();
     if (count_char == EOF)
@@ -116,11 +120,14 @@
     wordp = word;
     while (same_count--)
 	*wordp++ = (*prevp++);
-    if (gets (wordp) == NULL)
+    size = UNSEQBUFSIZE - (wordp - word);
+    if (fgets(wordp, size <= UNSEQBUFSIZE ? size : 0, stdin) == NULL)
 	{
 	(void) fprintf (stderr, UNSQ_C_SURPRISE_EOF);
 	exit (1);
 	}
+    if ((nl = strrchr(wordp, '\n')))
+	*nl = '\0';
     (void) strcpy (prev, word);
     return 0 ;
     }