File: ChangeLog.svn

package info (click to toggle)
pcsc-lite 1.8.4-1+deb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,472 kB
  • sloc: ansic: 13,182; sh: 11,636; python: 720; lex: 552; makefile: 203
file content (10554 lines) | stat: -rw-r--r-- 419,610 bytes parent folder | download
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
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
2012-06-26  Ludovic Rousseau

	* [r6364] ChangeLog, configure.in: Release 1.8.4
	* [r6363] UnitaryTests/SCardBeginTransaction_deadlock.py: Unitary
	  test for locking in SCardBeginTransaction, SCardTransmit,
	  SCardStatus and SCardReconnect
	* [r6362] src/winscard_clnt.c: With changes in revisions 6358 to
	  6361 it is now possible to use the same SCARDCONTEXT in different
	  threads (same as on Windows)
	  
	  With one context per thread the locking was controlled by the
	  daemon. With the same context for 2 threads the locking is
	  controlled (first) on the client side since the 2 threads uses
	  the same mutex.
	* [r6361] src/winscard_clnt.c: Similar patch as in revision 6358
	  but for SCardReconnect()
	  
	  Thanks to Aleksey Samsonov for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html
	* [r6360] src/winscard_clnt.c: Similar patch as in revision 6358
	  but for SCardBeginTransaction()
	  
	  Thanks to Aleksey Samsonov for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html
	* [r6359] src/winscard_clnt.c: SCardStatus(): Similar patch as in
	  revision 6358 but for SCardStatus()
	  
	  Thanks to Aleksey Samsonov for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html
	* [r6358] src/winscard_clnt.c: SCardTransmit(): do not hold the
	  mutex when waiting in a SCARD_E_SHARING_VIOLATION loop
	  
	  If SCardTransmit() is waiting because the reader is used by
	  another thread/process then we release the
	  currentContextMap->mMutex, sleep, and try to acquire the mutex
	  again. This will allow another thread using the same hContext to
	  call SCardEndTransaction() otherwise the mutex is already held by
	  SCardTransmit() and SCardEndTransaction() can't get it to finish
	  the transaction => dead lock
	  
	  Thanks to Aleksey Samsonov for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html

2012-06-25  Ludovic Rousseau

	* [r6357] src/PCSC/ifdhandler.h: Update Doxygen: document
	  "libusb-1.0" scheme
	  
	  the "libusb" (for libusb-0.1) scheme has been updated to a
	  "libusb-1.0" scheme (for libusb-1.0). The device name now
	  contains the interface number. The bus and device are now
	  integers instead of paths.
	  
	  The change has been done in revision 5044 (June 2010) but the API
	  was not updated at the same time.
	* [r6356] src/readerfactory.c: RFReaderInfoNamePort(): Compare only
	  the significant part of the reader name
	  
	  Since revision 6354 the reader name may be truncated. Only the
	  part in readerState->readerName (managed by RFAddReader()) is
	  truntacted. The reader name stored the hotplug_*.c
	  readerTracker[] structures is NOT truncated. So we must use a
	  truncated compare function to find the reader name.
	* [r6355] src/PCSC/pcsclite.h.in: Increase MAX_READERNAME from 100
	  to 128
	  
	  It is not a perfect solution but it should limit the truncations
	  of reader names as introduced in revision 6354.
	* [r6354] src/readerfactory.c: RFAddReader(): truncates the reader
	  name if too long
	  
	  The reader name size is limited to a total of MAX_READERNAME
	  characters (100 by default). But some reader names are very long
	  like: "SCM Microsystems Inc. SCR3340 - ExpressCard54 Smart Card
	  Reader" and also provide a serial number and an interface name.
	  So the name constructed by hotplug_libudev.c can be very long and
	  longer than the 100 caracters.
	  
	  Closes: [#313684] "Reader name too long" error
	  https://alioth.debian.org/tracker/?func=detail&atid=410085&aid=313684&group_id=30105
	  http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0113.html
	* [r6353] src/hotplug_libudev.c: HPRescanUsbBus(): Display the full
	  name of the removed reader

2012-06-06  Ludovic Rousseau

	* [r6325] src/tokenparser.l: Add [ and ] in the list of accepted
	  characters for a reader name
	  
	  Readers with these characters caused a crash in libccid without
	  any error message. This is because the reader entry was skiped
	  and a reader name was then missing in the list. NULL is not a
	  valid reader name :-)
	  
	  Thanks to Philippe Teuwen for the bug report.

2012-06-05  Ludovic Rousseau

	* [r6323] src/pcscd.h.in: Remove now useless PCSCLITE_SVC_IDENTITY
	  
	  PCSCLITE_SVC_IDENTITY is no more used since revision 6322.
	* [r6322] src/winscard.c: SCardEstablishContext(): Use a full
	  32-bits random value
	  
	  Use a full int range (32-bits) value instead of a 16-bits value.
	  
	  Note: this value is (still) not used/checked on the server side.
	* [r6321] src/readerfactory.c, src/readerfactory.h: remove
	  dwIdentity field from ReaderContext structure
	  
	  Since revision 6320 dwIdentity is no more used. So we can remove
	  it.
	* [r6320] src/readerfactory.c: RFCreateReaderHandle(): generates a
	  32-bits random for hCard
	  
	  Since the change in revision 6316 dwIdentity is no more used to
	  identify a hCard -> reader relation. So we can just generate a
	  hCard as a full 32-bits random.
	  
	  The security should be improved with a change from 16-bits random
	  to a 32-bits random. It will be more difficult for a rogue client
	  to guess a valid hCard value.
	* [r6319] src/sys_unix.c: SYS_RandomInt(): extend range if fEnd ==
	  -1
	  
	  If fEnd parameter is set to -1 then the result of rand() is not
	  truncated. This is usefull to get 32-bits of random with no
	  constraint on the values.
	* [r6318] src/readerfactory.c, src/readerfactory.h: Remove now
	  unused function RFFindReaderHandle()
	  
	  Since revision 6317 this function is no more used.
	* [r6317] src/winscard.c: Calls to RFFindReaderHandle() are now
	  useless
	  
	  RFFindReaderHandle() was used to check the hCard is valid. Since
	  revision 6316 the algorithm used in RFFindReaderHandle() is
	  already used in RFReaderInfoById().
	  
	  So calling RFFindReaderHandle() after RFReaderInfoById() (as it
	  was done) is now useless.
	* [r6316] src/readerfactory.c, src/readerfactory.h: Use handlesList
	  to find a hCard -> reader link
	  
	  hCard handles are stored in the handlesList list of readers. The
	  use of dwIdentity just duplicate the information and is no more
	  needed.
	  
	  The algorithm is the same as in RFFindReaderHandle()

2012-06-02  Ludovic Rousseau

	* [r6315] src/ifdwrapper.c: Fix compiler failure for static driver
	  
	  CFLAGS="-DPCSCLITE_STATIC_DRIVER -DIFDHANDLERv3" ./configure make
	  [...] ifdwrapper.c: In function ‘IFDOpenIFD’:
	  ifdwrapper.c:125:15: error: ‘READER_CONTEXT’ has no member named
	  ‘lpcDevice’ ifdwrapper.c:126:57: error: ‘READER_CONTEXT’ has no
	  member named ‘lpcDevice’

2012-05-28  Ludovic Rousseau

	* [r6312] src/ifdwrapper.c: IFDPowerICC(): check the value returned
	  by IFDStatusICC()
	  
	  The reader may be gone at this step. See
	  http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0041.html

2012-05-18  Ludovic Rousseau

	* [r6302] src/PCSC/ifdhandler.h: Remove an extra '.' at the end of
	  the URL
	  
	  Thanks to "helpcrypto" for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0036.html
	* [r6299] configure.in: warning: 'libpcsclite.la': linking libtool
	  libraries using a non-POSIX archiver requires 'AM_PROG_AR' in
	  'configure.in'
	* [r6298] configure.in: autoupdated using autoupdate (GNU Autoconf)
	  2.69

2012-04-05  Ludovic Rousseau

	* [r6261] UnitaryTests/FEATURE_GET_TLV_PROPERTIES.py: Unitary test
	  for FEATURE_GET_TLV_PROPERTIES

2012-04-04  Ludovic Rousseau

	* [r6256]
	  UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py: Catch
	  control() exception
	  
	  If the driver is not configured with
	  DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED then the control() will
	  fail with a SmartcardException() exception.

2012-03-30  Ludovic Rousseau

	* [r6253] ChangeLog, configure.in: Release 1.8.3

2012-03-25  Ludovic Rousseau

	* [r6249] UnitaryTests/FEATURE_CCID_ESC_COMMAND.py: This file is
	  now more or less a duplicate of
	  FEATURE_CCID_ESC_COMMAND_Xiring.py
	  
	  So remove it.
	* [r6248] UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py: Add
	  GET_SN command and some documentation

2012-03-24  Ludovic Rousseau

	* [r6247] UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py: Unitary
	  test for FEATURE_CCID_ESC_COMMAND and Xiring Leo readers
	* [r6246] UnitaryTests/FEATURE_CCID_ESC_COMMAND2.py,
	  UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py: Rename
	  FEATURE_CCID_ESC_COMMAND2.py in
	  FEATURE_CCID_ESC_COMMAND_Gemalto_features.p

2012-03-23  Ludovic Rousseau

	* [r6244] UnitaryTests/control_get_firmware.py: Use
	  getTlvProperties() and PCSCv2_PART10_PROPERTY_wIdVendor
	  
	  We now check the reader is a Gemalto one before sending an escape
	  code

2012-03-20  Ludovic Rousseau

	* [r6241] src/PCSC/reader.h: Add new properties for
	  FEATURE_GET_TLV_PROPERTIES
	  
	  dwMaxAPDUDataSize, wIdVendor and wIdProduct are/will be defined
	  in PCSC v2 part 10 release 2.02.09

2012-02-28  Ludovic Rousseau

	* [r6236] src/spy/pcsc-spy: _SCardControl(): parse the received
	  buffer only on success
	  
	  The received buffer (answer) is valid only if the command
	  execution succeeded.
	* [r6235] src/spy/pcsc-spy: Add support of SCardControl132 for OS X
	* [r6234] src/spy/libpcscspy.c: Fix compiler warning on OS X
	  
	  libpcscspy.c:580: warning: no previous prototype for
	  'SCardControl132'

2012-02-21  Ludovic Rousseau

	* [r6229] src/debuglog.c: log_xxd(): do not log with negative
	  length
	  
	  Thanks to Godfrey Chung for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2012-q1/0043.html

2012-02-04  Ludovic Rousseau

	* [r6215] src/configfile.l: Skip non regular or "hidden" config
	  files
	  
	  Closes Debian bug #658322 "pcscd: fails to start if config
	  directory contains subdirectories"

2012-01-24  Ludovic Rousseau

	* [r6201] src/spy/pcsc-spy.pod: Document usage on Mac OS X
	* [r6200] src/spy/libpcscspy.c: Mac OS X uses SCardControl132
	  instead of SCardControl
	  
	  On Mac OS X SCardControl() is used for the old version of the API
	  (without the dwControlCode) and SCardControl132() for the new
	  API.
	  
	  From /System/Library/Frameworks/PCSC.framework/Headers/winscard.h
	  /* To support the newer version of SCardControl, we define it as
	  follows. The old version number was 1.1.2, the new call appears
	  in 1.3.2 of pcsc-lite (or perhaps earlier). */
	  
	  #if !defined(USE_SCARD_CONTROL_112) #define SCardControl
	  SCardControl132 #endif /* USE_SCARD_CONTROL_112 */
	* [r6199] src/spy/Makefile.am: Generate a Mac OS X PCSC.framework
	  hierarchy
	  
	  Mac OS X uses a framework and not just a library. The hiearchy is
	  simple: PCSC.framework PCSC.framework/PCSC ->
	  Versions/Current/PCS PCSC.framework/Versions
	  PCSC.framework/Versions/A PCSC.framework/Versions/A/PCSC
	  PCSC.framework/Versions/Current -> A
	* [r6198] src/spy/libpcscspy.c: Add Mac OS X support
	* [r6197] src/spy/libpcscspy.c: Use ULONG * instead of unsigned
	  long *
	  
	  See comment in revision 6195
	* [r6196] src/spy/libpcscspy.c: Reformat
	* [r6195] src/spy/libpcscspy.c: Use LONG/ULONG instead of
	  long/unsigned long
	  
	  The problem is that PCSC on Mac OS X do not use long but
	  uint32_t. So a (LONG * or LPDWORD *) parameter (like pcchReaders
	  in SCardListReaders) is not the same on Linux and Mac OS X for
	  64-bits CPUs.
	  
	  LONG is correctly defined on both Linux and Mac OS X so we use it
	  instead.
	* [r6194] src/spy/libpcscspy.c: load_lib(): check dlsym() return
	  correct values
	  
	  If the pointer returned by dlsym("SCardEstablishContext") is our
	  own SCardEstablishContext() function then we will finish in a
	  endless recursion. Something went wrong and we stop immediatly
	  instead of crashing when the call stack is full.
	* [r6193] src/spy/libpcscspy.c: Use an internal
	  pcsc_stringify_error() by default
	  
	  If the loading of the PCSC library fails all the functions are
	  set to use internal_error(). The only expection is now
	  pcsc_stringify_error() because the return value is not a LONG
	  error code but a C-string.
	  
	  This change fixes a crash when the application called printf() to
	  display the "string" returned by pcsc_stringify_error() if
	  SCardEstablishContext() failed in the spying library.

2012-01-18  Ludovic Rousseau

	* [r6185] ChangeLog, configure.in: Release 1.8.2
	* [r6184] src/spy/pcsc-spy, src/spy/pcsc-spy.pod: Add support of
	  --version to pcsc-spy
	* [r6183] src/spy/Makefile.am, src/spy/pcsc-spy.1,
	  src/spy/pcsc-spy.pod: Use POD format for pcsc-spy manpage
	  
	  Writting nroff manpage directly is not easy. The Perl POD (plain
	  old documentation) is much more friendly to read/write and
	  pod2man is your friend.
	* [r6182] src/spy/pcsc-spy: print_usage(): display command name
	* [r6181] src/spy/pcsc-spy: Document [-h|--help] argument

2012-01-15  Ludovic Rousseau

	* [r6178] src/spy/Makefile.am: Use dist_man_MANS to distribute the
	  manpage
	  
	  The pcsc-spy.1 manpage is now included in the .tar.bz2 archive
	* [r6177] src/spy/Makefile.am, src/spy/libpcscspy.c,
	  src/spy/pcsc-spy.c: Rename pcsc-spy.c to libpcscspy.c
	  
	  We have a pcsc-spy Python binary so pcsc-spy.c is not a correct
	  filename for a different library. Make is trying to generate
	  pcsc-spy from pcsc-spy.c and that fails.
	* [r6176] src/spy/Makefile.am: Remove pcsc-spy.py from EXTRA_DIST
	  
	  The command is now named pcsc-spy and is distributed by default
	* [r6175] src/spy/Makefile.am, src/spy/README.txt,
	  src/spy/pcsc-spy.1: Convert README.txt into pcsc-spy.1
	  
	  Since we now provide the pcsc-spy binary we must also provide a
	  manpage for the command.
	* [r6174] src/spy/pcsc-spy: Update copyright date
	* [r6173] src/spy/pcsc-spy: Change Shebang to /usr/bin/python
	  
	  Comply with Debian Python Policy 3.1 Programs using the default
	  python
	  http://www.debian.org/doc/packaging-manuals/python-policy/ch-programs.html
	* [r6172] src/spy/Makefile.am: Install pcsc-spy as a normal binary
	  
	  By default the command is installed in $(prefix)/bin/pcsc-spy
	* [r6171] src/spy/pcsc-spy, src/spy/pcsc-spy.py: Rename the
	  pcsc-spy command without the .py extension
	  
	  Comply to Debian Policy 10.4 Scripts
	  http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts

2012-01-01  Ludovic Rousseau

	* [r6156] src/PCSC/ifdhandler.h: Add Doxygen documentation for
	  TAG_IFD_SLOTNUM, TAG_IFD_STOP_POLLING_THREAD and
	  TAG_IFD_POLLING_THREAD_WITH_TIMEOUT

2011-12-15  Ludovic Rousseau

	* [r6139] src/spy/pcsc-spy.c: spy_line(): use return instead of
	  exit().
	  
	  A library should not use exit() but return an error code instead.
	  Reported by Debian lintian.

2011-12-05  Ludovic Rousseau

	* [r6132] src/tokenparser.l: bundleRelease(): fix a memory leak
	  
	  We must also free the key of the element.
	* [r6131] src/tokenparser.l: eval_value(): avoid a buffer read
	  overflow in & management
	  
	  We shall stop the loop when we find a \0 in the source, not in
	  the destination (4 characters later)
	* [r6130] src/hotplug_libudev.c: HPReadBundleValues(): remove extra
	  free()
	  
	  Do not free memory allocated for CFBundleName since we use this
	  value directly in driverTracker[listCount].CFBundleName =
	  CFBundleName; (line 180) instead of using a strdup(), because the
	  string is the same for many entries
	* [r6129] src/readerfactory.c: RFRemoveReader(): add 2 missing
	  pthread_mutex_destroy()
	  
	  Mutexes for powerState_lock and handlesList_lock were never
	  destroyed.
	  
	  It was not a real problem since from manpage
	  pthread_mutex_destroy(3): In the LinuxThreads implementation, no
	  resources are associated with mutex objects, thus
	  pthread_mutex_destroy actually does nothing except checking that
	  the mutex is unlocked.
	* [r6128] src/readerfactory.c: RFRemoveReader(): fix a bug with a
	  multi-slot reader
	  
	  The value sContext->mMutex must be reset to NULL only for the
	  last slot.

2011-11-26  Ludovic Rousseau

	* [r6120] etc/pcscd.service.in: StandardOutput=syslog is now the
	  default since at least systemd 37

2011-11-25  Ludovic Rousseau

	* [r6118] ChangeLog, configure.in: Release 1.8.1
	* [r6117] src/spy/Makefile.am: Also distribute pcsc-spy.py
	  install_spy.sh uninstall_spy.sh README.txt

2011-11-19  Ludovic Rousseau

	* [r6111] ChangeLog, configure.in: Release 1.8.0
	* [r6110] src/PCSC/reader.h: Add FEATURE_EXECUTE_PACE from PCSC v2
	  Part 10 Amendment 1 2011-06-03

2011-11-18  Ludovic Rousseau

	* [r6109] UnitaryTests/FEATURE_CCID_ESC_COMMAND2.py: Proprietary
	  commands for Gemalto readers This is implemented by the Gemalto
	  Pinpad v2 and C200 readers
	* [r6108] src/spy/pcsc-spy.py: Terminate the process with Ctrl-C
	  
	  Thanks to Martin Paljak for the patch
	* [r6107] src/spy/README.txt: Typo

2011-11-14  Ludovic Rousseau

	* [r6105] configure.in, src/pcscdaemon.c, src/winscard_clnt.c:
	  Remove pcscd autostart feature
	  
	  The auto start feature (launch pcscd from the library if not
	  already running) was a fragile code with some issues. This
	  service is far better implemented by systemd.
	  
	  Thanks to Kalev Lember for pushing the systemd patches.

2011-11-11  Ludovic Rousseau

	* [r6104] src/winscard_clnt.c: Do not try to autostart if the
	  system was booted using systemd
	  
	  The --disable-autostart configure option should now be useless on
	  systems using systemd.

2011-11-10  Ludovic Rousseau

	* [r6102] src/pcscdaemon.c: Revert revision 6045
	  
	  We must fork+exit in autoexit and foreground mode or the
	  application will not continue its execution and will wait for the
	  end of pcscd

2011-10-31  Ludovic Rousseau

	* [r6095] src/spy/pcsc-spy.py: Add support of -d|--diffable to
	  generate logs without too much variable parts so 2 logs can be
	  compared using diff(1)
	  
	  Variable parts are replaced by "????". They are: - execution time
	  - hCard - hContext
	* [r6094] src/spy/pcsc-spy.py: Fix cut-n-paste error
	* [r6093] src/spy/pcsc-spy.py: Add support of --nocolor command
	  line argument
	* [r6092] src/spy/install_spy.sh: Make the script idempotent
	  
	  The symbolic links are repared if needed. They were broken after
	  the sequence: $ spy/install_spy.sh $ make install
	* [r6091] src/spy/pcsc-spy.py: Exit in exception if the application
	  exited in the middle of SCardGetStatusChange() like it is the
	  case for pcsc_scan

2011-10-30  Ludovic Rousseau

	* [r6090] src/tokenparser.l: Convert the firt & into & in a
	  
	  Allow to use names like Giesecke & Devrient
	* [r6089] src/tokenparser.l: Add ';' in the list of valid caracters
	  
	  Allow to use "&" for "&" like in "Giesecke & Devrient"
	  See revision 6088

2011-10-25  Ludovic Rousseau

	* [r6083] UnitaryTests/ThreadSafe.py: Start loops at 0 instead of 1
	  to have the correct count
	* [r6082] src/spy/pcsc-spy.py: Give statistics per thread
	* [r6081] .gitignore: Update for spy/ directory
	* [r6080] src/spy/pcsc-spy.py: Use a 4 spaces indentation for each
	  thread
	* [r6079] src/spy/pcsc-spy.py: Display statistics sorted by
	  total_time

2011-10-24  Ludovic Rousseau

	* [r6078] src/spy/pcsc-spy.py: Parse FEATURE_VERIFY_PIN_DIRECT
	  structure
	* [r6077] src/spy/pcsc-spy.py: The byte buffer do not contain the
	  ASCII dump any more. So no need to remove it.
	* [r6076] src/spy/pcsc-spy.py: Parse FEATURE_IFD_PIN_PROPERTIES
	* [r6073] src/spy/pcsc-spy.py: Remove debug line
	* [r6072] src/pcscdaemon.c: main(): do not fail if pcscd.comm is
	  already present but pcscd.pid is not present.
	  
	  This is the case if pcscd has been configured in systemd but has
	  been stoped. When launched by hand (for a debug session for
	  example) the pcscd.comm file is still present but not used
	  anymore.
	  
	  The pcscd.comm file will be removed when pcscd manually started
	  will exit but the file will be recreated by "systemctl start
	  pcscd.service"
	* [r6071] src/pcscd.h.in: Update copyright date
	* [r6070] src/pcscd.h.in: propset svn:keywords "Id"
	* [r6069] src/pcscd.h.in: MAX_BUFFER_SIZE and
	  MAX_BUFFER_SIZE_EXTENDED are already defined in
	  PCSC/pcsclite.h.in

2011-10-22  Ludovic Rousseau

	* [r6063] src/PCSC/pcsclite.h.in: Update MAX_BUFFER_SIZE_EXTENDED
	  by adding 2 bytes for the status word
	* [r6062] etc/pcscd.service.in: Remove WantedBy=multi-user.target
	  
	  The purpose of using systemd is to start pcscd on demand. So no
	  need to always start it at boot.
	* [r6061] etc/pcscd.service.in: Start pcscd in autoexit mode to: -
	  free RAM and CPU ressources - enable the USB selective suspend
	  http://ludovicrousseau.blogspot.com/2011/04/libccid-and-usb-selective-suspend.html
	* [r6060] etc/pcscd.service.in: Remove now useless
	  After=syslog.target line for recent systemd

2011-10-21  Ludovic Rousseau

	* [r6059] src/spy/pcsc-spy.py: support -n | --nocolor command line
	  argument to remove colorization
	* [r6058] src/spy/pcsc-spy.py: Remove debug line
	* [r6057] src/simclist.c, src/simclist.h: Upgrade from simclist 1.5
	  to 1.6

2011-10-20  Ludovic Rousseau

	* [r6056] src/winscard_clnt.c: Remove DO_CHECK_SAME_PROCESS code
	  since we now use pthread_atfork() since revision 6055
	* [r6055] src/winscard_clnt.c: SCardEstablishContext(): Invalidate
	  all the handles in the son after a fork
	  
	  The Unitary Test UnitaryTests/SCard_fork.py now works
	  
	  We now use pthread_atfork() instead of the DO_CHECK_SAME_PROCESS
	  hack (disabled by default)
	* [r6054] src/spy/pcsc-spy.py: log_out_n_str(): add special case
	  for a null string length
	* [r6053] src/spy/README.txt: Documentation file
	* [r6052] src/spy/pcsc-spy.c, src/spy/pcsc-spy.py: Add support of
	  SCardCancel() and multi-threaded applications
	  
	  The pcsc-spy.py client is now a demultiplexer with one thread and
	  data queue per applicatin thread. Each log line contains the
	  application threadID.
	* [r6051] src/spy/install_spy.sh, src/spy/uninstall_spy.sh: Use set
	  -e to exit on first error
	* [r6050] src/spy/install_spy.sh: Fail if libpcsclite_nospy.so.1
	  already exists

2011-10-15  Ludovic Rousseau

	* [r6045] src/pcscdaemon.c: main(): do not fork+exit if we are in
	  autoexit mode and also in foreground mode
	* [r6044] src/pcscdaemon.c: signal_trap(): if we exit after a
	  SIGALRM then exit with EXIT_SUCCESS
	  
	  systemd should be happier with a process exiting normally
	* [r6043] src/winscard_msg_srv.c: InitializeSocket(): use a union
	  for sockaddr structsas suggested by systemd sample code at
	  http://0pointer.de/blog/projects/socket-activation.html
	* [r6042] src/spy/pcsc-spy.c: Use a global symbol for the library
	  handle
	  
	  Make coverity more happy leaked_storage: Variable "handle" going
	  out of scope leaks the storage it points to. noescape: Variable
	  "handle" is not freed or pointed-to in function "dlsym".

2011-10-11  Ludovic Rousseau

	* [r6029] src/pcscdaemon.c: main(): do not fork+exit if started in
	  --auto-exit mode by systemd
	  
	  systemd should restart the daemon again if needed
	* [r6028] src/debuglog.c: log_line(): flush stdout after each line
	  so that debug messages are immediately available for systemd
	* [r6027] src/pcscdaemon.c: main(): store the pid _after_ any fork
	  
	  Revision 6019 moved the AutoExit fork+exit later in the code. We
	  now must move the pcscd.pid file creation after the fork+exit.
	* [r6026] src/pcscdaemon.c: main(): log a message when pcscd is
	  started by systemd

2011-10-07  Ludovic Rousseau

	* [r6019] src/pcscdaemon.c: main(): move AutoExit fork+exit later
	  in the code
	  
	  We should be able to return with an error code if something went
	  wrong in the pcscd initialization so that the client get the
	  error code and do not wait for 5 seconds.
	  
	  See Red Hat Bug 653903 - elinks takes 10 seconds to start
	* [r6018] src/winscard_clnt.c: SCardEstablishContext(): check the
	  return value of pcscd
	  
	  In auto-start mode the client check the value returned by pcscd.
	  If pcscd failed to start then we just return SCARD_E_NO_SERVICE
	  without waiting for 5 seconds.
	  
	  See Red Hat Bug 653903 - elinks takes 10 seconds to start
	* [r6017] src/pcscdaemon.c: print_usage(): reformat output
	* [r6016] src/winscard_clnt.c: SCardEstablishContext(): If the
	  daemon is not present then just fail without waiting.
	  
	  See Red Hat Bug 653903 - elinks takes 10 seconds to start
	  https://bugzilla.redhat.com/show_bug.cgi?id=653903
	* [r6015] src/spy/pcsc-spy.py: log_buffer(): display NULL if the
	  buffer is a NULL pointer
	  
	  This is used to differentiate a NULL buffer from an empty buffer.
	* [r6014] src/spy/pcsc-spy.py: log_buffer(): use upper case for
	  hexadecimal dump
	* [r6013] src/spy/pcsc-spy.py: log_buffer(): use '.' also for
	  values >= 127
	* [r6012] src/spy/pcsc-spy.py: log_buffer(): check for an empty
	  buffer
	* [r6011] src/spy/pcsc-spy.py: If the field to log starts with a
	  "0x" we also log the decimal value
	* [r6010] src/spy/pcsc-spy.c: spy_buffer(): use spy_line_direct()
	  to log a line without formatting and size limit
	* [r6009] src/spy/pcsc-spy.c: spy_line(): Emergency exit if the
	  buffer is too small
	  
	  The line is limited to 256 characters. Dumping a buffer of more
	  than 256/3 = 85 bytes wil overflow the line buffer.
	* [r6008] src/spy/install_spy.sh, src/spy/pcsc-spy.c,
	  src/spy/uninstall_spy.sh: Allow to replace the real library by
	  the spy one
	  
	  This is isefull for interpreted languages like Python and Perl
	  with the PC/SC wrapper.
	  
	  The scripts install_spy.sh and uninstall_spy.sh do the files
	  changes in /usr/lib
	* [r6007] src/spy/pcsc-spy.py: Remove trailing space
	* [r6006] src/spy/pcsc-spy.py: Use a text instead of numerical
	  constant to specify the direction
	* [r6005] src/spy/pcsc-spy.c, src/spy/pcsc-spy.py: Dump bytes
	  buffer in a formatted ASCII + Hex dump

2011-10-05  Ludovic Rousseau

	* [r6003] doc/example/pcsc_demo.c: Move from GNU GPL v2+ to v3+
	* [r6002] UnitaryTests/MCT_ReaderDirect.py,
	  UnitaryTests/SCardBeginTransaction_Disconnect.py,
	  UnitaryTests/SCardBeginTransaction_ExclusiceMode.py,
	  UnitaryTests/SCardCancel.py, UnitaryTests/SCardCancel2.py,
	  UnitaryTests/SCardConnect_DIRECT.py,
	  UnitaryTests/SCardConnect_DIRECT2.py,
	  UnitaryTests/SCardGetAttrib.py,
	  UnitaryTests/SCardGetStatusChange.py,
	  UnitaryTests/SCardGetStatusChange2.py,
	  UnitaryTests/SCardReconnect.py, UnitaryTests/SCardStatus.py,
	  UnitaryTests/SCard_fork.py, UnitaryTests/ThreadSafe.py,
	  UnitaryTests/ThreadSafeConnect.py,
	  UnitaryTests/control_get_firmware.py,
	  UnitaryTests/control_switch_interface.py,
	  UnitaryTests/getAttrib.py, UnitaryTests/reset_card.py,
	  UnitaryTests/stress_apdu.py, UnitaryTests/stress_get_firmware.py,
	  UnitaryTests/transmit_loop.py: Move from GPL v2+ to GPL v3+
	* [r6001] UnitaryTests/FEATURE_CCID_ESC_COMMAND.py: Unitary test
	  for FEATURE_CCID_ESC_COMMAND

2011-10-04  Ludovic Rousseau

	* [r5999] src/spy/Makefile.am: The winscard.h is in the srcdir not
	  builddir
	  
	  Fix compiler warning (when using make distcheck):
	  ../../../src/spy/pcsc-spy.c:32:22: fatal error: winscard.h: No
	  such file or directory
	* [r5997] src/spy/pcsc-spy.py: Use the command line argument (if
	  any) as the log file
	  
	  If a command argument is passed we use it instead of the default
	  ~/pcsc-spy FIFO file. It is then possible to record an execution
	  log and use pcsc-spy.py multiple times on the same log.
	  
	  To create the log file just do: $ mkfifo ~/pcsc-spy $ cat
	  ~/pcsc-spy > logfile and run your PC/SC application
	* [r5996] src/spy/pcsc-spy.py: Make pep8 happy
	* [r5995] src/spy/pcsc-spy.py: Parse FEATURE_GET_TLV_PROPERTIES
	  results
	* [r5994] src/spy/pcsc-spy.py: Parse tge
	  CM_IOCTL_GET_FEATURE_REQUEST results
	  
	  The parsing will also learn the values associate to tags for
	  future calls.
	* [r5993] src/hotplug_linux.c: Use %zd instead of %ld for a size_t
	  integer
	  
	  Fix a warning when compiling on a 32-bits system:
	  hotplug_linux.c: In function 'HPReadBundleValues':
	  hotplug_linux.c:188: warning: format '%ld' expects type 'long
	  int', but argument 6 has type 'unsigned int'

2011-10-02  Ludovic Rousseau

	* [r5992] src/readerfactory.c: Use %zd instead of %ld for a size_t
	  integer
	  
	  Fix 2 compiler warnings: readerfactory.c: In function
	  `RFAddReader': readerfactory.c:124:3: warning: format `%ld'
	  expects argument of type `long int', but argument 6 has type
	  `size_t' [-Wformat] readerfactory.c:124:3: warning: format `%ld'
	  expects argument of type `long int', but argument 7 has type
	  `unsigned int' [-Wformat]

2011-09-29  Ludovic Rousseau

	* [r5988] src/spy/pcsc-spy.py: Log SCardControl() dwControlCode in
	  a human form
	* [r5987] src/spy/pcsc-spy.py: Remove duplicate 0x00090303 key
	* [r5986] src/spy/pcsc-spy.py: Fix some pylint warnings
	* [r5985] src/spy/pcsc-spy.c, src/spy/pcsc-spy.py: Convert return
	  value from hexa to text
	  
	  SCARD_E_NOT_TRANSACTED is more human friendly than 0x80100016
	* [r5984] src/spy/pcsc-spy.py: log_in2() & log_out2(): return the
	  data line read by the method
	  
	  This will allow to do some data processing on the debug data in
	  the caller method.

2011-09-27  Ludovic Rousseau

	* [r5983] src/spy/pcsc-spy.c: Fix compiler warning
	  
	  pcsc-spy.c: In function 'SCardGetAttrib': pcsc-spy.c:635:6:
	  warning: pointer targets in assignment differ in signedness
	  [-Wpointer-sign]
	* [r5982] src/spy/pcsc-spy.c: Display the ASCII equivalent of a
	  "binary" buffer
	* [r5981] src/spy/pcsc-spy.c: SCardGetAttrib(): manage
	  SCARD_AUTOALLOCATE case
	* [r5980] src/spy/pcsc-spy.py: Display dwCurrentState &
	  dwEventState parameter in human form
	* [r5979] src/spy/pcsc-spy.py: log_out_dwActiveProtocol():
	  correctly display UNKNOWN protocol
	* [r5978] src/spy/pcsc-spy.py: Display dwActiveProtocol parameter
	  in human form
	* [r5977] src/spy/pcsc-spy.py: Display dwPreferredProtocols
	  parameter in human form
	* [r5976] src/spy/pcsc-spy.py: Fix 2 pep8 issues
	* [r5975] src/spy/pcsc-spy.py: Display dwShareMode parameter in
	  human form
	* [r5974] src/spy/pcsc-spy.py: Display dwAttrId parameter in human
	  form
	* [r5973] src/spy/pcsc-spy.py: Display dwDisposition parameter in
	  human form
	* [r5972] src/spy/pcsc-spy.c, src/spy/pcsc-spy.py: Add support of
	  SCardBeginTransaction() and SCardEndTransaction()
	* [r5971] src/spy/pcsc-spy.py: Add a missing space for a correct
	  formatting
	* [r5970] src/spy/pcsc-spy.c: spy_quit(): rv is a LONG not int
	  
	  The problem occurs on 64-bits systems with sign extension from
	  0x80100016 to 0xFFFFFFFF80100016
	* [r5969] src/spy/pcsc-spy.c: Add support of pcsc_stringify_error()
	* [r5968] src/spy/pcsc-spy.c: load_lib(): handle dlsym() errors
	  
	  log an error and return SCARD_F_INTERNAL_ERROR if dlopen() or
	  dlsym() fails.
	* [r5967] src/spy/pcsc-spy.c: load_lib(): do not call dlclose()
	  
	  Stupuid bug. We still need to access the symbols after the
	  library is loaded. dlclose() should be closed only when the
	  library is not used anymore (i.e. we don't know when).

2011-09-24  Ludovic Rousseau

	* [r5965] doc/doxygen.conf.in: Update for Doxygen 1.7.4
	* [r5964] src/error.c, src/winscard_clnt.c: Doxygen: fixes and
	  English improvement
	* [r5963] src/winscard_clnt.c: Doxygen: remove a note about
	  SCardControl() API change
	  
	  Between pcsc-lite 1.2.0 (Oct 2003) and 1.2.9-beta1 (May 2004) the
	  API changed and the new parameter dwControlCode was added.
	* [r5962] src/PCSC/winscard.h, src/atrhandler.c, src/atrhandler.h,
	  src/winscard.c, src/winscard_clnt.c: fix typo: smartcard -> smart
	  card
	* [r5961] src/error.c: Doxygen: fix a bug in the doc

2011-09-13  Ludovic Rousseau

	* [r5955] configure.in: Generate src/spy/Makefile
	* [r5954] src/Makefile.am, src/pcsc-spy.c, src/pcsc-spy.py,
	  src/spy, src/spy/Makefile.am, src/spy/pcsc-spy.c,
	  src/spy/pcsc-spy.py: Move spy tools into the spy/ directory
	* [r5953] src/pcsc-spy.py: Remove debug line
	* [r5951] src/pcsc-spy.c, src/pcsc-spy.py: Add Timing information

2011-09-09  Ludovic Rousseau

	* [r5949] src/pcsc-spy.c: Fix compiler warning
	  
	  pcsc-spy.c:243:28: warning: comparison between signed and
	  unsigned integer expressions [-Wsign-compare]
	* [r5948] src/pcsc-spy.c, src/pcsc-spy.py: Fix issues caused by
	  changes of spy_buffer() in the previous commit
	* [r5947] src/pcsc-spy.c, src/pcsc-spy.py: Log
	  SCardGetStatusChange() reader array
	* [r5946] src/pcsc-spy.py: Use a PCSCspy class
	* [r5945] src/pcsc-spy.py: Make pylint happier
	* [r5944] src/pcsc-spy.py: Make pep8 happy

2011-09-06  Ludovic Rousseau

	* [r5943] src/pcsc-spy.c, src/pcsc-spy.py: Add support of multi
	  entries text output
	  
	  This is used for SCardListReaders() and SCardListReaderGroups()
	* [r5942] src/pcsc-spy.c: load_lib(): Do not use an absolut
	  pathname
	  
	  Use "libpcsclite.so.1" instead of "/usr/lib/libpcsclite.so.1" to
	  let the dynamic linker ld.so search for the lib.
	* [r5941] src/pcsc-spy.c, src/pcsc-spy.py: Set $Id$ keyword

2011-09-04  Ludovic Rousseau

	* [r5940] configure.in: check for mq_getattr() in -lrt
	  
	  In old versions of libudev the -lrt link flags is not added. This
	  library is required for mq_getattr() used by sd-daemon.c
	  
	  On Ubuntu 10.04: $ pkg-config --libs libudev -ludev $ dpkg -l
	  libudev-dev ii libudev-dev 151-12.3 udev library (development
	  files)
	  
	  On Debian wheery: $ pkg-config --libs libudev -ludev -lrt $ dpkg
	  -l libudev-dev ii libudev-dev 172-1 libudev development files
	* [r5939] UnitaryTests/getAttrib.py: Add
	  SCARD_ATTR_VENDOR_IFD_VERSION and SCARD_ATTR_VENDOR_IFD_SERIAL_NO

2011-09-03  Ludovic Rousseau

	* [r5938] src/hotplug_libusb.c, src/pcscdaemon.c,
	  src/winscard_clnt.c: Remove extra spaces characters
	* [r5937] src/pcscdaemon.c: print_usage(): fix typo in argument
	  documentation
	  
	  The correct option is --auto-exit
	* [r5936] .gitignore: Add new files to .gitignore
	* [r5935] etc/pcscd.service.in: Use long arguments to pcscd command
	  
	  --foreground and --hotplug are easier to understand than -f and
	  -H
	* [r5934] configure.in: Add --with-systemdsystemunitdir=DIR comment
	* [r5933] Makefile.am, configure.in, etc, etc/Makefile.am,
	  etc/pcscd.service.in, etc/pcscd.socket.in: Install systemd
	  service files
	  
	  Thanks to Kalev Lember for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2011-q2/0139.html
	* [r5932] src/winscard_clnt.c: Fix compiler warning when autostart
	  is not used
	  
	  winscard_clnt.c: In function `SCardEstablishContext':
	  winscard_clnt.c:455:1: warning: label `again' defined but not
	  used [-Wunused-label]
	* [r5931] configure.in, src/winscard_clnt.c: Add
	  --disable-autostart option
	  
	  This option disables pcscd autostarting code in the libpcsclite
	  library.
	  
	  With systemd socket activation in place, pcscd can be started
	  automatically by systemd when a request arrives on the IPC
	  socket. That makes starting the service as a fork from user
	  library unnecessary.
	  
	  Thanks to Kalev Lember for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2011-q2/0137.html
	* [r5930] src/Makefile.am: Use curl -O instead of a redirection
	  
	  This avoids a name duplication (less error-prone)
	* [r5929] src/Makefile.am, src/pcscdaemon.c, src/sd-daemon.c,
	  src/sd-daemon.h, src/winscard_msg.h, src/winscard_msg_srv.c:
	  Support systemd socket activation
	  
	  Add systemd socket-based activation support to pcscd as an
	  alternative to the existing autostart code which used forking
	  from the user space library. Systemd socket activation makes it
	  possible to start pcscd on demand by systemd when a request is
	  sent on the IPC socket.
	  
	  The implementation uses the $LISTEN_FDS/$LISTEN_PID env var
	  parsing code from systemd's sd-daemon.[ch] copy library.
	  
	  Thanks to Kalev Lember for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2011-q2/0140.html
	* [r5928] UnitaryTests/getAttrib.py: Unitary test for
	  SCardGetAttrib()

2011-09-02  Ludovic Rousseau

	* [r5927] .gitignore: Create .gitignore files

2011-08-28  Ludovic Rousseau

	* [r5919] src/debuglog.c: DebugLogSetLogType(): xterm-256color is
	  also a color terminal
	  
	  xterm-256color is used by the Terminal application on Mac OS X
	  (Lion)

2011-08-25  Ludovic Rousseau

	* [r5910] src/Makefile.am, src/pcsc-spy.c, src/pcsc-spy.py: PC/SC
	  function spy layer

2011-08-21  Ludovic Rousseau

	* [r5901] src/debuglog.c: log_xxd_always(): Use a variable-length
	  array
	  
	  The debug message buffer is no more with a fixed size (around 600
	  bytes of buffer to log) but uses a variable-length array.
	  
	  It is now possible to log extended APDU of 64kB.
	  
	  The variable-length array feature is available in GCC in C90 mode
	  and is mandatory in C99 standard.
	* [r5900] src/readerfactory.c, src/readerfactory.h:
	  RFSetReaderName(): remove useless parameter slot
	  
	  RFSetReaderName() is only called in one place with slot set to 0.
	  This parameter is then useless and can be removed.
	* [r5899] src/debuglog.c: Use sizeof instead of a hard coded value
	* [r5898] src/debug.c: Remove log_xxd() implementation
	  
	  debug.c is use to log from the client side (libpcsclite).
	  log_xxd() is not used in the client library so is just dead code.
	* [r5896] src/debuglog.c: log_line(): correctly calculate delta
	  time when no color is used
	  
	  The update of last_time was only done in case of colorization
	  (LogDoColor). So on unsupported consoles the time was wrong.

2011-08-09  Ludovic Rousseau

	* [r5887] src/hotplug_libudev.c: HPReadBundleValues(): use strtol()
	  instead of the unsafe sscanf()
	* [r5886] src/hotplug_linux.c: HPEstablishUSBNotifications(): use
	  atoi() instead of the unsafe sscanf()
	* [r5885] src/testpcsc.c: Use atoi() instead of the unsafe sscanf()

2011-08-08  Ludovic Rousseau

	* [r5882] UnitaryTests/SCardGetStatusChange2.py: Check the return
	  value of SCardGetStatusChange() for unknown readers
	* [r5881] src/winscard_clnt.c: SCardGetStatusChange(): check all
	  the readers are already known and return SCARD_E_UNKNOWN_READER
	  if a reader name is not present.
	  
	  Windows XP has this behavior.

2011-07-19  Ludovic Rousseau

	* [r5875] src/hotplug_linux.c: Use safer snprintf() instead of
	  sprintf()
	  
	  coverity: Event secure_coding: [VERY RISKY]. Using "sprintf" can
	  cause a buffer overflow when done incorrectly. Because sprintf()
	  assumes an arbitrarily long string, callers must be careful not
	  to overflow the actual space of the destination. Use snprintf()
	  instead, or correct precision specifiers.
	* [r5874] src/hotplug_linux.c: Fix compiler warning
	  
	  hotplug_linux.c: In function 'HPReadBundleValues':
	  hotplug_linux.c:188: warning: format '%d' expects type 'int', but
	  argument 6 has type 'long unsigned int'

2011-07-18  Ludovic Rousseau

	* [r5873] UnitaryTests/SCardGetStatusChange.py: Unitary test for
	  SCardGetStatusChange()

2011-07-09  Ludovic Rousseau

	* [r5869] src/PCSC/wintypes.h: Define PUCHAR using UCHAR instead of
	  "unsigned char". Same for PDWORD and PULONG.
	  
	  We now have less lines to change to redefine types.
	* [r5868] src/hotplug_macosx.c: Fix compiler warnings
	  
	  hotplug_macosx.c: In function 'HPDriversGetFromDirectory':
	  hotplug_macosx.c:245: warning: format '%d' expects type 'int',
	  but argument 7 has type 'CFIndex' hotplug_macosx.c:253: warning:
	  format '%d' expects type 'int', but argument 7 has type 'CFIndex'
	* [r5867] src/winscard_msg.c, src/winscard_msg.h:
	  MessageReceiveTimeout(): change timeOut parameter type to fix a
	  compiler warning
	  
	  winscard_msg.c: In function `MessageReceiveTimeout':
	  winscard_msg.c:186:13: warning: comparison between signed and
	  unsigned integer expressions [-Wsign-compare]
	* [r5866] src/tokenparser.l: Silence compiler warnings
	  
	  tokenparser.l: In function `eval_key': tokenparser.l:62:6:
	  warning: variable `r' set but not used
	  [-Wunused-but-set-variable]
	  
	  tokenparser.l: In function `eval_value': tokenparser.l:92:6:
	  warning: variable `r' set but not used
	  [-Wunused-but-set-variable]
	  
	  tokenparser.l: In function `bundleParse': tokenparser.l:162:6:
	  warning: variable `r' set but not used
	  [-Wunused-but-set-variable]
	* [r5865] src/tokenparser.l: bundleParse(): fix a compilation error
	  if NDEBUG is not definef (i.e. DEBUG is ON)
	* [r5864] src/winscard_svc.c: Fix compiler warnings
	  
	  winscard_svc.c: In function `contextsListhContext_seeker':
	  winscard_svc.c:86:3: warning: format `%X' expects argument of
	  type `unsigned int', but argument 6 has type `const void *'
	  [-Wformat] winscard_svc.c:86:3: warning: format `%X' expects
	  argument of type `unsigned int', but argument 7 has type `const
	  void *' [-Wformat]
	  
	  winscard_svc.c: In function `ContextThread':
	  winscard_svc.c:296:2: warning: format `%X' expects argument of
	  type `unsigned int', but argument 7 has type `struct SCONTEXT *'
	  [-Wformat]
	  
	  winscard_svc.c: In function `MSGAddHandle': winscard_svc.c:836:4:
	  warning: format `%X' expects argument of type `unsigned int', but
	  argument 6 has type `struct SCONTEXT *' [-Wformat]
	  
	  winscard_svc.c: In function `MSGCleanupClient':
	  winscard_svc.c:916:2: warning: format `%X' expects argument of
	  type `unsigned int', but argument 7 has type `struct SCONTEXT *'
	  [-Wformat] winscard_svc.c:924:2: warning: format `%X' expects
	  argument of type `unsigned int', but argument 6 has type `struct
	  SCONTEXT *' [-Wformat]
	* [r5863] src/winscard.c: Fix compiler warnings
	  
	  winscard.c: In function `SCardEstablishContext':
	  winscard.c:193:2: warning: format `%X' expects argument of type
	  `unsigned int', but argument 6 has type `SCARDCONTEXT' [-Wformat]
	  
	  winscard.c: In function `SCardReleaseContext': winscard.c:204:2:
	  warning: format `%X' expects argument of type `unsigned int', but
	  argument 6 has type `SCARDCONTEXT' [-Wformat]
	  
	  winscard.c: In function `SCardConnect': winscard.c:234:2:
	  warning: format `%d' expects argument of type `int', but argument
	  7 has type `DWORD' [-Wformat] winscard.c:315:5: warning: format
	  `%d' expects argument of type `int', but argument 6 has type
	  `LONG' [-Wformat] winscard.c:315:5: warning: format `%X' expects
	  argument of type `unsigned int', but argument 7 has type `LONG'
	  [-Wformat] winscard.c:410:5: warning: format `%d' expects
	  argument of type `int', but argument 6 has type `DWORD'
	  [-Wformat] winscard.c:422:2: warning: format `%x' expects
	  argument of type `unsigned int', but argument 6 has type
	  `SCARDHANDLE' [-Wformat]
	  
	  winscard.c: In function `SCardReconnect': winscard.c:693:5:
	  warning: format `%d' expects argument of type `int', but argument
	  6 has type `DWORD' [-Wformat]
	  
	  winscard.c: In function `SCardDisconnect': winscard.c:821:2:
	  warning: format `%d' expects argument of type `int', but argument
	  6 has type `DWORD' [-Wformat]
	  
	  winscard.c: In function `SCardBeginTransaction':
	  winscard.c:1051:2: warning: format `%X' expects argument of type
	  `unsigned int', but argument 6 has type `LONG' [-Wformat]
	  
	  winscard.c: In function `SCardEndTransaction': winscard.c:1188:2:
	  warning: format `%X' expects argument of type `unsigned int', but
	  argument 6 has type `LONG' [-Wformat]
	  
	  winscard.c: In function `SCardTransmit': winscard.c:1539:2:
	  warning: format `%d' expects argument of type `int', but argument
	  6 has type `DWORD' [-Wformat]
	* [r5862] src/readerfactory.c: Fix compiler warnings
	  
	  readerfactory.c: In function `RFInitializeReader':
	  readerfactory.c:941:3: warning: format `%X' expects argument of
	  type `unsigned int', but argument 6 has type `LONG' [-Wformat]
	  readerfactory.c:950:3: warning: format `%X' expects argument of
	  type `unsigned int', but argument 6 has type `LONG' [-Wformat]
	  readerfactory.c: In function `RFRemoveReaderHandle':
	  readerfactory.c:1135:3: warning: format `%X' expects argument of
	  type `unsigned int', but argument 6 has type `SCARDHANDLE'
	  [-Wformat] readerfactory.c: In function
	  `RFCheckReaderEventState': readerfactory.c:1198:3: warning:
	  format `%X' expects argument of type `unsigned int', but argument
	  6 has type `SCARDHANDLE' [-Wformat] readerfactory.c: In function
	  `RFCleanupReaders': readerfactory.c:1274:5: warning: format `%X'
	  expects argument of type `unsigned int', but argument 6 has type
	  `LONG' [-Wformat]
	* [r5861] src/prothandler.c: Fix compiler warning
	  
	  prothandler.c: In function `PHSetProtocol': prothandler.c:102:5:
	  warning: format `%d' expects argument of type `int', but argument
	  6 has type `LONG' [-Wformat]
	* [r5860] src/ifdwrapper.c: Fix compiler warning
	  
	  ifdwrapper.c: In function `IFDControl': ifdwrapper.c:455:3:
	  warning: format `%LX' expects argument of type `long long
	  unsigned int', but argument 6 has type `DWORD' [-Wformat]
	* [r5859] src/eventhandler.c: Fix compiler warning
	  
	  eventhandler.c: In function `EHStatusHandlerThread':
	  eventhandler.c:272:4: warning: format `%d' expects argument of
	  type `int', but argument 6 has type `LONG' [-Wformat]
	  eventhandler.c:272:4: warning: format `%X' expects argument of
	  type `unsigned int', but argument 7 has type `LONG' [-Wformat]
	* [r5858] src/winscard_clnt.c: Fix compiler warnings
	  
	  winscard_clnt.c: In function 'CHANNEL_MAP_seeker':
	  winscard_clnt.c:282: warning: format '%X' expects type 'unsigned
	  int', but argument 6 has type 'const void *' winscard_clnt.c:282:
	  warning: format '%X' expects type 'unsigned int', but argument 7
	  has type 'const void *' winscard_clnt.c: In function
	  'SCONTEXTMAP_seeker': winscard_clnt.c:317: warning: format '%X'
	  expects type 'unsigned int', but argument 6 has type 'const void
	  *' winscard_clnt.c:317: warning: format '%X' expects type
	  'unsigned int', but argument 7 has type 'const void *'
	  winscard_clnt.c: In function 'SCardAddContext':
	  winscard_clnt.c:3385: warning: format '%X' expects type 'unsigned
	  int', but argument 6 has type 'struct SCONTEXTMAP *'
	  winscard_clnt.c:3393: warning: format '%X' expects type 'unsigned
	  int', but argument 6 has type 'struct SCONTEXTMAP *'
	* [r5857] src/readerfactory.c: Fix compiler warnings
	  
	  readerfactory.c: In function 'RDR_CLIHANDLES_seeker':
	  readerfactory.c:68: warning: format '%X' expects type 'unsigned
	  int', but argument 6 has type 'const void *' readerfactory.c:68:
	  warning: format '%X' expects type 'unsigned int', but argument 7
	  has type 'const void *'
	* [r5856] src/readerfactory.c: Fix compiler warnings
	  
	  readerfactory.c: In function 'RFAddReader': readerfactory.c:124:
	  warning: format '%d' expects type 'int', but argument 6 has type
	  'size_t' readerfactory.c:124: warning: format '%d' expects type
	  'int', but argument 7 has type 'long unsigned int'
	* [r5855] src/readerfactory.c: Fix a bug detected thanks to
	  revision 5854 and a compiler warning
	  
	  readerfactory.c: In function 'RFSetReaderEventState':
	  readerfactory.c:1167: warning: format '%s' expects type 'char *',
	  but argument 6 has type 'int'
	* [r5854] src/PCSC/debuglog.h: log_msg(): use
	  __attribute__((format(printf, ..))) to check the parameters
	  passed corresponds to the format string

2011-07-08  Ludovic Rousseau

	* [r5853] src/hotplug_libusb.c: HPRegisterForHotplugEvents(): add a
	  log call for info
	* [r5852] src/hotplug_libusb.c: HPRescanUsbBus(): check
	  libusb_init() return value
	  
	  Thanks to Dwi Sasongko Supriyadi for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2011-q3/0014.html

2011-07-06  Ludovic Rousseau

	* [r5850] src/debug.c: log_xxd(): use safer snprintf() instead of
	  sprintf()
	  
	  Event secure_coding: [VERY RISKY]. Using "sprintf" can cause a
	  buffer overflow when done incorrectly. Because sprintf() assumes
	  an arbitrarily long string, callers must be careful not to
	  overflow the actual space of the destination. Use snprintf()
	  instead, or correct precision specifiers.
	* [r5849] src/debuglog.c: log_xxd_always(): use safer snprintf()
	  instead of sprintf()
	  
	  coverity: Event secure_coding: [VERY RISKY]. Using "sprintf" can
	  cause a buffer overflow when done incorrectly. Because sprintf()
	  assumes an arbitrarily long string, callers must be careful not
	  to overflow the actual space of the destination. Use snprintf()
	  instead, or correct precision specifiers.
	* [r5848] src/readerfactory.c: RFAddReader(): use safer snprintf()
	  instead of sprintf()
	  
	  coverity: Event secure_coding: [VERY RISKY]. Using "sprintf" can
	  cause a buffer overflow when done incorrectly. Because sprintf()
	  assumes an arbitrarily long string, callers must be careful not
	  to overflow the actual space of the destination. Use snprintf()
	  instead, or correct precision specifiers.
	* [r5847] src/hotplug_libudev.c: HPReadBundleValues(): fix a memory
	  leak
	  
	  coverity: Event leaked_storage: Variable "hpDir" going out of
	  scope leaks the storage it points to.
	* [r5846] src/hotplug_libudev.c: HPRescanUsbBus(): Move the
	  lock/unlock _around_ the loop so that the values are constant
	  between check and use.
	  
	  coverity: Event use: Using an unreliable value of
	  "readerTracker[i].fullName" inside the second locked section. If
	  the data that "readerTracker[i].fullName" depends on was changed
	  by another thread, this use might be incorrect.
	* [r5845] src/winscard_clnt.c: SCardConnect(): use safer strlcpy()
	  instead of strncpy()
	  
	  coverity: Event buffer_size_warning: Calling strncpy with a
	  maximum size argument of 100 bytes on destination array
	  "scConnectStruct.szReader" of size 100 bytes might leave the
	  destination string unterminated.
	* [r5844] src/winscard_clnt.c: SCardConnect(): use sizeof instead
	  of a hardcoded value
	* [r5843] src/winscard.c: SCardStatus(): remove dead code
	  
	  coverity: Event dead_error_condition: On this path, the condition
	  "rv != 0L" cannot be true.
	* [r5842] src/winscard_clnt.c: Reformat 4 spaces with 1 tab
	* [r5841] src/hotplug_libudev.c: Fix a memory leak
	  
	  coverity: Event leaked_storage: Variable "CFBundleName" going out
	  of scope leaks the storage it points to.
	* [r5840] src/hotplug_libudev.c, src/hotplug_libusb.c: Fix a memory
	  leak
	  
	  coverity: Event leaked_storage: Variable "hpDir" going out of
	  scope leaks the storage it points to.

2011-07-05  Ludovic Rousseau

	* [r5831] src/testpcsc.c: Fix compiler warnings
	  
	  testpcsc.c: In function 'main': testpcsc.c:222: warning:
	  assignment discards qualifiers from pointer target type
	  testpcsc.c:225: warning: assignment discards qualifiers from
	  pointer target type testpcsc.c:228: warning: assignment discards
	  qualifiers from pointer target type
	* [r5830] src/testpcsc.c: pioRecvPci really need to be allocated by
	  the caller since it is filled by SCardTransmit() as a return
	  parameter.
	* [r5826] src/readerfactory.c: Fix a REVERSE_INULL coverity error
	  
	  sContext->pFeeds is checked for NULL _after_ being dereferenced
	  in RFUnloadReader() called by RFUnInitializeReader(). We now
	  check before dereferencing.
	* [r5825] src/testpcsc.c: Initialize pioRecvPci
	  
	  Make coverity scan happy
	* [r5824] src/testpcsc.c: Use pointers for pioRecvPci and
	  pioSendPci to better match with the variable names

2011-07-04  Ludovic Rousseau

	* [r5822] src/pcscdaemon.c: print_usage(): update arguments
	  documentation
	* [r5821] src/pcscdaemon.c: main(): do not use atexit() since our
	  at_exit() function will be called upon signal receipt from our
	  signal_trap() function.
	  
	  The problem was that at_exit() was called a second time on the
	  process exit and gerenarted error messages: 00000006
	  pcscdaemon.c:634:at_exit() cleaning /var/run/pcscd 00001328
	  pcscdaemon.c:634:at_exit() cleaning /var/run/pcscd 00000033
	  pcscdaemon.c:658:clean_temp_files() Cannot remove
	  /var/run/pcscd/pcscd.comm: No such file or directory 00000013
	  pcscdaemon.c:663:clean_temp_files() Cannot remove
	  /var/run/pcscd/pcscd.pid: No such file or directory

2011-07-01  Ludovic Rousseau

	* [r5818] UnitaryTests/SCardReconnect.py: Improve comments

2011-06-29  Ludovic Rousseau

	* [r5814] configure.in: Enable silent build by default

2011-06-28  Ludovic Rousseau

	* [r5813] src/prothandler.c, src/prothandler.h: Remove now unused
	  PHGetDefaultProtocol() and PHGetAvailableProtocols()
	* [r5812] src/winscard.c: SCardConnect(), SCardReconnect(): use
	  ATRDecodeAtr() directly instead of PHGetDefaultProtocol() and
	  PHGetAvailableProtocols()
	* [r5811] src/atrhandler.c, src/atrhandler.h, src/prothandler.c:
	  ATRDecodeAtr(): use only two out parameters availableProtocols
	  and currentProtocol instead of struct SMARTCARD_EXTENSION
	  
	  Remove some unused code from ATRDecodeAtr().

2011-06-23  Ludovic Rousseau

	* [r5809] ChangeLog, configure.in: release 1.7.4
	* [r5808] src/atrhandler.c: ATRDecodeAtr(): revert revision 5804
	  
	  T=1 cards were no more recognized. Brown paper bag bug.

2011-06-22  Ludovic Rousseau

	* [r5806] ChangeLog, configure.in: release 1.7.3
	* [r5805] src/ifdwrapper.c: IFDSetPTS() and IFDPowerICC(): remove
	  useless variable ucValue[]
	  
	  ifdwrapper.c: In function `IFDSetPTS': ifdwrapper.c:50:8:
	  warning: variable `ucValue' set but not used
	  [-Wunused-but-set-variable] ifdwrapper.c: In function
	  `IFDPowerICC': ifdwrapper.c:252:8: warning: variable `ucValue'
	  set but not used [-Wunused-but-set-variable]
	* [r5804] src/atrhandler.c: ATRDecodeAtr(): only use TBi and TCi in
	  ATR_DEBUG mode
	  
	  atrhandler.c: In function `ATRDecodeAtr': atrhandler.c:106:19:
	  warning: variable `TCi' set but not used
	  [-Wunused-but-set-variable] atrhandler.c:106:14: warning:
	  variable `TBi' set but not used [-Wunused-but-set-variable]
	* [r5803] src/atrhandler.c: Remove unused variable
	  
	  atrhandler.c: In function `ATRDecodeAtr': atrhandler.c:48:11:
	  warning: variable `TCK' set but not used
	  [-Wunused-but-set-variable]
	* [r5802] doc/example/pcsc_demo.c: SCARD_PCI_T0 and SCARD_PCI_T1
	  and now const values
	  
	  Fix compiler warnings: pcsc_demo.c: In function `main':
	  pcsc_demo.c:161:24: warning: assignment discards `const'
	  qualifier from pointer target type [enabled by default]
	  pcsc_demo.c:164:24: warning: assignment discards `const'
	  qualifier from pointer target type [enabled by default]

2011-06-21  Ludovic Rousseau

	* [r5801] src/PCSC/reader.h: Remove the deprecated
	  FEATURE_MCT_READERDIRECT

2011-06-16  Ludovic Rousseau

	* [r5797] src/winscard_clnt.c: SCardGetStatusChange(): add a cast
	  to fix a compiler warning
	  
	  winscard_clnt.c:1890: warning: comparison between signed and
	  unsigned integer expressions
	* [r5796] src/winscard_msg.c, src/winscard_msg.h:
	  MessageReceiveTimeout(): change timeOut type from int32_t to
	  unsigned long to avoid overflows with a timeout of 1000000000.
	  
	  The bug was that MessageReceiveTimeout() timeouts immediatly when
	  it should not. So a _lot_ of exchanges with pcscd occurs.
	  
	  Tested on 64-bits CPU only.
	* [r5795] src/winscard_clnt.c: SCardGetStatusChange(): catch
	  possible sign extension problems from 32 to 64-bits integers
	  
	  Storing INFINITE (0xFFFFFFFF) into an int parameter and then
	  passing it to SCardGetStatusChange() will expand the int into a
	  DWORD (unsigned long). On 64-bits architecture it will become
	  0xFFFFFFFFFFFFFFFF (-1).
	  
	  See OpenSC bug at
	  http://www.opensc-project.org/pipermail/opensc-devel/2011-June/016848.html

2011-06-15  Ludovic Rousseau

	* [r5793] src/hotplug_libudev.c: HPEstablishUSBNotifications():
	  wait for a udev event before calling
	  udev_monitor_receive_device()
	  
	  Fix Alioth bug [#313165] "libudev-support broken with udev-171:
	  udev_monitor_receive_device() error"

2011-06-14  Ludovic Rousseau

	* [r5790] src/winscard_clnt.c: API_TRACE_IN: use %ld instead of %d
	  for DWORD and LONG types.
	  
	  The timeout in SCardGetStatusChange() is now correctly displayed
	  4294967295 instead of -1 on 64-bits systems.

2011-06-11  Ludovic Rousseau

	* [r5786] src/hotplug_macosx.c: Remove useless cast for calloc()
	  (we are not in C++)
	* [r5780] COPYING: Add my name as copyright holder

2011-05-30  Ludovic Rousseau

	* [r5769] src/eventhandler.c: EHStatusHandlerThread(): always sleep
	  if the driver card event function returns an error (and not just
	  in the case of IFD_NO_SUCH_DEVICE)
	  
	  This avoids to loop too fast in case of a problem. This happens
	  after activating a smart card reader in vmware workstation for
	  example.
	  
	  See
	  https://bugs.launchpad.net/ubuntu/+source/pcsc-lite/+bug/787451
	  "pcscd spams to syslog and kern.log after enabling smartcard
	  reader in VMWare Workstation"

2011-05-25  Ludovic Rousseau

	* [r5766] src/winscard.c: SCardConnect(): log at level
	  PCSC_LOG_DEBUG instead of PCSC_LOG_ERROR if no card is inserted
	  
	  Thanks to Kalev Lember for the patch
	  https://bugzilla.redhat.com/show_bug.cgi?id=707412#c2

2011-05-22  Ludovic Rousseau

	* [r5765] src/winscard_svc.c: WRITE_BODY_WITH_COMMAND(): always log
	  with level PCSC_LOG_DEBUG even in case of error to avoid filling
	  the system log file.
	  
	  Thanks to Kalev Lember for the patch. See
	  https://bugzilla.redhat.com/show_bug.cgi?id=657658

2011-05-18  Ludovic Rousseau

	* [r5764] src/pcscdaemon.c: print_usage(): document -x,
	  --auto-exits
	* [r5763] configure.in: Use AC_LANG_SOURCE as requested by autoconf
	  2.68

2011-05-17  Ludovic Rousseau

	* [r5759] doc/doxygen.conf.in: Do not generate call and include
	  graphs

2011-05-12  Ludovic Rousseau

	* [r5736] src/PCSC/pcsclite.h.in, src/winscard_clnt.c: Define
	  g_rgSCardT?Pci as const structures to be more Windows like
	  
	  I do not expect a regression or compilation problem in WinSCard
	  API users but how knows...
	* [r5735] configure.in: No need to define host_to_ccid_16 and
	  host_to_ccid_32 any more since they were removed in revision 5255
	  from src/PCSC/reader.h
	* [r5734] configure.in: Do not check for libusb or libudev is USB
	  support is disabled.
	  
	  See Debian bug #626201: pcsc-lite: FTBFS on hurd-i386

2011-05-11  Ludovic Rousseau

	* [r5732] src/winscard_svc.c: ContextThread(): in
	  CMD_GET_READERS_STATE call RFWaitForReaderInit only if USE_USB is
	  defined.
	  
	  Fix a link failure if --disable-usb is used.
	  
	  See Debian bug #626201: pcsc-lite: FTBFS on hurd-i386

2011-05-05  Ludovic Rousseau

	* [r5714] src/PCSC/debuglog.h, src/PCSC/ifdhandler.h,
	  src/PCSC/pcsclite.h.in, src/PCSC/wintypes.h: Update copyright
	  date
	* [r5713] src/PCSC/debuglog.h, src/debuglog.c, src/pcscdaemon.c:
	  Add command line option -T, --color: force use of colored logs
	  
	  The idea is to have colored logs even if they are redirected to a
	  file or a pipe.
	* [r5712] src/debuglog.c: log_line(): display the delta time
	  between two log lines even if stdout is not a tty (redirected to
	  a file)
	  
	  The information may be usefull to detect problems from a log file
	  with this time information.
	* [r5711] src/atrhandler.c, src/debuglog.c, src/eventhandler.c,
	  src/hotplug_generic.c, src/hotplug_libusb.c, src/hotplug_linux.c,
	  src/hotplug_macosx.c, src/ifdwrapper.c, src/pcscdaemon.c,
	  src/prothandler.c, src/readerfactory.c, src/readerfactory.h,
	  src/utils.c, src/winscard.c, src/winscard_clnt.c,
	  src/winscard_svc.c: Update copyright date
	* [r5710] src/PCSC/debuglog.h, src/debuglog.c, src/pcscdaemon.c:
	  Send logs to stdout instead of stderr
	  
	  It is now possible to use tee(1) to redirect logs in a file
	  without first redirecting stderr to stdout
	* [r5709] src/pcscdaemon.c: at_exit(): use exit() instead of
	  _exit() to properly close stderr and stdout and other libC
	  cleanup

2011-05-04  Ludovic Rousseau

	* [r5708] src/PCSC/debuglog.h, src/debuglog.c: Remove support of
	  DebugLogSuppress()
	  
	  This function is not used anywhere in pcsc-lite.

2011-05-03  Ludovic Rousseau

	* [r5707] src/hotplug_libusb.c: HPRescanUsbBus(): fix a memory leak
	  
	  Call libusb_free_config_descriptor() to free the memory allocated
	  by libusb_get_active_config_descriptor()
	  
	  Thanks to Roland Troka for the patch Closes Alioth bug: [313036]
	  alto uso della ram da pcscd versione 1.6.7 e 1.7.0

2011-04-22  Ludovic Rousseau

	* [r5705] TODO: Fix: "start pcscd only when a reader is connected"
	  and "do not open the reader USB device if no client is using the
	  reader"
	  
	  Now that pcscd is auto started it will be started only if an
	  appication is using the PC/SC API. This is the case since release
	  1.6.0: - SCardEstablishContext(): try to start the pcscd daemon
	  if not already running. . pcscd will suicide itself after 60
	  seconds of inactivity if it is started using --auto-exit. This is
	  the default behavior when pcscd is started by libpcsclite . Set
	  PCSCLITE_PCSCD_ARGS with the argument you want to pass to pcscd
	  in autostart Only one argument is passed. The space character is
	  not a separator. example: export PCSCLITE_PCSCD_ARGS=-dfa
	* [r5704] TODO: Fix: "start pcscd as an normal user daemon (as id
	  smartcard?) instead as root"
	  
	  This is the case since release 1.6.5: - Install pcscd as sgid
	  pcscd instead of suid root See
	  http://ludovicrousseau.blogspot.com/2010/09/pcscd-auto-start.html
	* [r5703] TODO: Fix: "use static driver instead of reader polling
	  and dynamic driver loading"
	  
	  This is the case since release 1.6.0: - Better handling of
	  PCSCLITE_STATIC_DRIVER as can be used on platforms using
	  <B5>Clinux (without dynamic loader). This is used to statically
	  link the reader driver to pcscd. Since the link is static you
	  must define the IFDHandler API version at compilation time.
	  Either define IFDHANDLERv1, IFDHANDLERv2 or IFDHANDLERv3

2011-04-05  Ludovic Rousseau

	* [r5692] src/pcscdaemon.c: signal_trap(): exit immediatly in case
	  of SIGTERM
	  
	  Closes Debian bug #620305 "pcscd slows down sutdown/restart"

2011-03-31  Ludovic Rousseau

	* [r5684] ChangeLog, configure.in: release 1.7.2
	* [r5683] src/hotplug_libudev.c: HPAddDevice(): avoids a crash if a
	  specific driver fails to work and no class driver is available
	  
	  Fix Debian bug #620232: pcscd fails to work with REINER SCT
	  cyberJack

2011-03-30  Ludovic Rousseau

	* [r5679] ChangeLog, configure.in: release 1.7.1

2011-03-27  Ludovic Rousseau

	* [r5676] src/hotplug_libudev.c: Log an error if
	  udev_device_get_devnode() fails

2011-03-26  Ludovic Rousseau

	* [r5675] src/hotplug_libudev.c: Try to use a (CCID) class driver
	  if a specific driver fails to use the reader.
	  
	  This may happen if openct ifd-handler and libccid are both
	  installed.
	* [r5674] src/utils.c: CheckForOpenCT(): Log openct control file
	  found
	* [r5673] src/hotplug_libudev.c: Check the
	  udev_device_get_devnode() return value (and avoids a crash)
	  
	  Fix Debian bug #619241

2011-03-16  Ludovic Rousseau

	* [r5659] src/winscard_clnt.c: CardControl(): initialize all the
	  fields of the struct control_struct to avoid valgrind warning:
	  
	  ==14600== Syscall param socketcall.sendto(msg) points to
	  uninitialised byte(s) ==14600== at 0x5042532: send (send.c:28)
	  ==14600== by 0x4E2FDF9: MessageSend (winscard_msg.c:355)
	  ==14600== by 0x4E2FEE2: MessageSendWithHeader
	  (winscard_msg.c:294) ==14600== by 0x4E2C05C: SCardControl
	  (winscard_clnt.c:2375) ==14600== by 0x4008D4: main
	  (scontrol.c:49) ==14600== Address 0x7fefffc60 is on thread 1's
	  stack
	  
	  Thanks to Martin Vogt for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2011-q1/0088.html

2011-03-13  Ludovic Rousseau

	* [r5655] configure.in: Use libudev only for Linux by default
	* [r5653] configure.in: PCSC_ARCH: convert / in _ to have
	  GNU_kFreeBSD instead of GNU/kFreeBSD

2011-03-09  Ludovic Rousseau

	* [r5650] ChangeLog: Typo caused by autocompletion without check
	* [r5649] ChangeLog, configure.in: release 1.7.0

2011-02-25  Ludovic Rousseau

	* [r5638] configure.in, src/Makefile.am, src/PCSC/ifdhandler.h,
	  src/hotplug_generic.c, src/hotplug_libhal.c,
	  src/hotplug_libudev.c, src/hotplug_linux.c: Use libudev instead
	  of (deprecated) libhal for the USB hotplug mechanism.

2011-02-24  Ludovic Rousseau

	* [r5636] src/hotplug_libusb.c: Remove debug printf()

2011-02-22  Ludovic Rousseau

	* [r5628] ChangeLog, configure.in: release 1.6.7

2011-02-21  Ludovic Rousseau

	* [r5621] src/hotplug_libusb.c: If a device has more than one CCID
	  interface the "libhal:" naming scheme (with the interface number
	  included) is used instead of "libusb:".
	  
	  The new mechanism allows to use multi-interfaces devices like the
	  Gemalto ProxDU also with hotplug_libusb. libhal is deprecated and
	  may not be available everywhere.
	  
	  Thanks to Diego Elio Pettenò for the patch (for Gentoo)

2011-02-10  Ludovic Rousseau

	* [r5589] src/winscard_clnt.c: Move the definition of DO_TRACE,
	  DO_PROFILE, and DO_CHECK_SAME_PROCESS at the top of the file, and
	  add documentation.

2011-02-09  Ludovic Rousseau

	* [r5587] src/Makefile.am: Do not create empty directories
	  .../pcsc/drivers and .../pcsc/services any more. The needed
	  directory is created by the driver instead.

2011-02-04  Ludovic Rousseau

	* [r5584] UnitaryTests/ThreadSafe.py, UnitaryTests/stress_apdu.py:
	  Fix PEP8 warnings
	* [r5583] UnitaryTests/ThreadSafe.py: Display the thread id and
	  iterations
	* [r5582] UnitaryTests/SCard_fork.py: Better documentation and
	  debug
	* [r5581] src/winscard_clnt.c: Add a missing variable declaration
	  used if DO_CHECK_SAME_PROCESS is defined
	* [r5580] UnitaryTests/SCardConnect_DIRECT.py: Test the behavior as
	  documented in revision 5579
	* [r5579] src/winscard_clnt.c: Doxygen: CardConnect() &
	  SCardReconnect() pdwActiveProtocol is not set to
	  SCARD_PROTOCOL_UNDEFINED if SCARD_SHARE_DIRECT is used but the
	  card has already negociated its protocol

2011-02-01  Ludovic Rousseau

	* [r5575] UnitaryTests/SCardBeginTransaction_ExclusiceMode.py:
	  Unitary test for Alioth bug [#312960] SCardDisconnect when other
	  context has transaction
	* [r5574] src/winscard.c: SCardDisconnect(): RFUnlockAllSharing()
	  may fail with SCARD_E_SHARING_VIOLATION if a transaction is on
	  going on another card context and dwDisposition ==
	  SCARD_LEAVE_CARD. We should not stop and continue disconnecting
	  the card.
	  
	  Fixes Alioth bug [#312960] SCardDisconnect when other context has
	  transaction
	* [r5573] UnitaryTests/SCardConnect_DIRECT2.py: Use the protocol
	  negociated by SCardConnect() instead of hard coding SCARD_PCI_T1
	* [r5572] src/winscard_clnt.c: SCardDisconnect(): remove the card
	  handle only if SCARD_DISCONNECT command succeeded on the server
	  
	  Related to alioth bug [#312960] SCardDisconnect when other
	  context has transaction If a first SCardDisconnect() fails with
	  SCARD_E_SHARING_VIOLATION it is now possible to try again
	  SCardDisconnect(). Before the patch the second call to
	  SCardDisconnect() returned SCARD_E_INVALID_HANDLE but the
	  connection was still "in use".

2011-01-29  Ludovic Rousseau

	* [r5569] src/PCSC/ifdhandler.h, src/readerfactory.h: Revert
	  revision 5568 since it has side effect on driver compilation
	  (like libccid fails to build)
	* [r5568] src/PCSC/ifdhandler.h, src/readerfactory.h: Move #include
	  "pcsclite.h" from PCSC/ifdhandler.h to readerfactory.h so that
	  ifdhandler.h can be used as-is on Mac OS X (for handler_test.c)
	* [r5567] src/eventhandler.c, src/ifdwrapper.c, src/prothandler.c,
	  src/readerfactory.c: Remove useless #include "ifdhandler.h"

2011-01-27  Ludovic Rousseau

	* [r5560] src/winscard_clnt.c: SCardSetAttrib(): add profiling
	  calls
	* [r5559] src/winscard_clnt.c: SCardGetSetAttrib(): remove a call
	  to PROFILE_END() since this is already done in SCardGetAttrib()
	* [r5558] src/winscard_clnt.c: profiling: compare threads using
	  pthread_equal() instead of == to make the code more portable.
	* [r5557] src/winscard_clnt.c: SCardGetAttrib(): Always exit from
	  the same point so that profiling does work even in case of error
	* [r5556] src/winscard_clnt.c: profile_end(): add a missing \n in
	  the warning message
	* [r5555] src/winscard_clnt.c: Send API traces do stderr instead of
	  stdout

2011-01-25  Ludovic Rousseau

	* [r5550] src/winscard_clnt.c: SCardReleaseContext(): Always exit
	  from the same point so that profiling does work even in case of
	  error
	* [r5549] src/winscard_clnt.c: SCardCancel(): Always exit from the
	  same point so that profiling does work even in case of error
	* [r5548] src/winscard_clnt.c: Profiling: allow to support up to
	  MAX_THREADS simultaneous calls
	  
	  For example SCardCancel() is called from another thread when
	  SCardGetStatusChange() is running. This was not supported.
	* [r5547] src/winscard_clnt.c: Use color names macros
	* [r5546] src/winscard_clnt.c: Add API tracing with arguments
	  display
	* [r5545] src/winscard_clnt.c: SCardGetStatusChange(): Always exit
	  from the same point so that profiling does work even in case of
	  error
	* [r5544] src/winscard_clnt.c: SCardDisconnect(): Always exit from
	  the same point so that profiling does work even in case of error

2011-01-21  Ludovic Rousseau

	* [r5543] src/configfile.l: Display the correct line number if
	  garbage is found in the configuration file

2011-01-20  Ludovic Rousseau

	* [r5539] src/winscard_svc.c: contextsListhContext_seeker(): avoid
	  a potential crash if NULL values are used
	  
	  src/winscard_svc.c:90:22: warning: Dereference of null pointer if
	  (currentContext->hContext == *(int32_t *)key) ^
	  src/winscard_svc.c:90:34: warning: Dereference of null pointer if
	  (currentContext->hContext == *(int32_t *)key) ^
	* [r5538] src/winscard_clnt.c: SCardStatus(): initialize a dummy
	  variable to avoid warnings
	  
	  src/winscard_clnt.c:1451:2: warning: Assigned value is garbage or
	  undefined dwReaderLen = *pcchReaderLen; ^ ~~~~~~~~~~~~~~
	  src/winscard_clnt.c:1452:2: warning: Assigned value is garbage or
	  undefined dwAtrLen = *pcbAtrLen; ^ ~~~~~~~~~~
	* [r5537] src/winscard_clnt.c: Avoid a potential crash if NULL
	  values are used
	  
	  src/winscard_clnt.c:226:27: warning: Dereference of null pointer
	  if (channelMap->hCard == *(SCARDHANDLE *)key) ^
	  src/winscard_clnt.c:226:18: warning: Dereference of null pointer
	  if (channelMap->hCard == *(SCARDHANDLE *)key) ^
	  src/winscard_clnt.c:260:18: warning: Dereference of null pointer
	  if (contextMap->hContext == *(SCARDCONTEXT *) key) ^
	  src/winscard_clnt.c:260:30: warning: Dereference of null pointer
	  if (contextMap->hContext == *(SCARDCONTEXT *) key) ^
	* [r5536] src/winscard_clnt.c: SCardEstablishContext(): remove
	  useless affectation
	  
	  src/winscard_clnt.c:439:5: warning: Value stored to 'ret' is
	  never read ...ret = execl(PCSCD_BINARY, "pcscd", "--auto-exit",
	  param, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	* [r5535] src/winscard_clnt.c: SCardEndTransaction(): remove
	  useless code
	  
	  src/winscard_clnt.c:1269:2: warning: Value stored to 'randnum' is
	  never read randnum = 0; ^
	* [r5534] src/winscard.c: remove unused affectations
	  
	  src/winscard.c:565:4: warning: Value stored to 'rv' is never read
	  rv = IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL); ^
	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	  src/winscard.c:835:4: warning: Value stored to 'rv' is never read
	  rv = IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL); ^
	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	  src/winscard.c:1095:4: warning: Value stored to 'rv' is never
	  read rv = IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL); ^
	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	* [r5533] clang-analyze.sh: Do not analyze tokenparser.c since it
	  is generated by flex
	* [r5532] src/readerfactory.c: RDR_CLIHANDLES_seeker(): avoid a
	  potential crash if NULL values are used
	  
	  src/readerfactory.c:72:30: warning: Dereference of null pointer
	  if (rdrCliHandles->hCard == *(SCARDHANDLE *)key) ^
	  src/readerfactory.c:72:21: warning: Dereference of null pointer
	  if (rdrCliHandles->hCard == *(SCARDHANDLE *)key) ^
	* [r5531] src/readerfactory.c: RFAddReader(): remove unused
	  affectation
	  
	  src/readerfactory.c:344:4: warning: Value stored to 'rv' is never
	  read rv = RFRemoveReader(readerName, port); ^
	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	* [r5530] src/readerfactory.c: RFAddReaderHandle(): return the
	  error code if any
	  
	  src/readerfactory.c:1116:3: warning: Value stored to 'rv' is
	  never read rv = SCARD_E_NO_MEMORY; ^ ~~~~~~~~~~~~~~~~~
	  src/readerfactory.c:1103:3: warning: Value stored to 'rv' is
	  never read rv = SCARD_E_NO_MEMORY; ^ ~~~~~~~~~~~~~~~~~
	  src/readerfactory.c:1095:3: warning: Value stored to 'rv' is
	  never read rv = SCARD_E_NO_MEMORY; ^ ~~~~~~~~~~~~~~~~~

2011-01-18  Ludovic Rousseau

	* [r5525] src/pcscdaemon.c: Remove useless code
	  
	  src/pcscdaemon.c:85:2: warning: Value stored to 'rv' is never
	  read rv = 0; ^ ~ src/pcscdaemon.c:175:2: warning: Value stored to
	  'rv' is never read rv = 0; ^ ~
	* [r5524] src/ifdwrapper.c: IFDPowerICC(): remove useless code
	  
	  src/ifdwrapper.c:294:2: warning: Value stored to 'ret' is never
	  read ret = ATRDecodeAtr(&sSmartCard, pucAtr, *pdwAtrLen); ^
	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	  src/ifdwrapper.c:268:2: warning: Value stored to 'rv' is never
	  read rv = IFD_SUCCESS; ^ ~~~~~~~~~~~
	* [r5523] src/eventhandler.c: EHStatusHandlerThread(): check the
	  return value of IFDStatusICC()
	  
	  Thanks to clang(1) for the warning src/eventhandler.c:235:2:
	  warning: Value stored to 'rv' is never read rv =
	  IFDStatusICC(rContext, &dwStatus); ^
	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	* [r5522] src/eventhandler.c: EHStatusHandlerThread(): remove
	  unused code
	  
	  src/eventhandler.c:233:2: warning: Value stored to
	  'dwCurrentState' is never read dwCurrentState = 0; ^ ~
	  src/eventhandler.c:232:2: warning: Value stored to
	  'readerSharing' is never read readerSharing = 0; ^ ~
	* [r5521] src/atrhandler.c: ATRDecodeAtr(): remove unused code
	  
	  src/atrhandler.c:55:2: warning: Value stored to 'p' is never read
	  p = K = TCK = Y1i = T = 0; ^ ~~~~~~~~~~~~~~~~~~~~~
	  src/atrhandler.c:55:6: warning: Although the value stored to 'K'
	  is used in the enclosing expression, the value is never actually
	  read from 'K' p = K = TCK = Y1i = T = 0; ^ ~~~~~~~~~~~~~~~~~
	  src/atrhandler.c:55:10: warning: Although the value stored to
	  'TCK' is used in the enclosing expression, the value is never
	  actually read from 'TCK' p = K = TCK = Y1i = T = 0; ^ ~~~~~~~~~~~
	  src/atrhandler.c:55:16: warning: Although the value stored to
	  'Y1i' is used in the enclosing expression, the value is never
	  actually read from 'Y1i' p = K = TCK = Y1i = T = 0; ^ ~~~~~
	  src/atrhandler.c:55:22: warning: Although the value stored to 'T'
	  is used in the enclosing expression, the value is never actually
	  read from 'T' p = K = TCK = Y1i = T = 0; ^ ~
	* [r5520] clang-analyze.sh: script to call clang --analyze
	* [r5519] splint.sh: No more scf files since revision 4486
	* [r5518] src/winscard_clnt.c: SCardGetStatusChange(): avoids a
	  compiler warning
	  
	  winscard_clnt.c:1875:33: warning: comparison of integers of
	  different signs: 'uint32_t' (aka 'unsigned int') and 'int'
	  [-Wsign-compare] ...if (rContext->eventCounter != currentCounter)
	  ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
	* [r5517] src/readerfactory.c: Add an explicit cast to avoid a
	  compiler warning
	  
	  readerfactory.c:1033:45: warning: comparison of integers of
	  different signs: 'unsigned long' and 'SCARDHANDLE' (aka 'long')
	  [-Wsign-compare] if ((rContext->dwIdentity + randHandle) ==
	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^

2011-01-14  Ludovic Rousseau

	* [r5509]
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py:
	  Also initialize the state of the PnP special reader (For Mac OS
	  X)
	* [r5508] src/hotplug_macosx.c: HPSearchHotPluggables(): use the
	  same naming convention as used by Apple PC/SC layer on Leopard
	  (and later). The reader friendly name is used instead of
	  "usb:%04x/%04x" as documented in IFDHandler v3 API at
	  http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#gabb9fe35a68fa080ce9397f0b830b1e7e
	  
	  The same driver source code can be used by Apple PC/SC layer and
	  by this pcsc-lite.
	* [r5507] src/hotplug_macosx.c: Fix compiler warning
	  
	  hotplug_macosx.c: In function ‘HPDriversGetFromDirectory’:
	  hotplug_macosx.c:150: warning: comparison between signed and
	  unsigned
	* [r5506] c.sh: Remove commented CFLAGS definition
	* [r5505] src/PCSC/pcsclite.h.in, src/PCSC/wintypes.h: Mac OS X
	  "port" - Define Windows types as they are defined on Mac OS X in
	  /System/Library/Frameworks/PCSC.framework/Headers/wintypes.h -
	  Pack structures as they are packed on Mac OS X in
	  /System/Library/Frameworks/PCSC.framework/Headers/pcsclite.h
	  
	  With these changes it is possible to build this pcsc-lite on Mac
	  OS X and use it with an application built using the PCSC
	  Framework headers provided by Apple.
	  
	  One application is to temporarily replace the Apple PCSC layer by
	  a better/working one.
	* [r5504] src/PCSC/pcsclite.h.in: Use LONG instead of long for
	  SCARDCONTEXT and SCARDHANDLE so that the exact type can be easily
	  changed by editing PCSC/wintypes.h
	  
	  By default: typedef long LONG; so no change

2011-01-13  Ludovic Rousseau

	* [r5501] doc/pcscd.8.in: Remove references to a init.d/pcscd
	  script since pcscd is autostarted by default now.
	* [r5500] doc/reader.conf.5.in: Use @confdir_exp@ instead of
	  (removed) @confdir@

2011-01-12  Ludovic Rousseau

	* [r5498] doc/pcscd.8.in: Use @confdir_exp@ instead of
	  @sysconfdir_exp@
	  
	  Closes [#312929] @sysconfdir_exp@ not expanded in manual page

2011-01-07  Ludovic Rousseau

	* [r5496] src/readerfactory.c: RFAddReader(): correctly initialize
	  the pthCardEvent field for the other slots. The bug occured with
	  a multi slot reader and a driver with no
	  TAG_IFD_POLLING_THREAD_WITH_TIMEOUT function (as is the case with
	  my CCID driver since revision 5495)

2011-01-06  Ludovic Rousseau

	* [r5491] UnitaryTests/SCardConnect_DIRECT2.py: Add comments
	* [r5490] src/winscard.c: SCardDisconnect(): Switch to
	  POWER_STATE_GRACE_PERIOD unless the card was not powered
	  
	  In the previous implementation the state was changed to
	  POWER_STATE_GRACE_PERIOD only if the previous state was
	  POWER_STATE_INUSE. So if a SCARD_SHARE_DIRECT connection was used
	  the card state was not set POWER_STATE_INUSE and a power off
	  action was immediate at the SCardDisconnect(). Not nice if the
	  card is reused just after.

2011-01-04  Ludovic Rousseau

	* [r5478] src/winscard_svc.c: ContextThread(): in command
	  CMD_GET_READERS_STATE, wait until all the readers are ready (ATR
	  available) before sending the reader states.
	  
	  The problem arrives when you connect two readers at the same time
	  (and one of them is slow to get the ATR). SCardGetStatusChange()
	  must not exit with one reader in state READER_NOT_INITIALIZED (as
	  implemented in revision 5217)

2010-12-12  Ludovic Rousseau

	* [r5442] ChangeLog, configure.in: release 1.6.6
	* [r5441] src/simclist.c: Reapply change in revision 4986 since the
	  problem was not corrected in version 1.5 of simclist.

2010-12-11  Ludovic Rousseau

	* [r5440] src/winscard_msg.c: Use LONG instead of int to store
	  PC/SC return codes like SCARD_E_*
	  
	  The problem comes from sign extenstion from int to LONG int rv =
	  SCARD_E_TIMEOUT; /* 0x8010000A */ is (sign) extended into a LONG
	  = 0xFFFFFFFF8010000A
	  
	  So the line in winscard_clnt.c if (SCARD_E_TIMEOUT == rv) is
	  never true on a 64-bits system because rv has been extended from
	  int to LONG. The comparison is then between 0x8010000A and
	  0xFFFFFFFF8010000A

2010-12-08  Ludovic Rousseau

	* [r5434] src/PCSC/debuglog.h, src/PCSC/ifdhandler.h,
	  src/atrhandler.h, src/dyn_generic.h, src/eventhandler.h,
	  src/hotplug.h, src/ifdwrapper.h, src/misc.h, src/parser.h,
	  src/powermgt_generic.h, src/prothandler.h, src/readerfactory.h,
	  src/sys_generic.h, src/winscard_msg.h, src/winscard_svc.h: Do not
	  use extern "C" since we are in C and not C++
	  
	  Follow rule 13 of "On C Library Implementation" by Rusty Russell
	  http://rusty.ozlabs.org/?p=140

2010-12-03  Ludovic Rousseau

	* [r5429] src/configfile.l: Fix configfile.l: In function
	  'evaluatetoken': configfile.l:205: warning: assignment discards
	  qualifiers from pointer target type
	* [r5427] ChangeLog, configure.in: release 1.6.5

2010-11-26  Ludovic Rousseau

	* [r5420] src/simclist.c: From SimCList version 1.5
	  http://mij.oltrelinux.com/devel/simclist/

2010-11-23  Ludovic Rousseau

	* [r5415] src/eventhandler.c, src/readerfactory.c,
	  src/readerfactory.h, src/winscard.c: Add a mutex to make the test
	  and set of the powerState field atomic.

2010-11-22  Ludovic Rousseau

	* [r5414] src/eventhandler.c, src/winscard.c: Log the new
	  powerState value at DEBUG level
	* [r5412] src/readerfactory.c: Remove dead code

2010-11-16  Ludovic Rousseau

	* [r5402] src/winscard.c: SCardDisconnect(): change powerState to
	  POWER_STATE_GRACE_PERIOD only if the previous state was
	  POWER_STATE_INUSE
	  
	  If the powerState was POWER_STATE_UNPOWERED then do NOT change to
	  POWER_STATE_GRACE_PERIOD. POWER_STATE_GRACE_PERIOD indicates that
	  the card is powered on. That is the case if mode is
	  SCARD_SHARE_DIRECT at SCardConnect()
	* [r5401] src/winscard.c: SCardConnect(): change the power state to
	  POWER_STATE_INUSE only if the card has been powered on. The card
	  is NOT powered on if mode is SCARD_SHARE_DIRECT
	* [r5400] src/eventhandler.c, src/readerfactory.c: Move the zeroing
	  of the reader context from EHDestroyEventHandler() to
	  RFUnInitializeReader() where it is more appropriate.
	  
	  The reader context shall be valid until the reader is
	  uninitialized in RFUnInitializeReader() and most importantly
	  after IFDCloseIFD() is called.
	* [r5399] src/readerfactory.c: RFInitializeReader(): if
	  IFDOpenIFD() fails just mark the reader as "not correctly
	  started". This will present a call to IFDCloseIFD() in
	  RFUnInitializeReader() (revision 5393)

2010-11-09  Ludovic Rousseau

	* [r5393] src/readerfactory.c: RFUnInitializeReader(): Do not close
	  a reader if IFDOpenIFD() failed in RFInitializeReader()
	* [r5392] src/readerfactory.c: RFRemoveReader(): destroy the event
	  handler only if it exists already

2010-11-08  Ludovic Rousseau

	* [r5391] src/winscard_msg_srv.c: ProcessCommonChannelRequest(): no
	  need to define serv_adr as static. Free a few bytes of memory.
	* [r5390] src/winscard_msg.c, src/winscard_msg.h,
	  src/winscard_msg_srv.c: Remove CleanupSharedSegment() and do not
	  call it anymore
	  
	  The function is not about shared segment any more The file
	  PCSCLITE_CSOCK_NAME will be removed in clean_temp_files() at exit
	  anyway
	* [r5388] src/winscard_msg.c: MessageSend(): return
	  SCARD_E_NO_SERVICE instead of SCARD_F_COMM_ERROR if the daemon
	  died and we reveice a EPIPE error.
	* [r5387] src/winscard_msg.c: MessageSendWithHeader(): do not send
	  a 0 length buffer.
	  
	  Some commands only have a header and no data like
	  CMD_GET_READERS_STATE
	* [r5386] src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_msg.h, src/winscard_svc.c: MessageReceiveTimeout(),
	  MessageSendWithHeader(), MessageSend() and MessageReceive() now
	  returns a PC/SC error code instead of an internal value. So the
	  callers can just return the error code to the application with no
	  transcoding.
	* [r5385] src/winscard_clnt.c: Move SCardInvalidateHandles() in the
	  same #ifdef DO_CHECK_SAME_PROCESS as SCardCheckSameProcess()
	  since it is only used in this case.
	* [r5384] src/winscard_clnt.c: No need to check the server pid
	  anymore. If the server is restarted the socket communication will
	  fail and an "RPC transport error" SCARD_F_COMM_ERROR error will
	  be returned
	  
	  This check was needed when the readers state was stored in
	  /var/run/pcscd/pcscd.pub. But that is no more the case. Every
	  command now uses the client/server Unix socket.

2010-11-05  Ludovic Rousseau

	* [r5379] src/winscard_msg.h: InitializeSocket() and
	  ProcessEventsServer() are used by the server side so must be
	  declared in the #ifdef PCSCD part of the header file
	* [r5378] src/winscard_msg.h: Add missing getSocketName()
	  declaration used by winscard_clnt.c and winscard_msg.c
	* [r5377] src/winscard_msg.h: Reorder the function definitions as
	  they are in winscard_msg.c in revision 5371
	* [r5376] src/readerfactory.h: Remove definition of FctMap_V1 now
	  useless since revision 5321
	* [r5375] src/atrhandler.c, src/atrhandler.h: Remove typedef of
	  PSMARTCARD_EXTENSION and use SMARTCARD_EXTENSION * instead

2010-11-04  Ludovic Rousseau

	* [r5373] src/winscard_clnt.c, src/winscard_msg.c: It is now
	  possible to configure the local socket name to use using the
	  environment variable PCSCLITE_CSOCK_NAME
	  
	  This is used by Estobuntu LTSP to redirect the smart card reader
	  on the light terminal display to the application running on the
	  server. They use a patched SSH version to redirect
	  /var/run/pcscd/pcscd.comm on the client to ~/.pcscd.comm on the
	  server.
	* [r5372] src/winscard_msg.c: MessageReceiveTimeout(): remove pcscd
	  specific code inside a function used only by libpcsclite
	* [r5371] src/winscard_msg.c: reorganize the functions in 3
	  categories: - functions used by pcscd only:
	  CleanupSharedSegment() - functions used by libpcsclite only:
	  ClientSetupSession(), ClientCloseSession(),
	  MessageReceiveTimeout(), MessageSendWithHeader() - functions used
	  by pcscd and libpcsclite: MessageSend(), MessageReceive()
	  
	  We gain on the code size: 1104 bytes for pcscd and 101 bytes for
	  libpcsclite

2010-11-03  Ludovic Rousseau

	* [r5370] src/atrhandler.c: ATRDecodeAtr(): avoids a buffer
	  overflow with badly formed ATR like 3B FF 11 22 33 F0 11 22 33 F0
	  11 22 33 F0 11 22 33 F0 11 22 33 F0 11 22 33 F0 11 22 33 00 11 22
	  33
	  
	  Thanks to Rafael Dominguez Vega for the bug report

2010-10-28  Ludovic Rousseau

	* [r5368] src/winscard.c: Move declaration of dwAtrLen closer to
	  where it is used.
	* [r5367] src/winscard.c: SCardConnect(): log the ATR in case of
	  auto power on
	  
	  The ATR may be different from the previous one if the card has a
	  cold and a warm ATR.

2010-10-26  Ludovic Rousseau

	* [r5364] src/winscard.c: SCardDisconnect(): check for card removal
	  in case DISABLE_AUTO_POWER_ON
	* [r5359] src/winscard.c: Doxygen documentation is done on the
	  client side (winscard_clnt.c) so remove documentation of
	  SCardEstablishContext()
	* [r5358] src/winscard.c: SCardTransmit(): do not check for NULL
	  pointers since we are called from ContextThread() with correct
	  values
	* [r5357] src/winscard.c: SCardReconnect(): do not check for
	  pdwActiveProtocol NULL pointer since we are called from
	  ContextThread() with a correct value
	* [r5356] src/winscard.c: SCardConnect(): do not check for NULL
	  pointers since we are called from ContextThread() with correct
	  values
	* [r5355] src/winscard.c: SCardEstablishContext(): do not check for
	  phContext NULL pointer since we are called from ContextThread()
	  with a correct value

2010-10-25  Ludovic Rousseau

	* [r5354] src/winscard.c: SCardConnect(): test for not
	  SCARD_POWERED instead of SCARD_SWALLOWED
	* [r5351] src/hotplug_linux.c: Use the new bundle parser code
	* [r5350] src/winscard.c: SCardConnect(): log an error if auto
	  power on failed
	* [r5349] Makefile.am: Add a fix-rights rule at the top level to
	  call the fix-rights rule in src/

2010-10-23  Ludovic Rousseau

	* [r5348] src/winscard.c: SCardConnect(): check the returned value
	  of IFDPowerICC() to change the readerState if power up succeeded
	* [r5347] src/winscard.c: SCardConnect(): power up the card before
	  checking for its SCARD_SWALLOWED state.
	  
	  If a card fails to power up on card insertion a new power up will
	  be tried on SCardConnect().

2010-10-22  Ludovic Rousseau

	* [r5346] src/winscard_clnt.c: Remove the "This function " in the
	  Doxygen brief line
	* [r5345] UnitaryTests/SCardCancel2.py: SCardCancel() should do
	  nothing if no cancellable call is ongoing bug fixed in revision
	  5344
	* [r5344] src/winscard_clnt.c: Only SCardGetStatusChange() can be
	  cancelled using SCardCancel()
	  
	  Thanks to Jan Rochat for the bug report
	  https://bugs.launchpad.net/ubuntu/+source/pcsc-lite/+bug/647545
	* [r5343] src/eventhandler.c, src/eventhandler.h,
	  src/hotplug_libhal.c, src/hotplug_macosx.c, src/ifdwrapper.c,
	  src/misc.h, src/pcscdaemon.c, src/winscard.c,
	  src/winscard_clnt.c, src/winscard_msg.c: Remove spaces and tabs
	  at end of line
	* [r5342] src/winscard_svc.c: Reformat
	* [r5341] src/PCSC/winscard.h, src/winscard.c, src/winscard_clnt.c,
	  src/winscard_msg.h, src/winscard_svc.c: SCardCancelTransaction()
	  is no more provided. This function is not provided by Microsoft
	  and is deprecated since 2005 in pcsc-lite.
	* [r5340] src/winscard.c: Reindent
	* [r5339] src/winscard_clnt.c: Reformat
	* [r5338] src/PCSC/winscard.h, src/winscard_clnt.c:
	  SCardSetTimeout() is no more provided. This function is not
	  provided by Microsoft and is deprecated since 2004 in pcsc-lite.
	* [r5337] src/winscard.c: SCardSetTimeout() is implemented (and
	  deprecated) on the client side
	* [r5336] src/winscard.c: SCardListReaders() and SCardCancel() are
	  implemented on the client side
	* [r5335] src/winscard.c: SCardDisconnect(): if
	  DISABLE_AUTO_POWER_ON is defined then do not power on the card if
	  SCARD_UNPOWER_CARD is used.
	* [r5334] src/eventhandler.c, src/pcscd.h.in: Move
	  DISABLE_ON_DEMAND_POWER_ON and DISABLE_AUTO_POWER_ON defines from
	  eventhandler.c to pcscd.h.in so they are visible by all the .c
	  files
	* [r5333] src/winscard.c: SCardConnect(): remove debug log

2010-10-21  Ludovic Rousseau

	* [r5332] src/eventhandler.c: If DISABLE_AUTO_POWER_ON is defined
	  then do not automatically power on the card. The card will be
	  powered on on the first SCardConnect()
	* [r5331] src/readerfactory.c: Remove extra parenthesis We are
	  using C not Lisp :-)
	* [r5328] TODO, src/PCSC/ifdhandler.h, src/eventhandler.c,
	  src/eventhandler.h, src/pcscd.h.in, src/readerfactory.c,
	  src/readerfactory.h, src/winscard.c: Power on the card _only_ if
	  an application requests a connection see Alioth bug #301965
	  
	  You can disable the feature using DISABLE_ON_DEMAND_POWER_ON in
	  src/eventhandler.c

2010-10-17  Ludovic Rousseau

	* [r5324] src/Makefile.am: PCSC/reader.h is no more generated from
	  PCSC/reader.h.in Directly use the filename in
	  nobase_include_HEADERS

2010-10-15  Ludovic Rousseau

	* [r5323] UnitaryTests/SCardStatus.py: Add a call to
	  SCardDisconnect() before SCardReleaseContext()
	* [r5322] src/eventhandler.h, src/winscard.c, src/winscard_clnt.c:
	  Rename the sharing states unsing the PCSCLITE_SHARING_ prefix
	  Doxygen: document the READER_STATE structure
	* [r5321] src/PCSC/ifdhandler.h, src/eventhandler.c,
	  src/ifdwrapper.c, src/ifdwrapper.h, src/readerfactory.c,
	  src/readerfactory.h: Remove the support of IFDHandler v1 API. I
	  don't know any driver using this API.
	  
	  We can now simplify the API of IFDStatusICC() and remove the ATR
	  related parameters. These paremeters were only used by the
	  IFDHandler v1 API.
	  
	  diffstat says: 6 files changed, 51 insertions(+), 335
	  deletions(-)

2010-10-14  Ludovic Rousseau

	* [r5317] src/hotplug_libhal.c: ifdCapabilities driver feature is
	  not used with libhal (and has never been). Remove dead/unused
	  code.

2010-10-13  Ludovic Rousseau

	* [r5316] src/winscard.c: Reformat
	* [r5315] src/readerfactory.c, src/winscard.c: Use the simpler form
	  of IFDPowerICC(..., IFD_POWER_DOWN, ...) introduced in revision
	  5314
	* [r5314] src/ifdwrapper.c: IFDPowerICC(): allow to use NULL for
	  pucAtr and pdwAtrLen to make power down easy with
	  IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL);
	* [r5313] src/winscard.c: Correctly set dwAtrLen to the sizeof the
	  ATR array before calling IFDPowerICC().
	  
	  Some drivers do not write more that dwAtrLen bytes in cardAtr
	  array.

2010-10-12  Ludovic Rousseau

	* [r5308] src/winscard_msg.h: Doxygen: SCARD_GET_STATUS_CHANGE is
	  not used anymore
	* [r5307] src/winscard.c: Remove SCardStatus() (dead code) on the
	  server side.
	* [r5306] src/winscard.c: SCardEndTransaction(): use the same code
	  to reset a card as in revision 5301
	* [r5305] src/winscard.c: SCardReconnect(), SCardDisconnect() and
	  SCardEndTransaction(): reset the value of dwAtrLen before the
	  second call to IFDPowerICC() so that the driver gets a correct
	  value if the first call to IFDPowerICC(IFD_POWER_DOWN) set
	  dwAtrLen=0
	  
	  Thanks to Frank Morgner for the bug report Closes: [#312754]
	  IFDHPowerICC is called with IFD_POWER_UP and *AtrLength==0
	* [r5304] src/pcsc-wirecheck-gen.c, src/winscard.c,
	  src/winscard_clnt.c, src/winscard_msg.h, src/winscard_svc.c: A
	  large part of SCardStatus() is done on the client side using
	  readerStates[]. So remove a few lines of dead code on the server
	  side.
	* [r5303] UnitaryTests/SCardStatus.py: Call SCardStatus() a second
	  time after a keypress
	* [r5302] UnitaryTests/SCardStatus.py: Unit test for SCardStatus()
	* [r5301] src/winscard.c: SCardReconnect(): Reorganize the code to
	  manage ATR and readerState after a power up. Remove a call to
	  IFDStatusICC() to know if a card is present or not since
	  IFDPowerICC() already gives us this information.
	  
	  SCardDisconnect(): Use the same code as above
	* [r5300] src/eventhandler.c, src/winscard.c, src/winscard_clnt.c:
	  Use uint32_t readerState instead of DWORD dwStatus to store the
	  state of the reader. DWORD and uint32_t may be different.
	* [r5299] src/winscard.c: SCardReconnect(): return
	  SCARD_E_NO_SMARTCARD when card is removed and
	  SCARD_W_UNRESPONSIVE_CARD when card is unresponsive instead of
	  SCARD_E_PROTO_MISMATCH
	* [r5298] src/winscard_msg.h: Increment minor version because of
	  changes in revision 5290
	* [r5297] doc/Makefile.am, doc/ifdhandler-3.tex: Remove the
	  deprecated LaTeX version of IFDHandler documentation

2010-10-11  Ludovic Rousseau

	* [r5296] src/configfile.l: evaluatetoken(): the CHANNELID
	  parameter can also be a decimal number.
	* [r5294] src/PCSC/ifdhandler.h, src/configfile.l: reader.conf
	  configuration: If you want to use IFDHCreateChannel() instead of
	  IFDHCreateChannelByName() then do not use any DEVICENAME line in
	  the configuration file. IFDHCreateChannel() will then be called
	  with the CHANNELID parameter.
	  
	  Closes: [#312749] Should call IFDHCreateChannel for serial driver
	  with DEVICENAME /dev/null
	* [r5293] src/readerfactory.c, src/winscard_clnt.c,
	  src/winscard_svc.c: list_* functions return an decimal integer so
	  use %d insteaf of %X to log the error value.
	* [r5292] src/readerfactory.c: Add a "0x" before hex displays

2010-10-10  Ludovic Rousseau

	* [r5291] src/winscard_clnt.c: Doxygen SCardStatus(): *pdwState
	  also contains a number of events
	* [r5290] src/eventhandler.c, src/eventhandler.h,
	  src/winscard_clnt.c: Split the card event counter out of the card
	  event state on the pcscd side to simplify the code in
	  EHStatusHandlerThread()
	  
	  The two information are combined on the client side in
	  SCardGetStatusChange() and SCardStatus()
	* [r5289]
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_loop.py:
	  Exit the endless loop in case of error
	* [r5288] src/PCSC/pcsclite.h.in: struct SCARD_READERSTATE: use
	  "DWORD" instead of "unsigned long" type for the fields
	  dwCurrentState, dwEventState and cbAtr
	  
	  This is compliant to the Windows definition and allows to
	  redefine DWORD to something other than unsigned long, like
	  uint32_t
	* [r5287] src/PCSC/pcsclite.h.in, src/error.c:
	  pcsc_stringify_error(): Use "LONG" instead of "long" as parameter
	  type to reflect the return type from winscard.h
	  
	  The LONG type may be redefined in PCSC/wintypes.h to int32_t for
	  example

2010-10-05  Ludovic Rousseau

	* [r5281] src/winscard_clnt.c: Doxygen: do not document unused
	  SCARD_STATE_ATRMATCH and SCARD_STATE_PRESENT states in
	  SCardGetStatusChange()
	  
	  Thanks to Martin Paljak for the patch
	* [r5280]
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_loop.py:
	  Call SCardGetStatusChange() in a endless loop
	* [r5279] src/tokenparser.l: Doxygen: fix documentation of
	  LTPBundleFindValueWithKey()
	* [r5278] src/winscard_clnt.c: SCardGetStatusChange(): include the
	  event counter in dwEventState even if dwCurrentState contains a
	  counter at 0 (default).
	* [r5277] doc/doxygen.conf.in: Update from Doxygen 1.5.5 to 1.7.1
	  
	  warning: Tag `DETAILS_AT_TOP' at line 163 of file
	  doc/doxygen.conf has become obsolete. To avoid this warning
	  please update your configuration file using "doxygen -u"

2010-10-01  Ludovic Rousseau

	* [r5275] src/pcscdaemon.c: main(): do not limit rights if run as
	  root

2010-09-19  Ludovic Rousseau

	* [r5262] src/Makefile.am: Do not change the access rights of pcscd
	  in the install rule but in another one. This is needed when
	  building the package in a system without the pcscd group.

2010-09-14  Ludovic Rousseau

	* [r5256] configure.in: Do not generate src/PCSC/reader.h from
	  src/PCSC/reader.h.in any more
	* [r5255] src/PCSC/reader.h: HOST_TO_CCID_16() and
	  HOST_TO_CCID_32() are now identity functions
	  
	  Since CCID 1.4.1 (revision 5252) the byte order is no more
	  important
	* [r5254] src/PCSC/reader.h, src/PCSC/reader.h.in: Rename
	  reader.h.in in reader.h

2010-09-04  Ludovic Rousseau

	* [r5245] src/Makefile.am: Install pcscd as sgid pcscd instead of
	  suid root
	* [r5241] src/hotplug_libhal.c: HPReadBundleValues(): do not fail
	  if the key "CFBundleName" is not found in a driver Info.plist.
	  This key should only be defined for the CCID class driver.

2010-09-03  Ludovic Rousseau

	* [r5231] src/winscard_msg.c: Doxygen: remove documentation about
	  the (now removed) timeOut parameter of MessageSend() and
	  MessageSendWithHeader()

2010-09-02  Ludovic Rousseau

	* [r5227] src/winscard_clnt.c: Doxygen: clarify the use of one
	  different SCARDCONTEXT per thread and the expection for
	  SCardCancel()
	* [r5226] src/winscard_svc.c: Remove protocol_major, protocol_minor
	  fields from struct _psContext since they are not used.
	* [r5225] src/winscard_msg.h: update PROTOCOL_VERSION_MINOR since
	  struct pubReaderStatesList changed (readerID removed)
	* [r5224] src/winscard_svc.c: ContextThread(): check that the
	  procotol major.minor is the same for the daemon and lib. If not
	  just fail. We are not backward compatible.
	* [r5219] src/winscard_clnt.c: Complete change in revision 5212
	  
	  SCardGetStatusChange() and SCardListReaders() were broken.
	* [r5218] src/ifdwrapper.c, src/readerfactory.c,
	  src/readerfactory.h: Rename lpcLibrary in library and lpcDevice
	  in device
	* [r5217] src/eventhandler.c, src/eventhandler.h, src/pcscdaemon.c,
	  src/readerfactory.c, src/readerfactory.h: Wait until all
	  connected readers have a chance to power up a possibly inserted
	  card.
	  
	  This is needed when auto start is used and a card is already
	  present in a USB reader. The reader presence is correctly
	  reported to libpcsclite but the power up has not yet happen. So
	  the ATR is not yet available.
	* [r5216] src/eventhandler.c, src/readerfactory.c,
	  src/readerfactory.h, src/winscard_clnt.c: Rename lpcReaderName in
	  readerName and use (char *) instead of LPSTR
	* [r5215] src/eventhandler.c, src/readerfactory.c,
	  src/readerfactory.h, src/winscard.c: Get rid of the lpcReader[]
	  field in struct ReaderContext
	  
	  The reader name is already present in readerState->readerName
	  linked from struct ReaderContext
	  
	  Gain: MAX_READERNAME*PCSCLITE_MAX_READERS_CONTEXTS = 100*16 =
	  1600 bytes fo RAM on pcscd
	* [r5214] src/winscard.c: SCardStatus(): remove a useless test
	  
	  lpcReader can't be larger than MAX_BUFFER_SIZE (264) since its
	  buffer is only MAX_READERNAME (100) bytes long. And I don't see
	  why we need this test anyway.
	* [r5213] src/eventhandler.c, src/winscard.c: Complete change
	  started in revision 5212
	  
	  rContext->readerState is never NULL now. So do not even check its
	  value.
	* [r5212] src/eventhandler.c, src/eventhandler.h,
	  src/pcsc-wirecheck-gen.c, src/readerfactory.c,
	  src/winscard_clnt.c: Get rid of the readerID field in struct
	  pubReaderStatesList
	* [r5211] src/readerfactory.c, src/readerfactory.h: Remove unused
	  RFSuspendAllReaders() and RFAwakeAllReaders()

2010-08-31  Ludovic Rousseau

	* [r5204] src/eventhandler.c: Reformat

2010-08-30  Ludovic Rousseau

	* [r5202] src/winscard_msg_srv.c: InitializeSocket(): do not set
	  the execution bit on the socket file. It is useless.

2010-08-27  Ludovic Rousseau

	* [r5196] src/debug.c, src/error.c, src/utils.c, src/utils.h: svn
	  propset svn:keywords 'Author Date Id Revision'
	* [r5195] src/utils.c: GetDaemonPid(): use open(3) instead of
	  fopen(3) to avoid an internal malloc() call and gain some CPU
	  cycles
	* [r5194] src/hotplug_libhal.c: HPAddDevice(): wait 1 millisecond
	  instead of 1 second until the device is visible to libusb/etc.

2010-08-25  Ludovic Rousseau

	* [r5183] src/winscard_clnt.c: Doxygen:
	  SCardCheckDaemonAvailability() do not invalidate handles after a
	  fork() any more

2010-08-23  Ludovic Rousseau

	* [r5179] src/hotplug_libusb.c: HPReadBundleValues(): use the new
	  Info.plist parsing API.
	  
	  Parsing the CCID Info.plist (159 readers supported) was on a ARM9
	  machine 13193049 µs and is now 258262 µs => gain x51 or 5008%
	* [r5178] src/readerfactory.c: RFBindFunctions(): rename rv in rvl
	  to avoid warnings warning: declaration of ‘rv’ shadows a previous
	  local
	  
	  Also change type from DWORD to int since DYN_GetAddress() returns
	  an int
	* [r5177] src/readerfactory.c: RFLoadReader(): optimize the
	  detection of Ifd Handler version by checking for
	  "IFDHCreateChannelByName", "IFDHCreateChannel" and then
	  "IO_Create_Channel" instead of the 3 symbols at once.
	  
	  Also suppress the error message suppression. Ifd handler v2 or v1
	  will display one or two errors for symbols not found.
	* [r5175] src/hotplug_libhal.c: HPReadBundleValues(): duplicate the
	  readerName and CFBundleName strings since the originals are
	  destroyed by bundleRelease() later
	  
	  The reader names were corrupted.

2010-08-18  Ludovic Rousseau

	* [r5160] ChangeLog: Fix typo

2010-08-17  Ludovic Rousseau

	* [r5157] src/hotplug_libhal.c: HPReadBundleValues(): use the new
	  Info.plist parsing API.
	  
	  Parsing the CCID Info.plist (159 readers supported) was on a i386
	  machine 264306 µs and is now 5547 µs => gain x47 or 4600%
	* [r5156] src/parser.h, src/tokenparser.l: parse the Info.plist
	  file only once and generate a list of key/values
	* [r5152] src/hotplug_libusb.c: HPSearchHotPluggables(): create the
	  synchronisation pipe only if the HPEstablishUSBNotifications
	  thread is created. Avoids to leak resources.
	* [r5151] src/hotplug_libusb.c: HPSearchHotPluggables(): wait for
	  initial readers to setup only if HPEstablishUSBNotifications is
	  created. Otherwise the process is blocked for ever.
	* [r5150] src/hotplug_libhal.c: HPRegisterForHotplugEvents():
	  having no bundle for USB readers is not an error. USB
	  support/hotplug is just disabled.
	* [r5149] src/pcscdaemon.c: main(): Log a message if
	  HPRegisterForHotplugEvents() fails
	* [r5148] src/hotplug_libusb.c: Do not hardcode the libusb-1.0
	  include header path (remove the libusb-1.0/ part)

2010-08-16  Ludovic Rousseau

	* [r5147] configure.in: Do not hardcode the libusb.h path.
	  
	  See Debian bug #591782 ccid: FTBFS on kfreebsd-*: configure:
	  error: libusb.h not found
	* [r5146] c.sh: add --sysconfdir=/etc
	* [r5145] src/pcscdaemon.c: Do not allow restricting defaults
	  values of --max-thread, --max-card-handle-per-thread or
	  --max-card-handle-per-reader when restricted
	* [r5144] src/pcscdaemon.c: Do not allow APDU logging when
	  restricted
	* [r5143] src/pcscdaemon.c: If the process is setuid or setgid it
	  may have some restrictions
	  
	  Do not allow to specify a configuration file when restricted

2010-08-15  Ludovic Rousseau

	* [r5138] ChangeLog, configure.in: release 1.6.4
	* [r5137] configure.in: Do not use sysconfdir as configuration
	  directory but ${sysconfdir}/reader.conf.d instead.
	  
	  Use --enable-confdir=DIR if you want to set a specific value
	  without the reader.conf.d appended.
	  
	  Thanks to Kalev Lember for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0150.html
	* [r5135] ChangeLog, configure.in: release 1.6.3
	* [r5134] src/PCSC/pcsclite.h.in, src/PCSC/winscard.h: Define
	  LPSCARD_READERSTATE since this is used in the MSDN prototype.
	  
	  Use LPSCARD_READERSTATE in winscard.h instead of
	  (SCARD_READERSTATE *) to mimic the MSDN API.
	  
	  This partly reverts changeset 5096

2010-08-13  Ludovic Rousseau

	* [r5130] UnitaryTests/SCard_fork.py: Also call SCardDisconnect()
	  and SCardReleaseContext() in the forked process
	* [r5129] src/winscard_svc.c: ContextThread(): goto exit if
	  MSGCheckHandleAssociation() fails instead of just returning no
	  error.
	  
	  Something wrong happened on the client side (like a fork) and the
	  client needs to call SCardEstablishContext() to create a new
	  connection.
	* [r5128] src/winscard_svc.c: ContextThread(): fix goto label when
	  it _is_ an overflow
	* [r5127] src/winscard_svc.c: ContextThread(): fix goto label when
	  it is not an overflow
	* [r5126] src/winscard_clnt.c: Revert changeset 5102 to add
	  profiling on the client side again.
	  
	  ltrace(1) can't be used with a dynamically loaded (dlopen(3))
	  library like it is the case with the majority of PKCS#11 client
	  application.
	* [r5125] src/simclist.c: Reset mid field when the list is empty to
	  avoid assert() errors
	* [r5124] src/winscard_svc.c: MSGCheckHandleAssociation(): check
	  that the context handle is still valid. Calling a PC/SC function
	  after SCardReleaseContext() is not supported.
	* [r5123] src/eventhandler.c: Fix typo in comment

2010-08-05  Ludovic Rousseau

	* [r5118] configure.in: remove debug line
	* [r5117] configure.in: "/reader.conf.d" is only appended to
	  sysconfdir if no value of sysconfdir is provided
	  
	  Thanks to Patrice Angelini for the bug report
	* [r5114] src/hotplug_libusb.c: HPAddHotPluggable(): do not use
	  libusb_strerror() since it is not yet available in current stable
	  libusb (1.0.8)
	* [r5113] src/ifdwrapper.c: Fix compilation warnings
	  ifdwrapper.c:166:7: warning: "IFDHANDLERv2" is not defined
	  ifdwrapper.c:589:7: warning: "IFDHANDLERv2" is not defined
	  ifdwrapper.c:640:7: warning: "IFDHANDLERv3" is not defined
	* [r5112] src/ifdwrapper.c: Check that either IFDHANDLERv1,
	  IFDHANDLERv2 or IFDHANDLERv3 is defined if PCSCLITE_STATIC_DRIVER
	  is used
	* [r5111] c.sh: No need to use -D_REENTRANT. It was needed for
	  LinuxThreads but we do not use LinuxThreads since a long time.
	  
	  See Debian bug #475101 "Remove obsolete -D_REENTRANT requirement"

2010-08-04  Ludovic Rousseau

	* [r5107] ChangeLog, configure.in: release 1.6.2
	* [r5106] src/Makefile.am: Remove useless $(COREFOUNDATION) from
	  libpcsclite_la_LIBADD The library has no Mac OS X specific code.
	* [r5105] src/Makefile.am: Remove undefined $(LIBSMARTCARD) from
	  libpcsclite_la_LIBADD
	* [r5104] src/Makefile.am: libpcsclite does not use dlopen() so no
	  need to link with $(LIBDL)

2010-08-03  Ludovic Rousseau

	* [r5102] src/winscard_clnt.c: Remove client side profiling since
	  we can use ltrace(1) with better results
	* [r5098] configure.in: Remove 2 debug traces

2010-08-02  Ludovic Rousseau

	* [r5097] src/PCSC/winscard.h, src/winscard.c, src/winscard_clnt.c:
	  Use "SCARD_IO_REQUEST *" instead of LPSCARD_IO_REQUEST and "const
	  SCARD_IO_REQUEST *" instead of "LPCSCARD_IO_REQUEST
	  
	  Should make the code more easy to read
	* [r5096] doc/example/pcsc_demo.c, src/PCSC/pcsclite.h.in,
	  src/PCSC/winscard.h, src/testpcsc.c, src/utils/formaticc.c,
	  src/winscard.c, src/winscard_clnt.c: Use SCARD_READERSTATE
	  instead of SCARD_READERSTATE_A
	  
	  Remove definitions of SCARD_READERSTATE_A PSCARD_READERSTATE_A
	  and LPSCARD_READERSTATE_A types
	* [r5093] configure.in: Use $libdir instead of $prefix/lib to set
	  the default value of usbdropdir
	  
	  " Fedora uses /usr/lib on 32 bit and /usr/lib64 on 64 bit
	  multilib platforms. "
	  
	  Thanks to Kalev Lember for the idea.
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0108.html
	* [r5092] c.sh: sysconfdir=/etc by default if prefix=/usr so remove
	  the --sysconfdir line
	* [r5091] UnitaryTests/SCardBeginTransaction_Disconnect.py,
	  UnitaryTests/SCardConnect_DIRECT.py,
	  UnitaryTests/SCardConnect_DIRECT2.py,
	  UnitaryTests/SCardExclusiveBehaviour.py,
	  UnitaryTests/SCardReconnect.py, UnitaryTests/reset_card.py: Do
	  not duplicate the reader index to avoids problems when I want to
	  change it.

2010-08-01  Ludovic Rousseau

	* [r5082] configure.in: Set sysconfdir to /etc if prefix=/usr
	  
	  You should have a default working configuration only with
	  --prefix=/usr

2010-07-31  Ludovic Rousseau

	* [r5081] c.sh: --enable-muscledropdir is no more supported by
	  pcsc-lite since a long time. So remove the line.
	* [r5080] c.sh: --enable-usbdropdir=/usr/lib/pcsc/drivers is now
	  the default value. So remove the line.
	* [r5079] configure.in: Default value of usbdropdir is now
	  $prefix/lib/pcsc/drivers instead of $prefix/pcsc/drivers
	  
	  The new path is the path used on Debian (with prefix-/usr). So no
	  need to change the default value.

2010-07-27  Ludovic Rousseau

	* [r5073] src/Makefile.am: Create empty directories used by drivers
	  
	  Thanks to Kalev Lember for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0065.html

2010-07-26  Ludovic Rousseau

	* [r5071] src/hotplug_libhal.c, src/pcscdaemon.c, src/utils.c,
	  src/winscard.c: Do not affect and check a variable on the same
	  line
	* [r5070] src/readerfactory.c: reformat
	* [r5069] src/winscard.c: Get the value of rContext before its use.
	  A simple call to SCardTransmit() crashed with a NULL pointer.

2010-07-08  Ludovic Rousseau

	* [r5066] src/readerfactory.c: fix crash with empty config dir
	  
	  Thanks to Kalev Lember for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0017.html
	  
	  pcscd attempts to read uninitialized memory and free an invalid
	  pointer when its configuration directory is empty.
	  
	  The patch fixes this by initializing reader_list to NULL.
	  
	  ==2658== Conditional jump or move depends on uninitialised
	  value(s) ==2658== at 0x40A2EF: RFStartSerialReaders
	  (readerfactory.c:1324) ==2658== by 0x40743F: main
	  (pcscdaemon.c:522) ==2658== ==2658== Use of uninitialised value
	  of size 8 ==2658== at 0x40A2F5: RFStartSerialReaders
	  (readerfactory.c:1327) ==2658== by 0x40743F: main
	  (pcscdaemon.c:522) ==2658== ==2658== Conditional jump or move
	  depends on uninitialised value(s) ==2658== at 0x4C26D25: free
	  (vg_replace_malloc.c:325) ==2658== by 0x40A404:
	  RFStartSerialReaders (readerfactory.c:1348) ==2658== by 0x40743F:
	  main (pcscdaemon.c:522) ==2658== ==2658== Invalid free() / delete
	  / delete[] ==2658== at 0x4C26D72: free (vg_replace_malloc.c:325)
	  ==2658== by 0x40A404: RFStartSerialReaders (readerfactory.c:1348)
	  ==2658== by 0x40743F: main (pcscdaemon.c:522) ==2658== Address
	  0x4222148 is not stack'd, malloc'd or (recently) free'd
	  
	  --- pcsc-lite-1.6.1/src/readerfactory.c.orig2010-07-04
	  23:42:14.000000000 +0300 +++
	  pcsc-lite-1.6.1/src/readerfactory.configuration2010-07-04
	  23:42:23.000000000 +0300 @@ -1312,7 +1312,7 @@ void
	  RFCleanupReaders(void) #ifdef USE_SERIAL int
	  RFStartSerialReaders(const char *readerconf) {
	  -readerconfSerialReader *reader_list; +reader_listSerialReader
	  *reader_list = NULL; int i, rv; /* remember the configuration
	  filename for * RFReCheckReaderConf() */
	* [r5065] c.sh, configure.in, src/pcscd.h.in: more idiomatic
	  sysconfdir usage
	  
	  Thanks to Kalev Lember for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0015.html
	  
	  > URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5060 > Log:
	  set --sysconfdir=/etc/reader.conf.d so that we parse any file in
	  > this directory > > [...] > - --sysconfdir=/etc \ > +
	  --sysconfdir=/etc/reader.conf.d \
	  
	  It's more common to set sysconfdir to /etc and have configure
	  script figure out the subdirectory. The configure script should
	  always default to sane values when no arguments are specified.
	  The default value for sysconfdir is /usr/local/etc; so the
	  configure script should just append /reader.conf.d to that. Right
	  now if the user doesn't override sysconfdir, pcsc will try to go
	  through every .conf file in /usr/local/etc, and I don't think
	  anything good will come out of that.
	  
	  I have a patch attached which should make it more idiomatic:
	  default to $sysconfdir/reader.conf.d directory.

2010-07-02  Ludovic Rousseau

	* [r5062] src/pcscd.h.in: remove PCSCLITE_READER_CONFIG now useless
	* [r5061] src/pcscdaemon.c: main(): use PCSCLITE_CONFIG_DIR instead
	  of PCSCLITE_READER_CONFIG to use the directory configured using
	  --sysconfdir=...
	* [r5060] c.sh: set --sysconfdir=/etc/reader.conf.d so that we
	  parse any file in this directory
	* [r5059] src/configfile.l: DBGetReaderListDir(): add a log line
	  when parsing a directory (containing config files)
	* [r5058] src/readerfactory.c, src/readerfactory.h, src/winscard.c:
	  RFCheckSharing(), RFLockSharing(), RFUnlockSharing() &
	  RFUnlockAllSharing(): add the READER_CONTEXT * rContext parameter
	  to avoid recomputing it internally (gain a few CPU cycles)

2010-06-29  Ludovic Rousseau

	* [r5047] src/configfile.h, src/configfile.l, src/debuglog.c,
	  src/dyn_hpux.c, src/dyn_macosx.c, src/dyn_unix.c,
	  src/eventhandler.c, src/eventhandler.h, src/hotplug_generic.c,
	  src/hotplug_libhal.c, src/hotplug_libusb.c, src/hotplug_linux.c,
	  src/hotplug_macosx.c, src/ifdwrapper.c, src/ifdwrapper.h,
	  src/pcscdaemon.c, src/readerfactory.c, src/readerfactory.h,
	  src/sys_generic.h, src/sys_unix.c, src/testpcsc.c,
	  src/winscard.c, src/winscard_clnt.c, src/winscard_msg.h,
	  src/winscard_svc.c, src/winscard_svc.h: update copyright date
	* [r5046] src/hotplug_libusb.c: Remove declaration of 3 static
	  functions since they are defined before use. Declaration is then
	  useless.
	* [r5045] configure.in: check for libusb-1.0 instead of libusb-0.1
	* [r5044] src/hotplug_libusb.c: port from libusb-0.1 to libusb-1.0

2010-06-25  Ludovic Rousseau

	* [r5040] UnitaryTests/MCT_ReaderDirect.py,
	  UnitaryTests/control_get_firmware.py,
	  UnitaryTests/control_switch_interface.py,
	  UnitaryTests/stress_get_firmware.py: use readers() from
	  smartcard.System instead of smartcard.pcsc.PCSCReader
	  
	  readers() method is now a staticmethod of the PCSCReader class
	  since pyscard subversion revision 500.

2010-06-24  Ludovic Rousseau

	* [r5039] src/pcscdaemon.c: signal_trap(): implement a "Forced
	  suicide" mechanism.
	  
	  After 3 Ctrl-C without much reaction from pcscd (in fact the
	  drivers) we force the suicide. Sometimes libusb is blocked in a
	  kind of dead-lock and kill -9 was the only option.
	* [r5038] UnitaryTests/stress_apdu.py,
	  UnitaryTests/stress_get_firmware.py: - better display the list of
	  available readers - display the command duration and log to
	  stderr if the duration is more than 1 second indicating a problem
	* [r5037] UnitaryTests/stress_get_firmware.py: get firmware version
	  of Gemalto readers in loop
	* [r5036] UnitaryTests/stress_apdu.py: send an apdu in loop

2010-06-22  Ludovic Rousseau

	* [r5032] src/PCSC/debuglog.h: Add Log5() function
	* [r5031] src/PCSC/ifdhandler.h: fix a comment
	* [r5029] src/PCSC/ifdhandler.h, src/eventhandler.c: Add support of
	  TAG_IFD_STOP_POLLING_THREAD to request the stop of the driver
	  polling function.

2010-06-21  Ludovic Rousseau

	* [r5023] configure.in: Use AC_CHECK_FUNCS() instead of
	  AC_CHECK_FUNC() to have HAVE_PTHREAD_CANCEL defined when needed.
	  
	  AC_CHECK_FUNC() defined nothing so HAVE_PTHREAD_CANCEL was not
	  defined even if pthread_cancel() was available.

2010-06-17  Ludovic Rousseau

	* [r5009] src/pcscdaemon.c: main(): in case of auto exit create a
	  new session so that Ctrl-C on the application will not also quit
	  pcscd
	  
	  Thanks to Thierry Fabre for reporting the bug

2010-06-13  Ludovic Rousseau

	* [r4992] src/winscard_msg.h: typo in comment

2010-06-12  Ludovic Rousseau

	* [r4991] UnitaryTests/SCardBeginTransaction_Disconnect.py,
	  UnitaryTests/SCardBlockingBehaviourTest.py,
	  UnitaryTests/SCardCancel.py, UnitaryTests/SCardConnect_DIRECT.py,
	  UnitaryTests/SCardConnect_DIRECT2.py,
	  UnitaryTests/SCardExclusiveBehaviour.py,
	  UnitaryTests/SCardGetAttrib.py, UnitaryTests/SCardReconnect.py,
	  UnitaryTests/SCard_fork.py, UnitaryTests/ThreadSafe.py,
	  UnitaryTests/ThreadSafeConnect.py, UnitaryTests/reset_card.py:
	  return exception from smartcard.pcsc.PCSCExceptions when
	  appropriate

2010-06-09  Ludovic Rousseau

	* [r4986] src/simclist.c: Avoid a division by 0. Closes [#312555]
	  simclist bug in pcsc-lite
	* [r4985] src/simclist.c, src/simclist.h: update to version version
	  1.4.4rc4 Apr 2010

2010-06-07  Ludovic Rousseau

	* [r4983] src/winscard_clnt.c: SCardEstablishContext(): if pcscd is
	  stared by libpcsclite then close all file handles except stdin,
	  stdout and stderr so that pcscd does not confiscate ressources
	  allocated by the application
	  
	  Thanks to Thierry Fabre for the bug report

2010-06-04  Ludovic Rousseau

	* [r4978] configure.in: release 1.6.1
	* [r4977] ChangeLog: release 1.6.1

2010-06-01  Ludovic Rousseau

	* [r4974] src/misc.h, src/strlcpycat.h, src/tokenparser.l: update
	  copyright date
	* [r4969] src/pcscdaemon.c, src/sys_unix.c: pcscd: do not return
	  before most of the initialisation are done correctly. The idea is
	  that pcscd can return an error code if the daemon fails to start
	  correctly (hald not started for example).
	  
	  Before the patch pcscd became a daemon, then returned 0 (success)
	  and then continued with the initialisation. If the initialisation
	  failed it was too late to return an error code. The
	  /etc/init.d/pcscd script was not aware of the failure.
	  
	  Closes https://bugzilla.redhat.com/show_bug.cgi?id=580321
	  "/usr/sbin/pcscd exit codes broken"

2010-05-31  Ludovic Rousseau

	* [r4968] src/pcscdaemon.c: main(): return EXIT_FAILURE instead of
	  EXIT_SUCCESS if a unknown argument is passed

2010-05-29  Ludovic Rousseau

	* [r4967] src/winscard_msg.h, src/winscard_svc.c: Avoids a crash if
	  a client sends a unknown command.
	  
	  Thanks to Martin Vogt for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q2/0096.html

2010-05-27  Ludovic Rousseau

	* [r4964] src/winscard.c: SCardControl(): do not check for card
	  events since we are talking to the reader not the card. A smart
	  card removal should not make SCardControl() fail with
	  SCARD_W_REMOVED_CARD

2010-05-20  Ludovic Rousseau

	* [r4957] UnitaryTests/SCardGetAttrib.py: get
	  SCARD_ATTR_VENDOR_IFD_SERIAL_NO PC/SC attribute

2010-05-18  Ludovic Rousseau

	* [r4954] src/PCSC/reader.h.in: Add
	  PCSCv2_PART10_PROPERTY_bPPDUSupport
	* [r4953]
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange.py,
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py:
	  Also display the return value of SCardReleaseContext()
	* [r4952] src/pcscd.h.in, src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_msg.h, src/winscard_svc.c: MessageSend(),
	  MessageReceive() & MessageSendWithHeader() do not timeout any
	  more. If the other side of the socket dies we will get an error
	  from the kernel.
	  
	  Add a new MessageReceiveTimeout() to implement
	  SCardGetStatusChange() with a timeout.
	  
	  The constants PCSCLITE_WRITE_TIMEOUT & PCSCLITE_READ_TIMEOUT are
	  now also removed.
	  
	  The problem was that if a client does nothing during
	  PCSCLITE_READ_TIMEOUT (120 seconds by default) then pcscd
	  considers it as a dead client and closes the connection. I guess
	  this problem was present since the first version of pcsc-lite but
	  nobody complained before.
	  
	  Thanks to Thierry Fabre for the bug report.
	* [r4951] src/pcscdaemon.c, src/winscard_clnt.c,
	  src/winscard_msg.c, src/winscard_msg.h, src/winscard_msg_srv.c,
	  src/winscard_svc.c: rename SHMfoobar() functions in foobar()
	  since we do not use shared memory (SHM) anymore

2010-05-17  Ludovic Rousseau

	* [r4949] src/hotplug_libusb.c: Add a synchronisation so that if
	  pcscd is auto started the initial reader list is available before
	  the server takes commands from clients.
	  
	  Before the change early calls of SCardListReaders() returned an
	  empty list of readers even if a reader was connected.
	  
	  Thanks to Patrice Angelini for the bug report
	* [r4948] etc: Remove etc directory completely - serial readers are
	  rare => no need for /etc/reader.conf.d/ - pcscd now autostarts =>
	  no need for /etc/init.d/pcscd script or equivalent
	* [r4947] Makefile.am, configure.in: Do not install files in /etc
	  any more. Serial drivers are rare now.
	* [r4946] etc/Makefile.am: Use $(sysconfdir_exp) instead of
	  (removed) $(confdir_exp)
	  
	  Fixes [#312498] Wrong installation path for reader.conf.d

2010-05-11  Ludovic Rousseau

	* [r4941] UnitaryTests/SCardConnect_DIRECT2.py: Unitary test for
	  bug fixed in revision 4940
	* [r4940] src/winscard.c: SCardConnect() & SCardReconnect(): do not
	  reset the cardProtocol in SCARD_SHARE_DIRECT case since the card
	  have _not_ been reseted. A new PPS negociation would fail.
	  
	  See SCardConnect_DIRECT2.py for a Unitary Test

2010-05-05  Ludovic Rousseau

	* [r4921] ChangeLog: update date and release for 1.6.0
	* [r4920] ChangeLog, configure.in: release 1.6.0

2010-05-04  Ludovic Rousseau

	* [r4918] src/pcscdaemon.c: ExitValue default value is now
	  EXIT_FAILURE instead of EXIT_SUCCESS
	* [r4917] src/pcscdaemon.c: main(): remove dead code "used" when no
	  reader.conf file is found

2010-05-03  Ludovic Rousseau

	* [r4913] src/winscard_clnt.c: SCardEstablishContext(): also log
	  the binary name if execl() fails
	* [r4912] src/eventhandler.c: EHDestroyEventHandler(): use
	  pthread_cancel() only if it is present (not the case on Android)
	* [r4911] configure.in: Add a check for pthread_cancel() (not
	  present on Android)
	* [r4910] src/readerfactory.h: Add missing #include <pthread.h>
	  
	  Compilation failed on Android but not on my Debian as the libC is
	  different on the two systems. On Debian sys/types.h defines
	  pthread types

2010-04-29  Ludovic Rousseau

	* [r4906] src/strlcpycat.h: #include <string.h> on plateform that
	  have strlcpy() to avoid a warning (Mac OS X and Android)
	  
	  error.c: In function ‘pcsc_stringify_error’: error.c:64: warning:
	  implicit declaration of function ‘strlcpy’ error.c:64: warning:
	  nested extern declaration of ‘strlcpy’
	* [r4905] src/hotplug_linux.c: #include <pthread.h>
	  
	  Declare pthread_mutex_* functions
	* [r4904] src/hotplug_linux.c: #include "utils.h"
	  
	  Fix hotplug_linux.c:391: error: ‘THREAD_ATTR_DETACHED’ undeclared
	  (first use in this function)
	* [r4903] src/hotplug_libusb.c: HPEstablishUSBNotifications(): do
	  not call RFReCheckReaderConf if USE_SERIAL is defined. The
	  function is not defined in this case.
	* [r4901] configure.in, src/Makefile.am, src/hotplug_libhal.c,
	  src/pcscdaemon.c, src/readerfactory.c: Add --disable-serial and
	  --disable-usb options
	  
	  --disable-serial removes support of /etc/reader.conf gain: 8.0kB
	  of .text (12%) and 160 bytes of .bss (4%) for pcscd
	  
	  --disable-usb removes support of USB hotplug gain: 9.7kB of .text
	  (14%) and 960 bytes of .bss (23%) for pcscd
	  
	  If you use both options (and use a static driver configuration)
	  gain: 17.7kB of .text (26%) and 1152 bytes of .bss (28%) for
	  pcscd
	* [r4900] src/error.c: Define a minimal pcsc_stringify_error() if
	  NO_LOG is defined. Only the error code in hex is displayed in
	  this case.
	  
	  Gain: 2kB of .text (10%) for libpcsclite
	* [r4899] src/pcscdaemon.c: main(): fork() only in case of auto
	  exit to not detach from the terminal if launched in stand alone
	  forground mode ("pcscd -fda" for example)

2010-04-22  Ludovic Rousseau

	* [r4889] src/pcscdaemon.c: main(): always fork() so that pcscd
	  always return in --auto-exit mode but do not close stdout yet
	  since we may need to send logs
	* [r4888] src/winscard_clnt.c: SCardEstablishContext(): call
	  waitpid() to avoid having a defunct pcscd process when pcscd is
	  auto started by the client.
	  
	  The process becomes defunct because pcscd calls daemon() and
	  daemon() does fork() and exit() in the father. The father death
	  must then be reclaimed by libpcsclite.
	  
	  Thanks to Patrice Angelini for the bug report

2010-04-18  Ludovic Rousseau

	* [r4885] src/Makefile.am, src/eventhandler.c,
	  src/hotplug_libhal.c, src/hotplug_libusb.c, src/hotplug_linux.c,
	  src/ifdwrapper.c, src/pcscdaemon.c, src/readerfactory.c,
	  src/readerfactory.h, src/thread_generic.h, src/thread_unix.c,
	  src/winscard.c, src/winscard_clnt.c, src/winscard_svc.c: Directly
	  use pthread_mutex_* fucntions instead of using wrappers Remove
	  thread_unix.c and thread_generic.h now useless
	* [r4884] src/hotplug_libhal.c, src/hotplug_libusb.c,
	  src/hotplug_linux.c, src/hotplug_macosx.c, src/readerfactory.h,
	  src/utils.c, src/winscard_svc.c: Use pthread_t instead of
	  PCSCLITE_THREAD_T
	* [r4883] src/thread_generic.h, src/utils.h: move thread related
	  definition from thread_generic.h to utils.h
	* [r4882] src/eventhandler.c, src/hotplug_libhal.c,
	  src/hotplug_libusb.c, src/hotplug_linux.c, src/hotplug_macosx.c,
	  src/thread_generic.h, src/thread_unix.c, src/utils.c,
	  src/utils.h, src/winscard_svc.c: Directly use pthread_* instead
	  of SYS_Thread* indirection
	  
	  Move SYS_ThreadCreate in utils.c. This function is not just one
	  pthread_* call

2010-04-16  Ludovic Rousseau

	* [r4877] src/thread_unix.c: SYS_ThreadExit(): remove dead code
	  
	  From Sun Studio CC "thread_unix.c", line 108: warning: statement
	  not reached
	* [r4875] bootstrap: update versions of autotools used

2010-04-15  Ludovic Rousseau

	* [r4874] src/simclist.c: remove ; at end of a { } block defined by
	  a macro. The Solaris compiler complains with: "simclist.c", line
	  1317: warning: syntax error: empty declaration
	  
	  Thanks to Jörg Schilling for the bug report
	* [r4873] src/sys_unix.c: use fork(), close() and chdir() instead
	  of SYS_Fork(), SYS_CloseFile() and SYS_Chdir() in SYS_Daemon() if
	  HAVE_DAEMON is not defined (Solaris)
	  
	  Thanks to Jörg Schilling for the bug report

2010-04-09  Ludovic Rousseau

	* [r4867] src/winscard_svc.c: Log the command return code using
	  DEBUG (SCARD_S_SUCCESS) or ERROR (every thing else) level

2010-04-08  Ludovic Rousseau

	* [r4866] UnitaryTests/reset_card.py: reset a card using
	  SCardDisconnect (default) or SCardReconnect (if an argument is
	  passed)
	* [r4865] UnitaryTests/transmit_loop.py: call SCardTransmit in an
	  endless loop
	* [r4864] src/winscard.c: SCardReconnect(): mimic the code from
	  SCardDisconnect() regarding card event state notifications
	  (changed in revision 4862).
	* [r4863] UnitaryTests/Makefile: no more pcsc_demo target
	* [r4862] src/winscard.c: SCardDisconnect(): Set the card event
	  state to SCARD_RESET _before_ doing the reset.
	  
	  This will avoid an SCardTransmit from another application between
	  the card reset and the card event state change. In the
	  problematic case the SCardTransmit was sending an APDU in T=1 to
	  a reseted card but not yet configured (IFDHSetProtocolParameters
	  was not yet called) and still in T=0 (default)
	* [r4861] src/winscard.c: SCardConnect() & SCardReconnect():
	  correctly log SCARD_PROTOCOL_RAW protocol instead of "unknown"

2010-04-07  Ludovic Rousseau

	* [r4859] src/winscard_msg.c, src/winscard_msg_srv.c: Fix copyright
	  name and date
	* [r4858] src/winscard_msg.c: Doxygen: document SHMMessageReceive()
	  command argument added in revision 4718
	* [r4857] src/winscard_clnt.c: Doxygen:
	  SCARD_ATTR_DEVICE_FRIENDLY_NAME is implemented by
	  SCardGetAttrib() if the IFD Handler (driver) returns
	  IFD_ERROR_TAG. pcsc-lite then returns the same reader name as
	  returned by SCardListReaders.

2010-04-01  Ludovic Rousseau

	* [r4851] src/PCSC/reader.h.in: Add PCSCv2_PART10_PROPERTY_*
	  defines

2010-03-30  Ludovic Rousseau

	* [r4845] src/winscard_clnt.c: SCardEstablishContext(): try to
	  relaunch pcscd if SCardCheckDaemonAvailability() succeeds but
	  SCardEstablishContextTH() fails. This happens if pcscd crashed
	  without cleaning /var/run/pcscd/pcscd.comm

2010-03-26  Ludovic Rousseau

	* [r4843] src/PCSC/reader.h.in: add FEATURE_GET_TLV_PROPERTIES and
	  FEATURE_CCID_ESC_COMMAND from PC/SC part 10 v2.02.07 March 2010

2010-03-22  Ludovic Rousseau

	* [r4839] src/pcscdaemon.c: Call at_exit() instead of exit() since
	  the libC of Android is bogus and atexit() does not work as it
	  should.
	  
	  Thanks to Patrice Angelini for the bug report.
	* [r4838] src/winscard_clnt.c: SCardCheckDaemonAvailability(): use
	  stat(2) instead of the now removed SYS_Stat()

2010-03-19  Ludovic Rousseau

	* [r4836] src/configfile.l, src/pcscdaemon.c, src/sys_generic.h,
	  src/sys_unix.c, src/winscard_msg.c, src/winscard_msg_srv.c,
	  src/winscard_svc.c: Remove the one line wrappers from sys_unix.c
	  and use directly the POSIX functions instead.

2010-03-16  Ludovic Rousseau

	* [r4825] src/Makefile.am: Install pcscd as suid so that autostart
	  works correctly (as root)
	* [r4824] TODO: done: remove as much text messages (logs) as
	  possible
	* [r4823] configure.in: Display PCSCLITE_FEATURES
	* [r4822] configure.in: Add --enable-embedded (default is no) to
	  build pcsc-lite for an embedded system. This will activate the
	  NO_LOG option to disable logging and limit RAM and disk
	  consumption.
	* [r4821] src/PCSC/debuglog.h, src/debug.c, src/debuglog.c,
	  src/hotplug_libhal.c, src/winscard_svc.c: If NO_LOG is defined
	  then no log are displayed. The idea is to limit the binaries size
	  on disk and RAM consumption at execution time.
	  
	  With NO_LOG defined we gain 26% (17 kB) for the .text segment of
	  pcscd and 15% (4 kB) for the .text segment of libpcsclite.so (for
	  i386)
	* [r4820] src/utils.c: Include config.h before the other header
	  files so the configuration set in config.h can be used in the
	  other header files (NO_LOG for example)
	* [r4819] src/configfile.l: Include config.h before the other
	  header files so the configuration set in config.h can be used in
	  the other header files (NO_LOG for example)
	* [r4818] src/Makefile.am, src/debug.c, src/debug.h,
	  src/dyn_hpux.c, src/dyn_macosx.c, src/dyn_unix.c, src/sys_unix.c,
	  src/tokenparser.l, src/utils.c, src/winscard_clnt.c,
	  src/winscard_msg.c: Remove debug.h and use debuglog.h instead.
	  They both define the same log API.

2010-03-12  Ludovic Rousseau

	* [r4813] UnitaryTests/ThreadSafe.py,
	  UnitaryTests/ThreadSafeConnect.py: revert change in revision 4812
	  since the problem is now solved in pyscard (revision 382)
	* [r4812] UnitaryTests/ThreadSafe.py,
	  UnitaryTests/ThreadSafeConnect.py: do not initialise the library
	  in a thread as it crashed on Mac OS X

2010-03-09  Ludovic Rousseau

	* [r4809] src/winscard_svc.c: read only accesses to contextsList
	  list shall also be protected by a mutex
	* [r4808] src/readerfactory.c: read only accesses to handlesList
	  list shall also be protected by a mutex
	* [r4807] src/readerfactory.c, src/readerfactory.h: manipulations
	  of handlesList field of ReaderContext should now be thread safe
	* [r4806] src/winscard_svc.c: MSGRemoveContext(): correctly indent
	  a line
	* [r4805] src/winscard_svc.c: manipulations of cardsList should now
	  be thread safe
	* [r4804] src/winscard_svc.c: remove extra tab
	* [r4803] UnitaryTests/ThreadSafeConnect.py: add more logging
	* [r4802] UnitaryTests/ThreadSafeConnect.py: stress thread safeness
	  of SCardConnect/SCardDisconnect
	* [r4801] src/winscard_svc.c: manipulations of contextsList should
	  now be thread safe
	* [r4800] UnitaryTests/ThreadSafe.py: stress thread safeness

2010-03-04  Ludovic Rousseau

	* [r4793] UnitaryTests/SCardBlockingBehaviourTest.py,
	  UnitaryTests/SCardExclusiveBehaviour.py: make pylint happier
	* [r4792] UnitaryTests/MCT_ReaderDirect.py: make pylint happier
	* [r4791] UnitaryTests/control_get_firmware.py: make pylint happy
	* [r4790] UnitaryTests/control_get_firmware.py: remove useless
	  import
	* [r4789] UnitaryTests/MCT_ReaderDirect.py,
	  UnitaryTests/control_get_firmware.py,
	  UnitaryTests/control_switch_interface.py: use list comprehension
	  instead of map() (more efficient and pylint does not like map())

2010-03-03  Ludovic Rousseau

	* [r4788] UnitaryTests/control_switch_interface.py: make pylint
	  happier

2010-03-02  Ludovic Rousseau

	* [r4784] src/debuglog.c: debuglog.c is only used by pcscd. So no
	  need to use #ifdef PCSCD

2010-03-01  Ludovic Rousseau

	* [r4783] TODO: fix typo

2010-02-26  Ludovic Rousseau

	* [r4779] configure.in, doc/Makefile.am,
	  doc/update-reader.conf.8.in, etc/Makefile.am,
	  etc/update-reader.conf.in, src/configfile.h, src/configfile.l,
	  src/readerfactory.c: Add the ability to parse all the
	  configuration files of a directory instead of just one
	  configuration file. update-reader.conf is then now obsolete.
	  
	  See Debian bug #565896 http://bugs.debian.org/565896

2010-02-25  Ludovic Rousseau

	* [r4778] src/pcscdaemon.c: update copyright

2010-02-23  Ludovic Rousseau

	* [r4769] src/winscard_clnt.c: SCardEstablishContextTH() &
	  SCardGetStatusChange(): completly initialize structures sent to
	  the daemon to avoid a valgrind warning: Syscall param
	  socketcall.send(msg) points to uninitialised byte(s)
	* [r4768] UnitaryTests/SCardBlockingBehaviourTest.py: As of
	  revision r4719 Linux is now Windows "compatible"

2010-02-21  Ludovic Rousseau

	* [r4766] src/misc.h: " The gcc on Solaris 10 combined with the Sun
	  loader appears to not handle the gcc visibility attribute
	  correctly. The sparc version says it is ignored, the x86 version
	  gives linker error. The attached patch sun.gcc.1.5.6-svn-477.txt
	  tries to test for gcc on Sun and not use the visibility
	  attribute. If on a sun and the compiler is not GCC, try and use
	  the Sun __global and __hidden instead. (I did not try the Sun
	  Studio compiler with this.) "
	  
	  Thanks to Douglas E. Engert for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q1/0127.html
	* [r4765] doc/pcscd.8.in: use @sysconfdir_exp@ instead of (removed)
	  @confdir@

2010-02-12  Ludovic Rousseau

	* [r4758] src/readerfactory.c: RFStartSerialReaders(): typo in
	  comment
	* [r4756] src/configfile.l, src/tokenparser.l: Fix 2 compilation
	  warnings
	  
	  configfile.c:1151: warning: ‘input’ defined but not used
	  tokenparser.c:1167: warning: ‘input’ defined but not used
	* [r4755] src/lassert.h: Fix splint error
	  src/pcsc-wirecheck-dist.c:19:164: Body of if clause of if
	  statement is empty
	* [r4754] src/hotplug_libhal.c: HPAddDevice(): fix a memory leak
	* [r4753] src/readerfactory.c: RFRemoveReader(): simplify/factorise
	  the resources deallocation

2010-02-10  Ludovic Rousseau

	* [r4751] etc/update-reader.conf.in: use @sysconfdir@ instead of
	  (the now removed) @confdir@
	  
	  Thanks to Sébastien Lorquet for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q1/0098.html

2010-02-09  Ludovic Rousseau

	* [r4744] src/readerfactory.c, src/readerfactory.h: use a dynamic
	  instead of static allocation for lpcDevice
	* [r4743] src/readerfactory.c: RFAddReader(): allocate an int
	  instead of a DWORD for pFeeds
	  
	  The patch in revision 4741 was not complete
	* [r4742] src/readerfactory.c, src/readerfactory.h: In struct
	  ReaderContext rename pdwMutex to pMutex and change type from
	  PDWORD to int *
	* [r4741] src/readerfactory.c, src/readerfactory.h: In struct
	  ReaderContext rename pdwFeeds to pFeeds and change type from
	  PDWORD to int *
	* [r4740] src/readerfactory.c, src/readerfactory.h: In struct
	  ReaderContext remove the now useless dwBlockStatus field
	* [r4739] src/eventhandler.c, src/ifdwrapper.c,
	  src/readerfactory.c, src/readerfactory.h, src/winscard.c: In
	  struct ReaderContext rename dwSlot to slot and change type from
	  DWORD to int
	* [r4738] src/ifdwrapper.c, src/readerfactory.c,
	  src/readerfactory.h, src/winscard.c: In struct ReaderContext
	  rename dwVersion to version and change type from DWORD to int
	* [r4737] src/ifdwrapper.c, src/readerfactory.c,
	  src/readerfactory.h: In struct ReaderContext change dwPort from
	  DWORD to int and rename it to port
	  
	  Fix a compiler warning readerfactory.c: In function
	  ‘RFReCheckReaderConf’: readerfactory.c:1393: warning: comparison
	  between signed and unsigned
	* [r4736] src/tokenparser.l: Fix compiler warning
	  
	  tokenparser.l: In function ‘tperrorCheck’: tokenparser.l:102:
	  warning: unused parameter ‘token_error’
	* [r4735] src/configfile.l, src/readerfactory.c,
	  src/readerfactory.h: In struct SerialReader rename dwChannelId in
	  channelId since it is an int and no more a DWORD
	* [r4734] src/eventhandler.c: Fix a compiler warning
	  
	  eventhandler.c: In function ‘EHStatusHandlerThread’:
	  eventhandler.c:494: warning: comparison between signed and
	  unsigned
	* [r4733] src/winscard_clnt.c: do not use the uint32_t rv structure
	  field but copy it into rv first to avoid a compiler warning
	  
	  winscard_clnt.c: In function ?SCardReconnect?:
	  winscard_clnt.c:1035: warning: comparison between signed and
	  unsigned winscard_clnt.c: In function ?SCardBeginTransaction?:
	  winscard_clnt.c:1254: warning: comparison between signed and
	  unsigned winscard_clnt.c: In function ?SCardStatus?:
	  winscard_clnt.c:1657: warning: comparison between signed and
	  unsigned winscard_clnt.c: In function ?SCardTransmit?:
	  winscard_clnt.c:2939: warning: comparison between signed and
	  unsigned
	* [r4732] src/PCSC/pcsclite.h.in: force the return codes SCARD_* to
	  be long since the SCard* functions return a LONG type
	* [r4731] src/eventhandler.c, src/readerfactory.c,
	  src/readerfactory.h, src/winscard.c, src/winscard_svc.c: In
	  struct ReaderContext dwLockId is used to store a SCARDHANDLE so
	  change its type from DWORD to SCARDHANDLE and rename the field to
	  hLockId
	  
	  Fix 2 compiler warning: winscard.c: In function
	  'SCardDisconnect': winscard.c:847: warning: comparison between
	  signed and unsigned winscard_svc.c: In function
	  'MSGRemoveContext': winscard_svc.c:807: warning: comparison
	  between signed and unsigned
	* [r4730] src/winscard_msg.c: fix a compilation warning
	  
	  winscard_msg.c: In function ‘SHMMessageReceive’:
	  winscard_msg.c:252: warning: unused parameter ‘command’
	* [r4729] src/winscard_svc.c: fix 2 compilation warnings
	  
	  winscard_svc.c: In function ‘MSGRemoveContext’:
	  winscard_svc.c:776: warning: comparison between signed and
	  unsigned winscard_svc.c: In function ‘MSGAddHandle’:
	  winscard_svc.c:848: warning: comparison between signed and
	  unsigned
	* [r4728] src/eventhandler.h, src/winscard_clnt.c: Use READER_STATE
	  * instead of PREADER_STATE to make it explicit it is a pointer
	* [r4727] src/eventhandler.c, src/eventhandler.h, src/ifdwrapper.c,
	  src/ifdwrapper.h, src/readerfactory.c, src/readerfactory.h,
	  src/winscard.c, src/winscard_svc.c: Use READER_CONTEXT * instead
	  of PREADER_CONTEXT to make it explicit it is a pointer
	* [r4726] src/readerfactory.c: Fix a compilation warning
	  
	  readerfactory.c: In function ‘RFAddReaderHandle’:
	  readerfactory.c:1125: warning: comparison between signed and
	  unsigned
	* [r4725] src/eventhandler.c, src/readerfactory.c,
	  src/readerfactory.h, src/winscard.c: In struct ReaderContext
	  rename "dwContexts" to "contexts" since it is no more a DWORD but
	  a int32_t
	* [r4724] src/winscard_clnt.c: Fix a compilation warning
	  
	  winscard_clnt.c: In function ‘SCardListReaderGroups’:
	  winscard_clnt.c:3258: warning: comparison between signed and
	  unsigned
	* [r4723] src/pcscd.h.in, src/readerfactory.c, src/readerfactory.h:
	  Use dynamic instead of static allocation for the driver library
	  filename. The filename is no more limited to 100 characters.
	  
	  Closes: [#312332] MAX_LIBNAME too short?
	* [r4722] src/pcscdaemon.c, src/winscard_svc.c, src/winscard_svc.h:
	  use int instead of unsigned int for customMaxThreadCounter,
	  customMaxReaderHandles and customMaxThreadCardHandles since
	  list_size() returns an int and we compare the two values (avoid
	  sign mismatch)
	* [r4721] src/winscard_svc.c: fix 2 compilation warnings
	  
	  winscard_svc.c: In function ‘CreateContextThread’:
	  winscard_svc.c:146: warning: comparison between signed and
	  unsigned winscard_svc.c: In function ‘MSGAddHandle’:
	  winscard_svc.c:856: warning: comparison between signed and
	  unsigned

2010-02-08  Ludovic Rousseau

	* [r4720] src/winscard_clnt.c: SCardGetStatusChange(): fix 4
	  compilation warnings
	  
	  winscard_clnt.c: In function ‘SCardGetStatusChange’:
	  winscard_clnt.c:1864: warning: comparison between signed and
	  unsigned winscard_clnt.c:1875: warning: comparison between signed
	  and unsigned winscard_clnt.c:1911: warning: comparison between
	  signed and unsigned winscard_clnt.c:2189: warning: comparison
	  between signed and unsigned
	* [r4719] src/winscard_clnt.c: Make SCardReconnect(), SCardStatus()
	  and SCardTransmit() block instead of returning
	  SCARD_E_SHARING_VIOLATION immediately. These functions will then
	  behave like on Windows.
	  
	  This can happen if these functions are called when the reader is
	  locked by a PCSC transaction
	  (SCardBeginTransaction/SCardEndTransaction).
	  
	  You can define the environment variable PCSCLITE_NO_BLOCKING to
	  use the old behavior.
	  
	  Thanks to Jean-Luc Giraud for the patch.
	  http://archives.neohapsis.com/archives/dev/muscle/2010-q1/0041.html
	* [r4718] src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_msg.h, src/winscard_svc.c: add a command parameter
	  to SHMMessageReceive() to be able log the ongoing command in case
	  of problem

2010-02-05  Ludovic Rousseau

	* [r4717] UnitaryTests/SCardExclusiveBehaviour.py: Check the return
	  value of SCardConnect() on a reader already used in
	  SCARD_SHARE_EXCLUSIVE mode
	* [r4716] src/winscard.c: fix a bug introduced by the previous
	  revision
	* [r4715] src/winscard.c: SCardGetAttrib(): check for buffer
	  overflow with SCARD_ATTR_DEVICE_FRIENDLY_NAME
	  
	  Thanks to Jean-Luc Giraud for complete
	  SCARD_ATTR_DEVICE_FRIENDLY_NAME patch

2010-02-04  Ludovic Rousseau

	* [r4710] src/PCSC/pcsclite.h.in, src/winscard_clnt.c: add a
	  copyright for Martin Paljak

2010-02-03  Ludovic Rousseau

	* [r4708] configure.in, src/pcscd.h.in: Use the standard
	  --sysconfdir=DIR ($prefix/etc by default) instead of
	  --enable-confdir=DIR for defining the directory containing
	  reader.conf
	* [r4707] configure.in: sysconfdir_exp is a configuration directory
	  not configuration file

2010-02-02  Ludovic Rousseau

	* [r4705] src/winscard.c: SCardStatus(): returns
	  SCARD_E_SHARING_VIOLATION if the reader is already used More
	  conform to Windows
	* [r4704] UnitaryTests/SCardBlockingBehaviourTest.py: allow to use
	  any reader and not just the first one
	* [r4703] src/testpcsc.c: test SCARD_ATTR_DEVICE_FRIENDLY_NAME
	* [r4702] src/winscard.c: SCardGetAttrib(): add support of
	  SCARD_ATTR_DEVICE_FRIENDLY_NAME as it is better implemented in
	  pcscd (it knows the friendly name)
	* [r4701] src/winscard_clnt.c: SCardEstablishContext(): set
	  PCSCLITE_PCSCD_ARGS with the argument you want to pass to pcscd
	  in autostart Only one argument is passed. The space character is
	  not a separator. example: export PCSCLITE_PCSCD_ARGS=-dfa
	* [r4700] src/pcscd.h.in, src/pcscdaemon.c, src/winscard_clnt.c,
	  src/winscard_svc.c: pcscd will suicide itself after 60 seconds of
	  inactivity if it is started using --auto-exit This is the default
	  behavior when pcscd is started by libpcsclite
	* [r4699] src/pcscdaemon.c: do not ignore the SIGALRM signal any
	  more since we need it for the auto exit feature

2010-01-22  Ludovic Rousseau

	* [r4685] configure.in: add $host to the PCSCLITE_FEATURES
	  definition (available with "pcscd -v") to display the CPU
	  architecture host is something like x86_64-unknown-linux-gnu
	* [r4683] configure.in: use LT_INIT(disable-static) instead of the
	  deprecated AM_DISABLE_STATIC
	  
	  Thanks to Roumen Petrov

2010-01-21  Ludovic Rousseau

	* [r4682] UnitaryTests/MCT_ReaderDirect.py,
	  UnitaryTests/control_get_firmware.py,
	  UnitaryTests/control_switch_interface.py: do not try to reset the
	  card on exit. We are talking to the reader. A card may NOT be
	  present.
	* [r4681] configure.in, src/Makefile.am: Do not completely disable
	  building the static version of the library but just disable it by
	  default
	  
	  Use AM_DISABLE_STATIC in configure.in instead of -shared in
	  Makefile.am

2010-01-16  Ludovic Rousseau

	* [r4674] UnitaryTests/SCardBlockingBehaviourTest.py: Check the
	  behavior of PCSC functions when a PCSC transaction is ongoing
	  
	  Thanks to Jean-Luc Giraud for the original code
	* [r4673] src/Makefile.am: use -shared to only provide a shared
	  library. If you need to use the static .a library you just need
	  to remove -shared

2010-01-15  Ludovic Rousseau

	* [r4672] UnitaryTests/control_switch_interface.py: parse error
	  code
	* [r4671] UnitaryTests/control_switch_interface.py: improve
	  documentation and output
	* [r4670] src/winscard_clnt.c: Only call SCardCheckSameProcess() if
	  DO_CHECK_SAME_PROCESS is defined (default is not defined).
	  
	  Some thread libraries (on embedded systems for example) have a
	  different pid for each thread of a same process. So the check
	  using getpid() is wrong and handles are invalidated when they
	  should not. The PC/SC function returned SCARD_E_INVALID_HANDLE
	* [r4669] src/winscard_clnt.c: define and use the
	  CHECK_SAME_PROCESS macro instead of calling
	  SCardCheckSameProcess() directly

2010-01-14  Ludovic Rousseau

	* [r4668] src/winscard_clnt.c: Doxygen: update
	  SCardGetStatusChange() doc. The function returns on any events,
	  not just those specified in dwCurrentState
	* [r4667] TODO: For embedded/constained systems
	  
	  - remove as much text messages (logs) as possible to limit the
	  size of the binaries (pcscd and libpcsclite)
	  
	  - use static driver instead of reader polling and dynamic driver
	  loading

2010-01-08  Ludovic Rousseau

	* [r4646] src/readerfactory.c: RFInitializeReader(): do not
	  dynamically load the driver if PCSCLITE_STATIC_DRIVER is defined
	* [r4645] src/ifdwrapper.c: better support of
	  PCSCLITE_STATIC_DRIVER.
	  
	  This is used to statically link the reader driver to pcscd. Since
	  the link is static you must define the IFDHandler API version at
	  compilation time. Either define IFDHANDLERv1, IFDHANDLERv2 or
	  IFDHANDLERv3
	* [r4644] src/dyn_unix.c: fix a warning when compiling with
	  PCSCLITE_STATIC_DRIVER defined
	  
	  dyn_unix.c: In function ‘DYN_CloseLibrary’: dyn_unix.c:47:
	  warning: unused variable ‘ret’

2010-01-03  Ludovic Rousseau

	* [r4635] src/hotplug_macosx.c: hotplug_macosx.c: In function
	  ‘HPDeviceAppeared’: hotplug_macosx.c:70: warning: unused
	  parameter ‘refCon’ hotplug_macosx.c: In function
	  ‘HPDeviceDisappeared’: hotplug_macosx.c:85: warning: unused
	  parameter ‘refCon’

2010-01-02  Ludovic Rousseau

	* [r4634] src/simclist.c: fix a compilation warning
	  simclist.c:1335: warning: unused parameter ‘el’
	* [r4633] src/error.c: pcsc_stringify_error(): spelling error
	  (detected by lintian(1))

2010-01-01  Ludovic Rousseau

	* [r4630] src/ifdwrapper.c: add #include <unistd.h> to declare the
	  timeval structure
	  
	  In file included from ifdwrapper.c:31: utils.h:26: warning:
	  ‘struct timeval’ declared inside parameter list utils.h:26:
	  warning: its scope is only this definition or declaration, which
	  is probably not what you want
	* [r4629] src/dyn_unix.c, src/ifdwrapper.c, src/pcscdaemon.c:
	  better handling of PCSCLITE_STATIC_DRIVER as can be used on
	  plateforms using µClinux (without dynamic loader)
	  
	  Thanks to Guo Wenxue for a proto-patch
	* [r4628] src/hotplug_generic.c, src/hotplug_linux.c,
	  src/hotplug_macosx.c: ReCheckSerialReaders variable is not used
	  anymore
	* [r4627] src/winscard_msg_srv.c: ReCheckSerialReaders variable
	  from hotplug_* is not used anymore

2009-12-18  Ludovic Rousseau

	* [r4621] src/winscard_svc.c: typo in log message

2009-12-15  Ludovic Rousseau

	* [r4616] src/atrhandler.c: ATRDecodeAtr(): reformat
	* [r4615] src/atrhandler.c: ATRDecodeAtr(): check for TA2 (specific
	  mode) even if TD2 is not present "3F 80 10 01" was not parsed
	  correctly for example and T=0 was used instead of T=1 (specific
	  mode)
	* [r4613] UnitaryTests/MCT_ReaderDirect.py: rename
	  FEATURE_MCT_READERDIRECT in FEATURE_MCT_READER_DIRECT
	* [r4612] src/PCSC/reader.h.in: rename FEATURE_MCT_READERDIRECT in
	  FEATURE_MCT_READER_DIRECT to be conform with ch. 2.3 of PCSC v2
	  part 10

2009-12-14  Ludovic Rousseau

	* [r4611] UnitaryTests/SCard_fork.py: Unitary Test for fork()
	  detection

2009-12-11  Ludovic Rousseau

	* [r4608] src/winscard_clnt.c: Doxygen: add missing error codes
	* [r4607] src/winscard_svc.c: ContextThread(): SCARD_CANCEL return
	  SCARD_E_INVALID_HANDLE instead of SCARD_E_INVALID_VALUE if the
	  handle is invalid
	* [r4606] src/winscard_clnt.c: Doxygen: document 2 missing
	  SCARD_F_COMM_ERROR possible return values
	* [r4605] src/winscard_clnt.c: Doxygen: document 3 missing error
	  codes for SCardConnect()
	* [r4604] src/PCSC/pcsclite.h.in: reformat
	* [r4603] src/winscard_clnt.c: use sizeof(SCARD_IO_REQUEST) instead
	  of 8 for the .cbPciLength field This is the correct value on
	  64-bit system.
	* [r4602] src/pcscdaemon.c, src/winscard.c: g_rgSCard*Pci are not
	  used on the server side
	* [r4601] src/pcscdaemon.c: SIGHUP signal has already been set to
	  SIG_IGN. No need to quit on SIGHUP.
	* [r4600] src/pcscdaemon.c: revert revision 4599 and remove the
	  second call to signal() instead of the first one. We need to
	  clean-up as soon as we created the files.
	* [r4599] src/pcscdaemon.c: remove duplicate calls to signal()

2009-12-03  Ludovic Rousseau

	* [r4587] src/winscard_clnt.c: Doxygen: SCardConnect() value 0 for
	  dwPreferredProtocols valid only if dwShareMode is
	  SCARD_SHARE_DIRECT
	* [r4585] src/winscard_clnt.c: use the more efficient
	  SCardCheckSameProcess() instead of SCardCheckDaemonAvailability()
	  to detect use of the API after a fork()

2009-12-02  Ludovic Rousseau

	* [r4583] src/winscard_clnt.c: Doxygen: SCardEstablishContext()
	  Each thread of an application shall use its own SCARDCONTEXT. On
	  Windows the same SCARDCONTEXT can be shared by different threads
	  of same application.

2009-11-27  Ludovic Rousseau

	* [r4580] src/winscard_clnt.c: SCardEstablishContext(): try to
	  start the pcscd daemon if not already running
	* [r4579] configure.in: define PCSCD_BINARY
	* [r4577] src/pcscdaemon.c: improve the checking of an already
	  running pcscd
	* [r4576] src/winscard_clnt.c: Doxygen: For historical reasons the
	  value of SCARD_E_UNSUPPORTED_FEATURE is 0x8010001F in pcsc-lite
	  but 0x80100022 in Windows WinSCard
	* [r4575] src/PCSC/pcsclite.h.in: SCARD_E_UNSUPPORTED_FEATURE is
	  not a PC/SC Lite specific extension, but its numerical value is
	  different on Windows

2009-11-26  Ludovic Rousseau

	* [r4574] src/PCSC/pcsclite.h.in, src/error.c: remove pcsc-lite
	  specific SCARD_W_INSERTED_CARD code
	  
	  SCARD_W_INSERTED_CARD value 0x8010006A was also in collision with
	  SCARD_W_SECURITY_VIOLATION
	* [r4573] src/error.c: reorder error codes

2009-11-24  Ludovic Rousseau

	* [r4570] src/winscard_clnt.c: do not declare the SCardUnload()
	  function removed in revision 4435
	* [r4569] src/winscard_clnt.c: create a SCardInvalidateHandles()
	  function from SCardCheckDaemonAvailability() code
	* [r4568] src/winscard_clnt.c: SCardCheckDaemonAvailability(): do
	  not delete the context since it is already done by
	  SCardCleanContext()
	* [r4567] src/winscard_clnt.c: SCardCleanContext(): deallocate the
	  context memory

2009-11-23  Ludovic Rousseau

	* [r4566] src/winscard_clnt.c: Doxygen: update SCardControl() list
	  of possible error codes partly revert revision 4558
	  
	  Thanks to Martin Paljak for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2009-q4/0079.html

2009-11-19  Ludovic Rousseau

	* [r4562] src/eventhandler.c, src/readerfactory.c,
	  src/winscard_clnt.c, src/winscard_svc.c: use list_delete()
	  instead of list_locate() + list_delete_at()
	* [r4561] src/simclist.c, src/simclist.h: add list_delete()
	  "expunge the first found given element from the list"

2009-11-18  Ludovic Rousseau

	* [r4560] UnitaryTests/MCT_ReaderDirect.py,
	  UnitaryTests/SCardBeginTransaction_Disconnect.py,
	  UnitaryTests/SCardCancel.py, UnitaryTests/SCardConnect_DIRECT.py,
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange.py,
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py,
	  UnitaryTests/SCardReconnect.py,
	  UnitaryTests/control_get_firmware.py,
	  UnitaryTests/control_switch_interface.py: reformat to make
	  pep8(1) happy
	* [r4559] src/winscard_clnt.c: Doxygen improvement
	* [r4558] src/winscard_clnt.c: Doxygen: update SCardControl() list
	  of possible error codes
	* [r4554] src/readerfactory.c, src/winscard_clnt.c,
	  src/winscard_svc.c: add Jean-Luc Giraud in copyright holders
	  because of his patch in revision 4553

2009-11-17  Ludovic Rousseau

	* [r4553] src/Makefile.am, src/pcscd.h.in, src/pcscdaemon.c,
	  src/readerfactory.c, src/readerfactory.h, src/winscard_clnt.c,
	  src/winscard_svc.c, src/winscard_svc.h: Use lists instead of
	  fixed size arrays to store handles.
	  
	  It is now possible to have: - 200 simultaneous PC/SC clients
	  instead of 16 - 200 SCardConnect per client instead of 16 - 200
	  clients per reader instead of 16
	  
	  The default value of 200 can be changed by giving an argument to
	  pcscd --max-thread --max-card-handle-per-thread
	  --max-card-handle-per-reader
	  
	  Thanks to Jean-Luc Giraud for the big patch
	* [r4552] src/readerfactory.c: RFCreateReaderHandle(): add a
	  comment that a 16-bit random is not secure enough

2009-11-16  Ludovic Rousseau

	* [r4549] UnitaryTests/SCardReconnect.py: SCardReconnect() should
	  block instead of returning SCARD_E_SHARING_VIOLATION
	* [r4548] UnitaryTests/SCardConnect_DIRECT.py: typo in text
	* [r4547] src/winscard_svc.c: remove printf() for debug from
	  READ_BODY() macro

2009-11-12  Ludovic Rousseau

	* [r4544] UnitaryTests/BufferOverflow.c, src/PCSC/ifdhandler.h,
	  src/PCSC/pcsclite.h.in, src/PCSC/reader.h.in,
	  src/PCSC/winscard.h, src/PCSC/wintypes.h, src/atrhandler.c,
	  src/atrhandler.h, src/configfile.h, src/configfile.l,
	  src/debug.c, src/debug.h, src/debuglog.c, src/dyn_generic.h,
	  src/dyn_hpux.c, src/dyn_unix.c, src/error.c, src/eventhandler.c,
	  src/eventhandler.h, src/hotplug.h, src/hotplug_libhal.c,
	  src/hotplug_libusb.c, src/hotplug_linux.c, src/ifdwrapper.c,
	  src/ifdwrapper.h, src/lassert.h, src/misc.h, src/parser.h,
	  src/pcsc-wirecheck-gen.c, src/pcscd.h.in, src/pcscdaemon.c,
	  src/powermgt_generic.c, src/readerfactory.c, src/readerfactory.h,
	  src/strlcpycat.h, src/sys_generic.h, src/sys_unix.c,
	  src/thread_generic.h, src/thread_unix.c, src/tokenparser.l,
	  src/utils.c, src/utils.h, src/utils/formaticc.c,
	  src/utils/installifd.c, src/winscard.c, src/winscard_clnt.c,
	  src/winscard_msg.c, src/winscard_msg.h, src/winscard_msg_srv.c,
	  src/winscard_svc.c, src/winscard_svc.h: update copyright dates

2009-11-07  Ludovic Rousseau

	* [r4540] src/winscard_svc.c: remove ducplicate READ_BODY() and
	  WRITE_BODY() macros

2009-11-06  Ludovic Rousseau

	* [r4538] src/winscard_clnt.c: remove useless PCHANNEL_MAP type
	  definition
	* [r4537] src/winscard_clnt.c: remove extra spaces at end of line
	* [r4536] src/hotplug_libusb.c: reindent
	* [r4535] src/hotplug_linux.c: reindent
	* [r4534] src/ifdwrapper.c: reindent
	* [r4533] src/readerfactory.c: RFAddReader(): make comment more
	  clear for TAG_IFD_SLOT_THREAD_SAFE
	* [r4532] src/readerfactory.c: RFAddReader(): make comment more
	  clear for TAG_IFD_THREAD_SAFE

2009-11-05  Ludovic Rousseau

	* [r4531] src/winscard_msg.c, src/winscard_msg_srv.c: use PF_*
	  instead of AF_* for socket(2) argument
	  
	  Thanks to Sébastien Lorquet for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2009-q4/0039.html
	* [r4530] src/winscard_msg.c, src/winscard_msg_srv.c: Revert change
	  in revision 4395. Solaris does not have (Posix) AF_LOCAL
	  
	  Thanks to Douglas E. Engert for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2009-q4/0038.html

2009-11-03  Ludovic Rousseau

	* [r4529] src/readerfactory.h: remove useless pointer types

2009-11-02  Ludovic Rousseau

	* [r4528] src/winscard_clnt.c: SCardConnect(), SCardDisconnect() &
	  SCardReleaseContext(): correctly handle error cases profiling

2009-10-28  Ludovic Rousseau

	* [r4527] src/readerfactory.h, src/thread_generic.h,
	  src/thread_unix.c, src/winscard_clnt.c: remove the type
	  PCSCLITE_MUTEX_T and use an explicit pointer type (PCSCLITE_MUTEX
	  *) instead
	  
	  This should avoid bugs like the one corrected in revision 4525
	* [r4525] src/eventhandler.c: correctly use the lock API for
	  ClientsWaitingForEvent_lock
	* [r4524] src/pcscdaemon.c, src/readerfactory.c,
	  src/readerfactory.h: call exit() in SVCServiceRunLoop() instead
	  of RFCleanupReaders() and remove the RFCleanupReaders() parameter
	* [r4523] src/readerfactory.c: use return() instead of exit() if
	  DYN_GetAddress() fails
	* [r4522] src/eventhandler.c: explicitly use (void)fct() to ignore
	  the returned value

2009-10-27  Ludovic Rousseau

	* [r4520] src/eventhandler.c: EHStatusHandlerThread(): call
	  EHSignalEventToClients() _after_ logging "Card inserted into ..."
	* [r4519] src/winscard_svc.c: ContextThread(): add the client ID to
	  the command log message
	* [r4518] src/winscard_clnt.c: SCardGetStatusChange(): use
	  SCARD_*_CONTEXT constants instead of numerical values
	* [r4517] src/eventhandler.h, src/winscard.c: move SCARD_*_CONTEXT
	  from winscard.c to eventhandler.h
	* [r4516] src/winscard.c: remove useless SCARD_NO_LOCK define
	* [r4515] src/eventhandler.c: update comment
	* [r4514] src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_svc.c: SHMMessageReceive() now returns -2 in case of
	  timeout and -1 in case of other error
	  
	  This is used to correctly handle timeouts in
	  SCardGetStatusChange()
	* [r4513] src/winscard_svc.c: ContextThread(): when a client dies
	  call EHTryToUnregisterClientForEvent() to unregister it if needed
	* [r4512] src/eventhandler.c, src/eventhandler.h: add
	  EHTryToUnregisterClientForEvent()

2009-10-18  Ludovic Rousseau

	* [r4497] src/winscard_msg.c: SHMMessageSend(): document the use of
	  MSG_NOSIGNAL to ignore SIGPIPE signal

2009-10-13  Ludovic Rousseau

	* [r4491] src/Makefile.am: do not use PCSC_CLIENT_SRC variable
	  anymore since SCF support has been removed
	* [r4490] src/Makefile.am: libpcsclite does not need to have
	  dyn_hpux.c, dyn_macosx.c or dyn_unix.c. These files define
	  DYN_LoadLibrary/DYN_CloseLibrary/DYN_GetAddress
	* [r4489] pbx, pcsc.pbproj: remove Xcode files. Apple has its own
	  version of pcsc-lite for Mac OS X
	* [r4488] src/winscard_clnt.c: Doxygen(): better documentation for
	  SCardCheckDaemonAvailability()
	* [r4487] src/winscard_clnt.c: revert changeset 4485.
	  SCardCheckDaemonAvailability() is also used to invalidate the
	  PC/SC handles after a fork or a pcscd restart
	* [r4486] configure.in, src/Makefile.am, src/winscard_scf.c: remove
	  SCF support (PC/SC over Smart Card Framework). I never used this
	  feature and SCF is now dead and replaced by JSR 268
	  (javax.smartcardio)

2009-10-12  Ludovic Rousseau

	* [r4485] src/winscard_clnt.c: SCardReleaseContext(),
	  SCardConnect(), SCardReconnect(), SCardDisconnect(),
	  SCardBeginTransaction(), SCardEndTransaction(),
	  SCardCancelTransaction(), SCardStatus(), SCardGetStatusChange(),
	  SCardControl(), SCardGetSetAttrib(), SCardTransmit(),
	  SCardListReaders(), SCardFreeMemory()SCardListReaderGroups(),
	  SCardIsValidContext(): do not SCardCheckDaemonAvailability()
	  since we will try to talk to the server later. Any communication
	  problem will be reported by SHMMessageSendWithHeader()
	* [r4484] src/winscard_clnt.c: SCardDisconnect(): factorize exit
	  code
	* [r4483] src/winscard_clnt.c: SCardReconnect(): factorize exit
	  code
	* [r4482] src/winscard_clnt.c: SCardConnect(): factorize exit code
	* [r4481] src/winscard_clnt.c: SCardReleaseContext(): release
	  context even if communication with the server fails
	* [r4480] src/winscard_msg.c: SHMMessageSend(): use send(...,
	  MSG_NOSIGNAL) instead of write(...) to avoid receiving a SIGPIPE
	  signal if pcscd has exited. We just get EPIPE as return value
	* [r4479] src/winscard_clnt.c: SCardReconnect(),
	  SCardBeginTransaction(), SCardEndTransaction(),
	  SCardCancelTransaction(), SCardControl(), SCardGetSetAttrib() and
	  SCardTransmit(): do not "synchronize reader states with daemon"
	  since reader availability checks are done on the server side.

2009-10-09  Ludovic Rousseau

	* [r4476] src/winscard_clnt.c: Doxygen improvement
	* [r4474] src/PCSC/ifdhandler.h: Doxygen: define an IFDHandler
	  group
	* [r4473] src/PCSC/ifdhandler.h: Add Doxygen documentation of the
	  IFD Handler API
	* [r4472] src/PCSC/ifdhandler.h: remove IFD_Handler 1.0 functions
	  prototypes
	* [r4471] src/winscard_clnt.c: Doxygen: use @param[in,out] for in
	  and out parameters

2009-10-08  Ludovic Rousseau

	* [r4468] doc/example/pcsc_demo.c: cleanly exits in case of unknown
	  protocol
	* [r4467] doc/example/pcsc_demo.c: use SCARD_AUTOALLOCATE for
	  SCardListReaders()
	* [r4466] src/simclist.c, src/simclist.h: remove svn:executable
	  property on source files
	* [r4465] src/sys_generic.h, src/sys_unix.c: Define SYS_Fork() only
	  if used (if HAVE_DAEMON is not set)
	* [r4464] src/sys_generic.h, src/sys_unix.c: Remove useless
	  SYS_GetPageSize(), SYS_MemoryMap(), SYS_PublicMemoryMap(),
	  SYS_PublicMemoryUnmap() and SYS_MMapSynchronize()
	* [r4463] src/sys_generic.h, src/sys_unix.c: Remove useless
	  SYS_ReadFile()
	* [r4462] src/sys_generic.h, src/sys_unix.c: Remove useless
	  SYS_SeekFile()
	* [r4461] src/sys_generic.h: Remove SYS_ChangePermissions()
	  prototype (the function is NOT defined anywhere)
	* [r4460] src/sys_generic.h, src/sys_unix.c: Remove useless
	  SYS_GetUID() & SYS_GetGID()
	* [r4459] src/sys_generic.h, src/sys_unix.c: Remove useless
	  SYS_GetPID()
	* [r4458] src/sys_generic.h, src/sys_unix.c, src/winscard_clnt.c:
	  SYS_Initialize() does nothing. Remove it.
	* [r4457] src/readerfactory.c: Comment out RFSuspendAllReaders()
	  and RFAwakeAllReaders(). We do not yet support suspend/resume on
	  Linux
	* [r4456] src/readerfactory.c, src/readerfactory.h: remove useless
	  RFListReaders()
	* [r4455] src/readerfactory.c, src/readerfactory.h: remove useless
	  RFUnblockContext()
	* [r4454] src/readerfactory.c, src/readerfactory.h, src/winscard.c:
	  remove useless RFUnblockReader()
	* [r4453] src/pcscd.h.in, src/readerfactory.c, src/winscard_clnt.c:
	  do not use contextBlockStatus tpo block/unblock a context. We now
	  use SCardCancel() on the server side to unblock
	  SCardGetStatusChange()
	* [r4452] doc/Makefile.am, doc/pcsc-lite.bib, doc/pcsc-lite.tex:
	  The .tex documentation is no more maintained. The reference
	  WinSCard API documentation is from Doxygen now.
	* [r4451] UnitaryTests/SCardConnect_DIRECT.py: add documentation
	* [r4447] src/ifdwrapper.c: IFDControl(): return
	  SCARD_E_INSUFFICIENT_BUFFER if the driver returns
	  IFD_ERROR_INSUFFICIENT_BUFFER
	* [r4445] src/winscard.c: SCardGetAttrib(): return
	  SCARD_E_INSUFFICIENT_BUFFER if the driver returns
	  IFD_ERROR_INSUFFICIENT_BUFFER
	  
	  Thanks to Emmanuel Deloget for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2009-q4/0003.html
	* [r4444] src/PCSC/ifdhandler.h: add IFD_ERROR_INSUFFICIENT_BUFFER
	* [r4443] src/winscard.c: SCardReconnect(): log the selected
	  protocol (as done in SCardConnect())
	* [r4442] src/winscard_clnt.c: SCardReconnect(): return
	  SCARD_E_SHARING_VIOLATION instead of blocking if the reader
	  cannot be shared.
	  
	  This change was made in revision 2475 but I don't remember why.
	  
	  Thanks to Paul Klissner for the bug report
	  http://archives.neohapsis.com/archives/dev/muscle/2009-q3/0106.html

2009-10-06  Ludovic Rousseau

	* [r4438] src/winscard_clnt.c, src/winscard_msg.h: remove typedefs
	  and explicitly use struct for structures
	* [r4437] src/pcsc-wirecheck-gen.c: update to the new client/server
	  ABI
	* [r4436] src/utils.c, src/utils.h: remove now useless
	  StatSynchronize() and StatSynchronizeContext()
	* [r4435] src/winscard_clnt.c: remove now useless SCardUnload()
	* [r4434] src/eventhandler.c, src/pcscd.h.in, src/pcscdaemon.c,
	  src/readerfactory.c, src/winscard.c, src/winscard_clnt.c,
	  src/winscard_msg.c, src/winscard_msg.h, src/winscard_msg_srv.c,
	  src/winscard_svc.c: redesign the client/server communication: -
	  no more shared memory used (allow pcscd and libpcsclite1.so to be
	  on different computer and talk over a network) - no more
	  difference between short and extended APDU - no more use of a
	  /var/run/pcscd/pcscd.events/ directory. events are sent through
	  the socket - simpler command format between client and server
	  
	  The side effect is that you are not able to mix an old pcscd with
	  a new libpcsclite1.so or the reverse. SCardEstablishContext()
	  will fail unless you update both sides of the communication.
	* [r4433] src/winscard_msg.c: reformat comment
	* [r4432] src/winscard_svc.c, src/winscard_svc.h: add
	  MSGSignalClient()
	* [r4431] src/winscard_msg.h: add struct wait_reader_state_change
	* [r4430] src/pcscd.h.in: add PCSCLITE_WRITE_TIMEOUT and
	  PCSCLITE_READ_TIMEOUT
	* [r4429] src/winscard_msg.c: reformat comments
	* [r4428] src/eventhandler.c, src/eventhandler.h: add
	  EHRegisterClientForEvent(), EHUnregisterClientForEvent() and
	  EHSignalEventToClients()
	* [r4427] src/Makefile.am: add simclist.{c,h} to pcscd dependencies
	* [r4426] src/simclist.c, src/simclist.h: Library to manage lists
	  Fetched from http://mij.oltrelinux.com/devel/simclist/

2009-10-05  Ludovic Rousseau

	* [r4425] UnitaryTests/SCardCancel.py: display return values even
	  if no error returned

2009-10-03  Ludovic Rousseau

	* [r4419] src/winscard_clnt.c: Doxygen document SCardConnect()
	  difference with Windows for SCARD_SHARE_DIRECT

2009-10-02  Ludovic Rousseau

	* [r4418] src/winscard_clnt.c: add Doxygen section: Known
	  differences with Microsoft Windows WinSCard implementation

2009-09-29  Ludovic Rousseau

	* [r4408] src/pcscdaemon.c: main(): check RFAllocateReaderSpace()
	  returned value
	* [r4407] src/winscard_clnt.c: SCardGetStatusChange(): Calling with
	  cReaders == 0 will now just return SCARD_S_SUCCESS
	  
	  Use the special reader name "\\?PnP?\Notification" to wait for a
	  reader event notification
	* [r4406] src/pcscd.h.in: remove comment about PCSCLITE_MAX_READERS
	* [r4405] src/pcscd.h.in: remove useless PCSCLITE_MAX_THREADS
	  definition
	* [r4404] src/pcscd.h.in: remove useless
	  PCSCLITE_TRANSACTION_TIMEOUT definition
	* [r4403] src/utils.c, src/utils.h, src/winscard.c,
	  src/winscard_clnt.c: move time_sub() in utils.c
	* [r4402] src/pcsc-wirecheck-gen.c, src/pcscd.h.in,
	  src/winscard_msg.c, src/winscard_msg.h: remove useless
	  key[PCSCLITE_MSG_KEY_LEN] field

2009-09-28  Ludovic Rousseau

	* [r4400] src/winscard.c: SCardTransmit(): do not limit the minimum
	  size of an APDU to 4 bytes. non ISO 7816-4 compliant cards (like
	  Mifare DESFIRE) may use shorter commands
	  
	  Thanks to Björn Kupfer for the bug report
	* [r4399] src/winscard.c: SCardTransmit(): call IFDControl_v2
	  instead of IFDTransmit only if dwProtocol == SCARD_PROTOCOL_RAW
	  _and_ ifdhandler is v2.0
	  
	  Thanks to Björn Kupfer for the patch

2009-09-23  Ludovic Rousseau

	* [r4395] src/winscard_msg.c, src/winscard_msg_srv.c: use the POSIX
	  name AF_LOCAL instead of AF_UNIX

2009-09-21  Ludovic Rousseau

	* [r4388] src/pcscd.h.in: remove unsuned #define
	  PCSCLITE_RW_ATTEMPTS

2009-09-17  Ludovic Rousseau

	* [r4387] src/winscard_clnt.c: typo in Doxygen comment

2009-09-15  Ludovic Rousseau

	* [r4386] src/winscard_clnt.c: SCardReleaseContext(),
	  SCardControl(), SCardTransmit() and SCardListReaders(): add a
	  call to PROFILE_END() before exiting with SCARD_E_INVALID_HANDLE
	  error code to have a better profiling output
	* [r4385] src/winscard.c:
	  SCardEstablishContext()/SCardReleaseContext(): log context value
	  in hexadecimal instead of decimal
	* [r4384] src/winscard_msg.c: rename argument blockAmount in
	  timeOut to better reflect its function

2009-09-08  Ludovic Rousseau

	* [r4378] src/PCSC/reader.h.in: update sruct
	  PIN_PROPERTIES_STRUCTURE to be conform with Revision 2.02.06,
	  April 2009 of PCSCv2 part 10
	  
	  Fields wLcdMaxCharacters and wLcdMaxLines have been removed

2009-09-01  Ludovic Rousseau

	* [r4375] src/pcscdaemon.c: signal_reload(): reenable the signal
	  handler. This is needed on Solaris and HPUX.
	  
	  Thanks to Douglas E. Engert for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2009-q3/0061.html

2009-08-31  Ludovic Rousseau

	* [r4374] src/ifdwrapper.c, src/winscard.c: typo in comments

2009-08-28  Ludovic Rousseau

	* [r4371] src/hotplug_libhal.c, src/hotplug_libusb.c,
	  src/hotplug_linux.c, src/pcscdaemon.c: move definition of
	  usbNotifierMutex in the underlying layers where it is used

2009-08-27  Ludovic Rousseau

	* [r4367] src/ifdwrapper.c: IFDControl(): return
	  SCARD_E_UNSUPPORTED_FEATURE if the driver returned
	  IFD_ERROR_NOT_SUPPORTED or IFD_NOT_SUPPORTED
	  
	  This is used to separate an unsupported value of ControlCode from
	  a general error

2009-07-31  Ludovic Rousseau

	* [r4359] UnitaryTests/control_switch_interface.py: switch
	  interface on the GemProx DU
	* [r4357] UnitaryTests/control_get_firmware.py: get firmware
	  version of Gemalto readers

2009-07-30  Ludovic Rousseau

	* [r4354] src/ifdwrapper.c: remove extra spaces at end of line
	* [r4353] src/configfile.l: reformat
	* [r4352] src/configfile.l: remove extra spaces

2009-07-28  Ludovic Rousseau

	* [r4349] ChangeLog, configure.in: release 1.5.5
	* [r4344] src/atrhandler.c: remove empty last list

2009-07-21  Ludovic Rousseau

	* [r4334] src/winscard_svc.c: MSGFunctionDemarshall(): correctly
	  check for buffer overflow in case of SCardControl()
	  
	  Bug introduced in revision 4208 included in pcsc-lite 1.5.4
	* [r4333] src/winscard_clnt.c: SCardConnect(): document
	  SCARD_SHARE_DIRECT access mode
	* [r4332] src/winscard.c: SCardConnect() and SCardReconnect(): set
	  pdwActiveProtocol to SCARD_PROTOCOL_UNDEFINED if
	  SCARD_SHARE_DIRECT is used (conform to MSDN)
	* [r4331] UnitaryTests/SCardConnect_DIRECT.py: Unitary test for
	  SCardConnect in DIRECT mode

2009-07-20  Ludovic Rousseau

	* [r4328] src/testpcsc.c: support SCARD_PROTOCOL_RAW
	* [r4327] src/testpcsc.c: use test_rv() to check SCardTransmit()
	  result
	* [r4326] src/winscard.c: SCardTransmit(): if the lower level call
	  fails then return the error code instead of always
	  SCARD_E_NOT_TRANSACTED
	  
	  For example SCARD_E_UNSUPPORTED_FEATURE is returned if
	  SCARD_PROTOCOL_RAW is not supported

2009-07-17  Ludovic Rousseau

	* [r4321] src/pcsc-wirecheck-gen.c, src/winscard_clnt.c,
	  src/winscard_msg.h, src/winscard_svc.c: remove the p in the
	  structure field names pioSendPciProtocol, pioSendPciLength,
	  pioRecvPciProtocol and pioRecvPciLength since they are not
	  pointers
	* [r4320] src/pcsc-wirecheck-gen.c, src/winscard_clnt.c,
	  src/winscard_msg.h, src/winscard_svc.c: remove the p in the
	  structure field names pdwActiveProtocol, pdwState, pdwProtocol,
	  pdwBytesReturned since they are not pointers
	* [r4319] src/pcsc-wirecheck-gen.c, src/winscard_clnt.c,
	  src/winscard_msg.h, src/winscard_svc.c: rename structure fields
	  phCard and phContext into hCard and hContext since they are not
	  pointers

2009-07-16  Ludovic Rousseau

	* [r4316] src/PCSC/pcsclite.h.in: #define SCARD_P_SHUTDOWN

2009-07-03  Ludovic Rousseau

	* [r4299] UnitaryTests/SCardCancel.py: do not raise an exception if
	  the return code is the expected SCARD_E_CANCELLED
	* [r4298] src/pcscdaemon.c: clean_temp_files(): give some time to
	  clients to remove their event files before removing the event
	  directory
	* [r4297] src/hotplug_libhal.c, src/readerfactory.c: do not try to
	  open a device using the libusb scheme if opening it with the
	  libhal scheme returns IFD_NO_SUCH_DEVICE
	  
	  The device may be composite and the interface found is not CCID
	  (HID for example). Just skip this interface and try the next one.
	* [r4296] src/hotplug_libhal.c: HPAddDevice(): add the reader
	  interface name if provided by the device
	* [r4294] src/tokenparser.l: LTPBundleFindValueWithKey(): do not
	  log an error if no more values are found
	* [r4293] src/tokenparser.l: use '\0' instead of 0

2009-07-01  Ludovic Rousseau

	* [r4291] src/atrhandler.h: use int instead of DWORD for Length and
	  HistoryLength in _ATR structure to gain 12 bytes on _ATR (and 16
	  bytes on _SMARTCARD_EXTENSION). Thanks to pahole(1)
	* [r4290] src/atrhandler.h: reorder fields in the _ATR structure of
	  _SMARTCARD_EXTENSION Structure is now 8 bytes shorter on 64-bits
	  CPU Thanks to pahole(1)
	* [r4289] src/readerfactory.h: reorder ReaderContext fields to
	  avoid padding holes in the strucutre Structure size is now 8
	  bytes smaller on 64-bits CPU

2009-06-26  Ludovic Rousseau

	* [r4283] UnitaryTests/MCT_ReaderDirect.py: test secoder support
	  (using FEATURE_MCT_READERDIRECT)

2009-06-24  Ludovic Rousseau

	* [r4272] ChangeLog, configure.in: release 1.5.4

2009-06-23  Ludovic Rousseau

	* [r4271] src/winscard_clnt.c: SCardGetStatusChange(): fix in
	  revision r4269 was not correct.
	  
	  Thanks (again) to Toon Claes for the bug report
	* [r4270] src/winscard_clnt.c: SCardGetStatusChange(): add debug to
	  know why the function returns

2009-06-22  Ludovic Rousseau

	* [r4269] src/winscard_clnt.c: SCardGetStatusChange(): only check
	  the event counter if current state is not SCARD_STATE_EMPTY
	  
	  Closes [#311772] "SCardGetStatusChange only works the first time
	  after starting pcscd"

2009-06-11  Ludovic Rousseau

	* [r4252] UnitaryTests/Makefile: add a clean rule

2009-06-05  Ludovic Rousseau

	* [r4249] src/hotplug.h, src/hotplug_libhal.c: give a higher
	  priority to a specific driver over the CCID Class driver
	* [r4248] src/parser.h, src/tokenparser.l: add
	  LTPBundleFindOptionalValueWithKey() to look for an optional key
	  No error is logged if the key is not found

2009-06-02  Ludovic Rousseau

	* [r4241] src/debuglog.c: log APDU and SW (--apdu) even if --debug
	  is not used
	* [r4240] src/hotplug_libhal.c: HPAddDevice(): use NULL instead of
	  an libhal error field since we do not use the error value
	* [r4239] src/hotplug_libhal.c: if RFAddReader() fails with the
	  libhal scheme then we try with the (old) libusb scheme.
	  
	  This patch should allow proprietary drivers to work even if
	  pcsc-lite is compiled with libhal support.
	* [r4238] src/winscard_clnt.c: WaitForPcscdEvent(): check mkfifo(3)
	  succeeds
	  
	  Thanks to Steve Grubb for the bug report

2009-06-01  Ludovic Rousseau

	* [r4237] src/pcscdaemon.c: main(): create the PCSCLITE_EVENTS_DIR
	  directory with the sticky bit so only root or the owner of the
	  file can remove it
	  
	  Thanks to Tomas Mraz for the bug report
	* [r4236] src/utils.c: StatSynchronizeContext(): do not call
	  mkfifo(3) since the fifo file is already created by another
	  thread.

2009-05-28  Ludovic Rousseau

	* [r4234] src/winscard_clnt.c, src/winscard_msg.h,
	  src/winscard_svc.c: use a union to avoid "warning: dereferencing
	  pointer 'veStr' does break strict-aliasing rules" warnings with
	  gcc 4.4
	  
	  Thanks to Stanislav Brabec for the patch
	* [r4233] src/testpcsc.c: use a union of fields with different
	  types instead of casts to avoid testpcsc.c:313: warning:
	  dereferencing type-punned pointer will break strict-aliasing
	  rules testpcsc.c:323: warning: dereferencing type-punned pointer
	  will break strict-aliasing rules
	  
	  Thanks to Stanislav Brabec for the patch
	* [r4232] NEWS: fix musclecard URL
	  
	  Thanks to Stanislav Brabec for the patch

2009-05-25  Ludovic Rousseau

	* [r4223] Makefile.am, configure.in: generate a .bz2 archive only

2009-05-22  Ludovic Rousseau

	* [r4222] src/ifdwrapper.c: IFDControl(): use %LX instead of %Lx in
	  a log format

2009-05-19  Ludovic Rousseau

	* [r4213] src/pcscdaemon.c: main(): force access rights on
	  /var/run/pcscd to be sure it can be used by a libpcsclite client
	  without privileges
	  
	  Thanks to Sébastien Lorquet for the bug report

2009-05-15  Ludovic Rousseau

	* [r4211] UnitaryTests/BufferOverflow.c, UnitaryTests/Makefile,
	  UnitaryTests/SCardBeginTransaction.c: port to Mac OS X

2009-05-14  Ludovic Rousseau

	* [r4210] src/PCSC/reader.h.in: add Doxygen documentation
	* [r4209] UnitaryTests/BufferOverflow.c, UnitaryTests/Makefile,
	  UnitaryTests/SCardBeginTransaction.c: new files
	* [r4208] src/winscard_svc.c: MSGFunctionDemarshall(): detect
	  buffer overflows
	  
	  Thanks to Sebastian Krahmer for the bug report
	* [r4207] src/winscard_clnt.c: SCardGetAttrib() & SCardSetAttrib():
	  debug Doxygen examples

2009-05-13  Ludovic Rousseau

	* [r4206] src/pcscdaemon.c: main(): wrong mode file comment

2009-05-12  Ludovic Rousseau

	* [r4201] src/utils/formaticc.c: cppcheck: (error) Resource leak:
	  fp
	* [r4200] src/utils/formaticc.c: cppcheck: (error) Resource leak:
	  fp

2009-05-08  Ludovic Rousseau

	* [r3499] src/winscard_clnt.c: SCardEstablishContext(): Doxygen:
	  each thread of an application shall use its own SCARDCONTEXT.

2009-04-29  Ludovic Rousseau

	* [r3470] ChangeLog, configure.in: release 1.5.3

2009-04-27  Ludovic Rousseau

	* [r3469] UnitaryTests/SCardBeginTransaction_Disconnect.py: A bug
	  has been corrected in revision 3467 The problem occurs if
	  SCardBeginTransaction() are made without corresponding
	  SCardEndTransaction(). OpenSC "pkcs11-tool -I" exhibits such a
	  behavior.
	* [r3467] src/winscard.c: CardDisconnect(): call
	  RFUnlockAllSharing() instead of RFUnlockSharing() to release all
	  nested locks. The problem occurs if SCardBeginTransaction() are
	  made without corresponding SCardEndTransaction(). OpenSC
	  "pkcs11-tool -I" exhibits such a behavior.
	  
	  Thanks to Marc Rios Valles for the bug report
	* [r3466] src/readerfactory.c, src/readerfactory.h: add
	  RFUnlockAllSharing()
	* [r3465] src/debuglog.c: change default log level from
	  PCSC_LOG_INFO to PCSC_LOG_ERROR to limit syslog pollution

2009-04-17  Ludovic Rousseau

	* [r3457] UnitaryTests/SCardCancel.py: use SCARD_S_SUCCESS instead
	  of 0

2009-04-14  Ludovic Rousseau

	* [r3450] src/utils.c: StatSynchronize(): remove event fifo files
	  only if they are 60 seconds old. The normal case is for the
	  client to remove its one event file after use. The daemon sould
	  only remove files from dead clients.
	* [r3449] src/utils.c: StatSynchronize(): use S_ISFIFO() macro
	* [r3448] UnitaryTests/SCardCancel.py: DeprecationWarning: raising
	  a string exception is deprecated
	* [r3447] UnitaryTests/SCardCancel.py,
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange.py,
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py:
	  add license information
	* [r3446] src/winscard_clnt.c: WaitForPcscdEvent(): avoid a
	  possible crash due to a race condition
	  
	  Thanks to Matheus Ribeiro for the patch
	* [r3445] src/readerfactory.c: #include "utils.h"
	* [r3444] src/readerfactory.c: RFRemoveReader(): call
	  StatSynchronize() after a reader removal to signal the event to
	  clients

2009-04-07  Ludovic Rousseau

	* [r3412] src/Makefile.am, src/powermgt_generic.c,
	  src/powermgt_macosx.c: remove powermgt_macosx.c since it is using
	  APSL version 1.1 instead of the BSD-like licence like the other
	  files
	  
	  Thanks to Stanislav Brabec for the bug report

2009-03-21  Ludovic Rousseau

	* [r3355] src/PCSC/reader.h.in: add PIN_PROPERTIES_STRUCTURE
	  structure and FEATURE_IFD_PIN_PROPERTIES
	  
	  Thanks to Martin Paljak for the patch

2009-03-20  Ludovic Rousseau

	* [r3352] src/PCSC/pcsclite.h.in: add URL of the error code
	  reference (MSDN)

2009-03-02  Ludovic Rousseau

	* [r3334] src/PCSC/pcsclite.h.in, src/PCSC/wintypes.h, src/debug.c,
	  src/debuglog.c, src/thread_generic.h: remove support of WIN32
	* [r3333] src/PCSC/pcsclite.h.in: add URL of error codes origines
	  (MSDN)

2009-03-01  Ludovic Rousseau

	* [r3332] src/PCSC/pcsclite.h.in: do not use /* inside a comment
	* [r3331] src/PCSC/pcsclite.h.in: add missing defines according to
	  http://msdn.microsoft.com/en-us/library/aa924526.aspx

2009-02-09  Ludovic Rousseau

	* [r3314] src/winscard_clnt.c: Comment revision 3313 patch
	* [r3313] src/winscard_clnt.c: SCardEstablishContextTH(): check we
	  do not reuse an already allocated hContext
	  
	  Thanks to Daniel Nobs for the bug report and patch Closes:
	  [#311455] Error in SCardEstablishContext

2009-02-06  Ludovic Rousseau

	* [r3306] ChangeLog, configure.in: release 1.5.2
	* [r3305] src/eventhandler.c: EHStatusHandlerThread(): call
	  StatSynchronize() before exiting the thread. Without this
	  SCardGetStatusChange() may not return.
	  
	  Thanks to Roberto Rizza for the bug report and patch.
	* [r3304] src/hotplug_libhal.c, src/pcsc-wirecheck-gen.c,
	  src/pcsc-wirecheck-main.c, src/pcscdaemon.c, src/readerfactory.c,
	  src/testpcsc.c, src/winscard.c, src/winscard_clnt.c: use
	  (void)param; for unused function parameters to avoid compiler
	  warnings

2009-02-05  Ludovic Rousseau

	* [r3303] src/readerfactory.c: reformat comments

2009-02-04  Ludovic Rousseau

	* [r3298] TODO: do not open the reader USB device if no client is
	  using the reader

2009-01-29  Ludovic Rousseau

	* [r3295] src/readerfactory.c: RFLockSharing() & RFUnlockSharing():
	  add a mutex to avoid a race condition
	  
	  Closes: [#311377] Race condition in SCardBeginTransaction

2009-01-28  Ludovic Rousseau

	* [r3294] src/ifdwrapper.c: log TxBuffer and RxBuffer if the
	  SCardControl() command failed.
	  
	  Closes: [#311376] PCSC_LOG_VERBOSE via -dd; print details of
	  "Card not transacted"

2009-01-24  Ludovic Rousseau

	* [r3291] src/utils.c: StatSynchronizeContext() is used for a
	  specific client. Correct the comment.

2009-01-22  Ludovic Rousseau

	* [r3290] doc/ifdhandler-3.tex: mark IFD_GENERATE_HOTPLUG as
	  deprecated. HAL now solves the hotplug problem for us.

2009-01-20  Ludovic Rousseau

	* [r3288] src/winscard_clnt.c: SCardCancel(): use
	  StatSynchronizeContext() to send an event to the waiting/blocked
	  thread
	  
	  Closes: [#311342] SCardCancel does not cancel an outstanding
	  SCardGetStatusChange
	* [r3287] src/utils.c, src/utils.h: add StatSynchronizeContext() to
	  send an asynchronous event to a specific context This function
	  can be used from libpcsclite. Using StatSynchronize() does not
	  work since the directory pcscd.events/ is not readable by group
	  and other for security reasons
	* [r3286] src/winscard_clnt.c: WaitForPcscdEvent(): use hContext
	  instead of a random to name the event file
	* [r3285] UnitaryTests/SCardCancel.py: improved version

2009-01-13  Ludovic Rousseau

	* [r3279] UnitaryTests/SCardCancel.py: SCardCancel sample
	* [r3278] src/winscard_clnt.c: SCardGetStatusChange(): return if
	  the state of the reader changed since the previous call.
	  
	  Thanks to Thomas Harning for the patch Closes: [#311341]
	  SCardGetStatusChange does not return CHANGED+EMPTY and
	  CHANGED+PRESENT sequence for remove-insert between calls

2009-01-12  Ludovic Rousseau

	* [r3277] UnitaryTests/SCardGetStatusChange,
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange.py,
	  UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py:
	  test SCardGetStatusChange
	* [r3276] UnitaryTests: directory to store Unitary Tests

2009-01-09  Ludovic Rousseau

	* [r3274] src/winscard_clnt.c: rename variable fd in profile_fd to
	  avoid winscard_clnt.c:1717: attention : declaration of ‘fd’
	  shadows a global declaration

2009-01-07  Ludovic Rousseau

	* [r3273] ChangeLog, configure.in: release 1.5.1

2009-01-05  Ludovic Rousseau

	* [r3267] src/winscard_svc.c: use
	  offsetof(transmit_struct_extended, data) instead of
	  sizeof(*treStr) since from revision 2146 the data[] array has one
	  element to be compilable by Sun Studio 11
	  
	  The side effect is that extended APDU were corrupted by 4 zero
	  bytes between the two consecutive blocks
	* [r3266] src/readerfactory.c: use snprintf() to avoid a possible
	  buffer overflow
	* [r3265] src/hotplug_libhal.c: avoid a memory leak in case of DBus
	  error
	* [r3264] splint.sh: script to call splint
	* [r3263] src/pcscdaemon.c: explicitly cast result in void when not
	  used (reported by the splint tool)
	* [r3262] src/utils/formaticc.c: free mszReaders before returning
	* [r3261] src/utils/formaticc.c: do not cast malloc()

2009-01-02  Ludovic Rousseau

	* [r3260] src/PCSC/winscard.h, src/atrhandler.h, src/configfile.h,
	  src/dyn_generic.h, src/ifdwrapper.c, src/ifdwrapper.h,
	  src/parser.h, src/readerfactory.h, src/sys_generic.h,
	  src/winscard_clnt.c, src/winscard_msg.h, src/winscard_msg_srv.c:
	  tag output parameters with /*@out@*/
	* [r3259] src/PCSC/winscard.h, src/eventhandler.h,
	  src/hotplug_libhal.c, src/sys_unix.c, src/thread_generic.h,
	  src/utils.h: tag potentially NULL paramater or returned value as
	  /*@null@*/
	* [r3258] src/pcscdaemon.c: declare functions static where possible
	* [r3257] src/pcscdaemon.c: remove unused SVCClientCleanup()
	  function
	* [r3256] src/pcscdaemon.c: mark unused parameter as /*@unused@*/
	  (reported by splint tool)
	* [r3255] src/pcscdaemon.c: no need to #include <syslog.h>
	* [r3254] src/atrhandler.c: not need to #include <syslog.h>
	* [r3253] src/eventhandler.c, src/testpcsc.c, src/winscard_svc.c:
	  declare functions static where possible
	* [r3252] src/hotplug_libhal.c, src/pcsc-wirecheck-gen.c,
	  src/pcsc-wirecheck-main.c, src/readerfactory.c, src/testpcsc.c,
	  src/utils/formaticc.c, src/utils/installifd.c, src/winscard.c,
	  src/winscard_clnt.c: mark unused parameter as /*@unused@*/
	  (reported by splint tool)
	* [r3251] src/pcscdaemon.c, src/winscard_msg.h,
	  src/winscard_msg_srv.c, src/winscard_svc.c: remove blocktime
	  parameter from SHMProcessEventsContext() and
	  SHMProcessEventsServer() since this parameter is not used
	* [r3250] src/winscard_msg.c: correct return types of
	  SHMMessageSend() and SHMMessageReceive() to match declaration in
	  winscard_msg.h (reported by splint tool)
	* [r3249] src/winscard_msg_srv.c: SHMInitializeCommonSegment(): use
	  correct return type as defined in winscard_msg.h (reported by
	  splint tool)
	* [r3248] src/readerfactory.c: reformat
	* [r3247] src/configfile.l, src/debug.c, src/dyn_unix.c,
	  src/error.c, src/eventhandler.c, src/hotplug_libhal.c,
	  src/ifdwrapper.c, src/readerfactory.c, src/sys_unix.c,
	  src/testpcsc.c, src/thread_unix.c, src/tokenparser.l,
	  src/utils.c, src/utils/formaticc.c, src/utils/installifd.c,
	  src/winscard.c, src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_msg_srv.c, src/winscard_svc.c: explicitly cast
	  result in void when not used (reported by the splint tool)
	* [r3246] c.sh: CFLAGS is now defined in ~/.bash_profile
	* [r3245] src/sys_unix.c: SYS_RandomInt(): replace a cast to
	  (float) by an explicit conversion using +0.0

2008-12-19  Ludovic Rousseau

	* [r3244] src/winscard_clnt.c: SCardGetAttrib(): avoid a possible
	  memory leak (detected by the cppcheck tool)

2008-12-18  Ludovic Rousseau

	* [r3241] src/winscard_clnt.c: typo in a comment

2008-12-17  Ludovic Rousseau

	* [r3239] src/lassert.h, src/pcsc-wirecheck-gen.c,
	  src/pcsc-wirecheck-main.c: add some log to pcsc-wirecheck

2008-12-13  Ludovic Rousseau

	* [r3235] doc/example/pcsc_demo.c: update FSF address

2008-11-18  Ludovic Rousseau

	* [r3216] ChangeLog: typo
	* [r3212] doc/ifdhandler-3.tex: document libhal scheme
	* [r3211] doc/ifdhandler-3.tex: document libhal scheme
	* [r3209] ChangeLog, configure.in: release 1.5.0

2008-11-10  Ludovic Rousseau

	* [r3200] src/readerfactory.c: RFRemoveReader(): symplify a test
	* [r3197] src/hotplug_libusb.c: HPAddHotPluggable(): correctly
	  handle bogus reader with corrupted iSerialNumber.
	  
	  Thanks to Ludovic LANGE for the patch. Closes: [#311215] Fix for
	  libusb hotplug garbage when serial number is empty

2008-10-31  Ludovic Rousseau

	* [r3190] src/winscard_clnt.c: SCardGetStatusChange(): use |=
	  instead of = to set SCARD_STATE_CHANGED bit in case (dwState &
	  SCARD_UNKNOWN)

2008-10-28  Ludovic Rousseau

	* [r3184] Makefile.am: add --reparagraph to svn2cl arguments

2008-10-27  Ludovic Rousseau

	* [r3180] src/winscard_clnt.c: move definition of time_sub() before
	  its first use

2008-10-24  Ludovic Rousseau

	* [r3179] src/ifdwrapper.c: reformat lock/unlock comments

2008-10-23  Ludovic Rousseau

	* [r3178] src/ifdwrapper.c, src/winscard.c: move locking from
	  IFDSetPTS() to 2 levels above in SCardConnect() and
	  SCardReconnect(). The value of
	  rContext->readerState->cardProtocol is then checked and modified
	  in an atomic transaction
	  
	  This avoids to renegociate the protocol and confuse the card if
	  two applications perform a SCardConnect() at the same time (after
	  they are both blocked by SCardGetStatusChange() and a card is
	  inserted for example)
	  
	  Error returned by CCID driver is: CCID_Receive Procedure byte
	  conflict

2008-10-16  Ludovic Rousseau

	* [r3171] src/winscard.c: #include "utils.h"
	  
	  winscard.c:497: attention : implicit declaration of function
	  ‘StatSynchronize’

2008-10-10  Ludovic Rousseau

	* [r3160] src/utils.c: SendHotplugSignal(): wait for 1 second after
	  send the signal to avoid a busy loop if the device died by HAL
	  did not noticed
	* [r3159] c.sh: remove --disable-libhal
	* [r3158] src/eventhandler.c: EHStatusHandlerThread(): remove
	  commented and never used code to restart a reader after 10
	  IFDStatusICC() errors

2008-10-07  Ludovic Rousseau

	* [r3157] src/hotplug_libhal.c, src/hotplug_libusb.c: call
	  CheckForOpenCT() if RFAddReader() fails.
	  
	  The first cause of pcsc-lite failure is that OpenCT is installed
	  and running and has already claimed the USB device. In that case
	  RFAddReader() fails and I get a user support request
	* [r3156] src/utils.c, src/utils.h: add CheckForOpenCT()

2008-09-24  Ludovic Rousseau

	* [r3146] src/ifdwrapper.c: IFDCloseIFD(): give up to 500 ms to the
	  mutex to be free if the lock failed. Maybe a polling thread is
	  still using the device on another slot.
	* [r3145] src/utils.c: StatSynchronize(): log and return if
	  opendir() fails
	  
	  Avoids a crash when started without root privileges

2008-09-21  Ludovic Rousseau

	* [r3142] src/hotplug_libhal.c: HPAddDevice(): remove a debug
	  printf()

2008-09-11  Ludovic Rousseau

	* [r3125] src/winscard_clnt.c: SCardStatus(): allow NULL for
	  pcchReaderLen and pcbAtrLen
	  
	  You can then use SCardStatus(hCard, pcReaders, &dwReaderLen,
	  NULL, NULL, NULL, NULL) to only get the reader name or
	  SCardStatus(hCard, NULL, NULL, NULL, NULL, pbAtr, &dwAtrLen) to
	  only get the card ATR or even SCardStatus(hCard, NULL, NULL,
	  NULL, NULL, NULL, NULL) to get nothing except SCARD_S_SUCCESS
	* [r3124] src/winscard_clnt.c: SCardStatus(), SCardGetAttrib(),
	  SCardListReaders(), SCardListReaderGroups(): check that the
	  pointer argument used to store the allocated memory in case of
	  SCARD_AUTOALLOCATE is not NULL.
	  
	  return SCARD_E_INVALID_PARAMETER instead of crashing

2008-09-10  Ludovic Rousseau

	* [r3123] src/winscard_clnt.c: Doxygen: reformat a line
	* [r3121] c.sh: expand a tab

2008-09-09  Ludovic Rousseau

	* [r3120] src/winscard.c, src/winscard_clnt.c: SCardTransmit():
	  correctly pass the pioRecvPci parameter
	  
	  Thanks to David L. Markowitz for the bug report
	* [r3119] src/utils.c: StatSynchronize(): log with level DEBUG
	  instead of ERROR if errno is ENXIO "No such device or address"
	  since it is a normal error if the client is no more listening the
	  pipe
	* [r3118] src/winscard_clnt.c: SCardGetStatusChange(): move "Event
	  Loop End" log after the end label so the log is displayed
	* [r3117] src/winscard_clnt.c: WaitForPcscdEvent(): remove the
	  waiting for event file after use
	* [r3116] src/hotplug_libhal.c: HPAddDevice(): the device serial is
	  "usb.serial" instead of "usb_device.serial" and it is a C-string
	  instead of an int

2008-09-05  Ludovic Rousseau

	* [r3112] src/winscard_clnt.c: Doxygen: move SCardSetTimeout (back)
	  in the API group so the detailed documentation does not appear in
	  the winscard.h page
	* [r3111] src/PCSC/pcsclite.h.in: Doxygen: document
	  SCARD_IO_REQUEST structure
	* [r3110] src/PCSC/pcsclite.h.in: remove useless struct
	  _SCARD_IO_REQUEST name
	* [r3109] src/winscard_clnt.c: Doxygen: SCardTransmit() can use
	  SCARD_PCI_RAW for pioSendPci
	* [r3108] src/winscard_clnt.c: Doxygen: document g_rgSCard*Pci
	  values
	* [r3107] src/winscard_clnt.c: move WaitForPcscdEvent() before
	  doxygen doc of SCardGetStatusChange()

2008-08-28  Ludovic Rousseau

	* [r3104] src/winscard_msg_srv.c: SHMProcessEventsContext(): do not
	  timeout every 1 second on Linux.
	  
	  We do timeout only on *BSD like in SHMProcessEventsServer()

2008-08-26  Ludovic Rousseau

	* [r3103] src/eventhandler.c, src/winscard.c, src/winscard_clnt.c:
	  use asynchronous events instead of polling for
	  SCardGetStatusChange()
	  
	  on client side use WaitForPcscdEvent() instead of
	  SYS_USleep(PCSCLITE_STATUS_WAIT)
	  
	  on server side use StatSynchronize() instead of
	  SYS_MMapSynchronize()
	* [r3102] src/winscard_clnt.c: SCardGetStatusChange(): use k
	  instead of i warning: declaration of 'i' shadows a previous local
	* [r3101] src/winscard_clnt.c: move time_sub() outside of #ifdef
	  DO_PROFILE
	* [r3100] src/pcscd.h.in: define PCSCLITE_EVENTS_DIR
	* [r3099] src/pcscdaemon.c: main(): create PCSCLITE_EVENTS_DIR
	  directory clean_temp_files(): purge & remove PCSCLITE_EVENTS_DIR
	  directory
	* [r3098] src/utils.c, src/utils.h: add StatSynchronize() "Sends an
	  asynchronous event to any waiting client"

2008-08-12  Ludovic Rousseau

	* [r3088] src/winscard_msg_srv.c: SHMProcessEventsContext(): also
	  log the received command not just the client ID

2008-08-11  Ludovic Rousseau

	* [r3087] src/pcscdaemon.c, src/winscard_msg.c,
	  src/winscard_msg_srv.c: use SYS_RemoveFile() instead of
	  SYS_Unlink()
	* [r3086] src/sys_generic.h, src/sys_unix.c: remove SYS_Unlink()
	  since it duplicates SYS_RemoveFile()

2008-08-07  Ludovic Rousseau

	* [r3083] src/eventhandler.c: reorder two lines
	* [r3082] src/eventhandler.c, src/pcscdaemon.c: call SYS_Chmod()
	  for PCSCLITE_RUN_PID and PCSCLITE_PUBSHM_FILE to force the file
	  access mode in case umask is too restrictive

2008-08-06  Ludovic Rousseau

	* [r3081] src/readerfactory.h: #include "pcscd.h" to get
	  definitions MAX_LIBNAME, MAX_DEVICENAME,
	  PCSCLITE_MAX_READER_CONTEXT_CHANNELS
	* [r3080] src/pcscdaemon.c: main(): call SYS_OpenFile() with the
	  modes used by SYS_Chmod() and remove useless SYS_Chmod() call
	* [r3079] src/eventhandler.c: EHInitializeEventStructures(): call
	  SYS_OpenFile() with the modes used by SYS_Chmod() and remove
	  useless SYS_Chmod() call
	* [r3078] src/eventhandler.c: EHInitializeEventStructures(): use
	  POSIX instead of Unix V7 permissions names

2008-07-30  Ludovic Rousseau

	* [r3077] src/winscard_clnt.c: Doxygen: typo
	* [r3076] src/winscard_clnt.c: Doxygen: document the use of
	  SCARD_AUTOALLOCATE with SCardGetAttrib()
	* [r3075] src/PCSC/debuglog.h, src/debug.h, src/error.c,
	  src/winscard_clnt.c: Doxygen: do not create a useless @test group
	* [r3074] src/winscard_clnt.c: Doxygen: document use of
	  SCARD_AUTOALLOCATE for SCardStatus()
	* [r3073] src/PCSC/winscard.h: SCardStatus(): rename parameter
	  mszReaderNames -> mszReaderName
	* [r3072] src/winscard_clnt.c: Doxygen: remove SCardSetTimeout()
	  from the API doc since it is deprecated
	* [r3071] src/winscard_clnt.c: SCardStatus(): factorize code using
	  goto end;
	* [r3070] src/winscard_clnt.c: SCardStatus(): rename parameter
	  mszReaderNames in mszReaderName since it is the name of one
	  reader only
	* [r3069] src/testpcsc.c: test SCARD_AUTOALLOCATE in SCardStatus()
	* [r3068] src/winscard_clnt.c: SCardStatus(): add support of
	  SCARD_AUTOALLOCATE for pcchReaderLen and pcbAtrLen
	* [r3067] src/testpcsc.c: use buf[] and dwBufLen for an temporary
	  buffer instead of pbAtr[] and dwAtrLen

2008-07-29  Ludovic Rousseau

	* [r3062] src/winscard_clnt.c: SCardStatus(): set *pdwState and
	  *pdwProtocol to 0 before checking pcchReaderLen and pcbAtrLen
	  
	  Should avoid the use of SUN libregression.c for some buggy
	  applications

2008-07-07  Ludovic Rousseau

	* [r3058] src/winscard_clnt.c: SCardGetStatusChange(): Doxygen
	  document the use of "\\?PnP?\Notification"
	* [r3057] src/winscard_clnt.c: Doxygen document the use of
	  SCARD_AUTOALLOCATE for SCardListReaders() and
	  SCardListReaderGroups()
	* [r3056] src/error.c, src/winscard_clnt.c: improve Doxygen
	  documentation
	* [r3055] doc/doxygen.conf.in: exclude src/winscard_scf.c since it
	  is a duplicate of winscard_clnt.c and causes some Doxygen links
	  to be wrong
	* [r3054] src/winscard_clnt.c: typos in Doxygen comments

2008-07-04  Ludovic Rousseau

	* [r3053] src/testpcsc.c: when the reader is disconnected during
	  SCardGetStatusChange() SCARD_STATE_UNKNOWN bit is set in
	  .dwEventState
	* [r3052] src/testpcsc.c: test SCardGetStatusChange() with reader
	  name \\?PnP?\Notification to detect new reader
	* [r3051] src/winscard_clnt.c: SCardGetStatusChange(): if a reader
	  disappear also set SCARD_STATE_UNAVAILABLE in dwEventState (more
	  conform to Windows XP)
	* [r3050] src/winscard_clnt.c: SCardGetStatusChange(): add support
	  of reader name \\?PnP?\Notification to detect reader
	  insertion/removal (conform to Windows XP)o
	  
	  Closes: [#310780] Support for undocumented \\?PnP?\Notification
	  'virtual' reader
	  
	  Using a cReaders == 0 is now deprecated
	* [r3049] src/winscard_clnt.c: SCardGetStatusChange(): simplify
	  SCARD_SWALLOWED check
	* [r3048] src/winscard_clnt.c: SCardGetStatusChange(): reformat
	  comments
	* [r3047] src/winscard_clnt.c: SCardGetStatusChange(): simplify bad
	  state check
	* [r3046] src/winscard_clnt.c: SCardGetStatusChange(): simplify
	  unknown reader case
	* [r3045] src/winscard_clnt.c: SCardGetStatusChange(): factorize
	  exit code using goto end;
	* [r3044] src/winscard_clnt.c: SCardGetStatusChange(): return
	  SCARD_E_TIMEOUT instead of SCARD_S_SUCCESS if dwTimeout == 0
	  (conform to Windows XP)
	* [r3043] src/winscard_clnt.c: SCardGetStatusChange(): move check
	  for break conditions code
	* [r3042] src/winscard_clnt.c: SCardGetStatusChange(): move and
	  simplify the check the integrity of the reader states structures
	  routine
	* [r3041] src/winscard_clnt.c: SCardGetStatusChange(): return if
	  all readers are SCARD_STATE_IGNORE
	* [r3040] src/winscard_clnt.c: SCardGetStatusChange(): do not even
	  change dwEventState for SCARD_STATE_IGNORE readers
	* [r3039] src/winscard_clnt.c: SCardGetStatusChange(): simplify the
	  Clear the event state for all readers loop
	* [r3038] src/winscard_clnt.c: SCardGetStatusChange(): maximal
	  value for cReaders is PCSCLITE_MAX_READERS_CONTEXTS not
	  PCSCLITE_MAX_READERS_CONTEXTS-1
	* [r3037] src/winscard_clnt.c: SCardGetStatusChange(): move check
	  for cReaders >= PCSCLITE_MAX_READERS_CONTEXTS

2008-06-27  Ludovic Rousseau

	* [r3032] ChangeLog, configure.in: release 1.4.102
	* [r3031] src/winscard_svc.c: ContextsInitialize(): use a long
	  instead of int winscard_svc.c:100: warning: cast to pointer from
	  integer of different size

2008-06-26  Ludovic Rousseau

	* [r3030] src/eventhandler.c: EHDestroyEventHandler(): kill the
	  polling thread only if the driver supports it (declared using
	  TAG_IFD_POLLING_THREAD_KILLABLE)
	  
	  libusb 1.0 does not support it so it is disabled in the ccid
	  driver
	* [r3029] src/PCSC/ifdhandler.h: #define
	  TAG_IFD_POLLING_THREAD_KILLABLE
	* [r3028] src/eventhandler.c: EHStatusHandlerThread(): lower the
	  log level when the polling thread is dying

2008-06-24  Ludovic Rousseau

	* [r3021] src/testpcsc.c: test SCardGetAttrib() with
	  SCARD_AUTOALLOCATE
	* [r3020] src/winscard_clnt.c: SCardGetAttrib(): add support of
	  SCARD_AUTOALLOCATE
	* [r3019] src/winscard_clnt.c: SCardListReaders(): always set the
	  pcchReaders even if SCARD_E_INSUFFICIENT_BUFFER is returned
	* [r3018] src/winscard_clnt.c: SCardListReaderGroups(): check for
	  SCARD_E_INSUFFICIENT_BUFFER only if mszGroups is non-null
	* [r3017] src/testpcsc.c: test SCardListReaderGroups() with
	  USE_AUTOALLOCATE
	* [r3016] src/winscard_clnt.c: SCardListReaderGroups(): add support
	  of SCARD_AUTOALLOCATE

2008-06-23  Ludovic Rousseau

	* [r3015] src/testpcsc.c: use NULL instead of 0 for mszGroups
	  argument of SCardListReaderGroups()

2008-06-19  Ludovic Rousseau

	* [r3014] src/testpcsc.c: test SCardListReaders(..
	  SCARD_AUTOALLOCATE ..)
	* [r3013] src/PCSC/pcsclite.h.in, src/PCSC/winscard.h,
	  src/winscard_clnt.c: add support of SCARD_AUTOALLOCATE for
	  SCardListReaders() add SCardFreeMemory()
	* [r3012] src/testpcsc.c: use NULL instead of 0 for mszReaders
	  argument of SCardListReaders()
	* [r3011] src/winscard_clnt.c: SCardListReaders(): correctly return
	  SCARD_E_INSUFFICIENT_BUFFER if *pcchReaders is too small

2008-06-07  Ludovic Rousseau

	* [r2980] m4/acx_pthread.m4: update (correct a problem under
	  Solaris)
	  
	  Thanks to David L. Markowitz for the bug report

2008-05-29  Ludovic Rousseau

	* [r2975] src/readerfactory.c: RFAddReader(): try to use the reader
	  polling thread also for the other slots on a multi-slots reader

2008-05-23  Ludovic Rousseau

	* [r2967] doc/pcsc-lite.tex: add spaces around =

2008-05-16  Ludovic Rousseau

	* [r2963] src/winscard_clnt.c: SCardReconnect(), SCardDisconnect(),
	  SCardBeginTransaction(), SCardEndTransaction(),
	  SCardCancelTransaction(), SCardStatus(), SCardControl(),
	  SCardGetSetAttrib(), SCardTransmit(): check that the card handle
	  is still valid after we (should) hold the lock
	  
	  The context may have been closed by another thread using
	  SCardReleaseContext() on the same context
	  
	  [#300849] problems in multithreading environment (segmentation
	  faults, SCardCancel does not work)
	* [r2962] src/thread_unix.c: SYS_Mutex*(): check that the mMutex
	  parameter is non NULL to avoid a crash
	  
	  related to [#300849] problems in multithreading environment
	  (segmentation faults, SCardCancel does not work)
	* [r2961] src/eventhandler.c, src/pcsc-wirecheck-gen.c,
	  src/winscard_clnt.c, src/winscard_msg.c, src/winscard_msg_srv.c,
	  src/winscard_svc.c: remove spaces at end of lines
	* [r2960] src/winscard_clnt.c: SCardReleaseContext(),
	  SCardConnect(), SCardGetStatusChange(), SCardListReaders() and
	  SCardListReaderGroups: check that the context is still opened
	  after we (should) hold the lock
	  
	  The context may have been closed by another thread using
	  SCardReleaseContext() on the same context
	  
	  [#300849] problems in multithreading environment (segmentation
	  faults, SCardCancel does not work)
	* [r2959] src/winscard.c: remove an empty line
	* [r2958] Makefile.am, configure.in, win32: do not include the
	  (useless) win32 directory any more

2008-05-15  Ludovic Rousseau

	* [r2957] src/winscard.c: SCardConnect(), SCardReconnect(): do not
	  check the parameter dwPreferredProtocols if dwShareMode ==
	  SCARD_SHARE_DIRECT
	  
	  This is used on contactless readers to talk to the reader without
	  any card and "random" value of dwPreferredProtocols
	  
	  Thanks to Philippe BOURGAULT for reporting the bug
	* [r2956] src/winscard_clnt.c: SCardEstablishContextTH(),
	  SCardConnect(), SCardReconnect(), SCardDisconnect(),
	  SCardEndTransaction(): do not check parameters for
	  SCARD_E_INVALID_VALUE since these tests are also done on the
	  server side. Do not duplicate code
	* [r2955] src/pcscdaemon.c: SVCServiceRunLoop(): return if
	  HPSearchHotPluggables() fails
	* [r2954] src/pcscdaemon.c: SVCServiceRunLoop(): return if
	  HPRegisterForHotplugEvents() fails
	* [r2953] src/winscard_svc.c: CreateContextThread(): update to the
	  new SYS_ThreadCreate() API

2008-05-13  Ludovic Rousseau

	* [r2952] src/eventhandler.c: EHDestroyEventHandler(): log the
	  error message of SYS_ThreadJoin() and SYS_ThreadCreate() if any
	* [r2951] src/eventhandler.c: EHSpawnEventHandler(): do not create
	  the card polling thread using THREAD_ATTR_DETACHED since that
	  will prevent SYS_ThreadJoin() from working
	* [r2950] src/eventhandler.c: EHStatusHandlerThread(): do not call
	  SYS_ThreadDetach() since that will prevent SYS_ThreadJoin() from
	  working.
	* [r2949] src/thread_unix.c: update copyright date
	* [r2948] src/thread_unix.c: forward the return value from the low
	  level thread library and not just FALSE or TRUE The upper layer
	  can then use strerror()
	* [r2947] src/Makefile.am, src/dyn_win32.c, src/thread_win32.c: do
	  not distribute win32 files anymore. win32 is not a supported
	  platform
	* [r2946] configure.in, src/pcscdaemon.c: pcscd -v now displays the
	  enabled features
	  
	  Thanks to Alon Bar-Lev for the suggestion
	* [r2945] src/pcscdaemon.c: update email for bug reports

2008-05-12  Ludovic Rousseau

	* [r2944] src/ifdwrapper.c: IFDCloseIFD(): use SYS_MutexTryLock()
	  instead of SYS_MutexLock() since the mutex may be hold by a now
	  dead polling thread
	* [r2943] src/thread_generic.h, src/thread_unix.c: add
	  SYS_MutexTryLock()
	* [r2942] src/readerfactory.c: typo in comment

2008-05-11  Ludovic Rousseau

	* [r2941] Makefile.am: add AUTOMAKE_OPTIONS = dist-bzip2 so that
	  make dist alsa generates a .tar.bz2 archive

2008-05-09  Ludovic Rousseau

	* [r2939] src/readerfactory.c: RFAddReader(): in case of error call
	  RFRemoveReader() to free all resources instead of duplicating
	  part of the needed code.
	* [r2938] src/readerfactory.c: RFAddReader(): call RFRemoveReader()
	  to free resources if EHSpawnEventHandler() fails

2008-05-06  Ludovic Rousseau

	* [r2928] INSTALL: do not store in subversion since it is installed
	  by autoconf

2008-04-30  Ludovic Rousseau

	* [r2927] src/winscard_clnt.c: doxygen: SCardCancelTransaction()
	  add return values SCARD_W_REMOVED_CARD and SCARD_W_RESET_CARD
	* [r2926] ChangeLog, configure.in: release 1.4.101
	* [r2918] src/hotplug_libusb.c, src/winscard_msg_srv.c: Add support
	  for DragonFly BSD
	  
	  Thanks to Hasso Tepper for the patch

2008-04-29  Ludovic Rousseau

	* [r2917] src/eventhandler.c: EHStatusHandlerThread(): do not set
	  card state to SCARD_RESET when a card is inserted. Keep the state
	  to SCARD_REMOVED
	  
	  See
	  http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011121.html

2008-04-28  Ludovic Rousseau

	* [r2915] src/winscard_clnt.c: return the returned value of
	  SCardCheckDaemonAvailability() instead of always
	  SCARD_E_NO_SERVICE in case of error (may also be
	  SCARD_E_INVALID_HANDLE)
	* [r2914] src/winscard_clnt.c: SCardCheckDaemonAvailability():
	  return SCARD_E_INVALID_HANDLE instead of SCARD_E_NO_SERVICE is
	  pcscd has been restarted
	  
	  Thanks to Alon Bar-Lev for the patch

2008-04-25  Ludovic Rousseau

	* [r2913] src/winscard_clnt.c: SCardEstablishContext(): correcly
	  handle a call from a forked child (do not fail)
	  
	  Thanks to Alon Bar-Lev for bug report

2008-04-24  Ludovic Rousseau

	* [r2910] src/winscard_clnt.c: SCardCheckDaemonAvailability():
	  invalidate all handles if the application has forked and we are
	  in the child. The child must call SCardEstablishContext() to get
	  his own handle.
	  
	  Thanks to Alon Bar-Lev for the bug report and the patch
	* [r2909] src/testpcsc.c: better management of corner cases
	* [r2908] src/winscard_clnt.c: doxygen: use /**< instead of /** to
	  correctly identify identify fields
	* [r2907] src/winscard_svc.c: ContextThread(): call
	  SHMClientCloseSession() instead of SYS_CloseFile() to respect
	  namespace
	* [r2906] src/winscard_svc.c: typo in comment

2008-04-22  Ludovic Rousseau

	* [r2905] doc/doxygen.conf.in: doxygen: WARN_NO_PARAMDOC = YES
	* [r2904] doc/doxygen.conf.in: doxygen: update conf from version
	  1.4.2 to 1.5.5 file using doxygen -u
	* [r2903] doc/doxygen.conf.in: ENUM_VALUES_PER_LINE = 1 (instead of
	  4)
	* [r2902] src/winscard_clnt.c: doxygen: remove two unused </ul>
	* [r2901] src/winscard_clnt.c: doxygen: add SCardReleaseContext()
	  and SCardEndTransaction() in API group even if they are
	  deprecated
	* [r2900] src/readerfactory.h, src/winscard_msg.h: doxygen: add
	  comments
	* [r2899] src/winscard_svc.c: ContextThread(): check the return
	  value of MSGFunctionDemarshall() and correctly exists in case of
	  error. This happens when MSGCheckHandleAssociation() fails
	  
	  Thanks to Alon Bar-Lev for the bug report
	* [r2898] src/winscard_msg.h, src/winscard_msg_srv.c,
	  src/winscard_svc.c: SHMProcessEventsContext(): use uint32_t
	  dwClientID parameter instead of uint32_t *pdwClientID since we do
	  not need the address of the value but the value itself
	* [r2897] src/hotplug_libusb.c: doxygen: convert C comments in
	  doxygen comments
	* [r2896] src/debuglog.c, src/hotplug_libhal.c,
	  src/hotplug_linux.c, src/ifdwrapper.c, src/pcscdaemon.c,
	  src/powermgt_generic.h, src/prothandler.c, src/winscard_scf.c,
	  src/winscard_svc.c: doxygen: convert C comments in doxygen
	  comments

2008-04-21  Ludovic Rousseau

	* [r2895] src/debug.c: declare log_init() static to avoid the
	  prototype declaration
	* [r2894] src/debug.c: correct LogLevel comment to be accurate
	* [r2893] src/debug.c: doxygen: convert C comments in doxygen
	  comments
	* [r2892] src/PCSC/ifdhandler.h: doxygen: convert C comments in
	  doxygen comments
	* [r2891] src/atrhandler.c, src/atrhandler.h: removed unused TO and
	  T1 struct from CardCapabilities struct
	* [r2890] src/atrhandler.h: removed unused PtsData struct from
	  CardCapabilities struct
	* [r2889] src/readerfactory.h: doxygen: convert C comments in
	  doxygen comments
	* [r2888] src/readerfactory.h: remove unused RdrCapabilities and
	  ProtOptions structures
	* [r2887] src/readerfactory.h: doxygen: document struct
	  SerialReader fields
	* [r2886] src/winscard_clnt.c: doxygen: wrap long lines
	* [r2885] src/error.c, src/winscard_clnt.c: doxygen: create an API
	  group
	* [r2884] src/winscard.c, src/winscard_clnt.c: doxygen: use -
	  instead of <li>
	* [r2883] src/winscard_msg.h: doxygen: document SCARD_* commands
	  and \ref them from struct doc
	* [r2882] src/readerfactory.c: RFAddReader(): log if we are using
	  pcscd or reader polling thread

2008-04-20  Ludovic Rousseau

	* [r2881] TODO: remove "use a callback from IFD handler to pcscd
	  instead of polling to get the card status" since this feature is
	  now available using TAG_IFD_POLLING_THREAD when the driver is
	  collaborating
	* [r2880] src/testpcsc.c: improve colorization
	* [r2879] TODO: start pcscd as an normal user daemon

2008-04-10  Ludovic Rousseau

	* [r2878] src/hotplug_libhal.c: HPRegisterForHotplugEvents():
	  correctly check if no bundle files in pcsc drivers directory
	* [r2877] c.sh: expand a tab

2008-04-07  Ludovic Rousseau

	* [r2868] c.sh: revert previous patch
	* [r2867] TODO, c.sh: start pcscd only when a reader is connected.

2008-04-04  Ludovic Rousseau

	* [r2866] c.sh: add --sysconfdir=/etc
	* [r2865] etc/pcscd.init.in: update Should-Start: and Should-Stop:
	  (see Debian bug #474238)

2008-03-23  Ludovic Rousseau

	* [r2852] ChangeLog, configure.in: release 1.4.100

2008-03-14  Ludovic Rousseau

	* [r2851] etc/pcscd.init.in: typo pscsd -> pcscd
	* [r2850] src/winscard_clnt.c: SCardCheckDaemonAvailability():
	  lower the priority of the log message in case of "PCSC restarted"
	  so that nothing is logged by default. PCSCLITE_DEBUG can be
	  defined to see the message.
	  
	  See also revision 2731

2008-03-04  Ludovic Rousseau

	* [r2845] src/winscard_clnt.c: SCardReleaseContext(): remove the
	  local context at the end like before revision 2833 (since we use
	  the psContextMap[dwContextIndex].mMutex) or if
	  SCardCheckDaemonAvailability() fails

2008-02-21  Ludovic Rousseau

	* [r2839] src/winscard_clnt.c: SCardReleaseContext(): revert
	  revision 2834 since we need to get the value of dwContextIndex
	* [r2838] src/pcscdaemon.c: pcscdaemon.c:394:34: warning: "/*"
	  within comment

2008-02-19  Ludovic Rousseau

	* [r2835] src/winscard_clnt.c: reformat
	* [r2834] src/winscard_clnt.c: SCardReleaseContext(): do not call
	  SCardGetContextIndice() since SCardRemoveContext() will call it
	  internally
	* [r2833] src/winscard_clnt.c: SCardReleaseContext(): release the
	  local resource even if the daemon does not respond
	  
	  Thanks to Eric Walter for the bug report

2008-02-16  Ludovic Rousseau

	* [r2830] src/pcscdaemon.c: do not create the PCSCLITE_IPC_DIR
	  (/var/run/pcscd) directory with the sticky bit
	* [r2829] src/pcscdaemon.c: change a comment from /tmp/pcsc to
	  /var/run/pcscd/
	* [r2828] src/pcscdaemon.c: update comments /var/run/ is now
	  /var/run/pcscd/ by default

2008-02-14  Ludovic Rousseau

	* [r2817] src/hotplug_libhal.c: set svn:keywords Id
	* [r2816] c.sh: add --enable-twinserial
	* [r2814] src/PCSC/wintypes.h: move types unused by pcsc-lite at
	  the end

2008-02-09  Ludovic Rousseau

	* [r2812] configure.in: display sysconfdir_exp instead of
	  sysconfdir
	* [r2811] configure.in: set default value of confdir

2008-02-04  Ludovic Rousseau

	* [r2787] src/readerfactory.c: RFAddReader(): also check returned
	  value of dwGetSize
	* [r2785] configure.in: improve configuration display
	* [r2784] c.sh: add set -x

2008-02-01  Ludovic Rousseau

	* [r2780] src/eventhandler.c, src/eventhandler.h,
	  src/readerfactory.c, src/readerfactory.h: add support of
	  TAG_IFD_POLLING_THREAD to use an asynchronous card movements
	  detection instead of an active polling
	* [r2779] src/PCSC/ifdhandler.h: add TAG_IFD_POLLING_THREAD
	* [r2778] src/sys_unix.c: SYS_GetPageSize(): cache the result of
	  getpagesize() to improve performances

2008-01-30  Ludovic Rousseau

	* [r2775] src/winscard_clnt.c: SCardCheckDaemonAvailability(): log
	  the system error message in case PCSC Not Running

2008-01-29  Ludovic Rousseau

	* [r2770] src/winscard_clnt.c: SCardListReaders(): returns
	  SCARD_E_NO_READERS_AVAILABLE when no reader are available.
	  
	  Thanks to Thomas Harning for the bug report
	* [r2769] src/error.c: pcsc_stringify_error(): add support of
	  SCARD_E_NO_READERS_AVAILABLE
	* [r2768] src/winscard_clnt.c: SCardListReaders(): factorize code

2008-01-24  Ludovic Rousseau

	* [r2767] src/winscard.c: SCardConnect(), SCardReconnect(),
	  SCardDisconnect(): replace SYS_USleep(PCSCLITE_STATUS_POLL_RATE +
	  10) by SYS_MMapSynchronize() calls to gain performances.
	  
	  Thanks to Sean Wykes for the patch
	* [r2766] src/hotplug_libhal.c: use $Id$
	* [r2765] src/hotplug_libhal.c: HPAddDevice(): remove the device
	  from readerTracker[] if RFAddReader() fails
	* [r2761] configure.in: document what do do if pkg module hal is
	  not found

2008-01-22  Ludovic Rousseau

	* [r2760] configure.in: revert libhal -> LIBHAL
	* [r2759] configure.in: rename LIBHAL -> libhal

2008-01-21  Ludovic Rousseau

	* [r2750] src/thread_generic.h, src/thread_unix.c: first argument
	  of SYS_ThreadJoin() is now a PCSCLITE_THREAD_T instead of
	  PCSCLITE_THREAD_T *
	* [r2749] src/thread_generic.h, src/thread_unix.c: add
	  SYS_ThreadSetCancelType()
	* [r2748] configure.in, src/Makefile.am, src/hotplug_generic.c,
	  src/hotplug_libhal.c, src/hotplug_linux.c: add libhal support to
	  avoid polling the USB bus. libusb is still supported but libhal
	  is now the default
	* [r2747] src/hotplug_libusb.c: Patch in revision 2743 was wrong.
	  We need to hold the lock before traversing the reader list

2008-01-17  Ludovic Rousseau

	* [r2745] src/debuglog.c: do not display dela times of more than
	  100 seconds to avoid overflows. The magic value 99999999 is used
	  instead
	* [r2744] doc/ifdhandler-3.tex: more details about deviceName
	  argument of IFDHCreateChannelByName()

2008-01-15  Ludovic Rousseau

	* [r2743] src/hotplug_libusb.c: HPAddHotPluggable(): lock the mutex
	  _after_ every possible return. (May cause a deadlock)
	* [r2742] src/ifdwrapper.c: #include "utils.h" instead of
	  "hotplug.h"
	* [r2741] src/utils.h: #include <sys/types.h>
	* [r2740] src/utils.h: revert previous patch
	* [r2739] src/utils.h: remove wrong comment
	* [r2738] src/hotplug.h, src/pcscdaemon.c, src/utils.c,
	  src/utils.h: move SendHotplugSignal() from pcscdaemon.c to
	  utils.c
	* [r2737] src/hotplug_libusb.c: HPRescanUsbBus() and
	  HPEstablishUSBNotifications() are static functions
	* [r2736] src/hotplug_linux.c: add a prototype for
	  HPEstablishUSBNotifications() and make it static
	* [r2735] src/hotplug_libusb.c, src/hotplug_linux.c: declare local
	  functions as static

2008-01-14  Ludovic Rousseau

	* [r2733] src/dyn_macosx.c: DYN_LoadLibrary(): log an error message
	  in case of failure

2008-01-12  Ludovic Rousseau

	* [r2732] src/debug.c: default log level is PCSC_LOG_CRITICAL+1 so
	  that NO log is sent to stderr by default. You need to explicitely
	  set PCSCLITE_DEBUG to have logs. (in a library stderr(2) can be
	  any file opened with fd=2 so should not be used)

2008-01-11  Ludovic Rousseau

	* [r2731] src/winscard_clnt.c: CardCheckDaemonAvailability(): lower
	  the priority of the log message in case of "PCSC Not Running" so
	  that nothing is logged by default. PCSCLITE_DEBUG can be defined
	  to see the message.
	  
	  Programs linked with libpcsclite will not display anything if
	  pcscd is not running. Solves Red Hat bug 428299.
	* [r2730] src/pcscdaemon.c: add a \n after the pid number in
	  PCSCLITE_RUN_PID so that cat(1) works correctly
	* [r2729] src/winscard_msg.c: Log the socket name in case of error
	* [r2728] src/winscard_clnt.c: SCardEstablishContextTH(): also
	  display the system error message if a system call fails (can't
	  open PCSCLITE_PUBSHM_FILE)

2008-01-09  Ludovic Rousseau

	* [r2726] ChangeLog: release 1.4.99

2008-01-03  Ludovic Rousseau

	* [r2721] src/libpcsclite.pc.in: more @PTHREAD_LIBS@ from Libs: to
	  Libs.private:
	* [r2720] src/pcscdaemon.c: add type for ExitValue
	* [r2719] src/pcscdaemon.c: return EXIT_SUCCESS (instead of
	  EXIT_SUCCESS) if parsing /etc/reader.conf fails.
	  
	  Closes Debian bug #457665
	* [r2718] src/configfile.l: improve detection of wrong format in
	  reader.conf file

2007-12-13  Ludovic Rousseau

	* [r2714] src/eventhandler.c: EHStatusHandlerThread(): remove an
	  unneeded SYS_USleep() before powering a card when its presence is
	  detected.
	  
	  Thanks to Sean Michael Wykes for the patch

2007-11-23  Ludovic Rousseau

	* [r2710] doc/doxygen.conf.in: include call graphs
	* [r2709] src/PCSC/pcsclite.h.in, src/PCSC/reader.h.in,
	  src/winscard_clnt.c: add missing Doxygen comments

2007-11-22  Ludovic Rousseau

	* [r2708] src/winscard_clnt.c: improve Doxygen documentation

2007-11-17  Ludovic Rousseau

	* [r2707] src/winscard_msg.h: use uint32_t instead of int32_t for
	  rv type
	* [r2706] src/testpcsc.c: use LONG instead of int for rv in
	  test_rv() The type was wrong on amd64 since the sign was extended
	* [r2705] src/testpcsc.c: only display the result of SCardControl()
	  if it succeeded

2007-11-09  Ludovic Rousseau

	* [r2681] src/winscard_msg.c: typo

2007-11-08  Ludovic Rousseau

	* [r2680] src/pcscdaemon.c: 2 typos

2007-11-01  Ludovic Rousseau

	* [r2678] src/pcscdaemon.c: main(): create PCSCLITE_IPC_DIR
	  _before_ writing PCSCLITE_RUN_PID

2007-10-18  Ludovic Rousseau

	* [r2663] src/pcscdaemon.c: main(): do not create the
	  PCSCLITE_IPC_DIR directory with write permission for group and
	  other
	* [r2662] c.sh: check more prototypes
	* [r2661] src/winscard.c: winscard.c:660: warning: declaration of
	  'dwAtrLen' shadows a previous local
	* [r2660] src/PCSC/ifdhandler.h, src/ifdwrapper.c: use (void)
	  instead of () for function declaration
	* [r2659] src/PCSC/pcsclite.h.in, src/error.c:
	  pcsc_stringify_error(): argument is const
	* [r2658] src: ignore pcsc-wirecheck, pcsc-wirecheck-dist.c,
	  pcsc-wirecheck-gen and tags
	* [r2657] c.sh: call ./configure with nice arguments

2007-10-16  Ludovic Rousseau

	* [r2654] src/thread_generic.h, src/thread_unix.c:
	  SYS_ThreadCancel() arg is a PCSCLITE_THREAD_T instead of a
	  PCSCLITE_THREAD_T *

2007-10-11  Ludovic Rousseau

	* [r2647] TODO: the SCardReconnect performance problem has been
	  (partly) solved in revision 2385
	* [r2646] TODO: update date
	* [r2645] TODO, configure.in: bug #303790 is now solved
	* [r2644] doc/pcscd.8.in: use @ipcdir@ instead of @runpid@
	* [r2643] configure.in: remove --enable-runpid=FILE option since it
	  was not supported to NOT use a runpid file
	* [r2642] src/pcscdaemon.c, src/utils.c: use PCSCLITE_RUN_PID
	  instead of USE_RUN_PID
	* [r2641] src/pcscd.h.in: define PCSCLITE_RUN_PID as
	  PCSCLITE_IPC_DIR "/pcscd.pid"
	* [r2640] configure.in: default ipcdir is /var/run/pcscd instead of
	  /var/run so the directory can be shared locally between 32/64
	  bits systems on chroots
	* [r2639] src/eventhandler.h: iREADER_STATE: remove the unused
	  dummy field
	* [r2638] src/testpcsc.c: increase readername len from 50 to 100
	  since we now support longer reader names
	* [r2637] src/PCSC/pcsclite.h.in: increase MAX_READERNAME from 52
	  to 100
	  
	  Closes bug [#304481] increase MAX_READERNAME from 52 to 100
	* [r2636] src/readerfactory.c: RFAddReader(): also count the length
	  of " 00 00" in the reader name when rejectecting reader names too
	  long

2007-10-09  Ludovic Rousseau

	* [r2635] src/Makefile.am, src/eventhandler.c, src/eventhandler.h,
	  src/lassert.h, src/pcsc-wirecheck-gen.c,
	  src/pcsc-wirecheck-main.c, src/pcscdaemon.c, src/readerfactory.c,
	  src/winscard.c, src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_msg.h, src/winscard_msg_srv.c, src/winscard_svc.c,
	  src/winscard_svc.h: add support of mix 32/64 bits platforms.
	  Closes bug [#303790] pcscd protocol depends on word size; breaks
	  32-bit clients with 64-bit server
	  
	  Thanks to Jacob Berkman for the big patch
	* [r2634] src/testpcsc.c: remove an extra space

2007-10-03  Ludovic Rousseau

	* [r2633] src/debuglog.c: display time delta between two lines of
	  logs when printed to stderr

2007-09-17  Ludovic Rousseau

	* [r2625] src/testpcsc.c: use NULL instead of 0 for a char *

2007-08-26  Ludovic Rousseau

	* [r2623] .: rename ChangeLog.cvs in ChangeLog.svn
	* [r2622] src/PCSC: ignore reader.h
	* [r2621] src: ignore pcscd.h
	* [r2620] doc: ignore doxygen.conf, api & update-reader.conf.8

2007-08-22  Ludovic Rousseau

	* [r2618] src/readerfactory.c: RFLoadReader(): change the log
	  message from a scary "Warning" to a more informative one

2007-08-20  Ludovic Rousseau

	* [r2615] src/thread_unix.c: SYS_ThreadCreate(): call
	  pthread_attr_destroy() to free memory allocated by
	  pthread_attr_init()
	  
	  Thanks to Paul Klissner for the bug report

2007-08-14  Ludovic Rousseau

	* [r2614] ChangeLog, configure.in: release 1.4.4

2007-08-13  Ludovic Rousseau

	* [r2613] src/atrhandler.c, src/eventhandler.c, src/winscard.c: use
	  SCARD_PROTOCOL_UNDEFINED instead of SCARD_PROTOCOL_UNSET
	* [r2612] src/PCSC/pcsclite.h.in: rename SCARD_PROTOCOL_UNSET to
	  SCARD_PROTOCOL_UNDEFINED to reflect the Windows winscard API
	  SCARD_PROTOCOL_UNSET is still defined for backward compatibility

2007-08-08  Ludovic Rousseau

	* [r2611] src/hotplug_libusb.c: HPEstablishUSBNotifications(): make
	  the log message more explicit when the driver does not support
	  IFD_GENERATE_HOTPLUG (it is not an error)

2007-08-02  Ludovic Rousseau

	* [r2601] doc/ifdhandler-3.tex: update IFDHPowerICC() documentation

2007-07-05  Ludovic Rousseau

	* [r2598] src/hotplug_libusb.c, src/pcscdaemon.c: do not call a Log
	  function in a signal handler and do hotplug synchronously. See
	  Debian bug #430492
	  
	  Thanks to Russell Stuart for the bug report and patch

2007-07-03  Ludovic Rousseau

	* [r2595] ChangeLog: correct version number for 1.4.3

2007-07-02  Ludovic Rousseau

	* [r2594] doc/example/pcsc_demo.c: use PCSC_ERROR() also for the
	  second SCardListReaders()
	* [r2589] doc/example/pcsc_demo.c: update version
	* [r2588] doc/example/pcsc_demo.c: use PCSC_ERROR() for
	  SCardListReaders() call
	* [r2587] doc/example/pcsc_demo.c: update copyright date
	* [r2586] doc/example/pcsc_demo.c: do not free unallocated
	  resources

2007-06-25  Ludovic Rousseau

	* [r2580] etc/pcscd.init.in: Add LSB comment block See
	  http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
	  
	  Thanks to Ville Skyttä for the patch

2007-06-23  Ludovic Rousseau

	* [r2578] configure.in, doc/update-reader.conf.8.in: dynamically
	  generate update-reader.conf.8 by ./configure
	  
	  Thanks to Klaus Heinz. Closes: [#304518] update-reader.conf.8
	  should be created from update-reader.conf.8.in
	* [r2577] doc/Makefile.am: distribute update-reader.conf.8.in
	  instead of update-reader.conf.8
	* [r2576] doc/update-reader.conf.8, doc/update-reader.conf.8.in:
	  rename doc/update-reader.conf.8 in doc/update-reader.conf.8.in
	  since ./configure with generate doc/update-reader.conf.8
	* [r2575] configure.in: remove 3 unused
	  AC_PATH_PROG(TEST_MINUS_S_SH, *) lines
	  
	  Thanks to Klaus Heinz. Closes: [#304517] Check for bash/ksh/sh
	  and variable TEST_MINUS_S_SH not necessary anymore

2007-06-21  Ludovic Rousseau

	* [r2574] src/utils/formaticc.c: replace 0 by NULL
	* [r2573] configure.in: add AM_PROG_CC_C_O as requested by:
	  doc/example/Makefile.am:4: compiling `pcsc_demo.c' with
	  per-target flags requires `AM_PROG_CC_C_O' in `configure.in'

2007-06-20  Ludovic Rousseau

	* [r2572] src/PCSC/reader.h.in: Solaris, like Max OS X, does not
	  support pack(push, 1). Use pack(1) instead
	  
	  Thanks to David Markowitz

2007-06-19  Ludovic Rousseau

	* [r2570] ChangeLog, configure.in: release 1.4.3
	* [r2569] src/winscard_clnt.c: move definitions of
	  SCardLockThread() and SCardUnlockThread() at the beginning of
	  file and remove their declarations
	* [r2568] src/pcscdaemon.c: SVCServiceRunLoop(): do not exit is
	  CreateContextThread() fails. Avoids a denial of service.
	  
	  Thanks to Joshua J. Drake

2007-06-18  Ludovic Rousseau

	* [r2567] src/winscard.c: SCardStatus(): check for hCard == 0
	  
	  Thanks to Joshua J. Drake for the bug report

2007-06-17  Ludovic Rousseau

	* [r2565] src/winscard_msg.c: replace PCSCLITE_MAX_MESSAGE_SIZE by
	  sizeof(msgStruct.data)
	* [r2564] src/winscard_msg.c: patch in revision 2535 was not
	  correct for exteneded APDU. It generated a buffer overflow.
	* [r2563] doc/example/pcsc_demo.c: use EXIT_FAILURE instead of 1
	* [r2562] doc/pcsc-lite.tex: typo

2007-06-13  Ludovic Rousseau

	* [r2561] src/hotplug_libusb.c, src/pcscdaemon.c,
	  src/readerfactory.c: use NULL instead of 0 for pointers (detected
	  by sparse)
	* [r2560] src/winscard_clnt.c: do not use inline for
	  SCardLockThread() and SCardUnlockThread() declaration but only
	  for definition (detected by parse)
	* [r2559] src/thread_generic.h: add a missing #include <wintypes.h>
	  (detected by sparse)
	* [r2558] src/eventhandler.c: EHStatusHandlerThread(): use
	  SYS_ThreadExit(NULL) instead of SYS_ThreadExit(0) (detected by
	  sparse)

2007-06-05  Ludovic Rousseau

	* [r2556] src/readerfactory.c: RFLoadReader(): use INFO instead of
	  ERROR log level is the same driver library is use twice. It is
	  not an error.
	  
	  Thanks to Nils Larsch for the patch

2007-05-30  Ludovic Rousseau

	* [r2555] src/debuglog.c: declare prototypes of debug_msg() and
	  debug_xxd() to avoid debuglog.c:265: warning: no previous
	  prototype for ‘debug_msg’
	* [r2554] src/hotplug_libusb.c: HPRemoveHotPluggable(): rename
	  index to reader_index to avoid warning: declaration of ‘index’
	  shadows a global declaration /usr/include/string.h:304: warning:
	  shadowed declaration is here
	* [r2553] src/winscard_clnt.c: change prototype of SCardAddHandle()
	  to remove an explicit cast
	* [r2552] src/winscard_clnt.c: SCardEstablishContextTH(): remove a
	  local declaration of msgStruct to avoid warning: declaration of
	  'msgStruct' shadows a previous local

2007-05-29  Ludovic Rousseau

	* [r2551] src/pcscdaemon.c: set the permission on USE_RUN_PID so
	  that the file is world readable. The file is used by libpcsclite
	  to check the availability of pcscd
	* [r2550] src/utils.c, src/utils.h: move definition of
	  PID_ASCII_SIZE from utils.c to utils.h

2007-05-24  Ludovic Rousseau

	* [r2549] src/readerfactory.c: RFSetReaderEventState(): unlock the
	  card on removal. This will unlock any waiting SCardConnect() and
	  SCardReconnect()
	* [r2548] src/winscard.c: SCardConnect()/SCardDisconnect(): the
	  reader may be removed while we are waiting after a lock. fix a
	  crash of pcscd

2007-05-23  Ludovic Rousseau

	* [r2546] ChangeLog, configure.in: release 1.4.2
	* [r2545] src/winscard.c: SCardDisconnect(): do not block if
	  dwDisposition == SCARD_LEAVE_CARD.
	  
	  We block only for SCARD_UNPOWER_CARD, SCARD_RESET_CARD and
	  SCARD_EJECT_CARD since that would impact other running
	  transactions
	* [r2544] src/eventhandler.c, src/eventhandler.h,
	  src/readerfactory.c: lockState field of READER_STATE was not
	  used. Remove it and the associated dead code
	* [r2543] src/readerfactory.c, src/readerfactory.h: add a Lock
	  counter so that SCardBeginTransaction/SCardEndTransaction can be
	  nested
	* [r2542] src/winscard_clnt.c: SCardTransmit(): adjust size of data
	  to send to pcscd. Avoid a valgrind warnings.
	* [r2541] src/testpcsc.c: no need to initialise pioRecvPci. It is a
	  out only variable
	* [r2540] src/winscard_clnt.c: SCardTransmit(): we do not need to
	  correctly initialize scTransmitStruct.pioRecvPci since it is only
	  a out variable
	* [r2539] src/winscard_msg.c: #include "utils.h" since we use
	  SCardCheckDaemonAvailability()
	* [r2538] src/utils.h, src/winscard_clnt.c: move declaration of
	  SCardCheckDaemonAvailability() from winscard_clnt.c to utils.h

2007-05-22  Ludovic Rousseau

	* [r2537] src/PCSC/wintypes.h: LPTSTR and LPCTSTR types are no more
	  deprecated since they are found in many applications. And using
	  them is not a problem.
	* [r2536] src/testpcsc.c: initialise pioRecvPci before using it
	* [r2535] src/winscard_clnt.c, src/winscard_msg.c: Initialize
	  memory to avoid valgrind warnings: Syscall param write(buf)
	  points to uninitialised byte(s)
	* [r2534] src/winscard.c: use sizeof() instead of a constant

2007-05-16  Ludovic Rousseau

	* [r2530] ChangeLog: typo
	* [r2529] ChangeLog, configure.in: release 1.4.1

2007-05-15  Ludovic Rousseau

	* [r2528] src/winscard_msg.c: SHMMessageReceive(): on the client
	  side, if the daemon does not respond after 2 minutes
	  (PCSCLITE_CLIENT_ATTEMPTS) we call SCardCheckDaemonAvailability()
	  to be sure the daemon is still there and continue waiting.
	  
	  Thanks to Harsh Sangal for the bug report
	* [r2527] src/winscard_clnt.c: export
	  SCardCheckDaemonAvailability()

2007-05-10  Ludovic Rousseau

	* [r2525] doc/Makefile.am: do not build and include the pdf
	  documentation files in the archive. The html online versions
	  should be enough.

2007-05-07  Ludovic Rousseau

	* [r2513] TODO: "poll the reader only if an application is using
	  this reader"
	* [r2512] TODO: "do not use an active polling in hotplug_libusb.c"
	  solved using IFD_GENERATE_HOTPLUG

2007-04-21  Ludovic Rousseau

	* [r2507] src/pcscd.h.in: USE_IPCDIR is always defined. The default
	  value is set by ./configure
	* [r2506] configure.in: use $ipcdir/pcscd.pid as the default value
	  for so that the use of --enable-runpid=FILE is not mandatory

2007-04-12  Ludovic Rousseau

	* [r2505] src/pcscdaemon.c: update copyright dates

2007-04-04  Ludovic Rousseau

	* [r2504] configure.in, src/pcscdaemon.c: use of
	  --enable-runpid=FILE is now mandatory
	* [r2503] src/testpcsc.c: add a prototype for test_rv() to avoir a
	  compiler warning: no previous prototype for ‘test_rv’
	* [r2502] src/Makefile.am: client and server use utils.c
	* [r2501] src/winscard_clnt.c: SCardCheckDaemonAvailability(): when
	  the _first_ reader is connected _after_ pcscd has started the
	  ctime of PCSCLITE_PUBSHM_FILE changes (no idea why)
	  
	  So to be sure a new pcscd is running we also check the pcscd pid
	  available from USE_RUN_PID
	* [r2500] src/pcscdaemon.c, src/utils.c, src/utils.h: move
	  GetDaemonPid() in utils.c so we can also use it elsewhere

2007-03-29  Ludovic Rousseau

	* [r2499] src/winscard_clnt.c: SCardGetStatusChange(): do not
	  release the mutex if it does not exist anymore after a pcscd
	  restart

2007-03-28  Ludovic Rousseau

	* [r2497] src/winscard_clnt.c: SCardGetStatusChange(): do not check
	  for SCARD_STATE_ATRMATCH, SCARD_STATE_EXCLUSIVE or
	  SCARD_STATE_INUSE bits when the card is not present.
	  
	  Thanks to Matheus Ribeiro for the bug report
	* [r2496] src/eventhandler.c, src/winscard_clnt.c:
	  SCardGetStatusChange(): add a counter in the upper word of
	  dwEventState so it is possible to detect a card movement betweeen
	  two calls to SCardGetStatusChange()
	  
	  Thanks to Matheus Ribeiro for the patch

2007-03-27  Ludovic Rousseau

	* [r2495] src/hotplug_linux.c: use pcscd.h
	* [r2494] src/hotplug_macosx.c, src/powermgt_macosx.c: use pcscd.h
	  when needed.
	  
	  Thanks to Yziquel Guillaume for the bug report

2007-03-22  Ludovic Rousseau

	* [r2490] doc/pcsc-lite.tex: typo

2007-03-18  Ludovic Rousseau

	* [r2486] doc/example/pcsc_demo.c: print sent & received APDU

2007-03-15  Ludovic Rousseau

	* [r2482] src/winscard_msg.c: WrapSHMWrite(): clean the data buffer
	  for SCardTransmit() to clean the APDU buffer to remove any
	  possible PIN or secret value
	  
	  Thanks to Nils Larsch for the patch
	* [r2481] src/misc.h, src/winscard_clnt.c: move definition of min()
	  from winscard_clnt.c to misc.h

2007-03-13  Ludovic Rousseau

	* [r2479] src/winscard_clnt.c: profiling: more explicit warning in
	  case of thread
	* [r2478] src/winscard_clnt.c: profiling: the mechanism does not
	  work correctly when threads are used. Display warnings in that
	  case.
	* [r2477] src/winscard_clnt.c: profiling: detect missing
	  PROFILE_END calls
	* [r2476] src/winscard_clnt.c: profiling: display the return value
	  if different from SCARD_S_SUCCESS
	* [r2475] src/winscard_clnt.c: SCardReconnect(): block instead of
	  returning SCARD_E_SHARING_VIOLATION

2007-03-12  Ludovic Rousseau

	* [r2474] src/PCSC/ifdhandler.h: define RESPONSECODE type only if
	  RESPONSECODE_DEFINED_IN_WINTYPES_H is not defined (needed to
	  compile the driver with an old pcsc-lite)

2007-03-06  Ludovic Rousseau

	* [r2467] src/winscard_svc.c: CreateContextThread(): avoid a buffer
	  overflow if no more context available
	  
	  thanks to Petr Gajdos for the patch
	* [r2466] src/winscard.c: improve Doxygen
	* [r2465] src/testpcsc.c: when we are waiting for a card insertion
	  a reader may be connected/disconnected so SCardGetStatusChange()
	  will return but a card is not inserted
	* [r2464] src/winscard_clnt.c: SCardCheckDaemonAvailability(): if
	  the daemon is restarted we invalidate all the existing handles so
	  SCard functions returns SCARD_E_INVALID_HANDLE
	* [r2463] src/winscard_clnt.c: add prototype for SCardUnload()
	* [r2462] src/winscard_clnt.c: move code from SCardRemoveContext()
	  to a new function SCardCleanContext() and call it from
	  SCardRemoveContext()
	* [r2461] src/winscard_clnt.c: move call to
	  SCardCheckDaemonAvailability() from SCardEstablishContextTH() to
	  SCardEstablishContext() to move it oustide of
	  SCardLockThread()/SCardUnlockThread() since
	  SCardCheckDaemonAvailability() may also lock (and then deadlock)
	* [r2460] src/pcscd.h: Oops. pcscd.h.in is already in SVN
	* [r2459] src/pcscd.h: new file

2007-03-05  Ludovic Rousseau

	* [r2458] src/winscard_clnt.c: SCardIsValidContext(): return
	  SCARD_E_INVALID_HANDLE if the daemon has been restarted
	* [r2457] src/winscard_clnt.c: SCardCheckDaemonAvailability():
	  detects if pcscd has been restarted and returns
	  SCARD_E_NO_SERVICE in that case

2007-02-26  Ludovic Rousseau

	* [r2449] src/winscard_clnt.c: SCardEstablishContextTH(): call
	  fcntl(mapAddr, F_SETFD, FD_CLOEXEC); to close on exec the file
	  descriptor on /var/run/pcscd.pub so that child processes do not
	  inherits it. The child process will call SCardEstablishContext()
	  if needed.

2007-02-25  Ludovic Rousseau

	* [r2447] src/PCSC/wintypes.h: the comment about LPTSTR was wrong

2007-02-21  Ludovic Rousseau

	* [r2419] src/hotplug_libusb.c: reformat
	* [r2418] src/hotplug_libusb.c: HPReadBundleValues(): ignore driver
	  with readerName == NULL (non-ASCII readerName in Info.plist for
	  example)

2007-02-19  Ludovic Rousseau

	* [r2403] src/sys_unix.c: SYS_USleep(): use select() instead of
	  usleep() if nanosleep() can't be used. usleep() is not thread
	  safe on some old Solaris systems.
	  
	  Thanks to Nils Larsch for the patch

2007-02-17  Ludovic Rousseau

	* [r2401] doc/Makefile.am: support --docdir=... to install
	  documentation files
	  
	  Thanks to Alon Bar-Lev for the patch
	* [r2400] src/debuglog.c: add a log_line() function and use it form
	  log_msg() and log_xxd() to also have colors in log_xxd()

2007-02-13  Ludovic Rousseau

	* [r2397] ChangeLog, configure.in: release 1.4.0
	* [r2394] configure.in: only check for foo.h file when HAVE_FOO_H
	  is really used in the code

2007-02-05  Ludovic Rousseau

	* [r2388] src/utils/formaticc.c: use SCARD_SCOPE_USER instead of
	  the pcsc-lite specific SCARD_SCOPE_GLOBAL
	* [r2386] Makefile.am: ChangeLog.svn: use svn2cl instead of
	  svn2cl.sh
	* [r2385] src/winscard.c: SCardReconnect(): call SYS_USleep() to
	  "allow the status thread to convey information" only if the
	  application requests SCARD_RESET_CARD or SCARD_UNPOWER_CARD. We
	  do not wait if the application requests SCARD_LEAVE_CARD.
	* [r2384] src/winscard.c: SCardDisconnect(): call SYS_USleep() to
	  "allow the status thread to convey information" only if the
	  application requests SCARD_RESET_CARD or SCARD_UNPOWER_CARD. We
	  do not wait if the application requests SCARD_LEAVE_CARD.
	* [r2383] doc/example/pcsc_demo.c: use unsigned int i; instead of
	  int i; to avoid a compiler warning
	* [r2382] doc/example/pcsc_demo.c: add SCardBeginTransaction() &
	  SCardEndTransaction
	* [r2381] doc/example/pcsc_demo.c: use SCARD_SHARE_SHARED instead
	  of SCARD_SHARE_EXCLUSIVE
	* [r2380] src/Makefile.am: add pcscd.h and pcscd.h.in to
	  pcscd_SOURCES:
	* [r2379] src/winscard.c: SCardBeginTransaction(): document the
	  SYS_USleep() call
	* [r2378] src/pcscd.h.in, src/winscard.c: define and use
	  PCSCLITE_LOCK_POLL_RATE as SYS_USleep() argument when waiting
	  after a lock
	* [r2377] src/configfile.l, src/eventhandler.c,
	  src/hotplug_libusb.c, src/ifdwrapper.c, src/pcscdaemon.c,
	  src/prothandler.c, src/readerfactory.c, src/winscard.c,
	  src/winscard_clnt.c, src/winscard_msg.c, src/winscard_msg_srv.c,
	  src/winscard_svc.c: use pcscd.h instead of pcsclite.h
	* [r2376] configure.in: generate src/pcscd.h from src/pcscd.h.in
	* [r2375] src/PCSC/pcsclite.h.in, src/pcscd.h.in: move pcscd
	  internal constants from pcsclite.h to pcscd.h so they are no more
	  available in /usr/include/pcsclite.h
	* [r2374] src/winscard.c, src/winscard_clnt.c:
	  SCardBeginTransaction() client and server side: call SYS_USleep()
	  on the server side insead of client side and only if needed.
	  SCardBeginTransaction() will be much faster
	* [r2373] src/winscard_clnt.c: profile_end(): call fflush() to sync
	  the profile file
	* [r2372] src/winscard.c: SCardBeginTransaction(),
	  SCardEndTransaction() and SCardCancelTransaction(): display PC/SC
	  return value in hex instead of decimal
	* [r2371] src/winscard_clnt.c: profile_start(): use a different
	  profile file name for each user so two users can use profiling at
	  the same time

2007-01-31  Ludovic Rousseau

	* [r2370] src/hotplug_libusb.c: HPEstablishUSBNotifications(): do
	  not overwrite the value specified with --force-reader-polling=val
	* [r2369] src/hotplug_libusb.c: HPEstablishUSBNotifications(): USB
	  polling was not active even if a driver does not support
	  IFD_GENERATE_HOTPLUG
	* [r2368] src/winscard.c: add profiling framework on the server
	  side
	* [r2367] src/readerfactory.c: RFInitializeReader(): add debug logs

2007-01-23  Ludovic Rousseau

	* [r2354] doc/Makefile.am: do not install formaticc.1 manpage since
	  the binary is no more installed
	* [r2353] src/sys_unix.c: SYS_USleep(): also work for a duration
	  greater than 1 sec
	* [r2352] src/pcscdaemon.c, src/winscard_msg_srv.c: FreeBSD needs
	  to timeout in select() to get the Ctrl-C signal Revert revision
	  2148 and 2149 for *BSD
	  
	  Thanks to Tilman Linneweh for the bug report

2007-01-20  Ludovic Rousseau

	* [r2350] src/eventhandler.c: EHStatusHandlerThread(): also display
	  the hexa value of the return code if power up fails
	* [r2349] src/winscard.c: SCardConnect(): return
	  SCARD_W_UNPOWERED_CARD if the card is mute instead of returning
	  SCARD_E_PROTO_MISMATCH because the requested protocol is not
	  supported by the (mute) card
	* [r2348] src/PCSC/ifdhandler.h, src/PCSC/wintypes.h: move
	  RESPONSECODE definition from wintypes.h to ifdhandler.h since it
	  should only be used as return type of IFDHandler functions
	* [r2347] src/ifdwrapper.c: use IFD_SUCCESS instead of 0 as initial
	  value

2007-01-19  Ludovic Rousseau

	* [r2343] ChangeLog: release 1.3.3
	* [r2341] doc/Makefile.am: use the default Doxygen CSS file instead
	  of a (bad) local one

2007-01-18  Ludovic Rousseau

	* [r2340] doc/pcscd.8.in: do not reference formaticc since this
	  tool is deprecated and no more installed
	* [r2339] doc/pcscd.8.in: document --hotplug option

2007-01-11  Ludovic Rousseau

	* [r2335] src/pcscdaemon.c: document --force-reader-polling in the
	  online help
	* [r2334] src/hotplug_libusb.c, src/pcscdaemon.c: add
	  --force-reader-polling command line option to force the bus
	  polling even if the drivers says they support
	  IFD_GENERATE_HOTPLUG
	  
	  Thanks to Alon Bar-Lev for the suggestion
	* [r2333] src/pcscdaemon.c: define OPT_STRING to avoid duplicating
	  the getopt option string
	* [r2332] src/pcscdaemon.c: newReaderConfig is a char * so use NULL
	  instead of 0
	* [r2331] src/configfile.h, src/configfile.l: DBGetReaderList()
	  prototype: use const char *readerconf instead of char *
	* [r2330] src/readerfactory.c, src/readerfactory.h:
	  RFStartSerialReaders(): use const char * instead of char *

2007-01-10  Ludovic Rousseau

	* [r2327] src/pcscdaemon.c: log "pcscd was not configured with
	  --enable-runpid=FILE" if pcscd --hotplug is called but can't be
	  used because no pidfile is available.
	  
	  Thanks to Alon Bar-Lev for the idea.
	* [r2325] doc/example/pcsc_demo.c: improve code to be able to also
	  use T=1 cards
	* [r2324] doc/ifdhandler-3.tex: add IFD_GENERATE_HOTPLUG
	  documentation
	* [r2323] doc/pcsc-lite.tex: add SCardIsValidContext()
	  documentation

2007-01-09  Ludovic Rousseau

	* [r2321] src/winscard_msg.c: Doxygen: correct parameter names
	* [r2320] src/testpcsc.c: test for SCardIsValidContext()
	* [r2319] src/PCSC/winscard.h, src/winscard_clnt.c: implement
	  SCardIsValidContext()

2007-01-06  Ludovic Rousseau

	* [r2310] src/hotplug.h, src/hotplug_libusb.c: add support for
	  IFD_GENERATE_HOTPLUG bit in driver Info.plist ifdCapabilities
	* [r2309] src/tokenparser.l: correct a warning: assignment discards
	  qualifiers from pointer target type
	* [r2308] src/winscard_msg.c, src/winscard_msg.h: change prototype
	  of SHMCleanupSharedSegment() from (..., char *pcFilePath) to
	  (..., const char *pcFilePath) to avoid: warning: passing argument
	  2 of 'SHMCleanupSharedSegment' discards qualifiers from pointer
	  target type
	* [r2307] src/readerfactory.c: use f1 instead of f to avoid:
	  warning: declaration of ‘f’ shadows a previous local
	* [r2306] src/pcscdaemon.c: define GetDaemonPid() prototype
	* [r2305] src/hotplug_libusb.c: define prototypes for
	  HPRescanUsbBus() and HPEstablishUSBNotifications()
	* [r2304] src/tokenparser.l: tpevalToken(): use unsigned int to
	  avoid: tokenparser.l:74: warning: comparison between signed and
	  unsigned tokenparser.l:90: warning: comparison between signed and
	  unsigned
	* [r2303] src/parser.h, src/tokenparser.l: change prototype of
	  LTPBundleFindValueWithKey() from "char *fileName, char *tokenKey,
	  ..." to "const char *fileName, const char *tokenKey, ..."
	* [r2302] src/debuglog.c: DebugLogSetLogType(): use unsigned int to
	  avoid: debuglog.c:182: warning: comparison between signed and
	  unsigned
	* [r2301] src/configfile.l: evaluatetoken(): use unsigned int to
	  avoid the warning: configfile.l:80: warning: comparison between
	  signed and unsigned
	* [r2300] src/debug.c, src/hotplug_libusb.c: use unsigned int to
	  solve the warning: debug.c:60: warning: comparison between signed
	  and unsigned

2006-12-25  Ludovic Rousseau

	* [r2286] doc/ifdhandler-3.tex: IOCTL_SMARTCARD_VENDOR_VERIFY_PIN
	  is deprecated. Use CM_IOCTL_GET_FEATURE_REQUEST instead
	* [r2284] src/ifdwrapper.c: IFDStatusICC(): correctly set card
	  status to SCARD_UNKNOWN. patch in revision 2283 was bogus
	* [r2283] src/ifdwrapper.c: IFDStatusICC(): if IFDHICCPresence()
	  set card status to SCARD_UNKNOWN instead of an uninitialised
	  value
	* [r2282] src/readerfactory.c: RFAddReader(): fails if
	  RFSetReaderName() fails (too many readers for the same driver for
	  example)
	* [r2281] src/readerfactory.c: RFSetReaderName(): fails if the
	  number of readers exceeds the number of supported readers by the
	  driver.
	  
	  If the driver does not implement TAG_IFD_SIMULTANEOUS_ACCESS it
	  is assumed to only support 1 reader.
	* [r2279] src/pcscdaemon.c: signal_reload(): disable hotplug when
	  shutdown is on going

2006-12-12  Ludovic Rousseau

	* [r2274] src/winscard.c: SCardGetAttrib()/SCardSetAttrib(): if the
	  driver returns IFD_ERROR_TAG we return
	  SCARD_E_UNSUPPORTED_FEATURE instead of the generic error code
	  SCARD_E_NOT_TRANSACTED

2006-12-11  Ludovic Rousseau

	* [r2272] configure.in: add PKG_PROG_PKG_CONFIG

2006-12-05  Ludovic Rousseau

	* [r2267] src/winscard_clnt.c: SCardStatus(): move an
	  initialization outside of a for() loop (improve speed)
	* [r2266] src/winscard_clnt.c: SCardGetIndicesFromHandle(): check
	  that hCard is non null (used as marker for unused entry)

2006-12-03  Ludovic Rousseau

	* [r2265] src/dyn_generic.h, src/dyn_hpux.c, src/dyn_macosx.c,
	  src/dyn_unix.c, src/dyn_win32.c: pcFunction argument of
	  DYN_GetAddress is "const char *" instead of "char *"
	* [r2264] src/sys_generic.h, src/sys_unix.c: use "const char *"
	  instead of "char *" when needed
	* [r2263] src/debug.c: warning: no previous prototype for
	  'log_init'

2006-12-02  Ludovic Rousseau

	* [r2262] src/strlcat.c: #include "strlcpycat.h"
	* [r2261] src/powermgt_generic.c: #include "powermgt_generic.h"
	* [r2259] src/strlcpy.c: #include "strlcpycat.h"

2006-11-30  Ludovic Rousseau

	* [r2250] src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_msg.h, src/winscard_svc.c: add support of "extended"
	  SCardControl()
	* [r2249] src/winscard_clnt.c: SCardEstablishContextTH(): return
	  the error code if the connection to the server fails (wrong
	  protocol version for example)
	* [r2248] src/winscard_svc.c: ContextThread(): check that the
	  client protocol version is not newer than the protocol version of
	  the server or returns SCARD_E_NO_SERVICE otherwise.
	* [r2247] src/winscard_msg.c: use "char *" variables instead of
	  "void *" when arithmetic is done (typically ptr+offset).
	  
	  Avoids: warning: pointer of type 'void *' used in arithmetic
	* [r2246] src/sys_unix.c: warning: C++ style comments are not
	  allowed in ISO C90
	* [r2245] src/winscard_clnt.c: warning: C++ style comments are not
	  allowed in ISO C90
	* [r2244] src/winscard.c: SCardControl(): do not limit cbSendLength
	  to MAX_BUFFER_SIZE bytes since we now transparently support up to
	  MAX_BUFFER_SIZE_EXTENDED bytes.
	  
	  Thanks to Martin Führlinger for the bug report

2006-11-29  Ludovic Rousseau

	* [r2243] src/pcscdaemon.c: do not define GetDaemonPid if
	  USE_RUN_PID is NOT defined
	* [r2242] src/pcscdaemon.c: SendHotplugSignal() does nothing if
	  USE_RUN_PID is NOT defined
	* [r2241] src/hotplug_libusb.c: HPRescanUsbBus(): replace .driver
	  by .fullName also for *BSD systems

2006-11-23  Ludovic Rousseau

	* [r2236] TODO: Allow connection from a 32-bits and 64-bits client
	  to the same pcscd server. This is part of the Apple patches and
	  improvements. see Alioth bug #303790

2006-11-21  Ludovic Rousseau

	* [r2233] src/atrhandler.c: Doxygen ATRDecodeAtr()
	* [r2232] src/hotplug_libusb.c: remove the driver field from struct
	  readerTracker use the fullName field to check if the reader entry
	  is valid or not
	* [r2231] src/pcscdaemon.c: signal_reload(): log the End reload
	  serial configuration
	* [r2230] src/hotplug_libusb.c: HPRescanUsbBus(): setenv
	  USB_DEVFS_PATH to /proc/bus/usb
	  
	  libusb default is /dev/bus/usb but the devices are not yet
	  visible there when a hotplug is requeste
	* [r2229] src/winscard.c, src/winscard_clnt.c: add Doxygen
	  cross-references to #define values
	* [r2228] src/PCSC/pcsclite.h.in: reorder SCARD_E_* codes in
	  increasing order
	* [r2227] src/PCSC/pcsclite.h.in: add Doxygen documentation for
	  SCARD_E_* error codes (text reused from MSDN)
	* [r2226] src/PCSC/pcsclite.h.in: add SCARD_E_NO_READERS_AVAILABLE

2006-11-15  Ludovic Rousseau

	* [r2209] configure.in: version 1.3.3
	* [r2204] src/ifdwrapper.c: if a driver command returns
	  IFD_NO_SUCH_DEVICE we call SendHotplugSignal() to rescan the
	  USB/serial/etc. readers and purge the removed readers from the
	  reader list
	* [r2203] src/hotplug.h: add SendHotplugSignal() prototype
	* [r2202] src/pcscdaemon.c: reorganise code to create
	  GetDaemonPid() and SendHotplugSignal() functions
	* [r2201] src/PCSC/ifdhandler.h: add IFD_NO_SUCH_DEVICE return
	  value
	* [r2200] src/testpcsc.c: use fgets() instead of scanf() to also
	  consume the carriage return
	* [r2199] src/testpcsc.c: use tabulations for alignment instead of
	  spaces
	* [r2198] src/testpcsc.c: test for SCARD_ATTR_MAXINPUT (only
	  supported by my CCID driver for now)

2006-11-10  Ludovic Rousseau

	* [r2196] configure.in, src/Makefile.am: do not include src/utils/
	  since the tools installifd and formaticc are now completly
	  outdated and should not be used anymore.

2006-10-31  Ludovic Rousseau

	* [r2194] src/PCSC/winscard.h: remove SCardUnload() since it is not
	  in the PC/SC API

2006-10-29  Ludovic Rousseau

	* [r2193] src/hotplug_libusb.c, src/pcscdaemon.c: check for rescan
	  ongoing in pcscdaemon.c:signal_reload() instead of
	  hotplug_libusb.c:HPReCheckSerialReaders() since the code is not
	  specific to libusb

2006-10-23  Ludovic Rousseau

	* [r2192] src/hotplug_libusb.c: move code of
	  HPEstablishUSBNotifications() into a new function
	  HPRescanUsbBus()
	  
	  HPRescanUsbBus() is called: - periodically from
	  HPEstablishUSBNotifications() if USB_POLLING is defined - by
	  HPReCheckSerialReaders() when a SIGUSR1 signal is received so we
	  can use udev hotplug events to rescan the USB bus instead of
	  polling
	* [r2191] src/pcscdaemon.c: removed unused external reference to
	  ReCheckSerialReaders
	* [r2190] src/pcscdaemon.c, src/winscard_msg_srv.c:
	  SHMProcessEventsServer(): returns -2 in case of syscall
	  interrupted (EINTR) and -1 for other errors.
	  
	  SVCServiceRunLoop(): do not log an error message in case of -2
	  since it happens when SIGUSR1 (reload) or SIGINT (Ctrl-C) is
	  received. We just try again
	* [r2189] src/pcscdaemon.c: main(): fail if hotplug is requested
	  but no pcscd is running

2006-10-19  Ludovic Rousseau

	* [r2188] src/misc.h: do not use visibility("default") for gcc
	  versions <= 3.3
	  
	  Thanks to Hemanth Kumar for the bug report and Karsten Ohme for
	  the patch
	* [r2187] src/pcscdaemon.c: main(): do not use USE_RUN_PID in a Log
	  message if it is not defined

2006-10-11  Ludovic Rousseau

	* [r2185] src/winscard.c: SCardConnect(): add some debug output in
	  the "waiting for release of lock"
	* [r2184] src/winscard.c: SCardDisconnect(): wait for the lock to
	  be released only if it held by someone else (and not just by
	  ourself).
	* [r2183] src/winscard_svc.c: MSGRemoveContext(): do not reset the
	  card if it is locked by by someone else but simulate a card
	  removal instead
	* [r2182] src/readerfactory.c: RFUnlockSharing(): small rewrite

2006-10-05  Ludovic Rousseau

	* [r2181] doc/Makefile.am, doc/update-reader.conf.8: add
	  update-reader.conf.8 manpage.
	  
	  Thanks to Florian Schmaus for the bug report

2006-09-27  Ludovic Rousseau

	* [r2180] src/winscard_svc.c: MSGRemoveContext(): Unlock the
	  sharing so we do not get blocked in SCardDisconnect() waiting
	  forever
	* [r2179] src/winscard.c: SCardConnect()/SCardDisconnect(): use a
	  loop of 0.1 second instead of 0.1 millisecond to wait until the
	  sharing is over

2006-09-26  Ludovic Rousseau

	* [r2178] src/winscard.c: SCardConnect() & SCardDisconnect(): wait
	  until any transaction finishes before going on. This avoids the
	  possibility to reset a card in the middle of a transaction
	  
	  Thanks to Martin Paljak for the bug report
	* [r2177] src/testpcsc.c: factor the return value test code and add
	  some color

2006-09-20  Ludovic Rousseau

	* [r2169] src/testpcsc.c: test SCARD_ATTR_VENDOR_NAME tag for
	  SCardGetAttrib
	* [r2167] src/testpcsc.c: add a test for SCardGetAttrib(...
	  SCARD_ATTR_VENDOR_IFD_VERSION...)
	* [r2164] src/error.c: pcsc_stringify_error(): correct a off-by-one
	  buffer overflow. Closes #303836 "pcsc-lite-1.3.2: array subscript
	  out of range"
	  
	  Thanks to David Binderman for the bug report and patch.

2006-09-13  Ludovic Rousseau

	* [r2160] src/winscard_clnt.c: change dwContextIndex type from
	  DWORD to LONG since we compare it to -1
	  
	  Thanks to -Wextra for the potential bug report
	* [r2159] src/testpcsc.c: correct some variable types to avoid
	  compiler warning: comparison between signed and unsigned
	* [r2158] src/winscard_clnt.c: reformat
	* [r2157] src/pcscdaemon.c: add -H --hotplug argument to ask the
	  daemon to rescan the avaiable readers

2006-09-06  Ludovic Rousseau

	* [r2151] COPYING, ChangeLog, HELP, NEWS, README, SECURITY,
	  bootstrap, doc/README.DAEMON, doc/doxygen.conf.in,
	  doc/doxygen.css, doc/formaticc.1, doc/ifdhandler-3.tex,
	  doc/pcscd.8.in, doc/reader.conf.5.in, src/PCSC/debuglog.h,
	  src/PCSC/ifdhandler.h, src/README_INTERNALS.txt,
	  src/atrhandler.c, src/atrhandler.h, src/configfile.l,
	  src/debug.c, src/debuglog.c, src/dyn_macosx.c, src/dyn_win32.c,
	  src/error.c, src/eventhandler.c, src/eventhandler.h,
	  src/hotplug_libusb.c, src/hotplug_macosx.c, src/ifdwrapper.c,
	  src/ifdwrapper.h, src/libpcsclite.pc.in, src/misc.h,
	  src/pcscdaemon.c, src/powermgt_generic.h, src/powermgt_macosx.c,
	  src/prothandler.c, src/readerfactory.c, src/readerfactory.h,
	  src/strlcat.c, src/strlcpy.c, src/sys_unix.c, src/testpcsc.c,
	  src/thread_unix.c, src/utils/formaticc.c, src/utils/installifd.c,
	  src/winscard.c, src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_msg.h, src/winscard_msg_srv.c, src/winscard_scf.c,
	  src/winscard_svc.c, win32/pthread.h, win32/sched.h: remove
	  trailing spaces at end of lines

2006-09-05  Ludovic Rousseau

	* [r2149] src/pcscdaemon.c: SVCServiceRunLoop():
	  SHMProcessEventsServer() will not timeout anymore so remove the
	  managenemt code (which did nothing)
	* [r2148] src/winscard_msg_srv.c: SHMProcessEventsServer(): do not
	  use a 1 second timeout in select() to catch Ctrl-C since SIGINT
	  will cause select() to return with EINTR
	  
	  See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=205182
	  for the bug report
	* [r2147] TODO: add "do not use an active polling in
	  hotplug_libusb.c"

2006-08-31  Ludovic Rousseau

	* [r2146] src/winscard_msg.h: struct transmit_struct_extended: use
	  BYTE data[1]; instead of BYTE data[0]; since Sun Studio 11 does
	  not like 0-sized arrays.
	  
	  Thanks to Iain MacDonnell for the bug report
	* [r2145] src/readerfactory.h: struct ReaderContext: use int32_t
	  instead of DWORD for dwContexts since we also use negative values
	  (SCARD_EXCLUSIVE_CONTEXT defined as -1)
	  
	  Thanks to -Wextra for the bug report
	* [r2144] src/winscard.c: SCardStatus(): do not check for negative
	  value of rContext->readerState->cardAtrLength since it is a DWORD
	  (unsigned)
	  
	  Thanks to -Wextra for the bug report
	* [r2143] src/winscard_msg.c: SHMClientSetupSession(): store the
	  returned value of socket() in an int instead of a DWORD
	  (unsigned) so we can check for negative values
	  
	  Thanks to -Wextra for the bug report
	* [r2142] src/winscard_clnt.c: SCardGetStatusChange(): do not test
	  for (cReaders < 0) since cReaders is a DWORD and a DWORD is
	  unsigned.
	  
	  Thanks to -Wextra for the bug report

2006-08-15  Ludovic Rousseau

	* [r2141] TODO: add manage power suspend/resume

2006-08-13  Ludovic Rousseau

	* [r2139] src/sys_generic.h, src/sys_unix.c: remove unused
	  functions. SYS_Mknod() could not be compiled using tcc

2006-08-11  Ludovic Rousseau

	* [r2138] ChangeLog, configure.in: release 1.3.2
	* [r2137] doc/Makefile.am: do not fail to remove api when the
	  directory is not there

2006-08-09  Ludovic Rousseau

	* [r2129] src/hotplug_libusb.c: Revert patch in revision 2127. The
	  problematic to try a second driver start if the first one fails
	  has to be in the driver itself, not in pcscd.

2006-08-08  Ludovic Rousseau

	* [r2128] src/winscard_svc.c: CreateContextThread(): log an error
	  message in case of failuer since the pcscd daemon will die
	  shortly after that
	* [r2127] src/hotplug_libusb.c: HPAddHotPluggable(): if a reader
	  fails to start we try to start it a second time

2006-08-07  Ludovic Rousseau

	* [r2126] doc/pcsc-lite.tex: in SCardStatus subsection, the
	  argument is pdwProtocol and not dwPreferredProtocols
	* [r2125] src/PCSC/reader.h.in: Transform C comments into Doxygen
	  comments
	* [r2124] src/PCSC/pcsclite.h.in: Transform C comments into Doxygen
	  comments

2006-07-31  Ludovic Rousseau

	* [r2115] src/strlcat.c, src/strlcpy.c: #include "config.h" and
	  define strlcpy/strlcat only if they are not already provided by
	  the OS (test HAVE_STRLCPY)
	* [r2114] src/configfile.l, src/readerfactory.c, src/testpcsc.c,
	  src/winscard_clnt.c: do not cast malloc() return value
	* [r2113] src/PCSC/reader.h.in: document that the 4 bytes field
	  value in PCSC_TLV_STRUCTURE is always in big endian as documented
	  in PCSC v2 part 10 ch 2.2 page 2. You can use ntohl() to convert
	  the value.
	  
	  Thanks to Ulrich Vogl for the bug report

2006-07-10  Ludovic Rousseau

	* [r2102] src/winscard_clnt.c: SCardCheckDaemonAvailability(): test
	  the presence of PCSCLITE_PUBSHM_FILE (/var/run/pcscd.pub) instead
	  of PCSCLITE_IPC_DIR (/var/run) to detect the presence of pcscd
	  
	  Thanks to Geoff Elgey for the bug report

2006-06-15  Ludovic Rousseau

	* [r2080] src/testpcsc.c: revert the last change. It was a
	  manipulation error.
	* [r2079] src/error.c, src/testpcsc.c: This file is dual licenced:
	  - BSD-like, see the COPYING file - GNU Lesser General Licence 2.1
	  or (at your option) any later version.

2006-06-07  Ludovic Rousseau

	* [r2077] src/winscard_clnt.c: SCardUnload(): use
	  SYS_PublicMemoryUnmap() to free the memory mapped segment.
	  
	  Thanks to Stefan Schuermans for the bug report and patch
	* [r2076] src/sys_generic.h, src/sys_unix.c: implement
	  SYS_PublicMemoryUnmap()
	  
	  Thanks to Stefan Schuermans for the patch
	* [r2075] src/sys_unix.c: SYS_PublicMemoryMap(): check the value
	  returned by mmap() to detect a memory exhaustion

2006-06-06  Ludovic Rousseau

	* [r2074] src/winscard_msg.c: document the parameters changes for
	  SHMMessageSend() and SHMMessageReceive() for Doxygen
	* [r2073] doc/pcsc-lite.tex, src/readerfactory.c,
	  src/winscard_clnt.c: do not cast malloc() return value.
	* [r2072] doc/example/pcsc_demo.c, doc/pcsc-lite.tex,
	  src/PCSC/ifdhandler.h, src/PCSC/winscard.h, src/eventhandler.c,
	  src/ifdwrapper.c, src/readerfactory.c, src/readerfactory.h,
	  src/utils/formaticc.c, src/winscard.c, src/winscard_clnt.c,
	  src/winscard_scf.c: replace LPTSTR and LPCTSTR by LPSTR and
	  LPCSTR
	* [r2071] src/PCSC/wintypes.h: use LPCSTR and LPSTR instead of
	  LPCTSTR and LPTSTR.
	  
	  LPCTSTR is either LPCSTR or LPCWSTR depending on the value of
	  UNICODE under Windows. So this type name should not be used
	  directly.
	  
	  See
	  http://archives.neohapsis.com/archives/dev/muscle/2006-q2/0149.html

2006-05-26  Ludovic Rousseau

	* [r2068] src/PCSC/pcsclite.h.in: define MAX_BUFFER_SIZE_EXTENDED
	  to contain up to 64KB of data instead of just 32KB
	* [r2067] src/winscard_svc.c: MSGFunctionDemarshall(): remove two
	  debug messages

2006-05-25  Ludovic Rousseau

	* [r2066] TODO: remove "allow the use of extended APDU without
	  breaking libpcsclite ABI" since it is implemented now
	* [r2065] README: do not document --enable-extendedapdu any more
	* [r2064] configure.in: remove --enable-extendedapdu since it is
	  useless now
	* [r2063] src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_svc.c: add support of extended APDU as a new command
	  so we do not need to compile pcsc-lite with or without extended
	  APDU
	* [r2062] src/winscard.c: SCardTransmit(): do not check if
	  cbSendLength or dwRxLength are > MAX_BUFFER_SIZE since this is
	  done by the client already
	* [r2061] src/winscard_clnt.c, src/winscard_msg.c,
	  src/winscard_msg_srv.c, src/winscard_svc.c: use new
	  SHMMessageReceive/SHMMessageSend API
	* [r2060] src/winscard_msg.c, src/winscard_msg.h: SHMMessageSend()
	  and SHMMessageReceive() use "void *buffer, size_t buffer_size"
	  instead of psharedSegmentMsg msgStruct with a fixed size
	* [r2059] src/winscard_msg.h: add SCARD_TRANSMIT_EXTENDED in
	  pcsc_msg_commands and transmit_struct_extended structure
	* [r2058] src/winscard_msg.h: PROTOCOL_VERSION_MINOR changed from 0
	  to 1
	* [r2057] src/PCSC/pcsclite.h.in: #define MAX_BUFFER_SIZE_EXTENDED
	  and remove the @extended_apdu@ management
	* [r2056] src/winscard_svc.c: MSGFunctionDemarshall(): log an error
	  if pcscd receives an unknown command
	* [r2054] src/debug.c: log_init(): remove a "pouet" printf() debug
	  message

2006-05-24  Ludovic Rousseau

	* [r2053] src/Makefile.am: move the .h file in the *_SOURCES
	  targets so that "make ctags" include them

2006-05-23  Ludovic Rousseau

	* [r2052] src/README_INTERNALS.txt: correct typos
	* [r2051] src/README_INTERNALS.txt: update the list of source
	  filesfor pcscd and libpcsclite.la

2006-05-20  Ludovic Rousseau

	* [r2050] src/debuglog.c: log_xxd(): replace strlen(c) by 3 since
	  the string length is constant (gain a few CPU cycles)
	* [r2049] src/debuglog.c: log_xxd(): if the buffer is too small
	  then end it with "..."

2006-05-12  Ludovic Rousseau

	* [r2042] src/debug.c, src/debuglog.c: improve the @brief comment
	  to differentiate between debug for pcsclite and debug for pcscd

2006-05-09  Ludovic Rousseau

	* [r2040] src/readerfactory.c: RFInitializeReader(): display the
	  name of the driver used in addition to the name of the reader

2006-05-02  Ludovic Rousseau

	* [r2030] src/strlcat.c, src/strlcpy.3, src/strlcpy.c: update to
	  the latest version available from OpenBSD (2005/08/06)
	* [r2029] src/eventhandler.c: EHInitializeEventStructures(): check
	  against MAP_FAILED instead of 0 for the returned value of
	  SYS_MemoryMap().
	  
	  Thanks to Davide Rizzo for the bug report and patch
	* [r2028] src/sys_generic.h: #include <sys/mman.h> so that
	  MAP_FAILED is defined (value returned by SYS_MemoryMap() in case
	  of error)
	* [r2027] src/sys_unix.c: SYS_MemoryMap(): document in Doxygen that
	  the function returns MAP_FAILED in case of error

2006-04-22  Ludovic Rousseau

	* [r2025] ChangeLog, configure.in: release 1.3.1
	* [r2024] src/readerfactory.c: RFLoadReader(): change the way
	  DYN_GetAddress() is used to have a simpler code and avoid a
	  warning: dereferencing type-punned pointer will break
	  strict-aliasing rules

2006-04-20  Ludovic Rousseau

	* [r2018] src/PCSC/ifdhandler.h: do not use EXTERNAL to export the
	  symbols (revert the previous patch)

2006-04-19  Ludovic Rousseau

	* [r2015] README: Add a comment regarding the use of
	  LDFLAGS="-lpthread"

2006-04-18  Ludovic Rousseau

	* [r2010] doc/ifdhandler-3.tex, src/parser.h: do not export
	  LTPBundleFindValueWithKey() to the drivers anymore
	* [r2009] src/PCSC/ifdhandler.h: tag the functions of the API as
	  EXTERNAL. This can be used to export only those symbols from the
	  driver library.
	* [r2008] src/misc.h: EXTERNAL is a synonym for PCSC_API but more
	  anonymous

2006-04-11  Ludovic Rousseau

	* [r1998] src/winscard_svc.c: CreateContextThread(): do not use a
	  pointer to the argument but the argument itself to avoid using
	  the same value for two consecutive threads
	  
	  Thanks to Fabien Merlet for the bug report. See
	  http://archives.neohapsis.com/archives/dev/muscle/2006-q2/0038.html

2006-03-31  Ludovic Rousseau

	* [r1991] doc/ifdhandler-3.tex: use \texttt{} instead of \file{}
	  (it works with latex2html but not with pdflatex)
	* [r1990] src/misc.h: use __misc_h__ instead of __local_h__ since
	  the file name is misc.h
	* [r1989] doc/ifdhandler-3.tex: log_msg: document that you should
	  use the macros defined in <debuglog.h>

2006-03-30  Ludovic Rousseau

	* [r1988] doc/pcsc-lite.tex: log_msg and log_xxd are only available
	  for pcscd drivers. These functions are no more provided by
	  libpcsclite

2006-03-27  Ludovic Rousseau

	* [r1980] configure.in: use use_libusb="${use_libusb-yes}" so that
	  use_libusb is defined to yes only if it was not previously
	  defined
	  
	  libusb is not used by default on Mac OS X and use_libusb=no is
	  already used in that case a few lines above in the script
	* [r1979] src/hotplug_macosx.c: compile only on Apple and if libusb
	  is not used
	* [r1978] src/Makefile.am: add $(LIBUSB_CFLAGS) to pcscd_CFLAGS
	* [r1975] doc/pcsc-lite.tex: SCardConnect(): the paramater name is
	  dwShareMode instead of dwScope

2006-03-23  Ludovic Rousseau

	* [r1970] src/hotplug_libusb.c: HPAddHotPluggable(): add the USB
	  serial number only if ADD_SERIAL_NUMBER is defined (default).
	  just #undef the macro if you do not like the serial number
	  addition.

2006-03-21  Ludovic Rousseau

	* [r1964] src/Makefile.am: add -DLIBPCSCLITE to
	  libpcsclite_la_CFLAGS (used in debug.c)
	* [r1963] src/Makefile.am: add debug.c to libpcsclite_la_SOURCES
	* [r1962] src/debug.c: provice log_msg() and log_xxd()
	  implementation for the client side
	* [r1961] src/debug.h: use log_msg() instead of fprintf() for
	  Logx() macro used in libpcsclite so we can manage priority and
	  color
	* [r1960] src/tokenparser.l: use debug.h instead of debuglog.h
	* [r1959] src/Makefile.am: do not use libpcsclite-core anymore
	  since the same source code generates two different object files
	  (depending on the presence of -DPCSCD)
	* [r1958] src/winscard_clnt.c: do not use MUSCLECARD_DEBUG
	  environment variable anymore to activate the logs
	* [r1957] src/dyn_hpux.c, src/dyn_macosx.c, src/dyn_unix.c,
	  src/dyn_win32.c, src/sys_unix.c, src/winscard_msg.c,
	  src/winscard_scf.c: #include "debug.h" instead of "debuglog.h" to
	  use fprintf() or syslog() depending if the file is used for pcscd
	  (if PCSCD is defined) or for libpcsclite
	* [r1956] src/debug.h: define Logx() functions for use in
	  libpcsclite (just a fprintf(stderr, ...))
	* [r1955] src/PCSC/debuglog.h: do not declare
	  pcsc_stringify_error() here since it is already declared in
	  PCSC/pcsclite.h
	* [r1954] src/readerfactory.c: do not use pcsc_stringify_error()
	  since I don't want this code in the daemon just for _one_
	  function
	* [r1953] src/debuglog.c, src/error.c: move pcsc_stringify_error()
	  in its own file
	* [r1952] src/PCSC/debuglog.h: remove duplicate Log3() definition

2006-03-20  Ludovic Rousseau

	* [r1948] doc/pcsc-lite.tex: document log_msg and log_xxd
	* [r1947] doc/pcsc-lite.bib, doc/pcsc-lite.tex: document VERIFY_PIN
	  and MODIFY_PIN commands using PCSCv2 part 10 instead of the
	  "proprietary" mechanism now unsupported
	* [r1946] doc/pcsc-lite.tex: upgrade sample code for
	  IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE

2006-03-17  Ludovic Rousseau

	* [r1937] doc/ifdhandler-3.tex: add IFD_NOT_SUPPORTED in the
	  possible return values for IFDHSetProtocolParameters()
	* [r1936] doc/ifdhandler-3.tex: document the possible values for
	  Protocol argument in IFDHSetProtocolParameters()
	  
	  Closes bug [ #303238 ] IFDHSetProtocolParameters is called with
	  Protocol=1 even though debug log says T=0

2006-03-16  Ludovic Rousseau

	* [r1935] src/misc.h: do not use #define INTERNAL __hidden on
	  Solaris since the linker can't use symbol declared __hidden in
	  the file it is declared.
	  
	  See
	  http://archives.neohapsis.com/archives/dev/muscle/2006-q1/0144.html
	  Thanks to Iain MacDonnell for the bug report

2006-03-15  Ludovic Rousseau

	* [r1933] configure.in: document --disable-libusb instead of
	  --enable-libusb since libusb is used by default.
	  
	  Thanks to Shawn Willden for the bug report

2006-03-08  Ludovic Rousseau

	* [r1931] configure.in: Add support of Solaris

2006-03-07  Ludovic Rousseau

	* [r1929] README: remove documentation on
	  --enable-muscledropdir=DIR since this option moved to
	  libmusclecard now
	  
	  Thanks to Ville Skyttä for the patch
	* [r1928] configure.in: remove a useless AC_SUBST(muscledropdir)

2006-03-03  Ludovic Rousseau

	* [r1906] ChangeLog, configure.in: release 1.3.0

2006-02-28  Ludovic Rousseau

	* [r1902] README: the correct path is /usr/local/lib instead of
	  /usr/local/pcsc/lib
	* [r1894] Makefile.am: ChangeLog.svn rule: search and replace
	  David Corcoran before corcoran
	* [r1893] Makefile.am: remove libmusclecard directory
	* [r1892] configure.in: remove libmusclecard code
	* [r1885] libmusclecard: move PCSC/libmusclecard in its own package

2006-02-27  Ludovic Rousseau

	* [r1884] src/testpcsc.c: add a call to SCardTransmit()

2006-02-24  Ludovic Rousseau

	* [r1882] src/winscard_clnt.c: automatically call SCardUnload()
	  when the libpcsclite library is unloaded
	  
	  Thanks to Najam Siddiqui. See
	  http://archives.neohapsis.com/archives/dev/muscle/2006-q1/0177.html
	* [r1881] src/winscard.c: SCardTransmit(): use 0x%08lX instead of
	  %ld since the return codes are defined in hex in PCSC/pcsclite.h

2006-02-23  Ludovic Rousseau

	* [r1880] configure.in: correctly detect the use of --enable-libusb
	  (--enable-libusb has the same effect as --disable-libusb)
	  
	  Thanks to Iain MacDonnell for the bug report

2006-02-22  Ludovic Rousseau

	* [r1879] src/winscard_clnt.c: SCardReleaseContext(): do not check
	  that the thread releasing the context is the one that established
	  it. This check is not performed on Windows and creates
	  portability problems
	  
	  See
	  http://archives.neohapsis.com/archives/dev/muscle/2006-q1/0134.html
	* [r1878] libmusclecard/src/musclecard.c, src/misc.h: We can't use
	  a # inside a #define so it is not possible to use #define
	  CONSTRUCTOR_DECLARATION(x) #pragma init (x)
	  
	  The #pragma is used directly where needed
	* [r1877] README: update the available ./configure options
	  
	  Thanks to Shawn Willden for the bug report

2006-02-21  Ludovic Rousseau

	* [r1871] Makefile.am: correct the Perl regexp in ChangeLog.svn
	  rule
	* [r1868] Makefile.am: add subversion revision in ChangeLog.svn

2006-02-03  Ludovic Rousseau

	* [r1852] src/Makefile.am: remove $(LIBUSB_LIBS) from
	  libpcsclite_la_LIBADD
	* [r1851] ChangeLog, configure.in: release 1.2.9-beta10
	* [r1850] Makefile.am: use ChangeLog.svn instead of ChangeLog.cvs

2006-01-31  Ludovic Rousseau

	* [r1849] src/hotplug_libusb.c: if the USB reader defines a serial
	  number then include it in the reader name (between parenthesis)
	  
	  Thanks to Achraf Karray for the patch

2006-01-30  Ludovic Rousseau

	* [r1848] libmusclecard/src/Makefile.am: use libmusclecard.la
	  instead of $(top_builddir)/libmusclecard/src/libmusclecard.la so
	  that "make -j2" works. Closes bug "[ #302971 ] 'make -j2' fails"
	* [r1847] src/Makefile.am: add $(LIBUSB_CFLAGS) and $(LIBUSB_LIBS)
	  where needed
	* [r1844] configure.in: use xyes instead of xtrue in x$use_libusb
	  test
	* [r1843] configure.in: reuse libusb detection code from my CCID
	  driver

2006-01-25  Ludovic Rousseau

	* [r1838] libmusclecard/src/musclecard.c: MSCEstablishConnection():
	  avoids a segfault
	  
	  Thanks to Shawn Willden for the patch
	  http://archives.neohapsis.com/archives/dev/muscle/2006-q1/0057.html
	* [r1837] libmusclecard/src/Makefile.am, src/Makefile.am: use
	  $(SYMBOL_VISIBILITY) instead of -fvisibility=hidden
	* [r1836] configure.in: check if the compiler supports
	  -fvisibility=hidden and define SYMBOL_VISIBILITY accordingly
	  
	  Only GCC 4.0 support it AFAIK
	* [r1835] src/PCSC/debuglog.h: #define PCSC_API as no-op if not
	  already defined (needed when included by a driver)

2006-01-24  Ludovic Rousseau

	* [r1830] libmusclecard/src/Makefile.am, src/Makefile.am: Compile
	  with -fvisibility=hidden to hide all symbols by default. The
	  export of symbol must now be explicit. That only works for the
	  ELF format.
	* [r1829] src/readerfactory.c: #include "misc.h to get the
	  definition of PCSC_API
	* [r1828] src/winscard_clnt.c: export variables g_rgSCardT0Pci,
	  g_rgSCardT1Pci and g_rgSCardRawPci
	* [r1827] libmusclecard/src/musclecard.c,
	  libmusclecard/src/tokenfactory.c, src/atrhandler.c,
	  src/configfile.l, src/debuglog.c, src/dyn_macosx.c,
	  src/dyn_unix.c, src/eventhandler.c, src/hotplug_libusb.c,
	  src/hotplug_linux.c, src/hotplug_macosx.c, src/ifdwrapper.c,
	  src/pcscdaemon.c, src/powermgt_macosx.c, src/prothandler.c,
	  src/sys_unix.c, src/thread_generic.h, src/tokenparser.l,
	  src/winscard_msg.c, src/winscard_msg_srv.c: #include "misc.h to
	  get the definition of PCSC_API
	* [r1826] src/PCSC/debuglog.h: declare log_msg(), log_xxd(),
	  DebugLogSetLevel() and pcsc_stringify_error() as exported symbols
	  since they are used by libmusclecard or some applications
	* [r1825] src/PCSC/winscard.h: declare the symbols as exported
	  using PCSC_API macro
	* [r1824] src/parser.h: declare LTPBundleFindValueWithKey as an
	  exported symbol (used by the pcscd drivers)
	* [r1823] src/misc.h: define PCSC_API as a way to export a symbol
	* [r1822] src/misc.h: use __GNUC__ instead of __GCC__
	  
	  see
	  http://gcc.gnu.org/onlinedocs/gcc-3.3.5/cpp/Common-Predefined-Macros.html
	* [r1821] win32/PCSC.h: reformat comment

2006-01-18  Ludovic Rousseau

	* [r1817] src/winscard_clnt.c: add speed profiling code
	* [r1816] src/winscard_clnt.c: SCardTransmit(): code simplification
	* [r1813] src/Makefile.am: explicitely add $(PTHREAD_CFLAGS)
	  $(PTHREAD_LIBS) to libpcsclite_la_LIBADD and pcscd_LDADD
	* [r1812] src/Makefile.am: use $(FOO) instead of @FOO@ to not
	  replace the values but the variables
	* [r1811] configure.in: do not globaly add $PTHREAD_* to LIBS and
	  CFLAGS

2006-01-03  Ludovic Rousseau

	* [r1786] src/hotplug_generic.c: Add missing ReCheckSerialReaders
	  and HPReCheckSerialReaders() so pcsc-lite can compile on FreeBSD
	  and others

2005-12-15  Ludovic Rousseau

	* [r1783] TODO: allow to have pcscd and libpcsclite on two
	  different machines.

2005-12-12  Ludovic Rousseau

	* [r1781] configure.in: use $prefix/pcsc/services instead of
	  $prefix/services when --prefix= is used but
	  --enable-muscledropdir= is not. Same code as for
	  --enable-usbdropdir=

2005-12-01  Ludovic Rousseau

	* [r1777] src/winscard.c: remove a duplicated comment line

2005-11-29  Ludovic Rousseau

	* [r1772] TODO: typo corrected

2005-11-27  Ludovic Rousseau

	* [r1757] ChangeLog: release 1.2.9-beta9

2005-11-25  Ludovic Rousseau

	* [r1756] libmusclecard/src/Makefile.am: libmusclecard needs
	  tokenparser.l but I do not want to provide it through libpcsclite
	  so libmusclecard uses it directly

2005-11-24  Ludovic Rousseau

	* [r1753] configure.in: version 1.2.9-beta9
	* [r1748] src/PCSC/reader.h.in: Apple gcc does not support #pragma
	  pack(push, 1) but only #pragma pack(1)
	  powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple
	  Computer, Inc. build 4061)
	* [r1744] src/winscard.c: SCardConnect(): do not print an error
	  ""Active Protocol: unknown 0" when we are connecting in direct
	  mode. The card is not supposed to be used at this time.
	* [r1741] src/PCSC/reader.h.in: use uint8_t instead of int8_t since
	  the fields are defined as BYTE, USHORT and ULONG in PC/SC v2 part
	  10 specification
	  
	  This avoids a "warning: overflow in implicit constant conversion"
	  when using values bigger than 127
	* [r1736] src/Makefile.am: tokenparser.l is used by pcscd only and
	  not by libpcsclite
	* [r1732] configure.in, src/Makefile.am: we need to provide
	  LTPBundleFindValueWithKey for all plateforms. This function is
	  NOT provided by Mac OS X. The bug I wanted to correct yesterday
	  is in the CCID driver instead. patch reverted.
	* [r1731] doc/doxygen.css: do not use smaller fonts for functions
	  names so it looks nice with Safari

2005-11-21  Ludovic Rousseau

	* [r1728] configure.in: replace dnl by # for comments
	* [r1727] configure.in, src/Makefile.am: we need tokenparser.l
	  (LTPBundleFindValueWithKey) only on non Mac OS X plateforms. So
	  we avoid linking with tokenparser.o and a possible "multiple
	  definitions of symbol _LTPBundleFindValueWithKey" ldd error
	* [r1726] src/hotplug_macosx.c: HPSearchHotPluggables(): fill a
	  "usb:%04x/