aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/sj3-server/files/patch-aa
blob: 2860f3f77b7840c1bc570356a18d0f0df5c9bf47 (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
diff -arcN ../sj3-2.0.1.13.org/Imakefile ./Imakefile
*** ../sj3-2.0.1.13.org/Imakefile   Tue May 30 21:30:16 1995
--- ./Imakefile Mon Aug 12 11:34:47 1996
***************
*** 35,41 ****
  #define IHaveSubdirs
  #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  
! SUBDIRS = dict kanakan server sj3lib sj3 sj3dic sj3stat demo
  
  MakeSubdirs($(SUBDIRS))
  DependSubdirs($(SUBDIRS))
--- 35,46 ----
  #define IHaveSubdirs
  #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  
! /*
!  * Add make rules to install manpages and other documents.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! 
! SUBDIRS = dict doc kanakan server sj3lib sj3 sj3dic sj3stat demo
  
  MakeSubdirs($(SUBDIRS))
  DependSubdirs($(SUBDIRS))
diff -arcN ../sj3-2.0.1.13.org/README ./README
*** ../sj3-2.0.1.13.org/README  Thu Mar 21 14:59:47 1996
--- ./README    Tue Aug 13 03:10:23 1996
***************
*** 20,40 ****
  
    Following files are installed after make install:
  
!   /usr/dict/sj3/sj3main.dic   Main dictionary(used by sj3serv)
!   /usr/bin/sj3serv        Kana-Kanji conversion server
!   /usr/bin/sj3            Kana-Kanji conversion client
!   /usr/bin/sj3dic         User dictionary utility
!   /usr/bin/sj3mkdic       Dictionary converter
!   /usr/bin/sj3stat        Utility to show status of sj3serv
!   /usr/include/sj3lib.h       Header file for sj3lib
!   /usr/lib/libsj3lib.a        Kana-Kanji conversion library
!   /usr/lib/sj3/serverrc       Configuration file for sj3serv
!   /usr/lib/sj3/sjrc       Configuration file for sj3
!   /usr/lib/sj3/sjrk       Roma-Kana conversion file for sj3
!   /usr/lib/sj3/cvtkey.xterm   Mapping table between function key
!   /usr/lib/sj3/cvtkey.news    and escape sequence for sj3
!   /usr/lib/sj3/cvtkey.nws511
!   /usr/lib/sj3/cvtkey.nws517
  
  * Source tree
    dict/dict   Main dictionary(text file)
--- 20,49 ----
  
    Following files are installed after make install:
  
!   /usr/local/lib/sj3/dict/sj3main.dic Main dictionary(used by sj3serv)
!   /usr/local/bin/sj3serv          Kana-Kanji conversion server
!   /usr/local/bin/sj3          Kana-Kanji conversion client
!   /usr/local/bin/sj3dic           User dictionary utility
!   /usr/local/bin/sj3mkdic         Dictionary converter
!   /usr/local/bin/sj3stat          Utility to show status of sj3serv
!   /usr/local/include/sj3lib.h     Header file for sj3lib
!   /usr/local/lib/libsj3lib.a      Kana-Kanji conversion library
!   /usr/local/man/ja_JP.EUC/man1/sj3.1     sj3's online manual(Japanese)
!   /usr/local/man/ja_JP.EUC/man1/sj3dic.1      sj3dic's online manual(Japanese)
!   /usr/local/man/ja_JP.EUC/man1/sj3mkdic.1    sj3mkdic's online manual(Japanese)
!   /usr/local/man/ja_JP.EUC/man1/sj3serv.1     sj3serv's online manual(Japanese)
!   /usr/local/lib/sj3/serverrc     Configuration file for sj3serv
!   /usr/local/lib/sj3/sjrc         Configuration file for sj3
!   /usr/local/lib/sj3/sjrk         Roma-Kana conversion file for sj3
!   /usr/local/lib/sj3/cvtkey.xterm     Mapping table between function key
!   /usr/local/lib/sj3/cvtkey.news      and escape sequence for sj3
!   /usr/local/lib/sj3/cvtkey.nws511
!   /usr/local/lib/sj3/cvtkey.nws517
!   /usr/local/lib/sj3/Nihongo.ps.Z     Operation guide for SJ3(Japanese)
!   /usr/local/lib/sj3/hinsi.ms     Documents(Japanese)
!   /usr/local/lib/sj3/makedict.ms      Documents(Japanese)
!   /usr/local/lib/sj3/sj3lib.ms        Documents(Japanese)
!   /usr/local/lib/sj3/sj3serv.ms       Documents(Japanese)
  
  * Source tree
    dict/dict   Main dictionary(text file)
diff -arcN ../sj3-2.0.1.13.org/README.eucJP ./README.eucJP
*** ../sj3-2.0.1.13.org/README.eucJP    Thu Mar 21 15:00:11 1996
--- ./README.eucJP  Tue Aug 13 03:10:45 1996
***************
*** 28,48 ****
  
    この操作によりインストールされるファイルをいかに示します。
  
!   /usr/dict/sj3/sj3main.dic   sj3serv が使用するメイン辞書
!   /usr/bin/sj3serv        仮名漢字変換サーバ
!   /usr/bin/sj3            端末用仮名漢字変換クライアント
!   /usr/bin/sj3dic         ユーザ辞書ユーティリティ
!   /usr/bin/sj3mkdic       辞書生成ツール
!   /usr/bin/sj3stat        sj3serv への接続状況表示ユーティリティ
!   /usr/include/sj3lib.h       仮名漢字変換ライブラリのヘッダファイル
!   /usr/lib/libsj3lib.a        仮名漢字変換ライブラリ
!   /usr/lib/sj3/serverrc       sj3serv の設定ファイル
!   /usr/lib/sj3/sjrc       sj3 の設定ファイル
!   /usr/lib/sj3/sjrk       sj3 のローマ字仮名変換設定ファイル
!   /usr/lib/sj3/cvtkey.xterm   sj3 のファンクションキーとエスケープ
!   /usr/lib/sj3/cvtkey.news    シーケンスの対応を設定するファイル。
!   /usr/lib/sj3/cvtkey.nws511
!   /usr/lib/sj3/cvtkey.nws517
  
  
  ・ディレクトリ構成
--- 28,57 ----
  
    この操作によりインストールされるファイルをいかに示します。
  
!   /usr/local/lib/sj3/dict/sj3main.dic sj3serv が使用するメイン辞書
!   /usr/local/bin/sj3serv          仮名漢字変換サーバ
!   /usr/local/bin/sj3          端末用仮名漢字変換クライアント
!   /usr/local/bin/sj3dic           ユーザ辞書ユーティリティ
!   /usr/local/bin/sj3mkdic         辞書生成ツール
!   /usr/local/bin/sj3stat          sj3serv への接続状況表示ユーティリティ
!   /usr/local/include/sj3lib.h     仮名漢字変換ライブラリのヘッダファイル
!   /usr/local/lib/libsj3lib.a      仮名漢字変換ライブラリ
!   /usr/local/man/ja_JP.EUC/man1/sj3.1     sj3 のオンラインマニュアル
!   /usr/local/man/ja_JP.EUC/man1/sj3dic.1      sj3dic のオンラインマニュアル
!   /usr/local/man/ja_JP.EUC/man1/sj3mkdic.1    sj3mkdic のオンラインマニュアル
!   /usr/local/man/ja_JP.EUC/man1/sj3serv.1     sj3serv のオンラインマニュアル
!   /usr/local/lib/sj3/serverrc     sj3serv の設定ファイル
!   /usr/local/lib/sj3/sjrc         sj3 の設定ファイル
!   /usr/local/lib/sj3/sjrk         sj3 のローマ字仮名変換設定ファイル
!   /usr/local/lib/sj3/cvtkey.xterm     sj3 のファンクションキーとエスケープ
!   /usr/local/lib/sj3/cvtkey.news      シーケンスの対応を設定するファイル。
!   /usr/local/lib/sj3/cvtkey.nws511
!   /usr/local/lib/sj3/cvtkey.nws517    
!   /usr/local/lib/sj3/Nihongo.ps.Z     SJ3 日本語入力ガイド
!   /usr/local/lib/sj3/hinsi.ms     ドキュメント
!   /usr/local/lib/sj3/makedict.ms      ドキュメント
!   /usr/local/lib/sj3/sj3lib.ms        ドキュメント
!   /usr/local/lib/sj3/sj3serv.ms       ドキュメント
  
  
  ・ディレクトリ構成
diff -arcN ../sj3-2.0.1.13.org/demo/sample.c ./demo/sample.c
*** ../sj3-2.0.1.13.org/demo/sample.c   Fri Jun  3 17:00:16 1994
--- ./demo/sample.c Mon Aug 12 12:30:29 1996
***************
*** 44,50 ****
  #include "wchar16.h"
  
  #define   RETURN(c)   ((c == '\n') || (c == '\r'))
! #define   RKFILE      "/usr/lib/sj3/sjrk"
  #define   LOCALHOST   "localhost"
  #define   HBUFSIZ     512
  #define   QBUFSIZ     256
--- 44,54 ----
  #include "wchar16.h"
  
  #define   RETURN(c)   ((c == '\n') || (c == '\r'))
! /*
!  * Change a default value.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! #define   RKFILE      "/usr/local/lib/sj3/sjrk"
  #define   LOCALHOST   "localhost"
  #define   HBUFSIZ     512
  #define   QBUFSIZ     256
diff -arcN ../sj3-2.0.1.13.org/dict/dict/Imakefile ./dict/dict/Imakefile
*** ../sj3-2.0.1.13.org/dict/dict/Imakefile Fri Dec  9 20:27:05 1994
--- ./dict/dict/Imakefile   Tue Aug 13 03:14:31 1996
***************
*** 32,38 ****
   * $SonyDate: 1994/12/09 11:27:05 $
   */
  
! DICTDIR         = /usr/dict/sj3
  
  TOOL_DIR      = ../tool
  TOOL_NAME     = sj3mkdic
--- 32,43 ----
   * $SonyDate: 1994/12/09 11:27:05 $
   */
  
! /*
!  * Change some make rules.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! 
! DICTDIR         = /usr/local/lib/sj3/dict
  
  TOOL_DIR      = ../tool
  TOOL_NAME     = sj3mkdic
***************
*** 44,52 ****
  #if SystemV4 || SystemV
  INSTGROUP = bin
  #else
! INSTGROUP = staff
  #endif
! INSTFLAGS = -o root -g $(INSTGROUP) -m 444
  
  all:      $(OBJS)
  
--- 49,57 ----
  #if SystemV4 || SystemV
  INSTGROUP = bin
  #else
! INSTGROUP = bin
  #endif
! INSTFLAGS = -o bin -g $(INSTGROUP) -m 444
  
  all:      $(OBJS)
  
diff -arcN ../sj3-2.0.1.13.org/dict/tool/Imakefile ./dict/tool/Imakefile
*** ../sj3-2.0.1.13.org/dict/tool/Imakefile Fri Dec  9 20:27:05 1994
--- ./dict/tool/Imakefile   Mon Aug 12 11:38:02 1996
***************
*** 32,47 ****
   * $SonyDate: 1994/12/09 11:27:05 $
   */
  
! DEST            = /usr/bin
  
  INCLUDES = -I../include -I../../include
  #if SystemV4 || SystemV
  INSTGROUP       = bin
  #else
! INSTGROUP       = staff
  #endif
  
! INSTFLAGS       = -o root -g $(INSTGROUP) -m 755
  
  SRCS = \
    char.c \
--- 32,52 ----
   * $SonyDate: 1994/12/09 11:27:05 $
   */
  
! /*
!  * Change some make rules.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! 
! DEST            = /usr/local/bin
  
  INCLUDES = -I../include -I../../include
  #if SystemV4 || SystemV
  INSTGROUP       = bin
  #else
! INSTGROUP       = bin
  #endif
  
! INSTFLAGS       = -o bin -g $(INSTGROUP) -m 755
  
  SRCS = \
    char.c \
diff -arcN ../sj3-2.0.1.13.org/doc/Imakefile ./doc/Imakefile
*** ../sj3-2.0.1.13.org/doc/Imakefile   Thu Jan  1 09:00:00 1970
--- ./doc/Imakefile Mon Aug 12 11:34:22 1996
***************
*** 0 ****
--- 1,40 ----
+ /*
+  * Copyright (c) 1991-1994  Sony Corporation
+  * 
+  * Permission is hereby granted, free of charge, to any person obtaining
+  * a copy of this software and associated documentation files (the
+  * "Software"), to deal in the Software without restriction, including
+  * without limitation the rights to use, copy, modify, merge, publish,
+  * distribute, sublicense, and/or sell copies of the Software, and to
+  * permit persons to whom the Software is furnished to do so, subject to
+  * the following conditions:
+  * 
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  * 
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+  * IN NO EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY CLAIM,
+  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+  * 
+  * Except as contained in this notice, the name of Sony Corporation
+  * shall not be used in advertising or otherwise to promote the sale, use
+  * or other dealings in this Software without prior written authorization
+  * from Sony Corporation.
+  */
+ 
+ /*
+  * Add make rules to install manpages and other documents.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
+ 
+ #define IHaveSubdirs
+ #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
+ 
+ SUBDIRS = doc man
+ 
+ MakeSubdirs($(SUBDIRS))
+ DependSubdirs($(SUBDIRS))
diff -arcN ../sj3-2.0.1.13.org/doc/doc/Imakefile ./doc/doc/Imakefile
*** ../sj3-2.0.1.13.org/doc/doc/Imakefile   Thu Jan  1 09:00:00 1970
--- ./doc/doc/Imakefile Mon Aug 12 11:34:34 1996
***************
*** 0 ****
--- 1,41 ----
+ /*
+  * Copyright (c) 1994  Sony Corporation
+  * 
+  * Permission is hereby granted, free of charge, to any person obtaining
+  * a copy of this software and associated documentation files (the
+  * "Software"), to deal in the Software without restriction, including
+  * without limitation the rights to use, copy, modify, merge, publish,
+  * distribute, sublicense, and/or sell copies of the Software, and to
+  * permit persons to whom the Software is furnished to do so, subject to
+  * the following conditions:
+  * 
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  * 
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+  * IN NO EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY CLAIM,
+  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+  * 
+  * Except as contained in this notice, the name of Sony Corporation
+  * shall not be used in advertising or otherwise to promote the sale, use
+  * or other dealings in this Software without prior written authorization
+  * from Sony Corporation.
+  */
+ 
+ /*
+  * Add make rules to install other documents.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
+ 
+ CONFDIR   = /usr/local/lib/sj3
+ DOCLIST       = Nihongo.ps.Z hinsi.ms makedict.ms sj3lib.ms sj3serv.ms
+ 
+ all::
+ 
+ depend::
+ 
+ InstallMultiple($(DOCLIST),$(CONFDIR))
diff -arcN ../sj3-2.0.1.13.org/doc/doc/sj3lib.ms ./doc/doc/sj3lib.ms
*** ../sj3-2.0.1.13.org/doc/doc/sj3lib.ms   Fri Jun  3 17:00:49 1994
--- ./doc/doc/sj3lib.ms Tue Aug 13 03:17:26 1996
***************
*** 56,62 ****
  .IP ・
  メイン辞書、ユーザ辞書、学習ファイルは、接続するサーバの動作しているマシン上のものが使用されます。
  .br
! これらのファイルは、デフォルトではディレクトリ \fB/usr/dict/sj3\fP の下におかれますが、サーバのセットアップファイルにより変更が可能です。
  .IP ・
  ユーザ辞書と学習ファイルは、関数 sj3_open で指定されたユーザ名を USER と
  すれば、\fBuser/USER/private.dic\fP と \fBuser/USER/study.dat\fP です。
--- 56,62 ----
  .IP ・
  メイン辞書、ユーザ辞書、学習ファイルは、接続するサーバの動作しているマシン上のものが使用されます。
  .br
! これらのファイルは、デフォルトではディレクトリ \fB/usr/local/lib/sj3/dict\fP の下におかれますが、サーバのセットアップファイルにより変更が可能です。
  .IP ・
  ユーザ辞書と学習ファイルは、関数 sj3_open で指定されたユーザ名を USER と
  すれば、\fBuser/USER/private.dic\fP と \fBuser/USER/study.dat\fP です。
***************
*** 91,97 ****
  サーバと正常に接続できたときには 0 を、何かエラーのあったときには 0 以外の
  エラーステータスを返します。
  .sp
! エラーステータスはヘッダファイル \fB/usr/include/sj3lib.h\fP で
  定義されるビットアサインされた値で、詳細は以下のとおりです。
  .sp
  .IP "\fBSJ3_SERVER_DEAD\fP
--- 91,97 ----
  サーバと正常に接続できたときには 0 を、何かエラーのあったときには 0 以外の
  エラーステータスを返します。
  .sp
! エラーステータスはヘッダファイル \fB/usr/local/include/sj3lib.h\fP で
  定義されるビットアサインされた値で、詳細は以下のとおりです。
  .sp
  .IP "\fBSJ3_SERVER_DEAD\fP
***************
*** 138,144 ****
  サーバとの使用を正常に終了できたときには 0 を、
  何かエラーのあったときには 0 以外のエラーステータスを返します。
  .sp
! エラーステータスはヘッダファイル \fB/usr/include/sj3lib.h\fP で
  定義されるビットアサインされた値で、詳細は以下のとおりです。
  .sp
  .IP "\fBSJ3_SERVER_DEAD\fP
--- 138,144 ----
  サーバとの使用を正常に終了できたときには 0 を、
  何かエラーのあったときには 0 以外のエラーステータスを返します。
  .sp
! エラーステータスはヘッダファイル \fB/usr/local/include/sj3lib.h\fP で
  定義されるビットアサインされた値で、詳細は以下のとおりです。
  .sp
  .IP "\fBSJ3_SERVER_DEAD\fP
***************
*** 187,193 ****
  変換結果の漢字文字列を、配列 \fBstruct bunsetu bun[]\fP に
  各文節に関する情報をセットします。
  .br
! \fBstruct bunsetu\fP はヘッダファイル \fB/usr/include/sj3lib.h\fP で
  宣言されている以下のような構造体です。
  .sp
  .RS
--- 187,193 ----
  変換結果の漢字文字列を、配列 \fBstruct bunsetu bun[]\fP に
  各文節に関する情報をセットします。
  .br
! \fBstruct bunsetu\fP はヘッダファイル \fB/usr/local/include/sj3lib.h\fP で
  宣言されている以下のような構造体です。
  .sp
  .RS
***************
*** 417,423 ****
  なりません。
  またその長さは、最大でも 32 文字を越えてはなりません。
  .sp
! 品詞コードはヘッダファイル \fB/usr/include/sj3lib.h\fP で
  定義される以下の品詞のうちの一つです。
  .sp
  .RS
--- 417,423 ----
  なりません。
  またその長さは、最大でも 32 文字を越えてはなりません。
  .sp
! 品詞コードはヘッダファイル \fB/usr/local/include/sj3lib.h\fP で
  定義される以下の品詞のうちの一つです。
  .sp
  .RS
***************
*** 445,451 ****
  登録できたときには 0 が、登録できなかったときにはそれ以外の
  エラーステータスが返されます。
  .sp
! エラーステータスはヘッダファイル \fB/usr/include/sj3lib.h\fP で
  定義され、詳細は以下のとおりです。
  .sp
  .IP "\fBSJ3_DICT_ERROR\fP
--- 445,451 ----
  登録できたときには 0 が、登録できなかったときにはそれ以外の
  エラーステータスが返されます。
  .sp
! エラーステータスはヘッダファイル \fB/usr/local/include/sj3lib.h\fP で
  定義され、詳細は以下のとおりです。
  .sp
  .IP "\fBSJ3_DICT_ERROR\fP
***************
*** 519,525 ****
  なりません。
  またその長さは、最大でも 32 文字を越えてはなりません。
  .sp
! 品詞コードは \fB/usr/include/sj3lib.h\fP で定義される以下の品詞の
  うちの一つです。
  .sp
  .RS
--- 519,525 ----
  なりません。
  またその長さは、最大でも 32 文字を越えてはなりません。
  .sp
! 品詞コードは \fB/usr/local/include/sj3lib.h\fP で定義される以下の品詞の
  うちの一つです。
  .sp
  .RS
***************
*** 547,553 ****
  削除できたときには 0 が、削除できなかったときにはそれ以外の
  エラーステータスが返されます。
  .sp
! エラーステータスは \fB/usr/include/sj3lib.h\fP で定義され、
  詳細は以下のとおりです。
  .sp
  .IP "\fBSJ3_DICT_ERROR\fP
--- 547,553 ----
  削除できたときには 0 が、削除できなかったときにはそれ以外の
  エラーステータスが返されます。
  .sp
! エラーステータスは \fB/usr/local/include/sj3lib.h\fP で定義され、
  詳細は以下のとおりです。
  .sp
  .IP "\fBSJ3_DICT_ERROR\fP
diff -arcN ../sj3-2.0.1.13.org/doc/doc/sj3serv.ms ./doc/doc/sj3serv.ms
*** ../sj3-2.0.1.13.org/doc/doc/sj3serv.ms  Fri Jun  3 17:00:50 1994
--- ./doc/doc/sj3serv.ms    Tue Aug 13 03:18:01 1996
***************
*** 111,117 ****
  そのファイル名を絶対パスとして辞書にアクセスしますが、\'/\'以外のときには、
  ここで指定されるディレクトリからの相対パスとして辞書にアクセスします。
  .br
! デフォルトは /usr/dict/sj3 です。
  .RE
  .sp
  .NH 3
--- 111,117 ----
  そのファイル名を絶対パスとして辞書にアクセスしますが、\'/\'以外のときには、
  ここで指定されるディレクトリからの相対パスとして辞書にアクセスします。
  .br
! デフォルトは /usr/local/lib/sj3/dict です。
  .RE
  .sp
  .NH 3
diff -arcN ../sj3-2.0.1.13.org/doc/man/Imakefile ./doc/man/Imakefile
*** ../sj3-2.0.1.13.org/doc/man/Imakefile   Thu Jan  1 09:00:00 1970
--- ./doc/man/Imakefile Mon Aug 12 11:34:15 1996
***************
*** 0 ****
--- 1,50 ----
+ /*
+  * Copyright (c) 1994  Sony Corporation
+  * 
+  * Permission is hereby granted, free of charge, to any person obtaining
+  * a copy of this software and associated documentation files (the
+  * "Software"), to deal in the Software without restriction, including
+  * without limitation the rights to use, copy, modify, merge, publish,
+  * distribute, sublicense, and/or sell copies of the Software, and to
+  * permit persons to whom the Software is furnished to do so, subject to
+  * the following conditions:
+  * 
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  * 
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+  * IN NO EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY CLAIM,
+  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+  * 
+  * Except as contained in this notice, the name of Sony Corporation
+  * shall not be used in advertising or otherwise to promote the sale, use
+  * or other dealings in this Software without prior written authorization
+  * from Sony Corporation.
+  */
+ 
+ /*
+  * Add make rules to install manpages.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
+ 
+ #ifndef JapaneseManLocale
+ #define JapaneseManLocale ja_JP.EUC
+ #endif
+ JMANLOCALE = JapaneseManLocale
+ 
+ #ifndef JapaneseManDir
+ #define JapaneseManDir        /usr/local/man/$(JMANLOCALE)/man1
+ #endif
+ 
+ JMANDIR   = JapaneseManDir
+ MANLIST       = sj3.1 sj3dic.1 sj3mkdic.1 sj3serv.1
+ 
+ all::
+ 
+ depend::
+ 
+ InstallMultipleFlags($(MANLIST),$(JMANDIR),$(INSTMANFLAGS))
diff -arcN ../sj3-2.0.1.13.org/doc/man/sj3.1 ./doc/man/sj3.1
*** ../sj3-2.0.1.13.org/doc/man/sj3.1   Fri Jun  3 17:00:51 1994
--- ./doc/man/sj3.1 Tue Aug 13 03:18:59 1996
***************
*** 109,121 ****
  .SH 関連ファイル
  .PD 0
  .TP 15
! /usr/dict/sj3/user/$USER/private.dic
  仮名漢字変換ユーザ辞書
  .TP
! /usr/dict/sj3/user/$USER/study.dat
  仮名漢字変換学習ファイル
  .TP
! /usr/lib/sj3/sjrk
  デフォルトローマ字仮名変換規則定義ファイル
  .SH 関連事項
  sj3serv(1), sj3lib(3) 
--- 109,121 ----
  .SH 関連ファイル
  .PD 0
  .TP 15
! /usr/local/lib/sj3/dict/user/$USER/private.dic
  仮名漢字変換ユーザ辞書
  .TP
! /usr/local/lib/sj3/dict/user/$USER/study.dat
  仮名漢字変換学習ファイル
  .TP
! /usr/local/lib/sj3/sjrk
  デフォルトローマ字仮名変換規則定義ファイル
  .SH 関連事項
  sj3serv(1), sj3lib(3) 
diff -arcN ../sj3-2.0.1.13.org/doc/man/sj3dic.1 ./doc/man/sj3dic.1
*** ../sj3-2.0.1.13.org/doc/man/sj3dic.1    Fri Jun  3 17:00:52 1994
--- ./doc/man/sj3dic.1  Tue Aug 13 03:19:55 1996
***************
*** 105,120 ****
  .SH 関連ファイル
  .PD 0
  .TP \w'\ \ \ \ user/\fIusername\fP/private.dic'u+2n
! /usr/bin/sj3serv
  かな漢字変換サーバ
  .TP
! /usr/lib/sj3/serverrc
  かな漢字変換サーバ セットアップファイル
  .TP
! /usr/bin/sj3
  日本語入力フロントエンドプロセッサ
  .TP
! /usr/dict/sj3/
  かな漢字変換サーバ デフォルト辞書ディレクトリ
  .TP
      sj3main.dic
--- 105,120 ----
  .SH 関連ファイル
  .PD 0
  .TP \w'\ \ \ \ user/\fIusername\fP/private.dic'u+2n
! /usr/local/bin/sj3serv
  かな漢字変換サーバ
  .TP
! /usr/local/lib/sj3/serverrc
  かな漢字変換サーバ セットアップファイル
  .TP
! /usr/local/bin/sj3
  日本語入力フロントエンドプロセッサ
  .TP
! /usr/local/lib/sj3/dict/
  かな漢字変換サーバ デフォルト辞書ディレクトリ
  .TP
      sj3main.dic
***************
*** 126,135 ****
      user/\fIusername\fP/study.dat
  かな漢字変換学習ファイル
  .TP
! /usr/include/sj3lib.h
  かな漢字変換ライブラリ用インクルードファイル
  .TP
! /usr/lib/libsj3lib.a
  かな漢字変換ライブラリ
  .\".TP
  .\"/usr/sony/demo/sj3/*
--- 126,135 ----
      user/\fIusername\fP/study.dat
  かな漢字変換学習ファイル
  .TP
! /usr/local/include/sj3lib.h
  かな漢字変換ライブラリ用インクルードファイル
  .TP
! /usr/local/lib/libsj3lib.a
  かな漢字変換ライブラリ
  .\".TP
  .\"/usr/sony/demo/sj3/*
diff -arcN ../sj3-2.0.1.13.org/doc/man/sj3mkdic.1 ./doc/man/sj3mkdic.1
*** ../sj3-2.0.1.13.org/doc/man/sj3mkdic.1  Fri Dec  9 18:15:37 1994
--- ./doc/man/sj3mkdic.1    Tue Aug 13 03:20:17 1996
***************
*** 550,565 ****
  .SH ファイル
  .PD 0
  .TP \w'\ \ \ \ user/\f2username\f1/private.dic'u+2n
! .B /usr/bin/sj3serv
  かな漢字変換サーバ
  .TP
! .B /usr/lib/sj3/serverrc
  かな漢字変換サーバ セットアップファイル
  .TP
! .B /usr/bin/sj3
  日本語入力フロントエンドプロセッサ
  .TP
! .B /usr/dict/sj3/
  かな漢字変換サーバ デフォルト辞書ディレクトリ
  .TP
  .B "   sj3main.dic
--- 550,565 ----
  .SH ファイル
  .PD 0
  .TP \w'\ \ \ \ user/\f2username\f1/private.dic'u+2n
! .B /usr/local/bin/sj3serv
  かな漢字変換サーバ
  .TP
! .B /usr/local/lib/sj3/serverrc
  かな漢字変換サーバ セットアップファイル
  .TP
! .B /usr/local/bin/sj3
  日本語入力フロントエンドプロセッサ
  .TP
! .B /usr/local/lib/sj3/dict/
  かな漢字変換サーバ デフォルト辞書ディレクトリ
  .TP
  .B "   sj3main.dic
***************
*** 571,584 ****
  .B "   user/\f2username\f1/study.dat
  かな漢字変換学習ファイル
  .TP
! .B /usr/include/sj3lib.h
  かな漢字変換ライブラリ用インクルードファイル
  .TP
! .B /usr/lib/libsj3lib.a
  かな漢字変換ライブラリ
! .TP
! \f3/usr/demo/sj3/ *\f1
! かな漢字変換ライブラリ 使用法サンプル
  .PD
  .SH 関連項目
  \f4sj3\f1 (1),
--- 571,584 ----
  .B "   user/\f2username\f1/study.dat
  かな漢字変換学習ファイル
  .TP
! .B /usr/local/include/sj3lib.h
  かな漢字変換ライブラリ用インクルードファイル
  .TP
! .B /usr/local/lib/libsj3lib.a
  かな漢字変換ライブラリ
! .\".TP
! .\"\f3/usr/local/demo/sj3/ *\f1
! .\"かな漢字変換ライブラリ 使用法サンプル
  .PD
  .SH 関連項目
  \f4sj3\f1 (1),
diff -arcN ../sj3-2.0.1.13.org/doc/man/sj3serv.1 ./doc/man/sj3serv.1
*** ../sj3-2.0.1.13.org/doc/man/sj3serv.1   Fri Jun  3 17:00:53 1994
--- ./doc/man/sj3serv.1 Tue Aug 13 03:20:41 1996
***************
*** 47,63 ****
  このオプションは、\fIsj3serv\fP の読み込むセットアップファイルを指定します。
  .br
  \fIsj3serv\fP はデフォルトではセットアップファイル
! ‘/usr/lib/sj3/serverrc’を読み込みますが、
  このオプションが指定されたときにはかわりに
  コマンドラインで指定されたセットアップファイルを読み込みます。
  .br
  .SH 関連ファイル
  .PD 0
  .TP \w'\ \ \ \ user/\fIusername\fP/private.dic'u+2n
! /usr/lib/sj3/serverrc
  デフォルト仮名変換サーバ セットアップファイル
  .TP
! /usr/sony/dict/sj3/
  かな漢字変換サーバ デフォルト辞書ディレクトリ
  .TP
      sj3main.dic
--- 47,63 ----
  このオプションは、\fIsj3serv\fP の読み込むセットアップファイルを指定します。
  .br
  \fIsj3serv\fP はデフォルトではセットアップファイル
! ‘/usr/local/lib/sj3/serverrc’を読み込みますが、
  このオプションが指定されたときにはかわりに
  コマンドラインで指定されたセットアップファイルを読み込みます。
  .br
  .SH 関連ファイル
  .PD 0
  .TP \w'\ \ \ \ user/\fIusername\fP/private.dic'u+2n
! /usr/local/lib/sj3/serverrc
  デフォルト仮名変換サーバ セットアップファイル
  .TP
! /usr/local/lib/sj3/dict/
  かな漢字変換サーバ デフォルト辞書ディレクトリ
  .TP
      sj3main.dic
diff -arcN ../sj3-2.0.1.13.org/include/Const.h ./include/Const.h
*** ../sj3-2.0.1.13.org/include/Const.h Fri Oct 21 13:16:19 1994
--- ./include/Const.h   Tue Aug 13 03:13:39 1996
***************
*** 33,38 ****
--- 33,42 ----
   * $SonyDate: 1994/10/21 04:16:06 $
   */
  
+ /*
+  * Change some default values.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
  
  
  #define   HostNameLen     128         
***************
*** 54,66 ****
  #define   MinClLen        512
  #define   MaxClLen        0x7fff
  
! #define   RunCmdFile      "/usr/lib/sj3/serverrc"
  #define   DebugOutFile        NULL    
  #define   DebugLevel      0
  #define   ForkFlag        1
  #define   MaxClientNum        512
  #define   ErrorOutFile        "/dev/console"
! #define   DictRootDir     "/usr/dict/sj3"
  #define   LogOutFile      NULL    
  #define   PortName        "sj3"
  #ifdef TLI
--- 58,85 ----
  #define   MinClLen        512
  #define   MaxClLen        0x7fff
  
! #define   RunCmdFile      "/usr/local/lib/sj3/serverrc"
  #define   DebugOutFile        NULL    
  #define   DebugLevel      0
  #define   ForkFlag        1
  #define   MaxClientNum        512
+ /*
+  * Change ErrotOutFile variable.
+  * Because suppress a error when sj3serv start up, change to "/dev/stderr".
+  * This error is "Cannot Open "/dev/console".". 
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  *
+  * Change ErrotOutFile variable.
+  * This default value is "/dev/null" in document.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/11
+  */
+ #if 0
  #define   ErrorOutFile        "/dev/console"
! #else
! /* #define    ErrorOutFile        "/dev/stderr" */    /* for test */
! #define   ErrorOutFile        "/dev/null"
! #endif
! #define   DictRootDir     "/usr/local/lib/sj3/dict"
  #define   LogOutFile      NULL    
  #define   PortName        "sj3"
  #ifdef TLI
diff -arcN ../sj3-2.0.1.13.org/server/Imakefile ./server/Imakefile
*** ../sj3-2.0.1.13.org/server/Imakefile    Fri Jun  3 17:02:50 1994
--- ./server/Imakefile  Mon Aug 12 11:38:51 1996
***************
*** 32,39 ****
   * $SonyDate: 1994/06/03 08:02:49 $
   */
  
! DEST          = /usr/bin
! CONFDIR   = /usr/lib/sj3
  CONFFILE        = $(CONFDIR)/serverrc
  RKDIR           = ../sj3lib
  
--- 32,44 ----
   * $SonyDate: 1994/06/03 08:02:49 $
   */
  
! /*
!  * Change some make rules.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! 
! DEST          = /usr/local/bin
! CONFDIR   = /usr/local/lib/sj3
  CONFFILE        = $(CONFDIR)/serverrc
  RKDIR           = ../sj3lib
  
***************
*** 45,59 ****
  EXTRA_LIBRARIES = -lnsl
  #endif
  #else
! INSTGROUP = staff
  #endif
  DEFINES          = $(ARCDEFS) $(SYSDEFS) $(USETLI) 
  
  CONVLIB         = ../kanakan/libkanakan.a
  DEPLIBS         = $(CONVLIB)
  LOCAL_LIBRARIES = $(CONVLIB)
! INSTFLAGS = -o root -g $(INSTGROUP) -m 4755
! INSTFLAGS2    = -o root -g $(INSTGROUP) -m 444
  
  #MKDIRHIER       = ../util/mkdirh/mkdirh
  
--- 50,64 ----
  EXTRA_LIBRARIES = -lnsl
  #endif
  #else
! INSTGROUP = bin
  #endif
  DEFINES          = $(ARCDEFS) $(SYSDEFS) $(USETLI) 
  
  CONVLIB         = ../kanakan/libkanakan.a
  DEPLIBS         = $(CONVLIB)
  LOCAL_LIBRARIES = $(CONVLIB)
! INSTFLAGS = -o bin -g $(INSTGROUP) -m 4755
! INSTFLAGS2    = -o bin -g $(INSTGROUP) -m 444
  
  #MKDIRHIER       = ../util/mkdirh/mkdirh
  
***************
*** 80,83 ****
  DependTarget()
  LinkSourceFile(string.c,$(RKDIR))
  InstallProgramWithFlags(sj3serv,$(DEST),$(INSTFLAGS))
! InstallProgramWithFlags(serverrc,$(CONFDIR),$(INSTFLAGS2))
--- 85,88 ----
  DependTarget()
  LinkSourceFile(string.c,$(RKDIR))
  InstallProgramWithFlags(sj3serv,$(DEST),$(INSTFLAGS))
! InstallMultipleFlags(serverrc,$(CONFDIR),$(INSTFLAGS2))
diff -arcN ../sj3-2.0.1.13.org/server/rc.sj3serv ./server/rc.sj3serv
*** ../sj3-2.0.1.13.org/server/rc.sj3serv   Fri Jun  3 17:02:55 1994
--- ./server/rc.sj3serv Mon Aug 12 11:48:07 1996
***************
*** 41,49 ****
  CMDNAME=sj3serv
  
  PRINTNAME=$CMDNAME
! CMDDIR=/usr/bin
  BACKGROUND=
! PATH=/usr/bin:/bin
  CMDPATH=$CMDDIR/$CMDNAME
  
  RESTARTMESSAGE=
--- 41,49 ----
  CMDNAME=sj3serv
  
  PRINTNAME=$CMDNAME
! CMDDIR=/usr/local/bin
  BACKGROUND=
! PATH=/usr/local/bin:/usr/bin:/bin
  CMDPATH=$CMDDIR/$CMDNAME
  
  RESTARTMESSAGE=
***************
*** 54,111 ****
  #DOWNMESSAGE="Killed $PRINTNAME"
  USAGEMESSAGE="Usage: $0 [start|stop]"
  
  if [ "$CMDNAME" = "sj3serv" ]
  then
!   if [ ! -d /usr/bin ]
!   then                    # /usr not mounted
            exit
    fi
  
-   pid=`/sbin/findproc $CMDNAME`
    case "$1" in
    'start')
!       if [ $pid ] 
!       then    
!           kill -TERM $pid
!           sleep 1
!           pid=`/sbin/findproc $CMDNAME`
!           if [ $pid ] 
!           then
!               kill -9 $pid
!           fi
!           if [ -f $CMDPATH ]
            then
!               if [ "$RESTARTMESSAGE" ] 
!               then 
!                   echo $RESTARTMESSAGE > /dev/console
!               fi
!               eval $CMDPATH $BACKGROUND
            fi  
!       else
!           if [ -f $CMDPATH ]
!           then 
!               if [ "$STARTMESSAGE" ]
!               then
!                   echo $STARTMESSAGE >/dev/console 
!               fi  
!                                 eval $CMDPATH $BACKGROUND
!           fi
        fi
        ;;
    'stop')
!       if [ $pid ]
!       then
!           kill -TERM $pid
!           sleep 1
!           pid=`/sbin/findproc $CMDNAME`
!           if [ $pid ] 
!           then 
!               kill -9 $pid
!           fi
!           if [ "$DOWNMESSAGE" ]
            then
!               echo $DOWNMESSAGE > /dev/console
!           fi
        fi
        ;;
    *)
--- 54,152 ----
  #DOWNMESSAGE="Killed $PRINTNAME"
  USAGEMESSAGE="Usage: $0 [start|stop]"
  
+ #if [ "$CMDNAME" = "sj3serv" ]
+ #then
+ # if [ ! -d /usr/local/bin ]
+ # then                    # /usr/local not mounted
+ #         exit
+ # fi
+ #
+ # pid=`/sbin/findproc $CMDNAME`
+ # case "$1" in
+ # 'start')
+ #     if [ $pid ] 
+ #     then    
+ #         kill -TERM $pid
+ #         sleep 1
+ #         pid=`/sbin/findproc $CMDNAME`
+ #         if [ $pid ] 
+ #         then
+ #             kill -9 $pid
+ #         fi
+ #         if [ -f $CMDPATH ]
+ #         then
+ #             if [ "$RESTARTMESSAGE" ] 
+ #             then 
+ #                 echo $RESTARTMESSAGE > /dev/console
+ #             fi
+ #             eval $CMDPATH $BACKGROUND
+ #         fi  
+ #     else
+ #         if [ -f $CMDPATH ]
+ #         then 
+ #             if [ "$STARTMESSAGE" ]
+ #             then
+ #                 echo $STARTMESSAGE >/dev/console 
+ #             fi  
+ #                                eval $CMDPATH $BACKGROUND
+ #         fi
+ #     fi
+ #     ;;
+ # 'stop')
+ #     if [ $pid ]
+ #     then
+ #         kill -TERM $pid
+ #         sleep 1
+ #         pid=`/sbin/findproc $CMDNAME`
+ #         if [ $pid ] 
+ #         then 
+ #             kill -9 $pid
+ #         fi
+ #         if [ "$DOWNMESSAGE" ]
+ #         then
+ #             echo $DOWNMESSAGE > /dev/console
+ #         fi
+ #     fi
+ #     ;;
+ # *)
+ #     echo $USAGEMESSAGE 
+ #     ;;  
+ # esac    
+ #fi
+ 
+ ##
+ ## For system which don't have a findproc command.(FreeBSD, ...)
+ ## Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+ ##
+ 
  if [ "$CMDNAME" = "sj3serv" ]
  then
!   if [ ! -d /usr/local/bin ]
!   then                    # /usr/local not mounted
            exit
    fi
  
    case "$1" in
    'start')
!       if [ -f $CMDPATH ]
!       then 
!           if [ "$STARTMESSAGE" ]
            then
!               echo $STARTMESSAGE >/dev/console 
            fi  
!           eval $CMDPATH $BACKGROUND
        fi
        ;;
    'stop')
!       ;;
!   '')
!       if [ -f $CMDPATH ]
!       then 
!           if [ "$STARTMESSAGE" ]
            then
!               echo $STARTMESSAGE >/dev/console 
!           fi  
!           eval $CMDPATH $BACKGROUND
        fi
        ;;
    *)
diff -arcN ../sj3-2.0.1.13.org/server/setup.c ./server/setup.c
*** ../sj3-2.0.1.13.org/server/setup.c  Fri Dec  9 20:27:07 1994
--- ./server/setup.c    Mon Aug 12 23:58:25 1996
***************
*** 221,250 ****
    u_char  *(*optfunc)();
    int optarg;
  } option[] = {
    "DebugOut", get_str,    (int)&debug_file,
    "DebugLevel",   get_int,    (int)&debug_level,
    "ForkFlag", get_flag,   (int)&fork_flag,
  
    "PortName", get_str,    (int)&port_name,
  #ifdef TLI
    "PortNumber",   get_str,    (int)&port_number,
!         "ProtoName",    get_str,        (int)&proto_name,
  #else
    "PortNumber",   get_int,    (int)&port_number,
  #endif
    "SocketName",   get_str,    (int)&socket_name,
  #ifdef    LOCK_FILE
    "LockFile", get_str,    (int)&lock_file;
  #endif
  
    "maxclient",    get_int,    (int)&max_client,
    "dictdir",  get_str,    (int)&dict_dir,
    "readdict", get_list,   (int)&read_dict,
    "opendict", get_list,   (int)&open_dict,
    "errorout", get_str,    (int)&error_file,
    "logout",   get_str,    (int)&log_file,
    "dirmode",  get_int,    (int)&dir_mode,
    "filemode", get_int,    (int)&file_mode,
    "allowuser",    get_list,   (int)&allow_user,
    0, 0, 0
  };
--- 221,273 ----
    u_char  *(*optfunc)();
    int optarg;
  } option[] = {
+ /*
+  * Add option flag.
+  * Because They are lacked in here. See document.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
    "DebugOut", get_str,    (int)&debug_file,
+   "debugout", get_str,    (int)&debug_file,
    "DebugLevel",   get_int,    (int)&debug_level,
+   "debuglevel",   get_int,    (int)&debug_level,
    "ForkFlag", get_flag,   (int)&fork_flag,
+   "forkflag", get_flag,   (int)&fork_flag,
  
    "PortName", get_str,    (int)&port_name,
+   "portname", get_str,    (int)&port_name,
  #ifdef TLI
    "PortNumber",   get_str,    (int)&port_number,
!   "portnumber",   get_str,    (int)&port_number,
!   "ProtoName",    get_str,        (int)&proto_name,
!   "protoname",    get_str,        (int)&proto_name,
  #else
    "PortNumber",   get_int,    (int)&port_number,
+   "portnumber",   get_int,    (int)&port_number,
  #endif
    "SocketName",   get_str,    (int)&socket_name,
+   "socketname",   get_str,    (int)&socket_name,
  #ifdef    LOCK_FILE
    "LockFile", get_str,    (int)&lock_file;
+   "lockfile", get_str,    (int)&lock_file;
  #endif
  
+   "MaxClient",    get_int,    (int)&max_client,
    "maxclient",    get_int,    (int)&max_client,
+   "DictDir",  get_str,    (int)&dict_dir,
    "dictdir",  get_str,    (int)&dict_dir,
+   "ReadDict", get_list,   (int)&read_dict,
    "readdict", get_list,   (int)&read_dict,
+   "OpenDict", get_list,   (int)&open_dict,
    "opendict", get_list,   (int)&open_dict,
+   "ErrorOut", get_str,    (int)&error_file,
    "errorout", get_str,    (int)&error_file,
+   "LogOut",   get_str,    (int)&log_file,
    "logout",   get_str,    (int)&log_file,
+   "DirMode",  get_int,    (int)&dir_mode,
    "dirmode",  get_int,    (int)&dir_mode,
+   "FileMode", get_int,    (int)&file_mode,
    "filemode", get_int,    (int)&file_mode,
+   "AllowUser",    get_list,   (int)&allow_user,
    "allowuser",    get_list,   (int)&allow_user,
    0, 0, 0
  };
diff -arcN ../sj3-2.0.1.13.org/sj3/Imakefile ./sj3/Imakefile
*** ../sj3-2.0.1.13.org/sj3/Imakefile   Fri Jun  3 17:03:02 1994
--- ./sj3/Imakefile Mon Aug 12 18:29:43 1996
***************
*** 32,39 ****
   * $SonyDate: 1994/06/03 08:03:01 $
   */
  
! DEST          = /usr/bin
! CONFDIR   = /usr/lib/sj3
  
  INCLUDES        =  -I../sj3h  -I../sj3lib -I../include
  #if SystemV4 || SystemV
--- 32,44 ----
   * $SonyDate: 1994/06/03 08:03:01 $
   */
  
! /*
!  * Change some make rules.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! 
! DEST          = /usr/local/bin
! CONFDIR   = /usr/local/lib/sj3
  
  INCLUDES        =  -I../sj3h  -I../sj3lib -I../include
  #if SystemV4 || SystemV
***************
*** 48,56 ****
  EXTRA_LIBRARIES = -lnsl
  #endif
  #else
! INSTGROUP = staff
  SRC0      = nmttyslot.c
  OBJ0      = nmttyslot.o
  #endif
  DEFINES       = $(ARCDEFS) $(SYSDEFS) -DKANJI -DOKB 
  
--- 53,70 ----
  EXTRA_LIBRARIES = -lnsl
  #endif
  #else
! INSTGROUP = bin
  SRC0      = nmttyslot.c
  OBJ0      = nmttyslot.o
+ /*
+  * Change for FreeBSD.
+  * Because When the LANG variable is EUC, setlocale function in library libc 
+  * return NULL, use it in library libxpg4 
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
+ #if defined(FreeBSDArchitecture)
+ CODE_LIBS = -lxpg4
+ #endif
  #endif
  DEFINES       = $(ARCDEFS) $(SYSDEFS) -DKANJI -DOKB 
  
***************
*** 59,65 ****
  SJ3_LIBDIR          = ../sj3lib
  RKDIR = ../sj3rkcv
  SJLIB           = $(SJ3_LIBDIR)/libsj3lib.a
! INSTFLAGS     = -o root -g $(INSTGROUP) -m 4755
  DEPLIBS         = $(SJLIB)
  LOCAL_LIBRARIES = $(SJLIB)
  
--- 73,79 ----
  SJ3_LIBDIR          = ../sj3lib
  RKDIR = ../sj3rkcv
  SJLIB           = $(SJ3_LIBDIR)/libsj3lib.a
! INSTFLAGS     = -o bin -g $(INSTGROUP) -m 4755
  DEPLIBS         = $(SJLIB)
  LOCAL_LIBRARIES = $(SJLIB)
  
diff -arcN ../sj3-2.0.1.13.org/sj3/edit.c ./sj3/edit.c
*** ../sj3-2.0.1.13.org/sj3/edit.c  Fri Jun  3 17:03:14 1994
--- ./sj3/edit.c    Tue Aug 13 01:02:16 1996
***************
*** 302,308 ****
    cv = GetConversion ();
    if (cv->Ppoint[n+1] == 0)
        return;
!   mlen = strlen (cv->Ppoint[n+1]);
    plen = cv->Ppoint[n] - cv->Ppoint[0];
    p = cv->Ppoint[n];
    pp = &cv->out_mode[plen];
--- 302,313 ----
    cv = GetConversion ();
    if (cv->Ppoint[n+1] == 0)
        return;
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    mlen = strlen (cv->Ppoint[n+1]); */
!   mlen = strlen ((char *)cv->Ppoint[n+1]);
    plen = cv->Ppoint[n] - cv->Ppoint[0];
    p = cv->Ppoint[n];
    pp = &cv->out_mode[plen];
***************
*** 728,734 ****
  
    ylen = wslen(Zs);
    limit = Elimit - ylen;
!   hlimit = Ehlimit - strlen(Hs);
    *ztmp = '\0';
    *htmp = '\0';
    SaveConversion (GetConversion ());
--- 733,744 ----
  
    ylen = wslen(Zs);
    limit = Elimit - ylen;
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    hlimit = Ehlimit - strlen(Hs); */
!   hlimit = Ehlimit - strlen((char *)Hs);
    *ztmp = '\0';
    *htmp = '\0';
    SaveConversion (GetConversion ());
***************
*** 749,755 ****
        else
            (void)exec_romaji2(inc, htmp, ztmp, otmp, len, rlen);
    }
