~ubuntu-branches/ubuntu/lucid/dico/lucid

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
2009-03-29  Sergey Poznyakoff  <gray@gnu.org.ua>

	Version 2.0
	* configure.ac: Version 2.0
	* Makefile.am (make-ChangeLog): Remove rule
	* NEWS, README: Update.
	* doc/dico.texi: Update.

2009-03-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fix

2009-03-14  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes

2009-03-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	Use git:// url for wit

	Various organizational changes
	* bootstrap.conf: Init and update wit submodule.

	* configure.ac: Version 1.99.97
	(AC_INIT): Spell full name as 'GNU dico' (lowercase), in order
	to help
	the `po' machinery recognize the project as official GNU one
	(po/Makefile.in.in uses a primitive `grep 'GNU @PROJECT@'
	../*', so
	actually any file containing this string would do).
	* NEWS: Update.

	* Makefile.am (SUBDIRS): Remove makedict. It is not yet needed.
	(EXTRA_DIST): Add app and dicoweb.
	* po/POTFILES.in: Remove makedict.
	* dicod/acl.c: Provide a translators comment.
	* modules/dict.org/dictorg.c: Fix typo.

2009-03-08  Wojciech Polak  <polak@gnu.org>

	Add mediawiki.py -- a Python module for a remote access to
	Wikipedia.

	Add Dicoweb -- a web search interface.

2009-01-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Change documentation license to GFDLv1.3+

2008-12-20  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fix.
	* dico/cmdline.opt: Fix --sasl and --nosasl definitions.
	Remove --strats alias. Use --strat(egies) instead.

2008-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix qp

	Base64 fix.
	* lib/base64.c (dico_base64_encode): Fix calculation of the
	number of
	consumed bytes.

	Fix filter encoding.
	* include/dico/filter.h (filter_xcode_t): Remove last two
	parameters.
	Filter stream is now responsible for keeping track of line widths.
	(dico_base64_decode,dico_base64_encode)
	(dico_qp_decode,dico_qp_encode): Update.
	* lib/base64.c (dico_base64_decode): Remove line_max and
	pline_len.
	(dico_base64_encode): Likewise.
	(dico_base64_stream_create): Set minimal input length to 3.
	It is valid for encoding. Decoding remains a fixme.
	* lib/qp.c (dico_qp_decode, dico_qp_encode): Remove last two
	parameters.
	* lib/fltstream.c (struct filter_stream): New members inbuf
	and inlevel.
	(filter_flush): New function. Keep track of line lengths.
	(filter_write0): New function.
	(filter_write,filter_wr_flush): Rewrite using filter_flush.
	(filter_stream_destroy): New method.
	(filter_stream_create): Initialize inbuf and inlevel.
	* dicod/ident.c: Update call to dico_base64_decode.

2008-12-18  Wojciech Polak  <polak@gnu.org>

	Implement dico_result_headers in Python module.
	* modules/python/python.c (_assoc_to_dict, _dict_to_assoc,
	mod_result_headers): New functions.
	* modules/template.py (result_headers): New optional method.

2008-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>

	Allow modules to return or modify MIME headers for definition
	results.
	* dicod/loader.c (print_definitions): Use mp->dico_result_headers
	to get headers from the module.
	(mime_headers_cb): Allow 8bit encoding.
	* dicod/ostream.c: Handle 8bit encoding.
	* include/dico/assoc.h (dico_assoc_clear, dico_assoc_dup):
	New prototypes.
	* include/dico/list.h (dico_list_clear): New prototype.
	* include/dico/types.h (struct dico_database_module): New method
	dico_result_headers.
	* lib/assoc.c (dico_assoc_clear, dico_assoc_dup): New functions.
	(_dico_assoc_find_n): Allow for assoc==NULL.
	(dico_assoc_destroy): Likewise.
	* lib/header.c (dico_header_parse): Allow for text==NULL.
	* lib/list.c (dico_list_clear): New function.
	(dico_list_destroy): Use dico_list_clear.
	(dico_iterator_remove_current): Bugfix: use default comparator.

	* modules/guile/guile.c: Implement dico_result_headers.
	* tests/example.scm: Likewise.

2008-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>

	Rewamp list and assoc support. Keep MIME headers in an assoc list.
	* include/dico/assoc.h	(struct dico_assoc): Key is const
	(DICO_ASSOC_CI, DICO_ASSOC_MULT): New defines.
	(dico_assoc_append,dico_assoc_find_n): New functions.
	(dico_assoc_iterator, dico_assoc_remove_n): New functions.
	(dico_header_parse): New function.
	* include/dico/list.h (dico_list_destroy): Change signature.
	(dico_list_set_free_item)
	(dico_list_set_comparator,dico_list_get_comparator): New
	functions.
	(dico_list_insert_sorted): Change signature.
	(dico_list_locate,dico_list_remove): Change signature.
	(_dico_list_locate): New function.
	(dico_iterator_create): Rename to dico_list_iterator
	(dico_iterator_remove_current): Change signature and return type.
	* dico/strat.h (dico_strat_name_cmp): Change signature.
	(dico_strat_free): New proto.
	* dico/types.h (dico_assoc_list_t): New type.
	* include/xdico.h (xdico_assoc_append, xdico_assoc_add):
	New protos.

	* lib/header.c: New file.
	* lib/Makefile.am (libdico_la_SOURCES): Add header.c
	* lib/assoc.c: Major rewrite.
	* lib/list.c: Associate free_item and compare_item functions
	with the list.

	* dicod/dicod.h (dicod_database_t): Remove content_type and
	content_transfer_encoding. Change type of mime_headers to
	dico_assoc_list_t.
	(CONTENT_TRANSFER_ENCODING_HEADER): New define.
	(dicod_ostream_create): Takes two arguments.

	* dicod/ostream.c: Rewrite using dico_assoc_list_t for headers.

	* dicod/main.c: Update calls to list/assoc functions.
	(kwd_load_module): Remove content-type and
	content-transfer-encoding.
	Load mime-headers through a callback, with checking.

	* dicod/commands.c: Update calls to dicod_ostream_create.
	* dicod/lang.c: Likewise.
	* dicod/loader.c: Likewise.

	* dico/autologin.c: Update calls to list/assoc functions.
	* dico/connect.c: Likewise.
	* dico/saslauth.c: Likewise.
	* dicod/accesslog.c: Likewise.
	* dicod/acl.c: Likewise.
	* dicod/alias.c: Likewise.
	* dicod/auth.c: Likewise.
	* dicod/capa.c: Likewise.
	* dicod/config-gram.y: Likewise.
	* dicod/dbtext.c: Likewise.
	* dicod/dicod.c: Likewise.
	* dicod/gsasl.c: Likewise.
	* dicod/markup.c: Likewise.
	* dicod/pp.c: Likewise.
	* dicod/udb.c: Likewise.
	* lib/markup.c: Likewise.
	* lib/strat.c: Likewise.
	* lib/url.c: Likewise.
	* lib/userprivs.c: Likewise.
	* lib/utf8.c: Likewise.
	* modules/dict.org/dictorg.c: Likewise.
	* modules/outline/outline.c: Likewise.

2008-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix output in mime mode.
	* dicod/config-lex.l: Ignore m4 line statemens appearing within
	a here-doc.
	* dicod/loader.c (outproc_t): New argument "data"
	(dicod_word_first, dicod_word_all): Likewise
	(dicod_match_word_db, dicod_match_word_first): Update calls
	to lower-level
	functions.
	(dicod_match_word_all): Create a separate output stream.
	(print_matches): Do not create ostream for each
	database.

2008-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>

	Allow to pass additional headers for MIME output
	* dicod/dicod.h (struct dicod_database): New member mime_headers
	(dicod_ostream_create): Change signature
	* dicod/main.c (kwd_database): New keyword "mime-headers"
	* dicod/ostream.c (struct ostream): New member "headers".
	(print_headers): Print ostream->headers, if given.
	(dicod_ostream_create): Initialize ostream->headers.
	* dicod/commands.c, dicod/lang.c, dicod/loader.c: Update calls to
	dicod_ostream_create.

	* doc/dico.texi: Minor changes.

2008-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix
	* dicod/commands.c (dicod_show_server): Avoid passing NULL
	server_info
	to stream_write_multiline
	(dicod_status): Add a space before 'No timing data available'

2008-10-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix precedence of '*' in language statements (both config
	and module)

	Improvements in Python module
	* modules/python/python.c (dico_methods): Typecast to shut up a
	gcc warning.
	(_tuple_to_langlist, mod_lang): Handle lists. Be more strict at
	checking. Add more diagnostics.
	* tests/example.py (class DicoModule): New member langlist.
	New method lang.
	* tests/example.text: Add language definitions.

	Allow to use * as a synonym to empty list (meaning "all
	languages")
	* dicod/config-lex.l: Add * to symbols allowed in non-quoted
	strings.
	* dicod/dicod.h (dicod_any_lang_list_p): New prototype.
	* dicod/loader.c (dicod_any_lang_list_p): New function.
	(dicod_get_database_languages): "*" is equvalent to empty list.
	* dicod/main.c (fix_lang_list): Likewise.

2008-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>

	Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/dico

	* modules/guile/guile.c (mod_lang): Fix return value

2008-10-24  Wojciech Polak  <polak@gnu.org>

	Implement dico_db_lang in Python module.
	* modules/python/python.c (_tuple_to_langlist, mod_lang):
	New functions.
	* modules/template.py (lang): New optional method.

2008-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes.
	* dicod/main.c (fix_lang_list): Disable dico_db_lang if
	at least one of language lists is given in the config.
	* modules/guile/guile.c (mod_lang): Fix return value.

2008-10-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	* dicod/config-gram.y: Allow for empty lists.

2008-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>

	Further improvement of language extensions.
	* dicod/dicod.h (DICOD_DBF_LANG): New define.
	(struct dicod_database): Replace lang with langlist[2] (languages
	from -> to).
	(dicod_lang_check, dicod_get_database_languages): Change proto.
	(dicod_langlist_copy): New proto.
	* dicod/lang.c (dicod_lang_preferences): Remove.
	(dicod_lang_lazy_prefs, dicod_lang_prefs): New variables.
	(dicod_lang_check): Change arguments.
	(dicod_lang, dicod_show_lang_pref, dicod_show_lang_info):
	Implement using
	new preference system.
	* dicod/loader.c (dicod_langlist_copy): New function.
	(dicod_get_database_languages): Change signature.
	* dicod/main.c (fix_lang_list): Change signature.
	(main): Call fix_lang_list for both langlist parts.
	(kwd_database): Replace languages with
	languages-from/languages-to.
	(dicod_database_free): Reflect changes to struct dicod_database.
	* include/dico/types.h (struct dico_database_module):
	Change arguments and return type of dico_db_lang.

	* modules/guile/guile.c: Update
	* modules/outline/outline.c: Update
	* modules/template.c: Update.
	* modules/template.scm: Update.

	* tests/example.db: Update.

	Implement language extensions.
	* dicod/lang.c: New file.
	* dicod/Makefile.am: Add lang.c
	* dicod/dicod.h (struct dicod_database): New member lang.
	(DICOD_MAXPARAM_INF): New define.
	(register_lang, dicod_lang_check): New prototypes.
	(dicod_get_database_languages): New prototype.
	* dicod/loader.c (dicod_get_database_languages): New function.
	* dicod/main.c (set_database): Create and fixup language list.
	(kwd_database): New keyword 'languages'.
	(check_db_visibility): Use dicod_lang_check to determine if the
	database is visible.
	(dicod_database_free): Free lang list.
	(main): Call register_lang.

	* dicod/commands.c (dicod_handle_command): Allow maxparam to be
	DICOD_MAXPARAM_INF, in which case any number of parameters,
	greater than
	minparam, is allowed.
	* dicod/capa.c (dicod_capa_flush): Take a NULL terminated
	array of commands to declare.

	* dicod/auth.c, dicod/lev.c, dicod/markup.c, dicod/mime.c,
	dicod/xidle.c, dicod/xversion.c: Update definitions of cmd
	to match
	changes in dicod/capa.c.

	* include/dico/list.h (dico_list_t, dico_iterator_t): Move
	to types.
	* include/dico/types.h (struct dico_database_module): New member
	dico_db_lang.
	* include/xdico.h (dicod_free_item): New prototype.
	* lib/xutil.c (dicod_free_item): New function.

	* modules/dict.org/dictorg.c (dictorg module): Reserve a slot
	for dico_db_lang.
	* modules/python/python.c (dictorg module): Reserve a slot for
	dico_db_lang.
	* modules/guile/guile.c: Implement dico_db_lang.
	Use scm_to_locale_string instead of deprecated scm_i_string_chars.

	* outline/outline.c: Implement dico_db_lang.
	* modules/template.c: Implement dico_db_lang.
	* modules/template.scm: Implement dico_db_lang.
	* tests/devils.out: Add Languages section.
	* tests/example.db: Add language definition.
	* tests/example.scm (db:get): New rule 'lang'
	(lang): New function.
	(example-init): Init "lang"

2008-10-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	Allow to override some settings from the command line.
	* dicod/cmdline.opt: New options --transcript and --no-transcript.
	(get_options): Take three arguments.
	* dicod/dicod.h (get_options): Take three arguments.
	* dicod/main.c (init_conf_override, apply_conf_override):
	New functions.
	(main): Use conf_override to override some configuration
	statements from the command line.

2008-09-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix UTF-8 handling in SHOW DB output.
	* dicod/commands.c (_show_database): Use utf8_quote, not quotearg.
	* include/dico/utf8.h (utf8_wc_to_mbstr): Change prototype.
	(utf8_quote, utf8_wc_quote): New functions.
	* lib/utf8.c (utf8_quote, utf8_wc_quote): New functions.
	(utf8_wc_to_mbstr): Change signature.
	(utf8_mbstr_to_wc): fix indentation.

	* modules/dict.org/dictstr.c (stream_get16, stream_get32): Static.

	Reflect available markup types in capability string.
	* dicod/dicod.h (markup_flush_capa): New function.
	* dicod/main.c (main): Call markup_flush_capa.
	* dicod/markup.c (markup_flush_capa): New function.
	* lib/markup.c (dico_markup_valid_name_p): New function.
	(dico_markup_register): Enforce valid markup names.

	* modules/guile/guile.c (dico-register-markup): Reflect changes to
	the return value of dico_markup_register.

	Minor fixes.
	* dicod/config-lex.l: Improve "stray character" diagnostics.
	* include/dico/strat.h (struct dico_strategy): Add comments.

2008-09-28  Wojciech Polak  <polak@gnu.org>

	Changes to Python module.
	* modules/python/python.c (dico_register_markup,
	dico_current_markup): New functions.

2008-09-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement html output in examples.
	* lib/markup.c (dico_markup_register): Store a copy of the string.
	* modules/guile/guile.c (_guile_strategy_create): Remove.
	(dico-register-markup, dico-current-markup): New functions.
	* tests/example.scm (output): Implement rudimentary html output.

	Implement experimental OPTION MARKUP command.
	* dicod/markup.c: New file
	* dicod/Makefile.am (dicod_SOURCES): Add markup.c
	* dicod/dicod.h (register_markup): New function.
	* dicod/main.c (main): Call register_markup.
	* include/dico/markup.h: New file
	* include/dico/Makefile.am (pkginclude_HEADERS): Add markup.h
	* include/dico/types.h: Minor formatting changes.
	* include/dico.h: Include dico/markup.h
	* lib/markup.c: New file
	* lib/Makefile.am (libdico_la_SOURCES): Add markup.c

2008-09-24  Wojciech Polak  <polak@gnu.org>

	Improve stdout capture in Python module.
	* modules/python/python.c (_capture_stdout_info): New function.

2008-09-24  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix
	* modules/guile/guile.c (mod_init): Move call to dico_parseopt
	to after
	Guile initialization.

2008-09-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fix

	Changes to Guile module.
	* modules/guile/guile.c (mod_init_db): Accept init-script,
	init-args and init-fun options.
	* tests/dicod.cfin (numerals): Rename to plnum.
	(cznum): New database.
	* tests/example.scm (open-module): Reflect changes to guile.c
	* tests/example.text: Use Czech numerals, to discern from
	example.db
	* doc/dico.texi: Update.

	Various changes.
	* NEWS: Update version number.
	* README: Mention Python.
	* configure.ac: Raise version number to 1.99.96.
	Check for python-config.
	Define BUILD_DICO_GUILE_MODULES and BUILD_DICO_PYTHON_MODULES,
	instead of the corresponding _DIRs.
	* doc/dico.texi: Mention Python. Provide a placeholder for a
	new section.
	* doc/libdico.texi (utf8_mbstr_to_norm_wc): New deftypefn

	* modules/Makefile.am (SUBDIRS): Unconditionally list guile
	and python
	* modules/guile/Makefile.am: Build if BUILD_DICO_GUILE_MODULES
	is defined.
	(AM_LDFLAGS): Add -rpath to force libtool build a shared library.
	* modules/python/Makefile.am: Build if BUILD_DICO_PYTHON_MODULES
	is defined.
	(AM_LDFLAGS): Add -rpath to force libtool build a shared library.

	* modules/dict.org/dictorg.c, modules/guile/guile.c,
	modules/python/python.c: Mark all functions as static.

	* lib/levenshtein.c (dico_levenshtein_distance): Fix Damerau part
	(again).
	* tests/levtest.c: New file.
	* tests/Makefile.am (noinst_PROGRAMS): Add levtest.

	* tests/example.py: New file.
	* tests/example.text: New file.
	* AUTHORS: Add Wojciech.

2008-09-22  Wojciech Polak  <polak@gnu.org>

	Add Python support.
	* configure.ac: Check for Python.
	* modules/Makefile.am (SUBDIRS): Add python.
	* modules/python/Makefile.am: New file.
	* modules/python/python.c: New file. Python module.
	* modules/template.py: New file. A Python module template.

2008-09-21  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update

	Minor fix

2008-09-20  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fix.
	* dicod/loader.c (dicod_load_module0): Use lt_dlopenadvise and
	set `global'
	advise.

2008-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve dico_parseopt.
	* include/dico/parseopt.h (DICO_PARSEOPT_PARSE_ARGV0)
	(DICO_PARSEOPT_PERMUTE): New macros.
	* lib/parseopt.c (dico_parseopt): Take two additional arguments:
	flags and
	pindex.  Return index of the first non-optional argument in
	*pindex.
	Use flags to modify the operation.
	* modules/dict.org/dictorg.c: Update calls to dico_parseopt.
	* modules/guile/guile.c: Likewise.

	* doc/libdico.texi: Update.

2008-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix
	* dicod/config-lex.l: Make sure stray characters are displayed
	correctly
	in diagnostic messages.

2008-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update devdict.out

	Update.
	* doc/dico.texi: Document the strategy statement.
	* tests/devils.out: Minor fix.

2008-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix.
	* lib/argcv.c (argcv_quoted_length): Set *quote if input string
	has zero length.

	Bugfix.
	* .gitignore: Remove po
	* modules/dict.org/dictorg.c (compare_prefix): Do not match
	strings shorter
	than the requested prefix.
	(common_match, suffix_match, _match_all): Ignore reserved words,
	if requested.

2008-09-07  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix Damerau-Levenshtein strategy, implement new strategies.
	* dicod/lev.c: Implement "normalized" Levenshtein and
	Damerau-Levenshtein
	strategies, i.e. such that assume equality between runs of
	whitespace
	characters, no matter what their length.
	* include/dico/utf8.h (DICO_LEV_NORM, DICO_LEV_DAMERAU):
	New defines.
	(utf8_mbstr_to_norm_wc) New function.
	* lib/levenshtein.c (dico_levenshtein_distance): Fix
	Damerau-Levenshtein
	algorithm. Change semantics of the 3rd argument.
	* lib/utf8.c (utf8_mbstr_to_norm_wc): New function.

2008-09-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix
	* lib/strat.c (dico_strategy_create): Fill allocated memory
	with zeros.

2008-08-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Allow to restrict the use of default matches that may cause
	considerable
	strain on the server (e.g. MATCH * prefix "").

	* NEWS, configure.ac: Version 1.99.95
	* dico/func.c (check_disconnect): Remove duplicate condition.
	* dicod/Makefile.am (dicod_SOURCES): Add stratcl.c
	* dicod/stratcl.c: New file.
	* dicod/config-gram.y (string_to_unsigned): Additional argument
	`locus'.
	All callers updated.
	* dicod/dicod.c: New exterimental strategy `all'.
	* dicod/dicod.h (string_to_unsigned): New proto.
	(enum cmp_op): New data type.
	(stratcl_add_word, stratcl_add_cmp)
	(stratcl_add_disable, stratcl_check_word): New functions.
	* dicod/loader.c (dicod_word_first, dicod_word_all): Check if
	this word is
	allowed for searches using this strategy.
	* dicod/main.c (flush_strat_forward_fn, destroy_strat_forward_fn)
	(flush_strat_forward, strategy_cb, strategy_deny_all_cb)
	(strategy_deny_word_cb, strategy_deny_length)
	(strategy_deny_length_lt_cb, strategy_deny_length_le_cb)
	(strategy_deny_length_gt_cb, strategy_deny_length_ge_cb)
	(strategy_deny_length_eq_cb, strategy_deny_length_ne_cb):
	New functions.
	(kwd_strategy): New configuration keywords: deny-all,
	deny-worddeny-word,
	deny-length-lt, deny-length-le, deny-length-gt, deny-length-ge,
	deny-length-eq, deny-length-ne.
	(keywords): New block statement: strategy
	(main): Call flush_strat_forward
	* dico/strat.h (struct dico_strategy): New member: stratcl
	(dico_strat_name_cmp): New function.
	(dico_strategy_create): New function.
	* lib/strat.c (strat_name_cmp): Rename to
	dico_strat_name_cmp. Make global.
	(dico_strategy_create): New function.
	(dico_strategy_dup): Use dico_strategy_create.

2008-08-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve security when using anonymous authentication.
	* dicod/dicod.h (sasl_anon_groups): New declaration.
	* dicod/gsasl.c (sasl_anon_groups): New variable.
	(struct sasl_data): New data type.
	(sasl_auth): Pass a pointer to struct sasl_data to gsasl callback
	as a hook.
	Make sure group info for anonymous users is not searched in the
	user database.
	Use sasl_anon_groups instead.
	(cb_validate, callback): Adopt the change of hook data type.
	* dicod/main.c (kwd_sasl): sasl-disable-mechanism and
	sasl-enable-mechanism
	renamed to disable-mechanism and enable-mechanism, respectively.
	(anon-group): New statement.

2008-08-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix.
	* configure.ac: Call AM_ICONV before AM_GNU_GETTEXT.

2008-08-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	Version 1.99.94

	Bugfix.
	* dico/saslauth.c (callback): Handle GSASL_ANONYMOUS_TOKEN.

	Bugfixes.
	* dicod/dicod.h (sasl_realm): New declaration.
	* dico/saslauth.c (callback): Add missing callbacks.
	* dicod/gsasl.c (sasl_realm): New variable.
	(callback): Add missing callbacks.
	* dicod/main.c (kwd_sasl): New keyword `realm'.

	Improve SASL configurability.
	* dicod/config-gram.y (string_to_bool): Make extern.
	* dicod/dicod.h (string_to_bool): New prototype.
	(sasl_enable, sasl_enabled_mech, sasl_service): New declarations.
	* dicod/gsasl.c (sasl_enable, sasl_enabled_mech, sasl_service):
	New variables.
	(disabled_mechanism_p): A mechanism state is controlled by
	two lists:
	sasl_enabled_mech and sasl_disabled_mech.
	(callback): sasl_service keeps service name.
	(init_sasl_1): Initialize sasl_service.
	(register_sasl): sasl_enable controls whether SASL is enabled.
	* dicod/main.c: New configuration file block statement `sasl'.

	Remove debugging hooks

	Bugfixes in SASL-related code.
	* dico/saslauth.c (selectmech): Do not use _free_el to deallocate
	elements of impl. This avoids duplicate calls to free.
	(sasl_free_data): Do nothing if *pdata is NULL.
	* dicod/gsasl.c (callback): Fix coredump.
	* lib/xutil.c (xdico_sasl_capa_match_p): Use c_strcasecmp.

	Finish implementing GSASL streams.
	* include/gsaslstr.h: New file.
	* include/Makefile.am: Add gsaslstr.h.
	* configure.ac: Require gettext 0.17
	Define BUILD_LIBDICOSASL and LIBDICOSASL if SASL is required.
	* dico/Makefile.am, dicod/Makefile.am: Link with LIBDICOSASL.

	* dico/connect.c, lib/xscript.c: Use new IOCTL codes.
	* dico/saslauth.c: Include gsaslstr.h
	(do_gsasl_auth): Insert GSASL stream on success.
	* dicod/commands.c (dicod_remove_command): New function.
	* dicod/dicod.c (replace_io_stream): New function.
	(dicod_loop): I/O stream is static variable instead of the
	automatic, so
	that authentication functions can reset it.
	* dicod/dicod.h (replace_io_stream, dicod_remove_command):
	New variables.
	* dicod/gsasl.c: Include gsaslstr.h
	(sasl_auth): Call gsasl_finish on failure.
	(dicod_saslauth): Insert GSASL stream on success.

	* include/dico/diag.h (DICO_DBG_CTL_SET_FILE)
	(DICO_DBG_CTL_SET_LINE, DICO_DBG_CTL_SET_TS): Remove.
	* include/dico/stream.h (DICO_IOCTL_GET_TRANSPORT)
	(DICO_IOCTL_SET_TRANSPORT)
	(DICO_DBG_CTL_SET_FILE, DICO_DBG_CTL_SET_LINE)
	(DICO_DBG_CTL_SET_TS): New defines.
	* include/xdico.h (XSCRIPT_CTL_GET_TRANSPORT)
	(XSCRIPT_CTL_SET_TRANSPORT): Remove.

	* lib/Makefile.am (noinst_LIBRARIES): Add @BUILD_LIBDICOSASL@
	* lib/gsaslstr.c (struct g_buf): New member pos.
	(g_buf_ptr, g_buf_level, g_buf_drop): Take into account pos.
	(g_buf_advance): New macro.
	(_gsasl_read): Fix buffering.
	(dico_gsasl_stream): Set line buffering.
	(insert_gsasl_stream): New function.

	* lib/stream.c (dico_stream_read): If the stream is line buffered,
	break the reading loop after receiving a newline character.

2008-08-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement GSASL stream.
	* lib/gsaslstr.c: New file.
	* lib/Makefile.am (libdico_la_SOURCES): Add gsaslstr.c.

	Remove obsolete linebuf code.
	* include/dico/lbuf.h, lib/linebuf.c: Remove.
	* include/dico/Makefile.am, include/dico.h: Remove lbuf.h
	* lib/Makefile.am: Remove linebuf.c
	* dicod/dicod.c, dicod/server.c: Remove duplicate calls to
	dico_stream_set_buffer.
	* lib/dbgstream.c: Include sys/time.h

2008-08-04  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update docs

	Improve server debugging.
	* dicod/dicod.c (dicod_loop): Log session start and end if debug
	level is set.
	* dicod/dicod.h (debug_level): Remove.	Declared in xdico.h.
	* dicod/main.c (debug_source_info, debug_stream): New variables.
	(main): Initialize debug_stream.
	* dicod/pp.c: Use debugging macros.
	* dicod/server.c (handle_connection): Remove an outdated fixme
	comment.
	* dicod/cmdline.opt (source-info): New option.

	Minor fix.
	* dicod/server.c (handle_connection): Move call to query
	ident_name to ...
	* dicod/dicod.c (dicod_loop): ... here

	Fix AUTH I/O in dicod.
	* dicod/accesslog.c: New directive %d.
	* dicod/dicod.h (ident_timeout): New declaration.
	* dicod/ident.c: Use non-blocking I/O.
	* dicod/main.c (ident_timeout): New global variable.
	(keywords): New keyword ident-timeout.
	* dicod/udb.c (udb_open): Do not coredump on NULL argument.
	* doc/dico.texi: Reflect recent changes.
	* THANKS: Reformat for GNU standards.

2008-08-02  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve debugging.
	* dico/connect.c (dict_read_reply): Remove superfluous call
	to XDICO_DEBUG.
	* dico/dico-priv.h (ds_verbose): New prototype.
	* dico/func.c (ds_verbose): New function.
	* dico/shell.c (verbose): New command.
	(filename): const.
	(script_diag, parse_script_file): Minor fix.

	Improve debugging.
	* lib/dbgstream.c: Include microseconds in timing output.

	Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/dico

	Improve debugging.
	* dico/cmdline.opt: New option --time-stamp.
	* include/dico/diag.h (DICO_DBG_CTL_SET_TS): New define.
	* lib/dbgstream.c: Optionally print timestamp information.

	Add more debugging to the client.
	* configure.ac, NEWS: Version 1.99.93
	* lib/dbgstream.c: New file.
	* lib/Makefile.am (libdico_la_SOURCES): Add dbgstream.c.
	* dico/autologin.c, dico/connect.c, dico/dico.c, dico/lookup.c,
	dico/saslauth.c,
	* include/dico/diag.h (dico_dbg_stream_create): New prototype.
	(DICO_DBG_CTL_SET_FILE, DICO_DBG_CTL_SET_LINE): New defines.
	(DICO_DEBUG_SINFO): New macro.
	* lib/xscript.c (transcript_ioctl): Fix typo.
	* include/xdico.h (XSCRIPT_CLT_GET_TRANSPORT)
	(XSCRIPT_CLT_SET_TRANSPORT):
	(debug_level, debug_source_info, debug_stream): New declarations.
	(XDICO_DEBUG)
	(XDICO_DEBUG_F1 through XDICO_DEBUG_F4): New macros.

	* dico/cmdline.opt: New options --verbose (-v) and --source-info.

2008-07-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Add po
	* po/.gitignore: New file.
	* po/POTFILES.in: New file.

2008-07-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix
	* dicod/ident.c (query_ident_name): Return NULL if bind failed.
	* dicod/server.c (handle_connection): Move the call to
	query_ident_name
	to a proper place.

2008-07-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Dico is dubbed GNU package

2008-07-24  Sergey Poznyakoff  <gray@gnu.org.ua>

	Version 1.99.92

	Update docs.
	* README: Update.
	* doc/dico.texi: Update.

	Finish SASL support.
	* dico/autologin.c (parse_autologin): Support for new
	keywords: realm, service and host.
	* dico/cmdline.opt: New options --sasl, --nosasl.
	* dico/connect.c (dict_auth): Rewrite authention to avoid
	dependency from
	"auth" capability.
	(auth_cred_free): Free new auth_cred members.
	(get_credentials): Rename to auth_cred_get, make global.
	* dico/dico-priv.h (struct auth_cred): New fields service,
	realm and
	hostname.
	(GETCRED_OK, GETCRED_FAIL, GETCRED_NOAUTH): New defines.
	(auth_cred_get, auth_cred_free): New prototypes.
	(set_bool): Change return type to int.
	(ds_sasl): New prototype.
	(saslauth): Change signature.
	* dico/func.c (set_bool): Change return type to int.
	(ds_sasl): New function.
	* dico/saslauth.c (callback): Use new auth_cred members.
	(saslauth): Rename to saslauth0.
	(saslauth, sasl_enable, sasl_enabled_p): New functions.
	* dico/shell.c: Add `sasl' command.
	* dicod/main.c (get_full_hostname): Moved to libxdico.

	* include/xdico.h (xdico_local_hostname): New prototype.
	* lib/Makefile.am (libxdico_a_SOURCES): Add xhostname.c.

	Minor fix.

	Implement SASL in client.
	* dico/saslauth.c: New file.
	* dico/Makefile.am (dico_SOURCES): Add saslauth.c
	* dico/autologin.c (parse_autologin): Bugfix.
	* dico/connect.c (dict_auth): Rename to apop_auth.
	(dict_auth): New function.
	(get_credentials): Fill cred with zeros.
	(dict_connect): Initialize obstack before eventual authentication.
	* dico/dico-priv.h (AUTH_OK, AUTH_FAIL, AUTH_CONT): New defines.
	(saslauth): New proto.
	* dico/func.c (ds_show_info): Remove unused variable.
	* dicod/dicod.h (struct dicod_command): Rename nparam to
	minparam. Add new
	member maxparam.
	* dicod/auth.c, dicod/commands.c, dicod/lev.c, dicod/mime.c,
	dicod/xidle.c, dicod/xversion.c: Reflect changes to struct
	dicod_command.
	* dicod/gsasl.c (send_challenge): Do not send zero-length data
	(don't know
	if I'm right here).
	(get_sasl_response): Bugfixes.
	(sasl_auth): Prevent coredump.
	(callback): Fix.
	(xlate_mech_to_capa): Move to libxdico.
	* include/xdico.h (xdico_sasl_mech_to_capa)
	(xdico_sasl_capa_match_p): New protos.

	* lib/stream.c (dico_stream_read_unbuffered): Return EIO if
	stream has hit
	EOF and user does not check for the number of bytes read.
	* lib/utf8.c (strlen): Remove.	How did it get there???
	* lib/xutil.c (xdico_sasl_mech_to_capa)
	(xdico_sasl_capa_match_p): New functions.

2008-07-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement SASL framework (unfinished).
	* am/gsasl.m4: Enable GSASL by default, if available.
	Export GSASL_LIBS.
	* configure.ac: Check for gsasl.
	Display a configuration summary before exiting.

	* dicod/gsasl.c: New file.
	* dicod/Makefile.am (dicod_SOURCES): Add gsasl.c
	(LDADD): Add GSASL_LIBS.
	* dicod/dicod.h (get_input_line, register_sasl): New functions.
	(sasl_disabled_mech): New extern.
	* dicod/main.c (keywords): New keyword sasl-disable-mechanism.
	(main): Call register_sasl.

	* dico/Makefile.am (LDADD): Add GSASL_LIBS
	* dico/dico-priv.h (struct auth_cred): New fields sasl and mech.
	(AUTOLOGIN_MECH): New define.
	* dico/autologin.c (parse_autologin): Rewrite to allow for
	multi-line
	statements.  Handle new auth_cred fields.

2008-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor changes.
	* dico/dico-priv.h, dico/func.c (ds_show_info): New function.
	* dico/pager.c: Setting pager to "-" disables it.
	* dico/shell.c (funtab): Add info command.
	* dico.texi: Update.
	* doc/libdico.texi (utf8_strbytelen): Remove.
	* lib/tokenize.c, lib/utf8.c, lib/xstream.c: Use strlen instead of
	the removed utf8_strbytelen.

	Minor fix

	Check the spelling

	Improve autologin mode.
	* configure.ac (--with-netrc-file): Rename to
	--with-autologin-file.
	(DEFAULT_NETRC_NAME): Rename to DEFAULT_AUTOLOGIN_FILE.
	* dico/connect.c (get_credentials): Consult session-specific
	autologin first,
	the default one afterwards.
	Return a three-state value.
	All callers updated.
	* dico/dico-priv.h (AUTOLOGIN_USERNAME, AUTOLOGIN_PASSWORD)
	(AUTOLOGIN_NOAUTH): New defines.
	(parse_netrc): Rename to parse_autologin.
	* dico/netrc.c: Rename to dico/autologin.c
	(parse_netrc): Rename to parse_autologin. Return additional
	information
	in *pflags.
	Support `noauth' keyword.
	* doc/dico.texi: Finish documenting dico.

2008-07-21  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor change.
	* dico/connect.c, dico/dico-priv.h (ds_tilde_expand): New
	function.
	* dico/func.c (ds_autologin): Perform tilde expansion.
	* doc/dico.texi, doc/libdico.texi: Update.

	Fix history handling in Dico and provide a couple of new commands.
	* dico/connect.c (dict_connect): Initialize conn->fd.
	* dico/dico-priv.h (struct dict_connection): Add fd member to be
	able to select on it.
	(ds_pager): New prototype.
	* dico/func.c (check_disconnect): New function.
	(ensure_connection): Call check_disconnect first.
	* dico/pager.c (ds_pager): New function.
	(create_pager_stream): Prefer internal pager setting over the
	environment
	variable.
	* dico/shell.c: Fix history handling.
	(prompt, pager): New commands.
	* doc/dico.texi: Document interactive mode.

	Implement command history.
	* dico/shell.c: Implement history commands.

2008-07-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update

	I18n.
	* include/.gitignore: New file.
	* include/Xaw.h: Remove.
	* include/appi18n.h, include/libi18n.h,
	lib/appi18n.c, lib/libi18n.c: New files.
	* .gitignore: Add po
	* Makefile.am (SUBDIRS): Add po
	* NEWS: Update.
	* bootstrap.conf: I18n
	* configure.ac: Check for gettext.
	(AC_CONFIG_FILES): Add po/Makefile.in
	Link gnu/gettext.h to include.
	* dico/dico-priv.h: Include appi18n.h
	* dico/dico.c (main): Call appi18n_init
	* dicod/Makefile.am (LDADD): Add LIBINTL
	(INCLUDES): Add -I../gnu
	* dicod/dicod.h: Include appi18n.h
	dicod/main.c (main): Call appi18n_init
	* include/Makefile.am (noinst_HEADERS): Add appi18n.h and
	libi18n.h
	* include/dico/diag.h, lib/diag.c (dico_die): format argument
	is const.
	* include/xdico.h (appi18n_init): New prototype.
	* lib/Makefile.am (INCLUDES): Add -I../gnu
	(libdico_la_SOURCES): Add libi18n.c
	(libxdico_a_SOURCES): Add appi18n.c
	* lib/iostr.c, lib/parseopt.c, lib/userprivs.c: Include libi18n.h.
	Call _dico_libi18n_init.
	* lib/xstream.c: Include libi18n.h.
	* makedict/makedict.h: Include appi18n.h
	(main): Call appi18n_init
	* modules/dict.org/Makefile.am (INCLUDES): Add
	-I$(top_builddir)/include
	* modules/guile/Makefile.am: Likewise.
	* modules/outline/Makefile.am: Likewise.
	* modules/dict.org/dictorg.h: Include appi18n.h
	* modules/guile/guile.c: Likewise.
	* modules/outline/outline: Likewise.

	Bugfix.
	* dico/connect.c (get_credentials): Avoid freeing the result
	from getpass.

2008-07-18  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix.
	* doc/dico.c (fixup_url): Use xdico_assign_string to initialize
	host.

2008-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes.
	* dico/cmdline.opt: Reword the docstring for --levdist and
	--quiet.
	* dico/connect.c (get_credentials): Ask for password if it is
	not given.
	* doc/dico.texi: Begin documenting dico client.
	* doc/libdico.texi (url): Update.
	* gnulib.modules: Require getpass-gnu
	* lib/url.c (url_get_user): Allow `;' to delimit username and
	password, as
	requested by RFC2229.
	(url_parse_dico_request): /d-type urls do not have :strat part.

	Minor change.
	* dico-priv.h, func.c, shell.c (script_error)
	(script_warning): Remove unused first argument.

	Add `--quite' option and `quiet' initialization command.
	* dico/cmdline.opt: New option --quiet.
	* dico/dico-priv.h (quiet_option): New declaration.
	(set_bool): New prototype.
	* dico/dico.c (quiet_option): New variable.
	* dico/shell.c (helptext): New variable.
	(funtab): New command `quiet'.
	(ds_prefix): Exclude # from allowed characters for command prefix.
	(ds_help): Improve output.
	(_command_generator): Skip commands without documentation strings.

	Improve matching.
	* dico/connect.c (dict_result_free): Allow for null argument.
	* dico/dico-priv.h (struct dict_connection): New member
	match_result.
	(dict_run_single_command): Change type to void.
	(ensure_connection, ds_define_nth): New prototypes.
	* dico/func.c (ds_match): Store match result in
	conn->match_result.
	If no argument, or an empty argument is given, re-display previous
	result.  Prefix a list of matches from the same database with the
	database name.	Prefix each match with its ordinal number, so it
	can be picked up using it later.
	(ds_define_nth): New function.
	* dico/lookup.c (print_reply): Make extern.  Discern 'no match'
	from other
	replies.
	(print_match_result): New function.
	* dico/shell.c
	(parse_script_file): A single number means define the Nth element
	from the
	previous match.

	Improve readline completion in the client.
	* dico/connect.c (dict_transcript): New function.
	(dict_connect): Use dict_transcript.
	(dict_define, dict_match): Fix second argument in call to
	dict_result_create.
	* dico/dico-priv.h (struct dict_connection): New members
	`transcript',
	`db_result', and `strat_result'.
	(struct funtab): New type (from shell.c).
	(dict_transcript, print_result)
	(find_funtab, dict_completion_matches)
	(ds_compl_database, ds_compl_strategy): New prototypes.
	* dico/func.c (get_list): New function.
	(ensure_connection): Get and cache database and strategy
	information.
	(ds_compl_strategy, ds_compl_database): New functions.
	(ds_transcript): Actually toggle transcript.
	(ds_show_db, ds_show_strat): Show cached results.
	* dico/lookup.c (print_result): Make extern.
	* dico/shell.c (struct funtab): Move definition to dico-priv.h
	(funtab): Imitialize completion functions.
	(ds_help): Minor fix.
	(parse_script_file): Pass the complete input line to default
	define and match.
	(_command_completion): Rewrite.
	(dict_completion_matches): New function.
	* include/dico/stream.h (dico_stream_set_ioctl)
	(dico_stream_ioctl): New prototypes.
	* include/xdico.h (XSCRIPT_CLT_GET_TRANSPORT)
	(XSCRIPT_CLT_SET_TRANSPORT): New define.
	* lib/stream.c (struct dico_stream): New field `ctl'.
	(dico_stream_set_ioctl): New function.
	(dico_stream_flush): Don't coredump if stream is NULL.
	(dico_stream_ioctl): New function.
	* lib/xscript.c (transcript_flush): Return immediately if
	transport is NULL.
	(xdico_transcript_stream_create): Install ioctl handler.

	Minor change.
	* dico/func.c: Ensure the connection is opened before
	sending commands to the server.

2008-07-16  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor changes.
	* dico/dico-priv.h (dict_define, dict_match)
	(dict_run_single_command): New prototypes.
	(ds_show_db, ds_show_strat): New prototypes.
	* dico/func.c (ds_show_db, ds_show_strat): New functions.
	* dico/lookup.c (dict_lookup_url): Call dict_conn_close.
	(dict_run_single_command): New function.
	(dict_single_command): Read final response code.
	* dico/shell.c: New commands ls and ld.

	Update .gitignores

	Implement general-purpose result structure.
	* dico/connect.c (dict_connect): Always initialize stk.
	(dict_define, dict_match): New functions.
	(dict_multiline_reply): Remove second arg.  Do not push current
	buf on stack.
	(dict_result_create, dict_result_free): New functions.
	(dict_conn_close): Reflect changes to the connection structure.
	* dico/dico-priv.h (struct match_result)
	(struct define_result, dict_result): New data types.
	(struct dict_connection): New fields levdist, last_result.  Remove
	stk_init.  Document all fields.
	(dict_result_create, dict_result_free): New prototypes.
	(dict_conn_last_result): New macro.
	* dico/lookup.c (print_definitions): Remove.
	(print_multiline): Remove.
	(print_result): New function.
	(dict_lookup): Rewrite using new result functions.

	Add informational functions.
	* dico/dico-priv.h, dico/func.c, dico/shell.c: Implement
	version and warranty commands.
	* utils/getopt.m4 (print_version_only): New function.

	Minor change.
	* dico/dico-priv.h, dico/func.c, dico/shell.c (ds_distance):
	New function.
	* dico/lookup.c (dict_lookup): Bugfix.

	Implement match and defines in shell mode.
	* dico/dico-priv.h, dico/lookup.c (dict_lookup): Rename to
	dict_word.
	(dict_lookup): New function.
	(ds_define, ds_match): New functions.
	* dico/dico.c: Update uses of dict_lookup
	* dico/func.c (ds_define, ds_match): New functions.
	* dico/shell.c : Improve help output.
	(cmdprefix): Do not initialize.  This lets init scripts use
	commands without leading prefix.
	(parse_script_file): Use shortcuts for define and match.

	Provide an interactive dico shell.
	* configure.ac: Check for readline.

	* dico/func.c, dico/shell.c: New files.
	* dico/Makefile.am (dico_SOURCES): Add them.
	(LDADD): Add $READLINE_LIBS.
	* dico/cmdline.opt: Use xdico_assign_string to initialize
	string values.
	* dico/connect.c (get_homedir): Change to extern.
	* dico/dico-priv.h: Add new prototypes.
	* dico/dico.c (fixup_url): Use xdico_assign_string to initialize
	string values.
	(main): Call parse_init_scripts.
	Switch to shell mode if no arguments given.
	* dico/netrc.c (skipws): Change to extern.
	* dicod/config-lex.l (unquote_char, quote_char): Move to the
	library.
	All uses changed.
	* dicod/dicod.c (tokenize_input): Move to the library.	All uses
	changed.
	* include/dico/utf8.h: Include ctype.h.
	* include/xdico.h (xdico_unquote_char, xdico_quote_char):
	(xdico_tokenize_begin, xdico_tokenize_end, xdico_tokenize_input):
	New protos.

	* lib/tokenize.c: New file.
	* lib/Makefile.am (libxdico_a_SOURCES): Add tokenize.c
	* utils/getopt.m4 (print_version): Change to extern.
	Remove superfluous 'Written by' clause.

	Minor change.
	* lib/assoc.c, lib/util.c, lib/xlat.c, lib/xutil.c: Fix copyright
	headers.

2008-07-15  Sergey Poznyakoff  <gray@gnu.org.ua>

	Handle .netrc file in dico.  Some minor improvements.
	* configure.ac: New option --with-netrc-file
	* dico/Makefile.am (dico_SOURCES): Add netrc.c.
	* dico/netrc.c: New file.
	* dico/cmdline.opt: The --strategy option implies --match.
	New option --autologin.
	* dico/connect.c (dict_auth): Take struct auth_cred * as its
	second argument.
	(dict_connect): If an autologin file is given, consult it for
	user credentials.
	* dico/dico-priv.h (struct auth_cred): New data type.
	(user, key): Replace with default_cred.  All uses updated.
	(autologin_file): New declaration.
	* dico/dico.c (main): Report a warning if incorrect number of
	arguments is
	given.

	* dicod/commands.c (_show_database, _show_strategy): Quote
	descriptions.
	* dicod/dicod.h: Include quotearg.h.
	* dicod/main.c (main): Set default quoting style.

	Provide a default dict server address.
	* configure.ac (DEFAULT_DICT_SERVER): New variable.
	* dico/Makefile.am (AM_CPPFLAGS): Define DEFAULT_DICT_SERVER
	* dico/dico.c (fixup_url): Use DEFAULT_DICT_SERVER, if no server
	was specified.

	Implement --levdist option.
	* dico/cmdline.opt: New option --levdist.
	* dico/dico-priv.h (levenshtein_threshold): New declaration.
	* dico/dico.c (levenshtein_threshold): New variable.
	* dico/lookup.c (dict_lookup_url): Set Levenshtein distance,
	if supported.

	Bugfix.
	* utils/getopt.m4 (OPTION): Quote invocation of `prep'.

	Bugfix.
	* dico/lookup.c (dict_lookup_url): Fix slot allocation for
	MATCH command.

2008-07-14  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement authentication.
	* README, TODO: Update.
	* dico/cmdline.opt: Handle --noauth option.
	* dico/connect.c (parse_initial_reply): Fix storing of the msgid.
	* dict_connect: Authenticate if necessary.
	* dico/dico-priv.h (noauth_option): New declaration.
	* dico/dico.c (noauth_option): New variable.

	Bugfix
	* util/getopt.m4 (OPTION): Apply prep to DOCSTRING here, instead
	of in BEGIN.

	Bugfix

	Forgottent to add.
	* lib/xstream.c: New file.

	Implement command-line version of dico.
	* dicod/fdio.c: Move ...
	* lib/fdiostr.c: ... there.
	* dicod/xscript.c: Move ...
	* lib/xscript.c: ... there.
	* dicod/Makefile.am, lib/Makefile.am: Reflect the move.

	* dico/connect.c: New file.
	* dico/lookup.c: New file.
	* dico/pager.c: New file.
	* lib/xstream.c: New file.

	* dico/Makefile.am (dico_SOURCES): Add connect.c, lookup.c,
	pager.c
	* dico/cmdline.opt: New options --source and --transcript.
	(get_options): Do not intialize *index.
	* dico/dico-priv.h: Add new prototypes.
	(host, port, database, strategy): Replace by dico_url.
	* dico/dico.c (host, port, database, strategy): Replace by
	dico_url.
	(transcript, source_addr): New globals.
	(main): Add missing implementations.

	* dicod/config-gram.y, dicod/server.c: Use DICO_DICT_PORT instead
	of DICT_PORT.
	* dicod/dicod.c (stream_writez, stream_printf)
	(stream_write_multiline): Move to lib/xstream.c
	* icod/dicod.h (DICT_PORT): Remove.
	(fd_stream_create, stream_writez, stream_printf)
	(stream_write_multiline): Remove.

	* dicod/loader.c (dicod_word_first): Bugfix: break on the first
	non-empty result.

	* gnulib.modules: Add quote and quotearg.
	* include/dico/stream.h (dico_fd_stream_create): Change signature.
	(dico_fd_io_stream_create): New proto.
	* include/dico/types.h (DICO_DICT_PORT): New define.

	* include/xdico.h (xdico_transcript_stream_create, stream_writez)
	(stream_printf, stream_write_multiline): New protos.

	* lib/url.c: Fix copyright header.

	* utils/getopt.m4  (GETOPT): Fix handling of 3rd argument.

	Rename dico/main.c
	* dico/main.c: Rename to ...
	* dico/dico.c: ... this.
	* dico/Makefile.am: Reflect the rename.

	Minor additions to the client.
	* dico/cmdline.opt: Initialize dico globals.
	* dico/dico-priv.h (enum dico_client_mode): New type.
	(DICO_CLIENT_ID): New define.
	(host, port, database, strategy, user)
	(key, client, req, mode): New declarations.
	* dico/main.c (host, port, database, strategy, user)
	(key, client, req, mode): New variables.
	(dico_lookup): New function placeholder.
	(main): Call dico_lookup.

	Improve URL parsing.
	* include/dico/url.h (DICO_REQUEST_DEFINE, DICO_REQUEST_MATCH):
	New defines.
	(struct dico_request): New data type.
	(struct dico_url): Add port and request.

	* lib/url.c: Parse `dict://' urls.
	(url_get_host,url_get_user): Bug fix.
	(url_get_passwd): Remove.
	(dico_url_destroy): Free the request.

	Bugfix.
	* lib/logstream.c (dico_log_stream_create): Remove unused
	variable.
	* utils/getopt.m4: Remove debugging comments.

2008-07-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Start writing dico client.
	* dico/Makefile.am, dico/cmdline.opt, dico/dico-priv.h,
	dico/main.c: New files.
	* Makefile.am, configure.ac: Add dico subdirectory.
	* lib/logstream.c (dico_log_stream_create): Bugfix.
	* utils/getopt.m4: Allow to define aliases for the options.
	* dicod/cmdline.opt: Add c-mode marker for Emacs.

2008-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	Cleanup
	* configure.ac: Remove unnecessary variables.
	* makedict/Makefile.am, makedict/main.c: Remove INPUTDICTPATH
	and DICTPATH defines.
	* modules/guile/guile.c (silent_close_port): Remove unused
	function.

	Remove unnecessary directories and files.
	* client, fonts: Removed
	* utils/bdfextract.pl, utils/mkbushufont.awk
	* utils/Makefile.am: Remove bdfextract.pl and mkbushufont.awk.

	Fix documentation.
	* doc/libdico.texi: Fix erroneous deftypefns.

2008-07-08  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fix.
	* doc/libdico.texi: Fix incorrect deftypefn usage.

	Minor improvement.
	* dicod/Makefile.am (dicod_SOURCES): Add xidle.c and xversion.c
	* dicod/cmdline.opt (OPTIONS_BEGIN): Fix canonical program name.
	* dicod/dicod.h (register_xidle, register_xversion): New
	prototypes.
	* dicod/main.c (dicod_xversion, register_xversion): Move to a
	separate file.
	(main): Call register_xidle.
	* dicod/xidle.c: New file. Implementation of XIDLE command.
	* dicod/xversion.c: New file. Implementation of XVERSION command.
	* doc/dico.texi (inactivity-timeout): Add an anchor.
	* doc/proto.texi: Document XIDLE command.

2008-07-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Move dico log streams to the library.  Redirect guile errors
	to logs.
	* dicod/logstr.c: Rename to ...
	* lib/logstream.c: ... this.
	(log_stream_create): Rename to dico_log_stream_create.
	* dicod/Makefile.am (dicod_SOURCES): Remove logstr.c.
	* dicod/dicod.c (dicod_loop): Use dico_log_stream_create.
	* dicod/dicod.h (log_stream_create): Remove proto.
	* doc/libdico.texi (diag): Add a template for
	dico_log_stream_create.
	* include/dico/diag.h (dico_log_stream_create): New prototype.
	* lib/Makefile.am (libdico_la_SOURCES): add logstream.c.
	* modules/guile/guile.c: Implement `log ports'.
	(guile_exit_script, guile_outfile): Remove.
	(init_option): Remove unused option `exit-script'.
	Remove `outfile' option.
	(mod_init): Call _guile_init_dico_log_port; Redirect current
	output and
	error ports to log.

	 * bootstrap.conf: Mention make ChangeLog in the template.

2008-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>

	Add .bootstrap to .gitignore

	Reorganize docs.
	* doc/Makefile.am (dico_TEXINFOS): Add libdico.texi
	* doc/libdico.texi: New file.
	* doc/dico.texi: Minor changes.

	Use dico_free_db method.
	* dicod/dicod.c, dicod/dicod.h (dicod_server_cleanup): New
	function.
	* dicod/loader.c (dicod_free_database): Fix return value.
	* dicod/main.c (main): Call dicod_server_cleanup when dicod_inetd
	finishes.
	* dicod/server.c (dicod_server): Call dicod_server_cleanup
	before terminating.
	* doc/dico.texi: Update.

	Minor changes.
	* doc/Makefile.am: Remove leftover references to dictd.

	Remove leftovers of dictd.h

2008-07-03  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor changes.
	* README: Minor changes.

	Minor changes.
	* doc/dico.texi: Minor changes.

	Rename dictd to dicod.

	Documentation.
	* doc/dico.texi, doc/proto.texi: Start documenting C API.
	Resolve several
	pending xrefs.

	Namespace cleanup.
	* dictd/dictd.h, dictd/loader.c, include/dico/types.h,
	modules/dict.org/dictorg.c, modules/guile/guile.c,
	modules/outline/outline.c, modules/template.c: Rename
	`dico_handler_module'
	to `dico_database_module'.  Prefix its members with `dico_',
	instead
	of `module_'.
	* dictd/loader.c (dictd_close_database): Initialize return value
	to 0.

	Work on documentation.
	* dictd/main.c (kwd_user_db): Rename `get-password' to
	`password-resource',
	and `get-groups' to `group-resource'.
	* doc/dico.texi: Document authentication.

	Housekeeping.
	* configure.ac, NEWS, README: Change bug-reporting email.
	* dictd/dictd.c (dictd_close_databases): Remove duplicated
	function.
	(close_databases): issue a log notice if dictd_close_database
	returns failure.
	* doc/dico.texi: Update.

	Housekeeping.
	* doc/Makefile.am (check-options): Improve rule.
	* doc/check-docs.sh: Squeeze repeated newlines in sed output.

	Untabify docs.

2008-07-02  Sergey Poznyakoff  <gray@gnu.org.ua>

	Work on documentation and examples.
	* dictd/commands.c: Bugfix.
	* doc/dico.texi: Describe an example Guile module.
	* modules/Makefile.am: Rename `sample' to `template'.
	* modules/sample.scm, modules/sample.c: Rename to ...
	* modules/template.scm, modules/template.c: ... this.
	* tests/dictd.cfin: Add database definitions for an example
	Guile module.
	* tests/glossary.scm (mapcan): Do not export.

2008-06-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor change.
	* dictd/server.c (handle_connection): Return textual replies to
	the client
	if its IP is not allowed to connect and if the server is not
	able to fork.

	Improve docs.
	* doc/dico.texi: Create master menu.
	* doc/proto.texi: Minor changes.

	Improve docs.
	* doc/dico.texi: Spell-check.  Resolve hanging xrefs.
	* doc/proto.texi: Completed.

	Improve docs.
	* doc/Makefile.am (dico_TEXINFOS): Add proto.texi.
	(check-unrevised rule): Scan all texinfo sources.
	* doc/dico.texi (Dictionary Server Protocol): New appendix.
	* doc/proto.texi: New file.

	Bugfixes.
	* lib/mapstream.c (_mapfile_open): Fix computing open flags.
	* lib/stream.c (dico_stream_close, dico_stream_destroy): Be
	robust in
	case of NULL arguments.

	Improve --config-help output.
	* dictd/config-format.c (format_simple_statement): Do not output
	superfluous <>
	delimiters.

2008-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix.
	* modules/dict.org/dictstr.c (_dict_read_dzip): Fix length
	calculation.

	Add a sample Guile module.
	* tests/glossary.scm: New file

	Pass command line arguments to the Guile init script.
	* doc/dico.texi (Guile API): Document init-args.
	* modules/guile/guile.c (init-args): New initialization parameter.
	(load_path_handler, guile_load): Pass command line to the
	init script.
	(dico-strat-select?): Bugfix: swap 2nd and 3rd arguments to
	the selector.
	(guile_init_args): New variable.

	Improve docs.
	* doc/dico.texi: Document Guile API and Dico Scheme Primitives.

2008-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minimize number of comparisons in suffix strategy.
	* modules/dict.org/dictorg.c (compare_entry_ptr): New function.
	(suffix_match): Quicksort the result entries.  Remove duplicates.

	Minor changes.
	* Makefile.am (ChangeLog rules): Remove eventual '<unknown>'
	markers.
	* modules/dict.org/dictorg.c (init_suffix_index): Run qsort
	only once.

	Minor fixes

2008-06-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement command aliasing.
	* dictd/Makefile.am (dictd_SOURCES): Add alias.c
	* dictd/alias.c: New file.
	* dictd/commands.c (dictd_handle_command): Expand aliases.
	* dictd/dictd.h (alias_install, alias_expand): New prototypes.
	* dictd/main.c (allow_cb, deny_cb, apply_acl_cb, set_user)
	(set_supp_group, set_mode, set_log_facility, set_dict_handler)
	(enable_capability, set_defstrat): Improve error handling.
	(alias_cb): New function.
	(keywords): New keyword `alias'.
	* tests/dictd.cfin: Define some aliases and document them.
	* doc/dico.texi: Document aliasing support.

	Documentation.
	* doc/dico.texi: Update docs for Guile module.

2008-06-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix.
	* dictd/server.c (dictd_server): Remove pidfile before
	terminating.

	Documentation.
	* TODO: Update.
	* doc/dico.texi: Document guile module.
	* modules/Makefile.am (EXTRA_DIST): Add sample.scm
	* modules/sample.scm: New file.
	* modules/sample.c: Update.
	* modules/guile/guile.c: Minor fix in a docstring.

2008-06-21  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix keeping track of input line numbers.
	* dictd/config-lex.l: Fixup line numbers obtained from m4 #line
	directives.
	* dictd/pp.c: Output information used for the above fixup.
	* dictd/dictd.h (parse_line_cpp, parse_line): Remove prototypes.
	(install_text): New prototype.

	Allow to create Scheme matching strategies.
	* modules/guile/guile.c (dico-register-strat): New function.

2008-06-17  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes.
	* guile/guile.c (dico-strat-default?): Fix a typo.
	(init_vtab): Check for SCM_EOL
	(mod_init): Move constistency checking to mod_init_db.
	(mod_init_db): Fix the call to init_vtab.
	Add consistency checking.  Attempt to diagnose all missing
	virtual functions.

	Provide a way for modules to tell if a default strategy is
	being used.  Fix visibilty of symbols in guile.c
	* include/dico/strat.h (struct dico_strategy): New field
	is_default.
	(dico_strategy_is_default_p): New macro.
	* include/dico/types.h (dico_strategy_t): Change into a typedef.
	* lib/strat.c (default_strategy): Remove const qualifier.e
	(dico_strategy_find): Remove const qualifier from the return type.
	(dico_set_default_strategy): Clear/set strat->is_default as
	appropriate.
	* modules/guile/guile.c (struct _guile_strategy): Remove const
	qualifier.
	(dico-strat-description): Fix mistyped Scheme name.
	(dico-strat-default?): New function.
	(_guile_init_funcs): Explicitly export all Scheme interfaces.
	(mod_init_db): Fix inconsistent return type.

2008-06-16  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes.
	* modules/guile/guile.c: Minor fixes.

	Use virtual function tables. A database is allowed to have its
	own interface
	functions.

	* modules/guile/guile.c (guile_call_proc): Change type of the
	second argument.
	All callers updated.
	(guile_init_fun): New variable.
	(guile_proc_name): Change all underscores to dashes.
	(guile_proc): Remove.
	(guile_vtab): New type, instead of it.
	(global_vtab): New variable.
	(init_vtab): New function.
	(init_option): Remove function name options. Add `init-fun'
	option.
	(mod_init): Initialize global_vtab.
	(mod_init_db): Initialize database vtab.
	(mod_match, mod_define, mod_output_result, mod_result_count)
	(mod_compare_count, mod_free_result): Store pointer to the db
	in the result.

2008-06-15  Sergey Poznyakoff  <gray@gnu.org.ua>

	Revert c665e5de094d4.  Was not worth the candles.
	* dictd/dictd.h (dictd_module_t): Remove.
	(dictd_module_instance_t): Move there significant fields from
	dictd_module_t.
	* dictd/loader.c: Update all uses of the above.
	* include/dico/types.h (dico_instance_t): Remove.
	(DICO_CAPA_MULTI_INSTANCE): Remove.
	(module_init,module_init_db): Revert changes.
	* modules/dict.org/dictorg.c: Revert changes.
	* modules/guile/guile.c: Likewise.
	* modules/outline/outline.c: Likewise.

2008-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fix.
	* modules/guile/guile.c (mod_close, mod_get_text)
	(mod_match, mod_define): Remove superfluous dbname argument.

	Allow several module instances to be used simultaneously.
	* include/dico/types.h (DICO_CAPA_NONE, DICO_CAPA_DEFAULT)
	(DICO_CAPA_MULTI_INSTANCE): New macros.
	(dico_handler_module.capabilities): New field.
	(dico_handler_module.module_init): Change prototype.
	(dico_handler_module.module_init_db): Change prototype.
	(dico_instance_t): New typedef.
	* dict.org/dictorg.c: Reflect changes to include/dico/types.h.
	* modules/guile/guile.c: Likewise.
	* modules/outline/outline.c: Likewise.

	* dictd/config-gram.y (process_ident): Fix error message.
	* dictd/dictd.c: Rename dictd_handler_t to
	dictd_module_instance_t.
	* dictd/dictd.h (handler_list): Rename to modinst_list.
	(dictd_handler_type): Remove.
	(dictd_module_t): New data type.
	(dictd_module_instance_t): New data type.
	(dictd_handler_t): Remove.
	(dictd_database): Rename `mod' to `mod_handle'.
	Remove `handler'. Add `instance'.
	(database_remove_dependent, dictd_load_module): Change prototypes.
	* dictd/loader.c (dictd_load_module0): Use table of modules.
	Pass a pointer to instance handle to module_init.
	(dictd_load_module): Change argument type.
	(dictd_init_database): Pass instance handle to module_init_db.
	(dictd_open_database, dictd_close_database)
	(dictd_free_database, dictd_get_database_descr)
	(dictd_get_database_info, dictd_word_first)
	(dictd_word_all, print_matches, dictd_match_word_db)
	(print_definitions, dictd_define_word_db): Reflect changes to
	the internal structure.
	* dictd/main.c (handler_list): Rename to modinst_list.
	Remove `handler' keyword.  Use `load-module' instead.
	* tests/dictd.cfin (handler): Rename to `load-module'.

	* doc/dico.texi: Update.

2008-06-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Documentation improvements.
	* doc/dico.texi: Document Outline and Dictorg modules.
	* README, TODO: Minor changes.

2008-06-12  Sergey Poznyakoff  <gray@gnu.org.ua>

	Documentation improvements.
	* dictd/cmdline.opt: Fix docstrings.
	* doc/macros.texi (opsummary): Generate a comment.
	* doc/Makefile.am (check-options): Use generated comment as a
	sed anchor to retrieve the list of documented options.
	* doc/dico.texi: Resolve some FIXMEs, document operation modes,
	etc.

	Various improvements.
	* dictd/dictd.h (DICTD_LOGGING_ENVAR): New macro.
	(dictd_log_pre_setup, dictd_log_encode_envar, run_lint):
	New prototypes.
	* dictd/main.c (kwd_database, keywords): Rename apply-acl to
	visibility-acl.
	(dictd_log_pre_setup, dictd_log_encode_envar): New functions.
	(main): Call dictd_log_pre_setup.
	* dictd/pp.c (run_lint): New function.
	* dictd/server.c (pre_restart_lint, pre_restart_lint_internal):
	New functions.
	(server_loop): Restart only if configuration passes lint.
	* doc/dico.texi: Document security settings and database
	visibility.

	Use ACLs to control incoming connections.
	* dictd/config-lex.l (isemptystr): Allow only ; after the
	delimiter.
	* dictd/dictd.h (connect_acl): New extern.
	* dictd/main.c (connect_acl): New global.
	* dictd/server.c (handle_connection): Use connect_acl to determine
	wheter to allow connection.
	* doc/dico.texi: Document ACLs

	Finish ACLs.
	* dictd/acl.c (struct acl_entry): New member acl.
	(_parse_sub_acl): New function.
	(_parse_group, _parse_acl, _acl_check): Allow sub-acls.
	(dictd_acl_check): Second argument gives default result.
	* dictd/auth.c (dictd_auth): Call check_db_visibility.
	(init_auth_data): Call reset_db_visibility.
	* dictd/dictd.c (dictd_loop): Call reset_db_visibility.
	* dictd/dictd.h (dictd_acl_check): Change signature.
	(struct dictd_database): Remove require_auth and groups.
	Add new members acl and visible.
	(show_sys_info, ssi_group_list): Remove declarations.
	(check_db_visibility, reset_db_visibility): New functions.
	(database_visible_p): New macro.
	* dictd/main.c (ssi_group_list): Remove.
	(require_auth): Remove.
	(global_acl): New global.
	(apply_acl_cb): New function.
	(kwd_database): Remove require-auth and groups. Add apply-acl.
	(set_show_sys_info): Remove.
	(keywords): Remove sys-info-groups and require-auth. Add
	apply-acl.
	(reset_db_visibility, check_db_visibility): New functions.
	(database_visible_p): Remove.
	* tests/dictd.cfin: Fix here-document syntax.

	Begin implementing ACLs.
	* dictd/acl.c: New file.
	* dictd/Makefile.am (dictd_SOURCES): Add acl.c
	* dictd/config-gram.y: Allow multiple values after ident.
	Alsways require a semicolon after MSTRING.
	* dictd/config-lex.l (isemptystr): Change signature.  Allow
	semicolon or comma after the EOT delimiter.
	(multiline_begin): Fix calculation of the delimiter length.
	* dictd/dictd.h (TYPE_ARRAY): New define.
	(config_value_t): New member arg.
	(dictd_acl_t): New data type.
	(dictd_acl_create, dictd_acl_check, dictd_acl_install)
	(dictd_acl_lookup): New functions.
	(ssi_mode): Remove.
	(show_sys_info): Fix declaration.

	* dictd/main.c (show_sys_info): Change type.
	(kwd_acl): New keywords.
	(set_show_sys_info): Argument to show-sys-info is an ACL name.
	(keywords): New statement `acl'.
	(show_sys_info_p): Rewrite using dictd_acl_check.

	* dictd/ident.c (query_ident_name): Remove unused variable.

2008-06-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve docs.
	* dictd/main.c: Add check for valid transfer encoding.
	* doc/dico.texi: Add summary contents, document `database'
	statement,
	finish `Preprocessing' section.

	Improve docs.
	* doc/dico.texi: Document pragmatic comments, database modules,
	tuning and preporcessing.

2008-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve docs.
	* dictd/lev.c (register_lev): Rename command to XLEV to match
	the capability name.
	* doc/dico.texi: Document logging, access logs, global
	configuration and capability.
	* doc/strftime.texi: Resolve @FIXME-pxref.

	Improve the docs.
	* dictd/accesslog.c: Fix a typo.
	* doc/dico.texi: Update.

2008-06-07  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve the docs.
	* doc/dico.texi: Update.

	More fixes.
	* dictd/Makefile.am (AM_CFLAGS): Define LOCALSTATEDIR.
	* dictd/main.c (pidfile_name): Change the default.
	(max_children): Provide the default value.
	(keywords): Fix typo in docstring.

	Minor improvement.
	* dictd/config-gram.y (string_to_sockaddr): Allow to use
	a hostname
	without port or a port without hostname.

	Improve configuration parser.
	* dictd/config-gram.y (string rule): Add IDENT.
	(config_diag, config_warning): New functions.
	(config_error): Rewrite using config_diag.
	* dictd/config-lex.l: Do not require identifier to appear on a
	new line.
	Fix '\newline' escapes.
	Issue error message if stray characters appear in input.
	Issue warnings if undefined escape sequence is used.
	* dictd/dictd.h (config_warning): New prototype.

	Minor changes.
	* README: Improve.
	* doc/dico.texi: Improve structure.
	* configure.ac (LOG_FACILITY): Allow argument in
	lowercase. Default to LOG_DAEMON.
	* dictd/main.c (keywords): Fix typo.

2008-06-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Work on documentation structure.
	* dictd/main.c (config_help): Change docstring.
	* doc/dico.texi: Documentation framework.

2008-06-05  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor changes.
	* dictd/accesslog.c (alog_conf_hostname): Print actual server
	IP address.
	* dictd/commands.c (dictd_status): Print `dictd' timer.
	* doc/Makefile.am (dico_TEXINFOS): Add strftime.texi
	* doc/strftime.texi: New file.
	* doc/dico.texi: Use makeinfo auto-sectioning capability.

2008-06-03  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve access log output.
	* dictd/accesslog.c (print_str): Output a dash if fmt is NULL.
	All callers updated.
	* dictd/main.c (main): Set dico_argcv_quoting_style to hex. This
	helps keep access log compatible with Apache and existing log
	analyzer software.
	* include/dico/argcv.h (dico_argcv_quoting_style): New enum and
	global variable.
	* lib/argcv.c (argcv_quoting_style): New global variable.
	(argcv_quoted_length, argcv_quote_copy): Take into account
	argcv_quoting_style.

	Inplement identity check (RFC 1413).
	* dictd/Makefile.am (dictd_SOURCES): Add ident.c
	* dictd/ident.c: New file.
	* dictd/accesslog.c: Implement %l
	* dictd/auth.c (init_auth_data): Reset identity_name.
	* dictd/dictd.h (identity_check, identity_name, ident_keyfile):
	New externs.
	(query_ident_name): New proto.
	* dictd/main.c (identity_check, identity_name, ident_keyfile):
	New variables.
	(keywords): New keywords `identity-check' and `ident-keyfile'.
	* dictd/server.c (handle_connection): Run identity check if
	required.
	* gnulib.modules: Add crypto/des.

	Implement more format specs in access log.
	* dictd/accesslog.c (sockaddr_to_hostname, sockaddr_to_portname):
	New functions.
	(alog_remote_ip): Use sockaddr_to_hostname.
	(alog_local_ip): Print actual IP of the server that handled
	the request.
	(alog_remote_host): Use sockaddr_to_hostname.
	(alog_server_port): Implement.
	* dictd/dictd.c (dictd_inetd): Initialize server_addr and
	server_addrlen.
	* dictd/dictd.h (UINTMAX_STRSIZE_BOUND): New define.
	(server_addr, server_addrlen): New externs.
	* dictd/server.c (struct dictd_server): New data type.
	(fdtab): Replace with srvtab.
	(fdcount): Rename to srvcount.
	(server_addr, server_addrlen): New variables.
	(handle_connection): Change argument semantics.
	Initialize server_addr and server_addrlen.

	Minor fix.
	* include/xdico.h (timer_get_temp): Remove.
	* lib/timer.c: Likewise.
	* dictd/commands.c: Use timer_stop instead of timer_get_temp

	Implement more access log specifiers.
	* dictd/accesslog.c (add_instr): Fill allocated memory with 0s.
	(alog_response_size,alog_response_size_clf,alog_time_ms)
	(alog_process_time): Implement.
	(free_cache): Bugfix. P was used uninitialized.
	* dictd/commands.c (dictd_status): Free the temporary timer.
	(dictd_match, dictd_define): Initialize total_bytes_out.
	* dictd/dictd.h: Include inttostr.h
	(total_bytes_out): New extern.
	* dictd/loader.c (dictd_match_word_db, dictd_define_word_db):
	Add missing calls
	to access_log_status.
	* dictd/ostream.c (total_bytes_out): New variable.
	(ostream_write): Update total_bytes_out. Return a meaningful
	error code.
	* include/dico/stream.h (dico_stream_bytes_in,
	dico_stream_bytes_out): New prototypes.
	* lib/stream.c (struct dico_stream): Remove `offset'. Add new
	fields `bytes_in' and `bytes_out'.
	(dico_stream_open, dico_stream_read_unbuffered)
	(dico_stream_write_unbuffered): Update bytes_in and bytes_out.
	(dico_stream_bytes_in, dico_stream_bytes_out): New functions.
	* lib/timer.c (timer_hasher, timer_compare): Use case-insensitive
	comparison.
	(DIFFTIME): Make sure the result is double.

2008-06-02  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement access log file.
	* dictd/Makefile.am (dictd_SOURCES): Add accesslog.c
	* dictd/accesslog.c: New file.
	* dictd/auth.c (init_auth_data): Free client_id.
	* dictd/commands.c (dictd_status): Assign client_id.
	(dictd_match, dictd_define): Call access_log.
	* dictd/dictd.c (dictd_inetd): Initialize client_addr and
	client_addrlen.
	(dictd_loop): Call access_log_free_cache when finished.
	* dictd/dictd.h (client_id, access_log_format, access_log_file)
	(client_addr, client_addrlen): New externs.
	(get_full_hostname): New proto.
	(access_log_status, access_log, compile_access_log)
	(access_log_free_cache): New protos.
	* dictd/loader.c (dictd_word_first, dictd_word_first,
	dictd_word_all)
	(dictd_match_word_db): Call access_log functions.
	* dictd/main.c (client_id): New global variable.
	(keywords): New statements access-log-format and access-log-file.
	(get_full_hostname): Change return variable, remove static
	qualifier.
	(main): Update call to get_full_hostname, call compile_access_log.
	* dictd/server.c (client_addr, client_addrlen): New variables.
	(handle_connection): Initialize client_addr and client_addrlen.
	* dictd/xscript.c (transcript_flush): New function.
	* gnulib.modules: Add fprintftime.
	* include/xdico.h (xdico_assign_string): New proto.
	* lib/xutil.c (xdico_assign_string): New function.
	* tests/dictd.cfin: Configure timing output and access log.

2008-05-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fix.
	* dictd/pp.c: Fix indentation.
	(try_file): Bugfix.

	Preprocess the configuration file.
	* configure.ac (--without-preprocessor): New option.
	(DEFAULT_PREPROCESSOR): New variable.
	* dictd/pp-setup: New file.
	* dictd/pp.c: New file.
	* dictd/Makefile.am (dictd_SOURCES): Add pp.c
	(AM_CFLAGS): Add -DDEFAULT_VERSION_INCLUDE_DIR,
	-DDEFAULT_INCLUDE_DIR,
	-DDEFAULT_PREPROCESSOR
	(EXTRA_DIST): Add pp-setup.
	(inc_DATA): New var. Add $(PP_SETUP_FILE)
	* dictd/cmdline.opt: New options --syslog, -E, --preprocessor,
	--no-preprocessor, --include-dir.
	* dictd/config-lex.l (fillbuf, ctx_lookup, push_source,
	pop_source)
	(get_file_name, config_include): Remove.
	(YY_INPUT): Change definition.
	(config_lex_begin): Rewrite using preprocessor interface.
	(config_lex_end): Empty placeholder.
	* dictd/dictd.h (getmaxfd): New macro (from server.c).
	(preprocessor, debug_level, debug_level_str): New externs.
	(MODE_PREPROC): New constant.
	(dictd_log_setup, include_path_setup, add_include_dir,
	parse_line_cpp)
	(parse_line, pp_init, pp_done, preprocess_config, pp_make_argcv)
	(pp_extrn_start, pp_extrn_shutdown, pp_fill_buffer): New protos.
	* dictd/server.c (getmaxfd): Move to dictd.h.
	* dictd/main.c (debug_level, debug_level_str): New variables.
	(dictd_log_setup): New function.
	(main): Call include_path_setup. Handle mode == MODE_PREPROC.
	* include/dico/argcv.h (dico_argcv_string): 2nd arg is const.
	* lib/argcv.c: Likewise.
	* include/dico/diag.h (dico_invocation_name): New extern.
	* lib/diag.c (dico_invocation_name): New variable.
	(dico_set_program_name): Set dico_invocation_name.

	Minor fix.
	* config-lex.l: \f is a white-space char.

	Namespace cleanup.
	* dictd/dictd.h (gd_locus_t): Rename to dictd_locus_t.
	* dictd/config-gram.y: Likewise.
	* dictd/config-lex.l: Likewise.
	* dictd/main.c: Likewise.
	* dictd/udb.c: Likewise.

	Minor fix.
	* dictd/main.c (main): Use log_facility in openlog.

	Implement STATUS command.
	* dictd/commands.c (dictd_quit): Use report_current_timing.
	(dictd_status): New function.
	(command_tab): Bind dictd_status to STATUS command.
	* dictd/dictd.h (num_defines, num_matches, num_compares): Remove.
	(struct dico_stat): New data type.
	(current_stat, total_stat): New externs.
	(report_timing): Change signature.
	(report_current_timing): New function, to be used instead of
	report_timing.
	* dictd/loader.c: Use report_current_timing.
	* dictd/stat.c (num_defines, num_matches, num_compares): Remove.
	(current_stat, total_stat): New variables.
	report_timing): Rewrite for general purpose usage.
	(report_current_timing): New function.

	Minor fix in guile module.
	* modules/guile/guile.c (argv_to_scm): Quote each element.
	(mod_open): Open function takes variable number of arguments.

2008-05-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve module interface.
	* dictd/dictd.c (init_databases): Call dictd_init_database.
	(dictd_close_databases, open_databases, close_databases):
	New functions.
	(dictd_loop): Begin with open_databases and end with
	close_databases.
	* dictd/dictd.h (ictd_open_database_handler)
	(dictd_close_database_handler): Removed.
	(dictd_init_database, dictd_open_database)
	(dictd_close_database, dictd_free_database): New protos.
	* dictd/loader.c (MODULE_ASSERT): New macro.
	(dictd_load_module0): Improve error diagnostic and cosistency
	checks.
	(dictd_open_database_handler): Remove.
	(dictd_init_database): New function.
	(dictd_close_database_handler): Remove.
	(dictd_close_database): New function.
	(dictd_free_database): New function.
	* include/dico/types.h (dico_handler_module.version): Change
	type to unsigned.
	(module_open): Change signature
	(module_init_db, module_free_db): New functions.
	* lib/stream.c (stream_flush_buffer): Fix typo.

	* modules/dict.org/dictorg.c: Rewrite for new interface.
	* modules/guile/guile.c: Rewrite for new interface.
	* modules/outline/outline.c: Rewrite for new interface.

	Bugfix.
	* lib/stream.c (_stream_buffer_full_p, _stream_flush_buffer):
	Fix handling of
	line buffers.

2008-05-29  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor improvements.
	* modules/guile/guile.c (_dico_port_close): Call scm_gc_free.
	(_dico_port_free): Return 0.
	(mod_open): Return value of #f or '() means failure.

2008-05-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve docs.
	* THANKS, TODO: Update.
	* dictd/config-format.c: Place a newline before each statement,
	except
	ones appearing immediately after an opening curly brace.
	(format_statement_array): Take an extra argument, specifying
	whether to
	begin the output with a newline.
	* dictd/dictd.h (format_statement_array): Change prototype.
	(format_docstring): New prototype.
	* dictd/main.c (config_help): Output an initial heading.

	Introduce interface version numbering.
	* include/dico/types.h (DICO_MODULE_VERSION): New define
	(struct dico_handler_module): New field `version'.
	* modules/dict.org/dictorg.c: Set interface version number.
	* modules/guile/guile.c: Likewise.
	* modules/outline/outline.c: Likewise.
	* modules/sample.c: Likewise.

	* lib/Makefile.am (libdico_la_LDFLAGS): Define version-info.

	Finished guile.c
	* lib/stream.c (_stream_flush_buffer): Second argument instructs
	whether to
	flush all buffer contents in case of line buffers. All callers
	updated.
	* modules/guile/guile.c (dico-strat-selector?, dico-strat-select?)
	(dico-strat-name, dico-strat-descriprion): New Scheme functions.
	(_guile_init_funcs): New function.
	(guile_proc_name): New variable.
	(mod_init): Call _guile_init_funcs. Improve error diagnostics.
	(mod_match): Call strategy selector if supplied.

	Minor change.
	* README: Update.

	Guile module almost finished.
	* modules/guile/guile.c: Implement mod_define, mod_match, and
	the rest of
	mod_ interfaces.

2008-05-27  Sergey Poznyakoff  <gray@gnu.org.ua>

	Develope guile.c
	* am/guile.m4: Require Guile 1.8
	(_stream_fill_buffer): Return a meaningful error code.
	* modules/guile/guile.c: Implement mod_init, mod_open, mod_close,
	mod_info
	and mod_descr.

	Bugfixes.
	* bootstrap: Obtain aclocal arguments from Makefile.am
	* gnulib.modules (xgetdomainname): New module.
	* lib/stream.c (dico_stream_read_unbuffered): Return EIO if
	less than
	size bytes were read and pread is NULL.

	Add a placeholder for Guile module.
	* Makefile.am (ACLOCAL_AMFLAGS): Add am.
	* configure.ac: Check for guile.
	* am/gsasl.m4, am/guile.m4: New files.
	* modules/guile/Makefile.am, modules/guile/guile.c: New files.

2008-05-26  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor change.
	* README-hacking (Debugging): New section.
	* utils/gud-wrapper: New function.

	Speed up connection startup in daemon mode.
	* dictd/dictd.c (dictd_loop): Remove call to dictd_server_init.
	(dictd_inetd): Fix arguments to dico_stream_set_buffer.
	* dictd/dictd.h (dictd_server_init.): New proto.
	* dictd/main.c (main): Call dictd_server_init here.
	* dictd/server.c (handle_connectiond): Fix arguments to
	dico_stream_set_buffer.
	* include/dico/types.h (DICO_MAX_BUFFER): New define.

	Improve stat info.
	* dictd/commands.c (dictd_show_server): Show additional statistics
	about
	the server.
	* dictd/dictd.c (dictd_loop): Do not close and destroy the
	stream, leave
	it for the caller.
	* dictd/dictd.h (total_forks): New extern.
	(ssi_mode): New enum.
	(show_sys_info, ssi_group_list): New externs.
	* dictd/main.c (show_sys_info, ssi_group_list): New globals.
	(show-sys-info, sys-info-groups): New config file statements.
	(show_sys_info_p, get_full_hostname): New function.
	(main): Init "server" timer.
	* dictd/server.c (total_forks): New global.
	(register_child): Increase total_forks.
	(stop_all, stop_children): Do nothing if childtab is NULL.
	(handle_connection): Destroy the stream after dictd_loop
	terminates.
	* include/xdico.h (timer_get_temp): New proto.
	* lib/timer.c (timer_get_temp): New function.
	* modules/dict.org/dictorg.c (printdef): Improve error checking.

	Bugfix.
	* modules/dict.org/dictstr.c (_dict_read_dzip): Update
	str->offset.

	Do not show 00-database entries, unless a special option is given.
	* modules/dict.org/dictorg.c (show_dictorg_entries): New global.
	(show-dictorg-entries): New command line option.
	(mod_open): Set show_dictorg_entries.
	(RESERVED_WORD): New macro.
	(mod_match, mod_define): Use the value of db->show_dictorg_entries
	to decide whether to show dict.org service entries.
	* modules/dict.org/dictorg.h (struct dictdb): New field
	`show_dictorg_entries'.

	Compile dictorg even if zlib is not found.
	* configure.ac: Bugfix.
	* modules/dict.org/dictorg.h: Include zlib.h conditionally.
	* modules/dict.org/dictstr.c: Conditionally compile libz-related
	code.

	Implement DZIP format.
	* README: Update.
	* modules/dict.org/dictstr.c (struct _dict_chunk_cache): New field
	`size'.
	All references updated.
	(struct _dict_stream): New field `buffer'. All references updated.
	(cache_get): Implement.
	(get_chunk_num): Remove.
	(_dict_destroy): Free buffer and deinitialize inflation engine.
	(_dict_open): Compute chunk offsets after header_length has been
	fixed up.
	(_dict_read_dzip): Implement.

	Bugfix
	* lib/stream.c (dico_stream_write): Initialize bufp.

	Minor fix.
	* modules/dict.org/dictorg.c (_dict_seek_text,	_dict_seek_gzip):
	Fix
	erroneous return type.

	Preparatory work for DZIP support.
	* modules/dict.org/dictorg.c (free_db): Close and destroy stream.
	* modules/dict.org/dictorg.h: Include stdint.h
	(GZ_OS_): New defines.
	(dict_stream_create): Change signature. All callers changed.
	* modules/dict.org/dictstr.c (DE_UNSUPPORTED_VERSION,
	DE_BAD_HEADER)
	(DE_GZIP_SEEK): New defines.
	(struct _dict_chunk, struct _dict_chunk_cache): New data types.
	(struct _dict_stream): Add dzip-related fields.
	(cache_create_chunk, cache_alloc, cache_destroy, cache_promote)
	(cache_get, get_chunk_num): New functions.
	(_dict_open, _dict_read, _dict_seek): Handle dzip format.
	(_dict_strerror): Handle new error code.s
	(_dict_read_dzip): New placeholder.
	(_dict_seek_dzip): New function.
	(dict_stream_create): Take two arguments.

	Change signatures of stream I/O functions.
	* include/dico/stream.h (dico_stream_read_unbuffered)
	(dico_stream_write_unbuffered)
	(dico_stream_read, dico_stream_write): buf argument is void*,
	not char*.
	(dico_stream_getdelim): New function.
	* lib/stream.c: Likewise.
	(dico_stream_seek): Clear eof marker.

	Bugfix in dictorg module.
	* modules/dict.org/dictorg.c (suffix_match): Fix lost entry.

	Bugfix in outline module.
	* modules/outline/outline.c (outline_match0): Fix coredump.

	Minor improvement in dictorg module.
	* modules/dict.org/dictorg.c: Implement trim-ws option.

	Silent compiler warnings.
	* dictd/config-gram.y, dictd/dictd.h, dictd/main.c, lib/jiscvt.c,
	lib/utf8.c,
	makedict/index.c, makedict/makedict.h, modules/outline/outline.c:
	Avoid
	compiler warnings.
	* dictd/logstr.c, dictd/ostream.c, dictd/xscript.c,
	include/dico/stream.h,
	lib/fdstream.c, lib/fltstream.c, lib/iostr.c,
	lib/stream.c: dico_stream_write takes const char * buffer.

	Delay setting capabilities until the end of config parsing.
	* dictd/capa.c (dictd_capa_register): Move actual initialization
	to dictd_capa_flush.
	(dictd_capa_flush): New function.
	* dictd/cmdline.opt: New option --lint (-t).
	* dictd/dictd.h (config_lint_option): New extern.
	* dictd/main.c (config_lint_option): New global.
	(main): Call dictd_capa_flush. Exit immediately if
	config_lint_option is set.

	Provide library functions for parsing module command lines.
	* include/dico.h: Include dico/parseopt.h.
	* include/dico/Makefile.am (pkginclude_HEADERS): Add parseopt.h
	* include/dico/parseopt.h: New file.
	* lib/Makefile.am (libdico_la_SOURCES): Add parseopt.c.
	* lib/parseopt.c: New file. Ported from pam-modules.
	* modules/dict.org/dictorg.c (mod_init, mod_open): Use
	dico_parseopt to
	parse command line.
	(free_db): Free suf_index.

	Minor improvement.
	* modules/dict.org/dictorg.c (mod_open): Additional option "sort"
	forces sortin of the index.

	Bugfixes.
	* dictd/commands.c (_show_database): Print "" if the database
	description is NULL.
	* dictd/loader.c (print_definitions): Likewise.
	* modules/dict.org/dictorg.c (parse_index_entry): Use \t as a
	field separator.
	(_match_simple): Fix coredump.

2008-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>

	Another minor update.
	* utils/bdfextract.pl: Fix bitmasks.

	Minor update for completeness sake.
	* utils/Makefile.am: Remove revbits.
	* utils/revbits.c: Remove.
	* utils/bdfextract.pl: Compute reversed bit string in place.
	* utils/mkbushufont.awk: Compute reversed bit string in place.

	Keep namespace clean.
	* include/dico/types.h (ARRAY_SIZE): Rename to DICO_ARRAY_SIZE.
	* dictd/config-gram.y: Likewise.
	* dictd/dictd.c: Likewise.
	* modules/dict.org/dictorg.c: Likewise.
	* modules/outline/outline.c: Likewise.

	Implement `size' method in streams.
	* include/dico/stream.h (dico_stream_set_size, dico_stream_size):
	New functions.
	* lib/fdstream.c (fd_size, dico_fd_stream_create): Implement
	size method.
	* lib/mapstream.c (_mapfile_size, dico_mapfile_stream_create):
	Implement size method.
	* lib/stream.c (struct dico_stream): New member size.
	(dico_stream_set_size, dico_stream_size): New functions.

	Avoid building programs whose requisite libraries are missing.
	* configure.ac: Remove leftover --with-log-facility option.
	Detect presence of libz.
	Do not abort if no Berkeley DB is found.
	Set BUILD_JDICT_PROGS substitution variable if libdb is found.
	(check_bdb): Make sure -ldb does not make it into LIBS.
	* dictd/Makefile.am (INCLUDES): Remove DB_INCLUDES
	(LDADD): Remove DB_LIBS.
	* makedict/Makefile.am (bin_PROGRAMS): Set to @BUILD_JDICT_PROGS@
	* modules/dict.org/Makefile.am (dictorg_la_LIBADD): Replace -lz
	with @LIBZ@

	Initial implementation of dict.org format.
	* README: Update.
	* include/dico/stream.h (dico_stream_seek): New prototype.
	(dico_mapfile_stream_create): New prototype.
	* lib/Makefile.am (libdico_la_SOURCES): Add mapstream.c.
	* lib/mapstream.c: New file.
	* lib/list.c (dico_list_insert_sorted): Bugfix: increase
	count when
	adding a new entry.
	* lib/stream.c (all functions): Return a meaningful error code.
	(dico_stream_strerror): Bugfix.
	(dico_stream_seek): Implement.
	* modules/dict.org/Makefile.am (dictorg_la_SOURCES): Add
	dictstr.c.
	* modules/dict.org/dictstr.c: New file.
	* modules/dict.org/dictorg.c: Implement full functionality.
	* modules/dict.org/dictorg.h: Include zlib.h. Add dict.org
	format definitions.

2008-05-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	MInor fix.
	* lib/fltstream.c (filter_wr_flush): Make sure the output is
	terminated with
	CRLF.

	Merge branch 'master' of ssh://gray@git.gnu.org.ua/gitroot/dico

	./F

2008-05-20  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update the docs.
	* README, README-hacking: Update.

2008-05-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	Add modules/dict.org/data.c

	Add modules/dict.org/crc.c

	Minor change.
	* modules/dict.org/Makefile.am (dictorg_la_SOURCES): Add crc.c
	and data.c
	(noinst_HEADERS): New variable. Add crc.h and dictorg.h
	* modules/dict.org/crc.h: New file.
	* modules/dict.org/dictorg.h: New file.
	* modules/dict.org/dictorg.c: Move includes and data definitions
	to
	dictorg.h

	* include/dico/util.h: New file
	* lib/xutil.c: Renamed from util.c
	(make_full_file_name): Rewrite using dico_full_file_name.
	* lib/util.c: New file.
	* include/dico.h: Include dico/util.h
	* include/dico/Makefile.am (pkginclude_HEADERS): Add util.h.
	* include/dico/filter.h (dico_base64_input): New prototype.
	* lib/Makefile.am (libdico_la_SOURCES): Add util.c
	(libxdico_a_SOURCES): Remove util.c, add xutil.c
	* lib/base64.c (b64_input): Rename to dico_base64_input. All
	callers changed.
	* modules/dict.org/dictorg.c: Implement mod_init and, partially,
	mod_open.
	Parse index file.

	Fix coredump in outline module.
	* modules/outline/outline.c (outline_define): Fix coredump
	on missing
	definitions.

2008-05-18  Sergey Poznyakoff  <gray@gnu.org.ua>

	Add session transcript feature.
	* dictd/logstr.c: New file.
	* dictd/xscript.c: New file
	* dictd/Makefile.am (dictd_SOURCES): Add logstr.c and xscript.c
	* dictd/dictd.c (dictd_loop): Set up session transcript,
	if requested.
	* dictd/dictd.h (transcript): New declaration.
	(transcript_stream_create, log_stream_create): New proto.
	* dictd/main.c (transcript): New variable.
	(keywords): New keyword "transcript".

	Implement suffix matching strategy.
	* outline/outline.c (struct entry): New fields: length and peer.
	(struct outline_file): New field suf_index.
	(alloc_entry): Set length and wordlen.
	(suffix_match): New function.
	(strat_tab): Add suffix_match.
	(revert_word, init_suffix_index): New functions.
	(exact_match, prefix_match): Initialize x.length and
	x.wordlen. Set result
	type to result_match;
	(compare_entry_ptr): New function.
	(outline_close): Free suf_index.
	(outline_define): Set result type to result_define.

	Re-create the test dictionary.
	* tests/devils.out: Re-create.

2008-05-17  Sergey Poznyakoff  <gray@gnu.org.ua>

	Provide a macro for the size of a soundex buffer.
	* include/dico/utf8.h (DICO_SOUNDEX_SIZE): New macro.
	* dictd/dictd.c (soundex_sel): Use DICO_SOUNDEX_SIZE macro.
	* lib/soundex.c (dico_soundex): Use DICO_SOUNDEX_SIZE macro.

	Minor change
	* Makefile.am (ChangeLog): Append Local variables section.

2008-05-16  Sergey Poznyakoff  <gray@gnu.org.ua>

	Add a framework for dict.org module.
	* modules/dict.org: New directory.
	* modules/dict.org/Makefile.am, modules/dict.org/dictorg.c
	* modules/sample.c: New file.
	* configure.ac, modules/Makefile.am: Add modules/dict.org.

	* dictd/Makefile.am (dictd_SOURCES): Add stat.c
	* dictd/stat.c: New file.
	* dictd/commands.c, dictd/dictd.c: Use begin_timing/report_timing.
	* dictd/dictd.h (num_defines, num_matches, num_compares):
	New globals.
	(begin_timing, report_timing): New prototypes.
	* dictd/loader.c (print_timing): Remove.
	Use begin_timing/report_timing for stat output. Use
	module_compare_count to
	retrieve number of comparisons.
	* modules/outline/outline.c: Keep track of the number of
	comparisons.
	Provide module_compare_count method.

	Report overall timing.
	* dictd/commands.c (dictd_quit): Print timing information.
	* dictd/dictd.c (dictd_loop): Start timer.

	Minor change.
	* tests/devils.out: Fix typos.

	Implement Soundex strategy.
	* lib/soundex.c: New file
	* lib/Makefile.am (libdico_la_SOURCES): Add soundex.c.
	* dictd/dictd.c (dictd_init_strategies): Add soundex.
	* include/dico/utf8.h (dico_soundex): New proto.

	Implement regex strategies.
	* dictd/regex.c: New file.
	* dictd/Makefile.am (dictd_SOURCES): Add regex.c
	* dictd/loader.c (dictd_load_module0): Update.
	(dictd_word_first, dictd_word_all, dictd_word_db): Use new
	dico_strategy_t type.
	(ictd_match_word_first, ictd_match_word_all): Likewise.

	* dictd/commands.c, dictd/dictd.c, lib/strat.c,
	modules/outline/outline.c: Use new dico_strategy_t type.

	* dictd/config-gram.y (config_error): Correctly handle locus->file
	== NULL.
	* dictd/dictd.h (register_lev, register_regex): New functions.

	* dictd/lev.c (lev_sel): Use new signature.
	* dictd/main.c (main): Call register_regex.
	* include/dico/strat.h: Move typedef to types.h
	Use new dico_strategy_t type in prototypes

	* include/dico/types.h (dico_select_t): Change signature.
	(struct dico_handler_module.module_match_all): Remove.
	(struct dico_handler_module.module_match): Take const
	dico_strategy_t strat as
	the 2nd argument.

2008-05-15  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes.
	* dictd/loader.c (print_matches): Quote the word. This is not
	required by
	the RFC, but some clients (kdict) expect it.
	* dictd/server.c (dictd_server): Fix copy-n-paste errors.

	Implement Levenshtein and Damerau-Levenshtein match strategies.
	* dictd/lev.c: New file.
	* dictd/Makefile.am (dictd_SOURCES): Add lev.c.
	* dictd/commands.c (dictd_match): Update calls to dictd_match_*
	functions.
	* dictd/dictd.h (struct dictd_database.mod): Fix type.
	(dictd_match_word_db, dictd_match_word_first)
	(dictd_define_word_db): Change type of `strat'.
	(DICTD_DEFAULT_STRATEGY): Define to "lev".
	* dictd/loader.c (dictd_load_module0): Bail out if the module
	does not define
	mandatory methods.
	(dictd_word_first, dictd_word_all)
	(dictd_match_word_db, dictd_match_word_all): Change type of
	`strat'.
	* dictd/main.c: Call register_lev.
	* include/dico/types.h: New file.
	* include/dico/Makefile.am (pkginclude_HEADERS): Add types.h
	* include/dico.h: Move all definitions to dico/types.h. Include
	it.
	(dico_handle_t, dico_result_t): Change typedefs to help improve
	compilation
	diagnostics.
	* include/dico/diag.h: Include dico/types.h, instead of
	sys/types.h.
	(DICO_PRINTFLIKE): Remove redefinition.
	* include/dico/strat.h: Include dico/types.h, instead of
	sys/types.h.
	(struct dico_strategy): New members `sel' and `closure'.
	* lib/strat.c (dico_strategy_dup): Handle new fields.
	* include/dico/stream.h (dico_linebuf_t, dico_stream_t): Move
	to dico/types.h
	* include/dico/utf8.h (dico_levenshtein_distance): First two
	arguments are
	const.
	* lib/levenshtein.c: Likewise.
	* modules/outline/outline.c: Implement module_match_all.

	Minor change.
	* include/dico/utf8.h, lib/utf8.c: Fix a typo.

	Improve UTF-8 functions. Add a function for computing levenshtein
	distance.
	* lib/levenshtein.c: New file.
	* lib/Makefile.am (libdico_la_SOURCES): Add levenshtein.c
	* dico/utf8.h (utf8_symcmp, utf8_symcasecmp, utf8_strcasecmp)
	(utf8_strncasecmp,utf8_mbstr_to_wc)
	(dico_levenshtein_distance): New prototypes.
	* lib/utf8.c (utf8_symcmp, utf8_symcasecmp, utf8_strcasecmp)
	(utf8_strncasecmp,utf8_mbstr_to_wc): New functions.
	* modules/outline/outline.c: Use utf8 comparitors.

	Add ChangeLog rule. Use fmt to split long lines in ChangeLog

	Move diagnostics functions to libdico.
	* include/dico/diag.h: New file
	* lib/diag.c: Prefix all global symbols with dico_. All uses
	updated.
	* lib/Makefile.am (libxdico_a_SOURCES): Remove diag.c
	(libdico_la_SOURCES): Add diag.c
	* include/dico.h: Include dico/diag.h
	* include/dico/Makefile.am (pkginclude_HEADERS): Add diag.h
	* modules/outline/outline.c: Use dico_log instead of syslog.

2008-05-14  Sergey Poznyakoff  <gray@gnu.org.ua>

	Discontinue ChangeLog, use git log to regenerate it when making
	a distribution.
	* .gitignore: Add ChangeLog
	* ChangeLog: Rename to ChangeLog.2008
	* Makefile.am (EXTRA_DIST): Add ChangeLog.2008
	(make-ChangeLog): New rule.
	(dist-hook): New rule.
	* bootstrap.conf: Create a placeholder for ChangeLog.
	* gnulib.modules: Add gitlog-to-changelog

2008-05-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor changes.
	* doc/Makefile.am: Add check-options rule
	* doc/gjdict.texi: New file.
	* utils/Makefile.am: Remove helpcmp.pl
	* utils/helpcmp.pl: Remove.

	Introduce a documentation framework:
	* doc/.gitignore, doc/Makefile.am, doc/check-docs.sh,
	doc/dico.texi, doc/fdl.texi, doc/gendocs_template,
	doc/macros.texi, doc/mastermenu.el, doc/rendition.texi,
	doc/untabify.el: New files.
	* Makefile.am (SUBDIRS): Add doc.
	* configure.ac (RENDITION): New subst variable.
	(AC_CONFIG_FILES): Add doc/Makefile.

	Implement quoted-printable encoding.
	* lib/Makefile.am (libdico_la_SOURCES): Add qp.c
	* lib/qp.c: New file. Implementation of quoted-printable
	encoding/decoding.
	* lib/fltstream.c (dico_codec_stream_create): New function.
	* dictd/ostream.c (print_headers): Use dico_codec_stream_create to
	create encoder stream.
	* include/dico/filter.h (dico_codec_stream_create)
	(dico_qp_stream_create,dico_qp_decode<dico_qp_encode): New
	functions.

	* dictd/main.c (database_remove_dependent): Use
	dictd_database_free.

	Implement a framework for various encodings in mime mode;
	implement base64 encoding.
	* include/dico/filter.h: New file.
	* lib/base64.c: New file.
	* lib/fltstream.c: New file.

	* dictd/commands.c: Update calls to dictd_ostream_create.
	* dictd/loader.c: Update calls to dictd_ostream_create.
	* dictd/dictd.h (struct dictd_database): New members: content_type
	and content_transfer_encoding.
	(dictd_ostream_create): Take two additional arguments.
	* dictd/fdio.c: Update calls to dico_stream_create.
	* dictd/main.c (keywords): New keywords `content-type',
	`content-transfer-encoding'.
	* dictd/ostream.c (struct ostream): New members: flags, type, and
	encoding.
	(print_headers): New function.
	(ostream_write): Call print_headers.
	(ostream_flush, ostream_destroy): New functions.
	(dictd_ostream_create): Take two more arguments, specifying the
	content type and encoding to be used.
	* include/dico.h: Include dico/filter.h
	* include/dico/Makefile.am (pkginclude_HEADERS): Add filter.h
	* include/dico/stream.h (dico_stream_create): Change signature.
	* lib/Makefile.am (libdico_la_SOURCES): Add base64.c and
	fltstream.c.
	* lib/linebuf.c (dico_linebuf_flush): Initialize rc.
	* lib/list.c: Fix copyright header.
	* lib/stream.c (dico_stream_create): Take one more argument.
	(dico_stream_flush): Call stream->flush, if not NULL.
	(dico_stream_destroy): Call stream->destroy, if not NULL.
	* modules/outline/outline.c (outline_output_result): Fix return
	value.

2008-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement OPTION MIME.
	* README: Update.
	* dictd/Makefile.am (dictd_SOURCES): Add mime.c, ostream.c.
	* dictd/dictd.h (register_mime, dictd_ostream_create): New
	prototypes.
	* dictd/loader.c (print_matches, print_definitions): Use ostream
	for output.
	* dictd/commands.c (dictd_help, dictd_show_info)
	(dictd_show_databases, dictd_show_strategies)
	(dictd_show_strategies): Use ostream for output.

	* dictd/main.c (main): Call register_mime.
	* tests/dictd.cfin: Request mime capability.
	* lib/stream.c (dico_stream_read_unbuffered)
	(dico_stream_write_unbuffered): Return 1 and set errno to ENOSYS
	if the underlying method is NULL.

	Implement authentication and database authorization.
	* dictd/auth.c (auth): Set user_name and user_groups.
	(init_auth_data): New function.
	* dictd/commands.c (dictd_show_info): Use database_count and
	database_iterate instead of dico_list_ functions.
	* dictd/dbtext.c (dbtext_get_groups): Store groups in a list.
	* dictd/dictd.c (dictd_loop): Call init_auth_data before
	returning.
	* dictd/dictd.h (user_name, user_groups): New globals.
	(struct dictd_database): New fields: require_auth and groups.
	(database_count, database_iterate, database_visible_p): New
	prototypes.
	(struct udb_def._db_get_groups): Change signature.
	(udb_get_groups): Change signature.
	(init_auth_data): New function.
	* dictd/loader.c (dictd_word_first, dictd_word_all): Ignore
	databases that are not visible.
	(dictd_define_word_db): Restore accidentally deleted call to
	mp->module_define.
	* dictd/main.c (require_auth, user_name, user_groups): New
	variables.
	(kwd_database): New keywords: `require-auth' and `groups'.
	(keywords): New keyword `require-auth'.
	(database_visible_p, database_count, database_iterate): New
	functions.
	(cmp_database_name): Ignore invisible databases.
	(struct dictd_user_db._db_get_groups): Change signature.
	(udb_get_groups): Change signature.
	* include/dico/list.h (dico_list_intersect_p): New function.
	* lib/list.c (dico_list_intersect_p): New function.
	* modules/outline/outline.c (compare_prefix): Bugfix.
	* tests/devils.out (PRECIPITATE): Remove duplicate entry.

	Optionally print timing information for match and define commands.
	* dictd/commands.c (dictd_match): Resolve strategy before passing
	it to the handler module.
	* dictd/dictd.h (timing_option): New global.
	* dictd/loader.c (print_timing): New function.
	(dictd_word_first, dictd_word_all, dictd_match_word_db)
	(dictd_match_word_first, dictd_match_word_all)
	(dictd_define_word_db, dictd_define_word_first)
	(dictd_define_word_all): Optionally print timing information.
	* dictd/main.c (timing_option): New global.
	(keywords): New statement `timing'.
	* gnulib.modules: Add gettimeofday.
	* include/xdico.h (xdico_timer_t): New data type.
	(timer_get, timer_start, timer_stop, timer_reset)
	(timer_get_real, timer_get_user, timer_get_system)
	(timer_format_time): New functions.
	* lib/Makefile.am (libxdico_a_SOURCES): Add timer.c
	* lib/timer.c: New file.

	Implement prefix matches

	Update

	Implement working outline module. Add example data and
	configuration, for testing.

	* dictd/loader.c (dictd_word_all): Bugfix
	(print_matches): Fix output.
	(print_definitions): Remove optional ': text follows' part, as it
	seems to confuse some clients (notably, kdict).
	* include/dico.h: Include dico/utf8.h
	* include/dico/utf8.h: New file.
	* include/xdico.h (utf8_*): Move to dico/utf8.h
	* lib/Makefile.am (libdico_la_SOURCES): Add utf8.c.
	(libxdico_la_SOURCES): Remove utf8.c.
	* lib/utf8.c: Do not include xalloc.h and xdico.h, include dico.h
	instead.
	(utf8_wc_strdup): Use calloc.
	(utf8_wc_to_mbstr): Do not use logmsg.

	* modules/outline/outline.c: Working implementation.

	* tests/.gitignore, tests/Makefile.am, tests/devils.out,
	tests/dictd.cfin
	* Makefile.am (SUBDIRS): Add tests.
	* configure.ac (AC_CONFIG_FILES): Add tests/Makefile.am

2008-05-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Provide a generalized framework for ! and * (matches and defines).
	* dictd/commands.c (dictd_match): Handle ! and *.
	* dictd/dictd.h (dictd_match_word): Remove.
	(dictd_match_word_db, dictd_match_word_first)
	(dictd_match_word_all): New functions.
	* dictd/loader.c (dictd_word_first, dictd_word_all): New
	functions.
	(dictd_match_word): Rename to
	dictd_match_word_db.
	(dictd_match_word_first,dictd_match_word_all): New functions.
	(dictd_define_word_first, dictd_define_word_all): Rewrite using
	dictd_word_first and dictd_word_all.

	Provide a framework for ! and * searches.
	* dictd/commands.c (dictd_define): Implement ! and * searches.
	* dictd/dictd.h (dictd_define_word): Remove.
	(dictd_define_word_db, dictd_define_word_first)
	(dictd_define_word_all): New prototypes.
	* dictd/loader.c (print_definitions): New function.
	(dictd_define_word): Rename to dictd_define_word_db; use
	print_definitions.
	(dictd_define_word_first, dictd_define_word_all): New functions.

	Provide a default strategy.
	* dictd/dictd.c (init_strategies): Rename to
	dictd_init_strategies.
	(dictd_server_init): Remove call to init_strategies, it is done in
	main. Ensure that a default strategy is set.
	* dictd/dictd.h (DICTD_DEFAULT_STRATEGY): New define.
	(dictd_init_strategies): New prototype.
	* dictd/main.c: Fix typos in diagnostics messages.
	(keywords): New statement `default-strategy'.
	(main): Call dictd_init_strategies.
	* include/dico/strat.h (dico_set_default_strategy)
	(dico_get_default_strategy): New prototypes.
	* lib/strat.c (dico_set_default_strategy)
	(dico_get_default_strategy): New functions.

2008-05-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Initial implementation of MATCH and DEFINE.
	* README: Update.
	* dictd/commands.c: Initial implementation of MATCH and DEFINE
	commands.
	* dictd/dictd.c (init_strategies): Always define the "prefix"
	strategy.
	* dictd/dictd.h (dictd_match_word, dictd_define_word): New
	functions.
	* dictd/fdio.c (fd_close): Don't raise error on closing descr -1.
	* dictd/loader.c (dictd_get_database_descr)
	(dictd_get_database_info): Bugfix.
	(dictd_match_word, dictd_define_word): New functions.
	* include/dico.h  (dico_result_t): New data type.
	(struct dico_handler_module): Change signatures of module_match
	and module_define. Add new methods: module_output_result,
	module_result_count, module_free_result.
	* modules/outline/outline.c: Reflect changes to struct
	dico_handler_module.

2008-05-07  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix.
	* dictd/dictd.c (tokenize_input): Correctly handle quoted
	arguments.

	Rewrite interface to strategies.
	* include/dico/strat.h: New file.
	* include/dico/Makefile.am (pkginclude_HEADERS): Add strat.h
	* lib/strat.c: New file.
	* lib/Makefile.am (libdico_la_SOURCES): Add strat.c

	* dictd/dictd.c (init_databases): Remove querying for supported
	strategies.
	(init_strategies): New function.
	(dictd_server_init): Call init_strategies.
	* dictd/commands.c (dictd_show_strategies): Use new interface to
	strategies.
	* dictd/dictd.h (dictd_database_t): Remove stratc and stratv.
	* dictd/loader.c (strat_name_cmp, add_strategies)
	(dictd_database_get_strats): Remove.
	* dictd/main.c (strategy_list): Remove.
	(dictd_database_free): Remove references to stratc and stratv.
	* include/dico.h: Include dico/strat.h
	(dico_strategy_t): Move definition to dico/strat.h
	(struct dico_handler_module): Remove module_strats.
	* outline/outline.c (outline_strats): Remove. Register strategies
	in outline_init.

	Implement SHOW STRAT. Begin writing `outline' handler module.
	* modules: New directory.
	* modules/Makefile.am: New file.
	* modules/outline: New directory.
	* modules/outline/Makefile.am: New file.
	* modules/outline/outline.c: New file.

	* Makefile.am (SUBDIRS): Add modules.
	* configure.ac (AC_CONFIG_FILES): Add modules, modules/outline
	* dictd/commands.c (_show_database, dictd_show_info): Use data
	returned by the backend module, if not configured in the database
	structure.
	(dictd_show_strategies): New function.
	(command_tab): Implement show strat.
	* dictd/dictd.c (init_databases): Initialize strategy list.
	* dictd/dictd.h (strategy_list): New declaration.
	(dictd_get_database_descr, dictd_free_database_descr)
	(dictd_get_database_info, dictd_free_database_info): New
	prototypes.
	* dictd/loader.c (_add_load_dir): Bugfix.
	(add_strategies, strat_name_cmp): New functions.
	(dictd_database_get_strats): Rewrite using new version of
	module_strats.
	(dictd_get_database_descr, dictd_free_database_descr)
	(dictd_get_database_info, dictd_free_database_info): New
	functions.
	(dictd_match_word): New placeholder.
	* dictd/main.c (strategy_list): New variable.
	* include/dico.h (dico_strategy_t): New data type.
	(dico_handler_module): New members module_db_info and
	module_db_descr.
	(module_strats, module_define): Change signature.
	* lib/list.c: Initialize p with zeroes.

	Add loader.c
	* README: Update
	* configure.ac: Require libtool 2.2.5a
	(DICO_MODDIR): Define
	* dictd/loader.c: New file.
	* dictd/Makefile.am: Add loader.c.
	* dictd/dictd.h (dictd_loader_init): New proto.
	* dictd/main.c (main): Call dictd_loader_init.

2008-05-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Initialize databases.
	* dictd/dictd.c (init_databases): New function.
	(dictd_server_init): Call init_databases.
	* dictd/dictd.h (struct dictd_dictionary): New fields: mod, argc,
	argv.
	(dictd_open_dictionary_handler): New proto.
	* dictd/loader.c (dictd_open_dictionary_handler): New function.
	* dictd/main.c (set_dico_handler): Rename to set_dict_handler (fix
	a typo). Intialize command, argc and argv.

	Load modules.
	* dictd/commands.c (dictd_show_databases): Return 554 response if
	no databases are configured.
	* dictd/dictd.c (dictd_loop): Load all configured handlers.
	* dictd/dictd.h: Include ltdl.h
	(handler_list, dictionary_list): Add declarations.
	(dictd_handler_t): New fields: module and handle.
	(dictionary_remove_dependent, dictd_load_module): New proto.
	* dictd/loader.c (dictd_load_module): New function.
	* dictd/main.c (dictionary_remove_dependent): New function.
	* dictd/udb.c (udb_create): Improve error diagnostics.
	* include/dico.h: Include dico/argcv.h
	(DICO_EXPORT): New define.
	(dico_handle_t, struct dico_handler_module): New declarations.
	* include/dico/Makefile.am (pkginclude_HEADERS): Add argcv.h.
	* include/dico/argcv.h: New file.
	* include/dico/list.h (dico_iterator_remove_current): Change
	return type.
	* lib/Makefile.am (libdico_la_SOURCES): add argcv.c
	* lib/argcv.c: New file.
	* lib/list.c, lib/url.c: Fix dummy errors.

	Forgot to add with the previous commit

	Provide an installable library and header files for dico
	database modules.

	* include/dico/Makefile.am: New file.
	* include/dico/assoc.h: New file.
	* include/dico/list.h: New file.
	* include/dico/url.h: New file.
	* include/dico/xlat.h: New file.
	* include/xdico.h: New file.
	* include/dico.h: Rewrite. Installable header.
	* include/Makefile.am (pkginclude_HEADERS): New var.
	Add SUBDIRS.

	* dictd/linebuf.c: Move to ...
	* lib/linebuf.c: ... this (with mods).
	* dictd/stream.c: Move to ...
	* lib/stream.c: ... this (with mods).
	* lib/Makefile.am (lib_LTLIBRARIES): New installable library
	libdico.la.
	(noinst_LIBRARIES): New library libxdico.
	* lib/assoc.c, lib/list.c, lib/url.c: Avoid using xalloc calls,
	instead return error status and set errno.
	* lib/diag.c, lib/iputil.c, lib/userprivs.c, lib/utf8.c,
	lib/xalloc-die.c: Include xdico.h

	* lib/util.c: Likewise.
	(xdico_list_create, xdico_iterator_create, xdico_list_append)
	(xdico_list_prepend, xdico_assoc_create, xdico_assoc_add): New
	functions.

	* .gitignore: Update.
	* configure.ac (AC_CONFIG_FILES): Add include/dico/Makefile
	* dictd/Makefile.am (dictd_SOURCES): Remove linebuf.c and
	stream.c.
	(LDADD): Add libxdico.a, libdico.la

	* dictd/auth.c, dictd/capa.c, dictd/commands.c,
	dictd/config-gram.y,
	dictd/dictd.c, dictd/dictd.h, dictd/fdio.c, dictd/main.c,
	dictd/server.c, dictd/udb.c: Reflect changes to the namespace.

	* makedict/Makefile.am (LDADD): Add libxdico.a, libdico.la
	* makedict/makedict.h: Include xdico.h

	Add loader.c
	* README: Update
	* configure.ac: Require libtool 2.2.5a
	(DICO_MODDIR): Define
	* dictd/loader.c: New file.
	* dictd/Makefile.am: Add loader.c.
	* dictd/dictd.h (dictd_loader_init): New proto.
	* dictd/main.c (main): Call dictd_loader_init.

2008-05-05  Sergey Poznyakoff  <gray@gnu.org.ua>

	Change incorporation model of libltdl.
	* bootstrap, configure.ac: Require latest libtool. Change
	incorporation model of libltdl.
	* dictd/Makefile.am, makedict/Makefile.am (LDADD): Revert to using
	libgnu.a.
	* README-hacking: Update.

	More docs

	Namespace cleanup

	Further fixes.
	* dictd/Makefile.am (LDADD): Change libgnu.a to libgnu.la
	* makedict/Makefile.am: Likewise.

	Minor fixes

	Add preliminary ltdl support.
	* .gitignore: Add libtool and libltdl
	* Makefile.am (SUBDIRS): Add libltdl
	* README-hacking: Update.
	* bootstrap: Pass --ltdl flag to libtoolize, if necessary.
	* configure.ac: Use ltdl.

	* makedict/index.c: Minor changes.

	* doc: New directory
	* doc/rfc2229.txt: New file.

	Document configuration statements.
	* dictd/Makefile.am (dictd_SOURCES): Add config-format.c
	* dictd/config-format.c: New file.
	* dictd/cmdline.opt: New option `--config-help'.
	* dictd/config-gram.y: Reflect changes to struct config_keyword.
	* dictd/dbtext.c: Shut gcc warnings.
	* dictd/dictd.h (cfg_callback): Remove.
	(struct config_keyword): New members argname and docstring.
	(format_statement_array, config_help, dictd_server): New
	prototypes.
	* dictd/main.c: Provide docstrings for configuration statements.
	(config_help): New function.

	Implement AUTH command.
	* dictd/Makefile.am (dictd_SOURCES): Add auth.c, dbtext.c, udb.c.
	* dictd/auth.c, dictd/dbtext.c, dictd/udb.c: New files.
	* dictd/capa.c (dictd_capa_add): Fail if init finction returns
	non-zero.
	* dictd/dictd.c (msg_id): New global.
	(initial_banner): Save msg_id for further use.
	(trim): Move to the library. All uses updated.
	* dictd/dictd.h (msg_id): New declaration.
	Add udb prototypes and declarations.
	* dictd/main.c (user_db): New global.
	(user_db_config): Call udb_create.
	(main): Call udb_init and register_auth.
	* include/gjdict.h (struct dict_assoc): New data type.
	(dict_assoc_create, dict_assoc_destroy, dict_assoc_add,
	dict_assoc_find, dict_assoc_remove): New prototypes.
	(struct dict_url,dict_url_t): New data types.
	(dict_url_parse, dict_url_destroy, dict_url_get_arg)
	(dict_url_full_path): New prototypes.
	(make_full_file_name, trimnl): New prototypes.
	* lib/Makefile.am (libgjdict_a_SOURCES): Add assoc.c, url.c,
	util.c.
	* lib/assoc.c, lib/url.c, lib/util.c: New files.

	Fix handling of continuation strings in configuration file.
	* dictd/config-gram.y (stmt_end): Get kw as argument and use it to
	compute target pointer.
	(slist,slist0): Fix algorithm for coalescing string parts.
	* dictd/config-lex.l: Return QSTRING for quoted strings.
	* dictd/main.c (user-db): New configuration block statement.
	(set_handler, set_dictionary): Fix handling of callback_set_value.
	* include/gjdict.h (dict_list_intersect): New prototype.
	* lib/list.c (dict_list_intersect): New function.

	Capability framework.
	* dictd/Makefile.am (dictd_SOURCES): Add capa.c
	* dictd/capa.c: New file.
	* dictd/commands.c (command_tab): Remove capability-dependent
	commands.
	(command_list): New variable.
	(dictd_add_command, dictd_init_command_tab): New finctions.
	(dictd_show_std_help,locate_command): Rewrite using list of
	commands.
	* dictd/dictd.c (output_capabilities): Implement.
	* dictd/dictd.h (dictd_init_command_tab,dictd_add_command)
	(dictd_capa_register, dictd_capa_add)
	(dictd_capa_iterate): New protos.
	* dictd/main.c (keywords): New statement `capability'.
	(main): Initialize command and capability lists.

	Redo command handling. Improve daemon help output. Control
	inactivity timeout.
	* dictd/commands.c (dictd_help): Use help strings provided in the
	command tab.  If help-text (config) begins with a `+', append it
	to the default help output.
	(dictd_show): Split into separate functions for each show
	subcommand:
	(dictd_show_info, dictd_show_databases, dictd_show_server);
	(command_tab): Use new structure.
	(locate_command): Take into account arguments, so that "SHOW INFO"
	and "SHOW DB" are recognized as different commands (no matter what
	the amount of whitespace between the keywords).
	(dictd_show_std_help): New function.
	* dictd/dictd.c: Handle inactivity timeout.
	* dictd/dictd.h (struct dictd_command): Rewritten.
	* dictd/main.c (inactivity_timeout): New variable.
	(keywords): New statement `inactivity-timeout'.
	* dictd/server.c (handle_connection): Reset signals in child.
	* gnulib.modules: Add crypto/md5 and hash.
	* include/gjdict.h: Move #endif to the end of file.

	Implement CLIENT; Fix response codes.

	Preliminary implementation of "SHOW" commands.
	* dictd/commands.c: Preliminary implementation of "SHOW" commands.
	* dictd/dictd.c (stream_write_multiline): New function.
	* dictd/dictd.h (dictionary_list, server_info): New declarations.
	(stream_write_multiline, find_dictionary): New prototype.
	* dictd/main.c (find_dictionary): New function.

	Implement RFC 2229 dialog.
	* dictd/commands.c: New file.
	* dictd/Makefile.am (dictd_SOURCES): Add commands.c
	* dictd/cmdline.opt: New option `--inetd' (`-i')
	* dictd/config-lex.l (quote_char): New function.
	* dictd/dictd.c: Implement RFC 2229 dialog.
	(tokenize_input, stream_writez)
	(stream_printf, output_capabilities, initial_banner): New
	functions.
	* dictd/dictd.h (mode, hostname, program_version)
	(initial_banner_text, got_quit, help_text): New globals.
	(quote_char, unquote_char): New functions.
	(stream_writez, stream_printf): New functions.
	(dictd_cmd_fn, struct dictd_command): New data types.
	(dictd_handle_command): New function.
	* dictd/main.c (hostname, initial_banner_text, help_text): New
	globals.
	(initial-banner-text, help-text, hostname): New config statements.
	* dictd/server.c (dictd_server): Refuse to restart if the
	configuration file name is not a full file name.
	* gnulib.modules: Add xgethostname.
	* include/gjdict.h: Add utf8 prototypes and declarations.
	* lib/utf8.c (utf8_char_width, utf8_strlen, utf8_strbytelen)
	(utf8_iter_end_p, utf8_iter_first, utf8_iter_next): New functions.
	Normalize the namespace.
	* utils/getopt.m4 (GETOPT): Exit if an invalid option is given.
	(program_version): Make global.

	Minor changes.
	* lib/utf8.c: New file.
	* lib/Makefile.am (libgjdict_a_SOURCES): Add utf8.c.
	* gnulib.modules: Add c-strcase
	* makedict/Makefile.am (LDADD) Swap libgjdict.a and libgnu.a. Add
	libextra.a.

	Implement daemon and inetd modes.
	* dictd/dictd.c, dictd/server.c: New files.
	* dictd/Makefile.am (dictd_SOURCES): Add dictd.c and server.c
	(LDADD): Swap libgjdict.a and libgnu.a. Add libextra.a.
	* lib/userprivs.c: New file.
	* lib/Makefile.am (noinst_LIBRARIES): Add libextra.a
	(libgjdict_a_SOURCES): Add userprivs.c; remove xalloc-die.c.
	(libextra_a_SOURCES): Add xalloc-die.c.
	* lib/iputil.c (sockaddr_to_str, sockaddr_to_astr): New functions.
	* configure.ac: Check for setegid, setregid, setresgid, seteuid,
	setreuid, sysconf, getdtablesize.
	(PIDFILE): Remove define.
	* dictd/cmdline.opt (console-logging): Rename to stderr.
	* dictd/dictd.h: Update.
	* dictd/main.c (pidfile_name, shutdown_timeout): New globals.
	(user): Replace with :
	(user_id, group_id): New variables.
	(keywords): New configuration file statements `pidfile' and
	`shutdown-timeout'.
	(main): Call dictd driver appropriate for the current mode.
	* dictd/stream.c (stream_set_error_string): Change type to void.
	* include/gjdict.h (offsetof, GD_ARG_UNUSED, GD_PRINTFLIKE): New
	defines (move from ../dictd/dictd.h).
	(logmsg, die): Mark with GD_PRINTFLIKE.
	(sockaddr_to_str, sockaddr_to_astr, switch_to_privs): New protos.

	Add stream I/O framework.
	* README-hacking: New file.
	* dictd/fdio.c, dictd/linebuf.c, dictd/stream.c: New files.
	* dictd/Makefile.am (dictd_SOURCES): Add new files.

	* include/gjdict.h (dict_list_t, dict_iterator_t): Change
	definitions. All uses updated.
	* lib/list.c: Likewise.

	* dictd/config-gram.y: Reflect changes to dict_list_t. Add missing
	gettext markers.

	* gnulib.modules: Add strerror.
	* configure.ac (LOG_FACILITY): New configuration variable.
	* dictd/dictd.h (LOG_FACILITY): New define.
	Reflect changes to dict_list_t.
	Add linebuf and stream prototypes and declarations.
	(dictd_dictionary_t): New field `info'.
	* dictd/main.c: Reflect changes to dict_list_t.

	Finish configuration framework. Some minor issues still remain,
	though.
	* lib/list.c, lib/xlat.c: New files.
	* lib/Makefile.am: Add list.c and xlat.c
	* dictd/config-gram.y: Remove unneeded productions.  Implement C
	code.
	* dictd/config-lex.l: Remove NUMBER.
	* dictd/dictd.h: Add more includes and new prototypes.
	* dictd/main.c: Add configuration structures.
	* gnulib.modules: More modules.
	* include/gjdict.h: Add prototypes for list and xlat functions.

	* lib/bushu.dat, lib/diag.c, lib/iputil.c, lib/jiscvt.c: Add
	copyleft headers.
	* lib/list.c (dict_iterator_remove_current)
	(dict_iterator_set_data): New functions.

	Implement configuration framework for dictd.
	* configure.ac: Add AC_PROG_LEX
	* dictd/Makefile.am: Add config-gram.y and config-lex.l.
	* dictd/config-gram.y, dictd/config-lex.l: New files.
	* dictd/cmdline.opt: Implement the --config option. New options
	--trace-gram and --trace-lex.
	* dictd/dictd.h: Add new protos.
	* dictd/main.c (main): Call config_parse.
	* include/gjdict.h (vlogmsg): New proto.
	* lib/diag.c (vlogmsg): New function.

	Use gnulib. Remove old server. Start to write dictd.
	* bootstrap, bootstrap.conf, gnulib.modules: New files.
	* dictd/.gitignore, dictd/Makefile.am, dictd/cmdline.opt:
	New files.
	* lib/xmalloc.c: remove.
	* dictd/dictd.h, dictd/main.c: New file.
	* include/gjdictd.h: Delete.
	* lib/xalloc-die.c: New file.

	* server/*: Remove.

	Finish new makedict.
	* makedict/Makefile.am: Add romaji.c.
	* makedict/romaji.c: Rewrite from scratch.
	* makedict/index.c: Implement all indexes.
	* makedict/makedict.h (romaji_out_fn): New data type.
	(kana_to_romaji,kana_to_romaji_str): New prototypes.

Local Variables:
mode: change-log
version-control: never
buffer-read-only: t
End: