File: ChangeLog.6

package info (click to toggle)
rasqal 0.9.20-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 10,088 kB
  • ctags: 3,952
  • sloc: ansic: 25,718; sh: 10,694; yacc: 4,318; lex: 2,905; makefile: 2,072; perl: 1,386; xml: 90
file content (3715 lines) | stat: -rw-r--r-- 141,537 bytes parent folder | download | duplicates (4)
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
2008-12-30  Dave Beckett <dave@dajobe.org>

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_set_origin): Just set the origin; do not
	touch all the triples with the origin literal, that's for the
	query engine to do at some point. See
	rasqal_query_engine_1_set_origin_triples() for QE#1 where the old
	triple origin-setting code moved.

	* src/sparql_parser.y:
	(GraphGraphPattern): Construct a GP for a GRAPH saving the literal
	as the origin.

	* src/rasqal_algebra.c, src/rasqal_internal.h: Added
	RASQAL_ALGEBRA_OPERATOR_GRAPH.
	(rasqal_new_graph_algebra_node): Added to use
	RASQAL_ALGEBRA_OPERATOR_GRAPH
	(rasqal_algebra_algebra_node_write_internal): Updated to print
	graph literal.
	(rasqal_algebra_graph_graph_pattern_to_algebra): Added to use
	graph pattern origin to make a new graph algebra node over the
	inner single graph pattern.
	(rasqal_algebra_graph_pattern_to_algebra): Call the above.

	* src/rasqal_internal.h, src/rasqal_rowsource.c: Added typedef
	rasqal_rowsource_visit_fn.
	(rasqal_rowsource_visit): Added to walk rowsource tree using
	rasqal_rowsource_get_inner_rowsource.

2008-11-30  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c:
	(rasqal_query_dataset_contains_named_graph): Fixed for raptor v2

2008-11-30  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h: Added rasqal_rowsource_ensure_variables
	prototype

	* src/rasqal_internal.h: Fix source file names for rowsources

	* src/rasqal.h, src/rasqal_query.c:
	(rasqal_query_dataset_contains_named_graph): Added.

	* src/rasqal_graph_pattern.c, src/rasqal_internal.h:
	rasqal_graph_pattern gains origin field
	(rasqal_free_graph_pattern): Free it if set.  Uppercase grpah
	pattern operator labels in rasqal_graph_pattern_operator_labels
	for easier reading.
	(rasqal_graph_pattern_write_internal): Print out GP origin if set.

	* src/rasqal_query_transform.c:
	(rasqal_graph_patterns_join): Handle merging GRAPH patterns with
	an origin

2008-11-26  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_rowsource.c:
	(rasqal_rowsource_read_row): casts for c++

2008-11-16  Dave Beckett <dave@dajobe.org>

	* src/rasqal_raptor.c: code style.  replace all strcpy() with
	strncpy()

2008-11-15  Dave Beckett <dave@dajobe.org>

	* src/rasqal_graph.c: docs

	* src/rasqal_graph.c: terminology - use dataset not graph

	* src/rasqal_graph.c: Add functions to enumerate and alter the
	dataset of graphs

	* src/rasqal_graph.c: more api thoughts in code form

2008-11-14  Dave Beckett <dave@dajobe.org>

	* src/rasqal_graph.c, src/rasqal_internal.h: Add tentative graph
	API to replace rasqal_triples_source_factory,
	rasqal_triples_source, rasqal_triple_meta and rasqal_triples_match
	maybe.

2008-11-12  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine_algebra.c, src/rasqal_internal.h,
	src/rasqal_rowsource.c: Add simple printing out of rowsource query
	plan structure.
	(rasqal_rowsource_write_indent, rasqal_rowsource_write_internal):
	Added
	(rasqal_rowsource_write): Added using
	rasqal_rowsource_write_internal.
	(rasqal_rowsource_print): Added using rasqal_rowsource_write.

	* src/rasqal_internal.h, src/rasqal_rowsource.c,
	src/rasqal_rowsource_empty.c, src/rasqal_rowsource_filter.c,
	src/rasqal_rowsource_join.c, src/rasqal_rowsource_project.c,
	src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_sort.c,
	src/rasqal_rowsource_triples.c, src/rasqal_rowsource_union.c:
	Added get_inner_rowsource factory method for
	rasqal_rowsource_handler.  This allows walking the tree of
	rowsources aka query execution plan.
	(rasqal_rowsource_get_inner_rowsource): Added.

	* src/rasqal_internal.h: docs

2008-11-09  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h: Delete unused fields from struct
	rasqal_query_s

	* src/rasqal_rowsource_filter.c, src/rasqal_rowsource_join.c,
	src/rasqal_rowsource_triples.c: Replace query->world with
	rowsource->world

	* src/rasqal_engine.c, src/rasqal_engine_algebra.c,
	src/rasqal_internal.h, src/rasqal_rowsource.c,
	src/rasqal_rowsource_empty.c, src/rasqal_rowsource_filter.c,
	src/rasqal_rowsource_join.c, src/rasqal_rowsource_project.c,
	src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_sort.c,
	src/rasqal_rowsource_triples.c, src/rasqal_rowsource_union.c,
	src/rasqal_sparql_xml.c: Add world from struct rasqal_rowsource_s.
	Add world arg to all rowsource constructors.
	(rasqal_new_rowsource_from_handler): Add world arg
	(rasqal_rowsource_get_query): Deleted, never used.

	* src/rasqal_rowsource_filter.c, src/rasqal_rowsource_join.c,
	src/rasqal_rowsource_sort.c, src/rasqal_rowsource_triples.c,
	src/rasqal_rowsource_union.c: Remove query from rowsource context,
	use rowsource->query

	* src/rasqal_engine.c, src/rasqal_engine_sort.c,
	src/rasqal_internal.h, src/rasqal_query_transform.c,
	src/rasqal_rowsource.c, src/rasqal_rowsource_empty.c,
	src/rasqal_rowsource_filter.c, src/rasqal_rowsource_join.c,
	src/rasqal_rowsource_project.c,
	src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_sort.c,
	src/rasqal_rowsource_triples.c, src/rasqal_rowsource_union.c,
	src/rasqal_sparql_xml.c: Add query to the rasqal_rowsource
	structure.  Remove the get_query method from the rowsource handler
	and typedef rasqal_rowsource_get_query_func .
	(rasqal_sort_rowsource_get_query,
	rasqal_union_rowsource_get_query,
	rasqal_empty_rowsource_get_query,
	rasqal_rowsequence_rowsource_get_query,
	rasqal_project_rowsource_get_query,
	rasqal_triples_rowsource_get_query,
	rasqal_rowsource_engine_get_query): Deleted the get_query method
	from all rowsources.

	Replace rasqal_expression_evaluate calls with
	rasqal_expression_evaluate_v2.

	* src/rasqal.h, src/rasqal_expr.c:
	(rasqal_expression_evaluate_strmatch): Replace query with world
	and locator args and call rasqal_expression_evaluate_v2.
	(rasqal_expression_evaluate_v2): Take world and locator args.
	(rasqal_expression_evaluate): Call rasqal_expression_evaluate_v2.

	Deprecate rasqal_expression_evaluate for rasqal_expression_evaluate_v2.

	* src/rasqal_internal.h: docs

2008-11-07  Dave Beckett <dave@dajobe.org>

	* configure.ac: Require raptor 1.4.18 for
	raptor_sequence_delete_at (at least)

	* configure.ac: handle empty LEX in test

	* src/rasqal_rowsource.c:
	(rasqal_rowsource_read_row): Use raptor_sequence_delete_at to
	delete/return.

	* src/rasqal_internal.h, src/rasqal_rowsource.c: struct
	rasqal_rowsource_s gains rows_sequence and offset vars for storing
	a sequence of rows in order to generate them 1-by-1.
	(rasqal_rowsource_read_row): Use rows_sequence and offset above
	with method rasqal_rowsource_read_all_rows() to convert a sequence
	of results into an incremental one.

2008-11-05  Dave Beckett <dave@dajobe.org>

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_read_row): declare i outside debug ifdef

	* src/rasqal_internal.h, src/rasqal_rowsource.c,
	src/rasqal_rowsource_filter.c, src/rasqal_rowsource_join.c,
	src/rasqal_rowsource_project.c, src/rasqal_rowsource_triples.c,
	src/rasqal_rowsource_union.c: Add set_preserve method to
	rasqal_rowsource_handler with typedef
	rasqal_rowsource_set_preserve_func.
	(rasqal_rowsource_set_preserve): Added
	(rasqal_filter_rowsource_set_preserve,
	rasqal_union_rowsource_set_preserve,
	rasqal_project_rowsource_set_preserve,
	rasqal_join_rowsource_set_preserve): Added to pass on the
	set_preserve call to inner rowsource(s).  Added
	preserve_on_all_finished to rasqal_triples_rowsource_context.
	(rasqal_triples_rowsource_finish): Reset column triple meta.
	(rasqal_triples_rowsource_get_next_row): Do not trigger reset when
	last match found if con->preserve_on_all_finished set.
	(rasqal_triples_rowsource_set_preserve): Set preserve flag.
	(rasqal_join_rowsource_init): Set preserve flag on inner
	rowsources.

	* src/rasqal_rowsource.c:
	(rasqal_rowsource_read_row): Add debug print of read row

	* src/rasqal_rowsource_join.c: oops

	* src/rasqal_rowsource_join.c:
	(rasqal_join_rowsource_init): Check for constant join expressions
	and optimize them away if constant and true or false.

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_read_row): get vars from rowsource by
	offset.  Replace rasqal_row_set_values_from_variables_table with
	loop to set row values from variables in rowsource by offset , not
	in variables table by offset.

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_init): Calculate rowsize con->size from
	columns
	(rasqal_new_triples_rowsource): Remove initing rowsize from query
	fields, let rasqal_triples_rowsource_init do it later.

	* src/rasqal_engine_algebra.c, src/rasqal_internal.h,
	src/rasqal_rowsource_triples.c: rasqal_triples_rowsource_context
	gains declared_in array.
	(rasqal_triples_rowsource_init): Use passed-in declared_in array
	rather than make one locally.
	(rasqal_new_triples_rowsource): Add declared_in parameter.
	(main): Update test to new calling convention.
	(rasqal_algebra_basic_algebra_node_to_rowsource): Update to create
	declared_in and pass it in to rasqal_new_triples_rowsource.

	* src/rasqal_rowsource_triples.c: Remove new_bindings_count from
	rasqal_triples_rowsource_context - not used.  Removed resets
	return value variable.

2008-11-02  Dave Beckett <dave@dajobe.org>

	* tests/algebra/test-01.out, tests/algebra/test-02.out,
	tests/algebra/test-03.out, tests/algebra/test-04.out,
	tests/algebra/test-05.out, tests/algebra/test-06.out,
	tests/algebra/test-07.out, tests/algebra/test-08.out,
	tests/algebra/test-09.out: Add Project() to outer scope of all
	expected results

2008-11-01  Dave Beckett <dave@dajobe.org>

	* src/rasqal_rowsource_project.c:
	(rasqal_project_rowsource_ensure_variables): Allow projecting
	variables not in input - allowable for cases with optionals. Warn
	about it when debugging for now.
	(rasqal_project_rowsource_read_row): Handle projecting variables
	with no value for optionals.

	* src/rasqal_rowsource_union.c:
	(rasqal_union_rowsource_ensure_variables): Allocate array of ints
	not bytes for right_map

	* src/rasqal_rowsource_join.c:
	(rasqal_join_rowsource_ensure_variables): Allocate array of ints
	not bytes for right_map
	(rasqal_join_rowsource_build_merged_row): Extra debug info

2008-10-30  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine_algebra.c:
	(rasqal_algebra_leftjoin_algebra_node_to_rowsource): Added.
	(rasqal_algebra_node_to_rowsource): Use above to handle LEFTJOIN


	* src/rasqal_internal.h, src/rasqal_rowsource_join.c:
	(rasqal_new_join_rowsource): Take join type and join expression.
	Only support join type 0 - left outer join today

2008-10-29  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine_algebra.c:
	(rasqal_algebra_project_algebra_node_to_rowsource): Added.
	(rasqal_algebra_node_to_rowsource): Use
	rasqal_algebra_project_algebra_node_to_rowsource to convert
	project algebra nodes.

	* src/rasqal_algebra.c:
	(rasqal_new_project_algebra_node): Added
	(rasqal_free_algebra_node): Free vars_seq.
	(rasqal_algebra_algebra_node_write_internal): Print project vars.
	(rasqal_algebra_query_to_algebra): Use
	rasqal_new_project_algebra_node to add a PROJECT node at the top
	of every query to select the right variables.

	* src/rasqal_internal.h: rasqal_algebra_node_s gains vars_seq

	* src/rasqal_rowsource_empty.c, src/rasqal_rowsource_filter.c,
	src/rasqal_rowsource_join.c, src/rasqal_rowsource_project.c,
	src/rasqal_rowsource_triples.c, src/rasqal_rowsource_union.c:
	Implement rowsource reset functions
	(rasqal_filter_rowsource_reset, rasqal_union_rowsource_reset,
	rasqal_project_rowsource_reset, rasqal_triples_rowsource_reset):
	Added.
	(rasqal_join_rowsource_reset): Updated to reset and reset internal
	rowsources.

	* src/rasqal_rowsource.c:
	(rasqal_rowsource_reset): Return 0 if no handler present - it may
	not be needed.

	* src/Makefile.am, src/rasqal_rowsource_join.c: Added join
	rowsource.
	(rasqal_new_join_rowsource): Added join rowsource constructor.

	* src/rasqal_rowsource_rowsequence.c: Implement reset method via
	rasqal_rowsequence_rowsource_reset
	(rasqal_rowsequence_rowsource_read_row): Copy rows to return them.
	(rasqal_rowsequence_rowsource_read_all_rows): Create new sequence
	to return it.
	(rasqal_rowsequence_rowsource_reset): Added.

	* src/rasqal_internal.h, src/rasqal_rowsource.c:
	(rasqal_rowsource_reset): Added.
	rasqal_rowsource_reset_func added

	* src/rasqal_rowsource_project.c:
	(rasqal_project_rowsource_ensure_variables): Fix offset vars
	(main): Make test use non-trivial projection.

	* src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_rowsource_project.c: Added project (variables
	projection) rowsource
	(rasqal_new_project_rowsource): Added new project rowsource
	constructor.

2008-10-28  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine_algebra.c:
	(rasqal_algebra_union_algebra_node_to_rowsource): Added to use
	union rowsource to execute UNION.
	(rasqal_algebra_node_to_rowsource): Call above for UNION operator.

	* src/rasqal_rowsource_union.c: Union rowsource now works.
	Constructs a map for moving variable offsets from right rowsource
	into results via con->right_map.
	(rasqal_union_rowsource_ensure_variables): Construct map while
	adding variables from right row to result rowsource.
	(rasqal_union_rowsource_adjust_right_row): Added to do right row
	variable offset fixing for a row.
	(rasqal_union_rowsource_read_row): Expand output row sizes and
	adjust offsets if needed. Assign output rowsource and correct
	offset.
	(rasqal_union_rowsource_read_all_rows): Transform left and right
	input rowsequences for correct size, offsets, rowsource.  Use
	rasqal_union_rowsource_adjust_right_row to adjust right row orders
	(main): Update tests to use non-square tables to ensure no
	confusion of row/columns

	* src/rasqal_internal.h, src/rasqal_rowsource_rowsequence.c: Add
	vars_seq to context.
	(rasqal_rowsequence_rowsource_init): Adjust offset of all rows.
	(rasqal_rowsequence_rowsource_ensure_variables): Add variables
	from input variables sequence.
	(rasqal_new_rowsequence_rowsource) Now takes in variables sequence
	for handling rowsources that share variables.
	(main): Update tests to new calling convention and vars_seq.

	* src/rasqal_internal.h, src/rasqal_rowsource.c:
	(rasqal_rowsource_add_variable): Return offset to var and <0 on
	failure.
	(rasqal_rowsource_print_row_sequence): Added for debugging.
	(rasqal_rowsource_print_header): Added called by above

	* src/rasqal_internal.h, src/rasqal_row.c,
	src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_union.c:
	(rasqal_new_row_for_size): Renamed from
	rasqal_new_row_for_variables and now with a size
	arg.  (rasqal_new_row_sequence): Add out parameter vars_seq_p to
	return variables sequence in order declared..

2008-10-27  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h, src/rasqal_row.c:
	(rasqal_row_expand_size): Added to expand a row when it gets
	combined with others

	* src/rasqal_rowsource_union.c: Union rowsource proper test case
	with 2 rowsources that return data. Returns correct counts.

	* src/rasqal_internal.h, src/rasqal_rowsource.c,
	src/rasqal_rowsource_filter.c, src/rasqal_rowsource_sort.c,
	src/rasqal_rowsource_union.c:
	(rasqal_rowsource_add_variable): Get int return value to indicate
	when a dup variable was not stored.
	(rasqal_rowsource_copy_variables): Do not reset dest size to 0.
	(rasqal_filter_rowsource_ensure_variables,
	rasqal_sort_rowsource_ensure_variables): Set dest rowsource size
	to 0.
	(rasqal_union_rowsource_ensure_variables): Copy in variables from
	both sub-rowsources.

	* src/rasqal_row.c: autodocs

	* src/rasqal_rowsource.c:
	(rasqal_rowsource_copy_variables): Ensure dest size is
	correct. autodocs.

	* src/rasqal_internal.h, src/rasqal_rowsource.c,
	src/rasqal_rowsource_filter.c, src/rasqal_rowsource_sort.c:
	(rasqal_rowsource_copy_variables): Added to copy variables from
	one rowsource into another.
	(rasqal_filter_rowsource_ensure_variables,
	rasqal_sort_rowsource_ensure_variables): Use to set up variable
	projection sequence from inner rowsource.

2008-10-27  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c:
	(rasqal_rowsource_engine_process): Check for
	rasqal_row_set_order_size() failure

	* src/rasqal_variable.c:
	(rasqal_new_variables_table): Set usage count earlier so that
	tidying with rasqal_free_variables_table() works.

	* src/rasqal_algebra.c, src/rasqal_engine.c, src/rasqal_query.c,
	src/rasqal_query_transform.c: whitespace