!   (void)exec_romaji2(0, htmp, ztmp, otmp, strlen(ztmp), strlen(htmp));
    sj3_rkclear();
    len = wslen (ztmp);
    backspace(wcbyte(ztmp));
--- 759,770 ----
        else
            (void)exec_romaji2(inc, htmp, ztmp, otmp, len, rlen);
    }
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    (void)exec_romaji2(0, htmp, ztmp, otmp, strlen(ztmp), strlen(htmp)); */
!   (void)exec_romaji2(0, htmp, ztmp, otmp, strlen((char *)ztmp), strlen((char *)htmp));
    sj3_rkclear();
    len = wslen (ztmp);
    backspace(wcbyte(ztmp));
diff -arcN ../sj3-2.0.1.13.org/sj3/funckey.c ./sj3/funckey.c
*** ../sj3-2.0.1.13.org/sj3/funckey.c   Fri Jun  3 17:03:18 1994
--- ./sj3/funckey.c Mon Aug 12 11:53:25 1996
***************
*** 117,123 ****
    struct cvtkey *ckeyp;
    struct wcvtkey *wckeyp;
  
!   strcpy(cvtkey_file, "/usr/lib/sj3/cvtkey.");
    strcpy(line, term);
    if((p = strchr(line, '-')) != NULL)
        *p = '\0';
