1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066
|
2014-03-24 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.7.
* configure.ac: Version bumped to 1.7.
* FSD (Version): Updated to 1.7.
2014-03-22 Jose E. Marchesi <jose.marchesi@oracle.com>
* configure.ac: fix non-portable test construct.
2014-03-21 Jose E. Marchesi <jose.marchesi@oracle.com>
rec-mode: fix a call to string-match-p with invalid arguments.
* etc/rec-mode.el (rec-check-type): fix a call to string-match-p.
2014-03-21 Jose E. Marchesi <jose.marchesi@oracle.com>
rec-mode: several fixes while removing byte-compilation warnings.
* etc/rec-mode.el (require): Require cl only at compile time.
(rec-record-assoc): Use mapc instead of mapcar.
(rec-field-type): Likewise.
(rec-record-names): Likewise.
(rec-cmd-edit-field): Likewise.
(rec-update-buffer-descriptors): Likewise.
(rec-goto-type): Likewise.
(rec-cmd-statistic): Likewise.
(rec-mode): Defvar all buffer-local variables.
(rec-cmd-edit-field): Likewise.
(rec-cmd-show-info): Make it work when the buffer is not
associated with a file on disk.
(rec-cmd-compile): Use insert-buffer-substring instead of
insert-buffer.
(rec-cmd-show-info): Likewise.
(rec-update-buffer-descriptors-and-check): Use with-current-buffer
instead of save-excursion+set-buffer.
(rec-idle-scheduler-mode): Use called-interactively-p instead of
interactive-p.
(rec-parse-type): Use string-to-number instead of string-to-int.
(rec-check-type): Likewise.
Rec-idle related functions removed.
2014-03-20 Jose E. Marchesi <jemarch@gnu.org>
* utils/recutl.c (recutl_print_version): Update copyright year.
2014-03-19 Jose E. Marchesi <jemarch@gnu.org>
* NEWS: Added entry for 1.6.90 listing changes since 1.6.
* configure.ac: Version bumped to 1.6.90.
2014-03-19 Jose E. Marchesi <jemarch@gnu.org>
manual: clarify how auto fields are generated.
* doc/recutils.texi (Counters): mention 'recins' instead of the
'conforming application'.
(Auto-Generated Fields): Clarify that auto fields are physically
inserted in the recfile by recins.
2014-03-19 Jose E. Marchesi <jemarch@gnu.org>
src: simplify the implementation of mandatory/unique/prohibit
integrity checking.
* src/rec-int.c (rec_int_check_record_mandatory): Rewrote to use
rec_int_collect_field_list.
(rec_int_check_record_unique): Likewise.
(rec_int_check_record_prohibit): Likewise.
2014-03-18 Jose E. Marchesi <jemarch@gnu.org>
src,torture,doc: support for the %allowed special field.
* doc/recutils.texi (Record Sets Properties): Link to the new
section Allowed Fields.
(Allowed Fields): New section.
* torture/utils/recfix.sh (allowed-ok-1): New input file.
(allowed-ok-2): Likewise.
(allowed-ok-3): Likewise.
(allowed-ok-4): Likewise.
(allowed-ok-5): Likewise.
(allowed-xfail-1): Likewise.
(allowed-xfail-2): Likewise.
(allowed-xfail-3): Likewise.
(recfix-allowed-ok-1): New test.
(recfix-allowed-ok-2): Likewise.
(recfix-allowed-ok-3): Likewise.
(recfix-allowed-ok-4): Likewise.
(recfix-allowed-ok-5): Likewise.
(recfix-allowed-xfail-1): Likewise.
(recfix-allowed-xfail-2): Likewise.
(recfix-allowed-xfail-3): Likewise.
* src/rec-int.c (rec_int_check_record_allowed): New function.
(rec_int_collect_field_list): Likewise.
(rec_int_check_descriptor): Support %allowed.
(rec_int_check_record): Call rec_int_check_record_allowed.
* src/rec-field-name.c (fnames): added entry for %allowed.
2014-03-18 Jose E. Marchesi <jemarch@gnu.org>
src,doc: allow merging anonymous records coming from several files
in a single record set.
* doc/recutils.texi (Simple Selections): Document that anonymous
records from several files will be merged.
* src/rec.h: Prototype and doc for rec_mset_elem_dup_data.
* src/rec-mset.c (rec_mset_elem_dup_data): New function.
(rec_mset_iterator_next): Update data only if it is not NULL.
* utils/recutl.c (recutl_parse_db_from_file): do not complain
about duplicated default record sets.
(recutl_parse_db_from_file): append anonymous records to the
anonymous rset of the database if it exists.
2014-03-17 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Simple Selections): Improve the readability
of side-to-side example sections.
2014-03-06 Jose E. Marchesi <jose.marchesi@oracle.com>
rec-mode: fix selection commands when there are more than one
record sets on the recfile.
* etc/rec-mode.el (rec-cmd-select-fast): Use the current record
set.
(rec-cmd-select-sex): Likewise.
2014-03-02 Jose E. Marchesi <jemarch@gnu.org>
src: do not abort with an error when decrypting partially
encrypted records.
* src/rec-crypt.c (rec_decrypt_record): Stop decrypting fields in
case of an error.
(rec_encrypt_field): Return true in case a field is not encrypted.
2014-02-25 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi: all @w and @kbd macros used to denote command
line options removed.
2014-02-24 Jose E. Marchesi <jemarch@gnu.org>
src: an ignored tab can also separate field names from field
values.
* src/rec-parser.c (rec_parse_field_name): tabs also finish field
names.
* torture/utils/recsel.sh (ignored-first-blanks): New input file.
(recsel-ignored-first-blanks): New test.
2014-02-24 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi: Many English changes in the manual. Patch by
Karl Berry.
(Selecting by Type): use LastRelease instead of URL in the
gnu.rec example.
2014-02-24 Jose E. Marchesi <jemarch@gnu.org>
* src/Makefile.am (librec_la_LDFLAGS): Bump current version to 1.
2014-02-19 Jose E. Marchesi <jemarch@gnu.org>
bash: fix librec linking issue.
* bash/Makefile.am (readrec_la_LIBADD): Link with the built librec.
(testrec_la_LIBADD): Likewise.
2014-02-19 Jose E. Marchesi <jemarch@gnu.org>
src,utils,manual,torture: new writer option to omit comments when
outputting rsets and comments. recsel now uses this option to
avoid emitting record fields.
* torture/rec-writer/rec-write-record.c
(rec_write_record_skip_comments): New test.
* src/rec-writer.c (rec_write_record): Do not write out comments
in records if the writer was configured to skip them.
(rec_write_rset): Likewise.
* utils/recsel.c (recsel_process_data): Configure the writer to
skip comments.
* torture/utils/recsel.sh (record-with-comments): New input file.
(recsel-record-with-comments): New test.
* torture/rec-writer/rec-write-comment.c (rec_write_comment_sexp):
Adapted to new writer api.
(rec_write_comment_nominal): Likewise.
* torture/rec-writer/rec-write-record.c
(rec_write_record_nominal): Likewise.
(rec_write_record_sexp): Likewise.
(rec_write_record_values): Likewise.
(rec_write_record_values_row): Likewise.
* torture/rec-writer/rec-write-field-name.c
(rec_write_field_name_nominal): Likewise.
(rec_write_field_name_sexp): Likewise.
* torture/rec-writer/rec-write-field.c (rec_write_field_nominal):
Likewise.
(rec_write_field_values): Likewise.
(rec_write_field_values_row): Likewise.
(rec_write_field_sexp): Likewise.
* torture/rec-writer/rec-write-rset.c (rec_write_rset_nominal):
Likewise.
* utils/recinf.c (print_info_file): Use the new interface for
setting a writer's mode.
* bash/readrec.c (readrec_builtin): Likewise.
* utils/recsel.c (recsel_process_data): Likewise.
* src/rec-writer.c (rec_writer_set_skip_comments): New function.
(rec_writer_set_mode): Likewise.
(rec_writer_new_common): Set default values for the
skip_comments_p and mode writer options.
(rec_write_comment): Use the writer mode attribute instead of an
extra argument to determine how to output the entity.
(rec_write_field): Likewise.
(rec_write_field_name): Likewise.
(rec_write_record): Likewise.
(rec_write_rset): Likewise.
(rec_write_field_str): Likewise.
(rec_write_field_name_str): Likewise.
(rec_write_comment_str): Likewise.
* src/rec.h: Copyright year updated.
Prototypes for rec_writer_set_skip_comments and
rec_writer_set_mode added.
* src/rec-writer.c (struct rec_writer_s): New fields
skip_comments_p and mode.
2014-02-18 Jose E. Marchesi <jemarch@gnu.org>
manual: clarify decryption using several passwords.
* doc/recutils.texi (Confidential Fields): Added a note clarifying
that it is not possible to specify several passwords in a single
invocation of recsel.
2014-02-17 Jose E. Marchesi <jemarch@gnu.org>
manual: follow the standard way in naming the utility invokation
nodes.
* doc/recutils.texi (Invoking recinf): Renamed from node recinf.
(Invoking recsel): Likewise.
(Invoking recins): Likewise.
(Invoking recdel): Likewise.
(Invoking recset): Likewise.
(Invoking recfix): Likewise.
(Invoking recfmt): Likewise.
(Invoking csv2rec): Likewise.
(Invoking rec2csv): Likewise.
(Invoking mdb2rec): Likewise.
"Fast" access links in the "Individual utilities" dircategory
fixed to point to the nodes renamed above.
(Documenting Records): Xref fixed.
(Sorted Output): Likewise.
(Deleting Records): Likewise.
(Editing Fields): Likewise.
(CSV Files): Likewise.
2014-02-17 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Scalar Field Types): Improve misleading
example.
* doc/recutils.texi (SEX Operands): Improve wording.
2014-02-17 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-types.c (rec_type_parse_enum): Code typo fixed.
Reported by David Binderman.
2014-02-05 Jose E. Marchesi <jemarch@gnu.org>
utils: avoid segfaults in several utilities when reading invalid
rec data.
* utils/rec2csv.c (main): Avoid a segmentation fault when a file
containing invalid data is fetched to rec2csv.
* utils/recfmt.c (main): Likewise for recfmt.
2014-01-02 Jose E. Marchesi <jemarch@gnu.org>
doc: document the -d|--delim command line argument for rec2csv.
* doc/recutils.texi (rec2csv): Document -d|--delim.
2014-01-02 Jose E. Marchesi <jemarch@gnu.org>
utils: add support for arbitrary delimiter characters in rec2csv.
Patch provided by Sebastian Fischmeister.
* utils/rec2csv.c: New global variable rec2csv_delim.
(recutl_print_help): Documentation of -d.
(rec2csv_parse_args): Process the new -d|--delim command line
argument.
(rec2csv_generate_csv): Likewise.
2014-01-02 Jose E. Marchesi <jemarch@gnu.org>
Do not maintain local copies of .po files which are available in
the translation project.
* po/fr.po: file removed.
* po/sr.po: Likewise.
* po/uk.po: Likewise.
* po/vi.po: Likewise.
2012-12-04 Julio C. M. Ramirez <rikijpn@member.fsf.org>
* etc/rec-mode.el: adding numeric prefix to next/previous
records commands for recmode on emacs.
* doc/rec-mode.texi: adding mention for feature above.
2013-11-04 Jose E. Marchesi <jemarch@gnu.org>
* .gitignore: Updated with the files generated when building the
rec-mode manual.
2013-11-03 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.6.
* configure.ac: Version number bumped to 1.6.
* NEWS: Updated for 1.6.
2013-11-01 Jose E. Marchesi <jemarch@gnu.org>
src,doc,torture: support single-char fields in selection
expressions.
* torture/utils/recsel.sh (single-char-field-names): New input
file.
(recsel-sex-single-char-field-names): New test.
* doc/recutils.texi (Fields): Update regexp denoting field names
to allow fields composed by just one character.
* src/rec-sex-lex.l: Allow fields composed by just one character
in selection expressions.
2013-10-29 Jose E. Marchesi <jose.marchesi@oracle.com>
* NEWS: Updated for 1.5.90.
* bash/readrec.c: Do not check for HAVE_UNISTD_H. It is always
true with the corresponding gnulib module.
* bash/testrec.c: Likewise.
* configure.ac: Version number bumped to 1.5.90.
2013-10-29 Jose E. Marchesi <jose.marchesi@oracle.com>
* doc/recutils.texi (Auto-Generated Fields): Finished.
(Counters): Written.
(Unique Identifiers): Likewise.
(Time-Stamps): Likewise.
2013-10-17 Jose E. Marchesi <jose.marchesi@oracle.com>
manual: document grouping and aggregate functions.
* doc/recutils.texi (Grouping Records): New section.
(Aggregate Functions): Likewise.
2013-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
recfmt: do not append a newline to the expansion of templates.
Reported by Aikido Guy.
* torture/utils/recfmt.sh: Adjust tests to not expect a newline
inserted between applications of a template.
* utils/recfmt.c (recfmt_process_db): Do not append a newline to
the expansion of a template.
2013-08-29 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-fast-selection): Avoid an extra useless
window when using rec-fast-selection.
2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
utils: avoid the replication of out-of-memory string literals.
* utils/csv2rec.c (field_cb): Use recutl_out_of_memory.
(record_cb): Likewise.
(record_cb): Likewise.
* utils/recsel.c (recsel_process_data): Likewise.
* utils/recins.c (recins_add_new_record): Likewise.
(recins_add_new_record): Likewise.
* utils/recfix.c (recfix_do_sort): Likewise.
(recfix_do_auto): Likewise.
* utils/recdel.c (recdel_delete_records): Likewise.
* utils/rec2csv.c (rec2csv_generate_csv): Likewise.
(rec2csv_generate_csv): Likewise.
(rec2csv_process_data): Likewise.
* utils/mdb2rec.c (process_table): Likewise.
(process_mdb): Likewise.
* utils/recutl.c (recutl_out_of_memory): New function.
2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for the readrec bash built-in.
* doc/recutils.texi (Bash Builtins): Written.
(readrec): Written.
2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
src: remove hard limit on the number of types registered in a
types registry.
* src/rec-types.c (REC_TYPE_REG_ALLOC_TYPES): New constant.
(rec_type_reg_destroy): Free the dynamically allocated list of
types.
(rec_type_reg_new): Initialize new->types to NULL.
(rec_type_reg_add): Adjusted to new semantics.
(rec_type_reg_add_synonym): Likewise.
2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
src: remove hard limit on the number of literals in enum types.
* src/rec-types.c (REC_ENUM_NAMES): Removed.
(REC_ENUM_ALLOC_NAMES): Created.
(rec_type_new): Initialize the size of the type to 0.
(rec_type_parse_enum): Allocate memory for the enumeration names
in chunks.
(rec_type_equal_p): Adjusted to new semantics.
(rec_type_check_enum): Likewise.
2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
csv2rec: remove hard limit on the number of fields in the input
csv file.
* utils/csv2rec.c (MAX_FIELDS): Removed.
(process_csv): Initialize ctx.field_names to NULL.
(field_cb): Re-allocate memory for fields when needed, in blocks
with size ALLOC_FIELDS.
2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
* bash/readrec.c (readrec_builtin): Define variables after fields
in the read records.
2013-08-24 Jose E. Marchesi <jemarch@gnu.org>
* bash/Makefile.am (testrec_la_LDFLAGS): Define.
(testrec_la_LIBADD): Likewise.
(testrec_la_SOURCES): Likewise.
* bash/testrec.c: New file.
(testrec_builtin): New function.
2013-08-24 Jose E. Marchesi <jemarch@gnu.org>
manual: empty stub sections for the bash bulitins.
* doc/recutils.texi (Bash Builtins): New stub chapter.
(readrec): Likewise.
(testrec): Likewise.
2013-08-24 Jose E. Marchesi <jemarch@gnu.org>
bash: readrec builtin.
* Makefile.am (SUBDIRS): Recurse to the bash/ subdirectory.
* configure.ac: Handle --enable-bash-builtins and detection of
bash headers.
Handle --with-bash-headers.
* bash/Makefile.am: New file.
* bash/readrec.c: New file.
(readrec_builtin): New function.
2013-08-21 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Replacing Records With recins): New section.
2013-08-16 Jose E. Marchesi <jemarch@gnu.org>
src: optimize the sex evaluator.
* src/rec-sex.c (rec_sex_eval): Optimize the evaluator, avoiding
discarding the same field twice.
2013-08-16 Jose E. Marchesi <jemarch@gnu.org>
src: support for field marks in records.
* src/rec-record.c (rec_record_reset_marks): New function.
(rec_record_mark_field): Likewise.
(rec_record_field_mark): Likewise.
* src/rec-field.c (struct rec_field_s): New attribute 'mark' for
fields.
(rec_field_dup): Field mark.
(rec_field_set_mark): New function.
(rec_field_mark): Likewise.
* src/rec.h: Prototypes for the new field marks related functions.
2013-08-15 Giuseppe Scrivano <gscrivan@redhat.com>
* src/rec-aggregate.c (rec_aggregate_std_count): Fix formatting string.
(rec_aggregate_std_avg): Likewise.
(REC_AGGREGATE_ACCUM_FUNC): Likewise.
* src/rec-fex.c (rec_fex_parse_str_simple): Wrap assignment in if
statement in parentheses.
* src/rec-sex-lex.l (top): Specify options header-file, noinput and
nounput.
(rec_sex_lex_extract_subname): Remove unused variable `res'.
* src/rec-sex-tab.y: Include "rec-sex-lex.h".
* src/rec-sex-ast.c (rec_sex_ast_print_node): Use name[0] to access the
name.
* src/rec-sex-parser.c: Include "rec-sex-lex.h" and "rec-sex-tab.h".
* src/rec-sex-lex.l: Generate the header file "rec-sex-lex.h".
* src/rec-int.c (rec_int_check_field_type): Removed unused variable
`field_name'.
* src/rec-db.c (rec_db_query): Removed unused variable `selected'.
(rec_db_query): Removed unused variable `n_rset'.
Remove declaration for the static function `rec_db_set_act_setadd'.
* src/rec-rset.c (rec_rset_record_compare_fn): Removed unused variables
`field1' and `field2'.
(rec_rset_update_field_props): Removed unused variable `type_name'.
* src/rec-mset.c (rec_mset_elem_init): Remove unused function.
2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
src: optimize the evaluation of sex expressions, avoiding
permutations on fields not appearing in the expression.
* src/rec-sex-ast.c (rec_sex_ast_name_p_1): New function.
(rec_sex_ast_name_p): Likewise.
* src/rec-sex.c (rec_sex_eval): Do not permute on fields not
featured on the selection expression.
2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
src,torture,doc: support the usage of MIN and MAX keywords in
range types.
* doc/recutils.texi (Scalar Field Types): Document the MIN and MAX
keywords in range specifications.
* torture/utils/recfix.sh (range_min_ok): New test.
(range_min_invalid): Likewise.
(range_max_ok): Likewise.
(range_max_invalid): Likewise.
(range_minmax_ok): Likewise.
(range_minmax_invalid): Likewise.
* src/rec-types.c (rec_type_parse_range): Support MIN and MAX
keywords in range definitions.
(rec_type_parse_range_point): New function.
Include limits.h.
* src/rec-utils.c (rec_parse_int): update 'ret' only if hte
parsing was successful.
(rec_parse_regexp): Likewise.
* src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Allow MIN and MAX
literals as well as numeric literals.
(REC_TYPE_RANGE_MINMAX_RE): New constant.
(REC_TYPE_DESCR_RE): Duplicate check for REC_TYPE_RANGE_DESCR_RE
removed.
2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Inserting Records): basic operation of recins
documented.
2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
* utils/recins.c (recutl_print_help): typo fixed in help string:
-R must be -r.
2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
maint: syntax-check fixes.
* etc/rec-mode.el (rec-summary-rec-buffer): Trailing blanks
removed from line.
* AUTHORS (John Darrington): Likewise.
* .gitignore: Newline added at EOF to keep syntax-check happy.
* etc/rec-mode.el (rec-mode): Typo in comment fixed.
2013-07-29 Michał Masłowski <mtjm@mtjm.eu>
src: fix memory leak.
* src/rec-rset.c (struct rec_rset_fprops_s): Remove const from
fname, since it can be dynamically allocated.
(rec_rset_destroy): Free fname.
(rec_rset_update_field_props): Destroy the temporary fex.
2013-06-23 Jose E. Marchesi <jemarch@gnu.org>
src,doc,torture: fix the insertion of anonymous records in dbs.
* doc/recutils.texi (Inserting Anonymous Records): New section.
* torture/utils/recins.sh (marks): New input file.
* src/rec-db.c (rec_db_get_rset): The position cant be zero
since size_t is unsigned so don't check for it.
(rec_db_insert_rset): Likewise.
(rec_db_remove_rset): Likewise.
(rec_db_insert): Fix the index of the default rset.
2013-06-23 Jose E. Marchesi <jemarch@gnu.org>
src,doc,elisp: remove support for hyphens in field names.
* torture/utils/recfix.sh (recfix-hyphens-in-field-names): new
test.
* src/rec.h (REC_FNAME_RE): Don't allow hyphens in field names.
* src/rec-parser.c (rec_parse_field_name): Likewise.
* doc/recutils.texi (Fields): Likewise.
(Declaring Types): Likewise.
* etc/rec-mode.el (rec-field-name-re): Likewise.
(rec-font-lock-keywords): Likewise.
(rec-parse-type): Likewise.
(rec-check-type): Likewise.
(rec-field-type): Likewise.
2013-05-22 Jose E. Marchesi <jemarch@gnu.org>
utils: interactively ask for a password twice to avoid loosing
data because of typing errors.
* utils/recins.c (recins_add_new_record): Use recutl_getpass.
* utils/recsel.c (recsel_process_data): Likewise.
* utils/recfix.c (recfix_parse_args): Likewise.
* utils/recutl.c (recutl_getpass): New function.
2013-05-22 Jose E. Marchesi <jose.marchesi@oracle.com>
* etc/ob-rec.el (org-babel-execute:rec): Add support for GroupBy.
(org-babel-execute:rec): Add support for joins.
2013-05-09 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Sorted Output): Renamed from Sorting.
(Sorting Records): New section.
(Editing Records): Intro written.
2013-03-14 Jose E. Marchesi <jemarch@gnu.org>
doc: minor improvements in the manual.
* doc/recutils.texi: Add John as an author.
(Selecting by Type): Document the -d command line option to
recsel.
2013-02-12 Jose E. Marchesi <jemarch@gnu.org>
manual: get recutils.texi compiling again.
* doc/recutils.texi (Joining Records): Empty section created.
(Foreign Keys): Likewise.
(Top): Entry in menu fixed to avoid an invalid reference.
2013-02-11 Jose E. Marchesi <jemarch@gnu.org>
manual: Field Restrictions introduction written.
* doc/recutils.texi (Field Restrictions): Introduction to the
chapter written.
2013-02-10 Michał Masłowski <mtjm@mtjm.eu>
* configure.ac: Use AC_CONFIG_HEADERS, LT_INIT and AC_CONFIG_FILES
instead of deprecated AM_CONFIG_HEADER, AC_PROG_LIBTOOL and
argument of AC_OUTPUT.
2013-02-10 Jose E. Marchesi <jemarch@gnu.org>
* doc/rec-mode.texi: Copyright updated.
* doc/recutils.texi (Random Records): Clarify how the internal
algorihtm works.
Copyright updated.
2013-02-10 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-db.c (rec_db_process_fex): Avoid a segmentation fault
when the function is called with a NULL record.
2013-02-10 Jose E. Marchesi <jemarch@gnu.org>
manual: record sets and simple selection techniques documented.
* doc/recutils.texi (Record Sets): New subsection.
(Naming Record Types): Likewise.
(The Special Fields): Likewise.
(Selecting by Position): Written.
(Random Records): Likewise.
2013-02-04 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-summary-populate): Use the first header as
the sorting criteria.
(rec-cmd-show-summary): Store the record position as the ID of the
tabular row.
(rec-summary-rec-buffer): New variable.
(rec-cmd-show-summary): Set the buffer local variable
rec-summary-rec-buffer the proper value.
2013-02-03 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-keyword-summary): New constant.
(rec-summary-fields): New function.
(rec-join-string): Likewise.
* src/rec-db.c (rec_db_process_fex): Don't loose the location
information in records processed by fexes.
2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-summary-mode): New function.
(rec-summary-mode-map): New variable.
(rec-mode-map): Map 'h' to rec-cmd-show-summary.
(rec-mode-edit-map): Map 'C-ch' to rec-cmd-show-summary.
(rec-cmd-show-summary): New function.
(rec-summary-populate): Likewise.
(rec-query): Use --print-sexps even if a fex was specified.
2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
writer: quote special characters when printing lisp strings.
* torture/utils/recsel.sh (unquoted-lisp-strings): New input file.
(recsel-unquoted-lisp-strings): New test.
* src/rec-writer.c (rec_write_field): Escape double quotes and
backslashes when writing the field values in lisp strings.
2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Checking Recfiles for Errors): format typo
fixed.
2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
src: allow duplicated fields in grouped record sets.
* src/rec-rset.c (rec_rset_merge_records): Don't remove duplicated
fields when grouping record sets.
2013-01-30 Jose E. Marchesi <jemarch@gnu.org>
* README-dev: Mention bootstrap instead of autogen.sh.
* src/Makefile.am (librec_la_LIBADD): Rename libgnu.la to
librecutils.la.
* utils/Makefile.am (COMMONLIBS): Likewise.
* configure.ac: Invoke gl_EARLY after AC_PROG_CC.
2013-01-30 Jose E. Marchesi <jemarch@gnu.org>
static gnulib removed.
* bootstrap: Imported.
* bootstrap.conf: New file.
Many files deleted.
2013-01-20 Jose E. Marchesi <jemarch@gnu.org>
manual: new sections on configuring rec-mode.
* doc/rec-mode.texi (Records appearance): Section completed.
(Finding the recutils): New section.
(Top): Detailed menu updated.
2013-01-07 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: be smart assigning letters to enumerated entries.
* etc/rec-mode.el (rec-cmd-edit-field): Assign letters to
enumerated entries in a "smart" way.
2013-01-07 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el: Copyright years updated.
2013-01-04 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-mode-version): New constant.
2012-12-26 Jose E. Marchesi <jemarch@gnu.org>
src,torture: simplify the creation of the descriptor of joined
record sets.
* torture/utils/recsel.sh (recsel-join-descriptor): New test.
* src/rec-db.c (rec_db_join): The descriptor of joined records
only features a %rec: entry.
2012-12-26 Jose E. Marchesi <jemarch@gnu.org>
src: fix the parser in order to accept lines with blanks just
after records.
* torture/utils/recfix.sh (blank-line-after-record): New input
file.
(blank-line-after-record-invalid): Likewise.
(recfix-blank-line-after-record): New test.
(recfix-blank-line-after-record-invalid): Likewise.
* src/rec-parser.c (rec_parse_record): Ignore lines composed by
only blank characters when they appear immediately after a record.
2012-12-26 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-finish-editing-field): dont hide
continuation line markers if the command was invoked from an
editing mode.
2012-12-12 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-finish-editing-field): Do the right thing
when the selected window is the only window in the frame.
2012-12-06 Jose E. Marchesi <jemarch@gnu.org>
src,torture: support several foreign keys with the same name in a
record.
* torture/utils/recsel.sh (several-foreign-keys): New input file.
(recsel-several-foreign-keys): New test.
* src/rec-db.c (rec_db_join): A record may contain more than one
foreign field.
2012-11-21 Jose E. Marchesi <jemarch@gnu.org>
manual: little fix in the introduction.
* doc/recutils.texi (Introduction): Don't enumerate the different
utilities.
2012-11-21 Jose E. Marchesi <jemarch@gnu.org>
utils: make recsel to honour --print-row and --print-values.
* torture/utils/recsel.sh (recsel-row-long): New test.
(recsel-values-long): New test.
* utils/recsel.c (recsel_parse_args): Honour --print-row and
--print-values.
2012-11-21 Julio C. M. Ramirez <rikijpn@member.fsf.org>
* doc/recutils.texi : Grammar corrections and rephrasing some
parts for easier reading.
2012-11-21 John Darrington <john@darrington.wattle.id.au>
* doc/recutils.texi: Updated so that Texinfo 4.13.90 does not
show errors.
2012-11-15 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: visiting an empty file works again.
* etc/rec-mode.el (rec-buffer-valid-p): New function.
(rec-update-buffer-descriptors-and-check): Use rec-buffer-valid-p
to determine if the buffer contains valid rec data, instead of
rec-update-buffer-descriptors.
2012-11-12 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: support for a mode hook.
* etc/rec-mode.el (rec-mode-hook): New custom.
(rec-mode): Run the hooks installed in rec-mode-hook.
2012-11-11 Jose E. Marchesi <jemarch@gnu.org>
doc: some work on the rec-mode manual.
* doc/rec-mode.texi (Opening recfiles): New section.
(Editing records and fields): Likewise.
(Edition modes): Likewise.
(Edition mode): Likewise.
(Data integrity): Likewise.
(Statistics): Likewise.
(Editing fields): Likewise.
(Searches): Likewise.
(Motion): Likewise.
(Navigation mode): Likewise.
(Field navigation and folding): Likewise.
(reccmd): New macro.
(ie): Likewise.
(Records appearance): New section.
2012-11-11 Jose E. Marchesi <jemarch@gnu.org>
utils: a NULL file name means stdout, which is always writable.
* utils/recutl.c (recutl_file_is_writable): Return true if the
file name is NULL.
2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
utils: honor file permissions when doing in-place operations.
* utils/recset.c (main): Likewise.
* utils/recins.c (main): Likewise.
* utils/recfix.c (recfix_do_sort): Likewise.
* utils/recdel.c (main): Check for the writeability of the file
before writing to it.
* utils/recutl.c (recutl_check_file_is_writable): new function.
2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
* gnulib module euidaccess imported.
2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: check for the validity of the contents of the buffers
before going to navigation mode.
* etc/rec-mode.el (rec-mode): Do not activate the rec-mode if the
contents of the buffer are not valid rec data. Show an error
message in the modeline instead.
(rec-update-buffer-descriptors-and-check): New function.
(rec-finish-editing): Warn and don't abandon edit mode if there
are errors in the rec data in the buffer.
* utils/recinf.c (main): Recognize parse errors when stdin is used
to read the rec data.
* torture/utils/recinf.sh (invalid): New input file.
(recinf-invalid): New test.
* src/rec-parser.c (rec_parse_db): Keep track of the result of
rec_parse_rset so an invalid database is properly reported.
* utils/recinf.c (print_info_file): Return false if there is a
parse error in the input.
* etc/rec-mode.el (rec-update-buffer-descriptors): Return nil if
the :
2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: avoid trying to delete the sole window in the current
frame.
(rec-finish-editing-field): avoid trying to delete the edit window
if it is the only window in the frame. Switch to show the rec
buffer instead.
2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: rec-end-of-field-pos now works properly when a field
ends with the end of file mark.
* etc/rec-mode.el (rec-end-of-field-pos): Do not add one to the
end-of-field position.
(rec-delete-field): Delete the trailing \n after the field, if
any.
2012-11-07 Jose E. Marchesi <jemarch@gnu.org>
src: emit a useful message when an invalid enum literal is found
in a field.
* src/rec-types.c (rec_type_check_enum): Add a meaningful error
message when the string to check is empty or otherwise an invvalid
enum literal.
2012-11-07 Jose E. Marchesi <jemarch@gnu.org>
man: do not require help2man unless the sources are changed.
* .gitignore: generated manpages removed.
* man/csv2rec.1: Added to the repo.
* man/recset.1: Likewise.
* man/recsel.1: Likewise.
* man/recins.1: Likewise.
* man/recinf.1: Likewise.
* man/recfmt.1: Likewise.
* man/recfix.1: Likewise.
* man/recdel.1: Likewise.
* man/rec2csv.1: Likewise.
* man/mdb2rec.1: Likewise.
2012-10-08 Jose E. Marchesi <jemarch@gnu.org>
csv2rec: diagnostic messages improved.
* utils/csv2rec.c (struct csv2rec_ctx): New field lineno.
(process_csv): Initialize lineno.
(field_cb): Improve the error message.
2012-10-07 John Darrington <john@darrington.wattle.id.au>
utils/recutl.c: (recutl_write_db_to_file) Fixed memory leak
2012-09-07 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: fixed to allow comments in records.
* etc/rec-mode.el (rec-hide-continuation-line-markers): Fixed to
ignore comments in records.
(rec-hide-record-fields): Likewise.
(rec-record-elems): Renamed from rec-record-fields.
(rec-insert-record): Use rec-record-elems.
(rec-record-assoc): Likewise.
(rec-record-names): Likewise.
(rec-hide-continuation-line-markers): Likewise.
(rec-hide-record-fields): Likewise.
(rec-unfold-record-fields): Likewise.
(rec-log-current-defun): Likewise.
2012-09-07 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: don't move the pointer after switching to edit buffer or
edit type mode.
* etc/rec-mode.el (rec-edit-buffer): Don't move the pointer to the
beginning of the buffer.
(rec-edit-type): Likewise.
2012-09-06 John Darrington <john@darrington.wattle.id.au>
* doc/recutils.texi : Minor markup alterations
* doc/recutils.texi : Added some index entries
2012-09-04 Jose E. Marchesi <jco@terma.com>
rec-mode: improve rec-log-current-defun so it works in all cases.
* etc/rec-mode.el (rec-log-current-defun): Cover the case where
there is a defined key but the field is not present in the record.
2012-09-03 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: provide a sensible log-current-defun for the add-log
function.
* etc/rec-mode.el (rec-log-current-defun): New function.
(rec-mode): Set the buffer local value of
add-log-current-defun-function to rec-log-current-defun.
2012-09-03 Jose E. Marchesi <jemarch@gnu.org>
* AUTHORS: Daiki, Ralf, John and Michał added.
2012-08-31 John Darrington <john@darrington.wattle.id.au>
* doc/recutils.texi : Merge Fields and Records, and Comments into
one chapter
* doc/recutils.texi : Added the start of a tutorial chapter
2012-08-27 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Top): Concept Index added to the menu.
2012-08-27 Jose E. Marchesi <jco@terma.com>
* .x-sc_prohibit_strncpy: New file.
2012-08-27 John Darrington <john@darrington.wattle.id.au>
* doc/recutils.texi: Replaced one remaining instance of "i.e." with the
respective macro. Also added @: to the macro definition to improve
spacing.
* doc/recutils.texi: Added @. where appropriate.
* doc/recutils.texi: Added an index.
2012-08-26 Jose E. Marchesi <jemarch@gnu.org>
doc: minor fixes in the manual.
* doc/recutils.texi (Conversion Utilities): @acronym removed.
(Record Descriptors): Relocate the menu to the end of the section
and remove the now uneeded list of special fields.
(Scalar types): The type identifier for integers is 'int' and not
'integer'.
2012-08-26 John Darrington <john@darrington.wattle.id.au>
* doc/recutils.texi: Reorganised sectioning, in favour of fewer, but bigger chapters.
2012-08-23 Jose E. Marchesi <jemarch@gnu.org>
syntax-check fixes.
* etc/rec-mode.el: Trailing blanks removed from file.
* doc/recutils.texi (recsel Grouping): Don't use @acronym{}.
http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
explains why.
* src/rec-db.c (rec_db_merge_records): Use memcpy instead of
strncpy.
(rec_db_process_fex): Likewise.
* utils/recfmt.c (recfmt_apply_template): Likewise.
* utils/mdb2rec.c (process_table): Likewise.
* utils/csv2rec.c (field_cb): Likewise.
* src/rec-utils.c (rec_extract_file): Likewise.
(rec_extract_url): Likewise.
(rec_extract_type): Likewise.
(rec_parse_regexp): Likewise.
(rec_concat_strings): Likewise.
* src/rec-sex-lex.l: Likewise.
* src/rec-sex.c (rec_sex_eval_node): Likewise.
(rec_sex_eval_node): Likewise.
* src/rec-parser.c (rec_parse_field_name_str): Likewise.
* src/rec-int.c (rec_int_merge_remote): Likewise.
* src/rec-field-name.c (rec_field_name_normalise): Likewise.
* .x-sc_prohibit_strncpy: New file.
2012-08-22 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-types.c (rec_type_destroy): Be a no-operation in case
the passed type is NULL.
2012-08-21 Michał Masłowski <mtjm@mtjm.eu>
src,torture: Fix memory leaks found by valgrind in unit tests.
* src/rec-fex.c (rec_fex_destroy): Free rewrite_to of each
element.
(rec_fex_parse_str_simple): Free fex_str, rewrite_to of each
element and use common code for destroying partial results on
error.
(rec_fex_parse_str_subscripts): Free fex_str and in case of error
field_name and str of each element.
(rec_fex_parse_elem): Free elem->str, elem->field_name and
elem->rewrite_to on error.
* src/rec-parser.c (rec_parser_perror): Don't allocate number_str,
asprintf will do it.
(rec_parse_record): Free the record on error.
(rec_parse_comment): Free the comment string not only on error.
* src/rec-rset.c (rec_rset_destroy): Free constraints.
* src/rec-sex-ast.c (rec_sex_ast_node_destroy): Free the node.
* src/rec-types.c (rec_type_new): Free the type on error.
(rec_type_destroy): Free the data of enum and regexp types.
* torture/rec-fex/rec-fex-new.c (rec_fex_new_subscripts): Destroy
the fex after use.
* torture/rec-fex/rec-fex-str.c (rec_fex_str_nominal): Likewise.
* torture/rec-field/rec-field-set-name.c
(rec_field_set_name_empty): Destroy the field after use.
(rec_field_set_name_nonempty): Likewise.
* torture/rec-field/rec-field-set-value.c
(rec_field_set_value_empty): Likewise.
(rec_field_set_value_nonempty): Likewise.
* torture/rec-field/rec-field-value.c (rec_field_value_empty):
Likewise.
(rec_field_value_nonempty): Likewise.
* torture/rec-parser/rec-parse-record-str.c
(rec_parse_record_str_nominal): Free fname after use.
* torture/rec-parser/rec-parse-record.c
(rec_parse_record_nominal): Likewise.
* torture/rec-parser/rec-parse-rset.c (rec_parse_rset_nominal):
Destroy the rset after use.
* torture/rec-parser/rec-parser-new-mem.c
(rec_parser_new_mem_nominal): Likewise.
* torture/rec-parser/rec-parser-seek-mem.c
(rec_parser_seek_mem_skip): Destroy the record after use.
* torture/rec-writer/rec-write-comment-str.c
(rec_write_comment_str_nominal): Free str after use.
(rec_write_comment_str_sexp): Likewise.
* torture/rec-writer/rec-write-field-name-str.c
(rec_write_field_name_str_nominal): Likewise.
(rec_write_field_name_str_sexp): Likewise.
* torture/rec-writer/rec-write-field-str.c
(rec_write_field_str_nominal): Likewise.
(rec_write_field_str_sexp): Likewise.
2012-08-21 Michał Masłowski <mtjm@mtjm.eu>
src: Initialize unused fields to 0 in rec_fex_append.
* src/rec-fex.c (rec_fex_append): Zero new_elem content.
2012-08-21 Michał Masłowski <mtjm@mtjm.eu>
src: Fix an invalid read in an unit test detected by valgrind.
* src/rec-parser.c (rec_parse_field_name_str): Do the check for
trailing ':' only for nonempty strings.
2012-08-16 John Darrington <john@darrington.wattle.id.au>
doc: Reals always use the dot as separator
* doc/recutils.texi: Added a note to the effect that the LC_NUMERIC
locale class does not affect how real types are interpreted.
2012-08-16 John Darrington <john@darrington.wattle.id.au>
doc: Grammar and typos
* doc/recutils.texi: Corrected various minor grammatical and
typographical errors.
2012-08-16 John Darrington <john@darrington.wattle.id.au>
doc: Comments vs. %doc
* doc/recutils.texi: Elaborated on the distinction between comments
and %doc fields. Added an example for %doc
2012-08-16 John Darrington <john@darrington.wattle.id.au>
doc: Grammar
* doc/recutils.texi: "allows to" is not correct English. Added a
subject or reformulated as appropriate.
2012-08-15 John Darrington <john@darrington.wattle.id.au>
doc: Correct typo
* doc/recutils.texi: adquisition --> acquisition
2012-08-15 John Darrington <john@darrington.wattle.id.au>
doc: Add a macro for id est
* doc/recutils.texi: In English text, I think its easier to recognise these latin
abbreviations in italics. So I've added a macro for i.e.
2012-08-15 John Darrington <john@darrington.wattle.id.au>
doc: "data" is plural ("datum" is the singular)
* doc/recutils.texi: I find conjugations like "this data" just sound wrong.
2012-08-14 Jose E. Marchesi <jemarch@gnu.org>
src: compare real numbers with LC_NUMERIC=C.
* src/rec-utils.c: Include locale.h.
(rec_atod): Make sure that the dot is the decimal separator
regardless of the locale in the environment.
2012-08-09 Jose E. Marchesi <jemarch@gnu.org>
doc: typo fixed in manual.
* doc/recutils.texi: Incorrect "escalar" replaced by "scalar".
2012-08-05 Jose E. Marchesi <jemarch@gnu.org>
src,doc: support for dot notation in simple fexes.
* doc/recutils.texi (Field Expressions): Document dot notation in
field expressions.
* src/rec-fex.c (rec_fex_parse_str_simple): Support for dot
notation in field names in simple fexes.
2012-08-05 Jose E. Marchesi <jemarch@gnu.org>
src,torture: don't try to perform a join if the referred type does
not exist in the database.
* src/rec-db.c (rec_db_query): Don't perform a join if records of
the referred type cannot be found in the database.
* torture/utils/recsel.sh (non-existant-foreign-key): New input
file.
(recsel-non-existant-foreign-key): New test.
2012-08-04 Michał Masłowski <mtjm@mtjm.eu>
src,torture: fix a recfix crash reported by John Darrington.
* src/rec-rset.c (rec_rset_get_field_type): Don't call
rec_type_reg_get with NULL as type name.
* torture/utils/recfix.sh (unused-type): New input file.
(recfix-unused-type): New test.
2012-08-01 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: copy/kill fields and records commands.
* etc/rec-mode.el (rec-cmd-kill-field): New function.
(rec-cmd-copy-field): Likewise.
(rec-cmd-kill-record): Likewise.
(rec-cmd-copy-record): Likewise.
(rec-mode-edit-map): Map the copy/kill commands for fields and
records.
(rec-mode-map): Likewise.
2012-07-31 Jose E. Marchesi <jemarch@gnu.org>
src,doc,torture: support for the %constraint special field.
* doc/recutils.texi (%size and %constraint): Document the
usage of the %constraint special field.
* src/rec-rset.c (rec_rset_num_sex_constraints): New function.
(rec_rset_sex_constraint): Likewise.
* src/rec-int.c (rec_int_check_record): Call to
rec_int_check_record_sex_constraints.
(rec_int_check_record_sex_constraints): New function.
* torture/utils/recfix.sh (constraint-sex-valid): New input file.
(constraint-sex-invalid): Likewise.
(constraint-sex-invalid-empty): Likewise.
(constraint-sex-several-valid): Likewise.
(constraint-sex-several-invalid): Likewise.
(constraint-sex-with-violation): Likewise.
(recfix-constraint-sex-valid): New test.
(recfix-constraint-sex-invalid): Likewise.
(recfix-constraint-sex-invalid-empty): Likewise.
(recfix-constraint-sex-several-valid): Likewise.
(recfix-constraint-sex-several-invalid): Likewise.
(recfix-constraint-sex-with-violation): Likewise.
* src/rec-int.c (rec_int_check_descriptor): Check for the
integrity of the %constraint fields.
* src/rec-rset.c (rec_rset_new): Initialize the internal
constraints structures to empty.
(rec_rset_destroy): Destroy the internal constraints structures.
(rec_rset_dup): Dup constraints.
(rec_rset_set_descriptor): Update sex constraints.
(rec_rset_update_sex_constraints): New function.
* src/rec.h (enum rec_std_field_e): New member
REC_FIELD_CONSTRAINT.
* src/rec-field-name.c (fnames): New special field name
%constraint.
2012-07-31 Jose E. Marchesi <jemarch@gnu.org>
torture: test for the => operator in sexes.
* torture/utils/recsel.sh (implications): New input file.
(recsel-sex-implies-1): New test.
2012-07-28 Jose E. Marchesi <jemarch@gnu.org>
doc: documentation of the => operator.
* doc/recutils.texi (SEX Operators): Document the => operator.
2012-07-27 Jose E. Marchesi <jemarch@gnu.org>
src: implementation of the => sex operator.
* src/rec-sex.c (rec_sex_eval_node): Implementation of the
"implies" operator.
* src/rec-sex-ast.h (enum rec_sex_ast_node_type_e): New value
REC_SEX_OP_IMPLIES.
* src/rec-sex-tab.y: Rule for the implies operator.
* src/rec-sex-lex.l ("=>"): New token for the "implies" operator.
2012-07-23 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: new command rec-cmd-statistics.
* etc/rec-mode.el (rec-cmd-statistic): New function.
(rec-mode-map): Map rec-cmd-statistic with %.
2012-07-23 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: rec-cmd-count now suggests a default selection
expression when invoked with a numeric prefix.
* etc/rec-mode.el (rec-cmd-count): Use a default expression using
the field under point when invoked with a prefix argument.
2012-07-20 Jose E. Marchesi <jemarch@gnu.org>
* .x-sc_prohibit_defined_have_decl_tests: New file.
2012-07-20 Jose E. Marchesi <jemarch@gnu.org>
* gnulib module flock imported.
2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: support for undo in navigation mode.
* etc/rec-mode.el (rec-mode-map): Remap `undo' into rec-cmd-undo
when in navigation mode.
(rec-cmd-undo): New function.
2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: support for multiple field names in %type entries.
* etc/rec-mode.el (rec-field-type): Support for multiple field
names in %type entries.
2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: time-stamps are now triggered with `t' instead of `n'.
* etc/rec-mode.el (rec-cmd-edit-field): Change the key to
trigger a time-stamp from `n' to `t'.
2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: support for generating time-stamps in date fields.
* etc/rec-mode.el (rec-cmd-edit-field): Support for getting a
timestamp when editing date fields.
(rec-time-stamp-format): New constant.
2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: fix edition of the default record set.
* etc/rec-mode.el (rec-record-descriptor): Return `nil' for a
non-existant record descriptor, not "".
2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: allow the user to cancel the edit date operation by
quitting the calendar window.
* etc/rec-mode.el (rec-cmd-edit-field): Remap "q" in the calendar
to remove the modified local map in the *Calendar* buffer if the
user quits the calendar.
2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: rec-cmd-edit-field supports a numeric argument.
* etc/rec-mode.el (rec-cmd-edit-field): Use the more general input
method for reading field values regardless their types if a
numeric argument is passed to the function.
2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: support for editing date fields using the calendar.
* etc/rec-mode.el (rec-cmd-edit-field): Support for editing date
fields using the calendar.
(rec-popup-calendar): New customized variable.
2012-07-10 Jose E. Marchesi <jemarch@gnu.org>
algol68: several new wrappers for librec functions.
* algol68/rec.a68 (MODE RSET): New mode.
(rec rset new): New wrapper.
(rec rset destroy): Likewise.
(rec rset dup): Likewise.
(MODE MSET): New mode.
(MODE MSETELEM): Likewise.
(mset any): New constant.
(rec mset new): New wrapper.
(rec mset destroy): Likewise.
(rec mset dup): Likewise.
(rec mset type p): Likewise.
(rec mset get at): Likewise.
(rec mset insert at): Likewise.
(rec mset insert after): Likewise.
(rec mset append): Likewise.
(rec mset add sorted): Likewise.
(rec mset remove at): Likewise.
(rec mset remove elem): Likewise.
(rec mset search): Likewise.
2012-07-10 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 14 resolved to 'DONE'.
2012-07-08 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-cmd-select-fast): New function.
(rec-cmd-select-sex): Likewise.
(rec-mode-edit-map): Bindings for selection functions added.
(rec-mode-map): Likewise.
2012-06-22 Jose E. Marchesi <jco@terma.com>
manual: some work in the grouping section.
* doc/recutils.texi (recsel Grouping): Some work in the section.
2012-06-11 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: new functions returning properties of the current record
set.
* etc/rec-mode.el (rec-keyword-mandatory): New constant.
(rec-keyword-key): Likewise.
(rec-mandatory-fields): New function.
(rec-key): Likewise.
2012-06-10 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: bug affecting the hiding of continuation line markers
fixed.
* etc/rec-mode.el (rec-hide-continuation-line-markers): Use
rec-insert-field-value in order to determine the length.
2012-06-08 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: presentation of continuation lines in navigation modes,
and other improvements.
* etc/rec-mode.el (rec-query): renamed from rec-select, and
completed.
(cl): Package required, for keyword arguments support.
(rec-show-record): Call rec-hide-continuation-line-markers.
(rec-hide-continuation-line-markers): New function.
(rec-continuation-line-markers-overlays): New variable.
(rec-continuation-line-markers-width): New variable.
(rec-remove-continuation-line-marker-overlays): New function.
(rec-mode-syntax-table): Put " and ' in the word-constituent
syntax class to avoid unwanted font-locking and pairing.
2012-06-05 Jose E. Marchesi <jemarch@gnu.org>
manual: some more dummy sections for the rec-mode manual.
* doc/rec-mode.texi (Summary): New section.
(Installation): Likewise.
(Feedback): Likewise.
2012-06-05 Jose E. Marchesi <jemarch@gnu.org>
manual: skeleton for the rec-mode manual.
* .gitignore: Ignore doc/version-rec-mode.texi
* doc/Makefile.am (info_TEXINFOS): Added rec-mode.texi.
* doc/rec-mode.texi: New file.
(Introduction): New chapter.
(GNU Free Documentation License): New chapter.
2012-06-05 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: support for selection expressions in rec-count.
* etc/rec-mode.el (rec-count): Support for selection expressions
in counts.
(rec-cmd-count): Likewise.
2012-06-05 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: folding of fields.
* etc/rec-mode.el (rec-show-record): Call to
rec-hide-record-fields.
(rec-hide-record-fields): New function.
(rec-toggle-field-visibility): Likewise.
(rec-cmd-toggle-field-visibility): Likewise.
(rec-mode-edit-map): Bind SPC with
rec-cmd-toggle-field-visibility.
(rec-mode-map): Likewise.
(rec-mode): Add an invisibility spec for fields.
(rec-show-fields-all): New function.
(rec-field-folded-p): Likewise.
(rec-fold-field): Likewise.
(rec-cmd-beginning-of-line): Removed.
(rec-max-lines-in-fields): Default to 15.
(rec-unfold-record-fields): New function.
(rec-unfold-all-fields): New function.
(rec-edit-type): Unfold all fields before switching to edit mode.
(rec-edit-buffer): Likewise.
(rec-edit-record): Likewise.
2012-06-04 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-cmd-edit-field): Support editing boolean
fields as special enum values.
2012-06-04 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: complete support for editing fields storing enumerated
values.
* etc/rec-mode.el (rec-cmd-show-type): Use
display-message-or-buffer in order to avoid overflowing the echo
area.
(rec-cmd-edit-field): Complete support for editing fields
containing enum values.
2012-06-04 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: avoid security problems in calls to message by using %s.
* etc/rec-mode.el (rec-cmd-show-type): Use "%s" in message to
avoid security problems.
(rec-cmd-goto-next-rec): Likewise.
(rec-cmd-goto-previous-rec): Likewise.
(rec-cmd-count): Likewise.
(rec-cmd-show-info): Likewise.
2012-06-03 Jose E. Marchesi <jemarch@gnu.org>
* etc/rec-mode.el (rec-parse-field-name-from-string): Deleted.
(rec-mode-map): Use "d" to show descriptors, not t.
(rec-mode-edit-map): Likewise with C-cd.
(rec-mode-edit-map): New entry for rec-cmd-show-type.
(rec-mode-map): Likewise.
(rec-type-descriptor): New function.
(rec-parse-type): Allow comments in parenthesis in enum
descriptions.
(rec-cmd-edit-field): Edit the field value in several ways,
depending on its type.
(rec-type-data): New function.
(rec-type-kind): Likewise.
2012-06-03 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: several functions to support field types.
* etc/rec-mode.el (rec-types): New variable.
(rec-type-kind-p): New function.
(rec-parse-type): Likewise.
(rec-parse-type-int): Likewise.
(rec-check-type): Likewise.
2012-06-01 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: misc small fixes.
* etc/rec-mode.el (rec-mode): docstring updated to reflect the
real URL.
(rec-keyword-rec): Use rec-keyword-prefix.
(rec-mode-edit-map): Remove obsolete or not-working entries.
(rec-mode-map): Likewise.
(rec-field-trim-value): Don't remove the initial newline when
trimming when there is only one.
(rec-update-buffer-descriptors-xxx): Removed.
(rec-map): Removed.
(rec-do): Removed.
(rec-sel): Removed.
(rec-field-eq): Removed.
(rec-field-count): Removed.
(rec-init-selections): Removed.
(rec-finish-editing): Don't call rec-init-selections.
(rec-finish-editing-field): Likewise.
(rec-search-first): Removed.
(rec-selection-list): Removed.
(rec-cmd-sel): Removed.
(rec-mode): Wide the buffer after killing local variables.
2012-06-01 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: fixes in goto-type and show-type.
* etc/rec-mode.el (rec-buffer-types): Return the values of the
first %rec entry in each record, not a list.
(rec-show-type): Show the first data record of the selected type,
if it exists.
(rec-show-type): Get an optional argument show-descriptor.
(rec-cmd-show-descriptor): Call rec-show-type with show-descriptor
t.
2012-06-01 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: field names are no longer lists of parts.
* etc/rec-mode.el (rec-parse-record): Docstring updated.
(rec-field-name-re): Updated.
(rec-insert-field-name): Updated to new field structure.
(rec-buffer-types): Call rec-record-assoc with a string field
name, not a list.
(rec-record-descriptor-p): Likewise, and use rec-keyword-rec.
(rec-goto-type): Likewise.
(rec-regular-p): Likewise.
(rec-record-type): Likewise.
(rec-search-first): Likewise.
(rec-init-selections): Likewise.
2012-05-31 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: editing of individual fields now works.
* etc/rec-mode.el (rec-insert-field): Fixed to work with the new
field structured.
2012-05-31 Jose E. Marchesi <jemarch@gnu.org>
src: fix sorting code to properly handle interleaved comments.
* src/rec-rset.c (rec_rset_record_compare_fn): Return 1 if elem2
is a comment.
* torture/utils/recsel.sh (sort-with-comment): New input file.
(sort-with-comment): New test.
2012-05-29 Jose E. Marchesi <jemarch@gnu.org>
Syntax fixes.
* python/setup.py: Trailing blank removed.
* doc/recutils.texi (recins Encryption): Fix usage of @pxref.
2012-05-25 Michał Masłowski <mtjm@mtjm.eu>
src,torture: support changing parser position.
* src/rec-parser.c (rec_parser_seek, rec_parser_tell): New
functions.
* src/rec.h: Prototypes for rec_parser_seek, rec_parser_tell.
* torture/Makefile.am (REC_PARSER_TSUITE): rec-parser-seek-mem.c
added.
* torture/rec-parser/rec-parser-seek-mem.c: New file.
* torture/rec-parser/tsuite-rec-parser.c (tsuite_rec_parser):
Added test_rec_parser_seek_mem.
2012-05-25 Michał Masłowski <mtjm@mtjm.eu>
src,torture: support parsing non-null terminated buffers.
* src/rec-parser.c (struct rec_parser_s): New field in_size.
* src/rec-parser.c (rec_parser_new): Initialize in_size to an
invalid value.
* src/rec-parser.c (rec_parser_getc): Use in_size instead of null
check to find EOF in memory buffers.
* src/rec-parser.c (rec_parser_new_mem): New function.
* src/rec-parser.c (rec_parser_new_str): Use rec_parser_new_mem.
* src/rec.h: Prototype for rec_parser_new_mem.
* torture/Makefile.am (REC_PARSER_TSUITE): rec-parser-new-mem.c
added.
* torture/rec-parser/rec-parser-new-mem.c: New file.
* torture/rec-parser/tsuite-rec-parser.c (tsuite_rec_parser):
Added test_rec_parser_new_mem.
2012-05-25 Jose E. Marchesi <jemarch@gnu.org>
build,src: support versions of mdbtools using MDB_SDATETIME and
MDB_DATETIME.
* utils/mdb2rec.c (process_table): Use MDB_DATETIME instead of
MDB_SDATETIME.
* utils/Makefile.am (mdb2rec_CPPFLAGS): Set MDB_DATETIME to the
proper symbol.
* configure.ac (MDB_DATETIME): Check whether mdblib is using
MDB_SDATETIME or MDB_DATETIME.
2012-05-25 Jose E. Marchesi <jemarch@gnu.org>
torture,src: tests for aggregates and multiple-field grouping, and
several fixes.
* src/rec-aggregate.c (REC_AGGREGATE_ACCUM_FUNC): Get an INIT_VAL
argument.
Use DBL_MAX and DBL_MIN.
(rec_aggregate_std_avg): avg must be a double for the average.
* torture/utils/recsel.sh (sales): New input file.
(recsel-group-multiple-fields): New test.
(recsel-aggregate-field-name): Likewise.
(recsel-aggregate-case-insensitive): Likewise.
(recsel-aggregate-rewrite-rule): Likewise.
(recsel-aggregate-count-overall): Likewise.
(recsel-aggregate-count-grouped): Likewise.
(recsel-aggregate-sum-overall): Likewise.
(recsel-aggregate-sum-grouped): Likewise.
(recsel-aggregate-min-overall): Likewise.
(recsel-aggregate-min-grouped): Likewise.
(recsel-aggregate-max-overall): Likewise.
(recsel-aggregate-max-grouped): Likewise.
2012-05-25 Jose E. Marchesi <jemarch@gnu.org>
utils: fix the detection of invalid fexes in -G and -S.
* utils/rec2csv.c (rec2csv_parse_args): Use rec_fex_check to
validate the list of fields in the command line.
* utils/recsel.c (recsel_parse_args): Likewise.
2012-05-25 Jose E. Marchesi <jemarch@gnu.org>
src,doc: support for grouping by several fields.
* doc/recutils.texi (recsel Invocation): Document that -G accepts
a comma separated list of fields.
* utils/recsel.c: recutl_group_by_fields is now a fex.
(recsel_parse_args): Adjust error messages to that fact and parse
the fex.
(recutl_print_help): Likewise.
(recsel_process_data): Use recsel_group_by_fields.
* src/rec-db.c (rec_db_set): group-by is now a fex.
* src/rec-rset.c (rec_rset_merge_records): Get a fex argument with
the list of fields used for grouping.
(rec_rset_group): Group by multiple fields.
2012-05-24 Jose E. Marchesi <jemarch@gnu.org>
src: new function rec_rset_compare_typed_records.
* src/rec-rset.c (rec_rset_compare_typed_records): New function.
(rec_rset_record_compare_fn): Use rec_rset_compare_typed_records.
2012-05-16 Jose E. Marchesi <jemarch@gnu.org>
doc,manual: document the sorting with several fields.
* utils/recsel.c (recutl_print_help): Document that -S now gets a
FIELDS argument.
* utils/rec2csv.c (recutl_print_help): Likewise.
* doc/recutils.texi (recsel Invocation): Likewise.
(rec2csv Invocation): Likewise.
(%sort): Document that several fields can be used as sorting
criteria.
2012-05-16 Jose E. Marchesi <jemarch@gnu.org>
torture: tests for sorting with multiple fields.
* torture/utils/recsel.sh (sort-multiple): New input file.
(recsel-sort-multiple): New test.
(recsel-sort-field-multiple): Likewise.
* torture/utils/recfix.sh (unsorted-multiple): New input file.
(recfix-sort-multiple): New test.
2012-05-16 Jose E. Marchesi <jemarch@gnu.org>
src,utils: implementation for sorting with multiple fields.
* src/rec-fex.c (rec_fex_parse_str_simple): Initialize
function_name, function_data and rewrite_to to NULL.
* utils/rec2csv.c: rec2csv_sort_by_fields is now a fex.
(rec2csv_process_data): Pass the fex to rec_rset_sort.
* utils/recsel.c: recutl_sort_by_fields is now a fex.
(recsel_parse_args): Handle several field names in -S.
(recsel_process_data): Pass the fex to rec_db_query.
* src/rec-db.c (rec_db_query): The sort_by parameter is now a fex.
* src/rec-rset.c (rec_rset_record_compare_fn): Use
rec_type_values_cmp.
(rec_rset_record_compare_fn): Rewritten to work on multiple
fields.
* src/rec-types.c (rec_type_values_cmp): New function.
(REC_TYPE_BOOL_TRUE_VALUES_RE): New constant.
(REC_TYPE_BOOL_FALSE_VALUES_RE): Likewise.
(REC_TYPE_BOOL_VALUE_RE): Use REC_TYPE_BOOL_TRUE_VALUES_RE and
REC_TYPE_BOOL_FALSE_VALUES_RE.
* src/rec-int.c (rec_int_check_descriptor): The %sort special
field now acccepts a simple_fex as its value.
* src/rec-rset.c (rec_rset_update_field_props): Use fexes as
order_by fields.
* src/rec-rset.c (rec_rset_dup): Use rec_fex_dup to duplicate the
fex containing the sort_by fields.
(rec_rset_set_order_by_field): Get a fex.
(rec_rset_order_by_field): Return a fex.
(rec_rset_sort): Get a fex.
* src/rec-fex.c (rec_fex_dup): New function.
* src/rec-rset.c (rec_rset_s): order_by_fields is now a fex.
(REC_RSET_MAX_ORDER): Unused constant removed.
(rec_rset_new): order_by_field renamed to order_by_fields.
(rec_rset_destroy): Destroy rset->order_by_fields with
rec_fex_destroy.
2012-05-08 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (recsel Grouping): New section documenting the
-G operation.
2012-05-05 Jose E. Marchesi <jemarch@gnu.org>
src: new aggregate Avg.
* src/rec-aggregate.c (std_aggregates): New aggregate "avg".
(rec_aggregate_std_avg): New function.
(rec_aggregate_std_avg_record): Likewise.
2012-05-05 Jose E. Marchesi <jemarch@gnu.org>
src: improvements in the aggregates implementation to avoid code
duplication.
* src/rec-aggregate.c: New global variable std_aggregates
containing descriptors for the standard aggregates.
(rec_aggregate_reg_add_standard): Use std_aggregates.
(rec_aggregate_std_p): Likewise.
(REC_AGGREGATE_ACCUM_FUNC): New macro.
2012-05-03 Jose E. Marchesi <jemarch@gnu.org>
src: new aggregates min and max.
* src/rec-aggregate.c (rec_aggregate_std_min): New function.
(rec_aggregate_std_min_record): Likewise.
(rec_aggregate_std_max): Likewise.
(rec_aggregate_std_max_record): Likewise.
(rec_aggregate_reg_add_standard): Register aggregates 'Min' and
'Max'.
(rec_aggregate_std_p): Likewise.
gnulib module minmax imported.
2012-05-03 Jose E. Marchesi <jemarch@gnu.org>
src,utils: recsel now complains if a non-existing aggregate
function is called in a fex.
* utils/recsel.c (recsel_parse_args): Check for the validity of
the aggregate functions used in the field expressions.
* src/rec-aggregate.c (rec_aggregate_std_p): New function.
2012-05-03 Jose E. Marchesi <jemarch@gnu.org>
gnulib module floor imported.
2012-05-03 Jose E. Marchesi <jco@terma.com>
src: aggregate function names are case-insensitive.
* src/rec-aggregate.c (rec_aggregate_reg_get): Be case-insensitive
when retrieving functions from a registry.
2012-05-03 Jose E. Marchesi <jco@terma.com>
src: implementation of the SUM aggregate.
* src/rec-aggregate.c (rec_aggregate_std_sum): New function.
(rec_aggregate_std_sum_record): Likewise.
2012-05-03 Jose E. Marchesi <jco@terma.com>
src: sort after grouping so -S works with -G.
* src/rec-db.c (rec_db_query): Sort after grouping, so -S works
with -G.
2012-05-03 Jose E. Marchesi <jco@terma.com>
src: new semantics and interfaces for aggregates.
* src/rec-db.c (rec_db_process_fex): Use _ to separate the
function name and the field name when generating names for
aggregated fields.
* src/rec-fex.c (rec_fex_all_calls_p): New function.
* src/rec-aggregate.c (rec_aggregate_std_count): Rewritten with
new semantics.
2012-05-03 Jose E. Marchesi <jco@terma.com>
src: don't allow subscripts in the fields passed to function calls
in fexes and aggregates.
* src/rec.h: rec_aggregate_t modified to not get min and max
arguments.
(REC_FEX_CALL): Don't allow subscripts in the field names used in
the function calls.
* src/rec-aggregate.c (rec_aggregate_std_count): Don't get 'min'
and 'max' arguments.
2012-05-03 Jose E. Marchesi <jco@terma.com>
src: field functions renamed to aggregates.
* src/rec-aggregate.c (rec_aggregate_std_count): Return a char*
instead of a record.
* src/rec-db.c (struct rec_db_s): Field functions_reg renamed to
aggregates.
* src/Makefile.am (librec_la_SOURCES): rec-func.c is now called
rec-aggregate.c.
* src/rec-aggregate.c: Renamed from src/rec-func.c, and all
rec_func_* symbols renamed to rec_aggregate_*.
* src/rec.h: rec_func_t modified to return a string instead of a
record and renamed to rec_aggregate_t.
* src/rec-db.c (rec_db_query): Perform the group-by operation
before the selection.
2012-04-27 Jose E. Marchesi <jemarch@gnu.org>
src,utils: implementation of field functions, and Count.
* src/rec-record.c (rec_record_contains_field): New function.
* src/rec-rset.c (rec_rset_merge_records): The merge operation
must not create duplicated fields on the resulting record.
* src/rec-db.c (rec_db_new): Add standard field functions to the
database functions registry.
* src/rec-func.c (rec_func_reg_add_standard): New function.
(rec_func_std_count): New function.
* src/Makefile.am (librec_la_SOURCES): Added rec-func.c
* src/rec-db.c (rec_db_s): New field 'functions_reg'.
(rec_db_new): Initialize the functions register of the database.
(rec_db_destroy): Dispose the memory used by the functions
register when destroying the databse.
(rec_db_functions): New function.
* utils/recutl.c (recutl_build_db): Return NULL if there is not
enough memory to create the database.
* src/rec-func.c (rec_func_reg_s): New structure.
(rec_type_reg_new): New function.
(rec_func_reg_destroy): Likewise.
(rec_func_reg_add): Likewise.
(rec_func_reg_et): Likewise.
* src/rec-fex.c (rec_fex_elem_function_data): New function.
(rec_fex_elem_s): New field function_data.
(rec_fex_parse_elem): Initialize function_data to NULL.
* src/rec.h: Data types and functions declarations for the field
functions and the function registries.
* src/rec-func.c: New file.
* src/rec-record.c (rec_record_append): New function.
* src/rec-db.c (rec_db_process_fex): Fetch and invoke the
corresponding field functions if the fex contains function calls.
* src/rec-fex.c (rec_fex_elem_s): New member function_name.
(rec_fex_parse_elem): Parse function calls.
(rec_fex_elem_function_name): New function.
2012-04-22 Jose E. Marchesi <jemarch@gnu.org>
* src/rec.h (REC_FEX_FNAME): New constant.
(REC_FEX_CALL): Likewise.
(REC_FNAME_FEX_RE): Modified to allow call entries.
2012-04-22 Jose E. Marchesi <jemarch@gnu.org>
syntax-check fixes.
* python/recmodule.c: Include config.h
2012-04-22 Jose E. Marchesi <jemarch@gnu.org>
src: support for >= and <= in selection expressions.
* torture/utils/recsel.sh (rec-sex-integer-lessequalthan): New
test.
(rec-sex-integer-greaterequalthan): Likewise.
* src/rec-sex.c (rec_sex_eval_node): Semantics of REC_SEX_OP_GTE
and REC_SEX_OP_LTE implemented.
* src/rec-sex-ast.h (rec_sex_ast_node_type_e): New entries
REC_SEX_OP_LTE and REC_SEX_OP_GTE.
* src/rec-sex-tab.y: New tokens REC_SEX_TOK_LTE and
REC_SEX_TOK_GTE.
(exp): Rules for the >= and <= infix operators.
* src/rec-sex-lex.l ("<="): New rule.
(">="): Likewise.
2012-04-18 Jose E. Marchesi <jemarch@gnu.org>
doc: new CSS file adapted from lilypond.
* doc/css/recutils-manuals.css: New file, adapted from
lilypond-manuals.css.
2012-04-17 Jose E. Marchesi <jemarch@gnu.org>
manual: missing documentation added for some command line options,
and inconsistencies removed.
* utils/recfix.c (recutl_print_help): Don't document -t|--type,
because it is not yet implemented.
* doc/recutils.texi (recinf Invocation): Document that -S is the
short form for --print-sexps.
(recsel Invocation): Document -i|--case-insensitive.
(recdel Invocation): Likewise.
(recins Invocation): Document the --force command line option.
(recfix Invocation): Likewise.
(recdel Invocation): -f is not an alias for --force.
2012-04-17 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for field expressions fixed.
* doc/recutils.texi (Field Expressions): Documentation fixed in
order to reflect the fact that it is possible to repeat the same
field in the same field expression.
2012-04-17 Jose E. Marchesi <jemarch@gnu.org>
src: make the string comparison operators case-insensitive in
selection expressions when requested.
* torture/utils/recsel.sh (rec-sex-string-equal): New test.
(rec-sex-string-non-equal): Likewise.
(rec-sex-string-equal-insensitive): Likewise.
(rec-sex-string-non-equal-insensitive): Likewise.
* src/rec-sex.c (rec_sex_eval_node): Make the = and != operators
case insensitive with strings when applicable.
2012-04-17 Jose E. Marchesi <jemarch@gnu.org>
utils,doc: fix the --number command line option.
* torture/utils/recsel.sh (recsel-index-long): New test.
* utils/recutl.h (RECORD_SELECTION_LONG_ARGS): The long version of
-n is --number, not --num.
* doc/recutils.texi (recsel Invocation): Document --number as the
long version of -n.
(recins Invocation): Likewise.
(recdel Invocation): Likewise.
(recset Invocation): Likewise.
2012-04-16 Michał Masłowski <mtjm@mtjm.eu>
src,utils: fix several memory leaks.
* src/rec-field.c (rec_field_destroy): Free the value, like the
other structure members.
* src/rec-mset.c (rec_mset_destroy): Free type names and the mset
when destroying it.
* src/rec-parser.c (rec_parse_field): Free field name and value
after setting them, since only copies are used later.
* utils/recutl.c (recutl_parse_db_from_file): Destroy the parser
after using it.
2012-04-17 Jose E. Marchesi <jco@terma.com>
src: weird duplication of the file contens in rec-crypt-dummy.c
fixed.
* src/rec-crypt-dummy.c: Weird duplication of file fixed. WTF...
2012-04-15 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Common Options): Typo fixed.
2012-04-09 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: don't use a fixed list of keywords when font-locking
special fields and other minor fixes.
* etc/rec-mode.el (rec-mode): Don't go into navigation mode if the
file is empty.
(rec-keyword-prefix): New constant.
Copyright years list updated.
(rec-font-lock-keywords): Recognize as special fields any field
whose name starts with %.
2012-04-09 Daiki Ueno <ueno@unixuser.org>
rec-mode: fix error when rec-finish-editing on newly created file.
* etc/rec-mode.el (rec-update-buffer-descriptors): Don't assume
that the current buffer is already saved on the disk.
2012-04-04 Daiki Ueno <ueno@unixuser.org>
src: use a pinch of salt when encrypting confidential fields.
* src/rec-crypt.c (rec_encrypt): Insert a random salt to improve
security.
(rec_decrypt): Extract the salt of the encrypted data.
2012-04-03 Daiki Ueno <ueno@unixuser.org>
src: several leaks fixed in rec-crypt.c.
* src/rec-crypt.c (rec_encrypt): Avoid leaks by properly closing
the gcrypt handlers in case of errors.
2012-03-27 Michał Masłowski <mtjm@mtjm.eu>
src: always provide encryption routines and their prototypes.
* src/Makefile.am [!CRYPT]: Build rec-crypt-dummy.c instead of
rec-crypt.c if encryption is disabled.
* src/rec-crypt-dummy.c: New file.
* src/rec.h: Unconditionalize encryption routine declarations.
2012-03-13 Jose E. Marchesi <jemarch@gnu.org>
* src/rec.h (GNU_REC_H): Sentinel of the header file renamed from
REC_H in order to avoid potential conflicts.
2012-03-07 Jose E. Marchesi <jemarch@gnu.org>
torture: some system tests for the recsel join functionality.
* torture/utils/recsel.sh (recsel-join-default-rset): New test.
(recsel-join-no-foreign): Likewise.
2012-03-04 Giuseppe Scrivano <gscrivano@gnu.org>
src,lib: use the `read-file' module from gnulib.
* lib/read-file.h: Imported from gnulib.
* lib/read-file.c: Likewise.
* utils/recutl.c (recutl_read_file): Call `fread_file' instead
of reimplementing it.
2012-03-02 Giuseppe Scrivano <giuseppe@southpole.se>
src: make some variables static.
* utils/recutl.c (recutl_sort_p): Make it static.
(recutl_order_rset): Likewise.
(recutl_order_by_field): Likewise.
(recutl_interactive_p): Likewise.
(recutl_indexes): Likewise.
(recutl_indexes_size): Likewise.
2012-03-02 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (recsel Invocation): Document -j|--join.
2012-03-02 Jose E. Marchesi <jco@terma.com>
src: partial implementation of rset mixing in joins.
* src/rec-db.c (rec_db_join): Add a record descriptor to the
joined record set.
2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
src: make the # operator to work with field subnames.
* src/rec-fex.c (rec_fex_parse_elem): Use rec_concat_strings.
* src/rec-utils.c (rec_concat_strings): New function.
* src/rec-sex.c (rec_sex_eval_node): Use the subname of the name
node, if present, in the evaluation of OP_SHA operations.
* torture/utils/recsel.sh (package-maintainers): New input file.
(recsel-sex-sharp-subname): New test.
2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
src: support for field subnames with dot notation in fexes.
* src/rec-fex.c (rec_fex_parse_elem): Support subnames in fexes.
* src/rec.h (REC_FNAME_FEX_RE): New constant.
2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
src,torture: fix a bug that caused to have empty records in query
results.
* torture/utils/recsel.sh (recsel-nonexistent-print): New test.
* src/rec-db.c (rec_db_query): Do not add empty records to the
result record set.
2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
src,utils: inner join implementation.
* src/rec-db.c (rec_db_merge_records): New function.
* utils/recsel.c (recsel_join): New global.
(recutl_print_help): Include help for -j.
(recsel_parse_args): Process the new command line option
-j|--join.
(recsel_process_data): Invoke rec_db_query with the proper join
option.
* src/rec-db.c (rec_db_query): Get a 'join' argument.
2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
src,torture,doc: implementation of the 'rec' field type.
* doc/recutils.texi (Other types): Documentation for the 'rec'
field type.
* torture/utils/recfix.sh (type-rec-norset): New input file.
(type-rec-nokey): Likewise.
(type-rec-key-notype): Likewise.
(type-rec-key-type): Likewise.
(type-rec-key-type-invalid): Likewise.
(recfix-type-rec-norset): New test.
(recfix-type-rec-nokey): Likewise.
(recfix-type-rec-key-notype): Likewise.
(recfix-type-rec-type): Likewise.
(recfix-type-rec-key-type-invalid): Likewise.
* src/rec-int.c (rec_int_check_field_type): Check using the type
of the key of the referred record set (if any) if the field is of
type 'rec'.
* src/rec-rset.c (rec_rset_fprops_s): New property key_p.
(rec_rset_update_field_props): Reset key_p.
(rec_rset_get_props): Initialize key_p.
(rec_rset_update_field_props): Update the key_p property.
(rec_rset_key): New function.
* src/rec-types.c (rec_type_rec): New function.
* torture/utils/recfix.sh (type-rec-valid): New input file.
(type-rec-invalid-empty): Likewise.
(type-rec-invalid-malformed): Likewise.
(recfix-type-rec-valid): New test.
(recfix-type-rec-invalid-empty): Likewise.
(recfix-type-rec-invalid-malformed): Likewise.
* src/rec-types.c (REC_TYPE_REC_DESCR_RE): New constant.
(REC_TYPE_DESCR_RE): Updated.
(rec_type_parse_rec): New function.
(rec_type_check_rec): Likewise.
* src/rec-int.c (rec_int_rec_type_p): Use REC_RECORD_TYPE_RE.
* src/rec.h (REC_RECORD_TYPE_RE): New constant.
* src/rec-types.c (REC_TYPE_REC_NAME): New constant.
(REC_TYPE_CLASS_RE): Updated.
2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
src: support for dot notation in selection expressions.
* src/rec-sex-ast.c (rec_sex_ast_node_s): Name structs now contain
a name and a subname.
(rec_sex_ast_node_set_name): Get a 'subname' argument.
(rec_sex_ast_node_name): Return the name.
(rec_sex_ast_node_destroy): Destroy both name and subname in a
name node.
(rec_sex_ast_node_subname): New function.
* src/rec-sex-lex.l: Rule for field names modified to accept two
field names separated by a dot character.
(rec_sex_lex_extract_subname): New function.
2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
src: remove obsolete and unused functionality from the rec writer.
* src/rec-writer.c (rec_write_record_with_rset): Function removed.
(rec_write_field_with_rset): Likewise.
(rec_write_field): Don't get a 'name' argument.
(rec_writer_s): Field 'password' removed.
(rec_writer_new_common): Don't initialize password.
(rec_write_field): Encryption support removed.
(rec_writer_set_password): Function removed.
* torture/Makefile.am (REC_WRITER_TSUITE): Tests for
rec_write_record_with_fex removed.
* src/rec-writer.c (rec_write_record_with_fex): Function removed.
* utils/recutl.c (recutl_eval_field_expression): Likewise.
2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
torture: failing unit test adapted to new API.
* torture/rec-writer/rec-write-rset.c: Add the 'mode' argument
when calling rec_write_rset.
2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
src,utils: set high-level logic moved to librec and recset
adapted.
* utils/recset.c (recset_process_add): Function removed.
(recset_process_set): Likewise.
(recset_process_ren): Likewise.
(recset_process_del): Likewise.
(recset_process_actions): Use the new function in the library.
* src/rec-db.c (rec_db_set): New function.
(rec_db_set_act_rename): Likewise.
(rec_db_set_act_set): Likewise.
(rec_db_set_act_add): Likewise.
(rec_db_set_act_delete): Likewise.
2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
src,utils: query, insert and delete high-level logic moved to
librec and utilities adapted.
* torture/utils/recdel.sh (recdel-index-list): New test.
(recdel-case-insensitive): Likewise.
(recdel-case-sensitive): Likewise.
* src/rec-db.c (rec_db_delete): New function.
* torture/utils/recins.sh (multiple-records-case): New input file.
(recins-case-insensitive): New test.
(recins-case-sensitive): New test.
* src/rec-rset.c (rec_rset_set_type): Get a const char* for the
'type' argument.
* src/rec-db.c (rec_db_insert): New function.
* torture/utils/recsel.sh (recsel_descriptor): New test.
* src/rec-writer.c (rec_writer_s): New field "collapse_p".
(rec_writer_new_common): Writers don't collapse output by default.
(rec_writer_set_collapse): New function.
* utils/recutl.c (recutl_indexes): Global is now a pointer to
size_t.
(recutl_init): Initialize recutl_indexes.
(recutl_index_p): Removed.
(recutl_index_add_random): Likewise.
(recutl_reset_indexes): Adapted to *size_t.
(recutl_num_indexes): Likewise.
(recutl_index): New function.
* src/rec-writer.c (rec_write_rset): Get a 'mode' argument.
* src/rec-db.c (rec_db_query): Uniq the records if requested by
the user.
* utils/recsel.c (recsel_parse_args): Set recsel_write_mode when
-P and -R are found.
(recsel_print_values): Global removed.
(recsel_print_row): Global removed.
2012-02-28 Jose E. Marchesi <jemarch@gnu.org>
src,utils,torture: new writer modes values and values_row, and
some improvements in the writer algorithms.
* utils/recutl.c (recutl_write_db_to_file): Write the db into the
file only if there are record sets to write. Otherwise create an
empty file.
* src/rec-writer.c (rec_write_string): New function.
* torture/rec-writer/rec-write-comment.c
(rec_write_comment_nominal): Added test with three lines.
* torture/rec-writer/rec-write-record.c (rec_write_record_values):
New unit test.
(rec_write_record_values_row): Likewise.
* torture/rec-writer/rec-write-field.c (rec_write_field_values):
New unit test.
(rec_write_field_values_row): Likewise.
* src/rec-writer.c (rec_write_field_with_rset): Implement
REC_WRITER_VALUES and REC_WRITER_VALUES_ROW semantics.
* src/rec.h (rec_writer_mode_e): New write modes REC_WRITER_VALUES
and REC_WRITER_VALUES_ROW.
2012-02-28 Jose E. Marchesi <jemarch@gnu.org>
src: random indexes support added to rec_db_query.
* src/rec-db.c (rec_db_query): Get an INDEX paramerter pointing to
a list of index intervals.
(rec_db_record_selected_p): Likewise.
(rec_db_record_selected_p): Handle indexes.
(rec_db_add_random_indexes): New function.
(rec_db_indexes_p): New function.
2012-02-28 Jose E. Marchesi <jemarch@gnu.org>
src: first version of rec_db_query.
* src/rec-db.c (rec_db_query): New function.
(rec_db_process_fex): New function.
(rec_db_record_selected_p): New function.
* src/rec.h: Prototype for rec_db_query.
2012-02-27 Jose E. Marchesi <jemarch@gnu.org>
src: small changes in rec-db.
* src/rec-db.c (rec_db_s): Field 'size' is now of type size_t.
(rec_db_destroy): Be a no-operation if NULL is passed.
(rec_db_size): Return a size_t value.
(rec_db_get_rset): The 'position' argument is now a size_t.
(rec_db_insert_rset): Likewise.
(rec_db_remove_rset): Likewise.
(rec_db_type_p): Get a const char* argument.
2012-02-27 Jose E. Marchesi <jemarch@gnu.org>
torture: fix offline make perf.
* torture/utils/Makefile.am (perf): Invoke $(srcdir)/p-recsel.sh
and set srcdir.
2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
python: start of the python bindings for librec.
* python/README: New file.
* python/setup.py: Likewise.
* python/recmodule.c: Likewise.
(prec_version): New function.
(initrec): Likewise.
(prec_functions): New global.
2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
src,doc,torture: support for UUID field type and UUID auto fields.
* torture/utils/config.sh.in (UUID_SUPPORT): Set to @have_uuid@.
* torture/utils/recfix.sh (uuid-fields-ok): New input file.
(uuid-fields-invalid): Likewise.
(recfix-uuid-ok): New test.
(recfix-uuid-invalid): Likewise.
* doc/recutils.texi (Other types): UUID type documented.
(%auto): Likewise.
* src/rec-int.c (rec_int_check_descriptor): Allow auto-incremented
fields of type uuid if suuport for uuids is compiled in.
* src/rec-rset.c (rec_rset_add_auto_fields): Handle REC_TYPE_UUID.
(rec_rset_add_auto_field_uuid): New function.
* src/rec.h (rec_type_kind_e): Added entry REC_TYPE_UUID.
* src/rec-types.c (REC_TYPE_UUID_NAME): New constant.
(REC_TYPE_CLASS_RE): Add REC_TYPE_UUID_NAME.
(rec_type_check_uuid): New function.
(rec_type_new): Handle REC_TYPE_UUID.
(rec_type_kind_str): Likewise.
(rec_type_check): Likewise.
(rec_type_parse_type_kind): Likewise.
* src/Makefile.am (librec_la_LIBADD): link with UUIDLIBS when
appropriate.
* configure.ac: Check for libuuid and subst UUIDLIBS.
Define the automake conditional UUID_TYPE.
* README-dev: List the dependency on libuuid.
2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
src,doc,torture: support for rewrite rules in field expressions.
* torture/utils/recsel.sh (recsel-fex-rewrite-all): New test.
(recsel-fex-rewrite-subscript-single): Likewise.
(recsel-fex-rewrite-subscript-multi): Likewise.
(recsel-fex-rewrite-several): Likewise.
* torture/rec-fex/rec-fex-elem-rewrite-to.c
(rec_fex_elem_field_rewrite_to_default): New unit test.
(rec_fex_elem_field_rewrite_to_nominal): Likewise.
* torture/Makefile.am (REC_FEX_TSUITE): Added
rec-fex/rec-fex-elem-field-rewrite-to.c.
* torture/rec-fex/tsuite-rec-fex.c (tsuite_rec_fex): Added
test_rec_fex_elem_rewrite_to.
* torture/rec-fex/rec-fex-elem-rewrite-to.c: New file.
(test_rec_fex_elem_rewrite_to): New function.
* doc/recutils.texi (Field Expressions): Documentation for rewrite
rules added.
* torture/rec-writer/rec-write-field.c (rec_write_field_rewrite):
New unit test.
(rec_write_field_sexp_rewrite): Likewise.
* src/rec-writer.c (rec_write_record_with_fex): Invoke
rec_write_field passing the rewrite_to property of the fex elem.
(rec_write_field): Get an extra argument 'name'.
(rec_write_field_with_rset): Likewise.
(rec_write_record_with_rset): Adapt to new
rec_write_field_with_rset.
(rec_write_field_str): Likewise.
* src/rec-fex.c (rec_fex_parse_elem): The 'str' field must contain
a copy of the textual entry (including rewrite rules and
subscripts) and not just the field name.
(rec_fex_elem_rewrite_to): New function.
* src/rec.h (REC_FNAME_SUB_RE): Allow the inclusion of a rewrite
rule at the end of the entry.
* src/rec-fex.c (rec_fex_elem_s): New field 'rewrite_to'.
(rec_fex_parse_elem): Parse the rewrite rule if it is present in
the fex entry.
2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
* TESTS: Regenerated.
2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
torture: performance tests for recsel using a sex with regexp
matching.
* torture/utils/p-recsel.sh (recsel-200-records-sex-regexp): New
test.
(recsel-500-records-sex-regexp): Likewise.
(recsel-1000-records-sex-regexp): Likewise.
(recsel-10000-records-sex-regexp): Likewise.
(recsel-20000-records-sex-regexp): Likewise.
2012-02-25 Jose E. Marchesi <jemarch@gnu.org>
torture: support for performance test, and some performance recsel
tests.
* torture/utils/testutils.sh: Get a second parameter 'perf'.
(test_tool): Calculate and print timing statistics if $perf is not
empty.
* torture/utils/p-recsel.sh: New file.
* torture/utils/Makefile.am (perf): New rule.
* Makefile.am (perf): Likewise.
2012-02-25 Jose E. Marchesi <jemarch@gnu.org>
utils: fix short option for --random in help strings.
* utils/recutl.c (recutl_print_help_record_selection): The short
command line option for --random is -m not -R.
2012-02-25 Jose E. Marchesi <jemarch@gnu.org>
src,utils,torture: support for compound field names removed, and
code cleanup.
* torture/utils/recset.sh (recset-rename-all-key): Don't use a
compound field name.
* doc/recutils.texi (Compound Field Names): Section removed,
because it is now obsolete.
(mdb2rec Examples): Removed examples involving compound field
names.
* src/rec.h (REC_FNAME_RE): Remove the trailing colon.
* torture/utils/recsel.sh (compound-names): Input file removed,
since there are not compound names anymore.
(recsel-sex-field-names): Test removed.
(recsel-sex-field-names-2): Likewise.
* src/rec-sex-lex.l (FIELD_NAME): Set to contain just one name
part.
* src/rec-fex.c (rec_fex_parse_str_simple): Remove the trailing :
from the field names if present.
(rec_fex_parse_elem): Likewise.
* torture/rec-fex/rec-fex-elem-field-name-str.c: Removed.
* torture/rec-field-name/rec-field-name-p.c: Renamed.
* torture/rec-field-name/rec-field-name-normalise.c: Renamed from
rec-field-name-part-normalise.c.
* torture/rec-field-name/rec-field-name-destroy.c: File removed.
* torture/rec-field-name/rec-field-name-str-p.c: Likewise.
* torture/rec-field-name/rec-field-name-size.c: Likewise.
* torture/rec-field-name/rec-field-name-set.c: Likewise.
* torture/rec-field-name/rec-field-name-ref-p.c: Likewise.
* torture/rec-field-name/rec-field-name-new.c: Likewise.
* torture/rec-field-name/rec-field-name-get.c: Likewise.
* torture/rec-field-name/rec-field-name-eql-p.c: Likewise.
* torture/rec-field-name/rec-field-name-dup.c: Likewise.
* torture/rec-field-name/tsuite-rec-field-name.c: Removed test
cases for the no longer existing rec_field_name_* functions.
* utils/recins.c (recins_parse_args): Adapted to the new field
names.
* utils/mdb2rec.c (get_field_name): Likewise.
(process_table): Likewise.
* utils/rec2csv.c (rec2csv_parse_args): Likewise.
(rec2csv_generate_csv): Likewise.
* utils/csv2rec.c (field_cb): Likewise.
* utils/recset.c (recset_process_add): Likewise.
(recset_process_set): Likewise.
(recset_process_ren): Likewise.
(recset_process_del): Likewise.
* utils/recutl.c (recutl_order_by_field): Field name is now a NULL
terminated string.
* utils/recsel.c (recutl_sort_by_field): Likewise.
(recsel_group_by_field): Likewise.
* src/rec-types.c (rec_type_check_int): Get a const char*
argument.
(rec_type_check_bool): Likewise.
(rec_type_check_range): Likewise.
(rec_type_check_real): Likewise.
(rec_type_check_size): Likewise.
(rec_type_check_line): Likewise.
(rec_type_check_regexp): Likewise.
(rec_type_check_date): Likewise.
(rec_type_check_email): Likewise.
(rec_type_check_enum): Likewise.
(rec_type_check_field): Likewise.
* src/rec-crypt.c (rec_encrypt): Get const char* arguments.
(rec_decrypt): Likewise.
(rec_decrypt_field): Likewise.
(rec_decrypt_record): Likewise.
(rec_encrypt_field): Likewise.
* src/rec-sex-parser.c (rec_sex_parser_set_in): Get a const char *
argument.
(rec_sex_parser_run): Likewise.
* src/rec-sex.c (rec_sex_destroy): Be a no-operation if NULL is
passed.
(rec_sex_compile): Get a const char * argument.
(rec_sex_eval_node): Adapted to new field names.
* src/rec-int.c (rec_int_rec_type_p): Get a const char * argument.
(rec_int_rec_type_p): Use REC_FNAME_RE instead of
REC_FNAME_PART_RE.
* src/rec-types.c (rec_type_check): Get a const char * argument.
* src/rec-int.c (rec_int_check_field_type): Simplified, since
there are no compound field names anymore.
(rec_int_check_record_mandatory): Adapted to the new field names.
(rec_int_check_record_unique): Likewise.
(rec_int_check_record_prohibit): Likewise.
(rec_int_check_record_key): Likewise.
(rec_int_check_descriptor): Likewise.
* src/rec-writer.c (rec_writer_destroy): Be a no-operation if NULL
is passed.
(rec_write_field_with_rset): Adapted to the new field names.
(rec_write_field_name): Likewise.
(rec_write_record_with_fex): Likewise.
* src/rec-parser.c (rec_parser_new): Get a const char* argument.
(rec_parser_new_str): Likewise.
(rec_parser_destroy): Be a no-operation if a NULL pointer is
passed.
(rec_parse_field_name): Store the field name in a char string.
(rec_parse_field_name_part): Removed.
(rec_parse_field): Adapted to the new field names.
(rec_parse_field_name_str): Removed.
(rec_parse_field_name_str): Return a char*.
(rec_parse_record_str): Get a const char* argument.
* src/rec-fex.c (struct rec_fex_elem_s): Use a const char* for the
referred field(s) name.
(rec_fex_init): New function.
(rec_fex_destroy): Be a no-operation if a NULL pointed is passed.
(rec_fex_new): Use const chars* for the field names.
(rec_fex_check): Get const char* parameters for the strings.
(rec_fex_size): Return a size_t.
(rec_fex_elem_field_name): Return a const char *.
(rec_fex_elem_set_field_name): Get a const char * argument and
return a boolean denoting out-of-memory.
(rec_fex_elem_field_name_str): Removed.
(rec_fex_member_p): Get a const char * argument for the field
names.
(rec_fex_append): Likewise.
(rec_fex_parse_str_simple): Get const char* arguments for the
strings.
(rec_fex_parse_str_subscripts): Likewise.
(rec_fex_parse_elem): Likewise.
* src/rec-rset.c (struct rec_rset_fprops_s): fname is now a const
char *.
(struct rec_rset_s): order_by_field is now a const char*.
(rec_rset_order_by_field): Return a const char *.
(rec_rset_destroy): Adapted to the new field names.
(rec_rset_dup): Likewise.
(rec_rset_set_type): Likewise.
(rec_rset_rename_field): Likewise.
(rec_rset_field_confidential_p): Likewise.
(rec_rset_get_field_type): Likewise.
(rec_rset_set_order_by_field): Likewise.
(rec_rset_sort): Likewise.
(rec_rset_group): Likewise.
(rec_rset_record_compare_fn): Likewise.
(rec_rset_update_field_props): Likewise.
(rec_rset_get_props): Likewise.
(rec_rset_add_auto_field_int): Likewise.
(rec_rset_add_auto_field_date): Likewise.
* src/rec-field-name.c (rec_field_name_equal_p): New function.
* src/rec-record.c (rec_record_field_p): Get a const char* for the
field name.
(rec_record_get_num_fields_by_name): Likewise.
(rec_record_get_field_by_name): Likewise.
(rec_record_remove_field_by_name): Likewise.
(rec_record_uniq): Adapted to the new field names.
* src/rec-field.c (rec_field_name_str): Removed.
(rec_field_equal_p): Use strcmp to compare field names.
(rec_field_destroy): Be a no-operation if passed a NULL pointer.
(rec_field_init): New function.
(rec_field_new): Adapted to the new field names, and handle out of
memory eventualities.
(rec_field_dup): Likewise.
(rec_field_to_comment): Handle out-of-memory conditions properly.
* src/rec-field-name.c (rec_field_name_normalise): Renamed from
rec_field_name_part_normalise.
(rec_field_name_p): Renamed from rec_field_name_str_p.
(rec_std_field_name_new): Removed.
(rec_field_name_destroy): Likewise.
(rec_field_name_size): Likewise.
(rec_field_name_get): Likewise.
(rec_field_name_set): Likewise.
(rec_field_name_dup): Likewise.
(rec_field_name_eql_p): Likewise.
(rec_field_name_equal_p): Likewise.
(rec_field_name_ref_p): Likewise.
(rec_field_name_str_p): Likewise.
(rec_field_name_part_str_p): Remove
(rec_std_field_name): Return a const char*.
* src/rec.h (REC_FNAME_PART_RE): Removed.
(rec_field_name_*): Function prototypes removed.
* src/rec-field.c (rec_field_s): Change the 'name' field to be a
NULL terminated string.
(rec_field_name): Return a const char*.
(rec_field_set_name): Get the name as a const char * and return a
boolean indicating out-of-memory.
(rec_field_value): Return a const char*.
(rec_field_source): Return a const char*.
(rec_field_set_source): Get a const char * and return a boolean
indicating out-of-memory.
(rec_field_location_str): Return a const char*.
(rec_field_char_location_str): Return a const char*.
2012-02-24 Jose E. Marchesi <jemarch@gnu.org>
src: documentation improvements in the public header.
* src/rec.h: Improve the documentation of the functions related
with the rec_field ADT.
2012-02-22 Jose E. Marchesi <jemarch@gnu.org>
src,utils: handle out-of-memory conditions.
* src/rec-rset.c (rec_rset_add_auto_field_date): Return a boolean
indicating whether there was enough memory to complete the
operation.
(rec_rset_add_auto_field_int): Likewise.
(rec_rset_add_auto_fields): Return a copy of the record set or
NULL in an out-of-memory condition.
(rec_rset_sort): Return a copy of the record set, or NULL in an
out-of-memory condition.
* utils/recsel.c (recsel_process_data): Emit an out of error
message when appropriate.
* utils/recins.c (recins_insert_record): Likewise.
(recins_add_new_record): Likewise.
* utils/recfix.c (recfix_do_auto): Likewise.
(recfix_do_sort): Likewise.
* utils/rec2csv.c (rec2csv_process_data): Likewise.
* src/rec-rset.c (rec_rset_init): New function.
(rec_rset_new): Use rec_rset_init and rec_rset_destroy in
out-of-memory conditions.
(rec_rset_destroy): Be a no-operation if NULL is passed.
(rec_rset_destroy): Also assume that other ADT destructors behave
the same.
(rec_rset_dup): Use rec_rset_init and rec_rset_destroy in
out-of-memory conditions.
(rec_rset_group): Return a copy of RSET or NULL if out of memory.
(rec_rset_merge_records): Return a copy of TO_RECORD, or NULL if
out of memory.
* src/rec-mset.c (rec_mset_destroy): Be a no-op if the passed
pointer is NULL.
(rec_mset_init): New function.
(rec_mset_new): Call to rec_mset_init and rec_mset_destroy if
in an end-of-memory condition.
(rec_mset_dup): Likewise.
(rec_mset_sort): API changed to return false if there is not
enough memory to perform the operation, leaving the original mset
untoched.
(rec_mset_insert_at): Call rec_mset_elem_destroy when out of memory.
(rec_mset_elem_init): New function.
(rec_mset_insert_after): Call rec_mset_elem_destroy when out of
memory.
(rec_mset_add_sorted): Likewise.
(rec_mset_elem_destroy): Be a no-operation if called with NULL.
* src/rec-record.c (rec_record_dup): Use rec_record_init and
rec_record_destroy in out-of-memory conditions.
(rec_record_init): New function.
(rec_record_new): Use rec_record_init.
(rec_record_destroy): Be a no-op if the passed pointer is NULL.
* src/rec-field-name.c (rec_field_name_set): Return false if
strdup returns NULL.
* src/rec-crypt.c (rec_encrypt_field): Return false if strdup
returns NULL.
* src/rec-field.c (rec_field_set_location): Avoid a segmentation
fault if malloc returns NULL.
2012-02-20 Giuseppe Scrivano <giuseppe@southpole.se> (tiny change)
src,utils: fail gracefully on allocation errors.
* src/rec-parser.c (rec_parse_field): Return an error if `new' was
not allocated correctly.
* utils/recsel.c (main): Fail gracefully if `db' was not allocated
correctly.
2012-01-19 Jose E. Marchesi <jemarch@gnu.org>
utils: error reporting must always use recutl_fatal or
recutl_error.
* utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Use recutl_fatal
instead of fprintf.
(RECORD_SELECTION_ARGS_CASES): Added a trailing \n to an error
message missing it.
2012-01-17 Jose E. Marchesi <jemarch@gnu.org>
doc: use same optarg names in --help outputs and the manual.
* doc/recutils.texi (recsel Invocation): Use same optarg names
than in the synopsis used in --help.
(recins Invocation): Likewise.
(recdel Invocation): Likewise.
(recset Invocation): Likewise.
* utils/recutl.c (recutl_print_help_record_selection): Likewise.
2012-01-17 Jose E. Marchesi <jemarch@gnu.org>
doc: make the texinfo documentation easier to find.
* man/Makefile.am (rec2csv.1): Use the 'recutils' manual instead
of the name of the utilities.
(csv2rec.1): Likewise.
(mdb2rec.1): Likewise.
(recdel.1): Likewise.
(recfix.1): Likewise.
(recinf.1): Likewise.
(recins.1): Likewise.
(recsel.1): Likewise.
(recset.1): Likewise.
(recfmt.1): Likewise.
* doc/recutils.texi: Entries for the individual utilities in the
info index.
2012-01-16 Jose E. Marchesi <jemarch@gnu.org>
src,utils: fixes of typos in message strings.
* src/rec-int.c (rec_int_check_rset): Use 'shall' instead of
'should' in text messages.
(rec_int_check_descriptor): Likewise.
* utils/recins.c (recutl_print_help): Typos in help strings fixed.
2012-01-15 Jose E. Marchesi <jemarch@gnu.org>
recsel: print an error if an invalid fex is passed to -p,-P or -R.
* utils/recsel.c (recsel_parse_args): Print an error message if an
invalid fex is passed to -p, -P or -R.
2012-01-14 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation of -G,--group-by.
* doc/recutils.texi (recsel Invocation): Documentation of
-G|--group-by.
2012-01-14 Jose E. Marchesi <jemarch@gnu.org>
torture: tests for the group-by operation.
* torture/utils/recsel.sh (group-records): New input file.
(recsel-group-records): New test.
(recsel-group-records-sort): Likewise.
(recsel-group-records-non-existing-field): Likewise.
(recsel-group-one-record): Likewise.
(recsel-group-records-missing): Likewise.
2012-01-14 Jose E. Marchesi <jemarch@gnu.org>
librec,torture: record sorting criteria adjusted to keep the
relative positions of 'equal' records.
* torture/utils/recfix.sh (Bool): Fix expected result to expect
the sorting algorithm to keep the relative order of equal fields.
(unsorted-int-with-equals): New input file.
(unsorted-range-with-equals): Likewise.
(unsorted-real-with-equals): Likewise.
(unsorted-lex-with-equals): Likewise.
(unsorted-date-with-equals): Likewise.
(recfix-sort-ints-with-equals): New test.
(recfix-sort-ranges-with-equals): Likewise.
(recfix-sort-reals-with-equals): Likewise.
(recfix-sort-lex-with-equals): Likewise.
(recfix-sort-dates-with-equals): Likewise.
* src/rec-rset.c (rec_rset_record_compare_fn): Keep the relative
order of 'equal' fields when sorting. This implies a penalty in
performance, but makes the sorting algorithm to show a more
predictable behaviour, especially when using for record grouping.
2012-01-14 Jose E. Marchesi <jemarch@gnu.org>
recsel,librec: implementation of the group-by operation.
* src/rec-rset.c (rec_rset_group): New function.
(rec_rset_merge_records): New function.
* utils/recsel.c (recsel_process_data): Invoke rec_rset_group_by
if a group-by field was specified in the command line.
* src/rec.h: Prototype for rec_rset_group.
* utils/recsel.c (recsel_group_by_field): New global.
(GNU_longOptions): New option --group-by.
(recutl_print_help): Documentation for -G|--group-by.
(recsel_parse_args): Manage -G|--group-by.
2012-01-13 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.5.
* utils/recutl.c: Include time.h.
* NEWS: Date updated in the 1.5 entry.
* configure.ac: Version number changed to 1.5.
2012-01-13 Jose E. Marchesi <jemarch@gnu.org>
torture,utils: make the tests run properly in CRLF systems, and
missing header included in recutl.c.
* utils/recutl.c: Include stdint.h, since int32_t is used in the
file.
* torture/utils/testutils.sh: Post-process the output of the tools
to remove CR characters. This avoid the tests to fail when
running in MSDOS or Windows systems. Problem reported and patch
sent by Bruno Haible.
2012-01-13 Jose E. Marchesi <jemarch@gnu.org>
* gnulib update.
2012-01-12 Jose E. Marchesi <jco@terma.com>
librec: enumeration mixing in rec-parser fixed.
* src/rec-parser.c (rec_parser_init_common): Reset parser->error
to REC_PARSER_NOERROR.
2012-01-12 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.4.93.
* configure.ac: Version number changed to 1.4.93.
2012-01-12 Jose E. Marchesi <jemarch@gnu.org>
Portability issues with random and variadic macros fixed.
* utils/recutl.c (recutl_index_add_random): Use random_r and
srandom_r instead of random and srandom.
(recutl_index_add_random): Be careful to generate the requested
number of randoms.
* lib/random_r.c: Imported from gnulib.
* m4/random_r.m4: Likewise.
* configure.ac: Require C99 with the macro AC_PROG_CC_C99.
2012-01-11 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.4.92.
* configure.ac: Version number changed to 1.4.92.
2012-01-11 Jose E. Marchesi <jemarch@gnu.org>
torture: don't run encryption related tests if crypt support was
not compiled into the library.
* torture/utils/recsel.sh: Run encryption related tests only if
crypt_support is "yes".
It defaults to "yes".
* torture/utils/Makefile.am (TESTS_ENVIRONMENT): Pass
crypt_support to the test scripts.
2012-01-11 Jose E. Marchesi <jemarch@gnu.org>
utils: accept -s|--password only if compiled with encryption
support.
* utils/recutl.h: Define ENCRYPTION_SHORT_ARGS.
* utils/recins.c (recins_parse_args): Likewise.
* utils/recsel.c (recsel_parse_args): Process -s|--password only
if compiled with encryption support.
2012-01-11 Jose E. Marchesi <jemarch@gnu.org>
* gnulib modules fprintf-posix, vasprintf-posix and printf-posix
imported.
2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
* strcasestr gnulib module imported.
* gnulib update.
2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
librec,utils: handle the return values of asprintf and fread.
* utils/recutl.c (recutl_read_file): Handle fread errors.
* src/rec-int.c (ADD_ERROR): Don't ignore the value returned by
asprintf.
* utils/rec2csv.c (rec2csv_generate_csv): Likewise.
* src/rec-types.c (rec_type_check_range): Likewise.
(rec_type_check_size): Likewise.
* src/rec-rset.c (rec_rset_add_auto_field_int): Likewise.
* src/rec-parser.c (rec_parser_perror): Likewise.
* src/rec-fex.c (rec_fex_str): Likewise.
2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.4.91.
* configure.ac: Version number changed to 1.4.91.
2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
librec: compilation problem in remote descriptors support fixed.
* src/rec-int.c (rec_int_merge_remote): Missing variable
tmpfile_des added.
2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.4.90.
* NEWS: Entry for 1.5.
* configure.ac: Version number changed to 1.4.90.
* po/de.po: Updated.
* po/fi.po: Likewise.
* po/nl.po: Likewise.
* po/recutils.pot: Likewise.
* po/sv.po: Likewise.
2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
Warning fixes.
* utils/recfmt.c (recfmt_process_db): Useless variable rset_size
removed.
* src/rec-mset.c (rec_mset_dup): Useless variable new_elem
removed.
(rec_mset_sort): Likewise.
(rec_mset_dump): Use %zd in printf to print size_t values.
* utils/recinf.c (print_info_file): Likewise.
* src/rec-int.c (rec_int_check_rset): Likewise.
(rec_int_check_descriptor): Likewise.
* libcsv/libcsv.c: Copyright year update.
2012-01-10 Jose E. Marchesi <jco@terma.com>
* doc/recutils.texi: FSF copyright years updated in recutils.texi.
2012-01-10 Jose E. Marchesi <jemach@gnu.org>
Removal of warnings.
* utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Likewise.
* utils/recutl.c (recutl_index_list_parse): Likewise.
* src/rec-fex.c (rec_fex_check): Likewise.
* src/rec-int.c (rec_int_merge_remote): Likewise.
* src/rec-rset.c (rec_rset_rename_field): Likewise.
* src/rec-record.c (rec_record_subset_p): Unused variables removed.
(rec_record_uniq): Likewise.
* src/rec-types.c (rec_type_check_re): Unused function removed.
* src/rec-field-name.c: Include rec-utils.h.
* src/rec-mset.c (rec_mset_iterator_next): Unused variable removed.
2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
Unit tests fixes.
* src/rec-writer.c (rec_write_field_with_rset): Don't write the
blank character before field values if printin sexps.
* torture/rec-field/rec-field-to-comment.c
(rec_field_to_comment_nominal): Adjusted to the new behaviour of
the writer with fields having empty values.
2012-01-09 Jose E. Marchesi <jemarch@gnu.org>
librec: rec_mset_append gets an extra argument indicating the
type of element for counting.
* src/rec-mset.c (rec_mset_append): Get an argument elem_type.
(rec_mset_dup): Use new rec_mset_append.
* src/rec.h: New argument elem_type to rec_mset_append.
* utils/recset.c (recset_process_add): Likewise.
(recset_process_set): Likewise.
* utils/recins.c (recins_insert_record): Likewise.
(recins_parse_args): Likewise.
* utils/mdb2rec.c (process_table): Likewise.
(process_table): Likewise.
* utils/csv2rec.c (field_cb): Likewise.
(record_cb): Likewise.
* src/rec-int.c (rec_int_merge_remote): Likewise.
* src/rec-parser.c (rec_parse_record): Likewise.
(rec_parse_record): Likewise.
(rec_parse_record): Likewise.
* src/rec-rset.c (rec_rset_set_type): Likewise.
2012-01-09 Jose E. Marchesi <jemarch@gnu.org>
torture: adapt unit tests to the new librec api.
* torture/rec-parser/rec-parse-record.c: Adapted to the new librec
API.
* torture/rec-writer/rec-write-db.c: Likewise.
* torture/rec-writer/rec-write-record-with-fex.c: Likewise.
* torture/rec-writer/rec-write-rset.c: Likewise.
* torture/rec-writer/rec-write-record.c: Likewise.
* torture/rec-parser/rec-parse-record-str.c: Likewise.
2012-01-09 Jose E. Marchesi <jemarch@gnu.org>
algol68: dist problem fixed.
* algol68/Makefile.am (nodist_librec_a68_a_SOURCES): Don't
distribute the generated C files from the algol68 sources.
2012-01-09 Jose E. Marchesi <jco@terma.com>
torture: get some unit tests up to date.
* torture/Makefile.am (REC_MSET_TSUITE): rec-mset-get.c renamed to
rec-mset-get-at.c.
* torture/rec-mset/rec-mset-get.c (rec_mset_get_empty): Likewise.
* torture/rec-mset/rec-mset-count.c: Include rec.h instead of
rec-mset.h.
(rec_mset_count_existing): Adapted to the new mset semantics.
* torture/rec-mset/rec-mset-type-p.c: Likewise.
* torture/rec-mset/rec-mset-register-type.c: Likewise.
* torture/rec-mset/rec-mset-new.c: Likewise.
* torture/rec-mset/rec-mset-get.c: Likewise.
* torture/rec-mset/rec-mset-dup.c: Likewise.
(rec_mset_dup_nonempty): Adapted to the new mset semantics.
2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
utils: support for the selection of random records in recsel,
recins, recdel and recset.
* torture/utils/recset.sh (recset-random-all): New test.
(recset-random-one): Likewise.
* torture/utils/recdel.sh (recdel-random-all): New test.
(recdel-random-all-force): Likewise.
* torture/utils/recins.sh (one-record): New input file.
(recins-random-all): New test.
(recins-random-one): Likewise.
* torture/utils/recsel.sh (recsel-random-all): New test.
(recsel-random-one): Likewise.
(recsel-num-and-random): Likewise.
(recsel-sex-and-random): Likewise.
(recsel-quick-and-random): Likewise.
* doc/recutils.texi (recsel Invocation): --random|-m documented.
(recins Invocation): Likewise.
(recdel Invocation): Likewise.
(recset Invocation): Likewise.
* utils/recset.c (recutl_random): New global.
(recset_process_actions): Manage random records.
* utils/recdel.c (recutl_random): New global.
(recdel_delete_records): Manage random records.
(recutl_print_help): Document --random|-r.
* utils/recins.c (recutl_random): New global.
(recins_add_new_record): Manage random records.
* doc/recutils.texi (recins Invocation): Likewise.
* utils/recsel.c (recsel_process_data): Manage random indexes.
* utils/recutl.c (recutl_reset_indexes): New function.
* utils/recsel.c (recutl_print_help): Synopsis updated with -r.
* utils/recutl.h (RECORD_SELECTION_ARGS): RANDOM_ARG added.
(RECORD_SELECTION_LONG_ARGS): Entry for random.
(RECORD_SELECTION_SHORT_ARGS): Likewise.
* utils/recsel.c (recutl_random): New global.
* utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Manage
--random|-r.
* utils/recutl.c (recutl_index_add_random): New function.
(recutl_print_help_record_selection): Documentation for
--random|-r.
(recutl_random): New global variable.
* utils/recutl.h (recutl_index_add_random): New function
prototype.
2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
recutl: remove an arbitrary limit in the number of indexes.
* utils/recutl.c (recutl_index_s): New structure.
(recutl_index_list_parse): Allocate the indexes list dynamically.
2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
Copyright years update.
* utils/recutl.c (recutl_print_version): Copyright updated.
* doc/recutils.texi: Likewise.
2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for the new indexes system.
* utils/recsel.c (recutl_print_help): Documentation updated.
* utils/recutl.c (recutl_print_help_record_selection): Likewise.
* doc/recutils.texi (recsel Invocation): Update description of -n.
(recins Invocation): Likewise.
(recdel Invocation): Likewise.
(recset Invocation): Likewise.
2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
torture: tests for the new indexes system.
* utils/recins.c (recins_add_new_record): Dup the record to
insert, since it could be used to replace more than one record.
* torture/utils/recins.sh (recins-replace-range): New test.
(recins-replace-several-indexes): Likewise.
* torture/utils/recset.sh (recset-set-field-in-range): New test.
(recset-set-field-in-several-indexes): Likewise.
* torture/utils/recsel.sh (recsel-index-toobig): New test.
(recsel-index-range-1): Likewise.
(recsel-index-range-2): Likewise.
(recsel-index-range-3): Likewise.
(recsel-index-several): Likewise.
(recsel-index-invalid-1): Likewise.
(recsel-index-invalid-2): Likewise.
(recsel-index-invalid-3): Likewise.
(recsel-index-invalid-4): Likewise.
2012-01-07 Jose E. Marchesi <jemarch@gnu.org>
utils: support for lists of indexes including ranges.
* utils/recset.c (recutl_num): Global variable removed.
(recset_process_actions): Use the new indexes system.
(recset_process_ren): Likewise.
* utils/recins.c (recutl_num): Global variable removed.
(recins_add_new_record): Use the new indexes system.
* utils/recdel.c (recutl_num): Global variable removed.
(recdel_delete_records): Use new indexes system.
(recdel_parse_args): Likewise.
(main): Likewise.
* utils/recsel.c (recsel_process_data): Use new indexes system.
* utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Use
recutl_index_list_parse to handle -n.
* utils/recutl.c (recutl_num_indexes): New function.
(recutl_index_p): New function.
* utils/recsel.c (recutl_num): Global variable deleted.
* utils/recutl.c (INDEX_LIST_ENTRY_RE): New constant.
(INDEX_LIST_RE): Likewise.
(recutl_index_list_parse): New function.
* utils/recutl.h (recutl_index_list_s): New structure.
2012-01-07 Jose E. Marchesi <jemarch@gnu.org>
recins: implement the auto fields using the rec_rset facilities.
* utils/recins.c (recins_add_auto_field_int): Function deleted.
(recins_add_auto_field_date): Likewise.
(recins_add_auto_fields): Likewise.
(recins_insert_record): Use rec_rset_add_auto_fields instead of
recins_add_auto_fields.
(recins_insert_record): Likewise.
2012-01-07 Jose E. Marchesi <jemarch@gnu.org>
recfix: New operation --auto.
* torture/utils/recfix.sh (missing-auto-fields): New input file.
(recfix-missing-auto-fields): New test.
* doc/recutils.texi (recfix Invocation): Documentation for the
--auto operation.
(recfix Examples): Example with --auto added.
* utils/recfix.c (recfix_op): RECFIX_OP_AUTO.
(GNU_longOptions): Entry for --auto.
(recutl_print_help): Documentation for --auto.
(recfix_parse_args): Handle the --auto operation.
(main): Likewise.
* src/rec-rset.c (rec_rset_add_auto_fields): New function.
(rec_rset_add_auto_field_int): Likewise.
(rec_rset_add_auto_field_date): Likewise.
Include errno.h and locale.h.
* utils/recfix.c (recfix_do_auto): New function.
2012-01-07 Jose E. Marchesi <jemarch@gnu.org>
recsel: Support for --uniq|-U.
* torture/utils/recsel.sh (duplicated-fields): New input file.
(recsel-uniq): New test.
(recsel-uniq-long): New test.
* doc/recutils.texi (recsel Invocation): Documentation for
--uniq|-U.
* utils/recsel.c (GNU_longOptions): New command line argument
--uniq|-U.
(recutl_print_help): Documentation for --uniq|-U.
(recsel_parse_args): Handle --uniq|-U.
(recsel_uniq): New global.
(recsel_process_data): Remove duplicated fields in the processed
records if requested by the user with --uniq|-U.
2012-01-04 Jose E. Marchesi <jemarch@gnu.org>
librec: Initial implementation of the rec_record_uniq function.
* src/rec-record.c (rec_record_uniq): New function.
* src/rec.h: Prototype for rec_record_uniq.
2012-01-02 Jose E. Marchesi <jemarch@gnu.org>
mset: disposal callback is now actually used. Memory leak fixed.
* src/rec-mset.c (rec_mset_elem_destroy): Dispose the data stored
in elements upon removal.
2012-01-02 Jose E. Marchesi <jemarch@gnu.org>
librec: improved sort support.
* src/rec-record.c (rec_record_dup): Don't pass a 'sorted'
argument to rec_mset_dup.
* src/rec-rset.c (rec_rset_dup): Likewise.
(rec_rset_sort): Use rec_mset_sort.
* src/rec-mset.c (rec_mset_sort): New function.
(rec_mset_dup): Don't sort.
* src/rec.h: New prototype for rec_mset_sort, and rec_mset_dup
modified to not get the 'sorted' argument.
2011-12-28 Jose E. Marchesi <jemarch@gnu.org>
writer: don't write a blank after the field name if the field
value is empty.
* torture/utils/recsel.sh (empty-field-values): New input file.
(recsel-empty-field-values): New test.
* src/rec-writer.c (rec_write_field_with_rset): Print a blank
after the field name only if the field value is not the empty
string.
2011-12-28 Jose E. Marchesi <jemarch@gnu.org>
torture: system tests for csv2rec.
* torture/utils/csv2rec.sh: New file.
(simple-table): New input file.
(csv2rec-simple-table): New test.
(simple-table-quotes): New input file.
(csv2rec-simple-table-quotes): New test.
(empty-columns): New input file.
(csv2rec-empty-columns): New test.
(csv2rec-empty-columns-omit): Likewise.
(multi-line): New input file.
(csv2rec-multi-line): New test.
* torture/utils/Makefile.am (TESTS): csv2rec.sh added.
2011-12-28 Jose E. Marchesi <jemarch@gnu.org>
* src/rec.h: Documentation for the rec_int_check_* functions.
2011-12-26 Jose E. Marchesi <jemarch@gnu.org>
librec,utils: new sorting mechanism on top of the new mset
implementation.
* torture/utils/rec2csv.sh (sort): New input file.
(rec2csv-sort): New test.
(rec2csv-sort-field): Likewise.
* src/rec-rset.c (rec_rset_record_compare_fn): Incorrect results
were being calculated if a non-existing field was given to -S.
* torture/utils/recsel.sh (sort): New input file.
(recsel-sort): New test.
(recsel-sort-field): Likewise.
(recsel-sort-field-nonexist): Likewise.
* utils/recfix.c (recfix_do_sort): Rewritten to use rec_rset_sort.
* utils/rec2csv.c (rec2csv_process_data): Likewise.
* utils/recsel.c (recsel_process_data): Likewise.
* src/rec-rset.c (struct rec_rset_s): Field ordered removed.
(rec_rset_set_ordered): Function removed.
(rec_rset_ordered): Function removed.
* utils/rec2csv.c (rec2csv_parse_args): Likewise.
* utils/recfmt.c (main): Likewise.
* utils/recfix.c (recfix_do_sort): Likewise.
* utils/recsel.c (recsel_parse_args): Don't use a sorting parser.
* utils/recutl.c (recutl_sorting_parser): Function removed.
* src/rec-parser.c (struct rec_parser_s): Fiels related with
sorting removed.
(rec_parse_rset): Don't sort.
(rec_parser_set_ordered): Function removed.
(rec_parser_ordered): Likewise.
(rec_parser_sort_rset): Likewise.
* src/rec-record.c (rec_record_dup): Pass sorted=false to
rec_mset_dup.
* src/rec-mset.c (rec_mset_dup): Take a new parameter 'sort'.
2011-12-25 Jose E. Marchesi <jemarch@gnu.org>
mset,recins: fix some problems on the removal of elements.
* src/rec-mset.c (rec_mset_remove_elem): Update statistics.
(rec_mset_remove_at): Don't update statistics, because
rec_mset_remove_elem already does that internally.
* utils/recins.c (recins_add_new_record): Fix the replace of
selected record using the provided record.
2011-12-25 Jose E. Marchesi <jemarch@gnu.org>
utils: missing rec_record_set_container added.
* utils/mdb2rec.c (process_table): Set the rset container in the
record to insert.
* utils/recins.c (recins_insert_record): Likewise.
2011-12-25 Jose E. Marchesi <jemarch@gnu.org>
librec,utils: new mset iterators and API used in the codebase.
* utils/mdb2rec.c (process_table): Use rec_mset_append.
* utils/rec2csv.c (rec2csv_generate_csv): Use iterators.
(rec2csv_determine_fields): Likewise.
* utils/csv2rec.c (field_cb): Use rec_mset_append.
(record_cb): Likewise.
* utils/recfix.c (recfix_do_crypt): Use iterators.
* utils/recfmt.c (recfmt_process_db): Likewise.
* utils/recset.c (recset_process_actions): Use iterators.
(recset_process_add): Use rec_mset_append.
(recset_process_set): Likewise.
* src/rec-mset.c (rec_mset_elem_destroy): Don't invoke the
disposal callback, since that is executed as part of
gl_list_remove_node.
(rec_mset_elem_set_type): New function.
(rec_mset_iterator_next): Update the list_node field of the mset
elements retrieved by iterating the list.
* utils/recins.c (recins_add_auto_field_int): Use iterators and
new mset API.
(recins_add_auto_field_date): Likewise.
(recins_insert_record): Likewise.
(recins_parse_args): Likewise.
(recins_add_new_record): Likewise.
* src/rec-parser.c (rec_parse_rset): Set the container for new
records.
* src/rec-record.c (rec_record_s): New field 'container' to hold a
pointer managed by the user of the record.
(rec_record_new): Initialize the container pointer.
(rec_record_dup): Copy the container pointer.
(rec_record_container): New function.
(rec_record_set_container): New function.
* utils/recsel.c (recsel_process_data): Use iterators.
* src/rec-parser.c (rec_parse_rset): Use mset functions.
(rec_parse_record): Likewise.
* src/rec-sex.c (rec_sex_eval): Use iterators.
* src/rec-int.c (rec_int_check_rset): Use iterators.
(rec_int_check_record_types): Likewise.
(rec_int_check_record_secrets): Likewise.
(rec_int_check_record_key): Likewise.
(rec_int_check_descriptor): Likewise.
(rec_int_merge_remote): Likewise.
* src/rec-writer.c (rec_write_record_with_rset): Use iterators.
(rec_write_rset): Likewise.
* src/rec-rset.c (rec_rset_num_elems): Return a size_t type.
(rec_rset_num_records): Likewise.
(rec_rset_num_comments): Likewise.
(rec_rset_mset): New function.
(rec_rset_update_field_props): Use iterators.
(rec_rset_update_types): Likewise.
* src/rec-record.c (rec_record_get_num_fields_by_name): Use
iterators.
(rec_record_get_field_by_name): Likewise.
* src/rec-mset.c (rec_mset_search): Use iterators.
* src/rec-record.c (rec_record_get_field_index): Use iterators.
(rec_record_get_field_index_by_name): Likewise.
(rec_record_contains_value): Likewise.
(rec_record_get_field): Function removed.
(rec_record_get_comment): Likewise.
(rec_record_remove_at): Likewise.
* src/rec-mset.c (rec_mset_iter_gl2mset): New function.
(rec_mset_iter_mset2gl): Likewise.
(rec_mset_iterator_next): Use gl2mset and mset2gl instead of
memcpy.
* src/rec-rset.c (rec_rset_rename_field): Use iterators.
* src/rec-record.c (rec_record_new): Note about MSET_FIELD and
MSET_COMMENT added.
(rec_record_subset_p): Rewritten to use mset iterators.
(rec_record_mset): New function.
(rec_record_get_elem): Function removed.
* src/rec.h (MSET_FIELD): New constant.
(MSET_COMMENT): Likewise.
2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
* src/rec.h: Comments API properly documented.
2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
mset: implementation of iterators ala gl_lib.
* src/rec-mset.c (rec_mset_iterator): New function.
(rec_mset_iterator_next): Likewise.
(rec_mset_iterator_free): Likewise.
* src/rec.h: Prototypes for new functions related to iterators:
rec_mset_iterator, rec_mset_iterator_next and
rec_mset_iterator_free.
2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
mset: use an explicit type for element types.
* src/rec-mset.c (struct rec_mset_elem_s): Use rec_mset_type_t.
(struct rec_mset_s): count is now of type size_t.
(rec_mset_get_at): Use new types.
(rec_mset_remove_at): Likewise.
(rec_mset_insert_at): Likewise.
(rec_mset_type_p): Likewise.
(rec_mset_register_type): Likewise.
(rec_mset_count): Likewise.
(rec_mset_get_at): Likewise.
(rec_mset_first): Likewise.
(rec_mset_next): Likewise.
* src/rec.h: Change mset functions using positions to use size_t
variables instead of ints.
(rec_mset_type_t): New data type.
2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
src: move the stuff of rec-mset.h to rec.h and document the API.
* src/rec-record.c: Stop including rec-mset.h.
* src/rec-rset.c: Likewise.
* src/rec-mset.c: Include rec.h instead of rec-mset.h.
* src/Makefile.am (librec_la_SOURCES): rec-mset.h removed.
* src/rec-mset.h: File deleted.
* src/rec.h: Stuff from rec-mset.h moved there.
(rec_mset_new): New prototype, and documented.
(rec_mset_destroy): Likewise.
(rec_mset_dup): Likewise.
(rec_mset_type_p): Likewise.
(rec_mset_register_type): Likewise.
(rec_mset_get_at): Likewise.
(rec_mset_insert_at): Likewise.
(rec_mset_append): Likewise.
(rec_mset_add_sorted): Likewise.
(rec_mset_insert_after): Likewise.
(rec_mset_remove_at): Likewise.
(rec_mset_remove): Likewise.
(rec_mset_search): Likewise.
(rec_mset_first): Likewise.
(rec_mset_next): Likewise.
(rec_mset_elem_new): Likewise.
(rec_mset_elem_destroy): Likewise.
(rec_mset_elem_type): Likewise.
(rec_mset_elem_data): Likewise.
(rec_mset_elem_set_data): Likewise.
(rec_mset_elem_equal_p): Likewise.
2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
mset: several optimizations.
* src/rec-rset.c (rec_rset_get_elem): Likewise.
(rec_rset_get_record): Likewise.
(rec_rset_get_comment): Likewise.
* src/rec-record.c (rec_record_get_elem): rec_mset_get is now
called rec_mset_get_at.
(rec_record_get_field): Likewise.
(rec_record_get_comment): Likewise.
* src/rec-mset.c (rec_mset_remove_at): Use gl_list_get_at instead
of gl_list_remove_at.
(rec_mset_get): Optimization when the requested element is of any
type.
(rec_mset_get_at): Renamed from rec_mset_get.
2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
torture: xfail tests failing are reported as failures.
* torture/utils/testutils.sh: Accumulate an error if an xfail test
does not fail.
2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
src: auto fields not having an explicit type are now implicitly
typed as integers.
* doc/recutils.texi (%auto): Document that auto fields are
integers by default.
* torture/utils/recins.sh (auto-notype): New input file.
(recins-auto-notype): New test.
* torture/utils/recfix.sh (recfix-auto-notype): Adapted to new
semantics.
(auto-invalid-type): New input file.
(recfix-auto-invalid-type): New test.
* src/rec-rset.c (rec_rset_update_field_props): Auto fields not
having an explicit type are implicitly typed as integers.
2011-12-20 Jose Marchesi <jco@wilhelm>
Tasktool operations.
* TODO: Task 20 resolved to 'DISCARDED'.
Note added for task 24.
Task 16 resolved to 'DISCARDED'.
Task 10 edited.
Task 35 resolved to 'DONE'.
Task 26 resolved to 'DONE'.
2011-12-20 Jose E. Marchesi <jco@terma.com>
recfix: interactive password prompt.
* doc/recutils.texi (recfix Invocation): Document the interactive
behaviour of recfix when it needs a password.
* utils/recfix.c (recfix_parse_args): Prompt for a password to the
user if needed, and ignore empty passwords.
2011-12-20 Jose E. Marchesi <jco@terma.com>
recins: avoid code duplication in encryption code.
* utils/recins.c (recins_encrypt_record): New function.
(recins_insert_record): Use recins_encrypt_record.
(recins_add_new_record): Likewise.
2011-12-20 Jose E. Marchesi <jco@terma.com>
utils: interactive password prompt in recins.
* doc/recutils.texi (recins Encryption): Document the interactive
behaviour of recins when it needs a password.
* utils/recins.c (recins_insert_record): Prompt for a password to
the user if needed, and ignore empty passwords.
(recins_add_new_record): Likewise.
2011-12-20 Jose E. Marchesi <jco@terma.com>
utils: interactive password prompt in recsel.
* utils/recsel.c (recsel_process_data): Use the provided password
only if it not the empty string.
* doc/recutils.texi (recsel Encryption): Document the interactive
behaviour of recsel when it needs a password.
* utils/recsel.c (recsel_process_data): Ask for a password if
recsel was called interactively, a password is needed and -s was
provided alone.
(GNU_longOptions): allow optional arguments to PASSWORD_ARG.
* utils/recutl.c: New global variable recutl_interactive_p.
(recutl_interactive): New function.
(recutl_init): Initialize recutl_interactive.
2011-12-20 Jose E. Marchesi <jemarch@gnu.org>
* gnulib module getpass-gnu imported.
2011-12-20 Jose E. Marchesi <jemarch@gnu.org>
src: support for hexadecimal and octal literals in selection
expressions.
* doc/recutils.texi (SEX Operands): Document the usage of
hexadecimal and octal literals in selection expressions.
* torture/utils/recsel.sh (recsel-sex-integer-equal-hex): New
test.
(recsel-sex-integer-equal-oct): Likewise.
* src/rec-sex-lex.l: Modified to recognize hexadecimal and octal
literals as integers.
2011-12-19 Jose E. Marchesi <jemarch@gnu.org>
src: support for hexadecimal and octal numbers in type
descriptions, field values and %size entries.
* doc/recutils.texi (%size): Mention that hexadecimal and octal
numbers can be used in %size entries.
* src/rec-utils.h (REC_INT_SIZE_RE): Rewritten to allow hex and
octal constants.
* torture/utils/recfix.sh (size-exact-hex): New input file.
(size-exact-oct): Likewise.
(recfix-size-exact-hex): New test.
(recfix-size-exact-oct): Likewise.
* doc/recutils.texi (Escalar types): Document that hexadecimal and
octal numbers can be used to define ranges.
(String types): Ditto for 'size' types.
* src/rec-types.c (rec_type_parse_size): Make sure the user
specified type is not negative.
* torture/utils/recfix.sh (ranges-hex-invalid): New input file.
(recfix-range-hex-xfail): New test.
(ranges-oct-ok): New input file.
(ranges-oct-invalid): Likewise.
(recfix-range-oct-ok): New test.
(recfix-range-oct-xfail): Likewise.
(type-size-valid): New input file.
(type-size-valid-hex): Likewise.
(type-size-valid-oct): Likewise.
(type-size-invalid): Likewise.
(type-size-invalid-negative): Likewise.
(recfix-type-size-valid): New test.
(recfix-type-size-valid-hex): Likewise.
(recfix-type-size-valid-oct): Likewise.
(recfix-type-size-invalid): Likewise.
(recfix-type-size-invalid-negative): Likewise.
* src/rec-utils.c (rec_parse_int): Support hexadecimal numbers.
* src/rec-types.c (REC_TYPE_INT_RE): New constant.
(REC_TYPE_RANGE_DESCR_RE): Use REC_TYPE_INT_RE.
(REC_TYPE_SIZE_DESCR_RE): Likewise.
* torture/utils/recfix.sh (type-int-valid): Add integers in both
hexadecimal and octal formats.
(type-int-invalid): Likewise.
(ranges-hex-ok): New input file.
(recfix-ranges-hex-ok): New test.
* src/rec-types.c (REC_TYPE_INT_VALUE_RE): Allow letters a-f and
A-F in hexadecimal constants.
2011-12-10 Jose E. Marchesi <jemarch@gnu.org>
src,utils: initial support for hexadecimal and octal numbers.
* src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Use
REC_TYPE_INT_VALUE_RE.
(REC_TYPE_SIZE_DESCR_RE): Likewise.
* src/rec-int.c (rec_int_check_descriptor): Error message fixed.
* doc/recutils.texi (Escalar types): Document octal and
hexadecimal numbers.
* src/rec-types.c (REC_TYPE_INT_VALUE_RE): Modified to allow a 0x
prefix.
* src/rec-utils.c (rec_atoi): Pass 'base' as 0 to strtol to
support numbers in hexadecimal and octal representation.
2011-12-19 Jose E. Marchesi <jco@terma.com>
utils: make recfix to exit with an error status if there is a
parse error.
* utils/recutl.c (recutl_parse_db_from_file): Return 'false' if a
syntax error is found by the parser.
2011-12-06 Jose E. Marchesi <jemarch@gnu.org>
src: allow tabs in blank lines between records.
* src/rec-parser.c (rec_parse_rset): Make the parser to ignore
tabs appearing between records.
2011-12-05 Jose E. Marchesi <jemarch@gnu.org>
src: support for several numeration bases in rec_atoi.
* src/rec-utils.c (rec_parse_int): Likewise.
* src/rec-sex-lex.l (rec_sex_lex_extract_index): Likewise.
* src/rec-sex.c (ATOI_VAL): Likewise.
(rec_sex_op_real_p): Likewise.
* src/rec-rset.c (rec_rset_record_compare_fn): Pass the base
argument to rec_atoi.
* src/rec-utils.c (rec_atoi): Get a new argument with the base of
the number.
2011-11-27 Jose E. Marchesi <jemarch@gnu.org>
librec: use rec_match intead of regex functions.
* src/rec-fex.c (rec_fex_check): Use rec_match instead of
regcomp/regexec.
2011-11-27 Jose E. Marchesi <jemarch@gnu.org>
qa: syntax fixes.
* algol68/rec.a68: Trailing blanks removed.
* .x-sc_prohibit_xalloc_without_use: New file.
2011-11-27 Jose E. Marchesi <jemarch@gnu.org>
utils,librec: encrypted fields are now decrypted when using field
expressions in recsel.
* torture/utils/recsel.sh (confidential): New input file.
(recsel-confidential): New test.
(recsel-confidential-fex): New test.
(recsel-confidential-fex-value): New test.
(recsel-confidential-num): New test.
* utils/recsel.c (recsel_process_data): Pass recsel_password to
recutl_eval_field_expression.
* utils/recutl.c (recutl_eval_field_expression): Get a new
argument, 'password'.
(recutl_eval_field_expression): Set the passed password, if any,
to decrypt confidential fields.
* src/rec-writer.c (rec_write_record_with_fex): Decrypt
confidential fields before printing them out.
2011-11-27 Jose E. Marchesi <jemarch@gnu.org>
librec: initialize passwords in writers, and avoid code
replication.
* src/rec-writer.c (rec_writer_new_str): Initialize the password
field to NULL.
(rec_writer_new_common): New function.
(rec_writer_new): Use rec_writer_new_common.
(rec_writer_new_str): Likewise.
2011-11-26 Jose E. Marchesi <jemarch@gnu.org>
Distribution fixes.
* etc/Makefile.am (dist_lisp_DATA): Install and distribute
ob-rec.el.
* README-dev: Remove information incorrectly copied from the
libgnupdf README-dev file.
2011-11-23 Jose E. Marchesi <jemarch@gnu.org>
Wrappers for flexible buffers in the Algol68 frontend.
* algol68/rec.a68: Cast pointers to void* for values of mode CSTR.
Keep 'rec init' and 'rec fini'.
(MODE RECBUF): New mode.
(rec buf new): New procedure.
(rec buf close): New procedure.
(rec buf putc): New procedure.
(rec buf puts): New procedure.
(rec buf rewind): New procedure.
2011-11-20 Jose E. Marchesi <jemarch@gnu.org>
librec: avoid duplication of regular expressions and generalize
the usage of the rec_match_* functions.
* src/rec-types.c (rec_type_check_int): Use rec_match instead of
rec_type_check_re.
(rec_type_check_field): Likewise.
(rec_type_check_bool): Likewise.
(rec_type_check_real): Likewise.
(rec_type_check_line): Likewise.
(rec_type_check_email): Likewise.
(rec_type_check_enum): Likewise.
(rec_type_check_re): Function deleted.
* src/rec-sex.c (rec_sex_eval_node): Use rec_match and
rec_match_insensitive.
* src/rec-utils.c (rec_match_int): New function.
(rec_match_insensitive): New function.
* src/rec-rset.c (rec_rset_type_field_p): Use
REC_FNAME_LIST_CS_RE.
(rec_rset_type_field_fex): Likewise.
(rec_rset_type_field_type): Likewise.
* src/rec-field-name.c (rec_field_name_part_str_p): Use rec_match
instead of regcomp/regexec.
(rec_field_name_str_p): Likewise.
* src/rec-int.c (rec_int_rec_type_p): Likewise.
* src/rec-fex.c (rec_fex_check): Use the REC_*_RE constants.
* src/rec-utils.h (REC_FNAME_LIST_CS_RE): New constant.
(REC_FNAME_LIST_RE): Likewise.
(REC_FNAME_LIST_SUB_RE): Likewise.
2011-11-20 Jose E. Marchesi <jemarch@gnu.org>
librec: avoid duplication of error reporting code in rec-int.c.
* src/rec-int.c (ADD_ERROR): New macro.
(rec_int_check_rset): Use ADD_ERROR.
(rec_int_check_rset): Likewise.
(rec_int_check_record_mandatory): Likewise.
(rec_int_check_record_unique): Likewise.
(rec_int_check_record_prohibit): Likewise.
(rec_int_check_record_secrets): Likewise.
(rec_int_check_record_key): Likewise.
(rec_int_check_descriptor): Likewise.
(rec_int_merge_remote): Likewise.
2011-11-20 Jose E. Marchesi <jemarch@gnu.org>
librec: avoid duplication of special field names in the codebase.
* src/rec-parser.c (rec_parse_rset): Use rec_std_field_name.
* src/rec-int.c (rec_int_check_descriptor): Use rec_std_field_name.
(rec_int_merge_remote): Likewise.
(rec_int_check_record_mandatory): Likewise.
(rec_int_check_record_unique): Likewise.
(rec_int_check_record_prohibit): Likewise.
(rec_int_check_record_key): Likewise.
* src/rec-rset.c (rec_rset_rename_field): Use rec_std_field_name.
(rec_rset_set_type): Likewise.
(rec_rset_type): Likewise.
(rec_rset_url): Likewise.
(rec_rset_update_size_constraints): Likewise.
(rec_rset_update_field_props): Likewise.
(rec_rset_update_types): Likewise.
* src/rec-field-name.c (rec_std_field_name_s): New structure type.
(rec_std_field_name_s): Global containing the names for the
standard fields.
(rec_std_field_name): New function.
2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
utils: new function recutl_yesno.
* utils/recutl.c (recutl_yesno): New function.
2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
* gnulib update, and module readline imported.
2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
manual: document the -q,--quick command line argument in the
utilities supporting it.
* doc/recutils.texi (recsel Invocation): Documentation for the
-q,--quick command line argument.
(recdel Invocation): Likewise.
(recins Invocation): Likewise.
(recset Invocation): Likewise.
2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
torture: tests for -q,--quick.
* torture/utils/recset.sh (multiple-records): New input file.
(recset-quick-simple): New test.
* torture/utils/recins.sh (recins-quick-simple): New test.
* torture/utils/recdel.sh (recdel-quick-simple): New test.
* torture/utils/recsel.sh (recsel-quick-simple): New test.
(recsel-quick-and-sex): Likewise.
(recsel-sex-and-quick): Likewise.
(recsel-num-and-quick): Likewise.
(recsel-quick-and-num): Likewise.
2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
recins: memory bug when several records get replaced fixed.
* utils/recins.c (recins_add_new_record): Insert copies of the new
record to insert, to cover cases where more than one record is
replaced.
2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
utils: recset, recins, recdel and recsel adapted to support the
-q, --quick option.
* utils/recset.c (recset_process_actions): Honour
recutl_quick_str.
(recset_process_ren): Likewise.
* utils/recins.c (recins_add_new_record): Honour recutl_quick_str.
* utils/recdel.c (recdel_delete_records): Honour recutl_quick_str.
(recdel_parse_args): Take into account recutl_quick_str when
deciding whether a request to delete all records.
(main): Likewise.
* src/rec-record.c (rec_record_contains_value): New function.
* utils/recutl.h (RECORD_SELECTION_SHORT_ARGS): Updated with q:.
* utils/recset.c: New global recutl_quick_str.
* utils/recdel.c: New global recutl_quick_str.
(recutl_print_help): Document the usae of -q, --quick.
* utils/recins.c: New global recutl_quick_str.
(recutl_print_help): Document the usage of -q, --quick.
* utils/recutl.c (recutl_print_help_record_selection): Document
the usage of -q, --quick.
* utils/recutl.h (RECORD_SELECTION_ARGS): QUICK_ARG added.
(RECORD_SELECTION_LONG_ARGS): Entry for QUICK_ARG.
(RECORD_SELECTION_ARGS_CASES): Likewise.
* utils/recsel.c (recsel_process_data): Improve grammar in
comment.
(recutl_print_help): Document the usage of -q, --quick.
(recutl_quick_str): New global variable.
2011-11-15 Jose E. Marchesi <jemarch@gnu.org>
rec-init and rec-fini defined in the algol68 binding.
* algol68/rec.a68 (rec init): New procedure.
(rec fini): Likewise.
2011-11-13 Jose E. Marchesi <jemarch@gnu.org>
Initial work on the Algol 68 binding for librec.
* algol68/nameseed: New file.
* Makefile.am (SUBDIRS): Recurse into algol68/ in case an Algol68
compiler is available.
* configure.ac: Check for the ca68 compiler.
* algol68/Makefile.am: New file.
* algol68/rec.a68: New file.
Define 'rec major version', 'rec minor version' and 'rec version
string'.
2011-11-06 Jose E. Marchesi <jemarch@gnu.org>
configure: generation of the lexer fixed.
* configure.ac: Define LEX_OUTPUT_ROOT so ylwrap can work
propertly when flex is installed.
2011-11-03 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.4.
* NEWS: Updated.
* configure.ac: Version number changed to 1.4.
2011-11-02 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.3.91.
* configure.ac: Version number changed to 1.3.91.
2011-11-02 Jose E. Marchesi <jemarch@gnu.org>
src: endianess problem fixed in rec_encrypt/rec_decrypt.
* src/rec-utils.h: Include stdlib.h and declare rec_endian_swap.
* src/rec-utils.c (rec_endian_swap): New function.
* src/rec-crypt.c (rec_encrypt): Store the crc always in
little-endian.
(rec_decrypt): Restore the crc in little-endian.
2011-11-01 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-crypt.c (rec_encrypt): Store the crc bytes in a way
independant of the endianess.
2011-11-01 Jose E. Marchesi <jemarch@gnu.org>
torture: portability problem with malloc.h fixed.
* torture/rec-fex/rec-fex-str.c: Include stdlib.h instead of
malloc.h to avoid problems in systems not featuring the second
header.
2011-10-31 Jose E. Marchesi <jemarch@gnu.org>
torture: support the running of the tests in Windows.
* torture/utils/testutils.sh: Append $EXEEXT to the utility name.
Source config.sh.
* torture/utils/config.sh.in (EXEEXT): Make it available to the
tests.
2011-10-31 Jose E. Marchesi <jemarch@gnu.org>
Fixes to avoid warnings while compiling the codebase.
* src/rec-utils.c (rec_parse_regexp): Set result to NULL if there
is not match.
* src/rec-types.c (rec_type_descr_p): Get a const char* parameter.
(rec_type_new): Likewise.
* src/rec-rset.c (rec_rset_update_field_props): Make p and q const
char*.
* src/rec-utils.c (rec_skip_blanks): Get a const char** parameter.
(rec_parse_regexp): Likewise.
(rec_atoi): Likewise.
(rec_atod): Likewise.
(rec_extract_file): Likewise.
(rec_extract_url): Likewise.
(rec_extract_type): Likewise.
(rec_parse_int): Likewise.
(rec_extract_size_condition): Likewise.
* src/rec-rset.c (rec_rset_type_field_p): Make local pointer p
const.
* src/rec-writer.c (rec_write_record): Return
rec_write_record_with_rset.
(rec_write_field): Likewise with rec_write_field_with_rset.
* utils/recset.c (recset_process_actions): Parenthesis around &&
and || added.
* utils/recdel.c (recdel_delete_records): Likewise.
* utils/mdb2rec.c (process_table): Use column_name instead of
col->name.
* utils/recfix.c (recfix_do_crypt): Unused variable elem_record
removed.
(main): Unused variable db removed.
* utils/recutl.c: Include sys/stat.h.
2011-10-31 Jose E. Marchesi <jemarch@gnu.org>
torture: fix warnings in the rec-mset unit tests.
* torture/rec-mset/elem-types.h (type1_disp): Free s instead of
the void pointer.
(type2_disp): Likewise.
2011-10-31 Jose E. Marchesi <jemarch@gnu.org>a
Examples sections removed from the --help outputs.
* utils/csv2rec.c (recutl_print_help): Examples removed from
--help output.
* utils/recset.c (recutl_print_help): Likewise.
* utils/recsel.c (recutl_print_help): Likewise.
* utils/recins.c (recutl_print_help): Likewise.
* utils/recinf.c (recutl_print_help): Likewise.
* utils/recfmt.c (recutl_print_help): Likewise.
* utils/recdel.c (recutl_print_help): Likewise.
* utils/rec2csv.c (recutl_print_help): Likewise.
* utils/mdb2rec.c (recutl_print_help): Likewise.
2011-10-31 Jose E. Marchesi <jemarch@gnu.org>
gnulib update.
2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
configure: do not require flex and bison at build time.
* utils/recdel.c: Include xalloc.h.
* configure.ac: Use gl_BISON instead of AM_PROG_YACC.
2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
Don't run tests associated with confidential fields when building
the tools without crypt support.
* .gitignore: torture/utils/config.sh added.
* torture/utils/recfix.sh: include config.sh and test the
encryption support only if the utilities were built with that
support.
* configure.ac: Generate torture/utils/config.sh
* torture/utils/config.sh.in: New file.
* configure.ac (REC_CRYPT_SUPPORT): Define and subst
CRYPT_SUPPORT.
2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
Fixes for problems detected by the clang analyzer.
* src/rec-sex.c (rec_sex_eval_node): Take care about possible
divisions by zero when evaluating / and %.
* utils/csv2rec.c (main): Unused local variable 'out' removed.
* utils/recfmt.c (recfmt_process_db): Use rset_size to avoid
calculating the size of the rset at every iteration.
* torture/rec-comment/rec-comment-set-text.c
(rec_comment_set_text_nominal): Use new version of
rec_comment_set_text.
* src/rec-comment.c (rec_comment_set_text): Get a pointer to
comment in order to set its value.
* src/rec-mset.c (rec_mset_remove_at): Unused local elem_type
removed.
* src/rec-parser.c (rec_parser_perror): Usage of uninitialized
pointer fixed.
2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.3.90.
* NEWS: Updated for 1.3.90.
* configure.ac: Version updated to 1.3.90.
2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (recsel Encryption): Written.
(recins Encryption): Written.
2011-10-29 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for %confidential fields.
* doc/recutils.texi (%confidential): Written.
2011-10-27 Jose E. Marchesi <jemarch@gnu.org>
Don't allow several %sort entries in record descriptors.
* doc/recutils.texi (%sort): Document that only one %sort per
record descriptor is allowed.
* torture/utils/recfix.sh (recfix-sort-several-fields-invalid):
New test.
* src/rec-int.c (rec_int_check_descriptor): It is an error to have
several %sort fields in a record descriptor.
2011-10-27 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for %sort.
* doc/recutils.texi (%sort): Written.
2011-10-26 Jose E. Marchesi <jemarch@gnu.org>
manual: documenttion for %mandatory, %prohibit, %unique, %key and
%auto rewritten.
* doc/recutils.texi (%mandatory and %prohibit): Written.
(%unique and %key): Written.
(%auto): Improved and relocated.
2011-10-25 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Record Descriptors): Reworked and simplified.
2011-10-16 Jose E. Marchesi <jemarch@gnu.org>
syntax fixes.
* utils/recdel.c: Don't include xalloc.h.
* .x-sc_prohibit_undesirable_word_seq: New file.
* .x-sc_prohibit_strings_without_use: New file.
* .x-sc_prohibit_path_max_allocation: New file.
* .x-sc_prohibit_doubled_word: Ignored lib/*.
* README-dev: Spell file systme.
2011-10-13 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Comments): Relocated.
(Fields and Records): Matusalen -> Matusalem.
2011-10-13 Jose E. Marchesi <jemarch@gnu.org>
manual: document the encryption options in recsel and recins.
* doc/recutils.texi (recsel Invocation): Global options added,
including a description of the --password argument.
(recins Invocation): Document --password.
(recins Invocation): Document --case-insensitive.
2011-10-12 Jose E. Marchesi <jemarch@gnu.org>
torture: tests for the --sort operation of recfix.
* torture/utils/recfix.sh (recfix-sort-ints): New test.
(recfix-sort-ranges): New test.
(recfix-sort-reals): New test.
(recfix-sort-lex): New test.
(recfix-sort-dates): New test.
(recfix-sort-booleans): New test.
2011-10-11 Jose E. Marchesi <jemarch@gnu.org>
* README-dev: URL to the git repo updated.
2011-10-07 Jose E. Marchesi <jemarch@gnu.org>
recfix: manage --encrypt when there are already encrypted fields
in the database.
* torture/utils/recfix.sh (recfix-encrypt-already-encrypted): New
test.
(recfix-encrypt-already-encrypted-force): New test.
* utils/recfix.c (recfix_do_crypt): Emit an error if an already
encrypted field is found, unless --force was specified in the
command line.
(recutl_print_help): --force documented.
(recfix_parse_args): Recognize --force.
* src/rec-crypt.c (rec_encrypt_field): Make sure the field is not
already encrypted before encrypting it.
2011-10-07 Jose E. Marchesi <jemarch@gnu.org>
utils: typo fixed in help string.
* utils/recsel.c (recutl_print_help): Typo in help string fixed.
2011-10-06 Jose E. Marchesi <jemarch@gnu.org>
build: documentation of dependencies updated.
* README-dev: Dependency on libgcrypt documented.
2011-10-05 Jose E. Marchesi <jemarch@gnu.org>
manual: little fix.
* doc/recutils.texi (mdb2rec Examples): Example fixed. Reported by
Sven Wick.
2011-10-04 Jose E. Marchesi <jemarch@gnu.org>
torture: tests for the --encrypt and --decrypt options of recfix.
* torture/utils/recfix.sh (recfix-encrypt): New test.
(recfix-encrypt-password-long): Likewise.
(recfix-encrypt-without-password): Likewise.
(recfix-encrypt-password-before-operation): Likewise.
(recfix-decrypt-invalid-password): Likewise.
2011-10-03 Jose E. Marchesi <jemarch@gnu.org>
torture: tests for the --check operation of recfix regarding
encryption, and some fixes.
* src/rec-int.c (rec_int_check_record_secrets): Return the number
of errors that occurred while checking the integrity.
* torture/utils/recfix.sh (recfix-with-operation): New test.
(recfix-confidential): Likewise.
(recfix-invalid-confidential): Likewise.
(recfix-confidential-with-unencrypted-fields): Likewise.
2011-10-03 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for recfix updated.
* doc/recutils.texi (recfix Invocation): Documentation for the new
synopsis of recfix, including a description of all the supported
operations.
(recfix Examples): Add more examples covering the several
supported operations.
2011-10-03 Jose E. Marchesi <jemarch@gnu.org>
* utils/recfix.c (recfix_do_crypt): Don't check integrity before
doing an en/decryption operation.
2011-10-03 Jose E. Marchesi <jemarch@gnu.org>
librec: more encryption related routines, and encryption support
in recfix.
* utils/recfix.c (recfix_do_crypt): Use rec_decrypt_record.
* src/rec-crypt.c (rec_decrypt_record): New function.
* src/rec-writer.c (rec_write_field_with_rset): Use
rec_decrypt_field.
* src/rec-crypt.c (rec_decrypt_field): New function.
* utils/recfix.c (recfix_do_crypt): Adapted to the new semantics
of rec_encrypt_record.
* utils/recins.c (recins_insert_record): Likewise.
(recins_add_new_record): Likewise.
* src/rec-crypt.c (rec_encrypt_field): New function.
(rec_encrypt_record): Use rec_encrypt_field.
2011-09-30 Jose E. Marchesi <jemarch@gnu.org>
* utils/recins.c (recins_insert_record): Use rec_encrypt_record.
(recins_encrypt_fields): Function removed.
* src/rec-crypt.c (rec_encrypt_record): New function.
* utils/recfix.c (main): Invoke the recfix_do_* functions
depending on the selected operation.
(recfix_do_check): New function.
(recfix_check_database): Renamed from recfix_process_data.
(recfix_parse_args): Made static, and adapted to use the new
recfix_do_* functions.
(recfix_do_sort): New function.
2011-09-30 Jose E. Marchesi <jemarch@gnu.org>
build: install lisp files in the proper directory.
* etc/Makefile.am: Install rec-mode.el in the proper place, and
use the dist_ prefix instead of the EXTRA_DIST automake variable.
Suggested by Ludovic Courtes.
2011-09-19 Jose E. Marchesi <jemarch@gnu.org>
lib: missing sorting cases added.
* src/rec-rset.c (rec_rset_record_compare_fn): Date sorting
algorithm fixed.
(rec_rset_record_compare_fn): Real sorting implemented.
(rec_rset_record_compare_fn): Likewise for booleans.
2011-09-11 Jose E. Marchesi <jemarch@gnu.org>
manual: argument description fixed.
* doc/recutils.texi (Common Options): The description of the '--'
option was truncated. Fixed.
2011-09-04 Jose E. Marchesi <jemarch@gnu.org>
recfix: normalise invocation to allow more commands.
* utils/recfix.c: New type recfix_op.
(recutl_print_help): Adapted to the new synopsis of recfix.
(recutl_print_help): Don't include examples in the --help output.
2011-09-01 Jose E. Marchesi <jemarch@gnu.org>
build: linking with libgcrypt fixed.
* src/Makefile.am (librec_la_LIBADD): Link with $LTLIBGCRYPT if
compiling with encryption support.
* utils/Makefile.am (COMMONLIBS): Likewise.
2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
crypt: fix build with crypt support disabled.
* src/rec-rset.c (rec_rset_get_props): Update confidential_p only
if compiling with encryption support.
2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
recfix: check for non-encrypted confidential fields.
* src/rec-int.c: Copyright year updated.
(rec_int_check_record): Call rec_int_check_record_secrets.
(rec_int_check_record_secrets): New function.
2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
lib: regression affecting auto fields fixed.
* utils/recins.c (recins_add_new_record): Fix regression causing
the loosing of the auto fields.
(recins_add_new_record): Avoid memory leak destroying
recins_record.
* src/rec-rset.c (rec_rset_get_props): Initialize confidential_p
to false.
2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
crypt: support for CRC and encrypted prefix.
* src/rec-crypt.c: Include crc.h.
(rec_decrypt): Check the CRC of decrypted data.
(rec_encrypt): Append the CRC when encrypting.
2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
gnulib: imported module crc.
* lib/crc.c: Imported from gnulib.
* lib/crc.h: Likewise.
2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-writer.c (rec_write_record_with_rset): New function.
(rec_write_field_with_rset): New function.
* utils/recsel.c (recsel_process_data): Set the password of the
writer, if specified on the command line.
* src/rec-writer.c (rec_writer_new): Initialize the password field
of the writer structure.
(rec_writer_destroy): Free the memory used by the password, if
any.
(rec_writer_set_password): New function.
* utils/recsel.c (recutl_print_help): Support the -s, --password
option.
(recsel_parse_args): Likewise.
* src/rec-crypt.c (rec_decrypt): New function.
2011-08-27 Jose E. Marchesi <jemarch@gnu.org>
* utils/recins.c: Include base64.h.
* gnulib base64 module imported.
2011-08-26 Jose E. Marchesi <jemarch@gnu.org>
* src/Makefile.am (librec_la_SOURCES): Compile rec-crypt.c if
encryption is supported.
* src/rec-crypt.c: New file.
* utils/recins.c (recins_encrypt_fields): New function.
* src/rec-rset.c (rec_rset_confidential): New function.
* utils/recins.c: New variable recins_password.
(recutl_print_help): Document -s,--password.
(recins_parse_args): Set recins_password.
* src/rec-utils.c (rec_encrypt): New function.
(rec_decrypt): New function.
(rec_passphrase_cb): New function.
* src/rec-utils.c: Include gcrypt.h.
* src/rec-int.c (rec_int_check_descriptor): Check for the value of
%confidential entries.
* src/rec-rset.c (rec_rset_rename_field): Rename field names in
%confidential fields.
(rec_rset_update_field_props): Set the confidential property of
fields.
2011-08-25 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (recfmt Templates): Typo fixed.
2011-08-24 Jose E. Marchesi <jemarch@gnu.org>
* doc/recutils.texi (Introduction): Comment about YAML.
2011-08-24 Jose E. Marchesi <jemarch@gnu.org>
* configure.ac: Complain if flex or bison are not found and exit.
2011-08-24 Jose E. Marchesi <jemarch@gnu.org>
* Time-stamp marks removed from the entire codebase and syntax
checks fixes.
2011-08-15 Thien-Thi Nguyen <ttn@gnuvola.org> (tiny change)
librec: Don't #include <config.h> in rec.h.
* src/rec.h: Don't #include <config.h>.
2011-08-05 Jose E. Marchesi <jemarch@gnu.org>
librec: acknowledge %sort entries when renaming fields.
* src/rec-rset.c (rec_rset_rename_field): Rename fields used as
sorting criteria in %sort: entries.
* torture/utils/recset.sh: Tests renaming fields updated to cover
%sort entries.
2011-08-05 Jose E. Marchesi <jco@terma.com>
* etc/ob-rec.el (org-babel-execute:rec): Separate header when
generating tables.
(org-babel-execute:rec): Generate raw data when executed with
results: verbatim.
2011-08-05 Jose E. Marchesi <jemarch@gnu.org>
ob-rec: support for :sort and minor fixes.
* etc/ob-rec.el (org-babel-execute:rec): Support for :sort added.
(org-babel-execute:rec): Emit rec data, and not csv, when executed
with results: scalar, html or code.
2011-07-29 Jose E. Marchesi <jemarch@gnu.org>
librec: sorting by date values implemented.
* src/rec-rset.c (rec_rset_record_compare_fn): Sorting by date
value implementing.
* src/rec-sex.c (rec_sex_eval_node): Use rec_timespec_subtract.
* src/rec-utils.c (rec_timespec_subtract): Moved from rec-sex.c.
2011-07-28 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for %sort and %typedef.
* doc/recutils.texi (Record Descriptors): Document %typedef in the
list of special fields.
(Record Descriptors): Likewise for %sort.
(recsel Invocation): Document -S,--sort.
(rec2csv Invocation): Likewise.
2011-07-21 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for the sorting option of recfix.
* doc/recutils.texi (recfix Invocation): Synopsis fixed.
(recfix Invocation): Document the --sort operation.
(recfix Examples): Example of --sort added.
2011-07-21 Jose E. Marchesi <jemarch@gnu.org>
recfix: support the phisical sort operation.
* utils/recfix.c (main): Use recutl_read_db_from_file.
(recfix_parse_args): Set the value of recfix_file from the command
line and complain if no file was provided.
(recutl_print_help): Document the new usage of the command.
(recutl_print_help): Documnt the --sort option.
(recfix_parse_args): Manage --sort.
(main): Update the rec file if an operation requires it.
2011-07-21 Jose E. Marchesi <jemarch@gnu.org>
librec: check the integrity of %sort entries, and tests.
* torture/utils/recfix.sh (recfix-sortcheck-valid): New test.
(recfix-sortcheck-with-blanks): Likewise.
(recfix-sortcheck-invalid-empty): Likewise.
(recfix-sortcheck-invalid-field-name): Likewise.
* src/rec-int.c (rec_int_check_descriptor): Make sure that %sort
fields have correct values.
2011-07-21 Jose E. Marchesi <jemarch@gnu.org>
librec: options -S,--sort supported in recsel and rec2csv.
* utils/rec2csv.c (recutl_print_help): Documentation for
--sort,-S.
(rec2csv_parse_args): Manage --sort, -S.
* utils/recsel.c: New command-line argument --sort, -S.
(recutl_print_help): Documentation for --sort, -S.
(recsel_parse_args): Manage -S.
* doc/recutils.texi (recinf Invocation): -S is not like
--print-sexps anymore.
* utils/recutl.c (recutl_sorting_parser): Get a field name as a
sorting criteria.
* src/rec-rset.c (rec_rset_update_field_props): %sort only has an
effect if order_by_field is not already set in the record set.
* src/rec-parser.c (rec_parser_new): Initialize order_by_field to
NULL.
(rec_parser_set_order_by_field): New function.
* src/rec-rset.c: New function.
(rec_rset_order_by_field): New function.
2011-07-19 Jose E. Marchesi <jemarch@gnu.org>
librec: record sorting implementation, and tools adjusted.
* utils/recsel.c (main): Likewise.
* utils/recfmt.c (main): Likewise.
* utils/rec2csv.c (main): Call recutl_sorting_parser with the
appropriate value.
* utils/recutl.c (recutl_sorting_parser): New function.
* utils/recutl.c (recutl_parse_db_from_file): Set the ordered
attribute of the parser to the value of the global recutl_sort_p.
* src/rec-parser.c (rec_parser_new): Initialise ordered_p to
false.
(rec_parser_set_ordered): New function.
(rec_parser_ordered): New function.
(rec_parse_rset): Set the ordered attribute of the newly created
record set to the desired value.
* src/rec-rset.c: New structure rec_rset_comment_s.
(rec_rset_elem_comment_new): Use rec_rset_comment_s.
(rec_rset_elem_comment): Likewise.
(rec_rset_comment_disp_fn): Likewise.
(rec_rset_comment_dup_fn): Likewise.
(rec_rset_set_ordered): New function.
(rec_rset_ordered): New function.
(rec_rset_insert_at): Insert sorting only if ordered_p.
(rec_rset_append): Likewise.
(rec_rset_append_record): Likewise.
(rec_rset_insert_after): Likewise.
(rec_rset_dup): Copy ordered_p.
2011-07-19 Jose E. Marchesi <jco@terma.com>
librec: use mset_add_sort in all record inserting operations in
rec-rset.
* src/rec-rset.c (rec_rset_insert_at): If the rset has a sort by
field and the element to be inserted is a record, insert it using
the sorting criteria instead of the requested location.
(rec_rset_append): Likewise.
(rec_rset_insert_after): Likewise.
2011-07-18 Jose E. Marchesi <jemarch@gnu.org>
librec: initial support for %sort.
* src/rec-rset.c (rec_rset_comment_compare_fn): New function.
(rec_rset_record_compare_fn): New function.
(rec_rset_update_field_props): Manage the %sort special field.
* src/rec-record.c (rec_record_new): Pass NULL for the compare
function to rec_mset_register_type.
* src/rec-mset.c (rec_mset_add_sorted): New function.
(rec_mset_new): Initialize the compare_fn function for types to
NULL.
(rec_mset_dup): Make a copy of compare_fn.
(rec_mset_register_type): Get a compare_fn argument.
(rec_mset_elem_compare_fn): New function.
* src/rec-mset.h: New type rec_mset_compare_fn_t.
* src/rec-rset.c: New attribute 'order_by_field' in struct
rec_rsets.
New structure rec_rset_record_s.
(rec_rset_new): Initialise the order by field name to NULL.
(rec_rset_destroy): Destroy the order by field name if it exists
in the record set.
(rec_rset_dup): Care about the order by field, if any.
(rec_rset_append_record): Use rec_mset_add_sorted to add the
record to the mset if there is a sort by field.
(rec_rset_elem_record_new): Insert a rec_rset_record_t instead of a
rec_record_t in the mset.
(rec_rset_record_disp_fn): Destroy a rec_rset_record_t structure,
including the contained record.
(rec_rset_record_dup_fn): Dup a rec_rset_record_t structure,
including the contained record.
2011-07-17 Jose E. Marchesi <jemarch@gnu.org>
torture: system tests for typedefs.
* torture/utils/recfix.sh (typedef-valid): New input file.
(typedef-valid-xfail): Likewise.
(typedef-valid-with-blanks): Likewise.
(typedef-valid-with-blanks-xfail): Likewise.
(typedef-valid-order): Likewise.
(typedef-valid-order-xfail): Likewise.
(typedef-valid-chain): Likewise.
(typedef-valid-chain-xfail): Likewise.
(typedef-valid-multiple): Likewise.
(typedef-valid-multiple-xfail): Likewise.
(typedef-invalid-bad-type): Likewise.
(typedef-invalid-chain-undefined): Likewise.
(typedef-invalid-chain-loop): Likewise.
(recfix-typedef-valid): New test.
(recfix-typedef-valid-xfail): Likewise.
(recfix-typedef-valid-with-blanks): Likewise.
(recfix-typedef-valid-with-blanks-xfail): Likewise.
(recfix-typedef-valid-order): Likewise.
(recfix-typedef-valid-order-xfail): Likewise.
(recfix-typedef-valid-chain): Likewise.
(recfix-typedef-valid-chain-xfail): Likewise.
(recfix-typedef-valid-multiple): Likewise.
(recfix-typedef-valid-multiple-xfail): Likewise.
(recfix-typedef-invalid-bad-type): Likewise.
(recfix-typedef-invalid-chain-undefined): Likewise.
(recfix-typedef-invalid-chain-loop): Likewise.
2011-07-17 Jose E. Marchesi <jemarch@gnu.org>
manual: documentation for %typedef.
* doc/recutils.texi (Field Types): Rewritten to introduce field
types in a clearer way.
(Declaring types): New section.
(Type descriptions): New section.
(Escalar types): Rewritten as a subsection.
(String types): Likewise.
(Enumerated types): Likewise.
(Other types): Likewise.
(Types and fields): New section.
2011-07-17 Jose E. Marchesi <jemarch@gnu.org>
librec: support for synonyms in type registries.
* src/rec-rset.c (rec_rset_update_types): Manage the declaration
of synonyms in %typedef entries.
* src/rec-types.c: New struct rec_type_reg_entry_s.
(rec_type_reg_destroy): Adapted to the new structure of type
registry entries.
(rec_type_reg_add): Likewise.
(rec_type_reg_get): Likewise.
(rec_type_reg_add_synonym): New function.
* src/rec-int.c (rec_int_check_descriptor): Check for the
existance of referred named types.
2011-07-17 Jose E. Marchesi <jemarch@gnu.org>
librec: support for %typedef.
* src/rec-int.c (rec_int_check_descriptor): Verify %typedef
entries.
* src/rec-types.c: REC_TYPE_NAME_RE renamed to REC_TYPE_CLASS_RE
to not collide with the macro of the same name defined in rec.h.
* src/rec.h (REC_TYPE_NAME_RE): New constant.
* src/rec-int.c (rec_int_check_descriptor): Accept type names in
type descriptions.
* src/rec-rset.c (rec_rset_rename_field): Update field props after
the rename of a field.
(rec_rset_update_types): Rewritten to process %typedef entries.
(rec_rset_type_field_p): Allow %type entries with named types.
2011-07-16 Jose E. Marchesi <jemarch@gnu.org>
librec: manage anonymous types using the fields props structures.
* src/rec-rset.c (rec_rset_new): Create an empty types registry.
* src/rec-types.c: Data structures storing the associations
removed.
(rec_type_reg_destroy): Assocs code removed. Destroy the types.
(rec_type_reg_assoc): Deleted.
(rec_type_reg_assoc_anon): Deleted.
(rec_type_reg_field_type): Deleted.
* src/rec-int.c (rec_int_check_field_type): Use
rec_rset_get_field_name instead of the type registry of the rset.
(rec_int_check_descriptor): Likewise.
* src/rec-rset.c (rec_rset_update_field_props): Renamed from
rec_rset_update_auto_fields.
(rec_rset_get_field_type): Use the field properties to find and
return the type of a given field.
(rec_rset_update_field_props): Update type properties in the field
props.
2011-07-16 Jose E. Marchesi <jemarch@gnu.org>
librec: manage auto fields with the new fields properties
structure in record sets.
* utils/recins.c (recins_add_auto_fields): rec_rset_auto now
returns the auto fields in the right order, so no need to reverse
it.
* src/rec-rset.c: New structure rec_rset_fprops_s to hold the
properties of a field.
New field field_props in the rec_rset_s struct.
(rec_rset_new): Initialise field_props to NULL.
(rec_rset_get_props): New function.
(rec_rset_update_auto_fields): Update field_props instead of the
auto_fields fex.
(rec_rset_auto): Build a fex from the contents of field_props and
return it.
(rec_rset_destroy): Destroy field_props.
2011-07-16 Jose E. Marchesi <jemarch@gnu.org>
torture: type-reg tests adapted.
* torture/rec-type-reg/rec-type-reg-assoc-anon.c: Renamed from
rec-type-reg-register.c, and adapted to the new semantics.
* torture/rec-type-reg/rec-type-reg-get.c: Adapted to the new
semantics of rec_type_reg_get.
2011-07-15 Jose E. Marchesi <jemarch@gnu.org>
librec: support for named types in type registries.
* src/rec-rset.c (rec_rset_get_field_type): Likewise.
* src/rec-int.c (rec_int_check_field_type): Use
rec_type_reg_get_type instead of rec_type_reg_get.
(rec_int_check_descriptor): Likewise.
* src/rec-types.c (rec_type_reg_add): New function.
(rec_type_reg_assoc_anon): Renamed from rec_type_reg_register.
(rec_type_reg_assoc): New function.
(rec_type_reg_get): New function.
(rec_type_reg_assoc): Renamed from rec_type_reg_get and adapted to
use the new registry internal structure.
2011-07-14 Jose E. Marchesi <jemarch@gnu.org>
librec: attribute 'name' for types.
* torture/rec-type/tsuite-rec-type.c (tsuite_rec_type): Test cases
for rec_type_name and rec_type_set_name added.
* torture/rec-type/rec-type-name.c: New file.
(rec_type_name_anonymous): New test.
(rec_type_name_nominal): New test.
* torture/rec-type/rec-type-set-name.c: New file.
(rec_type_set_name_nominal): New test.
* src/rec-types.c: New field 'name' in struct rec_type_s to hold
the name of the type, or NULL for an anonymous type.
(rec_type_name): New function.
(rec_type_set_name): New function.
(rec_type_new): Initialize the name to NULL.
(rec_type_new): type_name_str renamed to type_kind_str to avoid
confusion.
(rec_type_destroy): Deallocate type->name upon destruction.
2011-07-14 Jose E. Marchesi <jemarch@gnu.org>
librec: improvements in the api of rec_type.
* torture/rec-type/rec-type-check.c: Changed to use the new
rec_type_* API.
* torture/rec-type/rec-type-descr-p.c: Likewise.
* torture/rec-type-reg/rec-type-reg-get.c: Likewise.
* torture/rec-type-reg/rec-type-reg-register.c: Likewise.
* torture/rec-type/rec-type-new.c: Likewise.
* torture/rec-type/rec-type-kind-str.c: Likewise.
* torture/rec-type/rec-type-kind.c: Likewise.
* torture/rec-type/rec-type-equal-p.c: Likewise.
* torture/rec-type/rec-type-destroy.c: Likewise.
* torture/rec-type/tsuite-rec-type.c: Tests for rec_type_descr_fex
and rec_type_descr_type removed.
* src/rec-rset.c (rec_rset_type_field_type): New function.
(rec_rset_rename_field): Use rec_rset_type_field_type instead of
rec_type_descr_type.
* src/rec-types.c: rec_type_descr_fex function removed.
* src/rec.h: Likewise.
* src/rec-rset.c (rec_rset_update_types): Parse the list of fields
before invoking rec_type_new while processing %type: special
fields.
(rec_rset_type_field_p): New function.
(rec_rset_update_types): Use rec_rset_type_field_p instead of
rec_type_descr_p.
(rec_rset_rename_field): Likewise.
(rec_rset_type_field_fex): New function.
(rec_rset_rename_field): Use rec_rset_type_field_fex instead of
rec_type_descr_fex.
(rec_rset_update_types): Likewise.
* src/rec-int.c (rec_int_check_descriptor): Likewise.
* src/rec-types.c (rec_type_new): Do not expect the list of field
names in the STR parameter.
* src/rec-utils.c (rec_parse_regexp): Don't store the result of
the parsing in 'result' if it is NULL.
2011-06-21 Jose E. Marchesi <jco@terma.com>
build: get offline builds working again.
* man/Makefile.am (rec2csv.1): Use $(builddir) to get offline
builds working.
(csv2rec.1): Likewise.
(mdb2rec.1): Likewise.
(recdel.1): Likewise.
(recfix.1): Likewise.
(recinf.1): Likewise.
(recins.1): Likewise.
(recsel.1): Likewise.
(recset.1): Likewise.
(recfmt.1): Likewise.
* .gitignore: build-aux/config.guess, build-aux/config.sub.
2011-06-19 Jose E. Marchesi <jemarch@gnu.org>
utils: avoid the truncation of the result of getopt_long in
architectures featuring unsigned chars.
* utils/recfix.c (recfix_parse_args): 'ret' shall be an integer to
not truncate the -1 returned by getopt_long in architectures
featuring unsigned chars.
* utils/recsel.c (recsel_parse_args): Likewise.
* utils/recinf.c (main): Likewise.
* utils/recfmt.c (recfmt_parse_args): Likewise.
2011-06-19 Jose E. Marchesi <jemarch@gnu.org>
m4: files installed by libtool removed. They were causing a clash
on some systems shipping old versions of libtool.
* m4/ltoptions.m4: Deleted.
2011-06-17 Jose E. Marchesi <jemarch@gnu.org>
recins: create the specified file if it does not exist.
* doc/recutils.texi (recins Invocation): recins will create a new
file if it does not exist.
* utils/recset.c (main): Likewise.
* utils/recdel.c (main): Print an error message if the file could
not be opened.
* utils/recutl.c (recutl_read_db_from_file): Return NULL if the
file could not be opened.
* utils/recins.c (main): If the specified file does not exist then
create and populate an empty database.
2011-06-17 Jose E. Marchesi <jemarch@gnu.org>
recins: generate parseable dates that are locale independent.
* utils/recins.c: Include locale.h.
(recins_add_auto_field_date): Set the LC_TIME locale setting to
"C" before calling strftime and restore it to the environment
value afterwards.
2011-06-09 Jose E. Marchesi <jemarch@gnu.org>
ob-rec.el is not part of Emacs.
* etc/ob-rec.el: Not part of Emacs yet.
2011-06-09 Jose E. Marchesi <jemarch@gnu.org>
gitignore updated.
* .gitignore: Several entries added to the ignore list.
2011-05-24 Jose E. Marchesi <jemarch@gnu.org>
On MAC OS X, GNU libtoolize is named 'glibtoolize'.
* autogen.sh: Use glibtoolize instead of libtoolize in Darwin
systems. Reported and fixed by Sven Wick.
2011-05-18 Jose E. Marchesi <jemarch@gnu.org>
Updates to the FSD file.
* FSD (Version): Updated to 1.3
(MaturityLevel): Updated to Production.
(HelpList): New entry.
2011-05-16 Jose E. Marchesi <jemarch@gnu.org>
Fix size constraint handling on LP64 systems. Patch sent by Daiki
Ueno.
2011-05-10 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 25 resolved to 'DONE'.
Task 35 created.
2011-05-10 Jose E. Marchesi <jemarch@gnu.org>
librec: support for double quotes for delimiting string literals,
and unescaped newline characters.
* torture/utils/recsel.sh (recsel-sex-string-single-quote): New
test.
(recsel-sex-string-double-quote): New test.
(recsel-sex-string-multiline): New test.
* doc/recutils.texi (SEX Operands): Description of string literals
updated to cover the usage of " as a delimiter and the support for
non-scaped newline characters.
* src/rec-sex-lex.l: Regular expression for string literals
changed to support both ' and " style quotes and to support
newline characters.
2011-05-05 Jose E. Marchesi <jemarch@gnu.org>
Remove unneeded library linkages. Problem reported by Sven Wick.
* utils/Makefile.am (mdb2rec_LDADD): Don't link mdb2rec with glib
in a direct way.
(COMMONLIBS): Don't link the utilities with libgnu.la.
* torture/Makefile.am (runtests_LDADD): Typo fixed: CHECK_LIBS to
CHECKLIBS.
* src/Makefile.am (librec_la_LIBADD): Link with libcurl only if
the REMOVE_ESCRIPTORS automake conditional is set.
* configure.ac: Avoid automatic linking with libcurl by specifying
an action for library-if-found in AC_CHECK_LIB.
Same for libcheck.
Subst CHECKLIBS.
2011-05-04 Jose E. Marchesi <jemarch@gnu.org>
ob-rec.el imported in the repo.
* etc/ob-rec.el: New file.
2011-03-23 Jose E. Marchesi <jemarch@gnu.org>
readme: added note about year intervals in the copyrights.
* README: The GNU maintainers guide asks to include an explicit
statement explaining the usage of year intervals in the copyright
notifications.
2011-02-11 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.3.
* .gitignore: Trailing empty line removed.
* configure.ac: Version changed to 1.3.
2011-02-11 Jose E. Marchesi <jemarch@gnu.org>
Translations updated.
* po/de.po: Updated from the translation project.
* po/fi.po: Likewise.
* po/nl.po: Likewise.
* po/sv.po: Likewise.
2011-02-09 Jose E. Marchesi <jemarch@gnu.org>
Documentation for %size.
* doc/recutils.texi (Record Descriptors): Documentation of the
%size special field.
2011-02-09 Jose E. Marchesi <jemarch@gnu.org>
Tests for the %size special field.
* torture/utils/recfix.sh: New input files size-invalid-1,
size-invalid-2, size-exact-zero, size-exact-zero-invalid,
size-exact, size-exact-invalid, size-less, size-less-invalid,
size-less-equal, size-less-equal-invalid, size-bigger,
size-bigger-invalid, size-bigger-equal and
size-bigger-equal-invalid.
(recfix-size-invalid-1): New test.
(recfix-size-invalid-2): New test.
(recfix-size-exact-zero): New test.
(recfix-size-exact-zero-invalid): New test.
(recfix-size-exact): New test.
(recfix-size-exact-invalid): New test.
(recfix-size-less): New test.
(recfix-size-less-invalid): New test.
(recfix-size-less-equal): New test.
(recfix-size-less-equal-invalid): New test.
(recfix-size-bigger): New test.
(recfix-size-bigger-invalid): New test.
(recfix-size-bigger-equal): New test.
(recfix-size-bigger-equal-invalid): New test.
2011-02-08 Jose E. Marchesi <jemarch@gnu.org>
portability fix for macos x.
* torture/rec-type/rec-type-descr-type.c: Include stdlib.h for
malloc, not malloc.h. Macos X does not provide malloc.h
2011-02-08 Jose E. Marchesi <jemarch@gnu.org>
manual: several texinfo fixes and improvements.
* doc/recutils.texi: Use @dots{}.
Use @: after i.e. and e.g. to avoid texinfo to insert double
spacing.
(recfmt Examples): Fix incomplete statement.
Use @var{} for all the parameters in synopsis.
2011-02-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Fix typos and nits in the manual.
* doc/recutils.texi (Introduction, Record Descriptors)
(SEX Operands, recsel Invocation, recset Invocation)
(recfix Examples, recfmt Templates, rec2csv Conversion):
Fix typos, add a few @noindent's.
2011-02-08 Jose E. Marchesi <jemarch@gnu.org>
warnings fixed in the codebase.
* src/rec-utils.c (rec_extract_size): Cast the second argument to
rec_parse_int from size_t* to int*.
* src/rec-rset.c (rec_rset_update_size_constraints): Unused
variable record_elem removed.
(rec_rset_source): Unused variable rset_elem removed.
* src/rec-int.c (rec_int_merge_remote): Return 0.
(rec_int_check_descriptor): Unused variables size_max, size_min,
size and invalid_sizes removed.
* utils/recins.c (recins_add_new_record): Unused variables
errors_str_size, errors_str and errors_buf removed.
(recins_add_auto_field_int): Unused variable new_field removed.
* utils/recdel.c (recdel_delete_records): Unused variable
'errors_buf' removed.
* utils/recfmt.c (recfmt_apply_template): Unused variable 'n'
removed.
* utils/rec2csv.c (rec2csv_generate_csv): Unused variable
'field_index' removed.
* utils/mdb2rec.c (get_field_name): Unused variables field_part_0,
field_part_1 and field_part_2 removed.
(process_table): Unused variable j removed.
(process_mdb): Unused variables 'in' and 'rset' removed.
(main): Set 'ret' to success or failure.
* torture/rec-type-reg/rec-type-reg-get.c (START_TEST): Unused
variable 'type' removed.
* torture/rec-parser/rec-parse-db.c (START_TEST): Unused variable
stm removed.
* torture/rec-parser/rec-parser-eof.c (START_TEST): Unused
variable ci removed.
2011-02-07 Jose E. Marchesi <jemarch@gnu.org>
List of ignored files updated.
* .gitignore: Ignore generated po/*mo files.
Ignore the doc/manual directory.
2011-02-07 Jose E. Marchesi <jemarch@gnu.org>
librec: implementation of the %size field.
* src/rec-rset.c (rec_rset_min_records): New function.
(rec_rset_max_records): New function.
(rec_rset_source): New function.
* src/rec-int.c (rec_int_check_rset): Verify the size restrictions
of the record set.
* src/rec-utils.c (rec_extract_size): New function.
(rec_extract_size_condition): Likewise.
* src/rec-rset.c (rec_rset_update_size_constraints): New function.
* src/rec-utils.c (rec_match): New function.
* src/rec-rset.c (struct rec_rset_s): New fields min_size and
max_size.
(rec_rset_new): Initialize rset->size_min and rset->size_max.
(rec_rset_set_descriptor): Update size constraints.
(rec_rset_update_size_constraints): New function.
Include stdint.h for SIZE_MAX.
* src/rec-int.c (rec_int_check_descriptor): Check for the validity
of values of %size fields.
2011-02-07 Jose E. Marchesi <jemarch@gnu.org>
librec: problem with non initialized variable fixed.
* src/rec-int.c (rec_int_check_descriptor): Initialize 'res' to 0.
2011-02-04 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.2.
* NEWS: Updated for 1.2.
* configure.ac: Version changed from 1.1.90 to 1.2.
2011-02-04 Jose E. Marchesi <jemarch@gnu.org>
Translations for German, Swedish, Finnish and Ducht.
* po/de.po: New file from the FTP.
* po/sv.po: Likewise.
* po/nl.po: Likewise.
* po/fi.po: Likewise.
* po/LINGUAS: New file.
2011-02-04 Jose E. Marchesi <jemarch@gnu.org>
manual: some examples fixed.
* doc/recutils.texi (Escalar types): Fix example.
(Enumerated types): Likewise.
2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.1.90.
* .x-sc_prohibit_strcmp: Added torture/*.
* .x-sc_prohibit_stddef_without_use: New file.
* po/recutils.pot: Updated for 1.1.90.
* NEWS: Updated for 1.1.90.
* configure.ac: Version changed to 1.1.90.
2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
rec2csv: documentation.
* doc/recutils.texi (rec2csv): New section.
(rec2csv Invocation): New section.
(rec2csv Examples): New section.
(rec2csv Conversion): New section.
2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
rec2csv: tests.
* torture/utils/Makefile.am (TESTS): rec2csv added.
* torture/utils/rec2csv.sh: New file. New input files
'default-records', 'missing-fields', 'missing-fields-first',
'multi-line', 'escape-quotes', 'repeated-fields',
'repeated-missing' and 'several-types'.
(rec2csv-default-record): New test.
(rec2csv-missing-fields): New test.
(rec2csv-missing-fields-first): New test.
(rec2csv-multi-line): New test.
(rec2csv-escape-quotes): New test.
(rec2csv-repeated-fields): New test.
(rec2csv-repeated-missing): New test.
(rec2csv-default-type): New test.
(rec2csv-with-type): New test.
(rec2csv-nonexistent-type): New test.
2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
rec2csv: print data.
* utils/rec2csv.c (rec2csv_process_data): Process either the
specified record rset, or the default one, or the only rset
existing in the file.
2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
rec2csv: print headers.
* utils/rec2csv.c (rec2csv_determine_fields): New function.
* utils/rec2csv.c (rec2csv_generate_csv): Likewise.
* src/rec-fex.c (rec_fex_member_p): Get arguments 'min' and 'max'.
* src/rec-rset.c (rec_rset_update_auto_fields): Use the additional
parameters of rec_fex_member_p.
2011-01-31 Jose E. Marchesi <jemarch@gnu.org>
rec2csv: skeleton of the utility.
* man/Makefile.am (man_MANS): rec2csv.1 added.
(rec2csv.1): New rule.
* utils/Makefile.am (bin_PROGRAMS): rec2csv added.
(rec2csv_SOURCES): Defined.
(rec2csv_LDADD): Defined.
* utils/rec2csv.c: New file.
(recutl_print_help): New function.
(parse_args): Likewise.
(rec2csv_process_data): Likewise.
(main): Likewise.
2011-01-30 Jose E. Marchesi <jemarch@gnu.org>
recins: prepend the auto-generated fields.
* torture/utils/recins.sh: Tests adapted.
* utils/recins.c (recins_add_auto_field_int): Prepend the
auto-generated field instead of appending it.
(recins_add_auto_field_date): Likewise.
2011-01-30 Jose E. Marchesi <jemarch@gnu.org>
Documentation for the auto generated fields.
* doc/recutils.texi (Record Descriptors): List %auto in the list
of allowed special fields.
(recins Invocation): Document --no-auto.
(Auto Generated Fields): auto-generated fields documentation.
2011-01-30 Jose E. Marchesi <jemarch@gnu.org>
Tests for the auto generated fields.
* torture/utils/recins.sh: New input files auto-fields and
auto-range-overflow.
(recins-auto-fields): New test.
(recins-no-auto): New test.
(recins-auto-range-overflow): New test.
(recins-auto-range-overflow-force): New test.
* torture/utils/recfix.sh: New input files auto-int, auto-range,
auto-date, auto-notype and auto-nofex.
(recfix-auto-int): New test.
(recfix-auto-range): New test.
(recfix-auto-date): New test.
(recfix-auto-notype): New test.
(recfix-auto-nofex): New test.
2011-01-30 Jose E. Marchesi <jemarch@gnu.org>
Implementation of auto generated fields.
* utils/recins.c: New argument --no-auto.
* src/rec-types.c (rec_type_min): New function.
(rec_type_max): New function.
* src/rec.h: New function rec_rset_get_field_type.
* utils/recins.c (recins_add_new_record): Add auto-set fields when
replacing a record.
(recins_insert_record): Likewise.
(recins_add_auto_fields): New function.
(recins_add_auto_field_int): New function.
(recins_add_auto_field_date): New function.
* torture/rec-fex/rec-fex-new.c: Adapt tests to the new semantics
of rec_fex_new (NULL,...).
* src/rec.h: New functions rec_fex_append and rec_fex_member_p.
* src/rec-fex.c (rec_fex_append): Implemented.
(rec_fex_member_p): Implemented.
(rec_fex_new): Create an empty FEX if the str parameter is NULL.
* src/rec-rset.c (struct rec_rset_s): New 'auto_fields' member.
(rec_rset_new): Initialize 'auto_fields'.
(rec_rset_set_descriptor): Call rec_rset_update_auto_fields.
(rec_rset_update_auto_fields): New function.
(rec_rset_auto): New function.
* src/rec.h: New function rec_rset_auto, that returns a list with
the names of the auto-set fields in the rset.
* src/rec-int.c (rec_int_check_descriptor): Check that
auto-incremented fields are of type int.
2011-01-29 Jose E. Marchesi <jemarch@gnu.org>
utils: recdel now performs an integrity check of the resulting
database.
* doc/recutils.texi (recdel Invocation): Documentation for
'--force' and '--verbose'.
(recins Invocation): Likewise.
(recset Invocation): Likewise.
* torture/utils/recdel.sh: New input file 'integrity-fail'.
New input file 'external-types'.
New input file 'external'.
(recdel-integrity-fail): New test.
(recdel-force-restrictions): New test.
(recdel-external-fail): New test.
(recdel-no-external): New test.
* utils/recins.c (recins_add_new_record): Use
recutl_check_integrity.
* utils/recdel.c: New parameter --verbose.
New parameter --no-external.
* utils/recutl.h: New function 'recutl_check_integrity'.
* uitls/recutl.c: Likewise.
2011-01-29 Jose E. Marchesi <jemarch@gnu.org>
utils: fix the output of integrity error messages.
* utils/recins.c (recins_add_new_record): Dont use recutl_error to
report the integrity errors.
* utils/recset.c (recset_process_actions): Likewise.
2011-01-29 Jose E. Marchesi <jemarch@gnu.org>
librec: manage problems with the remote descriptors as integrity
errors.
* src/rec-int.c (rec_int_check_descriptor): Call
rec_int_merge_remote.
(rec_int_merge_remote): Return 1 if there is an error fetching the
remote descriptor. 0 otherwise.
(rec_int_merge_remote): Get an errors parameter.
(rec_int_merge_remote): Manage errors as integrity errors.
2011-01-28 Jose E. Marchesi <jemarch@gnu.org>
librec: avoid descriptor expansion when using remote descriptors.
* src/rec-int.c (rec_int_check_rset): Save a backup of the
rset descriptor before to merge any remote descriptor, and restore
it before returning.
* torture/utils/recins.sh: New input files external-descriptor and
external-descriptor-types.
(recins-external-descriptor): New test.
2011-01-25 Jose E. Marchesi <jemarch@gnu.org>
manual: Fix the description of %unique, %prohibit, %mandatory,
%url and %type.
* doc/recutils.texi (Record Descriptors): Fix the documentation of
%prohibit, %mandatory and %unique so it says that the field names
are separated by blanks.
(Record Descriptors): Note that %url can be followed by an URL or
a file path.
(Record Descriptors): Clarify that the list of field names in
%type shall be separated by commas.
Problems reported by Jean-François Ollier.
2011-01-24 Jose E. Marchesi <jemarch@gnu.org>
manual: document the supported regexp flavor.
* doc/recutils.texi (Regular Expressions): New chapter.
(String types): Clarify the supported regexp flavor.
(Field Values): Likewise.
2011-01-24 Jose E. Marchesi <jemarch@gnu.org>
gnulib: update and import regexprops-generic.
* doc/regexprops-generic.texi: New file.
* lib/iswblank.c: New file.
2011-01-23 Jose E. Marchesi <jemarch@gnu.org>
recutl: make recset and recins to keep the permissions of the
operated rec file.
* utils/recutl.c (recutl_write_db_to_file): New variables st1 and
stat_result.
(recutl_write_db_to_file): Record the file attributes of the
original rec file and use its mode in the replace file.
Copyright updated.
Problem reported, and solution outlined by Jean-François Ollier.
2011-01-23 Jose E. Marchesi <jemarch@gnu.org>
torture: tests checking the %prohibit restriction.
* torture/utils/recfix.sh: New input files prohibited-fields and
prohibited-fields-fail.
(recfix-prohibited-fields-ok): New test.
(recfix-prohibited-fields-fail): New test.
2011-01-22 Jose E. Marchesi <jemarch@gnu.org>
Use Task instead of Issue in examples involving TODO.
* doc/recutils.texi (recsel Examples): Issue replaced by Task.
(recins Examples): Likewise.
(recdel Examples): Likewise.
* utils/recinf.c (recutl_print_help): Likewise.
2011-01-14 Jose E. Marchesi <jemarch@gnu.org>
tasktool: use --set-add.
* tasktool (tt_process_cmd_resolve): Use the --set-add option of
tasktool to insert the ClosedAt field when resolving to DONE.
2011-01-14 Jose E. Marchesi <jemarch@gnu.org>
Tasktool operations.
* TODO: Task 29 resolved to 'DONE'.
Task 29 resolved to 'DONE'.
2011-01-12 Jose E. Marchesi <jemarch@gnu.org>
reset: support for the set-add operation.
* doc/recutils.texi (recset Invocation): Documentation for the -S,
--set-add command line option.
* torture/utils/recset.sh (recset-set-add-1): New test.
(recset-set-add-2): New test.
(recset-set-add-3): New test.
* utils/recset.c (RECSET_ACT_SET_ADD): New action.
(COMMON_ARGS): SET_ADD_ACTION_ARG added.
(recutl_print_help): Document -S, --set-add.
(recset_parse_args): Manage the set-add option.
(recset_process_actions): Likewise.
(recset_process_set): New parameter 'add_p' that tells whether to
add missing fields with the given value.
(CHECK_ACTION_PREREQ): New macro.
(recset_parse_args): Use CHECK_ACTION_PREREQ to avoid code
repetition.
2011-01-10 Jose E. Marchesi <jemarch@gnu.org>
TODO: put a comment at the beginning asking to execute ./tasktool
--help.
* tasktool (tt_db_template_header): Modified to include a note
about executing ./tasktool --help.
* TODO: Likewise.
2011-01-10 Jose E. Marchesi <jemarch@gnu.org>
librec: support for comments in enum descriptions.
* doc/recutils.texi (Enumerated types): Comments in enum
descriptions documented.
Copyright updated.
* torture/utils/recfix.sh: New input file 'enum-valid'.
New input file 'enum-invalid-1'.
New input file 'enum-invalid-2'.
(recfix-enum-valid): New test.
(recfix-enum-invalid-1): New test.
(recfix-enum-invalid-2): New test.
* src/rec-types.c (rec_type_parse_enum): Skip comments in
enum descriptions.
2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
Preparation for 1.1.
* .x-sc_prohibit_have_config_h: New file.
* po/POTFILES.in: Updated.
* m4/pkg.m4: Relicense from GPLv2+ to GPLv3+.
* NEWS: Updated to version 1.1.
* man/Makefile.am (man_MANS): recfmt.1 added.
(recfmt.1): New rule.
* configure.ac: Package version changed to 1.1.
2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
rec-sex: support for the string concatenation operator.
* doc/recutils.texi (SEX Operators): Documentation for the string
concatenation operator.
* src/rec-sex.c (rec_sex_eval_node): Manage REC_SEX_OP_CONCAT.
* src/rec-sex-ast.h: New operation REC_SEX_OP_CONCAT.
* src/rec-sex-tab.y: Declare REC_SEX_TOK_AMP as a token.
* src/rec-sex-lex.l: Recognize REC_SEX_TOK_AMP.
2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
rec-sex: support for the conditional expression.
* doc/recutils.texi (SEX Operators): Documentation for the ternary
conditional operator added.
* src/rec-sex.c (rec_sex_eval_node): Manage REC_SEX_OP_COND.
* src/rec-sex-tab.y (CREATE_NODE_OP3): Macro defined.
* src/rec-sex-ast.h: New operation REC_SEX_OP_COND.
* src/rec-sex-tab.y: Declare REC_SEX_TOK_QM and REC_SEX_TOK_COLON
as tokens.
* src/rec-sex-lex.l: Recognize REC_SEX_TOK_QM and
REC_SEX_TOK_COLON.
2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
manual: first draft of the documentation for recfmt.
* doc/recutils.texi (recfmt): New chapter.
(recfmt Invocation): New section.
(recfmt Templates): New section.
(recfmt Examples): New section.
2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
recfmt: use SEX expressions in template slots and change the slot
format.
* src/rec-sex.c (rec_sex_compile): Set the parser ast only if the
parsing was successful.
* src/rec-sex-tab.y (exp): Grammar changed to require an
expression.
* src/rec-sex.c (rec_sex_eval_str): New function.
* utils/recfmt.c (recfmt_apply_template): Use {{...}} marks
instead of <#...>.
(recfmt_get_subst): New function.
2010-12-22 Jose E. Marchesi <jemarch@gnu.org>
recfmt: initial version.
* torture/utils/Makefile.am (TESTS): recfmt.sh added.
* torture/utils/recfmt.sh: New file.
(recfmt-empty-template): New test.
(recfmt-empty-file): New test.
(recfmt-all-records): New test.
(recfmt-slot-beginning): New test.
(recfmt-no-prolog): New test.
(recfmt-subscripts): New test.
(recfmt-non-matching-records): New test.
(recfmt-empty-slot): New test.
(recfmt-invalid-slot): New test.
* src/rec-record.c (rec_record_get_field_by_name): Return NULL if
the specified field is not found, instead of the last field of the
record.
* utils/recutl.h: New function recutl_warning.
New function recutl_read_file.
* utils/recutl.c (recutl_warning): Implemented.
(recutl_read_file): Implemented.
* utils/recfmt.c (recfmt_process_db): New function.
(rec_fmt_apply_template): New function.
* utils/Makefile.am (bin_PROGRAMS): recfmt added.
* utils/recfmt.c: New file.
(recutl_print_help): New function.
(recfmt_parse_args): New function.
(main): New function.
2010-12-22 Jose E. Marchesi <jemarch@gnu.org>
torture: manage errors when running the utilities in the system
tests.
* torture/utils/testutils.sh: Make the tests to fail if there is
an error running a system test.
2010-12-21 Jose E. Marchesi <jemarch@gnu.org>
Portability fixes.
* torture/utils/testutils.sh: Use the portable 'expr' instead of
'bc'.
* src/Makefile.am (AM_CFLAGS): gcc specific options -Wall and
-fno-strict-aliasing removed.
* utils/recutl.h: Include progname.h so the declaration of
program_name is accessible in all the utilities.
* utils/csv2rec.c: program_name global variable removed.
* utils/recset.c: Likewise.
* utils/recsel.c: Likewise.
* utils/recins.c: Likewise.
* utils/recinf.c: Likewise.
* utils/recfix.c: Likewise.
* utils/recdel.c: Likewise.
* utils/mdb2rec.c: Likewise.
* utils/recutl.c: Include progname.h and use set_progname.
* module 'progname' imported from gnulib.
* src/rec.c: Remove the setting of a program_name variable when
compiling with mingw.
* src/rec-sex.c (ATOTS_VAL): Use parse_datetime instead of
get_date.
Include parse-datetime.h instead of getdate.h.
* src/rec-types.c: Likewise.
* po/Makevars.template: Removed.
* README-dev: libcsv dependency removed.
Added a note asking for a recent version of flex.
* m4/pkg.m4: Copied from /usr/share/aclocal/pkg.m4.
2010-12-20 Jose E. Marchesi <jemarch@gnu.org>
Build a librec.dll in mingw.
* src/Makefile.am (AM_LDFLAGS): Use -no-undefined.
* src/rec.c: Avoid an undefined symbol in the generated
librec.dll.
2010-12-20 Jose E. Marchesi <jemarch@gnu.org>
Fix compilation in mingw32.
* src/rec-sex-lex.l: Use %top to get config.h included at the top
of the generated file.
* strsep module imported from gnulib.
* mkdstemp module imported from gnulib.
2010-12-20 Jose E. Marchesi <jemarch@gnu.org>
echo -n is not recognized in macosx. Use printf instead.
* torture/utils/testutils.sh (test_declare_input_file): Use printf
instead of echo -n.
(test_tool): Likewise.
* tasktool (tt_email_p): Likewise.
(tt_process_cmd_note): Likewise.
(tt_process_cmd_create): Likewise.
2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
Misc portability problems fixed.
* utils/recutl.h: Make recutl_fatal and recutl_error to get a
const char pointer as its first argument.
* utils/recutl.c: Include locale.h.
* src/rec-writer.c (rec_write_comment): Use strdup instead of
strdupa.
(rec_write_comment): Avoid freeing a tail of a string returned by
strdup.
2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
Include gettext.h instead of libintl.h.
* src/rec.c: Include gettext.h instead of libintl.h.
* utils/recutl.c: Likewise.
* utils/recset.c: Likewise.
* utils/recsel.c: Likewise.
* utils/recins.c: Likewise.
* utils/recinf.c: Likewise.
* utils/recfix.c: Likewise.
* utils/recdel.c: Likewise.
* utils/mdb2rec.c: Likewise.
* utils/csv2rec.c: Likewise.
* src/rec-utils.c: Likewise.
* src/rec-types.c: Likewise.
* src/rec-parser.c: Likewise.
* src/rec-int.c: Likewise.
* src/rec-field-name.c: Likewise.
* src/rec-fex.c: Likewise.
2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
gettext-h module imported from gnulib.
* m4/configmake.m4: New file.
2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
librec: use %zu instead of %d to print size_t values in *printf
calls.
* src/rec-field.c (rec_field_set_location): Use %zu instead of %d
to print size_t values.
(rec_field_set_char_location): Likewise.
* src/rec-types.c (rec_type_check_size): Likewise.
* src/rec-parser.c (rec_parser_perror): Likewise.
* src/rec-record.c (rec_record_set_location): Likewise.
(rec_record_set_char_location): Likewise.
2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
librec: use the safer construction asprintf instead of sprintf.
* src/rec-fex.c (rec_fex_str): Use asprintf instead of sprintf.
* src/rec-types.c (rec_type_check_size): Likewise.
(rec_type_check_range): Likewise.
* src/rec-record.c (rec_record_set_location): Likewise.
(rec_record_set_char_location): Likewise.
* src/rec-parser.c (rec_parser_perror): Likewise.
* src/rec-int.c (rec_int_check_field_type): Likewise.
(rec_int_check_record_mandatory): Likewise.
(rec_int_check_record_unique): Likewise.
(rec_int_check_record_prohibit): Likewise.
(rec_int_check_record_key): Likewise.
(rec_int_check_descriptor): Likewise.
* src/rec-field.c (rec_field_set_location): Likewise.
2010-12-18 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 30 resolved to 'DONE'.
2010-12-18 Jose E. Marchesi <jemarch@gnu.org>
Stop using the non portable open_memstream.
* torture/rec-writer/rec-write-comment.c: Use the
rec_writer_new_str function instead of open_memstream and file
streams.
* torture/rec-writer/rec-write-rset.c: Likewise.
* torture/rec-writer/rec-write-record-with-fex.c: Likewise.
* torture/rec-writer/rec-write-record.c: Likewise.
* torture/rec-writer/rec-write-field-name.c: Likewise.
* torture/rec-writer/rec-write-field.c: Likewise.
* torture/rec-writer/rec-write-db.c: Likewise.
* utils/recins.c: Don't use open_memstream.
* utils/recset.c: Likewise.
* utils/recutl.c: Likewise.
* src/rec-buf.c: New file.
* src/rec.h: Get a char** argument instead of a stream for the
'errors' argument of the function rec_int_check_db,
rec_int_check_rset, rec_int_check_record and
rec_int_check_field_type.
rec_buf_* moved there from pdf-utils.h.
* src/rec-writer.c: Support a rec_buf_t backend in the writer.
(rec_writer_new_str): New function.
(rec_writer_puts): Use the rec_buf backend if selected.
(rec_writer_putc): Likewise.
(rec_write_field_str): Use a rec_buf_t backed writer.
(rec_write_field_name_str): Likewise.
(rec_write_comment_str): Likewise.
* src/rec-record.c (rec_record_to_comment): Use rec_buf_new
instead of the non portable open_memstream.
* src/rec-rset.c (rec_rset_rename_field): Likewise.
* src/rec-types.c (rec_type_check): Use rec_buf_new instead of the
non portable open_memstream.
(rec_type_check_int): Likewise.
(rec_type_check_field): Likewise.
(rec_type_check_bool): Likewise.
(rec_type_check_range): Likewise.
(rec_type_check_real): Likewise.
(rec_type_check_size): Likewise.
(rec_type_check_line): Likewise.
(rec_type_check_regexp): Likewise.
(rec_type_check_date): Likewise.
(rec_type_check_email): Likewise.
(rec_type_check_enum): Likewise.
2010-12-17 Jose E. Marchesi <jemarch@gnu.org>
rec-utils: new open_memstream like API for rec_buf_t.
* src/rec-parser.c (rec_parse_field_name_part): Use the new
rec_buf_t API.
(rec_parse_comment): Likewise.
(rec_parse_field_value): Likewise.
* src/rec-utils.h: New interface for the rec_buf_t abstract data
type, including: rec_buf_new, rec_buf_putc, rec_buf_puts and
rec_buf_close.
* src/rec-utils.c: rec_buf_new, rec_buf_putc, rec_buf_puts and
rec_buf_close implemented based in the old implementation.
2010-12-16 Jose E. Marchesi <jemarch@gnu.org>
syntax-check fixes.
* libcsv/libcsv.c (VERSION): Changed to 3.0.0-recutils.
Include config.h.
2010-12-16 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 34 resolved to 'DONE'.
2010-12-16 Jose E. Marchesi <jemarch@gnu.org>
libcsv embedded in the source tree.
* utils/csv2rec.c: Include csv.h instead of libcsv/csv.h.
* utils/Makefile.am (csv2rec_LDADD): Link with libcsv.la.
(AM_CPPFLAGS): Add the libcsv/ directory to the include path.
* configure.ac: Checks for libcsv removed.
Conditional COMPILE_CSV2REC removed.
* Makefile.am (SUBDIRS): libcsv/ added.
* libcsv/csv.h: Imported from libcsv-3.0.0.tar.gz and relicensed
from LGPL2.1+ to GPLv3.
* libcsv/libcsv.c: Likewise.
* libcsv/Makefile.am: New file.
2010-12-16 Jose Marchesi <jco@wilhelm>
Tasktool operations.
* TODO: Task 34 created.
2010-12-15 Jose E. Marchesi <jemarch@gnu.org>
tasktool: first version of log subcommand.
* tasktool (tt_process_cmd_log): New function.
(tt_help_log): New variable.
(tt_parse_arguments): Handle the 'log' subcommand.
2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
librec: new function rec_buf_add_str in rec-utils.
* src/rec-utils.h: New function 'rec_buf_add_str'.
* src/rec-utils.c (rec_buf_add_str): New function.
2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
librec: rec_parser_buf abstraction moved to rec-utils as rec_buf.
* src/rec-parser.c: Use the rec_buf_* functions instead of the
rec_parser_buf_* functions.
Include rec-utils.h.
* src/rec-utils.c: Implementation of the rec_buf_t type and the
rec_buf_* functions, moved and adapted from rec-parser.c.
* src/rec-utils.h: New rec_buf_t abstract data type, renamed from
the rec_parser_buf_t type and functions in rec-parser.h.
2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
Tasktool operations.
* TODO: Note added for task 30.
2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
librec: remove the usage of the non-portable fmemopen.
* torture/rec-parser/rec-parse-db.c: Replace uses of fmemopen by
buffer backed parsers.
* torture/rec-parser/rec-parse-field.c: Likewise.
* torture/rec-parser/rec-parse-field-name.c: Likewise.
* torture/rec-parser/rec-parse-record.c: Likewise.
* torture/rec-parser/rec-parser-eof.c: Likewise.
* torture/rec-parser/rec-parser-error.c: Likewise.
* torture/rec-parser/rec-parser-perror.c: Likewise.
* torture/rec-parser/rec-parser-reset.c: Likewise.
* torture/rec-parser/rec-parse-rset.c: Likewise.
* src/rec-parser.c (rec_parse_field_name_str): Rewritten to use
rec_parser_new_str and rec_parser_eof instead of fmemopen.
(rec_parse_record_str): Likewise.
* torture/rec-parser/rec-parser-new-str.c: New file.
(test_rec_parser_new_str): New function.
(rec_parser_new_str_nominal): New test.
* src/rec-parser.c: New member 'buffer' in the struct
rec_parser_s.
(rec_parser_init_common): New function.
(rec_parser_getc): Use the buffer backend if the parser was
created with rec_parser_new_str.
(rec_parser_ungetc): Likewise.
2010-12-13 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: several fixes.
* etc/rec-mode.el: Several fixes.
* utils/recinf.c (print_info_file): Print "unknown" only if
generated normal output. It was breaking the sexps.
2010-12-13 Jose E. Marchesi <jemarch@gnu.org>
recins: check for integrity problems regardless of operational
mode.
* utils/recfix.c (recfix_process_data): Use new semantics of
rec_int_check_db.
* src/rec-int.c (rec_int_check_db): Return the number of errors
found while checking the integrity of the database.
(rec_int_merge_remote): Unused variable removed.
* utils/recins.c (recins_add_new_record): Check for the integrity
of the new database in both operation modes: normal and replace.
2010-12-13 Jose Marchesi <jco@wilhelm>
Tasktool operations.
* TODO: Task 30 edited.
Task 30 edited.
2010-12-13 Jose E. Marchesi <jemarch@gnu.org>
librec: don't allow several %rec: fields in record descriptors.
* src/rec-int.c (rec_int_check_descriptor): Don't allow more than
one %rec: fields in record descriptors.
* torture/utils/recfix.sh: New tests 'recfix-one-rec' and
'recfix-multiple-rec-in-descriptor'.
2010-12-13 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: initial version of rec-cmd-compile.
* etc/rec-mode.el (rec-mode-edit-map): Map the rec-cmd-compile
command.
(rec-mode-map): Likewise.
(rec-recfix): New variable.
(rec-cmd-compile): New function.
2010-12-10 Jose Marchesi <jemarch@gnu.org>
Tasktool operations.
* TODO: Task 28 resolved to 'DONE'.
2010-12-10 Jose E. Marchesi <jemarch@gnu.org>
tasktool: support for categories.
* tasktool (tt_task_categories): New category 'rec-mode'.
(tt_process_cmd_list): Support the -c|--category parameter.
(tt_db_template_task): Set 'Category' as a mandatory field.
* TODO: Updated to reflect the new categories.
2010-12-04 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 30 created.
Task 30 edited.
2010-12-04 Jose E. Marchesi <jemarch@gnu.org>
librec: do not include malloc.h. Include the more portable
stdlib.h instead.
* src/rec-fex.c: Include stdlib.h instead of malloc.h.
* src/rec-field-name.c: Likewise.
* src/rec-field.c: Likewise.
* src/rec-parser.c: Likewise.
* src/rec-record.c: Likewise.
* src/rec-rset.c: Likewise.
* src/rec-sex.c: Likewise.
* src/rec-writer.c: Likewise.
2010-12-04 Jose E. Marchesi <jemarch@gnu.org>
Avoid a segmentation fault in rec_write_rset.
* src/rec-writer.c (rec_write_rset): Make sure that the descriptor
of a record set exists before to try to write it. Problem
reported by Elias Pipping.
2010-12-02 Jose E. Marchesi <jemarch@gnu.org>
rec-types: support ranges with implicit minimum limit.
* torture/utils/recfix.sh (recfix-ranges-ok): New test.
(recfix-ranges-xfail-1): New test.
(recfix-ranges-xfail-2): New test.
* torture/rec-type/rec-type-new.c: Test ranges with just one
index.
* src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Allow the omission of
one of the indexes of the range.
(rec_type_parse_range): Allow the omission of one of the indexes.
2010-12-02 Jose E. Marchesi <jemarch@gnu.org>
mdb2rec: normalise field names appearing in %type fields.
* utils/mdb2rec.c (process_table): Use normalised field name parts
in the %type: entries for columns.
2010-12-01 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 29 created.
2010-12-01 Jose E. Marchesi <jemarch@gnu.org>
tasktool: fix the setting of the close time when resolving.
* tasktool (tt_process_cmd_resolve): Add or set the closing time
for a task, depending if there is an existing 'ClosedAt' field.
2010-12-01 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 25 edited.
Task 28 created.
Task 27 created.
Task 24 edited.
Task 26 created.
2010-12-01 Jose E. Marchesi <jemarch@gnu.org>
tasktool: control record support.
* TODO: Control record added.
* tasktool: Support for the TasktoolControl record and NextFreeId
field added.
2010-12-01 Jose E. Marchesi <jemarch@gnu.org>
rec-writer: cover an additional special case in rec_write_rset.
* src/rec-writer.c (rec_write_rset): Cover the special case where
a record set contains a set of comments followed by the record
descriptor.
* torture/utils/recins.sh: New tests 'recins-only-descriptor' and
'recins-comments-and-descriptor'.
2010-12-01 Jose E. Marchesi <jemarch@gnu.org>
tasktool: escape parameters passed to eval.
* tasktool (tt_escape_single_quoted): New function.
(tt_process_cmd_create): Escape all the parameters used in single
quoted strings passed to eval.
2010-11-30 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 19 resolved to 'DONE'.
Task 24 edited.
Task 24 created.
2010-11-30 Jose E. Marchesi <jemarch@gnu.org>
Tests for the before, after and sametime operators.
* torture/utils/recsel.sh: New input file 'dates'.
(recsel-sex-date-sametime): New test.
(recsel-sex-date-before): New test.
(recsel-sex-date-after): New test.
2010-11-30 Jose E. Marchesi <jemarch@gnu.org>
Documentation of the before, after and sametime operators.
* doc/recutils.texi (SEX Operators): Date operators documented.
2010-11-30 Jose E. Marchesi <jemarch@gnu.org>
Date operators before, after and sametime implementation.
* src/rec-sex.c (timespec_subtract): New function.
(rec_sex_eval_node): Manage REC_SEX_OP_BEFORE.
(rec_sex_eval_node): Manage REC_SEX_OP_AFTER.
(rec_sex_eval_node): Manage REC_SEX_OP_SAMETIME.
* src/rec-sex-ast.h: Constants for the date operators.
* src/rec-sex-tab.y: Support for the date operators.
* src/rec-sex-lex.l: New tokens for date operators '<<', '>>' and
'=='.
2010-11-29 Jose E. Marchesi <jemarch@gnu.org>
* NEWS: Updated for 1.0 release.
2010-11-27 Jose E. Marchesi <jemarch@gnu.org>
Syntax check fixes.
* TESTS: Regenerated.
* torture/rec-record/rec-record-field-p.c: Trailing blanks
removed.
* torture/utils/Makefile.am (TESTS_ENVIRONMENT): Use
$(PATH_SEPARATOR) instead of ':'.
2010-11-27 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 22 edited.
2010-11-27 Jose E. Marchesi <jemarch@gnu.org>
Support for file paths as external descriptors.
* src/rec-types.c (rec_type_check_enum): Add digits in enum
constants.
* doc/recutils.texi (External Descriptors): File paths in external
descriptors sources documented.
* src/rec-int.c (rec_int_rec_type_p): Use REC_FILE_REGEXP.
* src/rec-utils.c (rec_extract_file): New file.
2010-11-25 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 23 edited.
Task 18 edited.
2010-11-25 Jose E. Marchesi <jemarch@gnu.org>
recset: support for -r|--rename.
* torture/rec-type/rec-type-descr-type.c: New file.
(test_rec_type_descr_type): New function.
(rec_type_descr_type_nominal): New test.
(rec_type_descr_type_invalid): New test.
* src/rec-types.c (rec_type_descr_type): New function.
* TODO: Regenerated.
* torture/rec-fex/rec-fex-str.c: New file.
(test_rec_fex_str): New function.
(rec_fex_str_nominal): New test.
* src/rec-fex.c (rec_fex_elem_set_field_name): New function.
(rec_fex_str): New function.
* src/rec-rset.c (rec_rset_rename_field): New function.
* torture/utils/recset.sh:
(recset-rename): New test.
(recset-rename-first): New test.
(recset-rename-middle): New test.
(recset-rename-last): New test.
(recset-rename-range-first): New test.
(recset-rename-range-last): New test.
(recset-rename-range-all): New test.
(recset-rename-all): New test.
(recset-rename-all-descriptor): New test.
(recset-rename-all-key): New test.
(recset-rename-invalid-fex): New test.
* doc/recutils.texi (recset Invocation): Document -r|--rename.
(recset Examples): Added example for recset rename.
* utils/recset.c (recutl_print_help): New option -r|--rename
documented.
(RECSET_ACT_RENAME): New constant.
(recset_process_ren): New function.
2010-11-23 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 23 created.
2010-11-23 Jose E. Marchesi <jemarch@gnu.org>
System tests for the utilities.
* torture/utils/recfix.sh: New file.
(recfix-type-int-valid): New test.
(recfix-type-int-invalid): New test.
(recfix-type-real-valid): New test.
(recfix-type-real-invalid): New test.
(recfix-duplicated-keys): New test.
(recfix-missing-mandatory): New test.
(recfix-several-unique): New test.
(recfix-referred-type): New test.
(recfix-hidden-type): New test.
* torture/utils/testutils.sh: Support expected statuses 'ok' and
'xfail' in 'test_tool'.
* torture/utils/recset.sh: New file.
(recset-append-field): New test.
(recset-set-field): New test.
(recset-delete-field): New test.
(recset-comment-out-field): New test.
(recset-delete-non-existant): New test.
(recset-comment-out-fex-first): New test.
(recset-comment-out-fex-last): New test.
(recset-force-integrity): New test.
* torture/utils/recins.sh: New file.
(recins-empty): New test.
(recins-empty-with-type): New test.
(recins-several-fields): New test.
(recins-append): New test.
(recins-append-in-type): New test.
(recins-append-new-type): New test.
(recins-replace): New test.
(recins-replace-sex): New test.
(recins-force-restrictions): New test.
* torture/utils/recdel.sh: New file.
(recdel-first): New test.
(recdel-second): New test.
(recdel-last): New test.
(recdel-comment): New test.
(recdel-sex): New test.
(recdel-type): New test.
(recdel-force-all): New test.
* utils/recutl.c (recutl_write_db_to_file): Close the stream to
'out' if it is not 'stdout' only.
* torture/utils/recinf.sh: New file.
(recinf-empty): New test.
(recinf-one-record): New test.
(recinf-multiple-records): New test.
(recinf-multiple-named): New test.
(recinf-multiple-named-descriptors): New test.
(recinf-multiple-types): New test.
(recinf-names-only): New test.
* torture/Makefile.am (SUBDIRS): Process the current directory
before 'utils/'.
(recsel-sex-sharp-zero): New test.
(recsel-sex-sharp-one): New test.
(recsel-sex-sharp-multiple): New test.
(recsel-sex-match): New test.
2010-11-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
manual: fix overlong lines and a couple of examples.
* doc/recutils.texi (recsel Invocation, recins Invocation)
(recins Examples): Do not recommend appending to a file while
reading it. Avoid overlong lines in the synopses and examples.
2010-11-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Fix make check in VPATH case.
* torture/utils/recsel.sh: Ensure $srcdir is set; read
testsutils.sh from $srcdir.
* torture/utils/testutils.sh: Add $srcdir to PATH.
2010-11-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Tasktool operations.
* tasktool (tt_add_changelog_entry): Use portable sed features
only. Avoid changing more than the first matching entry.
2010-11-20 Jose E. Marchesi <jemarch@gnu.org>
Support negative integer and real literals in selection
expressions.
* src/rec-sex-lex.l: Support negative integers and reals in the
lexer level.
* torture/utils/recsel.sh: Integer and real operators tests.
2010-11-20 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 11 edited.
2010-11-20 Jose E. Marchesi <jemarch@gnu.org>
* tasktool (tt_process_cmd_list): Do not include tasks in
"resolution" status by default.
Include the status in the list.
2010-11-19 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 3 edited.
2010-11-15 Jose E. Marchesi <jemarch@gnu.org>
* torture/utils/Makefile.am: New file.
2010-11-15 Jose E. Marchesi <jemarch@gnu.org>
rec-sex: unit tests.
* torture/rec-sex/rec-sex-eval.c: New file.
(test_rec_sex_eval): New function.
(rec_sex_eval_match): New test.
(rec_sex_eval_nomatch): New test.
* torture/rec-sex/rec-sex-compile.c: New file.
(test_rec_sex_compile): New function.
(rec_sex_compile_nominal): New test.
(rec_sex_compile_invalid): New test.
* torture/rec-sex/rec-sex-destroy.c: New file.
(test_rec_sex_destroy): New function.
(rec_sex_destroy_nominal): New test.
* torture/rec-sex/rec-sex-new.c: New file.
(test_rec_sex_new): New function.
(rec_sex_new_nominal): New test.
* torture/rec-sex/tsuite-rec-sex.c: New file.
(tsuite_rec_sex): New function.
2010-11-15 Jose E. Marchesi <jemarch@gnu.org>
utils: compilation warnings removed.
* utils/recinf.c: Unused variables removed.
* utils/recsel.c: Likewise.
* utils/recset.c: Likewise.
* utils/recins.c: Likewise.
2010-11-15 Jose E. Marchesi <jemarch@gnu.org>
rec-writer: unit tests.
* torture/rec-writer/rec-write-comment-str.c: New file.
(test_rec_write_comment_str): New function.
(rec_write_comment_str_nominal): New test.
(rec_write_comment_str_sexp): New test.
* torture/rec-writer/rec-write-field-str.c: New file.
(test_rec_write_field_str): New function.
(rec_write_field_str_nominal): New test.
(rec_write_field_str_sexp): New test.
* torture/rec-writer/rec-write-field-name-str.c: New file.
(test_rec_write_field_name_str): New function.
(rec_write_field_name_str_nominal): New test.
(rec_write_field_name_str_sexp): New test.
* torture/rec-writer/rec-write-db.c: New file.
(test_rec_write_db): New function.
(rec_write_db_nominal): New test.
* torture/rec-writer/rec-write-rset.c: New file.
(test_rec_write_rset): New function.
(rec_write_rset_nominal): New test.
* torture/rec-writer/rec-write-record-with-fex.c: New file.
(test_rec_write_record_with_fex): New function.
(rec_write_record_with_fex_nominal): New test.
(rec_write_record_with_fex_values): New test.
(rec_write_record_with_fex_rows): New test.
2010-11-14 Jose E. Marchesi <jemarch@gnu.org>
rec-write unit tests.
* torture/rec-writer/rec-write-record.c: New file.
(test_rec_write_record): New function.
(rec_write_record_nominal): New test.
(rec_write_record_sexp): New test.
* torture/rec-writer/rec-write-field-name.c: New file.
(test_rec_write_field_name): New function.
(rec_write_field_name_nominal): New test.
(rec_write_field_name_sexp): New test.
* torture/rec-writer/rec-write-field.c: New file.
(test_rec_write_field): New function.
(rec_write_field_nominal): New test.
(rec_write_field_sexp): New test.
* torture/rec-writer/rec-write-comment.c: New file.
(test_rec_write_comment): New function.
(rec_write_comment_nominal): New test.
(rec_write_comment_sexp): New test.
* torture/rec-writer/rec-writer-destroy.c: New file.
(test_rec_writer_destroy): New function.
(rec_writer_destroy_nominal): New test.
* torture/rec-writer/rec-writer-new.c: New file.
(test_rec_writer_new): New function.
(rec_writer_new_nominal): New test.
* torture/rec-writer/tsuite-rec-writer.c: New file.
(tsuite_rec_writer): New function.
2010-11-13 Jose E. Marchesi <jemarch@gnu.org>
rec-parser unit tests.
* torture/rec-parser/rec-parser-perror.c: New file.
(test_rec_parser_perror): New function.
(rec_parser_perror_nominal): New test.
* torture/rec-parser/rec-parser-reset.c: New file.
(test_rec_parser_reset): New function.
(rec_parser_reset_nominal): New test.
* torture/rec-parser/rec-parser-error.c: New file.
(test_rec_parser_error): New function.
(rec_parser_error_nominal): New test.
* torture/rec-parser/rec-parser-eof.c: New file.
(test_rec_parser_eof): New function.
(rec_parser_eof_nominal): New test.
* torture/rec-parser/rec-parse-db.c: New file.
(test_rec_parse_db): New function.
(rec_parse_db_nominal): New test.
(rec_parse_db_invalid): New test.
* torture/rec-parser/rec-parse-rset.c: New file.
(test_rec_parse_rset): New function.
(rec_parse_rset_nominal): New test.
(rec_parse_rset_invalid): New test.
* torture/rec-parser/rec-parse-record.c: New file.
(test_rec_parse_record): New function.
(rec_parse_record_nominal): New test.
(rec_parse_record_invalid): New test.
* torture/rec-parser/rec-parse-field.c: New file.
(test_rec_parse_field): New function.
(rec_parse_field_nominal): New test.
(rec_parse_field_invalid): New test.
* torture/rec-parser/rec-parse-field-name.c: New file.
(test_rec_parse_field_name): New function.
(rec_parse_field_name_nominal): New test.
(rec_parse_field_name_invalid): New test.
* torture/rec-parser/rec-parse-field-name-str.c: New file.
(test_rec_parse_field_name_str): New function.
(rec_parse_field_name_str_nominal): New test.
(rec_parse_field_name_str_invalid): New test.
* torture/rec-parser/rec-parser-destroy.c: New file.
(test_rec_parser_destroy): New function.
(rec_parser_destroy_nominal): New test.
* torture/rec-parser/rec-parser-new.c: New file.
(test_rec_parser_new): New function.
(rec_parser_new_nominal): New test.
* torture/rec-parser/tsuite-rec-parser.c: New file.
(tsuite_rec_parser): New function.
2010-11-12 Jose E. Marchesi <jemarch@gnu.org>
rec-field unit tests.
* torture/rec-field/rec-field-to-comment.c: New file.
(test_rec_field_to_comment): New function.
(rec_field_to_comment_nominal): New test.
* torture/rec-field/rec-field-set-char-location.c: New file.
(test_rec_field_set_char_location): New function.
(rec_field_set_char_location_nominal): New test.
* torture/rec-field/rec-field-char-location-str.c: New file.
(test_rec_field_char_location_str): New function.
(rec_field_char_location_str_nominal): New test.
* torture/rec-field/rec-field-char-location.c: New file.
(test_rec_field_char_location): New function.
(rec_field_char_location_nominal): New test.
* torture/rec-field/rec-field-set-location.c: New file.
(test_rec_field_set_location): New function.
(rec_field_set_location_nominal): New test.
* torture/rec-field/rec-field-location-str.c: New file.
(test_rec_field_location_str): New function.
(rec_field_location_str_nominal): New test.
* torture/rec-field/rec-field-location.c: New file.
(test_rec_field_location): New function.
(rec_field_location_nominal): New test.
* torture/rec-field/rec-field-set-source.c: New file.
(test_rec_field_set_source): New function.
(rec_field_set_source_nominal): New test.
* torture/rec-field/rec-field-source.c: New file.
(test_rec_field_source): New function.
(rec_field_source_nominal): New test.
* torture/rec-field/rec-field-equal-p.c: New file.
(test_rec_field_equal_p): New function.
(rec_field_equal_p_equal): New test.
(rec_field_equal_p_nonequal): New test.
* torture/rec-field/rec-field-name-str.c: New file.
(test_rec_field_name_str): New function.
(rec_field_name_str_nominal): New test.
* torture/rec-field/rec-field-destroy.c: New file.
(test_rec_field_destroy): New function.
(rec_field_destroy_nominal): New test.
* torture/rec-field/rec-field-new-str.c: New file.
(test_rec_field_new_str): New function.
(rec_field_new_str_nominal): New test.
(rec_field_new_str_invalid): New test.
* torture/rec-field/rec-field-new.c: New file.
(test_rec_field_new): New function.
(rec_field_new_nominal): New test.
2010-11-12 Jose E. Marchesi <jemarch@gnu.org>
More rec-fex unit tests.
* torture/rec-fex/rec-fex-elem-max.c: New file.
(test_rec_fex_elem_max): New function.
(rec_fex_elem_max_nosubs): New test.
(rec_fex_elem_max_min): New test.
(rec_fex_elem_max_minmax): New test.
* torture/rec-fex/rec-fex-elem-min.c: New file.
(test_rec_fex_elem_min): New function.
(rec_fex_elem_min_nosubs): New test.
(rec_fex_elem_min_min): New test.
(rec_fex_elem_min_minmax): New test.
* torture/rec-fex/rec-fex-elem-field-name-str.c: New file.
(test_rec_fex_elem_field_name_str): New function.
(rec_fex_elem_field_name_str_nominal): New test.
2010-11-10 Jose E. Marchesi <jemarch@gnu.org>
More rec-fex unit tests.
* torture/rec-fex/rec-fex-elem-field-name.c: New file.
(test_rec_fex_elem_field_name): New function.
(rec_fex_elem_field_name_nominal): New test.
* torture/rec-fex/rec-fex-get.c: New file.
(test_rec_fex_get): New function.
(rec_fex_get_nominal): New test.
(rec_fex_get_invalid): New test.
2010-11-09 Jose E. Marchesi <jemarch@gnu.org>
rec-fex unit tests and some fixes.
* torture/rec-fex/rec-fex-size.c: New file.
(test_rec_fex_size): New function.
(rec_fex_size_nominal): New test.
* torture/rec-fex/rec-fex-sort.c: New file.
(test_rec_fex_sort): New function.
(rec_fex_sort_nominal): New test.
* torture/rec-fex/rec-fex-check.c: New file.
(test_rec_fex_check): New funtion.
(rec_fex_check_simple_nominal): New test.
(rec_fex_check_simple_invalid): New test.
(rec_fex_check_csv_nominal): New test.
(rec_fex_check_csv_invalid): New test.
(rec_fex_check_sub_nominal): New test.
(rec_fex_check_sub_invalid): New test.
* torture/rec-fex/rec-fex-destroy.c: New file.
(test_rec_fex_destroy): New function.
(rec_fex_destroy_nominal): New test.
* src/rec-fex.c (rec_fex_parse_elem): Support for maximum part in
subscripts.
* torture/rec-fex/rec-fex-new.c: New file.
(test_rec_fex_new): New function.
(rec_fex_new_single): New test.
(rec_fex_new_simple): New test.
(rec_fex_new_subscripts): New test.
* torture/rec-fex/tsuite-rec-fex.c: New file.
(tsuite_rec_fex): New function.
2010-11-09 Jose E. Marchesi <jemarch@gnu.org>
Lists of field names supported in type definitions. Closes task
12.
* TESTS: Regenerated.
* torture/rec-type/tsuite-rec-type.c: Reference rec-type-descr-fex
instead of rec-type-descr-field-name.
* torture/Makefile.am (REC_TYPE_TSUITE): Likewise.
* torture/rec-type/rec-type-descr-fex.c: File renamed from
'rec-type-descr-field-name.c'.
* src/rec-rset.c: Include rec-utils.h.
* src/rec-types.c (REC_TYPE_DESCR_RE): Regexp modified to allow a
comma-separated list of field names as part of the type
descriptor.
(rec_type_new): Skip the list of field names.
(rec_type_descr_fex): Renamed from 'rec_type_descr_field_name'.
2010-11-08 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 19 created.
2010-11-08 Jose E. Marchesi <jemarch@gnu.org>
* tasktool: Make 'test' to use -ne and -eq for integer
comparisons. Problem reported by Ralf Wildenhues.
2010-11-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/recutils.texi (recset Invocation): Avoid double `='.
* man/Makefile.am (man_MANS): Do not build man pages when
associated programs are not present.
* tasktool (tt_rec_check_utility): Fix redirection.
2010-11-07 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 16 created.
2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
Some improvements.
* doc/recutils.texi (Record Descriptors): Documentation of the
special fields fixed.
2010-11-07 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 15 created.
2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
* AUTHORS: Ralf Wildenhues added.
2010-11-07 Jose E. Marchesi <jemarch@termi>
Tasktool operations.
* TODO: Task 14 created.
Task 22 created.
Task 10 edited.
Task 21 edited.
Task 21 created.
Task 9 edited.
Task 8 edited.
Task 20 created.
Task 18 created.
Task 17 created.
2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
recins: support replace mode.
* tasktool (tt_supported_vcs): Use the replace-mode of recins.
* doc/recutils.texi (recins Invocation): Replace mode documented.
* utils/recins.c (COMMON_ARGS): RECORD_SELECTION_ARGS added.
(recutl_print_help): Print the record selection --help output.
(recins_parse_args): Manage record selection arguments.
2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
recins: support -r|--record.
* doc/recutils.texi (recins Invocation): Document -r|--record.
* src/rec-parser.c (rec_parse_record_str): New function.
* utils/recins.c (COMMON_ARGS): RECORD_ARG added.
(recins_parse_args): Manage the -r|--record option.
2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
tasktool: support filtering by assigned-to in list command.
* tasktool: Support the --assigned-to option in 'list'.
(tt_supported_vcs): Use generic names for the fields in the
selection expression.
(tt_help_edit): New variable.
(tt_process_cmd_show): New function.
2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
Syntax check fixes.
* src/rec-int.c: Useless cpp parens removed.
* src/rec.c: Likewise.
* .x-sc_prohibit_always_true_header_tests: New file.
* cfg.mk (gnulib_dir): Set gnulib_dir.
* ChangeLog: Empty lines removed.
* .x-sc_trailing_blank: Likewise.
More exceptions added.
* po/POTFILES.in: Updated.
* .x-sc_prohibit_S_IS_definition: New file.
* .x-sc_obsolete_symbols: New file.
2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
* configure.ac: Generate etc/Makefile.
* etc/Makefile.am: New file.
2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
* etc/FSD.rec: New file.
* doc/recutils.texi: Document the --no-remote command line
argument for recins, recfix and recset.
* utils/recins.c: Support the --no-remote command line argument.
* utils/recfix.c: Likewise.
* utils/recset.c: Likewise.
* src/rec-int.c (rec_int_check_rset): New function argument
'remote_descriptor_p'.
(rec_int_check_rset): Call 'rec_int_merge_remote'.
(rec_int_merge_remote): New function.
Include regex.h.
2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
tasktool: support for ChangeLog annotations.
* tasktool (tt_supported_vcs): New function.
2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
* configure.ac: Version changed from git to 1.0.
* TODO: Some tasks added.
2010-11-05 Jose E. Marchesi <jemarch@gnu.org>
* TODO: First serious version.
* tasktool: Fixed many problems and 'delete' command implemented.
2010-11-03 Jose E. Marchesi <jemarch@gnu.org>
recfix: little fixes.
* utils/recfix.c (main): Use EXIT_SUCCESS and EXIT_FAILURE.
(recfix_process_data): Fix wrong comparison.
2010-11-02 Jose E. Marchesi <jemarch@gnu.org>
Generate manpages using help2man.
* configure.ac: Generate man/Makefile.
* man/Makefile.am: New file.
* configure.ac: Search for help2man if not cross-compiling.
2010-11-01 Jose E. Marchesi <jemarch@gnu.org>
Syntax check problems fixed.
* src/rec-writer.c: Include config.h.
* torture/runtests.c: Likewise.
* tasktool: Use test ... && test ... instead of test ... -a
... (likewise for ||).
* utils/csv2rec.c (parse_args): Use EXIT_* values.
* utils/recutl.h: Likewise.
* utils/recutl.c: Likewise.
* utils/recset.c: Likewise.
* utils/recsel.c: Likewise.
* utils/recins.c: Likewise.
* utils/recinf.c: Likewise.
* utils/recfix.c: Likewise.
* utils/recdel.c: Likewise.
* utils/mdb2rec.c: Likewise.
* src/rec-types.c: Likewise.
* src/rec-sex.c: Likewise.
2010-11-01 Jose E. Marchesi <jemarch@gnu.org>
Make distcheck to work.
* doc/recutils.texi: Include version.texi.
* doc/Makefile.am (TEXI_TEXINFOS): Added getdate.texi.
* torture/rec-mset/rec-mset-count.c: Include
rec-mset/elem-types.h.
* torture/rec-mset/rec-mset-type-p.c: Likewise.
* torture/rec-mset/rec-mset-register-type.c: Likewise.
* torture/rec-mset/rec-mset-dup.c: Likewise.
* torture/Makefile.am (AM_CPPFLAGS): -I$(top_srcdir)/torture
added.
2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
Warnings removed in the codebase.
* src/rec-sex.c: Include rec-utils.h.
* src/rec-sex.l: Include rec-utils.h.
* src/rec-types.c (rec_type_new): Missing cases REC_TYPE_DATE and
REC_TYPE_EMAIL added.
Include rec-utils.h for rec-atoi.
(rec_type_parse_regexp): Unused variable 'b' removed.
(rec_type_descr_field_name): Likewise.
(rec_type_new): Likewise.
(rec_type_parse_size): Unused variable 'ret' removed.
(rec_type_parse_regexp_type): Unused variable 'escaping' removed.
* src/rec-fex.c: Include rec-utils.h for rec-atoi.
Unused static function rec_fex_parse_int removed.
2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
Coverage report generation.
* build-aux/generate-coverage-report: New file, from libgnupdf.
* configure.ac: Support the --enable-coverage switch.
* src/Makefile.am (AM_CFLAGS): Add coverage gcc options if
compiling the library with coverage support.
2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
rec-type-reg unit tests and bug fixes.
* torture/rec-type-reg/rec-type-reg-get.c: New file.
(test_rec_type_reg_get): New function.
(rec_type_reg_get_nominal): New test.
(rec_type_reg_get_nonexisting): New test.
* torture/rec-type-reg/rec-type-reg-register.c: New file.
(test_rec_type_reg_register): New function.
(rec_type_reg_register_nominal): New test.
* torture/rec-type-reg/rec-type-reg-destroy.c: New file.
(test_rec_type_reg_destroy): New function.
(rec_type_reg_destroy_nominal): New test.
* torture/rec-type-reg/rec-type-reg-new.c: New file.
(test_rec_type_reg_new): New function.
(rec_type_reg_new_nominal): New test.
* torture/rec-type-reg/tsuite-rec-type-reg.c: New file.
(tsuite_rec_type_reg): New function.
2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
rec-type unit tests and bug fixes.
* torture/rec-type/rec-type-check.c: New file.
(test_rec_type_check): New function.
(rec_type_check_int): New test.
(rec_type_check_bool): New test.
(rec_type_check_range): New test.
(rec_type_check_real): New test.
(rec_type_check_size): New test.
(rec_type_check_line): New test.
(rec_type_check_regexp): New test.
(rec_type_check_date): New test.
(rec_type_check_enum): New test.
(rec_type_check_field): New test.
(rec_type_check_email): New test.
* torture/rec-type/rec-type-equal-p.c: New file.
(test_rec_type_equal_p): New function.
(rec_type_equal_p_nominal): New test.
* torture/rec-type/rec-type-kind-str.c: New file.
(test_rec_type_kind_str): New function.
(rec_type_kind_str_nominal): New test.
* torture/rec-type/rec-type-kind.c: New file.
(test_rec_type_kind): New function.
(rec_type_kind_nominal): New test.
* torture/rec-type/rec-type-descr-field-name.c: New file.
(test_rec_type_descr_field_name): New function.
(rec_type_descr_field_name_nominal): New test.
(rec_type_descr_field_name_invalid): New test.
* torture/rec-type/rec-type-descr-p.c: New file.
(test_rec_type_descr_p): New function.
(rec_type_descr_p_nominal): New test.
(rec_type_descr_p_invalid): New test.
* torture/rec-type/rec-type-destroy.c: New file.
(test_rec_type_destroy): New function.
(rec_type_destroy_nominal): New test.
* torture/rec-type/rec-type-new.c: New file.
(test_rec_type_new): New function.
(rec_type_new_nominal): New test.
(rec_type_new_invalid): New test.
* torture/rec-type/tsuite-rec-type.c: New file.
(tsuite_rec_type): New function.
2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
rec-field-name unit tests and bug fixes.
* TESTS: Regenerated.
* torture/rec-field-name/rec-field-name-part-normalise.c: New
file.
(test_rec_field_name_part_normalise): New function.
(rec_field_name_part_normalise_nominal): New test.
* torture/rec-field-name/rec-field-name-str-p.c: New file.
(test_rec_field_name_str_p): New function.
(rec_field_name_str_p_nominal): New test.
* torture/rec-field-name/rec-field-name-part-str-p.c: New file.
(test_rec_field_name_part_str_p): New function.
(rec_field_name_part_str_p_nominal): New test.
* torture/rec-field-name/rec-field-name-get.c: New file.
(test_rec_field_name_get): New function.
(rec_field_name_get_nominal): New test.
* torture/rec-field-name/rec-field-name-set.c: New file.
(test_rec_field_name_set): New function.
(rec_field_name_set_nominal): New test.
* torture/rec-field-name/rec-field-name-size.c: New file.
(test_rec_field_name_size): New function.
(rec_field_name_size_empty): New test.
(rec_field_name_size_nonempty): New test.
* torture/rec-field-name/rec-field-name-ref-p.c: New file.
(test_rec_field_name_ref_p): New function.
(rec_field_name_ref_p_empty): New test.
(rec_field_naem_ref_p_nonempty): New test.
* torture/rec-field-name/rec-field-name-equal-p.c: New file.
(test_rec_field_name_equal_p): New function.
(rec_field_name_equal_p_empty): New test.
(rec_field_name_equal_p_nonempty): New test.
* torture/rec-field-name/rec-field-name-eql-p.c: New file.
(test_rec_field_name_eql_p): New function.
(rec_field_name_eql_p_empty): New test.
(rec_field_naem_eql_p_nonempty): New test.
* torture/rec-field-name/rec-field-name-dup.c: New file.
(test_rec_field_name_dup): New function.
(rec_field_name_dup_empty): New test.
(rec_field_name_dup_nominal): New test.
* torture/rec-field-name/rec-field-name-destroy.c: New file.
(test_rec_field_name_destroy): New function.
(rec_field_name_destroy_nominal): New test.
* torture/rec-field-name/tsuite-rec-field-name.c: New file.
* torture/rec-field-name/rec-field-name-new.c: New file.
(test_rec_field_name_new): New function.
(rec_field_name_new_nominal): New test.
2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
rec-comment unit tests and bug fixes.
* TESTS: regenerated.
* src/rec-comment.c (rec_comment_new): Check for a NULL argument.
* torture/rec-comment/rec-comment/equal-p.c: New file.
(test_rec_comment_equal_p): New function.
(rec_comment_equal_p_nominal): New test.
* torture/rec-comment/rec-comment-set-text.c: New file.
(test_rec_comment_set_text): New function.
(rec_comment_set_text_nominal): New test.
* torture/rec-comment/rec-commment-text.c: New file.
(test_rec_comment_text): New function.
(rec_comment_text_nominal): New test.
(rec_comment_text_empty): New test.
* torture/rec-comment/rec-comment-dup.c: New file.
(test_rec_comment_dup): New function.
(rec_comment_dup_nominal): New test.
* torture/rec-comment/rec-comment-new.c: New file.
(test_rec_comment_new): New function.
(rec_comment_new_nominal): New test.
(rec_comment_new_null): New test.
* torture/rec-comment/rec-comment-destroy.c: New file.
(test_rec_comment_destroy): New function.
(rec_comment_destroy_nominal): New test.
* torture/runtests.c (main): rec-comment test suite added.
* torture/Makefile.am: rec-comment files added.
* torture/rec-comment/tsuite-rec-comment.c: New file.
(tsuite_rec_comment): New function.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
Regenerate TESTS.
* TESTS: Regenerated.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
Unit tests for rec_mset_get.
* torture/rec-mset/rec-mset-get.c: New file
(test_rec_mset_get): New function.
(rec_mset_get_empty): New test.
(rec_mset_get_existing): New test.
(rec_mset_get_any): New test.
(rec_mset_get_invalid): New test.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
Unit tests for rec_mset_count.
* torture/rec-mset/rec-mset-count.c: New file.
(test_rec_mset_count): New function.
(rec_mset_count_empty): New test.
(rec_mset_count_existing): New test.
(rec_mset_count_nonexisting): New test.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
Unit tests for rec_mset_register_type.
* torture/rec-mset/rec-mset-register-type.c: New file.
(test_rec_mset_register_type): New function.
(rec_mset_register_type_nominal): New test.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
Unit tests for rec_mset_type_p.
* torture/rec-mset/rec-mset-type-p.c: New file.
(test_rec_mset_type_p): New function.
(rec_mset_type_p_any): New test.
(rec_mset_type_p_existing): New test.
(rec_mset_type_p_nonexisting): New test.
* torture/rec-mset/elem-types.h: New file.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
Unit tests for rec_mset_dup, and a bug fixed.
* src/rec-mset.c (rec_mset_dup): Avoid duplicating the counter of
nodes of the element types.
* torture/Makefile.am (REC_MSET_TSUITE): rec-mset-dup.c added.
* torture/rec-mset/rec-mset-dup.c: New file.
(test_rec_mset_dup): New function.
(rec_mset_dup_empty): New test.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
rec_mset test suite.
* torture/runtests.c: rec_mset test suite added.
* torture/Makefile.am: Include files from the rec_mset test suite.
* torture/rec-mset/rec-mset-new.c: New file.
(rec_mset_new_and_destroy): New unit test.
* torture/rec-mset/tsuite-rec-mset.c: New file.
(tsuite_rec_mset): New function.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
* tasktool (tt_db_template_header): New variable.
(tt_db_template_issue): New variable.
(tt_db_template): Use tt_db_template_header and tt_db_template_issue.
(tt_db_wish): New variable.
(tt_db_wish_id): New variable.
(tt_db_wish_summary): New variable.
(tt_db_wish_description): New variable.
2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
Documentation improvements.
* utils/recset.c (recutl_print_help): Don't duplicate the
--case-insensitive option in the output of --help.
* utils/recinf.c (recutl_print_help): Print a newline before the
examples in the output of --help.
* doc/recutils.texi: Documentation for recdel, recins, recset and
recfix added to the reference manual.
2010-10-25 Jose E. Marchesi <jemarch@gnu.org>
User manual work.
* doc/recutils.texi (Fields and Records): Wording improvements.
(Escalar types): Completed.
(String types): Completed.
(Time related types): Completed.
(recinf Invocation): Document -S|--print-sexps.
* doc/recutils.texi (Top): Improve the menu layout.
2010-10-24 Jose E. Marchesi <jemarch@gnu.org>
i18n with gettext.
* m4/gettext.m4: Upgrade to gettext-0.18.1.
* m4/iconv.m4: Upgrade to gettext-0.18.1.
* m4/lib-ld.m4: Upgrade to gettext-0.18.1.
* m4/lib-link.m4: Upgrade to gettext-0.18.1.
* m4/progtest.m4: Upgrade to gettext-0.18.1.
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.18.1.
* src/Makefile.am (librec_la_SOURCES): Add rec.c.
* src/rec-fex.c: Internationalize strings with gettext.
* src/rec-types.c: Likewise.
* src/rec-parser.c: Likewise.
* src/rec-int.c: Likewise.
* src/rec-field-name.c: Likewise.
* utils/recutl.c: Likewise.
* utils/recset.c: Likewise.
* utils/recsel.c: Likewise.
* utils/recins.c: Likewise.
* utils/recinf.c: Likewise.
* utils/recdel.c: Likewise.
* utils/mdb2rec.c: Likewise.
* utils/csv2rec.c: Likewise.
* Makefile.am (SUBDIRS): Add po.
2010-09-23 Jose E. Marchesi <jemarch@gnu.org>
* configure.ac: Invoke AB_INIT.
2010-09-19 Jose E. Marchesi <jemarch@gnu.org>
Simple fix in --help.
* utils/recutl.h (COMMON_ARGS_DOC): Don't mention recsel in the
description of the --version option.
2010-09-14 Jose E. Marchesi <jemarch@gnu.org>
rec-mode: make C-a to do the right thing.
* lisp/rec-mode.el (rec-mode-map): Bind C-a to
rec-cmd-beginning-of-line.
(rec-mode-edit-map): Likewise.
(rec-cmd-beginning-of-line): New function.
2010-09-09 Jose E. Marchesi <jemarch@gnu.org>
Support for localization on lisp output.
* src/rec-record.c: New fiels 'char_location' and
'char_location_str' in the 'rec_record_s' struct.
* src/rec-parser.c (rec_parse_field): Set the char location of
fields.
(rec_parser_ungetc): Decrease parser->character.
* src/rec-field.c: New functions 'rec_field_char_location',
'rec_field_set_char_location' and 'rec_field_char_location_str'.
* src/rec-parser.c: Use size_t instead of int for the 'line' field
of the rec_parser_s structure.
(rec_parser_getc): Update parser->character as well.
(rec_parser_new): Initialize parser->character to 0.
2010-09-09 Jose E. Marchesi <jemarch@gnu.org>
Support for lisp output.
* utils/recinf.c: Support the -S option.
* utils/recsel.c: Likewise.
* src/rec-writer.c (rec_write_record): New 'mode' argument.
(rec_write_field_name): Likewise.
(rec_write_field): Likewise.
(rec_write_field_str): Likewise.
* src/rec.h: New function.
(rec_writer_mode_t): New data type.
2010-09-02 Jose E. Marchesi <jemarch@gnu.org>
Little doc improvements.
* doc/recutils.texi: Little doc improvements.
2010-08-24 Jose E. Marchesi <jemarch@gnu.org>
fixes in the parsing of types.
* src/rec-int.c (rec_int_check_descriptor): Localize the error in
the concrete field.
* src/rec-types.c: Parsing routines rewritten.
2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-types.c (rec_type_skip_blanks): New function.
(rec_type_descr_field_name): Use rec_type_skip_blanks.
(rec_type_new): Likewise.
(rec_type_parse_int): New function.
2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
rec-sex: support for real values in some operators.
* src/rec-sex.c (rec_sex_op_real_p): New function.
(ATOF_VAL): New macro.
2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
utilities: use xmalloc and xstrdup.
* utils/csv2rec.c: Use xmalloc instead of malloc.
Use xstrdup instead of strdup.
Include xalloc.h.
* utils/recutl.h: Likewise.
* utils/recutl.c: Likewise.
* utils/recset.c: Likewise.
* utils/recins.c: Likewise.
* utils/mdb2rec.c: Likewise.
2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
mdb2rec: documentation and management of money fields.
* utils/mdb2rec.c (process_table): Declare MONEY fields as real
values.
* doc/recutils.texi (mdb2rec Examples): Written.
2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
rec-types: support for the 'field' type.
* src/rec-types.c (REC_TYPE_FIELD_NAME): Defined.
(REC_TYPE_FIELD_VALUE_RE): Defined in terms of REC_FNAME_RE.
(REC_TYPE_NAME_RE): REC_TYPE_FIELD_NAME added.
(REC_TYPE_FIELD_DESCR_RE): Defined.
(REC_TYPE_DESCR_RE): REC_TYPE_FIELD_DESCR_RE added.
(rec_type_kind_str): Added case for REC_TYPE_FIELD.
(rec_type_check): Likewise.
(rec_type_parse_type_kind): Likewise.
(rec_type_check_field): New function.
* src/rec.h (REC_FNAME_RE): Do not include anchors in regexp.
2010-08-23 Jose E. Marchesi <jemarch@gnu.com>
mdb2rec: specification of the table in the command line and the
list-tables option.
* doc/recutils.texi (mdb2rec Invocation): Document the
--list-tables command line option.
* utils/mdb2rec.c (process_mdb): Print the names of the tables,
one per line, if mdb2rec_list_tables was specified.
* doc/recutils.texi (mdb2rec Invocation): Document the usage of
TABLE in the command line.
* utils/mdb2rec.c: New global variable 'mdb2rec_mdb_table'.
(parse_args): Set mdb2rec_mdb_table.
(process_mdb): Process the requested table only if
mdb2rec_mdb_table is initialized.
2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
mdb2rec: emit field types for VARCHAR columns.
* src/rec-types.c (rec_type_new): Finish the number[] string with
a null value.
* utils/mdb2rec.c (process_table): Process case when col_size > 0.
2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
rec-int: warn on colling types only if the types are different.
* src/rec-int.c (rec_int_check_field_type): Emit warning on
colliding types only if the types are not equal.
* src/rec-types.c (rec_type_equal_p): New function.
2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
mdb2rec: use compound field names to reflect relationships between
columns in the mdb tables.
* utils/mdb2rec.c (get_field_name): New function.
(process_table): Use 'get_field_name'.
2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
manual: texinfo fixes.
* doc/recutils.texi: mdb2rec is a chapter.
Fix mdb2rec menu.
2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
build: advertise third-party dependencies.
* README-dev: Add a note on the dependencies on third party
products.
2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
Validation of record type names and minor fixes.
* utils/mdb2rec.c (process_table): Use
'rec_field_name_part_normalise'.
* src/rec-field-name.c (rec_field_name_part_normalise): New
function.
* utils/mdb2rec.c (process_mdb): Configure libmdb to dump dates in
ISO 8601 format.
* src/rec-int.c (rec_int_check_descriptor): Check for the validity
of the record set type.
* utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Check for the
validity of the record types passed using -t.
* src/rec.h: New function 'rec_field_name_str_p'.
New function 'rec_field_name_part_str_p'.
(REC_FNAME_PART_RE): Defined.
(REC_FNAME_RE): Defined.
* src/rec-field-name.c (rec_field_name_str_p): New function.
(rec_field_name_part_str_p): New function.
* doc/recutils.texi (Record Descriptors): Clarify that the record
types have the same format restrictions that field names.
2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
build: check for glib as a dependency to build mdb2rec.
* configure.ac: Check for glib.
* utils/mdb2rec.c: Include glib.h.
2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
mdb2rec: normalize field names and new option to keep empty fields
in the rec output.
* doc/recutils.texi (mdb2rec Invocation): Document '-e'.
* utils/mdb2rec.c (parse_args): Manage '-e'.
(process_table): Normalize field names.
2010-08-21 Jose E. Marchesi <jemarch@gnu.org>
utils: new util mdb2rec.
* src/rec-writer.c (rec_write_rset): Manage special case: empty
record sets with a record descriptor.
* src/rec.h: New function 'rec_field_new_str'.
* src/rec-field.c (rec_field_new_str): Idem.
2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
* configure.ac: Search for libmdbtools and define MDBLIBS.
* utils/Makefile.am: Build mdb2rec.
* utils/mdb2rec.c: New file.
2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
csv2rec: several minor fixes.
* utils/csv2rec.c (main): Make sure a rec database was created
before to attempt to write it.
* configure.ac: Emit a warning if libcsv is not found, noticing
the user that csv2rec won't build.
2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
Fixing of memory errors.
* src/rec-sex.c (rec_sex_eval_node): Free the memory used by the
compiled regexps.
* utils/recfix.c (main): Free the memory used by the rec database.
* utils/recsel.c (main): Likewise.
* utils/recsel.c (recsel_process_data): Free the memory used by
the rec writer.
* src/rec-parser.c (rec_parser_buf_adjust): Realloc to adjust the
memory used by the buffer.
* src/rec-sex.l (rec_sex_lex_extract_name): Avoid an invalid write
after the res[] buffer.
2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
utils: new util csv2rec.
* doc/recutils.texi (csv2rec): New chapter.
* configure.ac: Check for libcsv and define the LIBCSV automake
conditional accondingly.
* utils/Makefile.am (bin_PROGRAMS): csv2rec added.
(csv2rec_SOURCES): New variable.
(csv2rec_LDADD): New variable.
* utils/csv2rec.c: New file.
2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
build: fix autogen.sh.
* autogen.sh: Call libtoolize.
Invoke automake with --add-missing.
2010-08-09 Jose E. Marchesi <jemarch@gnu.org>
Little script to get cyclomatic metrics from pmccabe.
* build-aux/pmccabe2rec: New file.
2010-08-08 Jose E. Marchesi <jemarch@gnu.org>
Fix source in parse error messages in recinf.
* utils/recinf.c (print_info_file): Specify the file name in parse
errors instead of 'stdin'.
2010-08-08 Jose E. Marchesi <jemarch@gnu.org>
Generate information about tests in rec format and store it in
TESTS.
* README-dev: Added a note on updating the TESTS file when a test
is added to the test suite.
* TESTS (Test): New file, generated ith 'get-test-data'.
* build-aux/get-test-data: New file.
* torture/rec-record/rec-record-size.c: rec_record_size_001
renamed to rec_record_size_empty.
rec_record_size_002 renamed to rec_record_size_nonempty.
(test_rec_record_size): Call to rec_record_size_empty and
rec_record_size_nonempty.
* torture/rec-record/rec-record-remove-field.c:
rec_record_remove_field_001 renamed to
rec_record_remove_field_existing.
(test_rec_record_remove_field): Call to
rec_record_remove_field_existing.
* torture/rec-record/rec-record-new.c: rec_record_new_001 renamed
to rec_record_new_and_destroy.
* torture/rec-record/rec-record-insert-field.c:
rec_record_insert_field_001 renamed to
rec_record_insert_field_empty.
rec_record_insert_field_002 renamed to
rec_record_insert_field_nonempty.
rec_record_insert_field_003 renamed to
rec_record_insert_field_duplicated.
(test_rec_record_insert_field): Call
rec_record_insert_field_empty, rec_record_insert_field_nonempty
and rec_record_insert_field_duplicated.
* torture/rec-record/rec-record-field-p.c: rec_record_field_p_001
renamed to rec_record_field_existing.
rec_record_field_p_002 renamed to rec_record_field_nonexisting.
* torture/rec-field/rec-field-value.c: rec_field_value_001 renamed
to rec_field_value_empty.
rec_field_value_002 renamed to rec_field_value_nonempty.
(test_rec_field_value): Call to rec_field_value_empty and
rec_field_value_nonempty.
* torture/rec-field/rec-field-set-value.c: rec_field_set_value_001
renamed to rec_field_set_value_empty.
rec_field_set_value_002 renamed to rec_field_set_value_nonempty.
(test_rec_field_set_value): Call to rec_field_set_value_empty and
rec_field_set_value_nonempty.
* torture/rec-field/rec-field-set-name.c: rec_field_set_name_001
renamed to rec_field_set_name_empty.
rec_field_set_name_002 renamed to rec_field_set_name_nonempty.
(test_rec_field_set_name): Call to rec_field_set_name_empty and
rec_field_set_name_nonempty.
* torture/rec-field/rec-field-name.c: rec_field_name_001 renamed
to rec_field_name_empty.
rec_field_name_002 renamed to rec_field_name_nonempty.
(test_rec_field_name): Call to 'rec_field_name_empty' and
'rec_field_name_nonempty'.
Comments reformatted to contain rec data.
* torture/rec-field/rec-field-dup.c: rec_field_dup_001 renamed to
rec_field_dup_empty.
rec_field_dup_002 renamed to rec_field_dup_nonempty.
(test_rec_field_dup): Call to 'rec_field_dup_empty' and
'rec_field_dup_nonempty'.
Comments reformated to contain rec data.
2010-08-07 Jose E. Marchesi <jemarch@gnu.org>
Import the gnulib gettext module.
* 'gettext' gnulib module imported.
2010-08-06 Jose E. Marchesi <jemarch@gnu.org>
Minor fixes in documentation.
* src/rec-int.c (rec_int_check_field_type): Out to date comment
removed.
* doc/recutils.texi (Field Types): New chapter.
(Escalar types): New section.
(String types): New section.
(Enumerated types): New section.
(Time related types): New section.
(Selection Expressions): New section.
2010-08-05 Jose E. Marchesi <jemarch@gnu.org>
Assure proper exit values when redirecting output and some common
facilities in recutl.c
* utils/recset.c (recset_parse_args): Use 'recutl_fatal' and
'recutl_error'.
(main): Use 'recutl_init'.
* utils/recins.c (recins_insert_record): Use 'recutl_error'.
(main): Use 'recutl_init'.
* utils/recinf.c (main): Use 'recutl_init'.
* utils/recfix.c (main): Use 'recutl_init'.
* utils/recdel.c (recdel_delete_records): Use 'recutl_fatal'.
(recdel_delete_records): Likewise.
(recdel_parse_args): Likewise.
(main): Use 'recutl_init'.
* utils/recsel.c (main): Use 'recutl_init'.
* utils/recutl.c (recutl_error): New function.
* utils/recsel.c (recsel_parse_args): Use 'recutl_fatal'.
(recsel_parse_args): Likewise.
(recsel_process_data): Use 'recutl_error'.
* utils/recutl.c: Include 'closeout.h'.
(recutl_init): New function.
(recutl_init): Initialize the global variable 'program_name' with
'util_name'.
(recutl_init): Install the 'close_stdout' handler to be executed
upon exit.
(recutl_fini): New function.
(recutl_fatal): New function.
Include stdarg.
* Module 'closeout' imported from gnulib.
2010-08-05 Jose E. Marchesi <jemarch@gnu.org>
* README-dev: Imported and adapted from GNU hello.
* NEWS: Likewise.
* README: Rephrased to follow the GNU hello style.
* configure.ac: Invoke AC_PROG_YACC.
* autogen.sh: Imported and adapted from GNU hello.
2010-08-02 Jose E. Marchesi <jemarch@gnu.org>
lib+utils: check the values returned by malloc.
* src/rec-field.c (rec_field_set_location): Check for the return
value of 'malloc'.
* src/rec-parser.c (rec_parser_perror): Likewise.
* src/rec-parser.c (rec_parse_field_name_str): Likewise.
* src/rec-record.c (rec_record_set_location): Likewise.
* utils/recins.c (recins_parse_args): Likewise.
* utils/recutl.c (recutl_write_db_to_file): Likewise.
* src/rec-fex.c (rec_fex_check): Emit error message only if there
is enough memory to build the message.
(rec_fex_parse_str_simple): Check for the return value of
'malloc'.
(rec_fex_parse_str_subscripts): Likewise.
(rec_fex_parse_elem): Likewise.
2010-08-01 Jose E. Marchesi <jemarch@gnu.org>
recutl: avoid printing spurious newline characters when -P or -R
is used.
* utils/recutl.c (recutl_eval_field_expression): New variable
'written_field'.
(recutl_eval_field_expression): Add a newline to a sequence of
field values only if some field was actually written.
rec-record: Tiny improvement in an algorithm.
* src/rec-record.c (rec_record_get_field_by_name): Don't return
from the middle of the function. Use a variable and break
instead.
recsel: allow dashes in field names when checking the field
expressions.
* src/rec-fex.c (rec_fex_check): Allow dashes '-' in field names
in field expressions.
recsel: avoid a segmentation fault while printing record descriptors.
* utils/recsel.c (recsel_process_data): Test for NULL before
printing the record descriptor of a record set. Reported by Kai
via savannah.
2010-07-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Fix distcheck: linking tests in torture/.
* torture/Makefile.am: Simplify. Use relative path to librec.la
so dependencies are tracked correctly and distcheck works.
2010-07-31 Jose E. Marchesi <jemarch@gnu.org>
Information for the Free Software Directory added in FSD.
* FSD (Description): New file.
Make git to ignore some more generated files.
* .gitignore: Ignore doc/recutils.aux, doc/recutils.cp, doc/recutils.cps,
doc/recutils.fn, doc/recutils.fns, doc/recutils.ky,
doc/recutils.log, doc/recutils.pg,
doc/recutils.toc, doc/recutils.tp, doc/recutils.vr and
doc/recutils.vrs.
Ignore lib/alloca.h, lib/c++defs.h, lib/stdlib.h, lib/string.h,
lib/sys, lib/time.h, lib/warn-on-use.h, lib/wchar.h.
Ignore torture/test
2010-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Simplify makefile rules.
* utils/Makefile.am: Simplify.
* src/Makefile.am: Likewise.
Typos and formatting nits.
* configure.ac: Fix typo.
* doc/recutils.texi: Fix typo, add some @noindents.
2010-07-30 Jose E. Marchesi <jemarch@gnu.org>
* gendocs gnulib module imported.
2010-07-25 Jose E. Marchesi <jemarch@gnu.org>
Manual: misc improvements.
* doc/recutils.texi: Misc improvements.
2010-07-25 Jose E. Marchesi <jemarch@gnu.org>
GHM 2010 slides.
* doc/recutils.ept: New file.
2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
Parametrize the name of the fields in the issues.
* tasktool: New variables containing the names of the issue
fields: tt_db_field_id, tt_db_field_summary, tt_db_field_type,
tt_db_field_status, tt_db_field_originator, tt_db_field_assignee,
tt_db_field_assigned, tt_db_field_component, tt_db_field_created,
tt_db_field_note, tt_db_field_description.
(tt_db_template): Use the variables described above.
(tt_version): Likewise.
(tt_version): Likewise.
(tt_version): Likewise.
(tt_supported_vcs): Likewise.
(tt_supported_vcs): Likewise.
2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
Avoid build dependency with bison.
* lib/getdate.c: New file.
* build-aux/.gitignore: Ignore ylwrap.
2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
Integrate getdate documentation in the manual.
* doc/recutils.texi (Top): Entry for the "Date input formats"
chapter added.
Include 'getdate.texi'.
FSF copyright added in the manual.
2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
Implementation of the 'date' field type.
* tasktool (tt_db_template): Declare Date as a field of type
'date'.
* src/Makefile.am (librec_la_LIBADD): LIB_CLOCK_GETTIME added to
find the definition of 'clock_gettime'.
* src/rec-types.c (rec_type_check_date): Implemented using
'get_date'.
Include getdate.h.
2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
Gnulib work.
* Gnulib updated.
* Module 'getdate' imported.
2010-07-18 Jose E. Marchesi <jemarch@gnu.org>
Localization of fields and better error reporting.
* src/rec-int.c (rec_int_check_record_types): Improve error
localization.
* utils/recutl.c (recutl_parse_db_from_file): Report parse errors.
* src/rec-int.c (rec_int_check_field_type): Use localization
information in the warning.
* src/rec-parser.c (rec_parse_field): Annotate the fields with
their location in the source file.
* src/rec-field.c (rec_field_destroy): Free memory occupied by the
location properties upon field destruction.
* src/rec.h: New functions 'rec_field_source',
'rec_field_set_source', 'rec_field_location',
'rec_field_set_location' and 'rec_field_location_str'.
* src/rec-field.c: Implementation of the functions listed above.
2010-07-18 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-int.c: Copyright notification added.
2010-07-15 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-field-name.c (rec_field_name_ref_p): New function.
* src/rec-int.c (rec_int_check_rset): Pass 'db' to
'rec_rset_elem_record'.
* utils/recins.c (recins_insert_record): Pass the database
containing the rset containing the record to 'rec_int_check_rset'.
* utils/recset.c (recset_process_actions): Likewise.
* src/rec.h: 'rec_int_check_rset' gets a parameter (optional using
NULL) 'db'.
Likewise for 'rec_int_check_record'.
Likewise for 'rec_int_check_field_type'.
* src/rec-int.c (rec_int_check_rset): Likewise.
2010-07-15 Jose E. Marchesi <jemarch@gnu.org>
New function re_int_check_db to check the integrity of a database.
* utils/recfix.c (recfix_process_data): Use 'rec_int_check_db'.
* src/rec-int.h: New function 'rec_int_check_db'.
* src/rec-int.c (rec_int_check_db): New function.
2010-07-15 Jose E. Marchesi <jemarch@gnu.org>
Relocate data integrity related code to rec-int.c.
* src/rec-int.c (rec_int_check_field_type): Use
'rec_rset_get_type_reg' to get the type registry of records sets
instead of accessing the data structure.
* src/rec.h: New function 'rec_rset_get_type_reg'.
* src/rec-rset.c (rec_rset_get_type_reg): New function.
* src/Makefile.am (librec_la_SOURCES): 'rec-int.c' added.
* utils/recfix.c (recfix_process_data): Use 'rec_int_check_rset'
instead of 'rec_rset_check'.
* utils/recins.c (recins_insert_record): Likewise.
* utils/recset.c (recset_process_actions): Likewise.
* src/rec-int.c: New file.
* src/rec.h: 'rec_rset_check' renamed to 'rec_int_check_rset'.
'rec_rset_check_record' renamed to 'rec_int_check_record'.
'rec_rset_check_field_type' renamed to 'rec_int_check_field_type'.
2010-07-14 Jose E. Marchesi <jemarch@gnu.com>
Change -v|--verbose in recinf for -d|--descriptor.
* utils/recinf.c (COMMON_ARGS): VERBOSE_ARG renamed to
DESCRIPTOR_ARG.
(print_info_file): Process the -d|--descriptor command line
argument instead of -v|--verbose.
2010-07-14 Jose E. Marchesi <jemarch@gnu.org>
Support for the --type option in recinf.
* utils/recinf.c (COMMON_ARGS): New argument 'TYPE_ARG'.
(GNU_longOptions): New argument '--type'.
(recutl_help_msg): Doc for the new argument 'type'.
(recinf_type): New global variable.
(print_info_file): If a type was specified at command line, skip
records not having that type.
2010-07-14 Jose E. Marchesi <jemarch@gnu.org>
Keep the descriptor relative position when inserting records in an
empty record set.
* utils/recins.c (recins_insert_record): Take into account the
descriptor relative position in the record set when inserting a
record into an empty rset.
2010-07-14 Jose E. Marchesi <jemarch@gnu.org>
Little fixes in tasktool.
* tasktool (tt_db_show_task): Use a selection expression implying
that Id is an integer, not a string.
(tt_supported_vcs): Typo fixed.
* tasktool (tt_db_task_p): Likewise.
2010-07-14 Jose E. Marchesi <jemarch@gnu.org>
Fix a regression in the definition of the REC_TYPE_DESCR_RE
regexp.
* src/rec-types.c (REC_TYPE_DESCR_RE): Regexp fixed.
2010-07-13 Jose E. Marchesi <jemarch@gnu.org>
Support for the type 'field' removed.
* src/rec-types.c: Data types, constants and functions removed for
the 'field' type.
2010-07-13 Jose E. Marchesi <jemarch@gnu.org>
Bug preventing empty fields without a beginning space fixed.
* src/rec-parser.c (rec_parse_field_name): If a newline is found
terminating a field name then push it back to the input stream, so
it will be part of the field value.
2010-07-13 Jose E. Marchesi <jemarch@gnu.org>
Keep information about the position of the record descriptor in a
record set.
* src/rec-rset.c (rec_rset_set_descriptor_pos): New function.
(rec_rset_descriptor_pos): New function.
(rec_rset_new): Initialize new->descriptor_pos to 0.
(struct rec_rset_s): New field descriptor_pos.
* src/rec.h: Prototypes for 'rec_rset_descriptor_pos' and
'rec_rset_set_descriptor_pos'.
* src/rec-parser.c (rec_parse_rset): New local variable to store
the number of comments added to the record set. In the special
case where some comments are preceding the first record descriptor
in the file, store the relative position of the descriptor in the
record set using rec_rset_descriptor_pos.
* src/rec-writer.c (rec_write_rset): Write the descriptor in its
relative position into the record set.
2010-06-19 Jose E. Marchesi <jemarch@gnu.org>
* utils/recins.c: Help string improved.
2010-04-30 Jose E. Marchesi <jemarch@gnu.org>
* lisp/rec-mode.el (rec-count): New implementation based on
'recsel'.
2010-04-28 Jose E. Marchesi <jemarch@gnu.org>
* .gitignore: Ignore /utils/recfix.
2010-04-22 Jose E. Marchesi <jemarch@gnu.org>
* utils/recset.c (recset_parse_args): Stop the program with an
error code if an invalid option is specified in the command line.
(recset_process_actions): SET action implemented.
2010-04-21 Jose E. Marchesi <jemarch@gnu.org>
* utils/recset.c: Help string completed with record selection
options, fields selection options and actions.
* doc/recutils.texi (Record Descriptors): Documentation for the
record descriptor field '%order'.
2010-04-08 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-mset.c: Distribution terms added.
* src/rec-mset.h: Likewise.
2010-04-07 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-mset.c (rec_mset_elem_next): Added the MSET parameter.
Return the first element of the given type if ELEM is NULL.
2010-04-01 Jose E. Marchesi <jemarch@gnu.org>
* .gitignore: Ignore backup files.
2010-01-11 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-parser.c (rec_parse_field_name_str): New function.
2010-01-09 Jose E. Marchesi <jemarch@gnu.org>
* src/Makefile.am (librec_la_SOURCES): rec-sex.l added to the
list.
* src/rec-sex.y: New file.
* src/rec-sex.l: New file.
2009-12-28 Jose E. Marchesi <jemarch@gnu.org>
* utils/recinf.h (HELP_ARG): New file.
* utils/recinf.c: New file.
* utils/Makefile.am (recinf_LDFLAGS): New file.
2009-12-23 Jose E. Marchesi <jemarch@gnu.org>
* lisp/rec-mode.el: New file.
(rec-field-trim-value): New function.
(rec-cmd-trim-field-value): New function.
2009-11-30 Jose E. Marchesi <jemarch@gnu.org>
* lisp/rec-mode.el (rec-beginning-of-record-pos): Don't signal an
error if the buffer is empty.
2009-10-02 Jose E. Marchesi <jemarch@gnu.org>
* lisp/rec-mode.el: New file.
2009-10-01 Jose E. Marchesi <jemarch@gnu.org>
* src/rec-record.c (rec_record_new): Allow duplicates.
2009-09-03 Jose E. Marchesi <jemarch@gnu.org>
* src/grec.h: Comments clarified.
2009-07-23 Jose E. Marchesi <jemarch@gnu.org>
* doc/fdl.texi: New file.
* doc/gnurec.texi: New file.
2009-07-13 Jose E. Marchesi <jemarch@gnu.org>
* torture/runtests.c (main): Use CK_ENV instead of CK_VERBOSE in
srunner_run_all.
* Begin of the change log.
Copyright 2009-2014 Jose E. Marchesi
Copying and distribution of this file, with or without modification, are
permitted in any medium without royalty provided the copyright notice
and this notice are preserved.
|