2008-10-26  Dave Beckett <dave@dajobe.org>

	* Checkpoint in query engine refactoring.
	SVN 14834 at 2008-10-26 22:28:24 -0700 (Sun, 26 Oct 2008)

	A top level 'make check' passes at this SVN commit.

	* src/rasqal_internal.h, src/rasqal_rowsource.c,
	src/rasqal_rowsource_rowsequence.c,
	src/rasqal_rowsource_triples.c, src/rasqal_sparql_xml.c: Restore
	variables_sequence to rowsource for use as the projected variables
	from the variables table.
	(rasqal_new_rowsequence_rowsource): add all named variables using
	rasqal_rowsource_add_variable.
	(rasqal_rowsource_add_variable): Added/reverted.
	(rasqal_sparql_xml_sax2_start_element_handler): Use
	rasqal_rowsource_add_variable after rasqal_variables_table_add
	creates the variable, to add it to the projection.
	(rasqal_triples_rowsource_init): Use
	rasqal_query_triples_build_declared_in to initialise projected
	variables in rowsource->variables_sequence.
	(rasqal_new_rowsource_from_handler, rasqal_free_rowsource):
	Restore initialise/free of variables_sequence.
	(rasqal_rowsource_get_variable_by_offset,
	rasqal_rowsource_get_variable_offset_by_name): Use
	variables_sequence to walk the variables associated with the row,
	not the variables table.

	* src/rasqal_query_transform.c: Document what declared_in
	functions are for and revert so that they are marked in graph
	pattern order, for query->variables_declared_in.  use.
	(rasqal_query_triples_build_declared_in_internal): Added, from
	part of rasqal_query_build_declared_in.
	(rasqal_query_triples_build_declared_in): Added as internal
	function for calculating declared_in for a sequence of triples.
	(rasqal_query_graph_pattern_build_declared_in): Added/reverted to
	calculate it recursively in graph pattern order.
	(rasqal_query_build_declared_in): Reverted to do all the work for
	a query graph pattern.
	(rasqal_query_prepare_common): Use new
	rasqal_query_build_declared_in form.

2008-10-25  Dave Beckett <dave@dajobe.org>

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_init): tidy

	* src/rasqal_query_transform.c:
	(rasqal_query_graph_pattern_build_declared_in_variable): Deleted.
	(rasqal_query_graph_pattern_build_declared_in): Deleted.
	(rasqal_query_build_declared_in): Comments and work on all triples
	in a column range.
	(rasqal_query_check_unused_variables): Added to just do checking
	and warning.
	(rasqal_query_prepare_common): Call rasqal_query_build_declared_in
	and rasqal_query_check_unused_variables

	* src/rasqal_algebra.c: code style

	* src/rasqal_variable.c: code style

	* src/rasqal_query_transform.c: code style

	* src/rasqal_engine_algebra.c: code style

	* src/rasqal_engine.c: code style

	* src/rasqal_rowsource_union.c: code style

	* src/rasqal_rowsource_union.c: code style

	* src/rasqal_rowsource_triples.c: code style

	* src/rasqal_rowsource_sort.c: code style

	* src/rasqal_rowsource_empty.c: code style

	* src/rasqal_rowsource_filter.c: ws

	* src/rasqal_engine_sort.c: ws

	* src/rasqal_internal.h: rasqal_rowsource docs

	* src/rasqal_rowsource.c: code style

	* src/rasqal_query_results.c: update internal docs

	* src/rasqal_row.c: code style

	* tests/engine/rasqal_order_test.c: check arg failure before run

	* tests/engine/rasqal_graph_test.c: check arg failure before run

	* src/rasqal_query.c: code style

	* src/rasqal_query_results.c: code style

	* utils/srxread.c: Update to new rasqal_new_query_results args

	* src/rasqal_sparql_xml.c:
	(rasqal_sparql_xml_sax2_end_element_handler): Set variables
	count/size as soon as possible so that rasqal_new_row() works
	properly.
	(rasqal_query_results_get_rowsource_sparql_xml): Now takes
	variables table arg and sets it internally rather than making a
	new one.

	* src/rasqal_result_formats.c:
	(rasqal_query_results_formatter_read): Pass in variables table
	from result set when reading results from syntax

	* src/rasqal_internal.h: rasqal_query_results_get_rowsource_func
	now has a vars_table arg to write new variables found (read from
	syntax) into. Added rasqal_query_results_get_variables_table

	* src/rasqal_query_results.c:
	(rasqal_new_query_results): autodocs
	(rasqal_query_results_get_row_from_saved): Handle NULL query
	(rasqal_query_results_ensure_have_row_internal): Handle NULL
	execution factory.
	(rasqal_query_results_get_triple,
	rasqal_query_results_next_triple): Fail with result set with NULL
	query.
	(rasqal_query_results_add_row): Tidy.
	(rasqal_query_results_execute_and_store_results): Handle being run
	with NULL query.
	(rasqal_query_results_get_variables_table): Added.

2008-10-24  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c:
	(rasqal_engine_make_rowsource): Update
	rasqal_new_rowsource_from_handler call

	* src/rasqal_sparql_xml.c: rasqal_rowsource_sparql_xml_context
	gains a vars_table field
	(rasqal_sparql_xml_sax2_start_element_handler): Add new variable
	direct to variables table.  Use
	rasqal_rowsource_get_variable_offset_by_name to get offset and
	rasqal_variables_table_get_named_variables_count to get count.
	(rasqal_rowsource_sparql_xml_finish): Call
	rasqal_free_variables_table
	(rasqal_query_results_get_rowsource_sparql_xml): Create new
	variables table.

	* src/rasqal_rowsource_union.c:
	(rasqal_new_union_rowsource): fail on NULL query, triples_source
	or triples. Update rasqal_new_rowsource_from_handler call
	(main): Update test to allocate real world and query objects

	* src/rasqal_rowsource_triples.c:
	(rasqal_new_triples_rowsource): fail on NULL query, triples_source
	or triples. Update rasqal_new_rowsource_from_handler call
	(main): Update test to allocate real query object

	* src/rasqal_rowsource_sort.c:
	(rasqal_new_sort_rowsource): Update
	rasqal_new_rowsource_from_handler call

	* src/rasqal_rowsource_rowsequence.c:
	(rasqal_new_rowsequence_rowsource): Update
	rasqal_new_rowsource_from_handler call Do not copy variables but
	use rasqal_variables_table_get_named_variables_count to get row
	size.
	(main): Update test to allocate real world and query objects.

	* src/rasqal_rowsource_filter.c:
	(rasqal_new_filter_rowsource): fail on NULL query, rowsource or
	expr. Update rasqal_new_rowsource_from_handler call

	* src/rasqal_rowsource_empty.c:
	(rasqal_new_empty_rowsource): fail on NULL query Update
	rasqal_new_rowsource_from_handler call
	(main): Update test to allocate real world and query objects.

	* src/rasqal_internal.h: rasqal_rowsource has a variables table to
	replace a variables sequence rasqal_new_rowsource_from_handler
	prototype gains variables table arg rasqal_rowsource_add_variable
	prototype deleted. rasqal_rowsource_get_variable_offset_by_name
	has unsigned name

	* src/rasqal_rowsource.c:
	(rasqal_new_rowsource_from_handler): Add variables table arg to
	store variables, shared with other objects such as
	query/query_results.
	(rasqal_free_rowsource): Free variables table
	(rasqal_rowsource_add_variable): Deleted, not needed.
	(rasqal_rowsource_get_variable_by_offset): Just call
	rasqal_variables_table_get.
	(rasqal_rowsource_get_variable_offset_by_name): Just call
	rasqal_variables_table_get_by_name

	* src/rasqal_engine.c: (rasqal_engine_make_rowsource): Protect
	NULL order_conditions_sequence

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_ensure_variables): Do not set order_size

	* src/rasqal_rowsource.c:
	(rasqal_new_rowsource_from_handler): Note no @flags have been
	defined.

	* src/rasqal_engine.c:
	(rasqal_rowsource_engine_ensure_variables): Do not set order_size,
	gone.
	(rasqal_engine_make_rowsource): Do not use flags for creating
	rowsource, not needed and none defined now.

	* src/rasqal_internal.h: Add flags arg back to
	rasqal_new_rowsource_from_handler but do not use it.

	* src/rasqal_internal.h: Remove flags from rowsource.

	* src/rasqal_internal.h: Remove order_size from rowsource.  No
	need for RASQAL_ROWSOURCE_FLAGS_ORDERING flags for
	rasqal_new_rowsource_from_handler

	* src/rasqal_engine.c: Calculate order_size once for inner
	rowsource.
	(rasqal_rowsource_engine_process): Update row size if needed.
	(rasqal_rowsource_engine_ensure_variables): Set rowsource order
	size from context.
	(rasqal_engine_make_rowsource): Calculate order_size here.

	* src/rasqal_internal.h, src/rasqal_row.c, src/rasqal_rowsource.c,
	src/rasqal_rowsource_filter.c, src/rasqal_rowsource_rowsequence.c,
	src/rasqal_rowsource_sort.c: Remove order_size from rowsource - no
	longer needed, the sort rowsource or other sorting code stores
	this in row or context.
	(rasqal_new_row): Use rasqal_rowsource_get_size
	(rasqal_rowsource_add_variable): Remove (wrong, bad) reference to
	order_size here.  It was adding one per variable, which was never
	going to be always correct.
	(rasqal_rowsource_get_size): Renamed from
	rasqal_rowsource_get_sizes

	* src/rasqal_internal.h, src/rasqal_row.c:
	(rasqal_new_row_from_row_deep): Removed, no longer used

	* src/rasqal_internal.h, src/rasqal_row.c, src/rasqal_rowsource_sort.c:
	(rasqal_row_set_order_size): renamed from
	rasqal_row_move_to_rowsource and just sets order_size.

	* src/rasqal_internal.h, src/rasqal_query_results.c,
	src/rasqal_result_formats.c, src/rasqal_rowsource.c:
	(rasqal_query_results_set_variables): Deleted, just sets size and
	this is only needed in 1 place.
	(rasqal_rowsource_update_variables): Deleted, since vars table is
	shared between query and query results, there is no need to pass
	this info along.
	(rasqal_query_results_formatter_read): Remove call to
	rasqal_rowsource_update_variables.
	(rasqal_query_results_execute_with_engine): Remove calls to
	rasqal_query_results_set_variables and set size of query results
	based on size of top row returned.

2008-10-22  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c: autodocs

	* src/rasqal_internal.h, src/rasqal_query_results.c: Remove
	variables fields from query results structure and use variables
	table, shared with query object.  rasqal_query_results loses
	order_size field - never used and variable_names,
	varaibles_Sequence, variables.  Gains pointer to vars_table.
	(rasqal_new_query_results): Add vars_table arg.
	(rasqal_query_results_execute_with_engine): Use new call for
	rasqal_new_query_results and rasqal_query_results_set_variables.
	Do not set useless order_size field.
	(rasqal_free_query_results): Remove freeing old variables fields,
	free vars_table.
	(rasqal_query_results_get_bindings): Switch to use
	rasqal_variables_table_get_names.
	(rasqal_query_results_get_binding_name): Switch to use
	rasqal_variables_table_get.
	(rasqal_query_results_get_binding_value_by_name): Switch to use
	rasqal_variables_table_get_by_name.
	(rasqal_query_results_set_variables): Change from variables seq to
	variables table.  Remove all variables* fields setting.  Do not
	set order_size which is never used.
	(rasqal_query_results_update_bindings): Use query_results
	variables table and tidy code.

	* src/rasqal_query.c:
	(rasqal_free_query): Do not free vars table twice.

	* src/rasqal_variable.c:
	(rasqal_new_variables_table): Set initial usage to 1

	* src/rasqal_query_results.c: revert

	* src/rasqal_query_results.c:
	(rasqal_free_query_results): Free variables table

	* src/rasqal_query.c:
	(rasqal_free_query): Free variables table

	* src/rasqal_query_results.c:
	(rasqal_query_results_execute_with_engine): Call
	rasqal_new_query_results with world

	* src/rasqal_query_results.c: Use results world field in
	preference to query world field

	* src/rasqal_internal.h, src/rasqal_query_results.c:
	(rasqal_new_query_results): Add world and type arg.
	(rasqal_query_results_execute_with_engine): Update calling
	convention and compute results type first.

	* src/rasqal_internal.h: Added prototypes for
	rasqal_new_variables_table_from_variables_table and
	rasqal_variables_table_get_names

	* src/rasqal_variable.c: Add generating of variable names and
	reference/usage counting.
	(rasqal_new_variables_table_from_variables_table): Added copy
	constructor to increase reference count.
	(rasqal_free_variables_table): Free only when use count is 0.
	(rasqal_variables_table_add): Delete any variable names list when
	a new variable is added.
	(rasqal_variables_table_get_names): Added

2008-10-20  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_map.c:
	(rasqal_new_map): Free compare_data on alloc failure.

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_read_row): Fixed compiler warning about
	unused variable when not compiling in debug mode

2008-10-18  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h, src/rasqal_variable.c:
	(rasqal_variables_table_get_by_name): Renamed from
	rasqal_variables_table_find_by_name and made public.

	* src/rasqal_engine.c, src/rasqal_engine_sort.c,
	src/rasqal_internal.h, src/rasqal_map.c,
	src/rasqal_rowsource_sort.c: Alter rasqal_compare_fn to take a
	user data pointer in map comparisons.
	(rasqal_new_map): Take a compare_user_data pointer and free
	function to pass in state to comparisons.
	(rasqal_free_map): Free compare data if a free function is passed.
	(rasqal_map_node_add_kv): Call compare function with user data.
	(rasqal_engine_rowsort_compare_literals_sequence): Take
	compare_flags arg not query, and pass on to
	rasqal_literal_compare.
	(rasqal_engine_rowsort_free_compare_data): Added.
	(rasqal_engine_rowsort_row_compare): Use rowsort_compare_data
	pointer to get distinct, compare_flags and
	order_conditions_sequence args context as passed in by
	rasqal_engine_new_rowsort_map.
	(rasqal_engine_rowsort_row_compare_distinct): Deleted.
	(rasqal_engine_new_rowsort_map): add distinct, compare_flags and
	order_conditions_sequence constructor args.
	(rasqal_engine_make_rowsource,rasqal_sort_rowsource_init):
	Update calls to rasqal_engine_new_rowsort_map.

	* src/rasqal_internal.h: Added prototypes for
	rasqal_row_set_values_from_variables_table,
	rasqal_row_move_to_rowsource and
	rasqal_engine_rowsort_calculate_order_values

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_read_row): Use
	rasqal_row_set_values_from_variables_table to copy/set row values.

	* src/rasqal_rowsource_sort.c: rasqal_sort_rowsource_context gains
	an order_size field to save re-calculating this many times.
	(rasqal_sort_rowsource_init): Calculate order_size for above. Do
	not init con->seq here since it may not be needed.
	(rasqal_sort_rowsource_process): Init con->seq here.  Use
	rasqal_row_move_to_rowsource and
	rasqal_engine_rowsort_calculate_order_values to freshen and
	calculate any new row fields needed for sorting.
	(rasqal_sort_rowsource_read_all_rows): If no ordering conditions
	exist, just call rowsource read_all_rows method.

	* src/rasqal_row.c:
	(rasqal_row_set_values_from_variables_table): Added based on
	former rasqal_engine_row_update code.
	(rasqal_row_move_to_rowsource): Added to reassign/move a row to a
	new rowsource and if necessary, allocate the order_values of the
	new rowsource.

	* src/rasqal_engine_sort.c:
	(rasqal_engine_rowsort_calculate_order_values): Added based on
	former rasqal_engine_row_update code

	* src/rasqal_engine.c:
	(rasqal_engine_row_update): Turned into calls to two new
	functions: rasqal_row_set_values_from_variables_table and
	rasqal_engine_rowsort_calculate_order_values

2008-10-15  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c: rasqal_engine_execution_data gains row size
	field.
	(rasqal_engine_get_next_result, rasqal_engine_row_update,
	rasqal_rowsource_engine_ensure_variables): Do not calc size here,
	use execution_data->size
	(rasqal_query_engine_1_execute_init): Init size

	* src/rasqal_engine_sort.c: autodocs

	* src/rasqal_engine.c:
	(rasqal_engine_row_update): Use query direct, do not
	query_results, can assume that the query results is of right type
	in this internal function.

	* src/Makefile.am, src/rasqal_engine_algebra.c,
	src/rasqal_rowsource_sort.c:
	(rasqal_algebra_orderby_algebra_node_to_rowsource): Added
	(rasqal_algebra_node_to_rowsource): Use above for ORDERBY algebra
	node.  
	Added sort rowsource
	(rasqal_new_sort_rowsource): Added sort rowsource constructor.

	* src/rasqal_rowsource_filter.c:
	(rasqal_filter_rowsource_finish): Free inner rowsource when done.

2008-10-14  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c, src/rasqal_engine_sort.c,
	src/rasqal_internal.h: Moved all engine sorting routines into new
	rasqal_engine_sort.c
	(rasqal_rowsource_engine_process): Call new
	rasqal_engine_rowsort_map_add_row to build the map and
	rasqal_engine_rowsort_map_to_sequence to do the sorting.
	(rasqal_engine_make_rowsource): Use new
	rasqal_engine_new_rowsort_map to create the rowsource sorting map,
	with distinct flags.
	(rasqal_engine_rowsort_compare_literals_sequence): Added based on
	rasqal_query_result_literal_sequence_compare.
	(rasqal_engine_rowsort_literal_sequence_equals): Added based on
	rasqal_query_result_literal_sequence_equals.  Removed query arg.
	(rasqal_engine_rowsort_row_compare,
	rasqal_engine_rowsort_row_compare_distinct): Added based on
	rasqal_engine_row_compare with distinct/not-distinct case pulled out.
	(rasqal_engine_rowsort_map_free_row): Added based on
	rasqal_engine_map_free_row.
	(rasqal_engine_rowsort_map_print_row): Added based on
	rasqal_engine_map_print_row.
	(rasqal_engine_new_rowsort_map): Added
	(rasqal_engine_rowsort_map_add_row): Added
	(rasqal_engine_rowsort_map_add_to_sequence): Added based on
	rasqal_engine_map_add_to_sequence.
	(rasqal_engine_rowsort_map_to_sequence): Added to do the sorting.

	* src/rasqal_internal.h: struct rasqal_algebra_node_s gains seq
	for ORDERBY.  Added rasqal_new_orderby_algebra_node prototype

	* src/rasqal_algebra.c:
	(rasqal_new_orderby_algebra_node): Added with a sequence of
	expressions in ->seq
	(rasqal_free_algebra_node): Free sequence.
	(rasqal_algebra_algebra_node_write_internal): Write conditions
	seq.
	(rasqal_algebra_query_to_algebra): Add ORDERBY algebra node if an
	order conditions sequence is present.
	(main): Add ORDERBY algebra node to test

	* src/rasqal_engine.c, src/rasqal_query_results.c:
	(rasqal_query_results_ensure_have_row_internal): Invoke
	rasqal_row_to_nodes here after getting a new row, for all query
	execution engines.
	(rasqal_query_engine_1_get_row): Remove call from here.

2008-10-13  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c: Give rowsources a name

	* src/rasqal_internal.h, src/rasqal_rowsource.c,
	src/rasqal_rowsource_empty.c, src/rasqal_rowsource_filter.c,
	src/rasqal_rowsource_rowsequence.c,
	src/rasqal_rowsource_triples.c, src/rasqal_rowsource_union.c,
	src/rasqal_sparql_xml.c: Give rowsources a name