--- 117,127 ----
    struct cvtkey *ckeyp;
    struct wcvtkey *wckeyp;
  
! /*
!  * Change a default value.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
!   strcpy(cvtkey_file, "/usr/local/lib/sj3/cvtkey.");
    strcpy(line, term);
    if((p = strchr(line, '-')) != NULL)
        *p = '\0';
diff -arcN ../sj3-2.0.1.13.org/sj3/henkan.c ./sj3/henkan.c
*** ../sj3-2.0.1.13.org/sj3/henkan.c    Fri Jun  3 17:03:19 1994
--- ./sj3/henkan.c  Tue Aug 13 01:01:25 1996
***************
*** 340,346 ****
        out += i;
    }
    if (*in != '\0')
!       (void)sj_hantozen(out, in, strlen(in));
  }         
  
  
--- 340,351 ----
        out += i;
    }
    if (*in != '\0')
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*        (void)sj_hantozen(out, in, strlen(in)); */
!       (void)sj_hantozen(out, in, strlen((char *)in));
  }         
  
  
diff -arcN ../sj3-2.0.1.13.org/sj3/romaji.c ./sj3/romaji.c
*** ../sj3-2.0.1.13.org/sj3/romaji.c    Fri Jun  3 17:03:22 1994
--- ./sj3/romaji.c  Tue Aug 13 01:03:23 1996
***************
*** 370,376 ****
        s2 += i;
        roma[res + i] = '\0';
        rlen = sj3_rkconv2(roma, kstr, i + res - 1);
!       res = strlen(roma);
        if (rlen <= 0)
            continue;
        kp = kstr;
--- 370,381 ----
        s2 += i;
        roma[res + i] = '\0';
        rlen = sj3_rkconv2(roma, kstr, i + res - 1);
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*        res = strlen(roma); */
!       res = strlen((char *)roma);
        if (rlen <= 0)
            continue;
        kp = kstr;
diff -arcN ../sj3-2.0.1.13.org/sj3/sj3.c ./sj3/sj3.c
*** ../sj3-2.0.1.13.org/sj3/sj3.c   Fri Apr  7 17:36:34 1995
--- ./sj3/sj3.c Tue Aug 13 02:47:32 1996
***************
*** 189,195 ****
    (void) signal (SIGBUS, (void (*)())makecore);
    (void) signal (SIGSEGV, (void (*)())makecore);
    (void) signal (SIGFPE, (void (*)())makecore);
!   sigpipe = signal (SIGPIPE, SIG_IGN);
  
    if (argv [0][0] == '-')
        Lflag ++;
--- 189,204 ----
    (void) signal (SIGBUS, (void (*)())makecore);
    (void) signal (SIGSEGV, (void (*)())makecore);
    (void) signal (SIGFPE, (void (*)())makecore);
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    sigpipe = signal (SIGPIPE, SIG_IGN); */
! #ifdef SIGTYPE_VOID
!   sigpipe = (void(*)()) signal (SIGPIPE, SIG_IGN);
! #else
!   sigpipe = (int(*)()) signal (SIGPIPE, SIG_IGN);
! #endif
  
    if (argv [0][0] == '-')
        Lflag ++;