2008-10-13  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c:
	(rasqal_query_add_query_result): Changed static function to return
	int error code. Switch order of usage counter increment and
	sequence push to ensure the sequence free handler does not kill
	the query object if sequence push fails.

	(rasqal_query_execute_with_engine): Check return value from
	rasqal_query_add_query_result() and return failure accordingly.

	* src/rasqal_engine.c:
	(rasqal_query_engine_1_execute_init): Set error_p on gp_data
	alloc/push failure

2008-10-12  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_rowsource_triples.c:
	(main): Fixed test segfaults in RAPTOR_V2_AVAILABLE mode.

2008-10-12  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine_algebra.c:
	(rasqal_algebra_filter_algebra_node_to_rowsource): Added, calling
	rasqal_new_filter_rowsource
	(rasqal_algebra_node_to_rowsource): Handle
	RASQAL_ALGEBRA_OPERATOR_FILTER

	* src/rasqal_internal.h: Added rasqal_new_filter_rowsource

	* src/Makefile.am, src/rasqal_rowsource_filter.c: Added Rasqal
	filter rowsource class

	* src/rasqal_query.c:
	(rasqal_query_get_engine_by_name): Allow overriding query engine
	with envariable RASQAL_DEBUG_ENGINE

	* src/Makefile.am: Make rasqal_rowsource_triples_test run

	* src/rasqal_rowsource_triples.c:
	(main): unit test work

	* data/Makefile.am, data/one.nt: Added one.net

	* src/rasqal_engine_algebra.c:
	(rasqal_algebra_basic_algebra_node_to_rowsource): Added.
	(rasqal_algebra_node_to_rowsource): Added, calling
	rasqal_algebra_basic_algebra_node_to_rowsource for BGP nodes.
	(rasqal_query_engine_algebra_execute_init): Make triples source,
	turn the graph pattern tree into algebra and make a rowsource to
	execute it.
	(rasqal_query_engine_algebra_get_all_rows,
	rasqal_query_engine_algebra_get_row): Call rowsource to execute
	query.
	(rasqal_query_engine_algebra_execute_finish): Free triples source
	and rowsource.

	* src/rasqal_internal.h: Added rasqal_new_triples_rowsource prototype

	* src/Makefile.am, src/rasqal_rowsource_triples.c: Added
	rasqal_rowsource_triples.c providing a triple pattern
	rowsource.  (rasqal_new_triples_rowsource): Added - the
	constructor for this rowsource.

	* src/rasqal_engine_algebra.c:
	(rasqal_query_engine_algebra_execute_get_all_rows,
	rasqal_query_engine_algebra_execute_get_row): Finish immediately

2008-10-11  Dave Beckett <dave@dajobe.org>

	* docs/tmpl/section-data.sgml, docs/tmpl/section-expression.sgml,
	docs/tmpl/section-general.sgml, docs/tmpl/section-prefix.sgml: api
	docs tmpls

	* src/Makefile.am, src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_triples_source.c: Separate triples source from engine V1

	Export rasqal_new_triples_source, rasqal_reset_triple_meta,
	rasqal_free_triples_source, rasqal_triples_source_triple_present,
	rasqal_new_triples_match, rasqal_triples_match_bind_match,
	rasqal_triples_match_next_match and rasqal_triples_match_is_end
	
	(rasqal_new_triples_source): Change calling convention to take a
	query.
	(rasqal_new_triples_match): Change calling convention to take a query
	and triples_source as made by rasqal_new_triples_source().

	* src/rasqal_engine.c: rasqal_new_triples_source switch back to
	use query direct

	* src/rasqal_graph_pattern.c: style

	* src/rasqal_graph_pattern.c:
	(rasqal_new_filter_graph_pattern): Replace deprecated
	rasqal_graph_pattern_add_constraint with
	rasqal_graph_pattern_set_filter_expression

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_add_constraint): Fix autodocs

	* src/rasqal_query.c:
	(rasqal_query_write_sparql_graph_pattern): Replace deprecated
	rasqal_graph_pattern_get_constraint with
	rasqal_graph_pattern_get_filter_expression.

	* src/rasqal_engine_algebra.c: copyright

	* src/rasqal_engine_algebra.c: Transform query into algebra nodes
	and count nodes.
	(rasqal_engine_algebra_count_nodes): Added.
	(rasqal_query_engine_algebra_execute_init): Init algebra_node and
	print debugging.
	(rasqal_query_engine_algebra_execute_finish): Free algebra_node if
	set.

	* src/rasqal_query_results.c:
	(rasqal_query_results_ensure_have_row_internal): Increment results
	count when executing lazy

	* src/rasqal_query.c:
	(rasqal_query_set_store_results):  Internal not just when debugging

	* src/rasqal_internal.h: Make rasqal_query_set_store_results
	prototype just internal

	* src/rasqal_query.c:
	(rasqal_query_get_engine_by_name): Check name if not NULL

	* utils/roqet.c: fix help message to note internal

	* utils/roqet.c: Add -g/ --engine internal only for now

	* src/Makefile.am: Add rasqal_engine_algebra.c

	* src/rasqal_internal.h: Add rasqal_query_get_engine_by_name
	prototype.  Add extern for new algebra query engine

	* src/rasqal_engine_algebra.c: Query engine over algebra skeleton

	* src/rasqal_query.c:
	(rasqal_query_get_engine_by_name): Added to map a name to a query
	engine.  Choose original or query algebra.
	(rasqal_query_execute_with_engine): Use above.

	* src/rasqal_internal.h: Added rasqal_query_execute_with_engine
	Added rasqal_query_results_execute_with_engine replacing
	rasqal_new_query_results_from_query_execution

	* src/rasqal_query.c:
	(rasqal_query_execute_with_engine): Added to allow passing in
	execution engine
	(rasqal_query_execute): Call above.

	* src/rasqal_query_results.c:
	(rasqal_query_results_execute_with_engine): Renamed from
	rasqal_new_query_results_from_query_execution and add engine as a
	parameter.

	* src/rasqal_query_results.c:
	(rasqal_new_query_results): Just
	init fields, do not do any more work; move htat to
	rasqal_new_query_results_from_query_execution.
	(rasqal_new_query_results_from_query_execution): Set query results
	type and variables.

	* src/rasqal_engine.c: add debug ifdef

	* src/rasqal_query.c: remove dead ifdef

	* utils/roqet.c:
	(roqet_graph_pattern_walk): Use
	rasqal_graph_pattern_get_filter_expression instead of deprecated
	rasqal_graph_pattern_get_constraint_sequence which only returns 1
	expression now.

	* tests/engine/Makefile.am: limit test compare

	* src/Makefile.am, src/rasqal_limit_test.c,
	tests/engine/Makefile.am, tests/engine/rasqal_limit_test.c:
	Move rasqal_limit_test to tests/engine

	* src/rasqal_literal.c: docs

	* src/sparql_parser.y: docs: language, not engine

	* src/rasqal_general.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rdql_common.h, src/rdql_lexer.l, src/rdql_parser.y,
	src/sparql_common.h, src/sparql_lexer.l, src/sparql_parser.y:
	Terminology change - rename rdql/sparql functions and structs from
	*query_engine* to *query_language*

2008-10-10  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c: internal docs

	* src/rasqal_query_results.c: struct rasqal_query_results_s:
	document fields. removed unused fields: abort, unused*
	(rasqal_new_query_results): Init all fields.

	* src/rasqal_query_results.c: internal docs

	* src/rasqal_query.c: internal docs

	* src/rasqal_engine.c:
	(rasqal_new_triples_source): autodocs

2008-10-09  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_internal.h:
	(rasqal_query_execution_factory_s): c++ mode fix

	* src/fix-bison, src/rasqal.h, src/rasqal_algebra.c,
	src/rasqal_expr.c, src/rasqal_feature.c, src/rasqal_general.c,
	src/rasqal_internal.h, src/rasqal_limit_test.c,
	src/rasqal_literal.c, src/rasqal_query.c, src/rasqal_query_test.c,
	src/rasqal_raptor.c, src/rasqal_result_formats.c,
	src/rasqal_row.c, src/rasqal_sparql_xml.c, src/rasqal_variable.c,
	src/rasqal_xsd_datatypes.c, src/rdql_lexer.l, src/rdql_parser.y,
	src/sparql_lexer.l, src/sparql_parser.y,
	tests/algebra/convert_graph_pattern.c,
	tests/engine/rasqal_construct_test.c,
	tests/engine/rasqal_graph_test.c,
	tests/engine/rasqal_order_test.c, utils/roqet.c, utils/srxread.c:
	Refactored Rasqal to use Raptor v2 APIs if available.
	Flagged with RAPTOR_V2_AVAILABLE.

	API/ABI breaks:
	(rasqal_new_world): API function changed to allocate rasqal_world
	only. Initialization decoupled to rasqal_world_open().
	(rasqal_features_enumerate, rasqal_feature_from_uri): API
	functions now require a rasqal_world param.
	(rasqal_prefix, rasqal_data_graph, rasqal_expression_s): API
	structs gain rasqal_world *world field.
	(rasqal_new_data_graph, rasqal_new_function_expression,
	rasqal_new_cast_expression, rasqal_new_prefix): API constructor
	functions now require a rasqal_world param.
	(rasqal_new_0op_expression, rasqal_new_1op_expression,
	rasqal_new_2op_expression, rasqal_new_3op_expression,
	rasqal_new_string_op_expression, rasqal_new_literal_expression):
	API constructor functions changed to require a rasqal_world param
	for consistency reasons, though not really used for anything.

	Other API changes:
	(rasqal_world_open): New API function to initialize a
	rasqal_world. Pulled from rasqal_new_world().
	(rasqal_world_set_raptor): New API function to set raptor instance
	externally before rasqal_world_open().
	(rasqal_world_get_raptor): New API function to access raptor_world
	associated with the rasqal_world.

	Other changes:
	(fix-bison): Hack in YYPARSE_PARAM to %destructors. Required for
	raptor_free_uri_v2().
	(rasqal_raptor_init_triples_match): Check for triples match
	context alloc failure.
	(rasqal_raptor_triple_match,ordinal_as_uri): Internal functions
	now require rasqal_world param.
	(rdql_token_print,
	rdql_token_free,sparql_token_print,sparql_token_free): Internal
	functions now require rasqal_world param.
	(main): Fixed "#ifdef RASQAL_DEBUG > 1" preprocessor conditionals
	in rasqal_construct_test.

	(roqet_error_handler): Pass in rasqal_world* in user_data.