***************
*** 452,466 ****
--- 461,499 ----
  
    ioctl(master, I_PUSH, "pckt");      
  #else 
+ /*
+  * Change pseudo-devices.
+  * Because FreeBSD's master pseudo-devices are pty[p-sP-S][0-9a-v].
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
+ #if defined(__FreeBSD__)
+   struct stat stb;
+   int     h, i, j, k1, k2;
+ #else /* !__FreeBSD__ */
    char        c;
    struct stat stb;
    int     i, j, k1, k2;
+ #endif /* __FreeBSD__ */
  
    strcpy(line, "/dev/ptyXX");
  
    k1 = strlen("/dev/pty");
    k2 = strlen ("/dev/ptyp");
  
+ /*
+  * Change pseudo-devices.
+  * Because FreeBSD's master pseudo-devices are pty[p-sP-S][0-9a-v].
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
+ #if defined(__FreeBSD__)
+   for (h = 0; h < 8; h++) {
+       line[k1] = "pqrsPQRS"[h];
+       line[k2] = '0';
+       if (stat (line, &stb) < 0)
+           break;
+       for (i = 0; i < 32; i++) {
+           line[k2] = "0123456789abcdefghijklmnopqrstuv"[i];
+ #else /* !__FreeBSD__ */
    for (c = 'p'; c <= 'z'; c ++) { 
        line[k1] = c;
        line[k2] = '0';
***************
*** 468,473 ****
--- 501,507 ----
            break;
        for (i = 0; i < 16; i++) {
            line[k2] = "0123456789abcdef"[i];
+ #endif /* __FreeBSD__ */
            master = open (line, 2);
            if (master >= 0) {
                j = 1;
***************
*** 681,687 ****
    }
  
  #ifndef SVR4
!   (void) signal (SIGCHLD, exitprocess);
  #endif 
  }
  
--- 715,726 ----
    }
  
  #ifndef SVR4
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    (void) signal (SIGCHLD, exitprocess); */
!   (void) signal (SIGCHLD, (void (*)())exitprocess);
  #endif 
  }
  
***************
*** 787,792 ****
--- 826,836 ----
  #else /* SYSV_TERMIOS */
    struct utmp     Utmp;
    register char       *p;
+ /*
+  * Remove warning.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
+   char            *ttyname (), *strrchr ();
  #define SCPYN(a, b) strncpy(a, b, sizeof(a))
  
    if ((p = ttyname (0)) == NULL)
***************
*** 836,842 ****
        shellargs[1] = (char *) 0;
    }
  
!   (void) signal (SIGPIPE, sigpipe);
    if ( *shellprog == '/' ) {
        if (shell_flag) {
            strcpy (shellbuf, "SHELL=");
--- 880,891 ----
        shellargs[1] = (char *) 0;
    }
  
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    (void) signal (SIGPIPE, sigpipe); */
!   (void) signal (SIGPIPE, (void (*)())sigpipe);
    if ( *shellprog == '/' ) {
        if (shell_flag) {
            strcpy (shellbuf, "SHELL=");
***************
*** 1006,1012 ****
    union wait  status;
    int     pid;
  
!   pid = wait3 (&status, (WNOHANG|WUNTRACED), 0);
    if (WIFSTOPPED (status))
  #endif
        suspend();
--- 1055,1066 ----
    union wait  status;
    int     pid;
  
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    pid = wait3 (&status, (WNOHANG|WUNTRACED), 0); */
!   pid = wait3 ((int *)&status, (WNOHANG|WUNTRACED), 0);
    if (WIFSTOPPED (status))
  #endif
        suspend();
***************
*** 1068,1080 ****
        SetRegion();
    }
  
!   old_sigtstp = signal (SIGTSTP, SIG_DFL);
  
    kill (0, SIGTSTP);
  
    
  
!   (void) signal (SIGTSTP, old_sigtstp);
    killpg (Pid_shell, SIGCONT);
    fixtty ();
  
--- 1122,1148 ----
        SetRegion();
    }
  
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    old_sigtstp = signal (SIGTSTP, SIG_DFL); */
! #ifdef SIGTYPE_VOID
!   old_sigtstp = (void(*)()) signal (SIGTSTP, SIG_DFL);
! #else
!   old_sigtstp = (int(*)()) signal (SIGTSTP, SIG_DFL);
! #endif
  
    kill (0, SIGTSTP);
  
    
  
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    (void) signal (SIGTSTP, old_sigtstp); */
!   (void) signal (SIGTSTP, (void (*)())old_sigtstp);
    killpg (Pid_shell, SIGCONT);
    fixtty ();
  