2008-10-09  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c:
	(rasqal_new_triples_source): take an execution_data arg.
	(rasqal_query_engine_1_execute_init): Call above with new arg.

	* src/rasqal_internal.h: rasqal_query_results_reset and
	rasqal_query_results_set_order_conditions prototypes deleted -
	only used in query_results.c rasqal_query_results_update_bindings
	deleted - now static and only used inside query_results.c

	* src/rasqal_query_results.c:
	(rasqal_new_query_results): Merge in rasqal_query_results_reset
	code only ever used here and tidy to exit early on allocation
	failure.
	(rasqal_new_query_results_from_query_execution): Inline 1-line
	function rasqal_query_results_set_order_conditions only ever used
	here.
	(rasqal_query_results_reset,
	rasqal_query_results_set_order_conditions): Deleted and merged
	inline above.
	(rasqal_query_results_update_bindings): now static

	* src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_results.c: Move struct rasqal_query_results_s to
	rasqal_query_results.c to make it internal.  Switch query engine
	from using query_results->{failed,finished} directly (now no
	longer possible) to returning execution errors.
	(rasqal_engine_group_graph_pattern_get_next_match): Return -1 on
	failure.
	(rasqal_engine_triple_graph_pattern_get_next_match): Use
	STEP_ERROR to return failure.
	(rasqal_engine_do_optional_step): Do not set finished flag.
	(rasqal_engine_get_next_result): No need to check query_results
	failed, finished or query triples; caller will do that.  Do not
	set query->failed, return -1 on failure.  Handle STEP_ERROR and
	return failure if seen.

	rasqal_rowsource_engine_context gains query field.
	(rasqal_rowsource_engine_init): Init con finished and failed.
	(rasqal_rowsource_engine_process): Set con finished and failed, not
	query_results equivalents.
	(rasqal_rowsource_engine_read_row): Use con finished and failed
	flags for checks.
	(rasqal_rowsource_engine_read_all_rows): Use con finished and
	failed.
	(rasqal_rowsource_engine_get_query): Get query from con field.
	(rasqal_engine_make_rowsource): Set query field in con.
	(rasqal_query_engine_1_get_row): Return NULL if already failed.
	Switch from using query_results->finished/failed to setting error_p.
	(rasqal_query_engine_1_execute_init, rasqal_query_engine_1_get_all_rows,
	(rasqal_query_engine_1_execute_finish): Set error_p on failures.
	(rasqal_query_results_ensure_have_row_internal,
	rasqal_query_results_execute_and_store_results): Look for execution
	engine failures and set query_results failed flag.

	* src/rasqal_engine.c:
	(rasqal_engine_check_constraint): Take a
	rasqal_engine_execution_data arg not query.
	(rasqal_engine_do_step): Replace rasqal_engine_check_constraint
	calls with execution_data. No need for unused query variable now.
	(rasqal_query_engine_1_finish_factory): Fix method - it does not
	take an error_p

	* src/rasqal_query_results.c:
	(rasqal_free_query_results): Note ignore of return

	* src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_results.c: execution factory method execute_init
	now takes a flag arg.
	(rasqal_engine_make_rowsource): Add need_store_results args.
	(rasqal_new_query_results_from_query_execution): Init
	execution_flags.
	(rasqal_query_engine_1_execute_init): Add flags arg and use it to
	set need_store_results

2008-10-07  Dave Beckett <dave@dajobe.org>

	* src/rasqal_result_formats.c:
	(rasqal_query_results_write_json1): Returning 1 on failure is
	sufficient - do not alter query->failed here.

	* utils/roqet.c: Check to see if
	rasqal_query_results_formatter_write failed

	* src/rasqal_sparql_xml.c:
	(rasqal_query_results_write_sparql_xml): Returning 1 on failure is
	sufficient - do not alter query->failed here.

	* src/rasqal_expr.c:
	(rasqal_expression_evaluate_strmatch): Returning NULL on failure
	is sufficient - do not alter query->failed here.

	* src/rasqal_engine.c: autodocs

	* src/rasqal_engine.c:
	(rasqal_query_engine_1_get_row): No need to check query_results -
	interface will ensure it is OK.

	* src/rasqal_internal.h: execution data autodocs

	* src/rasqal_query_results.c:
	(rasqal_query_results_ensure_have_row_internal): Note that
	parameter validation has already been done.
	(rasqal_query_results_finished): Return finished if already
	finished or failed.

	* src/rasqal_engine.c:
	(rasqal_query_engine_1_get_row): autodocs

	* src/rasqal_result_formats.c, src/rasqal_sparql_xml.c:
	(rasqal_query_results_write_sparql_xml,
	rasqal_query_results_write_json1): Use
	rasqal_query_results_get_query.

	* src/rasqal_query_results.c:
	(rasqal_new_query_results): autodocs

	* src/rasqal_engine.c:
	(rasqal_query_engine_1_execute_finish): autodocs

	* src/rasqal_engine.c:
	(rasqal_query_engine_1_get_all_rows): autodocs

	* src/rasqal_engine.c:
	(rasqal_engine_do_optional_step): autodocs

	* src/rasqal_engine.c:
	(rasqal_engine_do_step): autodocs

	* src/rasqal_engine.c:
	(rasqal_new_triples_source): autodocs

	* src/rasqal_internal.h, src/rasqal_query_results.c:
	(rasqal_query_results_execute_and_store_results): make static

	* src/rasqal_query_results.c:
	(rasqal_query_results_execute_and_store_results): Renamed from
	rasqal_query_results_store_results

	* src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c:
	(rasqal_new_query_results_from_query_execution): Added
	based on rasqal_query_execute contents.
	(rasqal_query_execute): Use
	rasqal_new_query_results_from_query_execution

	* src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: Keep pointers to query results inside
	query as a sequence in query rather than a linked list touch
	results->next internals.
	(rasqal_new_query, rasqal_free_query): Init/free query->results
	sequence.
	(rasqal_query_add_query_result, rasqal_query_remove_query_result):
	Switch to use a sequence.
	(rasqal_query_results_remove_query_reference): Added to just
	remove the query reference added to when a query results was
	built.

	* src/rasqal.h, src/rasqal_query_results.c:
	(rasqal_query_results_get_query): Added

	* src/rasqal_engine.c, src/rasqal_internal.h: remove execution
	engine prepare method - unused

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: Added rasqal_engine_error Make
	execution engine calls have an error pointer output parameter.
	Not currently used but passed around.

2008-10-06  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c:
	(rasqal_query_execute): All non-0 return codes from execute_init()
	are failures.

2008-10-05  Dave Beckett <dave@dajobe.org>

	* Checkpoint in query engine refactoring.
	SVN 14627 at 2008-10-05 20:22:21 -0700 (Sun, 05 Oct 2008)

	At this point the interface between the query results API and
	existing query engine has been separated such that the query
	engine solely generates rows on request (pull, lazy evaluation)
	or generates all rows as a sequence.  The query results API
	performs all the other operations such as turning rows into
	triples, returning a boolean result and accessing variables and
	values in the current row of results.
	
	A top level 'make check' passes at this SVN commit.

	* src/rasqal_query_results.c:
	(rasqal_query_results_get_row_from_saved): Run rasqal_row_to_nodes
	on rows from saved, they may not be canonicalized yet.

	* src/rasqal_query_results.c:
	(rasqal_query_results_finished): Call
	rasqal_query_results_ensure_have_row_internal if not finished or
	failed to ensure attempt to execute, to see if finished

	* src/rasqal_query_results.c:
	(rasqal_query_results_ensure_have_row_internal): Does nothing if
	an existing row is present.
	(rasqal_query_results_get_current_row): Just call
	rasqal_query_results_ensure_have_row_internal.
	(rasqal_query_results_next, rasqal_query_results_next_triple):
	Free any existing row before moving to next result.
	(rasqal_query_results_get_triple): Just call
	rasqal_query_results_ensure_have_row_internal.

	* src/rdql_parser.y:
	(rasqal_rdql_query_engine_prepare): Call
	rasqal_query_expand_wildcards to expand RDQL SELECT * and SPARQL

	* src/rasqal_query_transform.c:
	(rasqal_query_expand_wildcards): RDQL and SPARQL

	* src/rasqal_query_results.c:
	(rasqal_query_results_ensure_have_row_internal): Renamed from
	rasqal_query_results_next_internal

	* src/rasqal_query_results.c:
	(rasqal_query_results_get_triple): Use
	rasqal_query_results_next_internal to ensure first triple has a
	row to read from.

	* tests/engine/rasqal_construct_test.c: Make construct test
	multiple triples/row
	Add serializing of results when debugging

2008-10-04  Dave Beckett <dave@dajobe.org>

	* tests/engine/rasqal_construct_test.c: init some vars

2008-10-03  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c:
	(rasqal_query_results_next_internal): Moved earlier.
	(rasqal_query_results_get_current_row): Use
	rasqal_query_results_next_internal
	(rasqal_query_results_get_binding_value_by_name): No need to set
	finished since rasqal_query_results_get_current_row will do it.
	(rasqal_query_results_store_results): tidy init result_count to 0

	* src/rasqal_query.c:
	(rasqal_query_execute): style. Init store_results flag based on
	query features.

	* src/rasqal_engine.c: rasqal_engine_execution_data gains
	result_count field for checking limit and offset for get_row
	(rasqal_engine_make_rowsource): Use query results store_results flag
	to figure out when to store results. style.
	(rasqal_query_engine_1_execute_init): Init result_count to 0 since
	new execution model does not get 1 result always.

	* src/rasqal_internal.h: struct rasqal_query_results_s gains
	store_results flag field

	* src/rasqal_query_results.c, src/rasqal_query.c,
	src/rasqal_internal.h, src/rasqal_engine.c: Moved stored results
	execution into query results class and made the execution engine
	only do the 'lazy' work.  Execution engine looses next_row method.
	(rasqal_engine_execute_and_save,
	rasqal_engine_execute_next_from_saved): Deleted and moved to query
	results
	(rasqal_engine_execute_next_lazy): Deleted
	(rasqal_query_engine_1_get_row): Replaced with
	rasqal_engine_execute_next_lazy code
	(rasqal_query_engine_1_execute_init): Tidy and do not start
	execution of first result (laz) /all results (stored) here.
	(rasqal_query_engine_1_next_row): Deleted
	(rasqal_query_results_get_row_from_saved): Added based on
	rasqal_engine_execute_next_from_saved
	(rasqal_query_results_get_current_row): Updated to get pointer to
	current result row as a shared object.
	(rasqal_query_results_next_internal): Switch to updating current
	row.
	(rasqal_query_results_get_triple): Tidy
	(rasqal_query_results_store_results): Added based on
	rasqal_query_results_set_all_rows, to do the actual storing of
	results, calling execution engine and handling construct.

	* src/rasqal_query_results.c:
	(rasqal_query_results_next): Removed unused rc

	* src/rasqal_query_results.c:
	(rasqal_query_results_next_internal): Added to pull out moving to
	next item without result type check.
	(rasqal_query_results_next, rasqal_query_results_next_triple): Use
	rasqal_query_results_next_internal.

	* src/rasqal_query_results.c:
	(rasqal_query_results_next_triple): Move to next row via engine,
	calling rasqal_query_results_next causes failure since it expects
	bindings.

	* tests/engine/rasqal_construct_test.c, tests/engine/Makefile.am:
	Added rasqal_construct_test (which fails)

	* src/rasqal_query_results.c: Revert r14601

	* src/rasqal_query_results.c:
	(rasqal_prefix_id): style

	* src/rasqal_engine.c, src/rasqal_internal.h: Added get_all_rows
	factory method to execution factory.
	(rasqal_query_engine_1_get_all_rows): Added to implement it.

	* src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_results.c: Return triple generating to query
	results class.
	(rasqal_query_results_get_triple,
	rasqal_query_results_next_triple): Move code from
	rasqal_query_engine_1_get_triple and
	rasqal_query_engine_1_next_triple.
	(rasqal_query_engine_1_get_triple,
	rasqal_query_engine_1_next_triple): Deleted.  Deleted get_triple
	and next_triple from execution factory methods.  Move
	current_triple_result field back into rasqal_query_results.
	(rasqal_prefix_id): Moved back to rasqal_query_results.c.
	(rasqal_query_results_reset): Reset current_triple_result here.

2008-10-02  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_row.c:
	(rasqal_row_to_nodes): Added renamed from
	rasqal_engine_row_to_nodes

	* docs/tmpl/section-graph_pattern.sgml, src/rasqal_engine.c,
	src/rasqal_internal.h, src/rasqal_query_results.c:
	(rasqal_query_results_check_limit_offset): Renamed from
	rasqal_engine_check_limit_offset

2008-09-30  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query_transform.c:
	(rasqal_query_prepare_common): Pass up error codes from gp merge
	visitors.

2008-09-29  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c:
	(rasqal_query_results_set_variables): Check for
	raptor_sequence_push() failure. Prevents populating
	variables/variable_names arrays with stale pointers.

	* src/rasqal_engine.c:
	(rasqal_query_engine_1_execute_finish): Check for NULL
	execution_data.

2008-09-28  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c:
	(rasqal_query_execute): Check for execution_data alloc failure.

	* src/rasqal_engine.c:
	(rasqal_query_engine_1_execute_finish): Memory leak fix: free
	execution_data->seq. Also zero freed pointers to prevent dangling
	pointer problems.

	* src/rasqal_query_results.c:
	(rasqal_query_results_get_triple): Do not return uninitialized
	pointers.

2008-09-27  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_results.c: rasqal_engine_execution_data loses
	fields never used: offset, map ad gains rowsource taken from
	rasqal_query_results rasqal_query_results has unused5 replacing
	rowsource field.
	(rasqal_engine_execute_and_save, rasqal_engine_execute_next_lazy,
	rasqal_query_engine_1_execute_init,
	rasqal_query_engine_1_execute_finish): use execution_data to store
	and own rowsource.
	(rasqal_free_query_results): No longer free rowsource.

	* src/rasqal_engine.c:
	(rasqal_engine_init_execution_data, rasqal_engine_execute_init,
	rasqal_engine_execute_run): Deleted into
	rasqal_query_engine_1_execute_init.
	(rasqal_query_engine_1_execute_transform_hack): Added with
	transformation of query hack needed from new algebra to what this
	engine understands.
	(rasqal_query_engine_1_execute_init): Merge
	rasqal_engine_init_execution_data, rasqal_engine_execute_init and
	rasqal_engine_execute_run into here - they are all called only
	once by this code.  Add more comments on what is happening

	* src/rasqal_query.c:
	(rasqal_query_execute): execute_init return is a query failure if < 0

	* src/rasqal_engine.c:
	(rasqal_engine_execute_finish): Deleted
	(rasqal_engine_execute_next): Deleted
	(rasqal_query_engine_1_next_row): Merge in
	rasqal_engine_execute_next
	(rasqal_query_engine_1_execute_finish): Merge in
	rasqal_engine_execute_finish
	(rasqal_query_engine_1_next_triple): Use
	rasqal_query_engine_1_next_row.

	* src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_results.c: Removed execute_get_value and
	execute_get_values factory methods of
	rasqal_query_execution_factory_s.  Renamed execute_get method to
	get_row Renamed execute_next method to next_row
	(rasqal_engine_get_result_row): Deleted
	(rasqal_query_results_get_row): Replace
	rasqal_engine_get_result_row
	(rasqal_engine_get_result_value): Deleted and inlined.
	(rasqal_engine_bind_construct_variables): Deleted and inlined
	using new rasqal_query_results_update_bindings
	(rasqal_engine_execute_and_save): Removed core of limit and
	indexing checking to new rasqal_query_results_set_all_rows.
	(rasqal_engine_row_to_nodes): Use
	rasqal_query_results_get_current_row.
	(rasqal_engine_execute_next_from_saved): Use
	rasqal_query_results_update_bindings.
	(rasqal_query_engine_1_get_row): Renamed from
	rasqal_query_engine_1_execute_get.
	(rasqal_query_engine_1_execute_get_value): Deleted.
	(rasqal_query_engine_1_execute_get_values): Deleted.
	(rasqal_query_engine_1_next_row): Renamed from
	rasqal_query_engine_1_execute_next
	(rasqal_query_results_next): Use next_row method.
	(rasqal_query_results_get_bindings,
	rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name): Inline get values
	work using rasqal_query_results_get_current_row.
	(rasqal_query_results_set_all_rows): Added
	(rasqal_query_results_get_current_row): Added
	(rasqal_query_results_update_bindings): Added

	* src/rasqal_engine.c:
	(rasqal_engine_get_result_values): Deleted
	(rasqal_query_engine_1_execute_get_values): Merged in
	rasqal_engine_get_result_values here.

	* src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_results.c: rasqal_query_results loses
	current_triple_result field.  rasqal_engine_execution_data gains
	current_triple_result field.
	(rasqal_engine_execute_init): Init current_triple_result.
	(rasqal_query_engine_1_get_triple,
	rasqal_query_engine_1_next_triple): use
	execution_data->current_triple_result
	(rasqal_query_results_reset): Remove init of
	current_triple_result.

	* src/rasqal_engine.c, src/rasqal_internal.h: Moved
	new_bindings_count from rasqal_query_results to
	rasqal_engine_execution_data.

	* src/rasqal_engine.c, src/rasqal_graph_pattern.c,
	src/rasqal_internal.h, src/sparql_parser.y:
	(rasqal_new_basic_graph_pattern_from_formula): Renamed from
	rasqal_engine_new_basic_graph_pattern_from_formula
	(rasqal_new_2_group_graph_pattern): Renamed from
	rasqal_engine_group_2_graph_patterns.  query_results loses
	triples_source field, now unused2 rasqal_engine_execution_data
	gains triples_source field.  Altered query engine 1 to uses
	execution_data->triples_source
	(rasqal_new_triples_match): Use execution_data parameter.
	(rasqal_reset_triple_meta): Now static and use execution_data.
	(rasqal_engine_execute_finish): use execution data.

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: Make execution factory methods all
	take execution data pointers which in the current query engine V1,
	are pointers to rasqal_engine_execution_data
	(rasqal_engine_group_graph_pattern_get_next_match,
	rasqal_engine_triple_graph_pattern_get_next_match,
	rasqal_engine_graph_pattern_get_next_match,
	rasqal_engine_graph_pattern_init, rasqal_engine_execute_init,
	rasqal_engine_execute_finish, rasqal_engine_move_to_graph_pattern,
	rasqal_engine_do_step, rasqal_engine_do_optional_step,
	rasqal_engine_get_next_result, rasqal_engine_check_limit_offset,
	rasqal_engine_row_update, rasqal_engine_get_result_row,
	rasqal_engine_get_result_values, rasqal_engine_get_result_value,
	rasqal_engine_bind_construct_variables,
	rasqal_engine_execute_and_save, rasqal_engine_execute_run,
	rasqal_engine_row_to_nodes, rasqal_engine_execute_next_from_saved,
	rasqal_engine_execute_next, rasqal_query_engine_1_execute_init,
	rasqal_query_engine_1_execute_get,
	rasqal_query_engine_1_execute_get_value,
	rasqal_query_engine_1_execute_get_values,
	rasqal_query_engine_1_execute_next,
	rasqal_query_engine_1_execute_finish,
	rasqal_query_engine_1_get_triple,
	rasqal_query_engine_1_next_triple): Remove query_results
	parameter.
	(rasqal_engine_init_execution_data): Add query param.
	(rasqal_query_execute): Invoke init method with query parameter.
	(rasqal_free_query_results, rasqal_query_results_next,
	rasqal_query_results_get_bindings,
	rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name,
	rasqal_query_results_get_triple,
	rasqal_query_results_next_triple): Invoke finish method with
	execution data.

	* src/rasqal_engine.c: Pass execution_data to a lot of functions.
	query_results->execution_data is no longer used by this code.
	Code tidying for long lines.
	(rasqal_engine_triple_graph_pattern_get_next_match,
	rasqal_engine_graph_pattern_get_next_match,
	rasqal_engine_graph_pattern_init,
	rasqal_engine_move_to_graph_pattern, rasqal_engine_do_step,
	rasqal_engine_do_optional_step, rasqal_engine_make_rowsource): Add
	execution_data arg.  rasqal_rowsource_engine_context gains
	execution_data field.
	(rasqal_rowsource_engine_init): Initialise execution_data in
	rasqal_rowsource_engine_context
	(rasqal_rowsource_engine_finish): Pass on execution_data

2008-09-26  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c: ws

	* src/rasqal_query_results.c:
	(rasqal_new_query_results): Set execution_factory if query_results
	is set.

	* src/rasqal_query_results.c: ws

	* src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_query_results.c, src/rasqal_row.c: Moved rasqal_row
	class rom rasqal_query_results.c to rasqal_row.c

	* src/rasqal_internal.h, src/rasqal_query_transform.c:
	rasqal_graph_pattern_constraints_has_qname is static

	* src/Makefile.am, src/rasqal_empty_rowsource.c,
	src/rasqal_rowsequence_rowsource.c, src/rasqal_rowsource_empty.c,
	src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_union.c,
	src/rasqal_union_rowsource.c:
	Renamed rowsource implementation files to be
	rasqal_rowsource_TYPE.c rather than rasqal_TYPE_rowsource.c for
	TYPE empty, rowsequence and union

	* src/rasqal_empty_rowsource.c, src/rasqal_engine.c,
	src/rasqal_internal.h, src/rasqal_query_results.c,
	src/rasqal_result_formats.c, src/rasqal_rowsequence_rowsource.c,
	src/rasqal_rowsource.c, src/rasqal_sparql_xml.c,
	src/rasqal_union_rowsource.c:
	Rename class rasqal_query_result_row to rasqal_row

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_transform.c, src/rdql_parser.y,
	src/sparql_parser.y:
	Moved more query transformation functions from rasqal_engine.c to
	rasqal_query_transform.c.  That leaves rasqal_query.c and
	rasqal_query_results.c largely free of query execution detail,
	rasqal_query_transform.c only about altering a rasqal_query, graph
	pattern or expression - typically behind rasqal_query_prepare()
	and rasqal_engine.c all about execution - behind
	rasqal_query_execute().
	(rasqal_query_merge_triple_patterns): Renamed from
	rasqal_engine_merge_triples
	(rasqal_graph_pattern_move_constraints): Renamed from
	rasqal_engine_move_constraints
	(rasqal_query_remove_empty_group_graph_patterns): Renamed from
	rasqal_engine_remove_empty_group_graph_patterns
	(rasqal_query_merge_graph_patterns): Renamed from
	rasqal_engine_merge_graph_patterns
	(rasqal_expression_foreach_fold): Renamed from
	rasqal_engine_expression_foreach_fold
	(rasqal_query_expression_fold): Renamed from
	rasqal_engine_expression_fold
	(rasqal_graph_pattern_fold_expressions): Renamed from
	rasqal_engine_graph_pattern_fold_expressions
	(rasqal_query_fold_expressions): Renamed from
	rasqal_engine_query_fold_expressions
	(rasqal_query_prepare_count_graph_patterns): Renamed from
	rasqal_query_prepare_count_graph_patterns
	(rasqal_query_prepare_common): Move code from
	rasqal_query_prepare, rasqal_sparql_query_engine_prepare and
	rasqal_rdql_query_engine_prepare that was about query
	transformation.
	(rasqal_graph_patterns_join): Renamed from
	rasqal_engine_join_graph_patterns

	* src/Makefile.am, src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_transform.c, src/rdql_parser.y,
	src/sparql_parser.y: Move query transforming helper routines from
	rasqal_engine.c to rasqal_query_transform.c.  Rename the functions
	from rasqal_engine_ prefixed to match the type they operate on.
	(rasqal_query_expand_triple_qnames): Renamed from
	rasqal_engine_expand_triple_qnames.  (rasqal_sequence_has_qname):
	Renamed from rasqal_engine_sequence_has_qname.
	(rasqal_query_constraints_has_qname): Renamed from
	rasqal_engine_query_constraints_has_qname.
	(rasqal_query_expand_graph_pattern_constraints_qnames): Renamed
	from rasqal_engine_expand_graph_pattern_constraints_qnames.
	(rasqal_query_expand_query_constraints_qnames): Renamed from
	rasqal_engine_expand_query_constraints_qnames.
	(rasqal_query_build_anonymous_variables): Renamed from
	rasqal_engine_build_anonymous_variables.
	(rasqal_query_expand_wildcards): Renamed from
	rasqal_engine_expand_wildcards.
	(rasqal_query_remove_duplicate_select_vars): Renamed from
	rasqal_engine_remove_duplicate_select_vars.
	(rasqal_query_prepare_common): Renamed from rasqal_engine_prepare

2008-09-26  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_result_formats.c:
	(rasqal_query_results_write_json1): Do not emit double " for
	distinct/ordered flags.
	Fixes Issue#0000279 http://bugs.librdf.org/mantis/view.php?id=279

2008-09-26  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c:
	(rasqal_query_results_next): Call execution factory method
	execute_next.
	(rasqal_query_results_get_bindings): Call execution factory method
	execute_get_values.
	(rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name): Call execution
	factory method execute_get_value.
	(rasqal_prefix_id): Moved to rasqal_engine.c
	(rasqal_query_results_get_triple): Move most of code to
	rasqal_engine.c and call execution_factory method get_triple
	(rasqal_query_results_next_triple): Move most of code to
	rasqal_engine.c and call execution_factory method next_triple

	* src/rasqal_internal.h: Remove a bunch of rasqal_engine from
	exporting internally

	* src/rasqal_engine.c:
	(rasqal_free_engine_execution_data): Removed, unused.
	(rasqal_engine_execute_finish): Fix return.
	(rasqal_engine_get_next_result): static and take execution_data
	(rasqal_engine_get_result_row): static
	(rasqal_engine_get_result_values): static
	(rasqal_engine_get_result_value): static
	(rasqal_rowsource_engine_process): Call rasqal_engine_get_next_result
	with execution_data
	(rasqal_engine_execute_run): static and take execution_data
	(rasqal_engine_execute_next_from_saved,
	rasqal_engine_execute_next_lazy): take execution_data
	(rasqal_engine_execute_next): static and take execution_data
	(rasqal_query_engine_1_execute_get): Added
	(rasqal_query_engine_1_execute_get_value): Added calling
	rasqal_engine_get_result_value
	(rasqal_query_engine_1_execute_get_values): Added calling
	rasqal_engine_get_result_values
	(rasqal_query_engine_1_execute_next): Added calling
	rasqal_engine_execute_next
	(rasqal_query_engine_1_execute_finish): static
	(rasqal_prefix_id): moved from rasqal_query_results.c
	(rasqal_query_engine_1_get_triple): Added based on
	rasqal_query_results_get_triple
	(rasqal_query_engine_1_next_triple): Added based on
	rasqal_query_results_next_triple

	* src/Makefile.am: Remove rasqal_engine_rowsource_test

	* src/Makefile.am, src/rasqal_engine_rowsource.c: Remove
	rasqal_engine_rowsource.c

2008-09-25  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c, src/rasqal_internal.h:
	(rasqal_query_results_s,rasqal_query_engine_1): Made execution
	factory const, no need to modify its members after
	initialization.
	
	* src/rasqal_engine.c: 
	(rasqal_engine_execute_finish): Fixed missing return value in
	assertion.

2008-09-25  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h: struct rasqal_query_results_s: lose
	free_execution_data callback

	* src/rasqal_query_results.c:
	(rasqal_free_query_results): Do not free execution data with
	factory method.

	* src/rasqal_engine.c:
	(rasqal_free_engine_execution_data): Removed, only 1 use.

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: Introduce a
	rasqal_query_execution_factory and move existing query engine to
	use it.  Existing tests still pass.
	(rasqal_engine_execute_init, rasqal_engine_execute_finish): Now
	static.
	(rasqal_engine_init_execution_data): Renamed from
	rasqal_new_engine_execution_data.
	(rasqal_free_engine_execution_data): Type the data parameter.
	(rasqal_engine_execute_init, rasqal_engine_execute_finish): Add
	execution_data parameter.
	(rasqal_query_execute, rasqal_free_results): Update to use
	execution factory.

2008-09-24  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h: #comments

2008-09-21  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c:
	(rasqal_new_query_result_row_from_query_result_row_deep): Added to
	deep-copy a row to stop somebody (the query engine in this case)
	changing the fields behind the scenes.

	* src/rasqal_internal.h: Added rasqal_new_execution_rowsource
	Export rasqal_engine_get_result_row Added
	rasqal_new_query_result_row_from_query_result_row_deep

	* src/rasqal_engine.c: Export rasqal_engine_get_result_row

	* src/Makefile.am: Added rasqal_engine_rowsource.c

	* src/rasqal_engine_rowsource.c: comment

	* src/rasqal_engine_rowsource.c: Rasqal query engine rowsource class

	* src/rasqal_internal.h, src/rasqal_rowsource.c:
	(rasqal_rowsource_ensure_variables): Added and called before any
	rowsource function that tries to refer to the variables sequence.

	* src/rasqal_internal.h, src/rasqal_query_results.c,
	src/rasqal_rowsequence_rowsource.c:
	(rasqal_new_query_result_row_sequence): Added from
	make_row_sequence but still internal.  (main): Use new function

	* src/rasqal_rowsequence_rowsource.c:
	(rasqal_rowsequence_rowsource_read_row): Use
	raptor_sequence_delete_at to remove it from sequence.

	* src/rasqal_rowsequence_rowsource.c: more tests

	* src/rasqal_rowsequence_rowsource.c:
	(rasqal_rowsequence_rowsource_read_row): Move offset on
	(main): Add test that rows read on

	* src/rasqal_rowsequence_rowsource.c: code style

	* src/rasqal_rowsequence_rowsource.c: docs

	* src/rasqal_rowsequence_rowsource.c: comments

	* src/rasqal_rowsequence_rowsource.c:
	(make_row_sequence): Added to build row test data
	(main): Use it

2008-09-20  Dave Beckett <dave@dajobe.org>

	* src/rasqal_union_rowsource.c:
	(rasqal_union_rowsource_finish): Free context

	* src/rasqal_rowsequence_rowsource.c:
	(rasqal_rowsequence_rowsource_finish): Free context

	* src/rasqal_empty_rowsource.c:
	(rasqal_empty_rowsource_finish): Added and used to free context

	* src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_rowsequence_rowsource.c, src/rasqal_union_rowsource.c:
	Added union and rowsequence rowsources

	* src/rasqal_query_results.c:
	(rasqal_new_query_result_row_common): Added, pulled out of
	rasqal_new_query_result_row
	(rasqal_new_query_result_row): Refactored to use above.
	(rasqal_new_query_result_row_for_variables): Added, creating a row
	big enough for all the named variables in a variables table.

	* src/rasqal_empty_rowsource.c:
	(main) fail test

	* src/Makefile.am, src/rasqal_empty_rowsource.c,
	src/rasqal_internal.h: Added empty rowsource class

	* src/rasqal_rowsource.c:
	(rasqal_rowsource_read_all_rows): Return an empty sequence rather
	than NULL when 0 rows are returned

2008-09-08  Lauri Aalto <laalto@iki.fi>

	* src/rasqal.h, src/rasqal_internal.h: Moved EXTERN_C definitions
	to internal header - no need to expose in API.

	* src/rasqal.h, src/rasqal_engine.c, src/rasqal_general.c:
	Workaround for an armcc c++ mode issue regarding function pointers
	as arguments: Need explicit extern "C" to get C linkage for C
	function pointers.

	* src/rdql_lexer.l, src/sparql_lexer.l: casts for c++

2008-09-06  Dave Beckett <dave@dajobe.org>

	* tests/algebra/convert_graph_pattern.c: Casts for c++

	* docs/rasqal-docs.xml, docs/rasqal-sections.txt: Update sections

	* src/rasqal_decimal.c:
	(rasqal_xsd_decimal_as_string): Cast for C++

2008-09-05  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y: Fixes for g++ from
	Fixes Issue#0000271 http://bugs.librdf.org/mantis/view.php?id=271

2008-08-25  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c:
	(rasqal_engine_remove_filter_graph_patterns): Do not leak sequence
	on error.

	* src/rasqal_engine.c:
	(rasqal_engine_execute_init): Check for errors in
	rasqal_engine_remove_filter_graph_patterns() visitor.

	* src/rasqal_engine.c:
	(rasqal_engine_remove_filter_graph_patterns): Resiliency fix:
	check raptor_sequence_push() return value to avoid dangling
	pointers

	* src/sparql_parser.y:
	(GroupGraphPattern): Fixed double deletion:
	raptor_sequence_shift() takes ownership

	* src/rasqal_engine.c:
	(rasqal_engine_group_2_graph_patterns): Always take ownership of
	graph patterns passed in.

	* src/sparql_parser.y:
	(OptionalGraphPattern): Fixed double deletion:
	raptor_sequence_push() takes ownership

	* src/rasqal_engine.c: Fixed gcc warnings about empty else blocks
	when RASQAL_DEBUG is not defined.

	* src/rasqal_engine.c, src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_add_sub_graph_pattern): Always take
	ownership of sub gp.
	(rasqal_engine_execute_init): Free new_qgp on error and ensure
	query->query_graph_pattern does not become a dangling pointer.

	* src/fix-flex: Removed additional OOM checks added to
	flex-generated ensure_buffer_stack(). flex versions 2.5.34 and
	later generate the OOM checking code themselves.

	* src/rasqal_engine.c:
	(rasqal_engine_remove_duplicate_select_vars): Resiliency
	fix. Check for raptor_new_sequence() failure.

	* src/rasqal_graph_pattern.c:
	(rasqal_new_graph_pattern_from_sequence): Resiliency
	fix. graph_patterns may be NULL.