diff -arcN ../sj3-2.0.1.13.org/sj3/sjrc.c ./sj3/sjrc.c
*** ../sj3-2.0.1.13.org/sj3/sjrc.c  Fri Dec  9 20:27:09 1994
--- ./sj3/sjrc.c    Tue Aug 13 00:53:22 1996
***************
*** 52,59 ****
  extern char   home[];
  extern char   term_name[];
  extern int      current_locale;
! #define DEFRKFILE "/usr/lib/sj3/sjrk"
! #define DEFRCFILE "/usr/lib/sj3/sjrc"
  
  #define GUIDELEN  80
  
--- 52,63 ----
  extern char   home[];
  extern char   term_name[];
  extern int      current_locale;
! /*
!  * Change a default value.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! #define DEFRKFILE "/usr/local/lib/sj3/sjrk"
! #define DEFRCFILE "/usr/local/lib/sj3/sjrc"
  
  #define GUIDELEN  80
  
***************
*** 442,448 ****
  struct wordent    word[];
  {
    if (word[1].word_str[0] != '\0' && shellprog[0] == '\0') {
!       strcpy (shellprog, word[1].word_str);
        shell_flag++;
    }
  }
--- 446,457 ----
  struct wordent    word[];
  {
    if (word[1].word_str[0] != '\0' && shellprog[0] == '\0') {
! /*
!  * Remove warning.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*        strcpy (shellprog, word[1].word_str); */
!       strcpy (shellprog, (char *)word[1].word_str);
        shell_flag++;
    }
  }
diff -arcN ../sj3-2.0.1.13.org/sj3dic/Imakefile ./sj3dic/Imakefile
*** ../sj3-2.0.1.13.org/sj3dic/Imakefile    Fri Jun  3 17:03:33 1994
--- ./sj3dic/Imakefile  Mon Aug 12 12:20:15 1996
***************
*** 32,38 ****
   * $SonyDate: 1994/06/03 08:03:32 $
   */
  
! DEST          = /usr/bin
  
  INCLUDES        =  -I../include -I../sj3lib
  #if SystemV4 || SystemV
--- 32,43 ----
   * $SonyDate: 1994/06/03 08:03:32 $
   */
  
! /*
!  * Change some make rules.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! 
! DEST          = /usr/local/bin
  
  INCLUDES        =  -I../include -I../sj3lib
  #if SystemV4 || SystemV
***************
*** 41,47 ****
  CODE_LIBS       = -ljcode
  #endif
  #else
! INSTGROUP = staff
  #endif
  
  SYS_LIBRARIES   = $(CODE_LIBS)
--- 46,52 ----
  CODE_LIBS       = -ljcode
  #endif
  #else
! INSTGROUP = bin
  #endif
  
  SYS_LIBRARIES   = $(CODE_LIBS)
***************
*** 52,58 ****
  DEPLIBS         = $(SJLIB)
  LOCAL_LIBRARIES = $(SJLIB)
  
! INSTFLAGS     = -o root -g $(INSTGROUP) -m 755
  
  SRCS          = codecnv.c \
                  dictdisp.c \
--- 57,63 ----
  DEPLIBS         = $(SJLIB)
  LOCAL_LIBRARIES = $(SJLIB)
  
! INSTFLAGS     = -o bin -g $(INSTGROUP) -m 755
  
  SRCS          = codecnv.c \
                  dictdisp.c \
diff -arcN ../sj3-2.0.1.13.org/sj3h/sj2.h ./sj3h/sj2.h
*** ../sj3-2.0.1.13.org/sj3h/sj2.h  Fri Jun  3 17:03:51 1994
--- ./sj3h/sj2.h    Tue Aug 13 01:14:54 1996
***************
*** 95,103 ****
  
  
  
  #define TRUE  0
  #define FALSE -1
! 
  
  
  struct    wordent {
--- 95,115 ----
  
  
  
+ /*
+  * Remove warning.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
+  */
+ #if defined(TRUE) && defined(FALSE)
+ #if (TRUE != 0) || (TRUE != -1)
+ #undef TRUE
+ #undef FALSE
  #define TRUE  0
  #define FALSE -1
! #endif
! #else
! #define TRUE  0
! #define FALSE -1
! #endif
  
  
  struct    wordent {
diff -arcN ../sj3-2.0.1.13.org/sj3lib/Imakefile ./sj3lib/Imakefile
*** ../sj3-2.0.1.13.org/sj3lib/Imakefile    Fri Jun  3 17:03:54 1994
--- ./sj3lib/Imakefile  Mon Aug 12 12:22:02 1996
***************
*** 32,39 ****
   * $SonyDate: 1994/06/03 08:03:53 $
   */
  
! INSTALL_LIBDIR = /usr/lib
! INSTALL_HDRDIR = /usr/include
  #if SystemV4 || SystemV
  DEFINES = -DTLI
  #endif
--- 32,44 ----
   * $SonyDate: 1994/06/03 08:03:53 $
   */
  
! /*
!  * Change some make rules.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! 
! INSTALL_LIBDIR = /usr/local/lib
! INSTALL_HDRDIR = /usr/local/include
  #if SystemV4 || SystemV
  DEFINES = -DTLI
  #endif
diff -arcN ../sj3-2.0.1.13.org/sj3stat/Imakefile ./sj3stat/Imakefile
*** ../sj3-2.0.1.13.org/sj3stat/Imakefile   Tue May 30 21:29:25 1995
--- ./sj3stat/Imakefile Mon Aug 12 12:23:14 1996
***************
*** 32,44 ****
   * $SonyDate: 1995/05/30 12:29:17 $
   */
  
! DEST          = /usr/bin
  
  INCLUDES        =  -I../include -I../sj3lib
  #if SystemV4 || SystemV
  INSTGROUP = bin
  #else
! INSTGROUP = staff
  #endif
  
  SYS_LIBRARIES   = $(CODE_LIBS)
--- 32,49 ----
   * $SonyDate: 1995/05/30 12:29:17 $
   */
  
! /*
!  * Change some make rules.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! 
! DEST          = /usr/local/bin
  
  INCLUDES        =  -I../include -I../sj3lib
  #if SystemV4 || SystemV
  INSTGROUP = bin
  #else
! INSTGROUP = bin
  #endif
  
  SYS_LIBRARIES   = $(CODE_LIBS)
***************
*** 49,55 ****
  DEPLIBS         = $(SJLIB)
  LOCAL_LIBRARIES = $(SJLIB)
  
! INSTFLAGS     = -o root -g $(INSTGROUP) -m 755
  
  SRCS          = sj3stat.c
    
--- 54,60 ----
  DEPLIBS         = $(SJLIB)
  LOCAL_LIBRARIES = $(SJLIB)
  
! INSTFLAGS     = -o bin -g $(INSTGROUP) -m 755
  
  SRCS          = sj3stat.c
    
diff -arcN ../sj3-2.0.1.13.org/sj3stat/sj3stat.c ./sj3stat/sj3stat.c
*** ../sj3-2.0.1.13.org/sj3stat/sj3stat.c   Tue May 30 21:29:25 1995
--- ./sj3stat/sj3stat.c Mon Aug 12 23:39:19 1996
***************
*** 91,100 ****
    }
    fprintf (stdout, "%d users.\n", n);
  
!   fprintf(stdout, "%-16s %-16s %-8s %s\n", 
        "(USER)", "(HOST)", "(FD)", "(CLIENT)");
    for (i = 0; i < n; i++) {
!       fprintf(stdout, "%-16s %-16s %-8d %s\n", who[i].username, 
            who[i].hostname, who[i].fd, who[i].progname);
    }
    (void) sj3_erase_connection(&clnt);
--- 91,107 ----
    }
    fprintf (stdout, "%d users.\n", n);
  
! /*
!  * Change hostname entry's length.
!  * Because it's so short.
!  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)       1996/8/10
!  */
! /*    fprintf(stdout, "%-16s %-16s %-8s %s\n", */
!   fprintf(stdout, "%-16s %-32s %-8s %s\n", 
        "(USER)", "(HOST)", "(FD)", "(CLIENT)");
    for (i = 0; i < n; i++) {
! /*        fprintf(stdout, "%-16s %-16s %-8d %s\n", who[i].username, */
!       fprintf(stdout, "%-16s %-32s %-8d %s\n", who[i].username, 
            who[i].hostname, who[i].fd, who[i].progname);
    }
    (void) sj3_erase_connection(&clnt);