2008-08-24  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: rasqal_query: Switched to use a
	rasqal_variables_table object.  Make all old fields unused.  Added
	prototypes for rasqal_variables_table_get_value,
	rasqal_variables_table_get_named_variables_count,
	rasqal_variables_table_get_anonymous_variables_count,
	rasqal_variables_table_get_total_variables_count,
	rasqal_variables_table_get_named_variables_sequence and
	rasqal_variables_table_get_anonymous_variables_sequence.
	(rasqal_new_query, rasqal_free_query): Create and destroy
	variables table instead of individual fields.
	(rasqal_query_get_all_variable_sequence,
	rasqal_query_get_variable, rasqal_query_has_variable,
	rasqal_query_execute, rasqal_query_print,
	rasqal_query_get_variable_by_offset,
	rasqal_engine_expand_wildcards, rasqal_query_build_declared_in,
	rasqal_engine_get_next_result,
	rasqal_engine_query_result_row_update,
	rasqal_engine_bind_construct_variables,
	rasqal_rowsource_engine_ensure_variables): Switch to use
	rasqal_variables_table methods.

	* src/rasqal_variable.c:
	(rasqal_new_variable_typed, rasqal_new_variable): Now implemented
	with rasqal_variables_table_add
	(rasqal_variables_table_get_value): Added.
	(rasqal_variables_table_get_named_variables_count,
	rasqal_variables_table_get_anonymous_variables_count,
	rasqal_variables_table_get_total_variables_count): Added.
	(rasqal_variables_table_get_named_variables_sequence,
	rasqal_variables_table_get_anonymous_variables_sequence): Added.

	* tests/algebra/Makefile.am: Fix for make distcheck

	* src/rasqal_engine.c, src/rasqal_internal.h, src/sparql_parser.y:
	(rasqal_sparql_query_engine_prepare): Move SPARQL-only
	rasqal_engine_build_anonymous_variables and
	rasqal_engine_expand_wildcards to SPARQL query prepare code

	* Checkpoint in query engine refactoring.
	SVN 14382 at 2008-08-24 16:18:32 -0700 (Sun, 24 Aug 2008)

	At this point after adding hacks to turn the new query algebra
	into the old form. the query engine can still execute queries with
	triple patterns and no OPTIONAL, UNION or GROUP.
	All the RDQL testsuite pass without any change from the last
	release.
	The sparql tests have been updated to expect failure for OPTIONALs
	that used to work in the last release.
	A top level 'make check' passes at this SVN commit.

	* tests/sparql/survey/Makefile.am, tests/sparql/sort/Makefile.am,
	tests/sparql/part1/Makefile.am, tests/sparql/examples/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/Expr1/Makefile.am:
	Add failures due to OPTIONAL not implemented in new QE.  Add test
	failure reports.

	* tests/sparql/SyntaxFull/Makefile.am: Test failures are due to
	old SPARQL syntax changes - these tests probably need removing:
	syntax-bnodes-03.rq syntax-bnodes-04.rq

	* src/rasqal_engine.c: more debug output for query hack code changes

	* src/sparql_parser.y:
	(main): output to stdout again

	* src/rasqal_engine.c:
	(rasqal_query_build_declared_in): Do not fail when there is no
	query graph pattern - allowed with a query like 'DESCRIBE <uri>'
	(rasqal_engine_prepare): Wrap calling
	rasqal_query_build_declared_in with a check for a query GP.

	* src/sparql_parser.y:
	(GroupGraphPattern): Make an empty group GP if both optional args
	are missing to allow {} to work

	* src/rasqal_engine.c:
	(rasqal_engine_group_2_graph_patterns): Allow two NULL params to
	make an empty group GP

	* tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am: Count and
	report failures

	* RELEASE.html: note hack to be removed

	* src/rasqal_engine.c:
	(rasqal_engine_execute_init): Hack: Add a wrapper GROUP GP at the
	outer level to make the old execution engine work when there is
	just 1 GP.

	* src/rasqal_engine.c: Add DEBUG_FH macro

	* src/rasqal_engine.c:
	(rasqal_engine_remove_filter_graph_patterns): Added to turn
	new (GP, FILTER GP) query algebra form pair into what the old
	execution engine understands: GP+constraints
	(rasqal_engine_execute_init): Call
	rasqal_engine_remove_filter_graph_patterns on query GP to allow
	execution engine to work and be testable.

2008-08-20  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c: Remove
	rasqal_engine_adjust_anon_variables_offset since rasqal_variable
	constructors now deal with this.

	* src/rasqal_variable.c:
	(rasqal_new_variable_typed, rasqal_variables_table_add): Calculate
	and adjust variable offsets on creation.

	* src/rasqal_engine.c:
	(rasqal_engine_adjust_anon_variables_offset): Renamed from
	rasqal_engine_assign_variables since it just does one thing now

	* src/rasqal_engine.c: comment

	* src/rasqal_variable.c: Remove variable_names from table
	structure - not used

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c:
	Removed query->variable_names - no longer needed

2008-08-19  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query.c:
	(rasqal_free_query): Remove use of deleted field variables[].

	* src/rasqal_engine.c: Removed query->variables[] array.
	(rasqal_engine_expand_wildcards): Use
	rasqal_query_get_variable_by_offset to lookup variables.  Set
	select_variables_count here.
	(rasqal_engine_remove_duplicate_select_vars): Update Update
	select_variables_count if modified.
	(rasqal_engine_assign_variables, rasqal_query_build_declared_in,
	rasqal_engine_get_next_result,
	rasqal_engine_query_result_row_update,
	rasqal_engine_bind_construct_variables): Use
	rasqal_query_get_variable_by_offset instead of query->variables[]
	(rasqal_engine_prepare): Remove use of
	query->variables[]. autodocs.

	* src/rasqal_internal.h, src/rasqal_query.c:
	(rasqal_query_get_variable_by_offset): Added

	* src/rasqal_engine.c:
	(rasqal_engine_build_anonymous_variables,
	rasqal_engine_expand_wildcards): autodocs
	(rasqal_select_NULL_last_compare): Removed
	(rasqal_engine_remove_duplicate_select_vars): Added, pulled out of
	rasqal_engine_assign_variables.  Remove sort, simplify.
	(rasqal_engine_assign_variables): Just touches variables, not
	declared in or selects.
	(rasqal_query_build_declared_in): Just touch declared
	in. autodocs.
	(rasqal_engine_prepare): Call
	rasqal_engine_remove_duplicate_select_vars, init select variables
	count.  After assign variables, build the declared in array.

	* src/rasqal_internal.h: rasqal_engine_assign_variables is
	module-internal

	* src/rasqal_internal.h: Added typedef rasqal_variables_table
	Added prototypes for rasqal_new_variables_table,
	rasqal_free_variables_table, rasqal_variables_table_add,
	rasqal_variables_table_get, rasqal_variables_table_has and
	rasqal_variables_table_set

	* src/rasqal_variable.c: Add variables table

2008-08-18  Dave Beckett <dave@dajobe.org>

	* src/Makefile.am, src/rasqal_expr.c, src/rasqal_variable.c (from
	/rasqal/trunk/src/rasqal_expr.c:14345): Move rasqal_variable code
	to new rasqal_variable.c

2008-08-17  Dave Beckett <dave@dajobe.org>

	* src/sparql_lexer.l:
	(QUOTEDURI): Make sure first part of or does not grab <>

	* src/rasqal_engine.c:
	(rasqal_engine_expand_wildcards): Tidy code.
	(rasqal_engine_prepare): Handle rasqal_engine_expand_wildcards failure

	* src/rasqal_engine.c:
	(rasqal_engine_expand_wildcards): Handle SELECT * only since
	CONSTRUCT * was removed from SPARQL long
	ago.  (rasqal_engine_prepare): Docs

2008-08-13  Lauri Aalto <laalto@iki.fi>

	* tests/algebra: props: ignore convert_graph_pattern.exe, .libs

2008-08-11  Dave Beckett <dave@dajobe.org>

	* rasqal-src-config.in: prefer pkg-config raptor

2008-08-09  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_raptor.c:
	(rasqal_raptor_error_handler): Handle negative locator lengths
	from raptor_format_locator().

2008-08-05  Dave Beckett <dave@dajobe.org>

	* docs/tmpl/section-graph_pattern.sgml: add
	RASQAL_GRAPH_PATTERN_OPERATOR_FILTER to docs

2008-08-04  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c:
	(rasqal_engine_group_2_graph_patterns): Do not double delete
	second_gp - already owned by sequence.

	* src/rasqal_algebra.c:
	(rasqal_algebra_remove_znodes): Fixed memory-related crashes.

	* tests/algebra/Makefile.am: Added $(EXEEXT) for
	convert_graph_pattern to make it build on e.g. cygwin.

2008-07-23  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h: autodocs

2008-07-19  Dave Beckett <dave@dajobe.org>

	* tests/algebra/test-08.out, tests/algebra/test-08.rq,
	tests/algebra/test-09.out, tests/algebra/test-09.rq: Add test-08
	test-09

	* src/rasqal_query.c:
	(rasqal_query_prepare): Remove call to deleted
	rasqal_engine_build_constraints_expression
	(rasqal_query_write_sparql_graph_pattern): See if a FILTER was
	seen in initial GP sequence scan, and handle at end.

	* src/rasqal_engine.c:
	(rasqal_engine_build_constraints_expression(query->query_graph_pattern):
	Deleted

	* src/rasqal_algebra.c:
	(main): MAke sure node1 owns node8

	* src/rasqal_algebra.c:
	(main): Adjust use of constraint from parser query. Add node8
	empty algebra node test for use with FILTER in node1.

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_write_internal): Tidy filter GP output

	* src/rasqal_expr.c:
	(rasqal_new_literal_expression): e= not e==

	* src/rasqal_algebra.c:
	(rasqal_algebra_basic_graph_pattern_to_algebra):
	Use single filter_expression instead of list of GP constraints
	(rasqal_algebra_group_graph_pattern_to_algebra): use
	filter_expression to recognise a single filter expression, remove
	list of GP constraints

	* src/rasqal_graph_pattern.c:
	(rasqal_free_graph_pattern): Use filter_expression to replace
	constraints_expression
	(rasqal_graph_pattern_add_constraint,
	rasqal_graph_pattern_get_constraint_sequence and
	rasqal_graph_pattern_get_constraint): Deprecated
	(replacement rasqal_graph_pattern_set_filter_expression,
	rasqal_graph_pattern_get_filter_expression): Added to replace
	above.
	(rasqal_graph_pattern_write_internal): Use single
	filter_expression to replace walking a list of constraints.

	* src/rasqal.h: deprecated rasqal_graph_pattern_add_constraint,
	rasqal_graph_pattern_get_constraint_sequence and
	rasqal_graph_pattern_get_constraint Added replacement
	rasqal_graph_pattern_set_filter_expression and
	rasqal_graph_pattern_get_filter_expression

	* src/rasqal_engine.c:
	(rasqal_engine_graph_pattern_constraints_has_qname,
	rasqal_engine_expand_graph_pattern_constraints_qnames): Check only
	filter_expression.
	(rasqal_engine_build_constraints_expression): NOP that may be
	removed.
	(rasqal_engine_check_constraint, rasqal_engine_do_step,
	rasqal_engine_do_optional_step, rasqal_engine_move_constraints,
	rasqal_engine_graph_pattern_fold_expressions): Use
	filter_expression to replace constraints_expression
	(rasqal_engine_merge_graph_patterns): Use filter_expression to
	replace constraints_expression and no need to check for >1
	constraint per GP.

	* src/rasqal_internal.h: struct rasqal_graph_pattern_s: note
	constraints field is for support deprecated functions
	filter_expression field renamed from constraints_expression to
	follow new GP name.

	* src/rasqal_internal.h: struct rasqal_query_s loses
	constraints_sequence; now void* unused1.

	* src/rasqal_expr.c:
	(rasqal_new_1op_expression, rasqal_new_2op_expression,
	rasqal_new_3op_expression, rasqal_new_string_op_expression,
	rasqal_new_literal_expression, rasqal_new_function_expression,
	rasqal_new_cast_expression): Free passed in objects on allocation
	failure or NULL args.

	* src/rdql_parser.y:
	(Query): Set query constraint_expression from ConstraintClause
	(ConstraintClause, CommaAndConstraintClause): Now return
	expressions and AND a list of Expressions in order
	(rasqal_rdql_query_engine_prepare): Build a GROUP graph pattern
	containing a BASIC graph pattern and optionally, a FILTER.

	* src/rdql_common.h: Add constraint_expression to struct
	rasqal_rdql_query_engine_s

2008-07-15  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y: GroupOrUnionGraphPattern is [25]

2008-07-14  Dave Beckett <dave@dajobe.org>

	* tests/algebra/test-07.out: fix result

	* src/sparql_parser.y:
	(GroupGraphPattern, GraphPatternListOpt): Merge GPs given as args

	* src/rasqal_query.c: More debug messages tweaking to DEBUG_FH

	* src/rasqal_engine.c:
	(rasqal_engine_merge_graph_patterns): Use outer GP op for
	resulting merged GP.

	* src/rasqal_algebra.c:
	(rasqal_algebra_group_graph_pattern_to_algebra): Handle FILTER GP
	type: add constraints to expression and make filter algebra
	object.

	* src/sparql_parser.y: emit huge amounts of debugging to stderr
	(GroupGraphPattern): partial updates for SPARQL REC grammar It
	should return a single list of it's internal GPs, not a recursive
	group GP of group GPs

	* tests/algebra/Makefile.am: capture stderr for case of errors

	* src/rasqal_engine.c: docs

	* src/rasqal_graph_pattern.c: set DO_INDENTING on if RASQAL_DEBUG

2008-07-13  Dave Beckett <dave@dajobe.org>

	* src/rasqal_algebra.c:
	(rasqal_algebra_group_graph_pattern_to_algebra): Do not deal with
	BGP with constraints for now

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_write_internal): Code tidy.

	* src/rasqal_algebra.c:
	(rasqal_algebra_graph_pattern_to_algebra): Add FILTER type

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_write_indent,
	rasqal_graph_pattern_write_plurals): Added.
	(rasqal_graph_pattern_write_internal): Added to write to iostream
	with optional indenting
	(rasqal_graph_pattern_print): Use
	rasqal_graph_pattern_write_internal to write to FILE*

	* src/rasqal_graph_pattern.c: Added
	RASQAL_GRAPH_PATTERN_OPERATOR_FILTER

	* src/rasqal.h: Added RASQAL_GRAPH_PATTERN_OPERATOR_FILTER

	* src/rasqal_internal.h: Added prototype for
	rasqal_new_filter_graph_pattern

	* src/rasqal_graph_pattern.c:
	(rasqal_new_filter_graph_pattern): Added.

	* src/rasqal_engine.c:
	(rasqal_engine_group_2_graph_patterns): Take 1 or 2 GPs to make a
	new group GP from them.

2008-07-10  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y: 2008

	* src/sparql_parser.y: reorder ConstructQuery [6], DescribeQuery
	[7] to match sparql REC grammar

2008-07-09  Dave Beckett <dave@dajobe.org>

	* src/rasqal_algebra.c:
	(rasqal_algebra_basic_graph_pattern_to_algebra): Make a FILTER()
	algebra node around any constraints in a BGP.

	* tests/algebra/Makefile.am, tests/algebra/test-07.out,
	tests/algebra/test-07.rq: Added test-07 (fails)

	* tests/algebra/Makefile.am, tests/algebra/test-05.out,
	tests/algebra/test-06.out, tests/algebra/test-06.rq: Added
	test-06.  Expect LeftJoin in test-05

	* src/rasqal_algebra.c: "LeftJoin" not "Leftjoin" to be more like
	sparql algebra form

	* tests/algebra/test-05.out: test-05 passes

	* src/rasqal_internal.h: Added rasqal_algebra_node_is_empty
	prototype

	* src/rasqal_algebra.c:
	(rasqal_algebra_node_is_empty): Added to check if algebra node is
	an empty BGP aka "Z"
	(rasqal_algebra_remove_znodes): Added to replace join(Z, A) with A
	and replace join(A, Z) with A
	(rasqal_algebra_query_to_algebra): Apply
	rasqal_algebra_remove_znodes over the resulting node.

2008-07-08  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c:
	(rasqal_engine_graph_pattern_order): Commented out.
	(rasqal_engine_graph_pattern_init): Do not sort GPs
	(rasqal_engine_merge_graph_patterns): Only merge for GROUP gp

	* src/rasqal_internal.h: rasqal_new_filter_algebra_node: Renamed
	from rasqal_new_expr_algebra_node

	* src/rasqal_algebra.c:
	(rasqal_new_filter_algebra_node): Renamed from
	rasqal_new_expr_algebra_node
	(rasqal_new_2op_algebra_node, rasqal_new_leftjoin_algebra_node):
	Handle failure and tidy up ownership of parameters.
	(rasqal_algebra_basic_graph_pattern_to_algebra): Added with just
	handling BGP graph pattern operation.
	(rasqal_algebra_union_graph_pattern_to_algebra): Added with just
	handling UNION graph pattern operation
	(rasqal_algebra_group_graph_pattern_to_algebra): Added handling
	GROUP and OPTIONAL graph pattern operations.
	(rasqal_algebra_graph_pattern_to_algebra): switch now calls above.
	(main): Create an empty node for rasqal_new_filter_algebra_node
	test

	* src/sparql_parser.y:
	(OptionalGraphPattern): Optional graph pattern is now a list of 1
	group graph patterns.  This makes it easier for the algebra and
	any extra GPs will be removed later.

2008-07-07  Dave Beckett <dave@dajobe.org>

	* tests/algebra/Makefile.in: Removed Makefile.in

	* tests/algebra/Makefile.am: write to out output file and always
	rm it

	* tests/algebra/Makefile.am, tests/algebra/Makefile.in,
	tests/algebra/test-05.out, tests/algebra/test-05.rq: Added test-05
	(which fails)

	* tests/algebra/Makefile.am, tests/algebra/Makefile.in,
	tests/algebra/convert_graph_pattern.c, tests/algebra/test-03.rq,
	tests/algebra/test-04.out, tests/algebra/test-04.rq: Make
	convert_graph_pattern just write algebra to stdout for easier
	command line debugging and checking.  Added test-04

	* src/rasqal_algebra.c:
	(rasqal_algebra_graph_pattern_to_algebra): fix UNION order, sparql
	rec was correct.

	* src/sparql_parser.y:
	(GroupOrUnionGraphPattern): Make the sequence of graph patterns in
	the document order.

	* configure.ac, tests/Makefile.am, tests/algebra,
	tests/algebra/Makefile.am, tests/algebra/Makefile.in,
	tests/algebra/convert_graph_pattern.c, tests/algebra/test-01.out,
	tests/algebra/test-01.rq, tests/algebra/test-02.out,
	tests/algebra/test-02.rq, tests/algebra/test-03.out,
	tests/algebra/test-03.rq: Adde tests/algebra for testing
	conversion of graph patterns to algebra tree, based on
	http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/#convertGraphPattern

	* src/rasqal_internal.h: Altered signature of
	rasqal_algebra_algebra_node_write to remove indent.
	Added rasqal_algebra_query_to_algebra

	* src/rasqal_algebra.c:
	(rasqal_algebra_algebra_node_write_internal): Renamed from
	rasqal_algebra_algebra_node_write
	(rasqal_algebra_algebra_node_write): Now takes no indent arg.
	(rasqal_algebra_graph_pattern_to_algebra): Initial GP to algebra
	node expression work.
	(rasqal_algebra_query_to_algebra): Apply
	rasqal_algebra_graph_pattern_to_algebra to a query graph pattern.

	* src/rasqal-config.in: --help has to exit 0

	* src/rasqal-config.in: restore --help

	* src/rasqal_algebra.c:
	(rasqal_algebra_write_indent, rasqal_algebra_algebra_node_write):
	Write to iostream.
	(rasqal_algebra_node_print): Write using an iostream to FILE*

	* src/rasqal_internal.h: Added prototypes for
	rasqal_literal_write_type, rasqal_literal_write,
	rasqal_variable_write, rasqal_triple_write,
	rasqal_expression_write_op, rasqal_expression_write

	* src/rasqal_expr.c:
	(rasqal_variable_write, rasqal_triple_write,
	rasqal_expression_write_op, rasqal_expression_write): Added for
	writing a variables, triples and expressions to a raptor_iostream

2008-07-06  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c:
	(rasqal_literal_write_type, rasqal_literal_write): Added for
	writing a literal to a raptor_iostream

	* src/rasqal_algebra.c:
	(main) more expr ownership fixes

	* src/rasqal_algebra.c:
	(main) copy expr for expr node

	* src/rasqal_algebra.c:
	(main) copy expr for leftjoin test

	* src/Makefile.am, src/rasqal.h, src/rasqal_algebra.c,
	src/rasqal_internal.h: Added rasqal_algebra class

	* src/rasqal_query_test.c:
	(main): Prefer to test with sparql and fix sparql syntax to REC
	form.

	* src/rasqal_engine.c, src/rasqal_internal.h:
	rasqal_engine_gp_data gains max_optional_graph_pattern field from
	rasqal_graph_pattern since it is about execution not a GP

	* src/rasqal-config.in: Convert to a wrapper around pkg-config.
	--libtool-libs is currently ignored, it should emit the path to
	the librasqal.la file but generally that is probably discouraged.

	* NEWS.html, RELEASE.html, configure.ac,
	src/win32_rasqal_config.h: Bump version to 0.9.17

2008-07-05  Dave Beckett <dave@dajobe.org>

	* Snapshotted rasqal_0_9_16 for 0.9.16 release (SVN 14220)

2008-07-03  Dave Beckett <dave@dajobe.org>

	* RELEASE.html: deprecate rasqal-config

2008-06-29  Dave Beckett <dave@dajobe.org>

	* tests/engine/Makefile.am: Remove RASQAL_EXTERNAL_CPPFLAGS

	* configure.ac, src/Makefile.am: Remove RASQAL_EXTERNAL_CPPFLAGS
	since all CFLAGS are internal

	* rasqal.pc.in: Fix includes and cflags

	* utils/Makefile.am: Link against only internal libs; librasqal
	will do other linking.

	* utils/roqet.c: Pick up store results default from envariable
	RASQAL_DEBUG_STORE_RESULTS to enable batch testing.

	* src/rasqal_internal.h: rasqal_query_set_store_results is only
	available if RASQAL_DEBUG

	* src/rasqal_query.c:
	(rasqal_query_set_store_results): Only available if RASQAL_DEBUG

	* src/rasqal_expr.c: (main): Cast for C++

	* src/rasqal_literal.c: (rasqal_literal_equals_flags): Less debug
	noise

2008-06-28  Dave Beckett <dave@dajobe.org>

	* tests/engine/rasqal_graph_test.c: Remove C99 .field = value
	since C++ (or at least G++ 4.0.0) does not support it.

	* src/rasqal_decimal.c, src/rasqal_expr.c, src/rasqal_general.c,
	src/rasqal_raptor.c: Casts for C++

2008-06-26  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h: words

	* Makefile.am, docs/Makefile.am, tests/Makefile.am,
	tests/engine/Makefile.am, tests/laqrs/Makefile.am,
	tests/laqrs/syntax/Makefile.am, tests/rdql/Makefile.am,
	tests/rdql/testsuite/Makefile.am, tests/sparql/Expr1/Makefile.am,
	tests/sparql/Expr2/Makefile.am,
	tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am, tests/sparql/Makefile.am,
	tests/sparql/SyntaxDev/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
	tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/ValueTesting/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/examples/Makefile.am,
	tests/sparql/part1/Makefile.am, tests/sparql/regex/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/sort/Makefile.am,
	tests/sparql/survey/Makefile.am, tests/sparql/syntax/Makefile.am,
	utils/Makefile.am, utils/getopt.c, utils/rasqal_getopt.h,
	utils/roqet.c: 2008

	* INSTALL.html, LICENSE.html, NEWS.html, README.html,
	RELEASE.html, TODO.html, docs/README.html: 2008

	* Makefile.am, docs/Makefile.am, src/Makefile.am,
	tests/Makefile.am, tests/engine/Makefile.am,
	tests/laqrs/Makefile.am, tests/laqrs/syntax/Makefile.am,
	tests/rdql/Makefile.am, tests/rdql/testsuite/Makefile.am,
	tests/sparql/Expr1/Makefile.am, tests/sparql/Expr2/Makefile.am,
	tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am, tests/sparql/Makefile.am,
	tests/sparql/SyntaxDev/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
	tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/ValueTesting/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/examples/Makefile.am,
	tests/sparql/part1/Makefile.am, tests/sparql/regex/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/sort/Makefile.am,
	tests/sparql/survey/Makefile.am, tests/sparql/syntax/Makefile.am,
	utils/Makefile.am: 2008

	* src/rasqal.h, src/rasqal_datetime.c, src/rasqal_decimal.c,
	src/rasqal_engine.c, src/rasqal_expr.c, src/rasqal_feature.c,
	src/rasqal_general.c, src/rasqal_graph_pattern.c,
	src/rasqal_internal.h, src/rasqal_limit_test.c,
	src/rasqal_literal.c, src/rasqal_map.c, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_query_test.c,
	src/rasqal_raptor.c, src/rasqal_redland.c,
	src/rasqal_result_formats.c, src/rasqal_rowsource.c,
	src/rasqal_skiplist.c, src/rasqal_sparql_xml.c,
	src/rasqal_xsd_datatypes.c, src/rdql_common.h,
	src/sparql_common.h, src/strcasecmp.c, src/win32_rasqal_config.h:
	2008

	* utils/roqet.c: Add --store-results BOOL when debugging, calling
	(currently) internal rasqal_query_set_store_results

	* docs/Makefile.am: note FIXME for updating

	* src/rasqal.h: autodocs

	* docs/tmpl/section-triples_source.sgml: templates

	* docs/rasqal-overrides.txt: override rasqal_triples_source
	FIXME automate keeping this up-to-date

	* src/rasqal_general.c: (rasqal_free_world): autodocs

	* docs/rasqal-sections.txt: Removed rasqal_triples_match_s

	* docs/tmpl/rasqal-unused.sgml, docs/tmpl/section-expression.sgml,
	docs/tmpl/section-general.sgml,
	docs/tmpl/section-graph_pattern.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-prefix.sgml,
	docs/tmpl/section-query.sgml,
	docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-query_results_formatter.sgml,
	docs/tmpl/section-triples_source.sgml,
	docs/tmpl/section-unused.sgml, docs/tmpl/section-variable.sgml:
	Update tmpls

	* docs/rasqal-overrides.txt: override rasqal_triples_match
	FIXME automate keeping this up-to-date

	* docs/rasqal-sections.txt: Added rasqal_triples_match_s

	* docs/tmpl/section-xsd.sgml: title

	* src/rasqal_engine.c: Remove RASQAL_ENGINE_EVAL_LAZY macro and
	trigger off query->store_results flag.  struct
	rasqal_rowsource_engine_context gains offset field and renamed
	need_map to need_store_results
	(rasqal_rowsource_engine_init): Init row offset
	(rasqal_rowsource_engine_process): Add read all flag, use context
	offset and if not reading all, end after one result when not
	storing.
	(rasqal_rowsource_engine_read_row,
	rasqal_rowsource_engine_read_all_rows): Add read all flag.
	(rasqal_engine_execute_and_save): Remove local rowsource here and
	use one in query_results so that stored and lazy queries can use
	it.
	(rasqal_engine_execute_run): Stored and lazy both use this code an
	init a rowsource, use rasqal_engine_execute_and_save if necessary.
	(rasqal_engine_execute_next_lazy): Renamed from
	rasqal_engine_excute_next_lazy. Removed FIXME to execute with
	rowsource.

	* src/rasqal.h: describe rasqal_triples_match function prototypes.
	another prototype fix.  update prototypes to make gtkdoc-scan
	happier: use param names.

	* docs/rasqal-overrides.txt: override world

	* docs/rasqal-sections.txt: more new functions/macros

	* src/rasqal.h: remove ws for gtkdoc-scan

	* src/rasqal.h: autodocs

	* docs/rasqal-sections.txt: Added rasqal_free_world
	rasqal_new_variable_from_variable rasqal_new_world
	rasqal_query_results_formatter_read rasqal_query_results_read
	rasqal_world

	* docs/rasqal-sections.txt: Removed rasqal_expression_foreach_fn
	rasqal_expression_foreach rasqal_graph_pattern_get_flags

	* docs/rasqal-sections.txt: Remove rasqal_finish rasqal_init
	rasqal_new_floating_literal

	* src/rasqal_query.c: (rasqal_query_set_store_results): Added.

	* src/rasqal_internal.h: Added rasqal_query_set_store_results
	struct rasqal_query_s gains a store_result field.

	* utils/roqet.c: Separate use of HAVE_GETOPT_H (external header)
	from HAVE_GETOPT (internal)

	* src/sparql_parser.y: Include unistd.h if present.

	* configure.ac: Try unistd.h when searching for optind

	* src/rasqal_decimal.c: (main): Use %f for double, not %lf

	* configure.ac: Use AC_PROG_CC and AM_PROG_CC_C_O to replace
	AM_PROG_CC_STDC (obsolete) to stop configure warnings

	* src/sparql_parser.y: Separate use of HAVE_GETOPT_H (external
	header) from HAVE_GETOPT (internal)

2008-06-23  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c, src/rasqal_query.c, src/rasqal_redland.c:
	(rasqal_literal_to_redland_node, rasqal_free_literal,
	rasqal_literal_print, rasqal_literal_as_boolean,
	rasqal_literal_as_integer, rasqal_literal_as_floating,
	rasqal_literal_as_uri, rasqal_literal_as_string_flags,
	rasqal_literal_rdql_promote_calculate, rasqal_literal_compare,
	rasqal_literal_equals_flags, rasqal_query_write_sparql_literal,
	rasqal_query_write_sparql_expression): Replaced abort() with
	RASQAL_FATAL[12]() mostly as the default: action of switch()
	statements.  This calls abort() only for developer use, just a
	warning for end users.

2008-06-22  Dave Beckett <dave@dajobe.org>

	* utils/roqet.1: split main & other options

	* utils/roqet.1: formatting

	* utils/roqet.1: update for 0.9.15 & 0.9.16

	* utils/roqet.c: 2008
	(rdql_parser_error): Removed, unused code.

	* docs/librasqal.3: Noted removal of rasqal_init and rasqal_finish

2008-06-21  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h, src/rasqal_expr.c, src/rasqal_graph_pattern.c:
	Removed deprecated functions and macros.
	(rasqal_graph_pattern_get_flags): Deleted.
	(rasqal_expression_foreach): Deleted.  RASQAL_LITERAL_FLOATING
	macro deleted.  rasqal_expression_foreach_fn typedef deleted.

	* docs/librasqal.3: Updated for old release 0.9.15 of 2007-11-17

	* src/rasqal-config.in: Add /usr/include/rasqal to cflags

	* src/Makefile.am: Install rasqal headers in /usr/include/rasqal
	as promised

2008-05-22  Lauri Aalto <laalto@iki.fi>

	* src/sparql_lexer.l: Fixed sparql lexer error handling. Do not
	report OOM for failed function calls that can fail for other
	reasons besides OOM, e.g. qname expansion fails due to undeclared
	prefix.
	(sparql_lexer_fatal_error): Removed abort() call, let caller
	terminate the lexer.

2008-05-16  Dave Beckett <dave@dajobe.org>

	* src/rasqal_result_formats.c:
	(rasqal_iostream_write_json_boolean): Renamed from
	raptor_iostream_write_json_boolean and fix to emit a " before the
	name.

2008-05-06  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c: (rasqal_query_prepare): Resiliency fix:
	avoid raptor_free_memory(0)

2008-05-05  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_free_gp_data,
	rasqal_free_engine_execution_data): Assert on passed in pointer,
	not on uninitialized variable.

2008-05-01  Dave Beckett <dave@dajobe.org>

	* src/rasqal_decimal.c, src/rasqal_engine.c, src/rasqal_expr.c,
	src/rasqal_general.c, src/rasqal_graph_pattern.c,
	src/rasqal_literal.c, src/rasqal_map.c, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_result_formats.c,
	src/rasqal_rowsource.c, src/rasqal_skiplist.c: Add NULL pointer
	asset checks for destructors

	* src/sparql_lexer.l: Use setjmp/longjmp to handle error recovery

	* src/rdql_lexer.l: Use setjmp/longjmp to handle error recovery

	* src/rdql_parser.y: (rdql_query_error): Return void, it never has
	a status

	* src/rasqal_internal.h: Added asset macros

2008-04-15  Dave Beckett <dave@dajobe.org>

	* RELEASE.html: html

2008-04-14  Dave Beckett <dave@dajobe.org>

	* src/rdql_common.h, src/rdql_parser.y, src/sparql_common.h,
	src/sparql_parser.y: Count errors in SPARQL and RDQL syntax
	parsing and do not report errors after the first one.  A
	workaround instead of adding full bison error parser recovery.

2008-04-14  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_literal_as_node): Resiliency fix:
	Check for NULL literal.

2008-04-09  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_literal_as_node): Turn variables
	pointing to non-string literals into string literals. Fixes
	"Triple with unknown object skipped" errors in graph queries like
	SPARQL CONSTRUCT.

2008-03-29  Dave Beckett <dave@dajobe.org>

	* utils/srxread.c: Update for rasqal_new_query_results_formatter
	world param.

2008-02-25  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_general.c, src/rasqal_query.c: Ported rasqal to
	r13695 raptor error handler changes.

2008-02-24  Lauri Aalto <laalto@iki.fi>

	* src/Makefile.am: flex-generated header file does not need fixing
	with fix-flex. It already has YY_NO_UNISTD_H guard and all other
	fix-flex issues are for .c files only.
	Fixes warnings due to multiple inclusion of rasqal_config.h.

2008-02-16  Dave Beckett <dave@dajobe.org>

	* autogen.sh, autogen.sh, autogen.sh, autogen.sh, autogen.sh:
	autogen checks when env prog version is empty. Update all packages
	to latest autogen.sh

2008-02-12  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_rowsource_engine_finish):
	Low-memory leak fix. Ensure map is always freed.

2008-02-07  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_engine_execute_and_save): Set
	finished flag if returning finished status. Another fix to prevent
	reaching the r13516 FIXME HACK abort() branch in
	rasqal_engine_excute_next_lazy() in low-memory situations.

	* src/rasqal_engine.c: (rasqal_rowsource_engine_process): Removed
	unreachable conditional code.

	* src/rasqal_engine.c: (rasqal_engine_execute_and_save): Set query
	results to finished state if results_sequence is NULL. Prevents
	reaching the r13516 FIXME HACK abort() branch in
	rasqal_engine_excute_next_lazy() on low-memory situations.

2008-02-02  Dave Beckett <dave@dajobe.org>

	* src/rasqal_sparql_xml.c:
	(rasqal_query_results_get_rowsource_sparql_xml):
	Use updated SVN raptor_error_handlers_init call.

2008-01-29  Lauri Aalto <laalto@iki.fi>

	* src/Makefile.am: Fixed configuration error: build rasqal getopt
	if GETOPT is true, not vice versa. Fixes sparql_parser_test in
	some environments where getopt.h declares optind/optarg
	differently from rasqal_getopt. E.g. on cygwin getopt.h has
	__declspec(dllimport) declarations.

2008-01-28  Lauri Aalto <laalto@iki.fi>

	* src/sparql_parser.y: sparql_parser_test: Fixed crash from
	calling rasqal_free_world() with an uninitialized world.

2008-01-20  Dave Beckett <dave@dajobe.org>

	* docs/Makefile.am, tests/rdql/testsuite/Makefile.am,
	tests/sparql/Expr1/Makefile.am, tests/sparql/Expr2/Makefile.am,
	tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
	tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/ValueTesting/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/examples/Makefile.am,
	tests/sparql/part1/Makefile.am, tests/sparql/regex/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/sort/Makefile.am,
	tests/sparql/survey/Makefile.am, tests/sparql/syntax/Makefile.am,
	utils/Makefile.am: Replace bare perl with $(PERL)

	* src/Makefile.am: Make sparql_parser_test work when getopt isn't around

	* tests/engine/rasqal_order_test.c: Back to Unix line endings

	* configure.ac, src/rasqal_decimal.c: Added test for gmp_version

	* configure.ac: Use gmp.h in mpfr.h check just to prevent
	configure warning, not to ever use it

	* configure.ac, docs/tmpl/rasqal-unused.sgml,
	docs/tmpl/section-general.sgml,
	docs/tmpl/section-graph_pattern.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-query.sgml,
	docs/tmpl/section-query_results_formatter.sgml,
	docs/tmpl/section-triples_source.sgml: Make MPFR test check for
	functions in mpfr that are not in ancient gmp version of mpfr

2008-01-15  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_engine_bind_construct_variables):
	Create copies of variable values to prevent literal double
	deletion.

	* src/rasqal_query_results.c: (rasqal_new_query_results):
	Explicitly set bindings results type for select queries. Worked
	previously because RASQAL_QUERY_RESULTS_BINDINGS == 0.
	(rasqal_query_results_set_variables): Removed commented out code.

	* src/rasqal_internal.h: Removed rdf uri extern references - uris
	moved to rasqal_world.

2008-01-14  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: (rasqal_prefix_id) Moved from
	rasqal_query.c to rasqal_query_results.c static function. Do not
	free passed in string.
	(rasqal_query_results_get_triple) Do not change nodeids of
	existing blanks but create new blanks for new prefixed
	nodeids.
	Fixes Issue#0000242 http://bugs.librdf.org/mantis/view.php?id=242
	Do not leak stored query_result->triples.

	* configure.ac: Applied rasqal_strcasecmp configuration patch from
	http://bugs.librdf.org/mantis/view.php?id=249

	* src/rasqal_literal.c: (rasqal_literal_as_node): Refactored to
	simpler form. rasqal_new_literal_from_literal(NULL) returns NULL
	since r12808.

	* autogen.sh: Do not branch autogen.sh scripts but keep them
	identical

2008-01-13  Dave Beckett <dave@dajobe.org>

	* autogen.sh: automake 1.0 docs

2008-01-13  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_rowsource_engine_ensure_variables):
	Update rowsource size properly for construct queries.

2008-01-11  Lauri Aalto <laalto@iki.fi>

	* src/rasqal.h, src/rasqal_query.c: (rasqal_query_add_prefix):
	Changed to return an error code. API function signature touched
	but source compatibility not broken.

	* src/rasqal.h, src/rasqal_query.c: (rasqal_query_add_variable):
	Changed to return an error code. API function signature touched
	but source compatibility not broken.

	* src/rasqal.h,
	(rasqal_graph_pattern_add_sub_graph_pattern): Changed to return an
	error code. API function signature touched but source
	compatibility not broken.

2008-01-10  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_general.c, src/rasqal_internal.h: (rasqal_world_s)
	Removed usage field. No longer needed.

	* src/rasqal.h, src/rasqal_literal.c: API break: Removed
	rasqal_new_floating_literal()

	* src/rasqal_internal.h,
	src/rasqal_literal.c (rasqal_new_numeric_literal): Changed
	function param ordering to be consistent with
	e.g. rasqal_new_integer_literal().

	* src/rasqal.h, src/rasqal_engine.c, src/rasqal_general.c,
	src/rasqal_internal.h, src/rasqal_limit_test.c,
	src/rasqal_query.c, src/rasqal_query_results.c,
	src/rasqal_query_test.c, src/rasqal_raptor.c,
	src/rasqal_redland.c, src/rasqal_result_formats.c,
	src/rdql_parser.y, src/sparql_parser.y,
	tests/engine/rasqal_graph_test.c,
	tests/engine/rasqal_order_test.c, utils/roqet.c: API break:
	Removed rasqal api functions deprecated in the recent
	re-engineering efforts. Renamed new *2 functions to original names
	that now take in a rasqal_world pointer.

	* src/rdql_lexer.l, src/sparql_lexer.l: Fixed lexer tests -
	initialize query->world needed by rasqal_literal constructors

	* src/rasqal_expr.c, src/rasqal_internal.h, src/rasqal_literal.c,
	src/rasqal_query.c, src/rasqal_xsd_datatypes.c,
	src/sparql_parser.y: Moved xsd namespace uri and datatype uris to
	rasqal_world.
	(rasqal_xsd_datatype_uri_to_type, rasqal_xsd_datatype_type_to_uri,
	rasqal_xsd_is_datatype_uri, rasqal_xsd_datatype_uri_parent_type):
	Functions now take in a rasqal_world pointer.

	* utils/srxread.c: Updated srxread to new
	rasqal_query_results_formatter_read() API

	* src/rasqal.h, src/rasqal_engine.c, src/rasqal_redland.c: Updated
	rasqal_redland to new rasqal_literal API. Store rasqal_world
	pointer to rasqal_triples_match structure.  Compiles but not
	tested.

	* src/rasqal.h, src/rasqal_expr.c, src/rasqal_internal.h,
	src/rasqal_literal.c, src/rasqal_query_results.c,
	src/rasqal_raptor.c, src/rasqal_result_formats.c,
	src/rasqal_sparql_xml.c, src/rdql_lexer.l, src/rdql_parser.y,
	src/sparql_lexer.l, src/sparql_parser.y: Added rasqal_world
	pointer to rasqal_literal.
	(rasqal_new_*_literal, rasqal_new_decimal_literal_from_decimal):
	API break. rasqal_literal constructors take in rasqal_world
	pointer.
	(rasqal_new_floating_literal): Old deprecated function changed to
	return NULL.
	(rasqal_new_string_literal_node): Now takes in a rasqal_world*
	param.
	(rasqal_query_results_get_rowsource_func): Now takes in a
	rasqal_world* param.
	(rasqal_query_results_formatter_read): API break. Takes in
	rasqal_world pointer. Passed to get_rowsource function.
	(rasqal_query_results_get_rowsource_sparql_xml): Store
	rasqal_world* in rowsource context for creating new literals.

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_datatype_check): Fixed
	compiler warning about signed-unsigned comparison

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_init,
	rasqal_xsd_datatype_check, rasqal_xsd_datatype_label): Use
	compile-time initialization for xsd datatype names and check
	functions. Prepare for moving xsd uris to rasqal_world.

	* src/rasqal_expr.c: Fixed xsd init/finish in rasqal_expr tests.

2008-01-09  Lauri Aalto <laalto@iki.fi>

	* src/rasqal.h, src/rasqal_general.c, src/rasqal_result_formats.c:
	const function params make no sense - they will be copies
	anyway (pointer-to-const params would make sense)

	* src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_xsd_datatypes.c: (rasqal_xsd_init, rasqal_xsd_finish):
	Add world param. Not used yet.

	* src/rasqal.h, src/rasqal_engine.c, src/rasqal_general.c,
	src/rasqal_internal.h, src/rasqal_raptor.c, src/rasqal_redland.c:
	Moved triples_source_factory to rasqal_world.
	(rasqal_set_triples_source_factory): Deprecated API
	function. Replaced with rasqal_set_triples_source_factory2() that
	takes in a world parameter.
	(rasqal_raptor_init, rasqal_redland_init): Now take a world param
	and use rasqal_set_triples_source_factory2().

	* src/rasqal_internal.h: (rasqal_log_error_varargs): Declare with
	printf format attribute. Fixes gcc warnings.

	* src/rasqal_decimal.c: Fixed compiler warning in rasqal_decimal
	test code with RASQAL_DECIMAL_NONE configuration.

	* utils/roqet.c: Update roqet to non-deprecated API.

	* src/rasqal.h, src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_query_results.c, src/rasqal_result_formats.c,
	src/rasqal_sparql_xml.c: Moved static query_results_formats
	sequence to rasqal_world.
	(rasqal_query_results_formats_enumerate,
	rasqal_query_results_formats_check,
	rasqal_new_query_results_formatter,
	rasqal_new_query_results_formatter_by_mime_type): Deprecated API
	functions. Replaced with corresponding *2 versions that take in a
	rasqal_world pointer.
	(rasqal_query_results_format_register_factory): Take in
	rasqal_world param. Return an error code. Use calloc not malloc
	for structs. Replace RASQAL_FATAL with fatal log message + return
	error code.
	(rasqal_init_result_formats): Take in a rasqal_world param. Check
	and return error codes from
	rasqal_query_results_format_register_factory() calls.
	(rasqal_init_result_format_sparql_xml): Take in a rasqal_world
	param, return an error code. Check and return error codes from
	rasqal_query_results_format_register_factory() calls.
	(rasqal_finish_result_formats): Take in a rasqal_world param.
	(rasqal_query_results_read, rasqal_query_results_write): Use
	non-deprecated API.

	* src/rasqal_graph_pattern.c, src/rasqal_query.c,
	src/rasqal_result_formats.c: Added FIXME notes to places where
	RASQAL_FATAL macros are used for handling runtime failures and not
	programming errors. Should change the code to handle runtime
	failures more gracefully.

	* src/rasqal_general.c, src/rasqal_internal.h, src/rdql_parser.y,
	src/sparql_parser.y: (rasqal_query_engine_register_factory):
	Changed function to return an int error code. On OOM, log an error
	and return an error code, do not die with a fatal error.
	(rasqal_init_query_engine_*): Return error code from
	rasqal_query_engine_register_factory().

	* src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_query_results.c, src/rasqal_raptor.c,
	src/rasqal_redland.c, src/rasqal_result_formats.c,
	src/rdql_parser.y, src/sparql_parser.y: Changed rasqal internal
	init functions to return an int error code.
	(rasqal_new_world): Check for init function failures and return
	NULL on failure.
	(rasqal_init): Check for NULL world.

	* src/rasqal_internal.h: (rasqal_world_s) comments

	* src/rasqal_general.c, src/rasqal_internal.h: Eliminated
	rasqal_initialised, rasqal_initialising, rasqal_finishing
	statics. Provide protection against recursive rasqal_init() calls
	by making the static world object a reference-counted singleton.

	* src/rasqal_expr.c, src/rasqal_general.c, src/rasqal_internal.h,
	src/sparql_parser.y: Moved rdf uris to rasqal_world.
	(rasqal_uri_init): Take in world parameter, return an error code.
	(rasqal_uri_finish): Take in world parameter.
	(rasqal_new_world): Check rasqal_uri_init() return value.

2008-01-08  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_expression_evaluate_strmatch): Fix
	error/warning messages in RASQAL_REGEX_{PCRE,NONE} configurations.

2008-01-07  Dave Beckett <dave@dajobe.org>

	* src/rdql_parser.y, src/sparql_parser.y: rdql and sparql warnings
	do not fail the query

	* src/rasqal_engine.c, src/rasqal_expr.c, src/rasqal_general.c,
	src/rasqal_result_formats.c, src/rasqal_sparql_xml.c,
	src/rdql_parser.y, src/sparql_parser.y: Set query failed flag when
	calling new log error functions

	* src/rdql_parser.y, src/sparql_parser.y: (rdql_query_error,
	sparql_query_error): Set failed flag on query

	* src/rasqal_general.c: (rasqal_new_world): Init error handlers
	magic here

	* src/rasqal_query.c: (rasqal_new_query2): Set query->world

	* src/rasqal_engine.c, src/rasqal_expr.c, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_raptor.c,
	src/rasqal_result_formats.c, src/rasqal_sparql_xml.c,
	src/rdql_lexer.l, src/rdql_parser.y, src/sparql_lexer.l,
	src/sparql_parser.y: Replace calls to
	rasqal_query_warning/error/fatal using rasqal_query with
	rasqal_log_error_simple or rasqal_log_error_varargs and
	rasqal_world

	* src/rasqal_internal.h: Fix RASQAL_PRINTF_FORMAT use for
	rasqal_log_error_simple

	* src/rasqal_general.c: (rasqal_log_error_simple,
	rasqal_log_error_varargs, rasqal_log_error): Added, using error
	handlers inside rasqal_world*
	(rasqal_query_simple_error): Added for query errors from
	namespaces API.
	(rasqal_query_fatal_error, rasqal_query_fatal_error_varargs,
	rasqal_query_error, rasqal_query_simple_error,
	rasqal_query_error_varargs, rasqal_query_warning,
	rasqal_query_warning_varargs): Removed.

	* src/rasqal_internal.h: rasqal_query gains a rasqal_world field
	and loses fatal/error/warning user data and handlers.
	Added methods of rasqal_world: rasqal_log_error_simple,
	rasqal_log_error_varargs, rasqal_log_error,
	rasqal_query_simple_error.
	Removed rasqal_query_fatal_error,
	rasqal_query_fatal_error_varargs, rasqal_query_error,
	rasqal_query_simple_error, rasqal_query_error_varargs,
	rasqal_query_warning, rasqal_query_warning_varargs.
	rasqal_world gains error_handlers field.

	* src/rasqal_general.c, src/rasqal_query.c, src/rdql_parser.y,
	src/sparql_parser.y: (sparql_parse, rdql_parse,
	rasqal_query_execute): Remove calls to unused query factory method
	execute.  (rasqal_sparql_query_engine_execute,
	rasqal_rdql_query_engine_execute): Removed

2008-01-07  Lauri Aalto <laalto@iki.fi>

	* tests/engine/rasqal_graph_test.c: Fixed eol style in
	rasqal_graph_test.c
	
2008-01-07  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h: struct rasqal_query_engine_factory_s
	remove execute() factory method

2008-01-07  Lauri Aalto <laalto@iki.fi>

	* utils/roqet.c, utils/srxread.c: Update utils to non-deprecated APIs.

	* src/rasqal_limit_test.c, src/rasqal_query_test.c,
	src/rasqal_xsd_datatypes.c, src/rdql_lexer.l, src/rdql_parser.y,
	src/sparql_lexer.l, src/sparql_parser.y,
	tests/engine/rasqal_graph_test.c,
	tests/engine/rasqal_order_test.c: Update tests to non-deprecated
	APIs.

	* src/rasqal.h, src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_query.c, src/rdql_parser.y, src/sparql_parser.y: First
	increment on moving rasqal static data to behind a world object
	like librdf: move query_engines to rasqal_world.  Preserve old
	library API but deprecate functions where a world object would be
	needed and provide a new function. Deprecated functions provide
	backwards compatibility with a static rasqal_world variable that
	can be flagged out at compile time with NO_STATIC_DATA.
	(rasqal_init, rasqal_finish): Deprecated, use rasqal_new_world()
	and rasqal_free_world().
	(rasqal_languages_enumerate, rasqal_language_name_check,
	rasqal_new_query): Deprecated, use the the *2 versions with a
	world object instead.
	(rasqal_init_query_engine_*, rasqal_query_engine_register_factory,
	rasqal_get_query_engine_factory): Internal functions to take in
	rasqal_world parameter.

	* src/rasqal_engine.c,
	src/rasqal_rowsource.c: (rasqal_engine_make_rowsource,
	rasqal_new_rowsource_from_handler): Re-engineer fix from
	r13534. Make rasqal_new_rowsource_from_handler() to take ownership
	of the passed in context in all cases. Set rowsource->user_data
	and rowsource->handler earlier as they are needed by
	rasqal_free_rowsource().

	* src/rasqal_engine.c: (rasqal_engine_make_rowsource): Lowmem leak
	fix. Free rasqal_rowsource_engine_context if
	rasqal_new_rowsource_from_handler() fails.

	* src/rasqal_query_results.c:
	(rasqal_query_results_set_variables(rasqal_query_results): Set
	query_results->size late to ensure it is not larger than the
	number of valid pointers in the arrays. Use calloc and not malloc
	for pointer arrays.

	* src/rasqal_query_results.c: (rasqal_query_results_set_variables):
	Fix low-memory crashes by keeping query_results variables and
	variable_names in sync with results size.

	* src/rasqal_query_results.c: (rasqal_query_results_set_variables):
	Do not leak old variables_sequence.

	* src/rasqal_query.c: (rasqal_query_execute): Cleaned up commented
	out code.

2008-01-05  Dave Beckett <dave@dajobe.org>

	* src/rasqal_result_formats.c:
	(rasqal_query_results_formatter_read): error path

	* src/rasqal_rowsource.c: code style

	* src/rasqal_sparql_xml.c: Code style

	* src/rasqal_general.c: 2008

	* src/rasqal_query_results.c: (rasqal_free_query_results): Free
	variables_sequence 

	* src/rasqal_sparql_xml.c: (rasqal_rowsource_sparql_xml_finish):
	Free any base_uri given.

	* Last known good revision 13398: 'make check' succeeds.

2008-01-05  Dave Beckett <dave@dajobe.org>

	* src/Makefile.am, src/rasqal_result_format_sparql_xml.c,
	src/rasqal_sparql_xml.c: Filename too long. mv
	rasqal_result_format_sparql_xml.c rasqal_sparql_xml.c

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_update):
	Pass in results, it's not a field of row anymore.
	(rasqal_engine_query_result_row_compare): Use
	rasqal_rowsource_get_query to get query from a row's rowsource.
	Added rowsource for execute and save method with context
	rasqal_rowsource_engine_context
	(rasqal_rowsource_engine_init, rasqal_rowsource_engine_finish,
	rasqal_rowsource_engine_ensure_variables,
	rasqal_rowsource_engine_read_row,
	rasqal_rowsource_engine_read_all_rows,
	rasqal_rowsource_engine_get_query): Added as rowsource handlers
	for execute and save method.
	(rasqal_rowsource_engine_process): Added as helper for above.
	(rasqal_engine_make_rowsource): Added to construct the rowsource
	for the execute and save method
	(rasqal_engine_execute_and_save): Cut down into all the rowsource
	functions above.  The rowsource is made here and destroyed here.
	(rasqal_engine_excute_next_lazy): Call
	rasqal_new_query_result_row() wrongly with NULL in order to just
	get it compiling.  Added an abort() to ensure nobody ever calls
	this.  Since lazy execution is disabled for now, this should not
	happen.  Added FIXME note.

	* src/rasqal_result_format_sparql_xml.c: Rename internal
	functions/structs from *xml_result4* to *sparql_xml*
	rasqal_rowsource_sparql_xml_context gains rowsource and
	variables_count fields, loses results and variables_sequence.
	(rasqal_sparql_xml_sax2_start_element_handler): Remove
	variables_sequence code.  Use rasqal_rowsource_add_variable to add
	a variable.  Use rasqal_rowsource_get_variable_offset_by_name to
	lookup variable names.
	(rasqal_sparql_xml_sax2_end_element_handler): Initialise
	variables_count and indicate header is done at end of 'head'
	element.
	(rasqal_rowsource_sparql_xml_init): Init rowsource.
	(rasqal_rowsource_sparql_xml_finish): Delete variables_sequence
	free.
	(rasqal_rowsource_sparql_xml_process): Added, pulled from old
	rasqal_rowsource_xml_result4_read_row to update needed data.
	(rasqal_rowsource_sparql_xml_ensure_variables): Added to ensure
	variables are found via rasqal_rowsource_sparql_xml_process.
	(rasqal_rowsource_sparql_xml_read_row): Use
	rasqal_rowsource_sparql_xml_process to get rows.

	* src/rasqal_query_results.c: (rasqal_new_query_results): Update
	rasqal_query_results_set_variables call with 0 order_size.
	(rasqal_free_query_results): Free rowsource with
	rasqal_free_rowsource.
	(rasqal_new_query_result_row): Take rowsource arg and delegate all
	size stuff to rowsource.  Use rasqal_rowsource_get_sizes to get
	the sizes.
	(rasqal_query_results_set_variables): Add order_size arg.  Do a
	true copy of the incoming variables.
	(rasqal_query_result_row_print): Use rowsource to get row info.

	* src/rasqal_query.c: (rasqal_query_execute): Remove old commented
	out hack and use rasqal_query_results_set_variables with
	order_size.

	* src/rasqal_internal.h: rasqal_query_row gains rowsource field
	replacing results.
	rasqal_query_results gains rowsource field.
	rasqal_rowsource_ensure_variables_func renamed from
	rasqal_rowsource_update_variables_func and no longer takes results
	arg.
	Added handlers rasqal_rowsource_read_all_rows_func and
	rasqal_rowsource_get_query_func
	rasqal_rowsource_handler gains handlers for read_all_rows and
	get_query. update_variables handler is renamed ensure_variables.
	Moved struct rasqal_rowsource_s from rasqal_rowsource.c to here.
	Updated rasqal_new_rowsource_from_handler to take flag arg and
	defined one flag RASQAL_ROWSOURCE_FLAGS_ORDERING.
	Added prototypes for rasqal_rowsource_read_all_rows,
	rasqal_rowsource_get_query, rasqal_rowsource_add_variable,
	rasqal_rowsource_get_sizes, rasqal_rowsource_get_variable_by_offset and
	rasqal_rowsource_get_variable_offset_by_name
	Adjust rasqal_new_query_result_row prototype to now take a rowsource arg
	Adjust rasqal_query_results_set_variables to now take an order_size
	arg too.

	* src/rasqal_rowsource.c: Moved struct rasqal_rowsource_s back
	into rasqal_internal.h
	(rasqal_new_rowsource_from_handler): Added flags arg to allow
	maintaining an extra of row of values in a
	rasqal_query_results_row, of size order_size.
	(rasqal_rowsource_add_variable): Added for adding a variable to
	the sequence and maintaining the counts for row width and order
	values row width.
	(rasqal_rowsource_update_variables): Rename to use
	ensure_variables factory name.  Call
	rasqal_query_results_set_variables here.
	(rasqal_rowsource_read_row): field ended is now called finished.
	(rasqal_rowsource_read_all_rows): Added to get a sequence from the
	results either via a factory method, or building it here.
	(rasqal_rowsource_get_query): Added, to return the query
	associated if any.
	(rasqal_rowsource_get_sizes): Added, to return the row width and
	order values row width.
	(rasqal_rowsource_get_variable_by_offset): Added, to return a
	variable in the sequence.
	(rasqal_rowsource_get_variable_offset_by_name): Added to lookup a
	variable by name.

	* src/rasqal_expr.c: (rasqal_new_variable_from_variable): Added.
	(rasqal_new_expression_from_expression): Return NULL if asked to
	copy NULL.

	* src/rasqal.h: Added rasqal_new_variable_from_variable

2008-01-04  Dave Beckett <dave@dajobe.org>

	* src/rasqal_result_formats.c: (rasqal_query_results_formatter_read):
	Call rasqal_rowsource_update_variables with results arg.

	* src/rasqal_internal.h: rasqal_rowsource_update_variables_func
	gains results arg rasqal_rowsource_update_variables gains results
	arg.

	* utils/srxread.c: Removed everything except main code.
	(main): Rewrite in terms of formatter and use
	rasqal_query_results_formatter_read to fill in results.

	* src/rasqal_rowsource.c: (rasqal_new_rowsource_from_handler):
	Check handler not rowsource->handler

	* src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_result_format_sparql_xml.c,
	src/rasqal_result_formats.c: Move SPARQL XML functions from
	rasqal_result_formats.c to rasqal_result_format_sparql_xml.c.  Add
	rasqal_result_format_sparql_xml.c to library

	* utils/srxread.c:: copy src/rasqal_result_format_sparql_xml.c to
	utils/srxread.c

	* src/rasqal_result_format_sparql_xml.c: Move utils/srxread.c to
	src/rasqal_result_format_sparql_xml.c

	* src/rasqal_result_formats.c:
	(rasqal_query_results_format_register_factory): Add get_rowsource
	arg.
	(rasqal_init_result_formats): Init rowsource for sparql xml
	reader, remove reader for same.
	(rasqal_rowsource_xml_result4_init,
	rasqal_rowsource_xml_result4_finish,
	rasqal_rowsource_xml_result4_update_variables,
	rasqal_rowsource_xml_result4_read_row): Skeleton functions added.
	struct rasqal_rowsource_xml_result4_handler added.
	(rasqal_query_results_getrowsource_xml_result4): Added.
	(rasqal_query_results_read_xml_result4): Removed.
	(rasqal_query_results_formatter_read): Use get_rowsource factory
	method if the reader method is missing.

	* src/Makefile.am: Add rasqal_rowsource.c

	* src/rasqal_rowsource.c: Add rasqal_rowsource.c

	* utils/srxread.c: rewrite in style of rowsource handler
	functions.  srxread_userdata becomes
	rasqal_rowsource_xml_result4_context ud becomes con
	(init_ud): Added
	(rasqal_rowsource_xml_result4_read_row): Renamed from get_row_ud
	(rasqal_rowsource_xml_result4_finish): Renamed from free_ud

	* src/rasqal_internal.h: Added rasqal_rowsource typedef and
	handler typedefs: rasqal_rowsource_init_func,
	rasqal_rowsource_finish_func,
	rasqal_rowsource_update_variables_func,
	rasqal_rowsource_read_row_func,.  Added rasqal_rowsource_handler
	typedef.  Added rasqal_new_rowsource_from_handler,
	rasqal_free_rowsource, rasqal_rowsource_update_variables,
	rasqal_rowsource_read_row, rasqal_rowsource_get_rows_count Added
	rasqal_query_results_get_rowsource_func handler for results
	formatter.  rasqal_query_results_format_factory gains
	get_rowsource field.

	* src/rasqal_query_results.c:
	(rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name,
	rasqal_query_results_get_boolean): Remove unused var query

	* utils/srxread.c: Use rasqal_query_result_row_set_value_at

	* src/rasqal_internal.h,
	src/rasqal_query_results.c: (rasqal_query_result_row_set_value_at):
	Added

2008-01-03  Dave Beckett <dave@dajobe.org>

	* utils/srxread.c: Use raptor_qname_get_counted_value

	* utils/srxread.c: Document and re-order ud fields.
	Removed variables_count - can be done by counting sequence.

	* utils/srxread.c: Switch from init/parse/free ud to create/get
	row/free ud
	(create_ud): Renamed from init_ud.  Allocate ud
	(get_row_ud): Renamed from parse_ud: Store rows in temporary array
	during one SAX2 parse / callback sequence and return first one to
	caller.
	(free_ud): Free ud
	(main): Use get_row_ud to get rows and store in results.

	* utils/srxread.c: Set variables as soon as possible - at end of
	head element.  Save rows to internal sequence then move after
	returning from sax2 parse.

	* src/rasqal_internal.h,
	src/rasqal_query_results.c: (rasqal_query_results_add_row): Added

	* utils/srxread.c: (init_ud): returns status, remove sax2 local var
	(parse_ud): remove printf.
	(main): Handle init_ud failure

	* utils/srxread.c: (main): use rasqal_query_results_get_bindings_count

	* utils/srxread.c: pull userdata code from main() into init_ud(),
	parse_ud() and free_ud()

	* utils/srxread.c: Use rasqal_new_string_literal_node to prevent
	formation of native types. Push rows correctly

	* src/rasqal_literal.c: (rasqal_new_string_literal_common): static

	* src/rasqal_engine.c: (rasqal_engine_check_limit_offset,
	rasqal_engine_bind_construct_variables): Handle NULL query

	* src/rasqal_literal.c: (rasqal_new_string_literal_common): Added,
	pulled out of rasqal_new_string_literal with extra flags arg to
	avoid native type promotion.
	(rasqal_new_string_literal): Use rasqal_new_string_literal_common
	with native type promotion
	(rasqal_new_string_literal_node): Added, using
	rasqal_new_string_literal_common without native type promotion.

	* src/rasqal_internal.h: Added rasqal_new_string_literal_node prototype

2008-01-03  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c: (rasqal_query_execute): Commented out unused
	variable.

	* src/rasqal_query_results.c: (rasqal_query_results_get_binding_name):
	Fix low-memory crash: check for NULL variables array. Removed
	unnecessary local variable.

	* src/rasqal_query.c: (rasqal_query_execute): Commented out unused
	& leaked variables_sequence copy.

	* src/rasqal_query_results.c: (rasqal_query_results_set_variables):
	Do not change query_results type -
	rasqal_query_results_set_variables() is called from
	rasqal_query_execute() for all types of queries.

	* src/rasqal_query.c: (rasqal_query_execute): Added FIXME note for
	a memory leak.

	* src/rasqal_query_results.c: (rasqal_free_query_results,
	rasqal_query_results_set_variables): Do not leak
	query_results->variables, query_results->variable_names

	* src/rasqal_query_results.c: (rasqal_free_query_results): Fix
	double deletion - variables_sequence is owned by query not
	query_results.

2008-01-03  Dave Beckett <dave@dajobe.org>

	* utils/srxread.c: Update to set variables with no values and use
	query results formatter to emit results.

	* src/rasqal_query.c: (rasqal_query_execute): Update call to
	rasqal_query_results_set_variables with a new sequence of
	variables, not names.  It shares variables with rasqal_query for
	now - this is a HACK and needs fixing.

	* src/rasqal_query_results.c: (rasqal_new_query_results): Use
	rasqal_query_results_set_variables when setting bindings.
	(rasqal_free_query_results): Free variables_sequence
	(rasqal_query_results_get_count): Handle NULL query
	(rasqal_query_results_get_bindings): No need for query here, get
	variable_names from results.
	(rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_name): Get variables size from
	query_results size.
	(rasqal_query_results_get_binding_value_by_name): Get variables from
	query_results variables[]
	(rasqal_query_results_set_variables): Just get a variables_sequence,
	everything else can be computed from it.
	(rasqal_query_result_row_print): Get variable_names from query_results.

	* src/rasqal_internal.h: struct rasqal_query_results_s  gains
	fields: variables_sequence, variables just like rasqal_query_s

	* src/rasqal_expr.c: (rasqal_new_variable_typed): Work when query
	is NULL.

2008-01-02  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c: (rasqal_new_query_results): Init
	query results type
	(rasqal_query_results_is_bindings,
	rasqal_query_results_is_boolean, rasqal_query_results_is_graph,
	rasqal_query_results_is_syntax): Use query results type.

	* src/rasqal_internal.h: Added rasqal_query_results_type enum
	rasqal_query_results_s gains type field

	* utils/srxread.c: Replace FILE* to with read raptor_iostream

	* utils/srxread.c: Conditional-compile tracing with RASQAL_DEBUG > 2

	* docs/rasqal-sections.txt: remove
	rasqal_query_results_formats_enumerate_full

	* src/rasqal_result_formats.c: compile

	* utils/roqet.c: Update for rasqal_query_results_formats_enumerate
	taking mime_type and flags pointer args.

	* src/rasqal_result_formats.c:
	(rasqal_query_results_format_register_factory): Add reader arg.
	(rasqal_init_result_formats): Register readers, only
	rasqal_query_results_read_xml_result4 for "xml" name.
	(rasqal_query_results_read_xml_result4): Added.
	(rasqal_query_results_formats_enumerate_full): Removed
	(rasqal_query_results_formats_enumerate): Added two args - mime_type
	and flags.  Was rasqal_query_results_formats_enumerate_full with just
	mime_type.  Set flags if pointer is not null.
	(rasqal_query_results_read_xml_result4): Added, doing no work.
	(rasqal_query_results_formatter_write): Added, moved from
	rasqal_query_results.c
	(rasqal_query_results_formatter_read): Added.

	* src/rasqal_query_results.c: (rasqal_query_results_formatter_write):
	Moved to rasqal_result_formats.c
	(rasqal_query_results_read): Added

	* src/rasqal_internal.h: Renamed rasqal_query_results_writer
	typedef to rasqal_query_results_formatter_func
	rasqal_query_results_format_factory gains reader field.

	* src/rasqal.h: Added rasqal_query_results_read.  Removed
	rasqal_query_results_formats_enumerate_full and added two args to
	rasqal_query_results_formats_enumerate: mime_type and flags.
	Added rasqal_query_results_formatter_read

2008-01-02  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c: (rasqal_query_execute) Low-memory fixes. Set
	query_results->executed flag earlier to enable cleanup with
	rasqal_free_query_results(). Check for variable_names sequence
	alloc failure. Pass ownership of variable_names sequence to
	query_results earlier to clean it up with
	rasqal_free_query_results() on error.

	* src/rasqal_query.c: (rasqal_query_execute) Check for var_name
	alloc failures.