1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392
|
Thu Feb 23 09:32:01 1995 John Eaton <jwe@schoch.che.utexas.edu>
* Version 1.1.1 released.
* src/idx-vector.cc (idx_vector (const Range&)): Always initialize
data to 0.
(idx_vector (const Matrix&, int, const char *, int)): Likewise.
(idx_vector (const idx_vector&): Likewise, do it first.
* src/idx-vector.h (~idx_vector): Simply delete data.
* octMakefile.in: Combine libcruft, liboctave,dld, info, readline,
kpathsea, src, scripts, and doc targets into just one.
(all): Depend on $(SUBDIRS).
* libcruft/Makefile.in (make-objects): Change to $(SUBDIRS)
target that doesn't use a loop.
(all): Depend on $(SUBDIRS).
Wed Feb 22 07:27:18 1995 John Eaton <jwe@schoch.che.utexas.edu>
* Don't leave @LIBDLD@ on a line by itself.
* src/tc-rep-idx.cc (fortran_style_matrix_index): Handle zero-one
indexing as a separate case.
(fortran_style_matrix_index): Check for out-of-bounds index.
* src/idx-vector.cc (init_state): Don't forget len, num_zeros, and
the one_zero flag for vectors of all zero elements.
(convert_one_zero_to_idx): Set data to zero after deleting it.
* src/data.cc (check_dimensions):
Handle case of treat_neg_dim_as_zero = "warn".
Tue Feb 21 08:18:19 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-misc.cc (initialize_undefined_elements): Don't declare
arg const.
* src/sysdepl.cc (octave_getcwd): Declare arg as char *, not
const char *.
* src/input.cc (match_sans_spaces): Initialize ep from copy of
arg, not arg itself.
* octMakefile.in (snapshot-version): Look for OCTAVE_VERSION,
not just VERSION. Don't end #define with a semicolon.
Mon Feb 20 15:57:17 1995 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/image/Makefile.in (clean): Delete octtopnm.o and octtopnm.
Fri Feb 17 08:12:09 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/variables.cc (maybe_add_default_load_path): New function,
extracted from default_path(), which no longer needs it.
* src/user-prefs.cc (sv_loadpath): Call it here.
Wed Feb 15 15:13:22 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/octave.cc (verbose_usage): Format help message more like
the help messages of other GNU programs.
* src/variables.cc (install_builtin_variables): New builtin
variable, suppress_verbose_help_message.
* src/user-prefs.cc (user_prefs): New field,
suppress_verbose_help_message.
* src/user-prefs.cc (suppress_verbose_help_message): New function.
* src/help.cc (additional_help_message): Check
user_pref.suppress_verbose_help_message before printing message.
Tue Feb 14 15:36:01 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/sysdep.cc (octave_chdir): New function.
* src/dirfns.cc (change_to_directory): Use it.
* src/sysdep.cc (octave_getcwd): New function.
* src/dirfns.cc (get_working_directory, Fpwd): Use it.
* src/input.cc (decode_prompt_string): Likewise.
* src/version.h (VERSION): New #define.
(version_string): Use it.
(OCTAVE_COPYRIGHT): New #define.
(OCTAVE_NAME_AND_VERSION): New #define.
(OCTAVE_NAME_VERSION_AND_COPYRIGHT): New #define.
(OCTAVE_STARTUP_MESSAGE): New #define.
* src/octave.cc (main): Use new macros from version.h
(print_version_and_exit): Likewise.
(verbose_usage): Likewise.
(Fwarranty): Likewise.
* Makeconf.in (version): Make work with new version.h.
* octMakefile.in (snapshot-version): Likewise.
* src/variables.cc (default_path): Use SEPCHAR instead of literal ':'.
* src/utils.cc (pathstring_to_vector): Likewise.
* src/octave.cc (initialize_globals): Likewise, use SEPCHAR_STR to
construct format string instead of using literal `:'.
* configure.in: Call AC_DEFINE for SEPCHAR and SEPCHAR_STR.
* acconfig.h: Add #undefs for SEPCHAR and SEPCHAR_STR.
* src/dynamic-ld.cc: Don't include dld.h unless WITH_DLD.
* src/octave.cc (parse_and_execute): Close file.
Mon Feb 13 19:39:12 1995 John Eaton (jwe@bullwinkle.che.utexas.edu)
* scripts/general/linspace.m: Delete.
* src/data.cc (Flinspace): New function.
* liboctave/dRowVector.cc (linspace): New function.
* liboctave/CRowVector.cc (linspace): New function.
Sun Feb 12 21:23:54 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/load-save.cc (read_mat_binary_data): Only convert to string
if the number of rows is 1.
* scripts/image/saveimage.m: Force ASCII save.
Thu Feb 9 08:46:09 1995 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/elfun/sec.m: Returned variable is `w', not `y'.
* scripts/elfun/sech.m: Likewise.
Wed Feb 8 10:51:33 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/f-find.cc (find_nonzero_elem_idx): Increment i, j indices by
1 before stashing them.
Fri Feb 3 15:44:03 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-misc.cc
(tree_parameter_list::initialize_undefined_elements): New function.
* src/tree-expr.cc (tree_function::eval): Use it to define return
values.
(tree_simple_assignment_expression:eval): Complain if RHS is undefined.
(tree_multi_assignment_expression:eval): Complain if any of the
RHS values are undefined.
* src/user-prefs.h (init_user_prefs): New structure element,
define_all_return_values.
* src/user-prefs.cc (define_all_return_values): New function.
* src/variables.cc (install_builtin_variables): Add DEFVARs for
default_return_value and define_all_return_values.
(builtin_any_variable): New function.
Wed Feb 1 08:02:28 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/parse.y (parse_error): Call yyerror() here.
(input): Not here.
* src/lex.l (handle_string): Call have_continuation and
have_ellipsis_continuation with 0 arg, to disallow comments after
continuation characters inside strings.
(have_continuation): New arg, trailing_comments_ok with default
value of 1. If !trailing_comments_ok, don't allow comments to
follow continuation token.
(have_ellipsis_continuation): New arg, trailing_comments_ok, with
default value of 1. Pass it along to have_continuation.
* src/parse.y (yyerror): Call parse_error with first arg == "%s",
since msg might contain format specifiers.
* src/tree-expr.cc (tree_index_expression::eval (int)): Detect
undefined elements in argument list and print error message.
(tree_index_expression::eval (int, int, const Octave_object&)):
Likewise.
* configure.in: Only set CFLAGS, CXXFLAGS, LDFLAGS, FFLAGS, and
F2CFLAGS if they are not already set in the environment.
* doinstall.sh: Add -print to find commands.
Tue Jan 31 13:26:53 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l (<MATRIX>{S}*\,{S}*): Eat any trailing continuation
here. Use value returned from eat_continuation to decide whether
to insert a row separator.
(<MATRIX>{S}+): Likewise.
(<MATRIX>{SNLCMT}*\n{SNLCMT}*): Eat any trailing whitespace here.
* lex.l (ATE_SPACE_OR_TAB, ATE_NEWLINE): New macros.
(eat_whitespace): Use them to set return value.
Mon Jan 30 14:02:24 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/user-prefs.cc (set_output_precision): Don't pass NaN to NINT.
(set_output_max_field_width): Likewise.
(set_save_precision): Likewise.
* src/file-io.cc (return_valid_file): Likewise.
(fgets_internal): Likewise.
(fseek_internal): Likewise.
(process_printf_format): Likewise.
(fread_internal): Likewise.
* src/f-colloc.cc (Fcolloc): Likewise.
* src/f-fft.cc (Ffft): Likewise.
* src/f-fft2.cc (Ffft2): Likewise.
* src/f-ifft.cc (Fifft): Likewise.
* src/f-ifft2.cc (Fifft2): Likewise.
* src/f-npsol.cc (do_npsol_option): Likewise.
* src/f-qpsol.cc (do_qpsol_option): Likewise.
* src/f-rand.cc (Frand): Likewise.
* src/pr-output.cc (all_elements_are_ints): Likewise.
* src/tree-plot.cc (subplot_using::eval): Likewise.
(subplot_style::print): Likewise.
* src/sysdep.cc (Fpause): Likewise.
* src/tc-rep.cc (TC_REP::valid_as_scalar_index): Likewise.
(TC_REP::valid_as_zero_index): Likewise.
(TC_REP::convert_to_str): Likewise.
* src/tc-rep-idx.cc (TC_REP::do_scalar_index): Likewise.
(TC_REP::fortran_style_matrix_index): Likewise.
* src/tc-rep-ass.cc (TC_REP::fortran_style_matrix_assignment):
Likewise.
Sat Jan 28 13:09:44 1995 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/general/tril.m: Allow the k == nc for k > 0 and
-k == nr for k < 0. Make faster by eliminating nested loops.
* scripts/general/triu.m: Likewise.
Fri Jan 27 08:32:10 1995 John Eaton <jwe@schoch.che.utexas.edu>
* libcruft/lapack: Update with files from LAPACK 2.0.
* src/lex.l (\[{S}*): Don't call fixup_column_count() here.
Don't use TOK_RETURN here, since we call eat_whitespace().
(eat_whitespace): Decrement current_input_column when calling
yyunput().
(<MATRIX>{SNLCMT}*\n{SNLCMT}): Always call fixup_column_count().
* src/parse.y (rows): Don't accept repeated semicolons.
(matrix_row): Likewise, for commas.
* src/Makefile.in (LIBOBJS): Delete.
* liboctave/f77-uscore.h: Don't use C++ style comments.
* octMakefile.in (DISTDIRS): Don't include bsd-math.
* src/Makefile.in (VPATH): Don't include bsd-math directory.
(SOURCES): Include acosh.c, asinh.c, atanh.c, erf.c erfc.c, and
lgamma.c.
* configure.in: Create libcruft/slatec-fn/Makefile.
Use AC_CHECK_FUNCS to look for acosh, asinh, atanh.
Don't do anything special if they are missing.
* src/acosh.c, src/asinh.c, src/atanh.c, src/erf.c, src/erfc.c,
src/lgamma.c: New files.
* acconfig.h: Delete #undefs for ACOSH_MISSING, ASINH_MISSING,
and ATANH_MISSING.
* libcruft/Makefile.in (CRUFT_DIRS): Add slatec-fn.
* libcruft/slatec-fn: New directory.
* configure.in: Don't try to use IEEE floating point on m68k HP
systems.
Thu Jan 26 12:57:05 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l (maybe_unput_comma): New function, extracted from
handle_identifier(). Correctly handle the dot in things like
`a.b' inside matrix lists.
(handle_identifier): Use it. Don't allow things like [a .1] or
[a.b .1] to fool us.
Wed Jan 25 08:04:16 1995 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/Makefile.in (realclean): Don't depend on distclean. Do
delete Makefile here.
* flibs.sh: Also check for /*values-*.o, for Sun Fortran 2.x.
* configure.in (FLIB_LIST, CXXLIB_LIST, FLIB_PATH, CXXLIB_PATH):
Delete any .o files found here.
When checking for -lm, also append -lc on Linux systems.
* mkinstalldirs: Create directories with mode 0755, to avoid
problems because the installers umask is too restrictive.
* octave-bug.in: Don't use rmail, it crashes on Ultrix systems if
the message file isn't just right. Use nested if statements
instead of ||, for Ultrix /bin/sh. Avoid Ultrix awk crash.
* scripts/linear-algebra/trace.m: Handle row and column vectors as
a special case.
* scripts/linear-algebra/null.m: Likewise.
* scripts/linear-algebra/orth.m: Likewise.
Tue Jan 24 08:11:51 1995 John Eaton <jwe@schoch.che.utexas.edu>
* octave-bug.in: Add F2C, F2CFLAGS, FLIBS, and LDFLAGS to report.
* Makefile.in (octave-bug): Substitute them.
Mon Jan 23 20:42:55 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-misc.cc (tree_if_clause::is_else_clause): New function.
(tree_if_command_list::print_code): Use it to decide whether to
print "else" or "elseif" here.
(tree_if_clause::print_code): Don't print "else" here.
* scripts/image/colormap.m: Fix logic for initializing default
colormap and handling subsequent calls with no arguments.
* src/lex.h (TOK_PUSH_AND_RETURN): Correct last change.
Sun Jan 22 18:02:37 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l (handle_identifier): Handle incrementing
current_input_column here.
({IDENT}{S}*): Not here.
* src/lex.h (TOK_PUSH_AND_RETURN): New macro.
* src/lex.l: Use it.
* src/parse.y (yyerror): If printing input line, always print `^'
error marker too.
* src/parse.y (command [BREAK]): Allow break to occur in function
bodies too.
* src/tree-expr.cc (tree_function::eval): Also check to see if
function exited because of a break statement.
Fri Jan 20 10:48:18 1995 John Eaton <jwe@schoch.che.utexas.edu>
* config.guess: Replace with current version from FSF.
* config.sub: Likewise.
* src/tempname.c: Include statdefs.h.
* src/tree-expr.cc (eval): Improve error messages.
Thu Jan 19 08:33:50 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l (handle_string): Properly handle pending escapes.
Call error() for unterminated string constants.
* src/parse.y (input): For parse errors, call yyerror().
* test/config/unix-octave.exp (octave_start): Correctly set OSPATH
from $OCTAVE_SCRIPT_PATH, not to the string OCTAVE_SCRIPT_PATH.
* test/Makefile.in (OCTAVE_SCRIPT_PATH): Delete surrounding quotes
in definition.
* doc/texinfo.tex: Move to version 2.140.
* src/f-rand.cc (Frand): Use different method for generating
initial seed so that it varies more each time Octave starts.
* src/file-io.cc (feof_internal): Use args(0), not args(1).
* src/Makefile.in (SOURCES): Use tempnam.c, not tmpnam.c.
* src/tempnam.c: New file, from the GNU C library.
Wed Jan 18 08:10:31 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/user-prefs.h (user_prefs): New field, read_only_constants.
* src/user-prefs.cc (read_only_constants): New function.
* src/variables.cc (install_builtin_variables): Add DEFVAR for
read_only_constants, but leave it #if 0'd out since we're not
really ready for it yet..
* src/symtab.cc (symbol_record::read_only_error): Check
user_prefs.read_only_constants to see if it is ok to redefine
constants that are marked as read-only.
* src/user-prefs.h (user_prefs): New field, ps4.
* src/user-prefs.cc (sv_ps4): New function.
* src/variables.cc (install_builtin_variables): Add DEFVAR for PS4.
* src/input.cc (do_input_echo): New function. Use PS4 variable as
prefix of echoed input. Send echoed input through the pager.
* flibs.sh: Ignore -lang* options.
* src/load-save.cc (Fsave): Send `save - ...' output through the
pager.
* doc/Makefile.in: Create and distribute refcards of various sizes.
Delete rules for making refcard.tex from refcard.tex.in.
Don't make or distribute refcard-local.
* doc/refcard.tex: Handle setting paper size with \refcardsize.
* doc/refcard-a4.tex, doc/refcard-legal.tex, doc/refcard-letter.tex:
New files.
Mon Jan 16 13:19:29 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/tc-rep-ass.cc (TC_REP::do_scalar_assignment): Handle
assignments like a(0) = [].
* src/tc-inlines.h (valid_zero_index): New function.
* src/tc-rep.cc (valid_as_zero_index): New function.
* src/tree-const.h (valid_as_zero_index): New function.
* src/parse.y (func_def2): Check user_prefs before warning about
function name and function file name conflict.
* src/user-prefs.h (user_prefs): New field, warn_function_name_clash.
* src/user-prefs.cc (warn_function_name_clash): New function.
* src/variables.cc (install_builtin_variables): Add DEFVAR for
warn_function_name_clash.
* scripts/image/octtopnm.c: Include stdlib.h instead of malloc.h.
Sun Jan 15 15:08:04 1995 John Eaton <jwe@schoch.che.utexas.edu>
* readline/rldefs.h: Use new #defines for directory headers now
that we are using autoconf 2.
* scripts/special-matrix/hankel.m: Use .', instead of '.
* src/input.cc (match_sans_spaces): Use strcmp, not strncmp.
* src/tc-rep-ass.cc (TC_REP::fortran_style_matrix_assignment):
For scalar index, don't do assignment if RHS and LHS are both empty.
* src/data.cc (Fsize): Handle optional second arg.
* src/tree-expr.cc (tree_function::eval (int)): Correctly set
nargin and nargout to zero when evaluating function.
* src/lex.l (handle_string): Correct handling of string escapes.
Thu Jan 12 15:25:34 1995 John Eaton <jwe@schoch.che.utexas.edu>
* Version 1.1.0 released.
* octMakefile.in (bin-dist-tar): Ignore errors on strip commands.
* src/tree-expr.cc (tree_builtin::eval (int)): Set nargout to 0
when calling function.
* doc/Makefile.in (FORMATTED): Add refcard.dvi and refcard.ps so
that they are distributed along with the other docs.
* octMakefile.in (clean-doc-dist-tar): Delete target.
(doc-dist): Depend on doc-dist-tar, not clean-doc-dist-tar.
Tue Jan 10 14:29:43 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/help.cc (print_usage): Print warning if symbol isn't found.
* src/utils.cc (Fundo_string_escapes): Fix typo in call to
print_usage().
* src/octave.cc (Fsystem): Correctly compute exit code.
* scripts/miscellaneous/etime.m: Complain if args are not the
right length, not if they are. Reverse sense of test for years.
Duh.
* src/f-find.cc (find_to_fortran_idx): For the case of one output
argument, return a row vector if the original argument to find was
a row vector.
Mon Jan 9 12:57:27 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l (grab_help_text): Always overwrite help_buf.
({CCHAR}): Don't call grab_help_text() if there is already
something in help_buf.
Sat Jan 7 12:28:35 1995 John Eaton <jwe@schoch.che.utexas.edu>
* configure.in (HOST_CXXFLAGS): New variable to substitute.
* Makeconf.in (ALL_CXXFLAGS, UGLY_ALL_CXXFLAGS, BUG_CXXFLAGS):
Add $(HOST_CXXFLAGS).
Fri Jan 6 13:07:09 1995 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/special-matrix/toeplitz.m: Use .' instead of '.
Tue Jan 3 18:14:33 1995 John Eaton <jwe@schoch.che.utexas.edu>
* test: Rewrite many tests to not run Octave interactively. This
makes the log files much more readable.
* octMakefile.in (clean-tar): Delete octave-test/npsol directory,
not just test/octave.test/npsol.exp. Likewise, add a command for
deleting qpsol tests.
Mon Jan 2 20:02:10 1995 John Eaton <jwe@schoch.che.utexas.edu>
* src/octave.cc (main): Return 0 if error_state is not set.
* src/error.cc (error_1): New function.
(error): Use it.
(parse_error): New function.
* src/parse.y: Never call error and yyerror; just use yyerror.
(yyerror): Improve logic. Use new parse_error() function so that
error_state is always set for a parse error. Don't use
ostream::form().
(ABORT_PARSE): Don't call reset parser here.
(colon_expr): Don't call yyerror here. An error message is
printed by tree_colon_expression::chain() if it fails.
Mon Dec 26 20:11:01 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-expr.cc (eval): Only call multi-arg form of eval for
object_to_eval if necessary.
Fri Dec 23 00:08:08 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l: Don't increment promptflag anywhere.
(eat_continuation): New function.
(eat_whitespace): Handle embedded continuations. Return nonzero
if whitespace consumed.
(handle_close_brace): Don't pass yytext. Do pass flag indicating
whether whitespace follows brace.
(handle_identifier): Check for next token being `=' here. Pass
flag indicating whether whitespace follows identifier.
(<MATRIX>{SNLCMT}*;{SNLCMT}*): Call eat_whitespace() here.
({IDENT}{S}*): Call eat_continuation() here.
(do_comma_insert_check): And here, but put a space back if
whitespace is gobbled.
(have_continuation, have_ellipsis_continuation): Decrement
promptflag here.
Wed Dec 21 09:56:49 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-plot.cc (Fclearplot): Send "set nolabel" too.
Mon Dec 19 17:50:15 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-plot.h, src/tree-plot.cc (subplot): Rename using to
using_clause to avoid new C++ keyword. Rename title and style to
match.
Fri Dec 16 00:09:01 1994 John Eaton <jwe@schoch.che.utexas.edu>
* configure.in: Don't check for fpsetmask.
* src/sysdep.cc (sysdep_init): Don't check HAVE_FPSETMASK
Thu Dec 15 00:28:52 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/variables.cc (install_builtin_variables) [default_save_format]:
Fix doc string.
* configure.in: Rework DEFAULT_DOT_O_FROM_DOT_F and
DEFAULT_DOT_C_FROM_DOT_F to avoid embedded newlines.
* Makeconf.in: Likewise.
* src/pager.cc (flush_output_to_pager): Close stream before
resetting signal handler.
* src/help.cc (Fhelp): Call fcn_file_in_path here. Delete it too.
Print file name before help message.
* src/variables.cc (get_help_from_file): Don't call
fcn_file_in_path here.
(gobble_leading_white_space): Correctly grab only first set of
comments.
Wed Dec 14 11:42:13 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/parse.y (pager_buf): Don't make it a fixed-size array.
* src/variables.cc (get_help_from_file): New function.
(gobble_leading_white_space): Return first block of comments for
later use as help string.
(looks_like_octave_copyright): New function.
(parse_fcn_file): Stash help from gobble_leading_white_space in
global help_buf.
* src/lex.l (grab_help_text): Don't overwrite help found by
gobble_leading_white_space.
(reset_parser): Delete help_buf.
* src/help.cc (Fhelp): Only try to get help from symbol records
that are defined. If all else fails, try get_help_from_file.
* src/pager.cc (flush_output_to_pager): Re-initialize pager_buf
immediately after extracting message. Delete message immediately
after sending it to the output stream. Ignore interrupts while
running pager.
* octMakefile.in (clean-tar): Delete npsol.exp and any .m files
that are in the test/octave.test directory.
(install): Use $(INSTALL), not just install.
* src/lex.l (reset_parser): Don't reset input column or line
number if reading from a script file or a function file.
(is_keyword): Don't set line number to 1 if reading function file
or script file.
* src/variables.cc (gobble_leading_whitespace): Count lines.
* src/octave.cc (main): If reading file, set reading_script_file
and curr_fcn_file_name before calling get_input_from_file().
* src/tc-rep.cc (TC_REP::matrix_value): If implicit_str_to_num_ok,
convert empty string to empty matrix.
Tue Dec 13 20:25:34 1994 Frederick (Rick) A Niles <niles@axp745.gsfc.nasa.gov>
* liboctave/dbleQR.cc, liboctave/dbleQRP.cc, liboctave/CmplxQR.cc,
liboctave/CmplxQRP.cc: Get economy-sized dimensions correct.
* libcruft/misc/i1mach.f, libcruft/misc/gen-d1mach.c,
libcruft/ranlib/ignuin.f: Prevent warnings about variable may be
used before defined.
Tue Dec 13 11:07:34 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/variables.cc: Change commas_in_literal_matrix to
whitespace_in_literal_matrix.
* src/user-prefs.h (user_preferences): Likewise.
* src/user-prefs.cc (init_user_prefs): Likewise.
(whitespace_in_literal_matrix): Likewise, rename function.
* src/lex.l: Likewise.
(nesting_level): Rename from in_brace_or_paren.
(<MATRIX>{SNLCMT}*\n{SNLCMT}*): Make separate case from
<MATRIX>{SNLCMT}*;{SNLCMT}. Check nesting level to decide whether
to convert newline to semicolon.
({NL}, {CCHAR}): Check nesting level to decide whether to eat
or return newline.
("("): Decrement promptflag.
(")"): Increment promptflag.
Mon Dec 12 00:02:51 1994 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/Makefile.in, scripts/*/Makefile.in (install): Don't
depend on all.
* octMakefile.in: Put doc dir last.
* doc/Makefile.in (dir): New file.
(DISTFILES): Distribute dir.
(install): Install dir if it does not already exist in $(infodir).
Otherwise, print message.
* src/lex.l: Handle {IDENT}{S}*/= with yyinput() instead of
trailing context.
(handle_close_brace): New function.
(handle_number): New function.
(have_continuation, handle_ellipsis_continuation, handle_string):
New functions for handling strings and continuation lines in
string constants.
(eat_whitespace): New function eliminates need for NEW_MATRIX
start state.
Sun Dec 11 15:53:03 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l: Eliminate special case for eating whitespace when
start state is <TEXT_FCN>.
Merge three cases for handling `]' for <MATRIX> start state.
Fri Dec 9 12:21:35 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l: Handle `\' as a continuation character too.
Allow comments and blanks to follow continuation characters.
Improve handling of comments in matrices. Create a few more
definitions for patterns. Restructure source.
* configure.in: Check for bcopy too.
* configure.in (gxx_version): Don't use -fno-implicit-templates on
AIX systems with g++ 2.6.x.
* octave-bug.in: Check for CC: lines too. Use case-insensitive
match for To: and Cc: lines. Actually send file that has header
separator stripped. Print list of CC: addresses too.
* src/input.cc (get_user_input): If user enters empty string,
return empty matrix or empty string.
* src/help.cc (Fhelp, Ftype, Fwhich): Don't allow lookup_by_name
to execute script files.
Thu Dec 8 23:20:02 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tc-rep.cc (print): Don't check `print', which is not a
variable in this context.
Wed Dec 7 10:52:59 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/configure.in: Check for fpsetmask.
* src/sysdep.cc (sysdep_init): Check HAVE_FPSETMASK. Only call it
if either __386BSD__ or __FreeBSD__ is defined.
Don't check __386BSD__ as a condition for including
floatingpoint.h.
Mon Dec 5 12:29:07 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/utils.cc: Update directory header macro names for autoconf 2.
* src/dirfns.cc: Likewise.
Sun Dec 4 22:00:40 1994 John Eaton <jwe@schoch.che.utexas.edu>
* octMakefile.in (DISTFILES): Don't distribute GCC.PATCH, since it
is not needed with gcc 2.6.3.
* configure.in: Really do disable IEEE floating point functions on
the Alpha.
Wed Nov 30 11:42:44 1994 John Eaton <jwe@schoch.che.utexas.edu>
* doc/FAQ.texi: New file.
* doc/Makefile.in: Create info, dvi, and ps files and distribute
them.
* Makefile.in (all): Expand initial message.
Sat Nov 26 21:47:05 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/octave.cc (Fcomputer): Always append ios::ends to ostrstream
before returning.
Mon Nov 21 09:41:34 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l: When start state is TEXT_FCN, gobble blanks with
pattern that matches only blanks before other patterns that can
also match just blanks. Always check whether in_brace_or_paren
stack is empty before trying to use it.
* src/parse.y (make_multi_val_ret): Call constructor for
tree_simple_assignment_expression with correct number of args.
* scripts/plot/shg.m: New function.
* src/f-qpsol.cc (Fqpsol): Correct for changes in meaning of
nargin and the way args is loaded.
* src/f-npsol.cc (Fnpsol): Likewise.
* scripts/polynomial/roots.m: Return empty matrix for scalar or
empty matrix args.
* src/tree-plot.cc (gnuplot_terminal_type): New static variable.
(Fset): If this is a set term command, set gnuplot_terminal_type.
(open_plot_stream): Use gnuplot_terminal_type if it is set.
* src/idx-vector.cc (idx_vector::init): Don't check max value of
index vector against dimension here. We may need to resize.
* src/tc-rep-idx.cc (do_scalar_index): Do check idx-vector max
value here.
* src/lex.l (is_plot_keyword): Don't set past_plot_range here.
Don't accept abbreviations for clear.
(handle_identifier): Don't call is_plot_keyword unless plotting.
Set past_plot_range here, before checking for plot option keywords.
Fri Nov 18 17:25:59 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/data.cc (Fis_struct): New function.
Thu Nov 17 18:13:56 1994 John Eaton <jwe@schoch.che.utexas.edu>
* octMakefile.in (DISTFILES): Distribute GCC.PATCH. Don't
distribute LIBG++.PATCH.
* src/tree-plot.cc (Fclearplot): Turn off grid and reset
plot_line_count to zero.
* configure.in: Check for sys/resource.h.
Create scripts/strings/Makefile too.
* src/timefns.cc: Surround inclusion of sys/resource.h in extern "C".
Only include sys/resource.h if both HAVE_SYS_RESOURCE_H and
HAVE_GETRUSAGE are defined.
Wed Nov 16 09:26:10 1994 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/plot/plot_opt.m: New function.
* scripts/plot/semilogx.m, scripts/plot/semilogx.m,
scripts/plot/loglog.m, scripts/plot/plot.m: Handle additional
args and format strings.
* scripts/plot/polar.m: Handle format arg.
* scripts/plot/polar_int_1.m, scripts/plot/polar_int_2.m: Extract
from polar_int.m.
* scripts/plot/plot_int_1.m, scripts/plot/plot_int_2.m: Extract
from plot_int.m.
* scripts/plot/plot_2_s_s.m, scripts/plot/plot_2_v_v.m,
scripts/plot/plot_2_m_m.m, scripts/plot/plot_2_v_m.m,
scripts/plot/plot_2_m_v.m: Handle format arg.
* scripts/strings/strcmp.m: Move here.
* scripts/general/strcmp.m: From here.
* src/xdiv.cc (result_ok): Issue warning instead of error if warn
is nonzero.
Tue Nov 15 15:54:19 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-plot.cc (Fcloseplot): Clear title and labels too.
* src/help.cc (keywords): Add entries for all_va_args,
unwind_protect, unwind_protect_cleanup, and end_unwind_protect.
* liboctave/Makefile.in: Use -include for dependency files.
* src/Makefile.in: Likewise.
Mon Nov 14 10:28:23 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-misc.cc (convert_to_const_vector): Resize vector before
returning.
* src/lex.l (plot_style_token): Also allow "steps", "boxes", and
"boxerrorbars".
* src/parse.y (UNWIND): Rename from UNWIND_PROTECT.
(CLEANUP): Rename from UNWIND_PROTECT_CLEANUP.
(command): Allow optsep after UNWIND and CLEANUP tokens.
* src/lex.l (is_keyword): Use new token names
* src/tree-const.h (tree_constant::all_va_args): New enum.
(tree_constant (tree_constant::all_va_args t)): New constructor.
(is_all_va_args): New function.
(is_empty, is_zero_by_zero, make_numeric_or_magic,
make_numeric_or_range_or_magic): Handle all_va_args type.
* src/tc-rep.h (constant_type::all_va_args): New enum element.
(is_all_va_args): New function.
* src/tc-rep.cc (TC_REP::tree_constant_rep (TC_REP::constant_type),
TC_REP::print_code): Handle all_va_args.
* src/tree-misc.cc (tree_argument_list::convert_to_const_vector):
Handle all_va_args.
* src/tree-expr.cc (tree_index_expression::eval): After call to
tree_argument_list::convert_to_const_vector (), check error_state.
(tree_simple_assignment_expression::eval): Likewise.
(tree_function::octave_all_va_args): New function.
* src/parse.y (ALL_VA_ARGS): New token.
(arg_list): Handle ALL_VA_ARGS.
* src/lex.l (is_keyword): Handle all_va_args.
* src/tree-expr.cc (tree_identifier::bump_value): Check read-only
status of sym before altering value.
(tree_prefix_expression::eval): Check error_state after call to
tree_identifier::bump_value ().
* src/variables.cc (bind_nargin_and_nargout): Don't make nargin
and nargout read only.
* scripts/strings: New subdirectory for string functions.
* scripts/Makefile.in (SUBDIRS): Add strings.
* scripts/strings/strcat.m: New function.
Fri Nov 11 14:17:31 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/load-save.cc (extract_keyword): Allow trailing blanks on the
input line.
Thu Nov 10 09:53:35 1994 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/general/reshape.m, scripts/image/ind2gray.m,
scripts/image/ind2gray.m, scripts/image/ind2rgb.m,
scripts/image/rgb2ind.m: unwind_protect do_fortran_indexing.
* scripts/general/strcmp.m: unwind_protect implicit_str_to_num_ok.
* scripts/miscellaneous/menu.m: unwind_protect page_screen_output.
* src/parse.y (UNWIND_PROTECT, UNWIND_PROTECT_CLEANUP): New tokens.
(command): Handle unwind-protect.
* src/lex.l (is_keyword): Handle unwind_protect,
unwind_protect_cleanup, and end_unwind_protect.
* src/tree-cmd.cc (tree_unwind_protect_command): New class, to
handle unwind-protect.
* src/token.h (end_tok_type): New field, end_unwind_protect.
* src/error.cc (verror): Flush pending output to pager here.
(error): Not here.
* src/tc-rep.cc (force_numeric): Don't jump to top level on error.
* src/tc-rep.cc, src/tc-rep-ass.cc, src/tc-rep-idx.cc: Check
error_state after calls to make_numeric* functions.
* src/f-lpsolve.cc: Define Flp_solve and Flp_solve_options, not
Flpsolve or Flpsolve_options.
* src/utils.cc (Ffile_in_path): Define Ffile_in_path, not
Ffile_in_pat.
* src/f-inv.cc: Add DEFUN for inverse.
Wed Nov 9 09:30:15 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/load-save.cc (read_mat_file_header): Check for mopt < 0 too.
Don't fail if reading mopt fails.
(save_mat_binary_data): Handle range data as a special case.
(get_default_save_format): Also accept `mat-binary' and
`mat_binary'.
(Fsave): Add ios::trunc to flags for opening output file.
* src/parse.y (func_def2): Stash function name before stashing
file name.
* src/utils.cc (fcn_file_in_path): Don't append `.m' if the name
already ends in `.m'.
(oct_file_in_path): Likewise, for `.oct'.
* src/error.cc (usage): Set error state to -1, so we get traceback
information after a call to usage.
* src/tree-expr.cc (stash_fcn_file_name): Store full name of the
file.
* scripts/*/*.m: Change messages to say `invalid' instead of
`illegal', since no laws are being broken by using these functions
incorrectly.
* src/timefns.cc (Fcputime): New function.
* configure.in: Check for getrusage.
* src/scripts/miscellaneous/tic.m: New function.
* src/scripts/miscellaneous/toc.m: New function.
* src/scripts/miscellaneous/etime.m: New function.
* src/scripts/miscellaneous/is_leap_year.m: New function.
* src/error.cc (Fwarning, Fusage): New functions.
* scripts/*/*.m: Use them instead of printing warning and usage
messages directly with disp, printf, or fprintf.
* src/file-io.cc (close_files): Check Pix before using.
(file_count): Delete unnecessary variable. Instead, use
DLList::length to get the number of files in the list.
* src/sighandlers.cc (install_signal_handlers): Explicitly ignore
SIGPOLL and SIGIO.
Tue Nov 8 15:26:50 1994 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/general/logspace.m: Lose fractional part of third arg.
Don't round, for compatibility with Matlab.
* scripts/general/linspace.m: Likewise.
* liboctave/CMatrix.cc (row_min, row_max, row_min_loc, row_max_loc):
Handle case of row containing only real elements.
(column_min, column_max, column_min_loc, column_max_loc):
Likewise, for columnwise operations.
* src/f-minmax.cc (two-complex-arg min, max): Handle case of both
columns containing only real elements.
* src/variables.cc (Fclear): Pass 0 to symbol_table::list() for
pats and npats.
Mon Nov 7 20:22:36 1994 John Eaton <jwe@schoch.che.utexas.edu>
* liboctave/dColVector.cc (operator +=): Don't return reference to
temporary.
(operator -=): Likewise.
* liboctave/CMatrix.cc (operator +=, operator -=): Likewise.
Sun Nov 6 23:15:24 1994 John Eaton <jwe@schoch.che.utexas.edu>
* octMakefile.in (DISTSUBDIRS): Don't use $(SUBDIRS) here.
* src/load-save.cc (Fsave): Open output file with mode ==
ios::out, not ios::in.
Sat Nov 5 18:18:11 1994 John Eaton <jwe@schoch.che.utexas.edu>
* configure.in (HAVE_SYS_SIGLIST): Check for sys_siglist variable,
even if it isn't declared in a system header.
* acconfig.h (HAVE_SYS_SIGLIST): Add #undef.
* src/sighandlers.cc (sys_siglist): Define our own if
HAVE_SYS_SIGLIST is not defined, not if SYS_SIGLIST_DECLARED is
not defined.
* src/tree-plot.cc (Fclearplot): New function.
(clg): Alias for clearplot.
* src/parse.y (CLEAR): New token.
(statement): Handle PLOT CLEAR as a special case.
* src/lex.l (is_plot_keyword): Handle CLEAR here too.
Fri Nov 4 08:44:57 1994 John Eaton <jwe@schoch.che.utexas.edu>
* All: Remove remaining #pragma interface/implementation statements.
* src/tree-plot.cc (subplot): Move actual code here from .h file.
* src/tree-expr.cc (tree_expression): Declare destructor virtual.
Delete unnecessary destructors.
* src/SLStack.h, src/SLStack.cc (operator =): Return reference to
SLStack, not void.
* src/f-qzval.cc (Fqzval): Rename from Fqzvalue. Change Help
and usage messages too.
* scripts/plot/plot_int.m: Really figure out if there are any
imaginary parts.
* scripts/control/are.m: Fix typo.
Thu Nov 3 18:44:11 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/load-save.cc (save_ascii_data): Handle new arg,
strip_nan_and_inf. Change callers.
(strip_infnan): New functions.
(save_three_d): Strip inf and nan values here too.
* src/tree-plot.h (subplot_using): New data have_values and val.
* src/tree-plot.cc (subplot_using::eval, subplot_using::values):
New functions.
(subplot_style::errorbars): New function.
(subplot::extract_plot_data, subplot::handle_plot_data): New functions.
(subplot::print): Improve handling of data.
Wed Nov 2 08:11:08 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/file-io.cc (do_scanf): If reading from stdin, flush stdout
first.
* configure.in: Leave some comments in the configure file.
Improve checking for termios.h, termio.h, and sgtty.h.
* src/variables.cc (install_builtin_variables): DEFVAR realmax and
realmin here.
* src/sysdep.cc: Instead of DEFUNing them here.
* src/variables.cc (do_who): Accept globbing patterns as args.
(maybe_list): Handle them here.
* src/symtab.cc (matches_patterns): New function.
(symbol_table::list, symbol_table::long_list): Accept list of
patterns, and use matches_patterns to see if the given string is a
match. Change all callers.
* src/load-save.cc (read_binary_data): Don't fail if reading
name_len fails.
(do_load): Quit quietly if nothing is left to read. Clean up doc
and name in all cases.
Tue Nov 1 16:34:20 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/lex.l (")"): Set cant_be_identifier to 1 here too.
* src/tree-plot.cc: Use abbreviations for gnpulot plot, splot,
replot, with, using, and title commands.
Mon Oct 31 14:26:12 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/variables.cc (Fclear): Look in global symbol table for
user-defined function names.
* src/load-save.cc (do_load): New function.
(Fload): Use it to avoid assigning streams.
(write_binary_header): New function.
(save_vars): New function.
(Fsave): Use it to avoid assigning streams.
* libcruft/linpack/zgesl.f (zgesl): Comment out unused varialbes
and statement functions.
* src/sysdep.cc (Fisieee): New function.
(Frealmax, Frealmin): Ditto.
* scripts/miscellaneous/version.m: New file.
Fri Oct 28 14:52:08 1994 John Eaton <jwe@schoch.che.utexas.edu>
* octMakefile.in (distclean): Also delete config.cache and
config.log.
* Makeconf.in (CPPFLAGS): Allow substitution.
* configure.in: Use AC_PREFIX_DEFAULT.
* configure.in: Use AC_CANONICAL_HOST instead of doing this
ourselves.
* install-sh: Rename from install.sh.
* octMakefile.in (DISTFILES): Distribute install-sh, not install.sh.
Mon Oct 24 10:04:27 1994 John Eaton <jwe@schoch.che.utexas.edu>
* octave-bug.in: Print message if bug report appears to have been
mailed successfully. Otherwise, exit with error status.
Fri Oct 21 14:05:10 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tc-rep-ass.cc (TC_REP::do_vector_assign (rhs, idx-vector)):
Handle all four cases of row/colum mixing. Report an error if the
RHS is a matrix.
* src/tc-rep-idx.cc (TC_REP::do_index): Don't barf on indexing an
empty matrix with colon(s).
(TC_REP::do_scalar_index): Create index vector with z_len = 1.
(TC_REP::do_matrix_index (Range, tree_constant)): Correctly handle
case of colon as second arg.
* octave-bug.in: Put mail commands in subshells so error message
really do go away.
Thu Oct 20 11:05:36 1994 John Eaton <jwe@schoch.che.utexas.edu>
* octave-bug.in: If passing $SUBJECT on the command line to a
mailer, quote it. Don't assume /bin/mail takes any args other
than a recipient address. Do the right thing if the To: line
changes.
* src/tc-rep.cc (TC_REP::rows, TC_REP::columns): Return -1 for
anything that doesn't really have rows or columns.
* src/tc-rep-idx.cc (fortran_style_matrix_index): Check max and
min index values.
* Makefile.in (FORCE): New phony target. Used instead of .PHONY
to be portable.
* octave-bug.in: Try harder to mail the message.
* src/dynamic-ld.cc: Undefine true, false, and boolean after
including kpathse/pathsearch.h.
* src/sysdep.cc: Include <float.h>.
Wed Oct 19 10:28:49 1994 John Eaton <jwe@schoch.che.utexas.edu>
* configure.in (CXXLIB_LIST, FLIB_LIST, CXXLIB_PATH, FLIB_PATH):
Be careful not to match -l or -L in the middle of a word.
* src/f-minmax.cc: Correctly handle mixed scalar/matrix args.
* octMakefile.in: Rename from Makefile.in.
* Makefile.in: New file. For `all' target, print message and
execute make again using octMakefile. For other targets, just
execute make again using octMakefile.
* configure.in: Check for sys_siglist.
* src/sighandlers.h [! HAVE_SYS_SIGLIST]: Provide an external
declaration.
* src/sighandlers.cc (generic_sig_handler): New function, replaces
most individual signal handler functions.
(sigint_handler, sigpipe_handler): Restore signal handler before
doing anything else.
[! HAVE_SYS_SIGLIST] (sys_siglist): Provide our own definition.
* config.guess: Update from FSF sources.
Tue Oct 18 23:36:24 1994 John Eaton <jwe@schoch.che.utexas.edu>
* flibs.sh: Don't pass -Y P,path. Instead, turn it into a series
of -L dir args.
* configure.in: Update for autoconf 2.0.
Delete support for --enable-run-in-place (it is too hard to make
this work reliably...).
Mon Oct 17 11:40:49 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/user-prefs.cc (init_user_prefs): Declare to return void,
not int.
* configure.in: Change quote characters around tr command. Some
systems actually do need the []'s for ranges...
Sun Oct 16 12:22:14 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tempname.c, src/tmpnam.c: New files.
* src/Makefile.in (SOURCES): Add them.
* src/dirfns.cc: Delete functions extracted from glibc.
* configure.in (localfcnfiledir, localoctfiledir, imagedir):
New variables. Use them to define localfcnfilepath,
localoctfilepath, and imagepath.
* Makeconf.in: Substitute them here.
* src/utils.cc (get_fcn_file_names) [WITH_DLD]: Also match .oct
files.
* dld/find_exec.c (dld_find_executable): Don't be fooled by
directories or other special files in PATH.
(ABSOLUTE_FILENAME_P): Also return true if the name includes a
`/'. This isn't necessarily an absolute path, but we will turn it
into one later.
* src/dynamic-ld.cc (octave_dld_init): Call make_absolute() on
value returned from dld_find_executable().
Sat Oct 15 08:35:13 1994 John Eaton <jwe@schoch.che.utexas.edu>
* flibs.sh: Undo previous change. Only substitute spaces for
commas if it looks like we have output from xlf. Handle -Y and
LD_RUN_PATH using gcc's -Xlinker option.
* Makefile.in (snapshot-version): Use move-if-change for version.h.
Fri Oct 14 09:18:08 1994 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/image/Makefile.in (SOURCES): Don't forget octtopnm.c.
* Makefile.in (BINDISTFILES): Distribute octave-bug too.
* configure.in (imagepath): Install at same level as fcnfiledir,
not below it.
* doinstall.sh: Correctly extract version numbers that are not all
digits. Also install images too. Also install octaverc. Ask
octave for the target host type. Also create site/m and
site/oct directories. Also install octave-bug.
* scripts/image/Makefile.in (DISTFILES): Distribute demo image
files too.
* doinstall.sh: Update for new directory organization.
* src/variables.cc (subst_octave_home): Make it work for multiple
substitutions.
* flibs.sh: Handle -Y P,path:of:lib:dirs output from f77 on Solaris.
* src/strfns.cc (Ftoascii): New file, new function.
(Fisstr, Fsetstr): Move here, fromd ata.cc.
* src/Makefile.in (SOURCES): Include it.
Thu Oct 13 11:58:03 1994 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/signal/filter.m: Postpad `b' before reshaping.
* mkinstalldirs: New file.
* Makefile.in: Distribute it, don't make mkpath.
* All Makefile.in files: Use it instead of mkpath.
* src/utils.cc (Foctave_tmp_file): New function.
* src/utils.cc (undo_string_escape): Move here from tc-rep.cc,
rename from undo_string_escapes, and make extern.
(undo_string_escapes): New function, for undoing a whole string.
(Fundo_string_escapes): New function.
* scripts/miscellaneous/dump_prefs.m,
scripts/miscellaneous/dump_1_pref.m: New functions.
* scripts/miscellaneous/bug_report.m: Record user preferences in a
file and pass the name of the file to octave-bug. Use
octave_tmp_file to generate tmp file name.
* octave-bug.in: Accept a final file-name arg as a file that
contains a list of user-preferences.
Wed Oct 12 09:09:37 1994 John Eaton <jwe@schoch.che.utexas.edu>
* configure.in: Redefine archlibdir and octfiledir so that oct
and exec directories are at the same level as the m directory.
Redefine localoctfilepath so that site/oct is a the same level as
site/m.
* Makeconf.in (F77): Substitute it.
(BUG_CFLAGS, BUG_CXXFLAGS): New vars.
* configure.in:
* scripts/bug_report.m: New file.
* octave-bug.in: New file.
* Makefile.in (DISTFILES): Distribute octave-bug.in.
(dirs_to_make): Add $bindir.
(all): Add octave-bug.
(octave-bug): New target.
(install): Install it.
* src/defaults.h.in: Add defines for bindir.
* src/Makefile.in (defaults.h): Substitute it.
* src/variables.cc (octave_bin_dir): New function.
* src/octave.cc (initialize_globals): Also add $bindir to path.
* configure.in: Check for gettimeofday. Add AC_TIME_WITH_SYS_TIME.
* src/systime.h: New file.
* src/timefns.h: Use gettimeofday if available.
* src/Makefile.in (INCLUDES): Add systime.h.
Mon Oct 10 14:34:56 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/octave.cc (verbose_flag): New global variable.
(long_opts): Add "verbose".
(usage_string): Update.
(main): Set verbose_flag if given --verbose.
(execute_startup_files): Don't print messages about reading
startup files if verbose_flag is not set.
* src/tree-expr.cc (apply_mapper_fcn): Handle scalars as a special
case, but then just try to convert other arg types to a matrix.
* src/f-det.cc (Fdet): Check if arg is complex type, but not
necessarily a complex matrix.
* src/f-schur.cc (Fschur): Likewise, and also for real types.
* src/f-lu.cc (Flu): Likewise.
* src/f-minmax.cc (Fmin, Fmax): Likewise.
Sun Oct 9 21:04:17 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tc-rep-ass.cc (TC_REP::assign): If LHS is undefined, don't
try to force it to be a numeric type.
Fri Oct 7 09:05:10 1994 John Eaton <jwe@schoch.che.utexas.edu>
* configure.in: Define LD_STATIC_FLAG for Alpha OSF/1 1.3 systems.
* src/tc-rep-idx.cc (TC_REP::do_index): Only work for numeric
types, but don't panic if conversion doesn't work.
* src/tc-rep-ass.cc (TC_REP::assign): Likewise.
* src/tc-rep.cc (TC_REP::gripe_wrong_type_arg): New function.
* src/gripes.cc (gripe_wrong_type_arg): Define here.
* src/tree-const.cc: Not here.
Wed Oct 5 16:24:38 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/file-io.cc (do_scanf): Don't panic if string is NULL.
* src/gripes.cc (gripe_unrecognized_float_fmt): New function.
(gripe_2_or_3_dim_plot): Ditto.
(gripe_unrecognized_data_fmt): Ditto.
(gripe_data_conversion): Ditto. Use it in load-save.cc data
conversion routines that aren't implemented yet.
* src/load-save.cc (do_double_format_conversion): Don't panic on
unrecognized floating point formats.
(do_float_format_conversion): Likewise.
(write_doubles): Don't panic if data format is unrecognized.
(do_save): Likewise
(install_loaded_variable): Don't panic for unknown symbol types.
(read_binary_data): Also check error_state after calls to read_doubles.
* src/symtab.cc (symbol_table::rename): Don't panic if symbol
can't be renamed.
* src/parse.y (return_list): Abort parse if renaming results in an
error.
* src/tree-misc.cc (tree_if_command::eval): Don't panic if all
(all (cond)) is not a scalar.
* src/tree-expr.cc (tree_unary_expression::print_code): Don't
panic if expression type is unknown.
* src/tree-plot.cc (tree_plot_command::eval): Don't panic if plot
is not 2 or 3 dimensional.
(tree_plot_command::print_code, subplot::print, save_in_tmp_file):
Likewise.
* src/variables.cc (alias_builtin): Panic with better message.
(subst_octave_home): Don't panic if OCTAVE_HOME doesn't contain
OCTAVE_PREFIX.
* src/tc-inlines.h (REP_RHS_MATRIX): Use panic_impossible()
instead of abort().
(REP_ELEM_ASSIGN, CRMATRIX): Likewise.
* src/data.cc (Fdiag, make_diag): Do work here.
* src/tc-rep.cc (TC_REP::diag, make_diag): Not here.
* src/tc-rep.h (TC_REP::diag): Delete.
* src/tree-const.h (tree_constant::diag): Delete.
Tue Oct 4 08:35:37 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/f-fft.cc (Ffft): Correctly set n_points for row vectors if
nargin == 1.
* src/f-ifft.cc (Fifft): Likewise.
* src/load-save.cc (Fsave): Declare file and stream static.
Mon Oct 3 10:40:50 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tree-expr.cc (octave_va_arg): Correct arg count and index to
match recent change to arg passing/nargin.
(define_param_list): Always set num_named_args = param_list->length ().
* readline/Makefile.in (install): Don't install libreadline.a by
default.
(uninstall): Now no need to delete it.
* configure.in (localfcnfilepath, localoctfilepath): Change to
match organization of system fcn and oct files, and enable
recursive searching in both. Enable recursive searching in
$(octfiledir).
(includedir): Change to $(prefix)/include/octave.
Sun Oct 2 10:14:18 1994 John Eaton <jwe@schoch.che.utexas.edu>
* configure.in: For now, disable IEEE floating point functions on
the Alpha. This is braindead, but at least prevents divide by
zero crashes...
* src/file-io.cc (fseek_internal): Use values for origin that
match what we use to define SEEK_SET, SEEK_CUR, and SEEK_END in
variables.cc.
* dld: Merge various changes for Linux from dld 3.2.4 that is
being distributed with jacal.
* src/file-io.cc (fwrite_internal): Correct indexing of args.
* src/tree-expr.cc (apply_mapper_fcn): New function.
(tree_builtin::eval): Use it instead of tree_constant::mapper().
* src/tree-const.h (tree_constant::mapper): Delete.
* src/tc-rep.cc, src/tc-rep.h (TC_REP::mapper): Delete.
* src/data.cc (Fcumprod, Fcumsum, Fprod, Fsum, Fsumsq): Do work here.
* src/tc-rep.cc (TC_REP::cumprod, TC_REP::cumsum, TC_REP::prod,
TC_REP::sum, TC_REP::sumsq): Not here. Delete.
* src/tc-rep.h (TC_REP::cumprod, TC_REP::cumsum, TC_REP::prod,
TC_REP::sum, TC_REP::sumsq): Delete
* src/tree-const.h (tree_constant::cumprod, tree_constant::cumsum,
tree_constant::prod, tree_constant::sum, tree_constant::sumsq):
Delete.
* tree-const.h: Don't check gcc minor version number.
* tc-rep.h: Likewise.
* src/file-io.h (class file_info): Declare here.
* src/file-io.cc: Not here.
* configure.in (LIBOCTDLD, LIBDLD): Remove ../ prefix.
* Makefile.in (distclean, realclean): Don't remove *.a.
* src/Makefile.in (OCTAVE_LIBS): Correct directory spec for libs.
Build, install, and clean liboctdld.a, not ../liboctdld.a.
* dld/Makefile.in: Build, install, and clean libdld.a, not ../libdld.a.
* info/Makefile.in: Likewise, for libinfo.a.
* kpathsea/Makefile.in: Likewise, for libkpathsea.a.
* libcruft/Makefile.in: Likewise, for libcruft.a.
* liboctave/Makefile.in: Likewise, for liboctave.a.
* readline/Makefile.in: Likewise, for libreadline.a.
* configure.in (gxx_version): Require 2.6.x or later. Don't
define EXTERNAL_TEMPLATES. Do define NO_IMPLICIT_TEMPLATES.
* liboctave/Array-C.cc, liboctave/Array-d.cc, src/Array-tc.cc,
src/DLList-fi.cc src/SLStack-tok.cc, src/SLStack-ue.cc,
src/SLStack-tm.cc, src/SLStack-pc.cc, src/SLStack-i.cc,
src/SLList-tc.cc, src/SLStack-sym.cc, src/SLStack-ui.cc,
src/SLList-misc.cc, src/SLList-expr.cc, src/SLList-plot.cc,
src/Map-tc.cc: New files. Instantiate templates here.
* libocave/Array.cc, src/Map.cc, src/Stack.cc, src/SLStack.cc:
Not here. Remove #pragma implementation hack.
* liboctave/Array.h, src/Stack.h, src/Map.h, src/SLStack.h: Remove
#pragma interface hack.
* Makeconf.in: Substitute NO_IMPLICIT_TEMPLATES, not
EXTERNAL_TEMPLATES.
(ALL_CXX_FLAGS, UGLY_ALL_CXX_FLAGS): Use $(NO_IMPLICIT_TEMPLATES),
not $(EXTERNAL_TEMPLATES).
* acconfig.h: Remove USE_EXTERNAL_TEMPLATES #undef.
* src/Makefile.in (XALL_CXX_FLAGS): Delete -fno-implicit-templates.
(TI_SRC, TI_OBJ): New variables.
(libtinst.a): New target.
* liboctave/Makefile.in (TI_SRC): New variable.
(SOURCES): Add it to list.
Fri Sep 30 09:52:15 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/Makefile.in: Automatically generate more lists.
Use := in more places.
* src/Array-C.cc src/Array-d.cc src/Array-tc.cc src/Map-tc.cc
src/Stack-i.cc src/SLStack-pc.cc src/SLStack-sym.cc
src/SLStack-tok.cc src/SLStack-tm.cc src/SLStack-ue.cc:
New template instantiation files.
* configure.in: If using gcc 2.6.x or later, use
-fno-implicit-templates instead of -fexternal-templates.
* src/tc-inlines.h: Rename from tc-inlines.cc.
* src/parse.y (looking_at_indirect_ref): New global flag, for
parser feedback.
(tree_indirect_ref_type): New token type.
(TEXT_ID): New token.
(indirect_ref): New non-terminal.
(make_index_expression): New function.
(variable): Use it to build variable from indirect_ref, not just
identifier.
* src/lex.l (handle_identifier): Handle identifiers differently if
looking at an indirect reference. Add `.' to list of other ops.
* src/tree-expr.cc (tree_identifier::do_lookup): Handle new
exec_script arg.
(tree_identifier::assign): New functions for assignment to a
strucutre element.
(print_constant): New function.
(tree_identifier::eval, tree_indirect_ref::eval): Use it.
(
* src/tree-expr.h (tree_indirect_ref): New class for handling
structure references.
(tree_expression::is_indirect_ref): New virtual function.
(tree_fvc::lookup_map_element): New virtual function.
(tree_index_expression, tree_simple_assignment_expression):
Add new constructors for handling indirect references.
* src/oct-map.h: New file, for class managing Octave's
structure/map type.
* src/tree-misc.cc (tree_global::eval): Don't allow individual
structure elements to be tagged global.
* src/tc-rep.h (tree_constant_rep): Add new field, a_map, and a
new type_tag, map_constant.
* src/tree-const.cc (tree_constant::is_map): New function.
* src/tree-const.cc (tree_constant::map_value,
tree_constant::assign_map_element, tree_constant::make_unique,
tree_constant::lookup_map_element,
tree_constant::make_unique_map_element): New functions.
* src/Map.h (CHNode::CHNode): Copy key.
(CHNode::~CHNode): Delete it.
(CHMap::contents): Don't declare return value const.
* src/tc-inlines.cc: Move some macros here from tc-rep.cc so they
can appear in one place and be shared by tc-rep-idx.cc,
tc-rep-ass.cc, and tc-pre.cc.
* src/tc-rep-idx.cc, src/tc-rep-ass.cc: New files, extracted from
tc-rep.cc to make compilation of tc-rep stuff faster and require
less memory.
* src/variables.cc (Fwhos): Correctly insert "-long" into arg list
for Fwho.
Mon Sep 26 12:59:55 1994 John Eaton <jwe@schoch.che.utexas.edu>
* test/Makefile.in (OCTAVE_SCRIPT_PATH): Append `//' for recursive
searching.
Fri Sep 23 07:53:13 1994 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/plot/bar.m: Don't return values if nargout == 0.
* scripts/plot/hist.m: Likewise.
* scripts/plot/stairs.m: Likewise.
* src/tree-plot.cc (Fishold): New function.
(plot_line_count, parametric_plot, clear_before_plotting):
Declare static.
* src/f-fft.cc (Ffft): Handle row vector as a special case.
* src/f-ifft.cc (Fifft): Ditto.
Thu Sep 22 13:20:53 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/help.cc (print_symbol_type): New function, extracted from Fwhich.
(Fwhich): Use it.
(Fhelp): Use it to print type info before help message.
* src/dynamic-ld.cc: Hide all DLD-specific functions behind
#ifdef WITH_DLD.
* scripts/startup: New directory.
* scripts/startup/Makefile.in: New file.
* scripts/startup/octaverc: New file. Don't overwrite existing
file when nstalling.
* configure.in: Generate Makefile in scripts/startup.
* scripts/Makefile.in (SUBDIRS): Add startup.
* src/defaults.h.in (OCTAVE_STARTUPFILEDIR): New macro.
* src/variables.cc (get_site_defaults): Look for octaverc in
OCTAVE_STARTUPFILEDIR.
* configure.in (fcnfiledir): Make it end in `//'.
* src/error.cc (Ferror): Correct indexing error.
* src/Map.h, src/Map.cc: New files implementing associative arrays.
* src/Makefile.in: Include them in the list of files to distribute
and compile.
Wed Sep 21 09:50:19 1994 John Eaton <jwe@schoch.che.utexas.edu>
* Makefile.in (DISTSUBDIRS): Add dld to the list.
* scripts/plot/hist.m: New function file.
* src/tc-rep.cc (TC_REP::do_matrix_index (tree_constant,
tree_constant): For case of scalar as first arg, move call to
index check to the TC_REP::do_matrix_index (int, tree_constant)
function.
(TC_REP::do_matrix_index (int, tree_constant): Be compatible with
Matlab for indexing of the form row_vector (0, :).
(TC_REP::do_matrix_index (tree_constant, int): Likewise, for
indexing of the form col_vector (:, 0).
(TC_REP::do_matrix_assignment): Similar changes for assignment.
Tue Sep 20 17:48:39 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/parse.y (return_list, return_list1): New nonterminals.
Rename from func_def1a. Handle variable number of return values.
* src/tree-expr.h (tree_function::vr_list): New field.
* src/tree-expr.cc (delete_vr_list): New function.
(tree_function::octave_vr_val, tree_function::takes_var_return):
New functions, for variable return lists.
(tree_function::define_ret_list, tree_function::eval): Handle vr_list.
(Fvr_val): New function.
* src/tree-misc.h (tree_va_return_list): New list class.
* src/tree-misc.cc (tree_parameter_list::convert_to_const_vector):
Take pointer to tree_va_return_list as arg, and append the values
found there.
* src/arith-ops.cc (mx_stupid_bool_op): Correctly handle empty
matrices for == and != ops.
* src/variables.cc (Fis_global): Check args(0), not args(1).
(Fexist): Likewise.
(install_builtin_mapper): Set nargin_max to 1, not 2.
* src/dynamic-ld.cc (octave_dld_init): Make raw program name
absolute before calling dld_find_executable.
* src/octave.cc (initialize_error_handlers): New function.
(main): Call init_user_prefs and initialize_error_handlers.
Rearrange order of calls to initialization functions.
* src/user-prefs.cc (init_user_prefs): New function.
* src/data.cc (map): Correct condition for assert (). Correct
handling of empty args.
* src/f-lsode.cc src/f-dassl.cc src/f-quad.cc src/f-npsol.cc
src/f-fsolve.cc: Pass correct number of args to
takes_correct_nargs ().
* src/variables.cc (takes_correct_nargs): Use %s, not %c in format
string.
* src/f-ifft2.cc src/f-expm.cc src/f-det.cc src/f-svd.cc
src/f-syl.cc src/f-schur.cc src/f-qzval.cc src/f-qr.cc
src/f-pinv.cc src/f-lu.cc src/f-log.cc src/f-inv.cc src/f-hess.cc
src/f-eig.cc src/f-chol.cc src/f-balance.cc src/f-lsode.cc
src/f-dassl.cc src/f-quad.cc src/f-npsol.cc src/f-fsolve.cc:
Correctly handle return value from empty_arg ().
* src/utils.cc (empty_arg): Clarify usage, correct return value if
arg is empty but no message is printed.
* src/Makefile.in (dist): Delete builtins.cc too.
* configure.in (DYNAMIC_LD_OBJ): Delete.
* src/Makefile.in (OBJECTS): Don't substitute DYNAMIC_LD_OBJ.
Always include dynamic-ld.o.
* configure.in: Generate Makefile in scripts/elfun and
scripts/specfun.
* Makeconf.in (version): Use `:=' and `$(shell )', not just `='
and backticks, so we only extract the version number once.
Mon Sep 19 09:04:30 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/tc-rep.h (represent_strings_with_doubles): New field in
tree_constant_rep class.
* tree-misc.cc (tree_argument_list::convert_to_const_vector):
Don't allocate extra arg for function name.
* sysdep.cc, pr-output.cc, input.cc, file-io.cc, error.cc,
tc-rep.cc, tree-expr.cc, f-svd.cc, f-sort.cc, f-schur.cc,
f-rand.cc, f-qzval.cc, f-quad.cc, f-qr.cc, f-qpsol.cc, f-pinv.cc,
f-npsol.cc, f-minmax.cc, f-lu.cc, f-lsode.cc, f-log.cc, f-inv.cc,
f-ifft2.cc, f-ifft.cc, f-hess.cc, f-givens.cc, f-fsolve.cc,
f-fft2.cc, f-fft.cc, f-expm.cc, f-eig.cc, f-det.cc, f-dassl.cc,
f-colloc.cc, f-chol.cc, f-balance.cc, f-syl.cc, variables.cc,
tree-misc.cc, data.cc, octave.cc, utils.cc, defun-int.h:
Change meaning and usage of nargin and args.length() to cope with
above change. This makes nargin mean the same thing in built-in
functions as it does in M-files.
Sat Sep 17 09:29:08 1994 John Eaton <jwe@schoch.che.utexas.edu>
* scripts/general/nargchk.m: New function.
Fri Sep 16 08:48:13 1994 John Eaton <jwe@schoch.che.utexas.edu>
* Makeconf.in (FLIB_LIST, FLIB_PATH, CXXLIBS, CXXLIB_LIST,
CXXLIB_PATH): Set these.
* cxxlibs.sh: New file.
* configure.in: Use it to determine extra C++ libraries to link
to. Use sed magic to extract list of libraries and directories
from FLIBS and CXXLIBS.
* Makefile.in: (DISTFILES): Include cxxlibs.sh.
* configure.in: Change AC_VERBOSE messages to match
autoconf-generated messages.
* src/dynamic-ld.cc (dld_octave_resolve_reference): Search library
path for list of files to link.
* src/utils.cc (pathstring_to_vector): Un-#if 0 it.
* Makefile.in: Install liboctdld.a if not linking to it.
(defaults.h): Substitute FLIB_LIST, FLIB_PATH, CXXLIB_LIST,
CXXLIB_PATH.
Thu Sep 15 09:31:29 1994 John Eaton <jwe@schoch.che.utexas.edu>
* Makeconf.in (LD_STATIC_FLAG): Actually substitute LD_STATIC_FLAG.
(ALL_LDFLAGS): Include it here.
* configure.in: Check for signgam declaration in math.h
* acconfig.h: Add #undef for SIGNGAM_DECLARED.
* src/mappers.h: Provide our own declaration of signgam if
HAVE_LGAMMA but not SIGNGAM_DECLARED.
Wed Sep 14 11:28:09 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/dynamic-ld.cc (mangled_octave_builtin_name,
mangle_octave_oct_file_name, load_octave_builtin,
load_octave_oct_file, init_dynamic_linker): New functions.
[WITH_DLD] (octave_dld_init, dld_octave_resolve_reference,
dld_octave_builtin, dld_octave_oct_file): New functions to handle
details of dynamic linking using dld.
* src/variables.cc (load_fcn_from_file) [WITH_DLD]: Handle looking
for .oct file to link at run time.
* src/tree-expr.cc (tree_builtin::tree_builtin): Always init my_name.
(tree_builtin::eval): If no definition, try to load one using
load_octave_builtin().
* src/octave.cc (main): Initialize dynamic linking here.
* src/defun-int.h (DEFINE_FUN_STRUCT, DEFINE_FUN_STRUCT_FUN):
New macros.
* src/defun-dld.h (DEFUN_DLD_BUILTIN): Rename from DEFUN_DLD and
handle case of WITH_DLD && OCTAVE_LITE && MAKE_BUITLINS.
(DEFUN_DLD): Use this for external user-supplied functions that
are intended to be dynamically linked.
* configure.in: Handle --enable-lite-kernel. Call AC_SUBST for
use_dld and lite_kernel. Define LIBOCTDLD unless doing dynamic
linking and small kernel requested.
* acconfig.h: Add #undefs for OCTAVE_LITE and SMART_PUTENV.
* Makeconf.in: Define WITH_DLD from @use_dld@ and OCTAVE_LITE from
@lite_kernel@.
* src/octave.cc (Fsystem): Rename from shell_cmd.
(Fshell_cmd): Define as alias to Fsystem.
Mon Sep 12 20:19:20 1994 John Eaton <jwe@schoch.che.utexas.edu>
* src/mappers.cc: Include error.h and math.h.
Sat Sep 10 11:49:11 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Makefile.in: Clean up rules for making distributions.
(DISTDIRS): Distribute kpathsea
Fri Sep 9 08:46:03 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/dMatrix.cc (pseudo_inverse): New function.
* liboctave/CMatrix.cc (pseudo_inverse): New function.
* src/f-pinv.cc: New file, for pinv().
* src/Makefile.in (DLD_SRC): Add f-pinv.cc.
(DLD_OBJ): Add f-pinv.o.
* scripts/linear-algebra/pinv.m: Delete.
* configure.in: Define and substitute $imagepath.
* src/Makefile.in: Substitute OCTAVE_IMAGEPATH.
* src/defaults.h.in: Add OCTAVE_IMAGEPATH.
* src/variables.cc (install_builtin_variables): Define IMAGEPATH.
* src/user-prefs.cc (image_path): New function.
* Makeconf.in (imagepath): substitute it.
* src/octave.cc (initialize_globals): Ensure that $archlibdir is
in the user's PATH.
* utils.cc (search_path_for_file, Ffile_in_path): New functions.
* configure.in: Append `//' to $fcnfiledir, for recursive
searching.
(AC_OUTPUT): Edit makefiles in script subdirectories too.
* scripts: Regroup function files in the following directories,
each with its own Makefile.in:
image plot signal control
linear-algebra polynomial special-matrix general
miscellaneous set statistics
* src/help.cc (simple_help): Use kpathsea functions to find files
in path.
* src/utils.cc (get_fcn_file_names): Likewise.
(pathstring_to_vector): #if 0 out.
Thu Sep 8 16:59:42 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/Makefile.in (OCTAVE_LIBS): Include ../libkpathsea.a.
* configure.in: Include configure stuff for kpathsea here too.
* Makefile.in (kpathsea): New target.
* src/utils.cc (file_in_path): Use kpathsea function instead of
doing our own searching.
* kpathsea/Makefile.in (lib): Define as ../libkpathsea.a, not just
kpathsea.a.
Wed Sep 7 09:39:20 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/user-prefs.cc (check_str_pref): Fix comment.
* src/utils.cc (empty_arg): Check flag == 0, not is_empty > 0.
* src/f-fft2.cc (Ffft2): New file and function.
* src/f-ifft2.cc (Fifft2): Likewise.
* src/fft2.m, src/ifft2.m: Delete.
* src/f-fft.cc (Ffft): Handle second arg. Depending on value of
propagate_empty_matrices, return empty matrix for empty arg.
* src/f-ifft.cc (Fifft): Likewise.
* liboctave/CMatrix.cc (fourier2d, ifourier2d): New functions.
* liboctave/dMatrix.cc (fourier2d, ifourier2d): New functions.
* src/tree-misc.cc (eval (int, int)): New function.
* src/octave.cc (eval_string, Feval): Handle multiple output args.
* src/error.cc (suppress_octave_error_messages): New global.
(error): Check it to see if messages should be printed.
* src/octave/cc (Feval): Set it if `catch' arg is supplied.
* src/octave.cc (Feval): Handle second `catch' arg.
* src/load-save.cc (read_mat_file_header): Init swap to zero.
* doc/octave.1: New simple man page.
* doc/Makefile.in: Distribute and install it.
* src/variables.cc (Fclear): Handle -x option for exclusive clear.
Tue Sep 6 16:00:34 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/load-save.cc (save_mat_binary_data): New function.
(do_save): Handle LS_MAT_BINARY.
(Fsave): Handle -mat-binary.
(Changes from G. Beyerle <gbeyerle@AWI-Potsdam.DE>.)
* src/variables.cc (subs_octave_home, octave_arch_lib_dir):
New functions.
(octave_home, octave_info_dir, octave_lib_dir, default_path):
Fix for new directory organization.
* src/tree-expr.h (tree_multi_val_ret): New class to serve as a
base for objects that can produce more than one value when
evaluated.
(tree_fvc, tree_index_expression, tree_multi_assignment_expression):
Use it as a base.
* src/parse.y (make_multi_val_re): New function.
(expression): Use it to construct multiple value assignments.
* configure.in, Makefile.in, Makeconf.in, src/defaults.h.in:
Revamp directory structure used for installed versions of Octave.
* src/f-schur.cc (Fschur): Correct argument count in error message.
* src/octave.cc (Fcomputer): New function.
* scripts/computer.in: Delete.
* scripts/Makefile.in: Don't edit or distribute computer.in.
Thu Sep 1 09:02:06 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/variables.cc (install_builtin_variables): New builtin
variable, OCTAVE_VERSION.
Tue Aug 30 17:18:14 1994 John Eaton (jwe@schoch.che.utexas.edu)
* tree-expr.cc: Include string.h
(tree_matrix::eval): Fix handling of strings to work as in 1.0.
Mon Aug 29 14:55:14 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/lex.l: Handle ".+" and ".-" too.
* src/dirfns.cc (dir_acess, exists, gen_tempname, tempnam): New
functions from glibc.
* src/utils.cc (octave_tmp_file_name): Use tempnam.
(choose_temp_base_try): Delete.
* configure.in: Check for tempnam.
* src/load-save.cc (Fsave): Only write floating point format if
doing binary save.
* liboctave/Array.cc (operator =): Check to see if assignment is
to same object.
Sun Aug 28 23:32:59 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/CollocWt.cc (CollocWt::init): Call delete [] on vectors.
* liboctave/NPSOL.cc (NPSOL::minimize): Eliminate some memory leaks.
* liboctave/QPSOL.cc (QPSOL::minimize): Likewise.
* liboctave/NLEqn.cc (NLEqn::solve): Likewise.
Thu Aug 25 09:27:04 1994 John Eaton (jwe@schoch.che.utexas.edu)
* info/session.c (info_get_input_char): Don't exit immediately if
we see EOF on the input stream.
* scripts/kurtosis.m, scripts/skewness.m: Update from KH.
Wed Aug 24 00:19:49 1994 John Eaton (jwe@schoch.che.utexas.edu)
* dld/Makefile.in, scripts/Makefile.in, doc/Makefile.in,
readline/Makefile.in, info/Makefile.in, libcruft/Makefile.in,
liboctave/Makefile.in, src/Makefile.in (INSTALL, INSTALL_PROGRAM,
INSTALL_DATA): Define here.
* Makeconf.in: Not here.
* src/tree-plot.cc (send_to_plot_stream): Handle
user_pref.automatic_replot.
* src/variables.cc (install_builtin_variables):
Add DEFVAR for automatic_replot.
* src/user-prefs.cc (automatic_replot): New function.
* src/user-prefs.h (user_preferences): Add automatic_replot to the
list.
* src/data.cc (Fatan2): Make work for mixed scalar and Matrix args.
(map): New functions for two arg mappers (like atan2).
* src/f-fsqp.cc: Don't surround everything in FSQP_MISSING, so
that trying to use fsqp will result in a message about fsqp not
being freely redistributable.
* src/f-npsol.cc: Likewise, for NPSOL_MISSING.
* src/f-qpsol.cc: Likewise, for QPSOL_MISSING.
Tue Aug 23 12:56:47 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree-expr.cc (tree_identifier::eval): Don't call delete for
ans_id. The destructor for tree_simple_assignment_expression does
this now.
* src/Makefile.in (%.def : %.cc): Use sed, not awk.
(realclean, distclean, local-dist, dist): Delete .d and .def files.
* liboctave/Array.h (DiagArray::Proxy): Make compilation
conditional on gcc version, not just _AIX.
* src/utils.cc (octave_tmp_file_name, choose_temp_base_try): New
functions, stolen from GCC. If HAVE_MKTEMP is not defined, just
call tmpnam; otherwise, try harder to please.
* src/tree-plot.cc (save_in_tmp_file): Use it, instead of calling
tmpnam() directly.
* src/file-io.cc (do_scanf): Likewise.
* src/octave-hist.cc (mk_tmp_hist_file): Likewise.
* configure.in: Check for mktemp.
* src/tree-const.h (is_matrix_type, is_scalar_type): Make private.
* src/tc-rep.h (is_matrix_type, is_scalar_type): Likewise.
* src/tc-rep.h (force_numeric, make_numeric,
make_numeric_or_magic, make_numeric_or_range_or_magic): Make
private.
(make_numeric_or_range): #if 0 out.
* src/utils.cc (empty_arg): Correctly set return value.
* src/arith-ops.cc: Don't include setjmp.h.
* src/utils.cc: Surround setjmp.h with extern "C".
* src/octave.cc: Likewise.
* src/sighandlers.cc (octave_new_handler): New function.
(install_signal_handlers): Call it.
* src/f-qzval.cc (Fqzvalue): Don't call make_numeric for args.
Check error state after attempting to extract values. Simplify
where possible.
* src/f-colloc.cc (Fcolloc): Likewise.
* src/f-rand.cc (Frand): Likewise.
* src/f-sort.cc (Fsort): Likewise.
* src/f-find.cc (Ffind): Likewise.
* src/f-minmax.cc (Fmin, Fmax): Likewise.
* src/f-fft.cc (Ffft): Likewise.
* src/f-ifft.cc (Fifft): Likewise.
* src/f-svd.cc (Fsvd): Likewise.
* src/f-inv.cc (Finv): Likewise.
* src/f-det.cc (Fdet): Likewise.
* src/f-eig.cc (Feig): Likewise.
* src/f-lu.cc (Flu): Likewise.
* src/f-hess.cc (Fhess): Likewise.
* src/f-qr.cc (Fqr): Likewise.
* src/f-givens.cc (Fgivens): Likewise.
* src/f-syl.cc (Fsyl): Likewise.
* src/f-log.cc (Flog): Likewise.
* src/f-expm.cc (Fexpm): Likewise.
* src/f-balance.cc (Fbalance): Likewise.
* src/f-schur.cc (Fschur): Likewise.
* src/f-chol.cc (Fchol): Likewise.
* src/f-npsol.cc (Fnpsol, npsol_options): Likewise.
* src/f-fsolve.cc (Ffsolve, fsolve_options): Likewise.
* src/f-dassl.cc (Fdassl, dassl_options): Likewise.
* src/f-lsode.cc (Flsode, lsode_options): Likewise.
* src/f-quad.cc (Fquad, quad_options): Likewise.
* src/tree-expr.cc (tree_matrix::eval): Likewise, while building
matrix.
(tree_colon_expression::eval): Likewise, for elements of range.
* src/variables.cc (is_valid_function, Fis_global, Fexist):
Likewise.
* src/sysdep.cc (Fgetenv, Fpause): Likewise.
* src/octave.cc (eval_string, Fshell_cmd): Likewise.
* src/input.cc (get_user_input): Likewise.
* src/file-io.cc (return_valid_file, fopen_file_for_user,
fgets_internal, fseek_internal, process_printf_format, do_printf,
do_scanf, fread_internal, fwrite_internal, feof_internal):
Likewise.
* src/tc-rep.cc (TC_REP::string_value): Call error() and return 0
instead of crashing if not string_constant.
* src/file-io.cc (fopen_file_for_user): Take string as first arg,
not tree_constant. Change callers.
(fgets_internal, fseek_internal): Correct check for int arg.
(process_scanf_format): Use isspace instead of checking directly
(and incorrectly) for white space characters.
* src/tree-expr.cc (tree_matrix::eval, tree_unary_expression::eval,
tree_binary_expression::eval, tree_colon_expression::eval,
tree_simple_assignment_expression::eval ): Eliminate uneccesary
conversions to and from Octave_object/tree_constant.
Mon Aug 22 18:35:05 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/data.cc (Fatan2): New function.
* src/data.cc (get_dimensions): Don't call make_numeric for args.
Check error state after attempting to extract values.
Fri Aug 19 08:28:24 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree-misc.h (tree_parameter_list::tree_parameter_list)):
Initialize marked_for_varargs to zero.
* src/load-save.cc: Add float variants of the conversion routines.
(LS_DO_READ): Add swap parameter and only swap bytes if it is true.
(read_doubles): Pass swap to LS_DO_READ. Handle float data.
(LS_DO_WRITE): Copy data to tmp buffer to avoid destroying data.
(do_double_format_conversion): Rename from do_float_format_conversion.
(do_float_format_conversion): New function to handle conversion
for float data.
(read_mat_binary_data): Use read_doules for all cases. Handle
float data.
(too_large_for_float): New function.
(save_binary_data): Save data format for scalars and ranges too.
(read_binary_data): Read data format for scalars and ranges too.
(do_save, save_vars): New arg, save_as_floats.
(Fsave): New option, -float-binary.
* src/utils.cc (empty_arg): New function.
* src/f-balance.cc (Fbalance): Use it to simplify handling of
empty arguments.
* src/f-chol.cc (Fchol): Likewise.
* src/f-det.cc (Fdet): Likewise.
* src/f-eig.cc (Feig): Likewise.
* src/f-expm.cc (Fexpm): Likewise.
* src/f-fft.cc (Ffft): Likewise.
* src/f-hess.cc (Fhess): Likewise.
* src/f-ifft.cc (Fifft): Likewise.
* src/f-inv.cc (Finv): Likewise.
* src/f-log.cc (Flogm, Fsqrtm): Likewise.
* src/f-lu.cc (Flu): Likewise.
* src/f-qr.cc (Fqr): Likewise.
* src/f-schur.cc (Fschur): Likewise.
* src/f-svd.cc (Fsvd): Likewise.
* src/tc-rep.cc (tupe_as_string): Move here.
* src/tree-const.cc: From here.
* src/gripes.cc (gripe_invalid_conversion): New function.
Thu Aug 18 21:02:19 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/(print_empty_matrix): New function.
* src/pr-output.cc (octave_print_internal): Use it to print empty
matrices.
* src/tc-rep.cc (TC_REP::print_code, TC_REP::print): Rely on
octave_print_internal() to handle printing empty matrices.
* src/pr-output.cc (octave_print_internal (all variants)):
New arg, pr_as_read_syntax. If nonzero, print the value in a form
that Octave can parse. Declare os as ostream&, not ostrstream&.
* src/tc-rep.cc (TC_REP::print_code): Handle all types, not just
real and imaginary constants.
* src/help.cc (Ftype): Also print values of variables.
Wed Aug 17 08:46:44 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/octave.cc (Fshell_cmd): Return output if nargout > 0 or
nargin > 2, otherwise, just send output to the pager.
* src/mappers.cc (xerf, xerfc, xgamma, xlgamma): New functions.
Put preprocessor conditionals here.
(install_mapper_functions): Not here.
Tue Aug 16 09:55:25 1994 John Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Check for erf, erfc, and lgamma.
* src/mappers.cc (erf, erfc, lgamma): New mappers.
* src/mappers.h (Mapper_fcn): Add new field `name'.
* src/variables.cc (install_builtin_mapper): Save the name.
* src/tc-rep.cc (TC_REP::mapper): Don't crash if a mapper function
is missing.
* src/tc-rep-1.cc (warn_invalid_conversion): New function.
* src/gripes.cc (gripe_invalid_conversion): New function.
* src/parse.y (list1, parse_error): New non-terminals.
(list): Use them.
* src/lex.l: Return LEXICAL_ERROR instead of calling
jump_to_top_level.
* liboctave/Range.cc (matrix_value): New function.
* src/tc-rep.cc (TC_REP::matrix_value): Use it.
* src/tree-const.h (to_matrix, to_vector, to_scalar): Delete
unecessary functions.
* src/tc-rep.cc (TC_REP::to_matrix, TC_REP::to_vector,
TC_REP::to_scalar): Likewise. Change all callers to use
matrix_value, vector_value, and scalar_value instead.
* src/tree-const.cc (TC_REP::matrix_value): If at all possible,
produce a matrix from the current constant. Otherwise, print an
error message. Don't abort or jump to the top level.
(TC_REP::scalar_value, TC_REP::complex_scalar_value,
TC_REP::vector_value, TC_REP::complex_vector_value,
TC_REP::complex_matrix_value): Likewise, for appropriate types.
* src/utils.cc (empty_arg): New function.
* src/f-svd.cc (Fsvd): Use it. Don't call make_numeric; rely on
value functions to do conversion.
* src/load-save.cc (Fload): Handle -list and -verbose.
Mon Aug 15 09:32:57 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tc-rep.cc (TC_REP): New define, so we don't have to write
tree_constant::tree_constant_rep:: everywhere.
* src/tree-const.h (class tree_constant): Nest tree_constant_rep
class inside tree_constant class by including tc-rep.h here.
* src/tc-rep.h: Don't include any other files, delete forward
class declarations.
* src/tc-rep.h (constant_type): Make private.
* src/parse.y (arg_list): Use tree_constant::magic_colon in
constructor call, not tree_constant_rep::magic_colon.
* src/tree-const.h (tree_constant::tree_constant
(tree_constant::magic_colon)): Convert arg from
tree_constant_rep::constant_type.
* src/f-svd.cc (Fsvd): Simplify.
* src/tree-expr.cc (any_arg_is_magic_colon): Don't use values from
tree_constant_rep::constant_type enum.
(tree_matrix::eval): Likewise.
* src/tree-misc.cc (tree_parameter_list::define_from_arg_vector,
tree_if_clause::eval): Likewise.
* src/tree-cmd.cc (tree_while_command::eval,
tree_for_command::eval): Likewise.
* src/symtab.cc (symbol_record_info::symbol_record_info): Likewise.
* src/f-colloc.cc (Fcolloc): Likewise.
* src/f-npsol.cc (npsol_objective_function): Likewise.
* src/f-chol.cc (Fchol): Likewise.
* src/f-det.cc (Fdet): Likewise.
* src/f-eig.cc (Feig): Likewise.
* src/f-expm.cc (Fexpm): Likewise.
* src/f-fft.cc (Ffft): Likewise.
* src/f-find.cc (Ffind): Likewise.
* src/f-hess.cc (Fhess): Likewise.
* src/f-ifft.cc (Fifft): Likewise.
* src/f-inv.cc (Finv): Likewise.
* src/f-log.cc (Flog): Likewise.
* src/f-lu.cc (Flu): Likewise.
* src/f-minmax.cc (Fmin, Fmax): Likewise.
* src/f-qr.cc (Fqr): Likewise.
* src/f-rand.cc (rand): Likewise.
* src/f-schur.cc (schur): Likewise.
* src/f-sort.cc (Fsort): Likewise.
* src/f-svd.cc (Fsvd): Likewise.
* src/f-lu.cc (Flu): Handle case of nargout == 0 the same as
nargout == 1.
* src/tree-const.h (force_numeric): Don't return type info.
* src/tc-rep.cc (tree_matrix::eval): Ditto.
* src/tree-expr.cc (tree_matrix::eval): Don't use return value
from tree_constant::force_numeric().
* src/tree-const.h (is_magic_colon): New function.
* src/tc-rep.h (is_magic_colon): New function.
* src/load-save.cc (ascii_save_type): New function.
(save_binary_data, save_ascii_data, save_three_d): Don't use
values from tree_constant_rep::constant_type enum. Fail if write
is unsuccessful. Fail but don't panic if type is unrecognized.
(save_vars): Check error state after call to do_save().
* src/tc-rep.cc (isstr): Delete, since we have is_string.
* src/tree-const.h (isstr): Ditto.
* src/data.cc (Fisstr): Use is_string(), not isstr().
Sun Aug 14 16:12:10 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/load-save.cc (save_type): Add LS_U_INT, LS_CHAR and LS_FLOAT.
(get_save_type): Handle them.
(read_doubles, write_doubles): Likewise.
* src/load-save.cc (get_floating_point_format): New function.
(read_mat_binary_data, read_binary_file_header): Use it.
* src/lex.l: Combine {D}+\.{D}*{EXPON}?{Im} and {D}+{EXPON}?{Im}
patterns into the single pattern {D}+\.?{D}*{EXPON}?{Im}
Likewise, combine {D}+\.{D}*{EXPON}? and {D}+{EXPON}? into the
single pattern {D}+\.?{D}*{EXPON}?
({D}+/\.[\*/\\^']): New pattern to force expressions like `1./m'
to be parsed the same as `1 ./ m'.
* src/tree-expr.cc (do_lookup): Correctly set script_file_executed.
* src/octave.cc (long_opts): Add --silent as an alias for --quiet,
and --ignore-init-file as an alias for --norc.
* src/octave.cc (verbose_usage): Exit successfully to conform to
the GNU coding standards.
Sat Aug 13 11:06:23 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/dirfns.cc (chdir): New alias for cd.
* src/lex.l (")"): Set convert_spaces_to_comma.
* src/*.cc: Use tree_constant::is_string(), not
tree_constant::is_string_type().
* src/f-balance.cc (Fbalance): Use is_string() rather than
checking const_type() against tree_constant_rep::string_constant.
* src/tc-rep.h (tree_constant_rep::is_string_type): Delete.
* src/tree-const.h (tree_constant::is_string_type): Delete.
* src/Makefile.in (%.def : %.cc): Complain if generated file is
empty.
* configure.in (gcc_version): Set LDFLAGS to -g, not "-g -O".
* src/lex.l (looks_like_bin_op): Also return true for things like
[ 1+ 2 ].
* src/data.cc (Feye, Fones): With no args, return 1.0.
(Fzeros): With no args, return 0.0.
* src/Makefile.in (XALL_CXXFLAGS): ALL_CXXFLAGS without
-fextternal-templates.
(%.def : %.cc): Use it instead of ALL_CXXFLAGS.
* configure.in: Don't use -O for compiling float-type.c.
* libcruft/misc/Makefile.in (XCC): Use patsubst to delete any -O#
flags, not just -O.
Fri Aug 12 18:20:35 1994 John Eaton (jwe@schoch.che.utexas.edu)
Changes for binary load/save, and reading .mat files:
* src/variables.cc (is_globally_visible): Declare extern, not
static.
* src/user-prefs.cc (sv_default_save_format): New function.
* src/user-prefs.h (default_save_format): New field in
user_preferences struct.
src/variables.cc (install_builtin_variables): Add DEFVAR for
default_save_format.
* src/tc-rep.h (tree_constant_rep::is_unknown,
tree_constant_rep::is_scalar, tree_constant_rep::is_matrix,
tree_constant_rep::is_complex_scalar,
tree_constant_rep::is_complex_matrix,
tree_constant_rep::is_string, tree_constant_rep::is_range):
New functions.
* src/tree-const.h (tree_constant::is_unknown,
tree_constant::is_scalar, tree_constant::is_matrix,
tree_constant::is_complex_scalar, tree_constant::is_complex_matrix,
tree_constant::is_string, tree_constant::is_range):
New functions.
* src/tc-rep.cc (tree_constant_rep::save,
tree_constant_rep::save_three_d): Move to load-save.cc and convert
to nonmember functions.
* src/tree-const.h (tree_constant::save,
tree_constant::save_three_d): Delete functions.
* src/tree-plot.cc (save_in_tmp_file): Call nonmember functions
save_ascii_file and save_three_d instead of tree_constant class
member functions.
* src/symtab.cc (symbol_table::glob): New function.
(symbol_table::save, symbol_record::save, symbol_def::save):
Delete unneeded functions.
* src/load-save.cc: New file, for load/save related functions
extracted from src/variables.cc and src/tc-rep.cc.
* src/error.cc (verror): Don't print name if it is null.
Tue Aug 9 14:31:43 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/file-io.cc (process_printf_format): Use
tree_constant::is_scalar_type() and is_string_type() functions
instead of comparing directly with elements of the
tree_constant_rep::constant_type enum.
* src/variables.cc (builtin_real_scalar_variable): Likewise.
(install_loaded_variable): Likewise.
* src/tree-plot.cc (open_plot_stream): New function.
(send_to_plot_stream): Use it. Do our own check for replot with
nothing to plot.
(tree_plot_command::eval): Open plot stream before doing anything.
* src/data.cc (check_dimensions): When changing negative
dimensions to zero, handle nr and nc separately.
Mon Aug 8 20:18:17 1994 John Eaton (jwe@schoch.che.utexas.edu)
* variables.cc (is_valid_fcn): Use lookup_by_name() instead of
looking in the global symbol table directly.
* variables.cc (load_variable): Move code here.
* src/tc-rep.cc (tree_constant_rep::load): From here.
* src/tree-const.h (tree_constant::load): Delete.
* src/tree-plot.cc: Derive classes from tree_print_code and
implement print_code() member functions.
* src/tree-plot.cc (subplot_list::print): New function.
(tree_plot_command::print): Use it, and don't crash if plot_list
is null.
* scripts/axis.m: New function file.
Sun Aug 7 17:06:16 1994 John Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Check for size of short, int, and long.
* float-type.c: New file.
* configure.in: Use it to determine the native floating point
format.
* Makefile.in: Add it to the list of files to distribute.
* acconfig.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN, VAX_D_FLOAT,
VAX_G_FLOAT): Add #undefs.
Sat Aug 6 18:23:47 1994 John Eaton (jwe@schoch.che.utexas.edu)
* config.guess: Update with new copy from gcc 2.6.0.
* src/*.cc, src/*.h, src/*.l, src/*.y: Eliminate need for tree.h.
* src/Makefile.in (INCLUDES): Delete it from the list.
* src/token.cc (token::token (double)): Handle saving original
text of constants for later use by print_code() functions.
(token::~token): Delete original text.
(token::text_rep): New function.
* src/lex.l: Save original text for NUM and IMAG_NUM tokens.
* src/parse.y: Likewise.
* src/parse.y (yyerror): Use the pager.
* src/tree-base.h (tree_print_code): New base class for trees and
lists of trees.
(tree): Derive from tree_print_code.
* src/tree-base.cc: New file, for tree_print_code functions, and
for initializing tree_print_code static members.
* src/tree-const.cc, src/tc-rep.cc, src/tree-plot.cc,
src/tree-expr.cc, src/tree-cmd.cc (all tree classes):
Provide print_code() member function.
* src/tree-misc.cc: Also derive list classes from tree-base.h and
provide print_code() member functions.
* src/help.cc (Ftype, Fwhich): New functions.
* src/octave-hist (do_history): Send history output through the
pager.
* src/variables.cc (do_who, Fwhos): New functions.
* src/tree-expr.h (tree_expression::in_parens): Declare here.
(tree_simple_assignment_expression::in_parens): Not here.
* src/parse.y (maybe_warn_assign_as_truth_value): Eliminate cast.
* src/variables.cc (load_fcn_from_file, lookup, lookup_by_name):
New functions, extracted from tree_identifier class.
(gobble_leading_whitespace, is_function_file, parse_fcn_file):
Move here from tree-expr.cc.
* src/help.cc (Fhelp): Use lookup_by_name so that looking up
symbols is handled in a consistent way.
* tree-expr.cc (tree_unary_expression::oper,
tree_binary_expression::oper, tree_prefix_expression::oper,
tree_postfix_expression::oper): New functions.
* tc-rep.cc (valid_scalar_indices): Define here.
* tc-inlines.cc: Not here.
* src/tree-const.h (tree_constant::stash_original_text): New
function.
* src/tc-rep.cc (tree_constant_rep::stash_original_text): Ditto.
(undo_string_escapes): Ditto.
* src/tc-rep (tree_constant_rep::do_matrix_index): Don't just
return *this.
* src/tree-const.h (tree_constant::tree_constant (tree_constant_re&)):
Delete.
* src/pager.cc (open_diary_file, close_diary_file,
maybe_write_to_diary_file, Fdiary): New functions.
(flush_output_to_pager): Call maybe_write_to_diary_file before
sending output to the screen.
* src/input.cc (octave_gets): Call maybe_write_to_diary file to
save the prompt and the user input.
* src/error.cc (verror): Use C++ streams, not C I/O functions.
Call maybe_write_to_diary file to save error messges too.
* src/octave.cc (clean_up_and_exit): Close diary file here.
* src/octave.cc (main): Initialize pager first.
* src/input.cc (get_user_input): Return empty matrix for no input.
* src/tree-plot.cc: Include readline/tilde.h instead of declaring
tilde_expand() directly.
* src/utils.cc: Likewise.
* src/tree-plot.cc (tree_plot_command::print_code): New function.
* src/tree-const.h (tree_constant::print_code): Likewise.
* src/tree-expr.h (tree_simple_assignment_expression::ans_ass):
New data member to flag assignments to ans.
* src/tree-expr.cc (tree_identifier::eval): Set it when
constructing assignments to ans.
* src/parse.y (maybe_convert_to_ans_assign): Likewise.
* src/tree-expr.h (tree_simple_assignment_expression::preserve):
New data member to allow preserving left hand side args that
shouldn't be deleted in some cases (ugh).
* src/tree-expr.cc (tree_multi_assignment_expression::eval):
Create assignment with preserve flag set.
Wed Aug 3 14:27:25 1994 John Eaton (jwe@schoch.che.utexas.edu)
Yet another massive reorganization of sources, once again
hopefully for the better. A fair amount of work is not detailed
here, but these are the major points. The grammar file and the
derivation of the tree classes are somewhat cleaner now.
* src/parse.y: Cope with changes to derivation scheme.
* src/tree-misc.cc: New file.
(tree_statement, tree_global): New classes.
(tree_global_init_list): New class, derived from SLList for the
list of expressions in a global command.
* src/tree-cmd.cc (tree_global_command): Use tree_global_init_list.
* src/tree-misc.cc (tree_argument_list): Move here from
tree-expr.cc, and derive from SLList instead of tree.
(tree_parameter_list): Likewise.
(tree_return_list): Likewise.
* src/tree-cmd.cc (tree_command_list): Delete class.
* src/tree-misc.cc (tree_statement_list): New class for keeping a
list of commands or expressions to evaluate. Derive from SLList,
not tree.
* src/tree-plot.cc (subplot_list, plot_limits, plot_range,
subplot_using, subplot_style): Rename from tree_*, and
don't derive from tree class.
* src/tree-plot.cc: Eliminate eval member function for classes not
derived from tree class.
* src/tree-plot.cc, src/tree-cmd.cc: For classes derived from
tree-command, the eval() member function is now void eval (void).
* src/tree-base.h (tree::tree): New constructor, to initialize the
line and column info. For all classes that are derived from the
tree class, use it instead of manipulating the data directly.
(line_num, column_num): Make private.
* src/tree-expr.cc (tree_simple_assignment_expression::preserve):
New data member, set in constructors and used by the destructor
when the left-hand side of the expression should not be deleted
(as for some temporary assignments not constructed in the parser).
* src/tree-expr.h (tree_expression::type) Rename and move here from
tree-base.h. Change all uses.
(tree_matrix::dir): Likewise. Change all uses.
* src/utils.cc (make_argv): Stash function name in argv[0].
* src/octave.cc (global_command): Declare as tree_statement_list,
not tree.
* src/parse.y (make_binary_op, make_unary_op, make_prefix_op,
make_postfix_op): New functions.
* src/parse.y (GLOBAL): Make it a tok_val type.
* src/lex.l (is_keyword): Give GLOBAL a value.
Mon Aug 1 22:37:22 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/lex.l (grab_help_text): Unput the last character read.
Sun Jul 31 21:17:07 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/pr-output.cc (set_format (double, int&)): Avoid calling
log10 for Inf and NaN.
Fri Jul 29 16:08:32 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/octave.cc (reading_startup_message_printed): New flag.
(parse_and_execute): New arg, verbose. If true, print name of
file as it is read.
(execute_startup_files): Don't print message if
inhibit_startup_message is true.
(main): Move startup message before reading init files.
Thu Jul 28 00:25:42 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Makefile.in (MATRIX_INC): Delete CmplxColVec.h from list.
* src/symtab.cc (symbol_table::rename): New function.
* src/parse.y (func_def2): Use it instead of tree_identifier::rename.
* src/tree-expr.cc (tree_identifier::rename): Delete unused function.
* src/tree-expr.cc (tree_identifier::load_fcn_from_file): New function.
(tree_identifier::do_lookup): Use it instead of parse_fcn_file.
* src/variables.cc (is_valid_function): Ditto.
* src/help.cc (Fhelp): Ditto.
* src/utils.cc (oct_file_in_path): New function.
Wed Jul 27 08:59:32 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree-expr.cc (tree_identifier::parse_fcn_file): Combine
three functions into one.
* src/utils.cc: Delete uneeded declaration of ioctl().
* src/sysdep.cc: Likewise.
* install.sh: New file, from autoconf distribution.
* Makefile.in (DISTFILES): Distribute it.
Tue Jul 26 16:08:58 1994 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/Makefile.in (DISTDIRS): New variable, for directories
below scripts to distribute.
(dist): Handle distributing whole directories named by $(DISTDIRS).
(local-dist): Ditto.
Mon Jul 25 12:57:09 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/CmplxQRP.cc: Provide declaration for zungqr.
* liboctave/dbleQRP.cc: Provide declaration for dorgqr.
* src/Makefile.in (dist): Also remove y.output and defaults.h.
(local-dist): Ditto.
(realclean): Ditto.
* src/oct-obj.h (Octave_object::Octave_object (int)): Make
private, to avoid problems with different meanings of
Octave_object (int) and Octave_object (double) constructors.
* scripts/amr-image: New files for image processing from Tony
Richardson. These are not in the default octave LOADPATH yet.
See the README file in the amr-image directory for more info on
how to use them.
* src/octave.cc (Fshell_cmd): Restore accidentally deleted
function.
* scripts/conv-amr.m, scripts/deconv-amr.m, scripts/roots-amr.m,
scripts/poly-amr.m, scripts/roots-tuwien.m, scripts/conv-tuwien.m,
scripts/deconv-tuwien.m, scripts/poly-tuwien.m:
New files.
XXX FIXME XXX -- For each of these functions, either one of the
versions will need to be selected, or they will need to be merged
before the next release.
* scripts/null.m, scripts/orth.m, scripts/fft2.m, scripts/ifft2.m,
scripts/filter.m, scripts/compan.m, scripts/polyderiv.m,
scripts/polyinteg.m, scripts/polyreduce.m, scripts/polyval.m,
scripts/polyvalm.m, scripts/postpad.m, scripts/prepad.m,
scripts/residue.m, scripts/sinc.m, scripts/freqz.m,
scripts/complement.m, scripts/intersection.m,
scripts/create_set.m, scripts/union.m:
New files.
* scripts/hilb.m: Eliminate inner loop, for speed. From
romolo@URSAMAJOR.ENG.UNIPR.IT (Romolo Manfredini).
Sun Jul 24 22:08:48 1994 Castor Fu (castor@drizzle.stanford.edu)
* libcruft/ranlib/genf.f (genf): Use 1.2E-38 instead of 1.0E-38
when checking to see if generated numbers will cause overflow.
This helps DEC's f77 compiler on the Alpha, which refuses to
generate denormalized constants.
* libcruft/ranlib/gennf.f (gennf): Likewise.
Fri Jul 22 10:27:00 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/Makefile.in (DEF_FILES): Depend on defun header files too.
Thu Jul 21 14:40:30 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/NLFunc.h (nonlinear_fcn): Declare as pointer to
function taking const ColumnVector arg.
(jacobian_fcn): Ditto.
* src/defun-int.h (DEFINE_ARGV): Declare and define save_argc and
save_argv for functions that mess with argc and argv directly.
(DELETE_ARGV): Use save_argc and save_argv instead of argc and argv.
* src/f-lsode.cc (ODE_OPTIONS): Add const qualifier for string elts.
(print_lsode_option_list): Declare keyword as const char *.
* src/f-npsol.cc, src/f-qpsol.cc, src/f-dassl.cc, src/f-quad.cc:
Likewise, for corresponding structs and functions.
* liboctave/dbleSVD.h (SVD::type): New enum, for choosing type of
factorization.
* liboctave/CmplxSVD.cc (SVD::SVD): Add new optional arg for type.
(init): Handle case of type == SVD::economy.
* liboctave/dbleSVD.cc: Likewise.
QR changes from R. Bruce Tenison (btenison@eng.auburn.edu) adapted
for new way of defining builtin functions:
* doc/linalg.texi: Changed QR description to include QRP
factorization
* src/f-qr.cc (Fqr): Handle permuted and economy QR
factorizations. Handle case of 1 output arg.
* liboctave/Makefile.in (MATRIX_INC, MATRIX_SRC): Add new QRP files.
* liboctave/dbleQRP.h, liboctave/dbleQRP.cc, liboctave/CmplxQRP.h,
liboctave/CmplxQRP.h: New files, for QR with pivoting.
* liboctave/dbleQR.h (QR::type): New enum, for choosing type of
factorization.
* liboctave/CmplxQR.cc (QR): Add new optional arg for type.
Handle case of type == SVD::economy and SVD::raw.
* liboctave/dbleQR.cc (QR): Likewise.
* libcruft/lapack/dgeqpf.f: New file.
* libcruft/lapack/zgeqpf.f: Ditto.
Wed Jul 20 13:12:55 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/*.cc, liboctave/*.h: Various cleanups to remove use of
NULL. Only mention default argument values in function
declarations, not in their definitions (required for gcc 2.6.x).
* configure.in: If configuring for alpha-dec-osf, check for sgtty
first. If not found, go ahead and check for Posix terminal driver.
Tue Jul 19 09:25:45 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/mx-defs.h (FILE): Don't declare as struct FILE just to
avoid including stdio.h.
* liboctave/dMatrix.cc: Do include stdio.h here.
* liboctave matrix classes: Declare operator>> correctly, and
return istream object. Get friend stuff right.
* liboctave/DAE.cc (DAE::integrate): To see if the user provided a
Jacobian function, call DAEFunc::jacobian_function ().
* liboctave/DAE.cc (user_fun, user_jac): Qualify with class name.
* liboctave/ODE.cc (user_fun, user_jac): Ditto.
* liboctave/DAFunc.h (DAEJac): Declare inside class.
(DAERHSFunc, DAEJacFunc): Define types inside class.
* liboctave/ODEFunc.h (ODERHSFunc, ODEJacFunc) Likewise.
Massive reorganization of sources, hopefully for the better.
A fair amount of work is not detailed here, but these are the
major points...
* src/symtab.h (symbol_def::TYPE) Add new elements for recording
whether a symbol is a text function or mapper function.
* src/symtab.cc (symbol_def::is_text_function,
symbol_record::is_text_function, symbol_def::is_mapper_function,
symbol_record::is_mapper_function): New functions.
Modify existing is_* functions to cope with these changes.
(symbol_def::symbol_def (tree_builtin*, unsigned)): New 2nd arg.
(symbol_def::symbol_def (tree_function*, unsigned)): Ditto
(symbol_def::define (tree_builtin*, unsigned)): Ditto.
(symbol_def::define (tree_function*, unsigned)): Ditto.
* src/variables.cc (is_text_function_name): Use the new symbol
table functions, since we can no longer tell by looking in a
simple list.
* tree-expr.cc (class tree_builtin): Text functions are no longer
handled as a special case here.
* src/sysdep.cc (octave_ieee_init): Special case Alpha for
initializing Inf and NaN.
* src/tc-rep.cc: Use const in more places.
* src/data.cc src/timefns.cc, src/dirfns.cc, src/dirfns.h: New
files.
* src/*.cc, src/*.y, src/*.l, src/*.h: Various cleanups to remove
use of NULL. Only mention default argument values in function
declarations, not in their definitions (required for gcc 2.6.x).
* src/g-builtins.cc, src/g-builtins.h, src/t-builtins.cc
src/t-builtins.h: Removed. Functions moved to various other
files, where they more logically belong.
* src/utils.cc: Likewise, various functions moved to other files,
where they more logically belong.
* src/mappers.cc (install_mapper_functions): Declare all mapper
functions here with the new DEFUN_MAPPER() macro.
* src/variables.cc (install_builtin_variables): Declare all
builtin variables here, with the new DEFVAR() macro.
* src/f-*.h: Deleted.
* src/f-*.cc: Delete #ifdef WITH_DLD code and use DEFUN_DLD()
instead to declare builtin functions that will be dynamically
loaded. Give all functions a uniform return type and argument
list.
* src/mkdefs, src/mkbuiltins: New scripts.
* src/Makefile.in: Use them to generate builtins.cc automatically
from source files that use DEFUN.
* src/defun.h, src/defun-dld.h, src/defun-int.h: New files, to
define DEFUN() and DEFVAR() macros to make it possible to define
functions together with their help strings in one place. The code
to install functions in the symbol table is now generated by
mkbuiltins.
* configure.in (LIBOCTDLD): New variable to define.
Only call AC_VERBOSE() for DYNAMIC_LD_OBJ, DLD_DIR, LIBDLD,
LIBOCTDLD, and LD_STATIC_FLAG if they are set.
* move-if-change: Move here, from src/move-if-change.
* Makeconf.in (%.d: %.cc): Echo simple message instead of the
commands actually executed.
(%.d: %.c): Likewise.
* src/unwind-prot.h: Include stddef.h, for size_t.
Tue Jul 12 12:51:25 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/f-eval.cc, src/f-fill.cc, src/f-find.cc, src/f-input.cc,
src/f-minmax.cc, src/f-log.cc, src/f-sort.cc, src/f-eval.h,
src/f-fill.h, src/f-find.h, src/f-input.h, src/f-log.h,
src/f-minmax.h, src/f-sort.h: New files, for functions extracted
from tree-const.cc.
* src/Makefile.in: Add them to the list of INCLUDES, SOURCES, and
OBJECTS.
* src/f-*.cc: Clean up things a bit by letting the compiler
generate the tree_constant constructor calls.
* src/unwind-prot.h: Include stddef.h, for size_t.
* src/oct-obj.h (Octave_object (int, const tree_constant&)):
New constructor form.
* src/tree-const.cc (find_nonzero_elem_idx): Rewrite to handle 2
and 3 return values.
* src/g-builtins.cc (builtin_find): Check nargout too.
* src/builtins.cc (general_functions): Fix help message for find.
Mon Jul 11 13:36:15 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tc-rep.cc (tree_constant_rep::convert_to_row_or_column_vector):
If already have a row or column vector, return without doing
anything.
Sat Jul 9 01:02:51 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/oct-obj.h (Octave_object): Make it a class, not just a
typedef.
* src/tree-expr.h (tree_function::curr_va_arg_number): Rename from
curr_arg_number.
(tree_function::varargs_ok): Delete unused member variable.
* src/tree-expr.cc (tree_function::octave_va_arg): Increment
cur_va_arg_number before indexing args_passed.
(tree_function::octave_va_start): Set curr_va_arg_number to
num_args_passed, not num_args_passed + 1.
(tree_function::takes_varargs): Call param_list::takes_varargs,
don't just return varargs_ok.
(tree_function::define_param_list): If param_list is not NULL, set
num_named_args and curr_va_arg_number even if function doesn't
take varargs.
* src/tree-expr.cc (tree_identifier::eval (int)): Only pass empty
arg list if evaluating a constant.
(tree_function::eval (int)): Always pass least one arg.
* Makeconf.in (TMP_IF_1): Add `-I../src'.
(TMP_IF_2): Add `-I$(TOPDIR)/src' and `-I$(top_srcdir)/src'.
* src/t-builtins.h, src/variables.h, src/file-io.h, src/f-syl.h,
src/f-svd.h, src/f-schur.h, src/f-rand.h, src/f-qzval.h,
src/f-quad.h, src/f-qpsol.h, src/f-npsol.h, src/f-lsode.h,
src/f-lpsolve.h, src/f-hess.h, src/f-givens.h, src/f-fsqp.h,
src/f-fsolve.h, src/f-eig.h, src/f-dassl.h, src/f-colloc.h,
src/f-balance.h, src/dynamic-ld.h, src/builtins.cc,
src/tree-const.cc, src/file-io.cc, src/f-syl.cc, src/f-svd.cc,
src/f-schur.cc, src/f-rand.cc, src/f-qzval.cc, src/f-qr.cc,
src/f-qpsol.cc, src/f-lu.cc, src/f-lpsolve.cc, src/f-inv.cc,
src/f-ifft.cc, src/f-hess.cc, src/f-givens.cc, src/f-fsqp.cc,
src/f-fft.cc, src/f-expm.cc, src/f-eig.cc, src/f-det.cc,
src/f-colloc.cc, src/f-chol.cc, src/f-balance.cc,
src/dynamic-ld.cc, src/f-dassl.cc, src/f-fsolve.cc,
src/f-lsode.cc, src/f-npsol.cc, src/f-quad.cc, src/tree-expr.h,
src/tc-rep.cc, src/tc-inlines.cc, src/tc-rep.h, src/tree-const.h,
src/g-builtins.cc, src/g-builtins.h, src/tree-expr.cc,
src/variables.cc: Delete nargin in favor of using args.length().
* configure.in: Check for struct exception in math.h.
* src/sysdep.cc (matherr): New function.
Fri Jul 8 15:31:53 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tc-rep.cc: Include arith-ops.h.
(tree_constant_rep::do_scalar_index): Use `invalid', not `illegal'
in messages.
* src/oct-obj.h: Protect contents from multiple inclusion.
* src/tree-const.h, src/tree-expr.h: Don't include Array.h.
* src/parse.y (param_list): Allow ELLIPSIS by itself.
* src/tree-expr.cc (tree_identifier::mark_varargs_only,
tree_identifier::vararg_only): New functions.
(tree_function::eval): Only call define_from_arg_vector if
param_list is non-null and not marked as varargs_only.
* src/f-balance.h, src/f-chol.h, src/f-colloc.h, src/f-dassl.h,
src/f-eig.h, src/f-fsolve.h, src/f-fsqp.h, src/f-givens.h,
src/f-hess.h, src/f-lpsolve.h, src/f-lsode.h, src/f-lu.h,
src/f-npsol.h, src/f-qpsol.h, src/f-qr.h, src/f-quad.h,
src/f-qzval.h, src/f-rand.h, src/f-schur.h, src/f-svd.h,
src/f-syl.h: Include oct-obj.h, not tree-const.h to get
declaration of Octave_object.
* src/f-givens.cc (givens): Handle case of nargout == 0.
Use `invalid', not `illegal' in messages.
* src/f-balance.cc (balance): Likewise.
* src/f-balance.cc (balance): Print warning about two output
arguments for complex-valued case too.
* src/tc-rep.cc: Include arith-ops.h.
Thu Jul 7 20:54:12 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/parse.y (identifier): Add missing semicolon.
(param_list): Ditto.
* src/f-svd.cc (svd): Handle nargout == 0 the same as nargout == 1.
* src/f-schur.cc (schur): Likewise.
* src/f-hess.cc (hess): Likewise.
* src/f-eig.cc (eig): Likewise.
* src/f-syl.cc (syl): Likewise.
* src/f-qzval.cc (qzvalue): Likewise.
* src/f-npsol.cc (npsol): Likewise.
* src/f-qpsol.cc (qpsol): Likewise.
* src/f-givens.cc (givens): Likewise.
* src/f-fsolve.cc (fsolve): Likewise.
* src/f-balance.cc (balance): Likewise.
* src/file-io.cc (process_scanf_format): Likewise.
* src/g-builtins.cc (builtin_balance, builtin_chol, builtin_dassl,
builtin_eig, builtin_fsolve, builtin_fsqp, builtin_lsode,
builtin_max, builtin_min, builtin_npsol, builtin_qpsol,
builtin_quad, builtin_rand, builtin_size, builtin_sort,
builtin_svd, builtin_schur, builtin_syl, builtin_givens,
builtin_hess): Likewise.
* src/tree-const.cc (vector_of_empties, column_max, column_min):
Likewise.
* src/variables.h, src/symtab.h: Include builtins.h for typedefs.
* src/tree-expr.cc(tree_multi_assignment_expression::eval): Rework
handling of undefined values returned from functions.
* src/tree-expr.cc (tree_identifier::is_defined): New function.
(tree_parameter_list::is_defined): New function.
(tree_parameter_list::convert_to_const_vector): Use it to avoid
evaluating undefined objects.
* src/f-balance.cc, src/f-eig.h, src/f-hess.cc, src/f-lu.h,
src/f-rand.cc, src/f-balance.h, src/f-expm.cc, src/f-hess.h,
src/f-npsol.cc, src/f-rand.h, src/f-chol.cc, src/f-expm.h,
src/f-ifft.cc, src/f-npsol.h, src/f-schur.cc, src/f-chol.h,
src/f-fft.cc, src/f-ifft.h, src/f-qpsol.cc, src/f-schur.h,
src/f-colloc.cc, src/f-fft.h, src/f-inv.cc, src/f-qpsol.h,
src/f-svd.cc, src/f-colloc.h, src/f-fsolve.cc, src/f-inv.h,
src/f-qr.cc, src/f-svd.h, src/f-dassl.cc, src/f-fsolve.h,
src/f-lpsolve.cc, src/f-qr.h, src/f-syl.cc, src/f-dassl.h,
src/f-fsqp.cc, src/f-lpsolve.h, src/f-quad.cc, src/f-syl.h,
src/f-det.cc, src/f-fsqp.h, src/f-lsode.cc, src/f-quad.h,
src/f-det.h, src/f-givens.cc, src/f-lsode.h, src/f-qzval.cc,
src/f-eig.cc, src/f-givens.h, src/f-lu.cc, src/f-qzval.h,
src/dynamic-ld.cc, src/dynamic-ld.h, src/file-io.cc,
src/file-io.h, src/t-biultins.cc, src/t-builtins.h,
src/tree-expr.cc, src/tree-expr.h, src/tree-const.cc,
src/tree-const.h, src/tc-inlines.cc, src/tc-rep.cc, src/tc-rep.h,
src/g-builtins.cc, src/g-builtins.h:
Cope with inital round of Octave_object changes.
* src/oct-obj.h: New file for Octave_object typedef.
* src/dynamic-ld.h, src/file-io.h, src/tree-const.h,
src/tree-expr.h: Include it.
* src/Makefile.in (INCLUDES): Add it to the list.
Wed Jul 6 09:28:28 1994 John Eaton (jwe@schoch.che.utexas.edu)
* libocsrc/tree-const.h:
* src/parse.y (maybe_convert_to_ans_assign,
maybe_warn_assign_as_truth_value): Pass tree_expression*, not tree*.
(ans_expression, expression, simple_expr, simple_expr1, title):
Declare as tree_expression_type, not tree_type.
(opt_list): Add missing semicolon.
* src/tc-rep.h, src/tc-rep.cc: New files, extracted from
tree-const.h and tree-const.cc, for the tree_constant_rep class.
Leave most friend functions behind, in tree-const.h.
Don't declare do_binary_op or do_unary_op as friends.
* src/lex.l: Include tree-plot.h and tree-const.h.
* src/variables.cc (takes_correct_nargs): Pass tree_fvc* not tree*.
* src/variables.cc (is_valid_function): Return tree_fvc* not tree*.
Change all callers.
* src/symtab.h, symtab.cc: Change declaration of symbol definition to
be tree_fvc* instead of tree*. Change all callers.
* src/f-dassl.cc (dassl_fcn): Declare as tree_fvc*, not tree*.
* src/f-quad.cc (quad_fcn): Likewise.
* src/f-lsode.cc (lsode_fcn): Likewise.
* src/f-fsolve.cc (fsolve_fcn): Likewise.
* src/f-npsol.cc (npsol_fcn, npsol_constraints): Likewise.
* src/tree-plot.cc: All operations are now on tree_expression types,
not tree types.
* src/tree-expr.h (tree_matrix): Derive from tree_expression, not tree.
* src/tree-expr.h (tree_builtin, tree_function, tree_identifier):
Derive from tree_fvc, not tree.
* src/tree-const.h (class tree_constant): Likewise.
* src/tree-expr.h (is_identifier, is_index_expression,
is_assignment_expression, is_prefix_expression,
mark_for_possible_ans_assign, eval (with args)): Declare in
tree_expression class, not tree class.
* src/tree-expr.h (tree_fvc): New class, derived from
tree_expression, to provide a connection between functions,
variables, and constants.
(is_constant, assign, name, bump_value, max_expected_args,
fcn_file_name, time_parsed, is_system_fcn_file, save): Declare
in tree_fvc class, not in tree class.
* src/tree.h: Simply include tree-expr.h and tree-cmd.h.
* src/tree-expr.h, tree-expr.cc: New files, extracted from tree.h
and tree.cc for classes derived from tree_expression, plus some
helper classes.
* src/tree-cmd.h, tree-cmd.cc: Likewise, for classes derived from
tree_command.
* src/tree.cc (eval (int, int)): Merge with eval (int,
tree_constant*, int, int) by rearranging order of args and using
default arg values. Change all callers.
Tue Jul 5 14:33:33 1994 John Eaton (jwe@schoch.che.utexas.edu)
* doc/Makefile.in (refcard.dvi): Run TeX on $(srcdir)/refcard.tex,
not just refcard.tex.
(refcard-local.tex): Likewise, for the local version.
* src/tree-const.cc (tree_constant_rep::do_index): Check for empty
matrix here.
(tree_constant_rep::do_vector_index) Not here.
Thu Jun 30 09:41:03 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/g-builtins.cc (builtin_shell_command): Only take one
argument and return [status, output].
* src/procstream.cc (procstreambase::close): Return process exit
status.
* src/tree.cc (tree_builtin::eval (int)): Handle new style of
calling text functions.
(tree_builtin::eval (int, int): Likewise.
(tree_builtin::eval (tree_constant*, int, int, int): Likewise.
(tree_identifier::eval (tree_constant*, int, int, int)): Don't
count the output arguments that we create automatically (ans) when
figuring nargout.
(tree_identifier::eval (int)): Likewise.
* src/tree-const.cc: Delete text-style eval() functions.
* src/tree.cc: Ditto.
* src/tree-const.h: Change typedef of Text_fcn to return a pointer
to a tree_constant, and to include the number of output arguments
in the parameter list.
* src/t-builtins.h: Change declarations of all builtin text-style
functions to match.
* src/t-builtins.cc: Change definitions too.
* src/parse.y (word_list): Build an argument_list, not a word_list.
(word_list_command): Create an index_expression, not a
word_list_command.
* src/tree.cc (tree_word_list): Delete unneeded class.
(tree_word_list_command): Likewise.
* src/tc-extras.cc (get_dimensions): For one-arg version, expect
2-element vector or scalar specifying dimensions. Don't simply
use the dimensions of a matrix arg.
Wed Jun 29 09:52:15 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/f-det.cc (determinant): Return 0 if matrix is singular to
machine precision.
* liboctave/dMatrix.cc (Matrix::inverse): Declare rcond as
volatile to prevent optimization of the expression
`rcond + 1.0 == 1.0'.
(Matrix::determinant): Ditto.
(Matrix::solve): Ditto.
* liboctave/CMatrix.cc (ComplexMatrix::inverse): Ditto.
(ComplexMatrix::determinant): Ditto.
(ComplexMatrix::solve): Ditto.
Tue Jun 28 10:53:31 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/utils.cc (default_info_file): Add directory separator when
appending "octave.info".
* src/tree-plot.cc (plot_line_count): Make global.
* src/utils.cc (send_to_plot_stream): If the plot stream is not
open, set plot_line_count to zero.
(close_plot_stream): Likewise, set it to zero when closing the
stream.
* src/parse.y (plot_command): Allow replot without args.
* src/tree-plot.cc (clear_before_plotting): New global variable.
(tree_plot_command::eval): Use it to handle hold on/off.
* src/t-builtins.cc (builtin_hold): New function.
* src/builtins.cc (text_functions): Add it to the list.
Fri Jun 24 11:08:36 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/token.h (plot_tok_type): Add new field, replot.
* src/lex.l (is_keyword): Handle replot here.
* src/parse.y (plot_command): And here.
* src/g-builtins.cc (builtin_replot): Not here.
* src/builtins.cc (general_functions): Or here.
Tue Jun 21 10:47:08 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/g-builtins.cc (builtin_kbhit): New function.
* src/builtins.cc (general_functions): Add it to the list.
* src/tree-const.cc (tree_constant_rep::rows (void)): For strings
and ranges, only return 1 if the string or range is not empty.
Thu Jun 9 20:42:06 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree.cc (tree_builtin::eval (int)): Delete ancient code that
eval()'d the return value.
(tree_builtin::eval (int, int)): Likewise.
(tree_builtin::eval (int, char**, int)): Likewise.
(tree_builtin::eval (tree_constant*, int, int, int)): Likewise.
(tree_function::eval (tree_constant*, int, int, int)): Likewise.
(tree_colon_expression::eval (int)): Likewise.
(tree_unary_expression::eval (int)): Likewise.
(tree_binary_expression::eval (int)): Likewise.
Mon Jun 6 03:48:32 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/file-io.cc (fread_internal): Make it work.
(fwrite_internal): Likewise.
(num_items_remaining): Renamed from get_whats_left(). Don't pass
nr/nc as last arg, simply return the number of items of size that
are left to read.
(get_size_conv): Delete unnecessary function.
* liboctave/dMatrix.cc (Matrix::read): Make it work.
(Matrix::write): Likewise.
* liboctave/dMatrix.h (conversion): Delete unecessary enum.
* src/sysdep.cc: Include <math.h>.
(octave_ieee_init): Cast return value of infinity() and
quiet_nan() to double.
Sun Jun 5 14:35:32 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Makeconf.in (getversion): Get everything between the double
quotes, not just numbers and periods.
* src/tree-const.cc (tree_constant_rep::do_scalar_assignment): Correct
typo in last change.
* src/parse.y: Include tree-plot.h and tree-const.h.
* src/Makefile.in (SOURCES): Delete tc-assign.cc and tc-index.cc
(INCLUDES): Add tree-plot.h.
* src/tree-plot.h: New file. Declare plotting classes here.
* src/tree.h: Not here.
* src/tc-index.cc, tc-assign.cc: Delete unnecessary files.
* src/tc-extras.cc: Include EIG.h
* src/tree-const.cc (tree_constant_rep::tree_constant_rep (RowVector&,
int)): Provide default value for int arg.
(tree_constant_rep::tree_constant_rep (ColumnwVector&, int)): Ditto
(tree_constant_rep::tree_constant_rep (ComplexRowVector&, int)): Ditto
(tree_constant_rep::tree_constant_rep (ComplexColumnwVector&, int)):
Ditto.
(tree_constant_rep::tree_constant_rep (RowVector&)): Delete, now
handled by corresponding two arg constructor.
(tree_constant_rep::tree_constant_rep (ColumnwVector&)): Likewise.
(tree_constant_rep::tree_constant_rep (ComplexRowVector&)): Likewise.
(tree_constant_rep::tree_constant_rep (ComplexColumnwVector&)):
Likewise.
* src/tree-const.cc: Add pragma implementation. Merge in contents of
tc-index.cc and tc-assign.cc so that the pragma interface/pragma
implementation hack will do some good.
* src/tree-const.h: Include mx-base.h, not Matrix.h. Add pragma
interface. Delete unnecessary constructor declarations.
* src/unwind-prot.h, src/unwind-prot.cc (unwind_elem_tag): Rename
from _tag.
(unwind_elem_fptr): Rename from _fptr.
(unwind_elem_ptr): Rename from _ptr.
* NLConst.cc (NLConst::NLConst): Pass vector args by reference.
* src/procstream.h, src/procstream.cc, src/idx-vector.h,
src/idx-vector.cc, src/token.h, src/token.cc, src/unwind-prot.h,
src/unwind-prot.cc, src/symtab.h, src/symtab.cc, src/tree.h,
src/tree.cc, liboctave/Range.h, liboctave/Range.cc,
liboctave/QLD.h, liboctave/QLD.cc, liboctave/ODE.h,
liboctave/ODE.cc, liboctave/Quad.h, liboctave/Quad.cc,
liboctave/Objective.h, liboctave/Objective.cc, liboctave/NPSOL.h,
liboctave/NPSOl.cc, liboctave/NLFunc.h, liboctave/NLFunc.cc,
liboctave/Bounds.h, liboctave/Bounds.cc, liboctave/QP.h,
liboctave/QP.cc, liboctave/NLConst.cc, liboctave/LinConst.cc,
liboctave/LPsolve.cc, liboctave/LP.cc, liboctave/FSQP.cc,
liboctave/FEGrid.cc, liboctave/QPSOL.cc, liboctave/CollocWt.cc,
liboctave/DAEFunc.cc, liboctave/DAEFunc.h, liboctave/DAE.cc,
liboctave/NLEqn.cc, liboctave/ODEFunc.cc, liboctave/QPSOL.h,
liboctave/ODEFunc.h, liboctave/NLP.h, liboctave/NLEqn.h,
liboctave/NLConst.h, liboctave/LinConst.h, liboctave/LPsolve.h,
liboctave/LP.h, liboctave/FSQP.h, liboctave/FEGrid.h,
liboctave/DAE.h, liboctave/CollocWt.h:
Add pragma interface/implementation.
* src/f-svd.cc, src/f-schur.cc, src/f-qr.cc, src/f-lu.cc,
src/f-hess.cc, src/f-det.cc, src/f-chol.cc, src/f-qzval.cc,
src/f-inv.cc, src/f-ifft.cc, src/f-givens.cc, src/f-fft.cc,
src/f-balance.cc, src/f-expm.cc, src/f-fsqp.cc, src/f-syl.cc,
src/xdiv.cc, src/xpow.cc, src/idx-vector.cc, src/pr-output.cc,
src/unwind-prot.cc, src/file-io.cc, liboctave/Bounds.h,
liboctave/CollocWt.h, liboctave/DAE.h, liboctave/EIG.h,
liboctave/FEGrid.h, liboctave/LP.h, liboctave/LPsolve.cc,
liboctave/LinConst.h, liboctave/NLEqn.cc, liboctave/NLEqn.h,
liboctave/NLP.h, liboctave/NPSOL.cc, liboctave/NPSOL.h,
liboctave/ODE.h, liboctave/Objective.h, liboctave/QLD.cc,
liboctave/QP.h, liboctave/QPSOL.h, liboctave/Quad.h:
Instead of including Matrix.h, only include the individual
matrix/vector/etc. header files that are needed.
* liboctave/QLD.cc, liboctave/ODE.cc, liboctave/NLFunc.cc,
liboctave/DAEFunc.cc, liboctave/DAE.cc, liboctave/NLEqn.cc,
liboctave/ODEFunc.cc:
Use 0, not NULL.
* liboctave/mx-inlines.cc: Include Complex.h.
* liboctave/mx-kludge.h: Don't enclose contents in extern "C++".
* liboctave/Matrix.h: Simply include mx-base.h and mx-ext.h.
* liboctave/mx-base.h: New file, includes all basic matrix/vector
header files.
* liboctave/mx-ext.h: New file, includes all extra matrix/vector
related header files.
* liboctave/mx-defs.h: New file, for matrix/vector related
defines. Also provides forward declarations for all matrix/vector
classes.
* liboctave/Makefile.in: Cope with new files.
* liboctave/CmplxAEPBAL.cc, liboctave/CmplxDET.h,
liboctave/CmplxQR.cc, liboctave/CmplxSVD.h, liboctave/dbleDET.cc,
liboctave/dbleHESS.h, liboctave/dbleSCHUR.cc,
liboctave/CmplxAEPBAL.h, liboctave/CmplxHESS.cc,
liboctave/CmplxQR.h, liboctave/dbleAEPBAL.cc, liboctave/dbleDET.h,
liboctave/dbleLU.cc, liboctave/dbleSCHUR.h,
liboctave/CmplxCHOL.cc, liboctave/CmplxHESS.h,
liboctave/CmplxSCHUR.cc, liboctave/dbleAEPBAL.h,
liboctave/dbleGEPBAL.cc, liboctave/dbleLU.h, liboctave/dbleSVD.cc,
liboctave/CmplxCHOL.h, liboctave/CmplxLU.cc,
liboctave/CmplxSCHUR.h, liboctave/dbleCHOL.cc
liboctave/dbleGEPBAL.h, liboctave/dbleQR.cc, liboctave/dbleSVD.h,
liboctave/CmplxDET.cc, liboctave/CmplxLU.h, liboctave/CmplxSVD.cc,
liboctave/dbleCHOL.h, liboctave/dbleHESS.cc, liboctave/dbleQR.h,
liboctave/EIG.h, liboctave/EIG.cc:
New files, extracted from Matrix-ext.cc, in an attempt to allow
effective use of pragma interface/implementation and make
generated code somewhat smaller.
* liboctave/dColVector.cc liboctave/CColVector.cc: Likewise, from
ColVector.{cc,h}.
* liboctave/dRowVector.cc liboctave/CRowVector.cc: Likewise, from
RowVector.{cc,h}.
* liboctave/dMatrix.cc liboctave/CMatrix.cc: Likewise, from
Matrix.{cc,h}.
* liboctave/dDiagMatrix.cc liboctave/CDiagMatrix.cc: Likewise,
from DiagMatrix.{cc,h}.
Fri Jun 3 15:32:53 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Array.h: Include assert.h.
(DiagArray<T>::operator T ()): [! _AIX] Only call get() if i is
also equal to j.
* scripts/rem.m: Allow mixing of scalar/matrix args, but complain
if both args are matrices and the dimensions don't agree.
* src/lex.l (grab_help_text): Correct previous change.
Thu Jun 2 12:08:18 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Matrix.h (conversion): New enum, for binary read/write
functions.
* Matrix.cc (read, write) New functions.
* file-io.cc (feof_internal, ferror_internal, fread_internal,
fwrite_internal, get_size_conv, get_whats_left): New functions.
* g-builtins.cc (builtin_feof, builtin_ferror, builtin_fread,
builtin_fwrite): New functions.
* builtins.cc (general_functions): Add them to the list.
* configure.in: Check for infinity() and quiet_nan().
* sysdep.h (octave_Inf, octave_NaN): New global variables.
* sysdep.cc (octave_ieee_init): New function. Initialize
octave_Inf and octave_NaN.
(sysdep_init): Call it.
* builtins.cc (initialize_builtins): Don't compute Inf and NaN
values here.
Tue May 31 20:06:27 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/variables.cc (identifier_exists): Only return 1 for
variables if they are also defined.
Sun May 29 20:40:55 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/lex.l: Don't declare beginning_of_function as static.
(COMMENT): Delete unnecessary exclusive start state.
(\#, \%): Handle comments directly. Try to be smart about not
returning a newline character when reading a matrix list.
(grab_help_text): Don't put a newline back on the input stream.
* src/parse.y (list1): Set beginning_of_function to zero here.
Wed May 25 03:34:17 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/error.cc (error): If error_state is -2, don't do anything.
If the format string ends in a new line character, strip it, print
the error message, and set the error state to -2.
* src/tree.cc (tree_function::traceback_error): Don't set the
error_state if it is already negative.
* src/tree-const.cc (convert_to_row_or_column_vector): New function.
* src/idx-vector.cc (idx_vector::shorten): New function.
* src/tc-assign.cc (fortran_style_matrix_assignment
(tree_constant&, tree_constant&)): Handle deleting elements by
assignment of `[]'. Use convert_to_row_or_column_vector to handle
conversion to a vector in the case of deleting some elements from
a matrix. Use idx_vector::shorten() to remove unnecessary index
vector elements.
(do_scalar_assignment (tree_constant&, tree_constant*, int)):
Handle assignment of empty matrix.
If converting complex to real, delete old complex value.
(delete_rows (idx_vector&)): If deleting all rows of a column
vector, convert to empty matrix.
(delete_rows (Range&)): Ditto.
(delete_columns (idx_vector&)): If deleting all columns of a row
vector, convert to empty matrix.
(delete_columns (Range&)): Ditto.
* src/tc-extras.cc (column_max (tree_constant*, int, int)):
Use MAX, not MIN when trying to find the biggest scalar.
Likewise, find the complex scalar with the largest, not the
smallest absolute value.
* src/tc-assign.cc (do_matrix_assignment (tree_constant&,
tree_constant_rep::constant_type, tree_constant&): For case of
j_arg == matrix constant, don't negate return value of
indexed_assign_conforms().
* src/user-prefs.cc (commas_in_literal_matrix): New function.
Put functions in alphabetical order.
* src/user-prefs.h (commas_in_literal_matrix): New structure element.
Alphabetize structure elements and lists of functions.
* src/builtins.cc (string_variables): Add commas_in_literal_matrix
to the list.
* src/lex.l (<MATRIX>{SN}*\]{S}*): Pay attention to the value of
usre_pref.commas_in_literal_matrix when deciding whether to insert
a comma after seeing a ']' character.
(handle_identifier): Likewise.
(<MATRIX>{S}+): If commas are required, just eat the spaces.
Tue May 24 19:49:51 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tc-assign.cc (tree_constant_rep::do_matrix_assignment
(tree_constant&, tree_constant*, int)): Handle empty arguments
for two index values.
(tree_constant_rep::do_matrix_assignment
(tree_constant&, tree_constant&)):
Likewise, for single index values.
Mon May 23 01:43:23 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Makefile.in (snapshot, snapshot-version): New targets.
* configure.in: Handle --enable-run-in-place (was easier than
doing the work to parse --run-in-place like Emacs uses).
* acconfig.h: Add #undef for RUN_IN_PLACE.
* Makeconf.in (OCTAVE_HOME): New macro.
* src/Makefile.in (defaults.h): Use it instead of ${prefix}.
* Makeconf.in (OCTAVE_INFO_DIR, OCTAVE_LIB_DIR): New macros.
* src/Makefile.in (defaults.h): Substitute them too.
* src/defaults.h.in (OCTAVE_INFO_DIR): New macro, used if
RUN_IN_PLACE is defined.
(OCTAVE_LIB_DIR): Likewise.
* src/utils.cc (octave_home): Handle RUN_IN_PLACE
(octave_info_dir): Ditto.
(octave_lib_dir): Ditto.
* src/tree-const.cc (tree_constant_rep::diag (void)): For empty
matrix, return empty matrix.
(tree_constant_rep::diag (tree_constant &)): Likewise, regardless
of value of arg.
* scripts/int2str.m: Format as integer, not float.
Don't add trailing new line character.
Sun May 22 22:13:01 1994 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/plot_int.m: When looking for imaginary arguments, check
if any element has an imaginary component, not if all elements
have imaginary components.
Thu May 19 19:46:23 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/parse.y (EXPR_AND_AND, EXPR_OR_OR): New tokens, for
short-circuit logical AND and OR operators.
(simple_expression): Handle new tokens.
* src/lex.l (&&) [SHORT_CIRCUIT_LOGICALS]: Return EXPR_AND_AND.
(||) [SHORT_CIRCUIT_LOGICALS]: Return EXPR_OR_OR.
* src/tree.cc (tree_binary_expression::eval): Handle short-circuit
boolean operators.
(tree_binary_expression::eval_error): Print different messages for
or_or/or and and_and/and.
* src/tree-base.h (tree_expression_type): Add new structure
elements and_and and or_or.
* src/tree-const.cc (tree_constant_rep::is_true): New function.
Tue May 17 17:04:00 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/idx-vector.cc (idx_vector::sort_uniq ()): New function.
* src/tc-assign.cc (tree_constant_rep::delete_rows ()): Use it.
(tree_constant_rep::delete_columns ()): Likewise.
Mon May 16 13:31:33 1994 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/linspace.m: Replace for loop with range operation.
* scripts/logspace.m: Replace for loop with element by element
exponentiation.
Sun May 8 00:49:38 1994 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/lqe.m: Correct comment.
Transpose k before returning.
Fri May 6 00:47:24 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree.cc (quit_loop_now): New function.
(tree_while_command::eval): Use it.
(tree_for_command::eval): Ditto.
* src/tree.cc (tree_for_command::do_for_loop_once): New function.
(tree_for_command::eval): Use it.
Mon May 2 19:45:39 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree.cc (tree_for_command::eval): Handle returning,
breaking, and continuing for case of scalar expression in loop
control statement.
Wed Apr 20 00:38:26 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/lex.l (\[{S}*): Don't return ',' for this match when
convert_spaces_to_comma is true, since that can never be the right
thing to do.
* All Makefile.in files: Set top_srcdir here.
* Makeconf.in: Not here.
* Makeconf.in: Use top_srcdir instead of root_srcdir
* configure.in: Update for autoconf-1.8. Use AC_VERBOSE for
verbose messages. Use AC_WARN and AC_ERROR instead of echo for
warning and error messages. Organize feature tests a bit better.
Use new autoconf macros to check for C++ compiler. Add copyright
notice. Recognize --enable-dld instead of --with-dld since that
seems to be more in line with the intent of the --enable/--with
options for configure scripts. Use new autoconf macros
AC_REVISION and AC_PREREQ. Don't add -Wall to CFLAGS and CXXFLAGS
until after all feature tests are done. Etc.
Fri Apr 15 01:56:20 1994 John Eaton (jwe@schoch.che.utexas.edu)
* acconfig.h: Add #undefs for HAVE_FINITE, HAVE_ISINF, and
HAVE_ISNAN.
* configure.in: Check for floatingpoint.h.
* src/sysdep.cc (sysdep_init): Disable trapping on common
exceptions for 386BSD systems that have floatingpoint.h.
* src/utils.cc: Don't declare ioctl() with prototype.
Sat Apr 9 17:48:07 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tc-assign.cc (tree_constant_rep::fortran_style_matrix_assignment
(tree_constant&, tree_constant&)):
Handle case of M (X) = scalar, where X is a zero-one vector with
only one nonzero element.
* src/tc-assign.cc (tree_constant_rep::do_vector_assign
(tree_constant&, Range&):
Handle case of right hand side being a scalar.
(tree_constant_rep::do_vector_assign (tree_constant&, idx_vector&):
Ditto.
* src/tc-assign.cc (tree_constant_rep::do_matrix_assignment
(int,tree_constant_rep::constant_type)):
Allow assignment of complex scalar too.
(tree_constant_rep::do_matrix_assignment
(tree_constant_rep::constant_type, int)):
Ditto.
* src/tree-const.h (REP_RHS_MATRIX): Initialize nr and nc.
Abort if rhs is not a real or complex matrix.
Wed Apr 6 13:59:37 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Range.cc (Range::nelem_internal): Use an integer, not
a double, for the number of intervals. Avoid possible problems
with extended precision registers on some systems (e.g. x86/Linux).
Mon Mar 28 17:23:18 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/utils.cc (raw_mode): For OCRNL, ONOCR, and ONLRET, check to
see if they are defined before using them instead of checking to
see if NeXT is defined.
* info/terminal.c (terminal_prep_terminal): Check to see if OCRNL
is defined before using it instead of checking to see if NeXT is
defined.
Thu Mar 24 03:21:01 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree.cc (tree_parameter_list::define_from_arg_vector):
New function.
(tree_parameter_list::convert_to_const_vector): Ditto.
(tree_function::eval): Use them instead of trying to do this
in-line.
* src/symtab.h (symbol_record::global_link_context): New stack for
saving linked_to_global flag.
* src/symtab.cc (symbol_record::push_context): Save
linked_to_global too.
(symbol_record::pop_context): And restore it.
Wed Mar 23 16:18:19 1994 John Eaton (jwe@schoch.che.utexas.edu)
* doc/refcard.tex.in: New file.
* doc/Makefile.in: Create refcard.* and refcard-local.* from
refcard.tex.in.
Tue Mar 22 15:23:55 1994 John Eaton (jwe@schoch.che.utexas.edu)
* octave.sh: exec $OCTAVE_HOME/bin/octave.bin, not just
octave.bin.
Thu Mar 17 01:06:10 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/arith-ops.cc (do_binary_op (ComplexMatrix&, Matrix& b)):
Correctly handle element by element left division.
* src/g-builtins.cc (builtin_error): Return without calling error
(and setting error_state) if the message is empty.
* src/help.cc (operators): Correct help message for `.^'.
* src/tc-index.cc (tree_contant_rep::fortran_style_matrix_index):
Preserve vector orientation when indexing with a zero-one vector.
* src/tc-index.cc (tree_constant_rep::do_scalar_index): Handle
indexing a scalar with `0'.
* src/tc-index.cc (tree_constant_rep::do_scalar_index): Handle the
index `:' the same as the index `1'.
Tue Mar 15 17:22:00 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Array.cc: Fix typo in comments about compiler flags.
Wed Mar 9 15:08:21 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Version 1.0.1.
* src/*.h: Use the macro octave_FOO_h instead of _FOO_h to protect
against multiple inclusion.
* liboctave/*.h: Likewise.
* liboctave/*.h: Surround contents of files in extern "C++" { }.
Tue Mar 8 18:06:54 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tc-index.cc (tree_constant_rep::do_vector_index (const
tree_constant&) const): Don't crash if matrix is empty.
* scripts/norm.m: Return empty matrix for empty argument.
Mon Mar 7 23:34:44 1994 John Eaton (jwe@schoch.che.utexas.edu)
* doinstall.sh: chmod new directories to 755.
Sat Mar 5 13:15:10 1994 John Eaton (jwe@schoch.che.utexas.edu)
* bsd-math/log1p.c: Declare finite as returning int, not double.
* bsd-math/finite.c (finite): Add return type.
Thu Mar 3 14:42:00 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/DiagMatrix.cc (operator *): Provide definitions for
DiagMatrix * DiagMatrix, ComplexDiagMatrix * ComplexDiagMatrix,
ComplexDiagMatrix * DiagMatrix, and DiagMatrix * ComplexDiagMatrix.
* liboctave/ColVector.cc (operator >>): Provide definitions for
real and complex column vectors.
* liboctave/RowVector.cc (operator >>): Provide definitions for
real and complex row vectors.
Wed Mar 2 18:00:47 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Array.h (DiagArray::Proxy::operator & ()): Provide
function body.
Tue Mar 1 13:18:35 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree-const.cc (tree_constant::load (istream&)): Don't skip
past first type keyword if not global.
(tree_constant::load (istream&, tree_constant_rep::constant_type)):
Allocate storage for reading complex scalar.
Sun Feb 20 14:17:47 1994 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/menu.m: Don't fail on input that is empty or not a
scalar.
* Makefile.in (DISTFILES): Distribute ChangeLog.[0-9].
* src/lex.l (reset_parser): Don't resynch line number to command
history number if reading a script file.
Thu Feb 17 01:36:19 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Version 1.0 released.
* src/file-io.cc (fopen_file_for_user): Improve error message.
(fopen_internal): Likewise.
Wed Feb 16 02:21:05 1994 John Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Try harder to find finite, isnan, and isinf.
Use m4 `dnl' comments, not shell `#' comments.
* src/file-io.cc (file_io_get_file): New function.
(fgets_internal): Use it instead of trying to do this in line.
(frewind_internal, fseek_internal, ftell_internal, do_printf,
do_scanf): Likewise.
* (do_scanf): Allow file name as string for fscanf.
* (procss_scanf_format): Delete unused argument `args'. Delete
unused local variable `arg_type'. Don't complain if we can't
store the result of a requested conversion. Only return
successfully if a conversion actually occurs, even if we are not
storing the value.
Sun Feb 13 13:32:03 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.83 released.
* Array.h (DiagArray): Move inline definitions of get() and set()
before use by other inline functions.
Sat Feb 12 14:15:45 1994 John Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Check for g77 last. Even if it is ever actually
released, it probably won't be stable for quite a while.
* MAKEINFO.PATCH: New file.
* Makefile.in (DISTFILES): Distribute it.
* liboctave/Matrix.cc (operator + (Complex, const Matrix&)):
Make it work.
(operator - (Complex, const Matrix&)): Ditto.
(operator * (Complex, const Matrix&)): Ditto.
(operator / (Complex, const Matrix&)): Ditto.
Fri Feb 11 00:03:39 1994 John Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Check for strerror too.
* configure.in: When saving CFLAGS as XCFLAGS and then restoring
the value, quote the RHS.
* src/g-builtins.cc (builtin_clc): Do the dirty work to clear the
screen here instead of using rl_clear_screen to avoid printing
prompt unnecessarily.
Thu Feb 10 00:26:32 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/utils.cc: Add all the cruft that the autoconf manual
suggests for including dirent.h.
* info/terminal.c (terminal_prep_terminal): [HAVE_TERMIOS_H &&
NeXT]: Don't use OCRNL, as someone says NeXT's termios.h doesn't
have it.
* configure.in (GCC_IEEE_FP_FLAG): Correct check for ix86 Linux.
Don't try to check for CC == gcc.
Add GCC_IEEE_FP_FLAG to CFLAGS while checking for IEEE FP
functions finite, isnan, and isinf.
* readline/rldefs.h: Make definition of HAVE_POSIX_SIGNALS
conditional on definition of _POSIX_VERSION, not HAVE_TERMIOS_H.
Wed Feb 9 02:41:32 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree.cc (tree_function::octave_va_start): Rename from
va_start to avoid conflict with va_start macro.
(tree_function::octave_var_arg): Likewise, rename from va_arg.
* src/g-builtins.cc (builtin_va_arg): Call octave_va_arg for the
current function instead of va_arg.
(builtin_va_start): Likewise, for octave_va_start.
* Version 0.82.1.
* doc/Makefile.in (clean): Also remove octave.in, octave.rd,
octave.ins, and octave.rds.
* src/t-builtins.cc (load_variable): Make it work for all
combinations of loading global or local variables when the
variable to be loaded is already a global variable, local
variable, a function, or even undefined.
Tue Feb 8 00:33:09 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.82 released.
* liboctave/mx-kludge.cc (operator + (KL_MAT_TYPE, KL_MAT_TYPE)):
For an empty matrix with one nonzero dimension, be sure to return
a result of the same size.
(operator - (KL_MAT_TYPE, KL_MAT_TYPE)): Ditto.
(product (KL_MAT_TYPE, KL_MAT_TYPE)): Ditto.
(quotient (KL_MAT_TYPE, KL_MAT_TYPE)): Ditto.
Mon Feb 7 01:30:19 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Array.h, liboctave/array.cc (DiagArray): Back off on
indexing via Proxy class changes for AIX systems to avoid gcc (or
possibly AIX assembler?) bug.
* src/tree-const.cc (tree_constant_rep::maybe_resize (int,
force_orient)): Don't abort for a max index of zero.
* liboctave/Matrix.h (class RowVector, friend double operator *
(const RowVector&, const ColumnVector&)): Add missing const in
declaration.
* liboctave/Matrix.cc (Matrix::fill (val, r1, c1, r2, c2)): Set nc
to cols(), not rows().
(ComplexMatrix::fill (double val, r1, c1, r2, c2)): Likewise.
(ComplexMatrix::fill (Complex val, r1, c1, r2, c2)): Likewise.
* All source files: To match the documenation, refer to function
files, not M-files. Rename functions and variables that refer to
_m_file_, mfile, or mf to refer to _fcn_file, ffile, or ff.
Sun Feb 6 19:08:26 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/parse.y (yyerror): Don't crash if a parse error happens and
the current input line is NULL.
Sat Feb 5 18:53:04 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/file-io.cc (initialize_file_io): Don't use variable names
that start with `_'.
* src/file-io.cc (class file_info): Likewise.
Fri Feb 4 01:15:59 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/builtins.cc (general_functions): In usage message for fopen,
use `Valid' instead of `Legal'.
* src/file-io.cc (do_printf): Use `invalid' instead of `illegal'
in error message.
(do_scanf): Likewise.
* src/mappers.cc (atanh): Use correct formula.
Thu Feb 3 22:08:40 1994 John Eaton (jwe@schoch.che.utexas.edu)
* doc/refcard.tex: New file.
* doc/Makefile.in (all): Make refcard.ps.
(DISTFILES): Distribute refcard.tex, refcard.dvi, and refcard.ps.
* src/tree-const.cc (any_element_is_negative): Delete function.
(any_element_less_than): New function.
(any_element_greater_than): Ditto.
(tree_constant_rep::mapper): Use struct elements lower_limit,
upper_limit, and can_return_complex_for_real_arg to properly
handle functions like acos, asin, atanh, and acosh.
* src/builins.h (struct Mapper_fcn): Rename neg_arg_complex to
can_return_complex_for_real_arg. New elements, lower_limit and
upper_limit.
(struct builtin mappers functions): Rename neg_arg_complex to
can_return_complex_for_real_arg. New elements, lower_limit and
upper_limit. Delete elements nargin_max and nargout_max.
* src/variables.cc (install_builtin_mapper_function): Handle new
struct elements can_return_complex_for_real_arg, lower_limit, and
upper_limit. Don't use nargin_max and nargout_max -- they are
the same for all mapper functions.
Wed Feb 2 05:06:56 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Matrix.h: Don't include values.h.
* liboctave/Matrix-ext.cc: Include float.h
(DET::value_will_overflow): Use DBL_MAX, not MAXDOUBLE.
(ComplexDET::value_will_overflow): Likewise.
(DET::value_will_underflow): Use DBL_MIN, not MINDOUBLE.
(ComplexDET::value_will_underflow): Likewise.
* src/tree.cc: Include limits.h, not values.h.
(tree_builtin::max_expected_args): Use INT_MAX, not MAXINT.
* configure.in: If compiling on an ix86, set GCC_IEEE_FP_FLAG to
-mieee-fp. We should no longer require the modified crt0 code on
Linux systems in order to get IEEE functions.
* Makeconf.in (GCC_IEEE_FP_FLAG): Substitute value.
(ALL_CFLAGS, UGLY_ALL_CFLAGS, ALL_CXX_FLAGS, UGLY_ALL_CXX_FLAGS,
ALL_LDFLAGS): Use it.
Tue Feb 1 22:30:46 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/builtins.cc (install_builtins): Make SEEK_SET, SEEK_CUR, and
SEEK_END constants.
* src/tree-plot.cc (tree_subplot_using::print): Only check column
number against max if max is greater than 0.
Mon Jan 31 15:59:31 1994 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/strcmp.m: Correctly handle empty strings.
* src/parse.y (input): Recognize lone simple_list and simple_list
followed by error and '\n'.
Fri Jan 28 00:20:30 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.81 released.
* src/octave.cc (clean_up_and_exit): Call cleanup_tmp_files() here
too.
* configure.in: Check for atexit and on_exit.
* src/octave.cc: Use HAVE_ATEXIT and HAVE_ON_EXIT (instead of
just checking to see if sun is defined) to decide whether to
define atexit as on_exit.
(main): Don't try to call atexit if it's missing and we don't have
on_exit either.
Thu Jan 27 22:16:48 1994 John Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Check for gethostname and sys/utsname.h.
* utils.cc (gethostname): Steal replacement from bash. Provide
definition if it looks like it's missing and we have
sys/utsname.h.
* liboctave/Array.h (DiagArray): Define non-const indexing
functions here.
* liboctave/Array.cc (DiagArray): Not here.
* liboctave/Array.h (DiagArray::Proxy): New class to handle
non-const reference indexing. Allows different action if indexing
on left side of assignment operator.
* src/octave.cc (main): Call initialize_pager(),
initialize_readline(), and install_signal_handlers() before trying
to read startup files.
* src/octave.cc (input_from_startup_file): New global flag.
(execute_startup_files): Set it to 1 before reading startup files.
* src/parse.y (func_def_2): If input_from_startup_file, don't try
to compare file name and function name.
Wed Jan 26 14:39:27 1994 John Eaton (jwe@schoch.che.utexas.edu)
* readline/rldefs.h: Make better use of autoconf defines.
Tue Jan 25 17:19:19 1994 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Matrix.cc (ComplexMatrix (DiagMatrix)): Make sure off
diagonal elements are zero.
(ComplexMatrix (ComplexDiagMatrix): Likewise.
(Matrix (DiagMatrix): Likewise.
Fri Jan 21 17:43:11 1994 John Eaton (jwe@schoch.che.utexas.edu)
* flibs.sh: Recognize libraries that match `/*.a'.
Thu Jan 20 18:12:01 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.80.1.
Wed Jan 19 14:48:27 1994 John Eaton (jwe@schoch.che.utexas.edu)
* libcruft/odepack/stode.f: Don't try to `RETURN 0'. This causes
lsode to fail, at least with Sun's f77.
* src/tree-const.cc (tree_constant_rep::load): Delete string
returned from extract_keyword.
* src/t-builtins.cc (builtin_load): Likewise.
* src/variables.cc (extract_keyword): Return new storage, not
static buffer.
* src/t-builtins.cc (builtin_save): If saving a named list of
variables, use is_globally_visible to decide whether to mark
variables in the current symbol table as global.
Tue Jan 18 11:57:03 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.80 released.
* doc/Makefile.in (install): Delete commands for installing
liboctave.info instead of trying to comment them out.
* liboctave/Array.cc: Allow users to compile with
-fexternal-stemplates and USE_EXTERNAL_TEMPLATES defined to
generate their own .o files with new types.
* Makeconf.in (includedir): Install include files in
$prefix/include/octave by default.
* liboctave/Makefile.in (TEMPLATE_SRC): New macro.
(install): Install files listed in $(TEMPLATE_SRC) too.
* info/search.h: Conditionally declare stricmp and strnicmp.
* info/search.c: Conditionally define stricmp and strnicmp.
* config.h.in: Add undefs for HAVE_STRICMP and HAVE_STRNICMP.
* configure.in: Check for stricmp and strnicmp too.
* doc/Makefile.in: For now, don't format or try to install the
liboctave manual.
Don't distribute formatted copies of liboctave manual.
Mon Jan 17 01:10:54 1994 John Eaton (jwe@schoch.che.utexas.edu)
* doc/Makefile.in (clean): Remove all index files.
* src/Makefile.in (defaults.h): Depend on Makefile too.
* doc/Makefile.in (conf.texi): New rule for making conf.texi from
conf.texi.in.
* doc/conf.texi.in: New file.
* doc/octave.texi: Include conf.texi to get VERSION, OCTAVE_HOME,
and other variables that need to be set depending on the
configuration.
* Makefile.in (DISTFILES): Don't distribute PLOTTING. Current
plotting info is in the Texinfo docs.
Sat Jan 15 15:43:34 1994 John Eaton (jwe@schoch.che.utexas.edu)
* config.sub: New file, from libg++-2.5.2.
* Makefile.in: Distribute config.sub.
* configure.in: Use config.sub to validate system types. If it
fails, continue with target_host_type and canonical_host_type set
to unknown. Leave target_host_type set to any alias given as the
TARGET argument to configure.
* readline/rldefs.h: If ultrix and HAVE_SGTTY_H, avoid Posix
terminal driver.
* configure.in: If configuring for ultrix, check for sgtty first.
If not found, go ahead and check for Posix terminal driver.
* configure.in: Don't try to do anything special for readline on
NeXT systems.
* Makeconf.in: Define rules for making .d files here.
liboctave/Makefile.in: Not here.
src/Makefile.in: Or here.
* liboctave/Matrix.h (all Matrix/Vector operator = functions):
Simply call the base class operator =, then return *this.
(class ColumnVector): Declare RowVector a friend class, so it can
access the private constructor for the transpose operator.
(class RowVector): Likewise, for ColumnVector.
(class ComplexColumnVector): Likewise, for CommplexRowVector.
(class ComplexRowVector): Likewise, for ComplexColumnVector.
Numerous formatting cleanups.
Thu Jan 13 13:17:47 1994 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.79.90.
* builtins.cc: Include missing-math.h.
* src/missing-math.h: Provide declarations for acosh, asinh,
atanh, and gamma whether they are actually missing or not, because
they are not part of the standard math.h, and the g++/libg++
installation no longer provides declarations for them.
* src/sighandlers.h (RETSIGTYPE): Define here.
(BADSIG): Likewise.
(sig_handler): Likewise.
* src/g-builtins.cc: Include sighandlers.h
Don't define RETSIGTYPE, BADSIG, or sig_handler here.
* src/octave.cc: Or here.
Wed Jan 12 16:12:27 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/g-builtins.cc: Don't check nargin/nargout in *_options
functions.
* src/f-qpsol.cc, src/f-quad.cc, src/f-lsode.cc, src/f-fsolve.cc,
src/f-dassl.cc, liboctave/QPSOL.cc, liboctave/Quad.cc,
liboctave/ODE.cc, liboctave/NLEqn.cc, liboctave/DAE.cc:
Similar changes for these classes/functions as the following
changes for src/f-npsol.cc and liboctave/NPSOL.cc:
* src/f-npsol.cc (npsol_opts): New static variable to hold Octave's
current idea of npsol options.
(npsol): Call nlp.copy (npsol_opts) after creating NPSOL object.
(npsol_option_table): New static list of options for npsol.
(print_npsol_option_list): New function.
(do_npsol_option): New function.
(npsol_options): Make it work.
* liboctave/NPSOL.cc (NPSOL_options): New class.
* (NPSOL): Also derive from NPSOL_options.
* (minimize): Call pass_options_to_npsol before calling npsol.
* (NPSOL::option): No longer works. Print error message instead.
* (NPSOL::set_default_options): Now a member of NPSOL_options class.
* src/utils.cc: If missing, declare strcasecmp, strncasecmp.
* (almost_match): Add new argument to do case-insensitive matches.
* (keyword_almost_match): New function to match a string against a
list of keywords.
* liboctave/NLP.h (NLP): Add destructor and copy constructor.
* configure.in: Check for strcasecmp and strncasecmp.
* config.h.in: Add #undefs for HAVE_STRCASECMP and STRNCASECMP.
* src/strcasecmp.c, src/strncase.c: New files, from glibc.
* src/Makefile.in (SOURCES, OBJECTS): List them.
* src/builtins.cc (general_functions): Improve usage message for
the *_options functions.
(print_usage): New arg, just_usage with default value of 0.
If nonzero, don't print info about where to find additional help.
* src/Makefile.in (INCLUDES): Add error.h.
(SOURCES): Add error.h.
* src/tree.cc (tree_identifier::parse_m_file): call reset_parser
before calling yyparse ().
* src/tc-extras.cc (eval_string): Likewise.
Don't save previous symbol table. That is handled by the
unwind protect.
* src/lex.l (reset_parser): Don't unconditionally call yyreset.
Add a couple of comments.
(yywrap): Always return 1, not 0.
(yy_flex_alloc, yy_flex_realloc, yy_flex_free): #if 0 out.
* src/utils.cc (raw_mode): Only complain about stdin not being a
tty if we are really interactive.
* src/octave.cc (main): End startup message with endl to ensure
flushing before other output.
* Turn of readline's blink_matching_paren feature if not
interactive, or if reading from a file specified on the command
line.
* src/octave.cc (main): Set the symbol table context just before
calling reset_parser in the main loop.
* src/lex.l (reset_parser): Not here.
* src/input.cc (octave_gets): Declare static.
(octave_read): Also handle echoing input if not using readline.
* Makefile.in (DISTFILES): Add SENDING-PATCHES to the list.
Mon Jan 10 14:30:13 1994 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/corrcoef.m, scripts/fortran_vec.m, scripts/kurtosis.m,
scripts/ols.m, scripts/skewness.m, scripts/cov.m, scripts/gls.m,
scripts/mahalanobis.m, scripts/pinv.m: New script files from Kurt
Hornik (hornik@neuro.tuwien.ac.at) and the Department of
Probability Theory and Statistics TU Wien, Austria.
Sun Jan 9 01:11:05 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/g-builtins.cc (builtin_fsqp_options): If FSQP_MISSING is
defined, don't call fsqp_options; just print usage message.
(builtin_npsol_options): Likewise, for npsol_options.
(builtin_qpsol_options): Likewise, for qpsol_options.
* src/builtins.cc (general_functions): Provide different usage
message for fsqp_options depending on whether FSQP_MISSING is
defined. Likewise for npsol_options and qpsol_options.
Sat Jan 8 16:45:57 1994 John Eaton (jwe@schoch.che.utexas.edu)
* libcruft/misc/dostop.c: Include config.h.
* src/variables.cc (extract_keyword): Use ostrstream instead of
fixed length buffer. For keywords with string values, return
value in static buffer.
* src/t-builtins.cc (builtin_load): Handle new argument list for
extract_keyword. Handle possiblity of load_variable setting
error_state.
* src/tree-const.cc (tree_constant_rep::load): Handle new argument
list for extract_keyword.
Fri Jan 7 13:20:47 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/f-eig.cc (builtin_eig_2): Rename from builtin_eig.
* src/f-fsolve.cc (builtin_fsolve_2): Rename from builtin_fsolve.
* src/f-inv.cc (builtin_inv_2): Rename from builtin_inv.
Thu Jan 6 12:29:41 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree-base.h (tree::save): Add optional argument `precision'.
* src/tree-const.cc (tree_constant::save): Ditto.
(tree_constant_rep::save): Ditto.
* src/symtab.cc (symbol_def::save): Ditto.
(symbol_record::save): Ditto.
(symbol_table::save): Ditto.
* src/t-builtins.cc (builtin_save): Pass user_pref.save_precision
to symbol table save functions.
* src/builtns.cc (string_variables): Add save precision to thelist.
(install_builtins): Initialize it.
* src/user-prefs.cc (set_save_precision): New function.
* src/user-prefs.h (user_pref.save_precision): New data element.
* liboctave/Matrix-ext.cc: Provide correct prototypes for dgeesx
and zgeesx.
* (SCHUR::init): Don't declare a dummy_select function pointer,
just pass `(void *) 0' instead, since the dummy argument is never
supposed to be used anyway.
* src/input.cc (initialize_readline): Cast command_completer to
CPPFunction, not Function, now that readline has more than one
function typedef.
* Add extern declaration for free_undo_list ().
* Replace readline source from GDB with readline source from bash.
This allows paren matching.
Wed Jan 5 01:20:26 1994 John Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Also check for sys/select.h.
* liboctave/RowVector.cc (ComplexRowVector::operator *): Complete
function body. Put code in-line rather than making a call to the
BLAS routine zdotu to avoid having to cope with the various ways
that Fortran compilers might translate this.
* src/input.cc (operate_and_get_next): New function, from bash.
(initialize_readline): Bind operate_and_get_next to C-O here.
* src/input.cc (command_completer, command_generator):
Declare static here.
* srs/input.h (command_completer, command_generator):
Not extern here.
* g-builtins.cc (builtin_warranty): Change copyright info.
* octave.cc (verbose_usage): Likewise.
(main): Likewise.
Mon Jan 3 15:49:41 1994 John Eaton (jwe@schoch.che.utexas.edu)
* src/fnmatch.c, src/fnmatch.h: New files for pattern matching
from the GNU C library.
* src/Makefile.in: Add them to the appropriate lists.
* src/t-builtins.cc (builtin_save): Use fnmatch to do pattern
matching instead of using regular expressions.
(builtin_clear): Likewise.
(glob_pattern_p): New function.
(builtin_save): Print error message and return if only given one
argument that contains globbing characters.
* src/symtab.cc (symbol_record::save): Don't attempt to save
undefined variables.
Wed Dec 29 02:55:08 1993 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/rank.m: Also need to compute SVD when nargin == 2.
Correct usage message.
Wed Dec 15 01:44:18 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/f-lpsolve.cc, src/f-fsqp.cc, src/f-npsol.cc, src/f-qpsol.cc,
src/f-lsode.cc, src/f-dassl.cc, src/f-fsolve.cc, src/f-quad.cc:
New stub options functions, XXX_options, and XXX_options_2 (for
future dld use), where XXX is lpsolve, fsqp, npsol, etc.
* src/f-lpsolve.h, src/f-fsqp.h, src/f-npsol.h, src/f-qpsol.h,
src/f-lsode.h, src/f-dassl.h, src/f-fsolve.h, src/f-quad.h:
Declare XXX_options functions.
* src/builtins.cc (builtin_general_functions): Add new XXX_options
functions to the list of builtin functions.
* src/g-builtins.cc: Define builtin_XXX_options functions.
* src/g-builtins.h: Declare them.
* scripts/tzero.m: Add missing comma in fprintf call.
Tue Dec 14 00:24:35 1993 John Eaton (jwe@schoch.che.utexas.edu)
* libcruft/quadpack/*.f: Modify to handle user-requested
termination from inside the user-supplied function.
* src/f-quad.cc (quad_user_function): Set quad_integration_error
if an error is encountered in the user-supplied function.
* liboctave/Quad.h (quad_integration_error): New global variable.
* liboctave/Quad.cc (user_function): Handle
quad_integration_error, and error flag for modified Quadpack
functions.
* src/tree.cc (tree_simple_assignment_expression::eval): Check
error status after calling convert_to_const_vector () on the
argument list.
(tree_index_expression::eval): Ditto.
* src/tree.cc (tree_argument_list::convert_to_const_vector):
If an error is encountered while evaluating an element of the
list, print an error message including the element number.
* liboctave/ODE.cc (integration_error): New private data member.
(ODE constructors): Initialize it to zero.
(ODE::integrate (double)): Reset it to zero before each
integration step.
(lsode_f): Treat empty vector returned from user-supplied function
as an error.
* src/f-lsode.cc (lsode_user_function): Return empty vector if
error is encountered in user-supplied function. Don't jump to top
level on error.
* libcruft/odepack/lsode.f (lsode): Return with istate = -13 on
error from user supplied subroutine.
* libcruft/odepack/lsode.f (lsode): Handle extra argument returned
from user-supplied function.
* libcruft/odepack/stode.f (stode): Likewise.
* libcruft/odepack/prepj.f (prepj): Likewise.
Wed Dec 8 01:30:57 1993 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/DAE.cc (integration_error): New private data member.
(DAE constructors): Initialize it to zero.
(DAE::integrate (double)): Reset it to zero before each
integration step.
(dassl_f): Treat empty vector returned from user-supplied function
as an error.
* src/f-dassl.cc (dassl_user_function): Return empty vector if
error is encountered in user-supplied function. Don't jump to top
level on error.
* liboctave/NPSOL.cc (npsol_objective_error): New global variable.
(npsol_objfun): Set to zero before calling user-supplied function.
Check after calling user-supplied function.
Set mode to -1 on error.
(npsol_confun): Set mode to -1 on error.
(npsol declaration): Declare args for user-supplied functions.
* src/f-npsol.cc (npsol_objective_function): If an error is
encountered in the calculation of the objective function, set
npsol_objective_error to 1.
(npsol_constraint_function): Treat empty vector returned from
user-supplied function as an error.
* liboctave/Array.cc (*::checkelem): Correct bounds checking. On
error, return uninitialized value of type T. This avoids placing
an extra requirement on the class that can be used as an array
element.
(*::operator ()): Likewise.
Mon Dec 6 07:24:49 1993 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/NLEqn.cc (hybrd1 declaration): Declare args for
user-supplied fuction.
(hybrj1): Likewise.
(hybrd1_fcn): Treat return of empty vector from user supplied
function as an error by setting iflag to -1.
(hybrj1_fcn): Likewise.
(solve): Handle case of info < 0 returned from hybrd1.
* src/f-fsolve.cc (fsolve_user_function): Don't jump to top level
on error in user-supplied function. Treat empty vector returned
from user-supplied function as error.
(hybrd_info_to_fsolve_info): Translate -1 (failure in evaluation
of user-supplied function) to -2.
* scripts/perror.m (fsolve case): Handle -2.
* info/error.c (program_name): Initialize to info, not NULL.
* info/session.c (initialize_info_session): Don't exit if term is
too dumb or too small to use info. Return int status instead.
* info/info.h (TERM_TOO_SMALL): New macro.
* src/t-buitlins.cc (try_info): Check return value from
initialize_info_session ().
* liboctave/Array.cc (DiagArray<T>::DiagArray (int n, const T& val)):
Set number of rows and columns to n, not 0.
Sat Dec 4 14:01:41 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/lex.h (YY_INPUT): Undefine if defined, then always define
the way we want.
(YY_FATAL_ERROR): Likewise.
* src/lex.l (yywrap): Declare static.
(yy_flex_alloc): New function, so we don't have to link with
libfl.a when using flex 2.4.x.
(yy_flex_realloc): Ditto.
(yy_flex_free): Ditto.
Thu Dec 2 19:23:43 1993 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/*.m: Add copying notice to script files.
* src/input.cc (command_generator): Return copy of matching string.
* src/input.cc (command_generator): Correctly delete array of
character strings.
* src/symtab.cc (symbol_table::save): Likewise.
* src/utils.cc (pathstring_to_vector): Likewise.
* src/utils.cc (get_m_file_names): When reallocating vector of
strings, delete original vector of pointers, but not the strings
they point to.
Tue Nov 30 12:36:41 1993 John Eaton (jwe@schoch.che.utexas.edu)
* liboctave/RowVector.cc, liboctave/ColVector.cc,
liboctave/DiagMatrix.cc, liboctave/Matrix.cc,
liboctave/Matrix-ext.cc: Massive rewrite to cope with new
derivation scheme.
* liboctave/Matrix.h: Include Array.h, and derive Matrix,
ComplexMatrix, etc. from Array<double>. Derive Complex
versions from Array<Complex>. Delete declarations of functions
now inherited from the Array classes.
* Include mx-kludge.h with appropriate #defines in each class that
needs it.
* liboctave/Matrix.cc: Include mx-kludge.cc with appropriate
#defines in each class that needs it.
* liboctave/Makefile.in (INCLUDES): Add Array.h, MArray.h, and
mx-kludge.h.
(SOURCES): Add Array.cc.
(EXTRAS): Add MArray.cc and mx-kludge.cc.
* liboctave/mx-kludge.h, liboctave/mx-kludge.cc: New files to
implement the MArray functionality with macros until g++ can
handle the MArray stuff.
* liboctave/MArray.h, liboctave/MArray.cc: New files for generic
arrays with simple math functions for like-types. This won't
quite work with g++ yet, so it's not used anywhere.
* liboctave/Array.h, liboctave/Array.cc: New files for generic
arrays.
* liboctave/mx-inlines.cc: Add const for const arguments.
* src/file-io.cc (file_info): Rename class from File_info.
(file_info::operator =): Fix memory leak by deleting old name
and mode before saving new. Don't do copy if source and
destination are the same.
* src/tree.cc (tree_matrix::eval): Plug memory leak.
* src/tree.cc (tree_builtin::tree_builtin): Check to see that nm,
not my_name, is non-NULL before saving it.
* src/tree.cc (tree_identifier::eval, tree_gobal_command::eval):
After performing the assignment, delete the identifier created
for temporary asssignment since the destrucotr for
tree_simple_assignment_expression doesn't do it for us.
* src/tree.cc (tree_function::stash_m_file_name): Delete file_name
before saving it.
(tree_function::stash_function_name): Likewise, for fcn_name.
* src/lex.l, src/lex.h: Make quote_is_transpose globally visible.
* src/parse.y (param_list): Use it, and recognize empty parameter
lists here.
* src/parse.y (simple_expr1): Recognize empty matrices here.
(matrix): Not here.
* src/arith-ops.cc (do_binary_op): The matrix product and quotient
functions aren't class member functions now.
* src/tc-index.cc, src/tc-assign.cc, src/symtab.cc,
src/tree-plot.cc, src/idx-vector.cc, src/tree-const.cc:
Call ::error, not just error, since g++ now complains about not
being able to find a non-hidden member function by that name.
* src/tree-const.cc: Call ::real and ::imag, not just real and imag,
since g++ now complains about not being able to find non-hidden
member functions by those names.
* src/tree-const.cc (tree_constant_rep::force_numeric): Handle case
of zero-length strings.
* src/tree-const.cc (tree_constant_rep::convert_to_str): Null
terminate strings created from scalars.
* src/tc-index.cc (tree_constant_rep::fortran_style_matrix_index): Use
data(), not fortran_vec().
* src/idx-vector.cc (idx_vector::idx_vector): Likewise.
* src/SLStack.cc: Move function definitions here.
* src/SLStack.h: From here. Include SLStack.cc if not using
external templates.
* src/unwind-prot.h: Move class declaration here.
* src/unwind-prot.cc: From here.
* src/xdiv.h, src/xpow.h, src/variables.h, src/utils.h,
src/user-prefs.h, src/t-builtins.h, src/sighandlers.h,
src/pr-output.h, src/pager.h, src/octave-hist.h, src/mappers.h,
src/input.h, src/help.h, src/gripes.h, src/g-builtins.h,
src/f-syl.h, src/f-svd.h, src/f-schur.h, src/f-rand.h,
src/f-qzval.h, src/f-quad.h, src/f-qr.h, src/f-qpsol.h,
src/f-npsol.h, src/f-lu.h, src/f-lsode.h, src/f-lpsolve.h,
src/f-inv.h, src/f-ifft.h, src/f-hess.h, src/f-givens.h,
src/f-fsqp.h, src/f-fsolve.h, src/f-fft.h, src/f-expm.h,
src/f-eig.h, src/f-det.h, src/f-dassl.h, src/f-colloc.h,
src/f-chol.h, src/f-balance.h, src/error.h, src/dynamic-ld.h,
src/builtins.h, src/arith-ops.h, src/tree-const.h, src/tree.h,
src/token.h, src/symtab.h, src/procstream.h, src/idx-vector.h,
src/file-io.h, src/tree-base.h, src/unwind-prot.h, src/Stack.h,
liboctave/LinConst.h, liboctave/FEGrid.h, liboctave/NLEqn.h,
liboctave/NLConst.h, liboctave/LPsolve.h, liboctave/LP.h,
liboctave/FSQP.h, liboctave/DAEFunc.h, liboctave/DAE.h,
liboctave/CollocWt.h, liboctave/Bounds.h, liboctave/Objective.h,
liboctave/ODEFunc.h, liboctave/NLFunc.h, liboctave/Range.h,
liboctave/Quad.h, liboctave/QP.h, liboctave/QPSOL.h,
liboctave/QLD.h, liboctave/NPSOL.h, liboctave/NLP.h,
liboctave/f77-uscore.h, liboctave/lo-error.h,
liboctave/Matrix.h:
Don't use #pragma interface.
* src/tc-index.cc, src/tc-assign.cc, src/symtab.cc,
src/procstream.cc, src/gripes.cc, src/f-syl.cc, src/f-svd.cc,
src/f-schur.cc, src/f-rand.cc, src/f-quad.cc, src/f-qr.cc,
src/f-qpsol.cc, src/f-npsol.cc, src/f-lu.cc, src/f-lsode.cc,
src/f-lpsolve.cc, src/f-inv.cc, src/f-ifft.cc, src/f-hess.cc,
src/f-givens.cc, src/f-fsqp.cc, src/f-fsolve.cc, src/f-fft.cc,
src/f-eig.cc, src/f-det.cc, src/f-dassl.cc, src/f-colloc.cc,
src/f-chol.cc, src/f-balance.cc, src/t-builtins.cc,
src/octave-hist.cc, src/input.cc, src/g-builtins.cc,
src/xdiv.cc, src/xpow.cc, src/user-prefs.cc, src/unwind-prot.cc,
src/tree-plot.cc, src/token.cc, src/tc-extras.cc, src/sysdep.cc,
src/sighandlers.cc, src/pr-output.cc, src/pager.cc,
src/mappers.cc, src/idx-vector.cc, src/help.cc, src/f-qzval.cc,
src/f-expm.cc, src/error.cc, src/dynamic-ld.cc, src/builtins.cc,
src/arith-ops.cc, src/variables.cc, src/utils.cc,
src/tree-const.cc, src/file-io.cc, src/tree.cc,
liboctave/sun-utils.cc, liboctave/mx-inlines.cc,
liboctave/RowVector.cc, liboctave/ColVector.cc,
liboctave/DiagMatrix.cc, liboctave/Matrix.cc,
liboctave/Matrix-ext.cc, liboctave/Quad.cc, liboctave/ODE.cc,
liboctave/LPsolve.cc, liboctave/FSQP.cc, liboctave/DAE.cc,
liboctave/DAEFunc.cc, liboctave/QP.cc, liboctave/Objective.cc,
liboctave/ODEFunc.cc, liboctave/NLFunc.cc, liboctave/NLConst.cc,
liboctave/LP.cc, liboctave/lo-error.cc, liboctave/Range.cc,
liboctave/QPSOL.cc, liboctave/NPSOL.cc, liboctave/NLEqn.cc,
liboctave/Matrix.cc, liboctave/Matrix-ext.cc,
liboctave/LinConst.cc, liboctave/FEGrid.cc,
liboctave/DiagMatrix.cc, liboctave/CollocWt.cc,
liboctave/ColVector.cc, liboctave/Bounds.cc:
Don't use #pragma implementation.
* src/lex.l, src/parse.y, src/procstream.cc, src/gripes.cc,
src/f-syl.cc, src/f-svd.cc, src/f-schur.cc, src/f-rand.cc,
src/f-quad.cc, src/f-qr.cc, src/f-qpsol.cc, src/f-npsol.cc,
src/f-lu.cc, src/f-lsode.cc, src/f-lpsolve.cc, src/f-inv.cc,
src/f-ifft.cc, src/f-hess.cc, src/f-givens.cc, src/f-fsqp.cc,
src/f-fsolve.cc, src/f-fft.cc, src/f-eig.cc, src/f-det.cc,
src/f-dassl.cc, src/f-colloc.cc, src/f-chol.cc,
src/f-balance.cc, src/t-builtins.cc, src/octave-hist.cc,
src/input.cc, src/g-builtins.cc, src/xdiv.cc, src/xpow.cc,
src/user-prefs.cc, src/unwind-prot.cc, src/tree-plot.cc,
src/token.cc, src/tc-extras.cc, src/sysdep.cc,
src/sighandlers.cc, src/pr-output.cc, src/pager.cc,
src/mappers.cc, src/idx-vector.cc, src/help.cc, src/f-qzval.cc,
src/f-expm.cc, src/error.cc, src/dynamic-ld.cc, src/builtins.cc,
src/arith-ops.cc, src/variables.cc, src/utils.cc,
src/tree-const.cc, src/file-io.cc, src/tree.cc: If HAVE_CONFIG_H
is defined, include config.h.
* config.h.in, acconfig.h: New files
* Makefile.in (DISTFILES): Add them to the list.
* Makeconf.in (root_srcdir): Define.
(INCFLAGS): Clean up.
(UGLY_ALL_CFLAGS): New macro.
(UGLY_ALL_CXXFLAGS): Likewise.
(UGLY_ALL_LDFLAGS): Likewise.
* configure.in: Convert to generate config.h.
Substitute root_srcdir in Makefiles.
Use AC_DEFINE(foo, 1) instead of DEFS="$DEFS -Dfoo=1".
If using g++ 2.5 or later, define USE_EXTERNAL_TEMPLATES.
Use UGLY_DEFS for what would have been substited in DEFS, for
those cases when we need DEFS instead of config.h.
Tue Nov 16 04:59:19 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/f-expm.cc, src/f-givens.cc, src/f-qzval.cc, src/f-syl.cc:
Include f77-uscore.h here.
* liboctave/ColVector.cc, liboctave/Matrix.cc,
liboctave/Matrix-ext.cc, liboctave/RowVector.cc: Move declarations
for Fortran functions here.
* liboctave/Matrix.h: From here. Don't include f77-uscore.h here.
Mon Nov 15 04:03:34 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/tc-extras.cc (min): For two-arg versions, use error(), not
FAIL.
(max): Likewise.
* src/idx-vector.cc (checkelem): Likewise.
* liboctave/Matrix.h, liboctave/Matrix.cc, liboctave/RowVector.cc,
liboctave/ColVector.cc, liboctave/DiagMatrix.cc,
liboctave/Matrix-ext.cc, liboctave/Bounds.cc, liboctave/DAE.cc,
liboctave/CollocWt.cc, liboctave/FEGrid.cc, liboctave/LinConst.cc,
liboctave/ODE.cc, liboctave/NLEqn.cc: Don't abort or exit on
errors. Instead print some message by calling the function
pointed to by current_liboctave_error_handler and then return.
* liboctave/lo-error.cc: New file, for liboctave error handling
stuff.
Sun Nov 14 23:28:12 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/utils.cc (default_path): Handle OCTAVE_PATH from the
environment like TeX handles TEXINPUTS. If the path starts with
`:', prepend the standard path. If it ends with `:' append the
standard path. If it begins and ends with `:', do both (which is
useless, but the luser asked for it...).
(octave_lib_dir): Plug memory leak.
Sat Nov 13 02:41:24 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/symtab.h (symbol_record::context): New data member, to allow
recursive functions to work.
* src/symtab.cc (symbol_record::push_context): New function
(symbol_record::pop_context): Ditto.
(symbol_table::pop_context): Ditto.
(symbol_table::push_context): Ditto.
* src/tree.cc (tree_function::eval): If call_depth is > 1, push
symbol table context and add unwind protect to pop it on exit or
error.
(pop_symbol_table_context): New function for unwind protect.
* configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of
AC_UNISTD_H.
* src/lex.l, src/f-quad.cc, src/f-rand.cc, src/f-lpsolve.cc,
src/f-fsqp.cc, src/f-fsolve.cc, src/f-det.cc, src/f-dassl.cc,
src/f-colloc.cc, src/utils.cc, src/variables.cc, src/tree.cc,
src/tree-const.cc, src/tc-extras.cc, src/sysdep.cc, src/symtab.cc,
src/octave-hist.cc, src/pr-output.cc, src/input.cc,
src/g-builtins.cc, src/f-det.cc, src/f-inv.cc, src/file-io.cc:
Convert most calls to message() to calls to warning() or error()
instead.
* src/f-npsol.cc (npsol): Don't try to create the linear
constraint object before checking array sizes.
Fri Nov 12 04:36:12 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/tc-inlines.cc (is_one_zero): New function.
* src/tc-assign.cc: Everywhere we check for is_zero_one, also
check for is_one_zero. Some people write ranges that go in
decreasing order...
* src/tc-index.cc: Likewise.
* src/tc-inlines (index_check (Range&, int&, char*)): Eliminate
second arg -- there is no need to return the max value of the
range. Correctly compute and check the minimum value.
* src/tc-index.cc: Change all callers, and check the max value
there.
* src/tc-assign.cc: Likewise.
* src/tc-assign.cc (do_vector_assign): Handle assignment of empty
matrix for int, idx_vector, and Range cases.
(do_matrix_assign): Likewise, for cases when one of the indices is
a colon and the other is an int, idx_vector, or Range.
* liboctave/Range.h (Range): Rename private data members rng_foo
instead of just _foo.
* liboctave/Range.cc: Change names where used.
* liboctave/Range.cc (max): Return correct value even when the
elements in the range don't line up exactly with the limit.
(min): Likewise.
(sort): New function.
* src/tc-assign.cc (delete_row (int)): New function.
(delete_rows (idx_vector&)): Ditto.
(delete_rows (Range&)): Ditto.
(delete_column (int)): New function.
(delete_columns (idx_vector&)): Ditto.
(delete_columns (Range&)): Ditto.
* src/tree-const.h (is_empty): Don't try checking rows and columns
if type is magic_colon or unknown. Return false instead.
(is_zero_by_zero): New function.
* src/idx-vector.cc (sort): New function.
(intcmp): New static function, for sorting.
Thu Nov 11 02:31:13 1993 John Eaton (jwe@schoch.che.utexas.edu)
* scripts/menu.m: Update to use new va_start() and va_arg()
functions.
* src/g-builtins.cc (builtin_va_arg): Rename from
builtin_get_next_arg.
(builtin_va_start): New function.
* src/builtins.cc (builtin_general_functions): Fix up list.
* src/tree.cc (tree_function::va_arg): Rename from get_next_arg.
(tree_function::va_start): New function.
* src/tree.h (tree_function::num_named_args): New data member.
* src/tree.cc (tree_function::define_param_list): Set it.
(tree_function::eval): Unwind-protect it.
Wed Nov 10 03:37:44 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree.cc (tree_identifier::assign): Also check to make sure
that the symbol record is defined since symbol_record::is_variable
may return true even if the record is undefined.
* src/variables.cc (link_to_global_variable): Don't try to copy a
NULL_TREE_CONST.
* src/tree-const.cc (tree_constant_rep::matrix_value): If the
current value is a scalar, return 1x1 matrix.
* src/tc-assign.cc (tree_constant_rep::check_vector_assign):
Handle case of zero size LHS.
Clean up formatting of some error messages.
* src/lex.l ({EL}): Recognize ... when not at end of line.
* src/octave.cc (curr_function): New global variable.
* src/g-buitlins.cc (builtin_get_next_arg): New function.
* src/builtins.cc (builtin_general_functions): Add it to the list.
* src/parse.y (param_list1): Handle ... at end of parameter list.
Abort parse on error.
(ELLIPSIS): New token, for variable argument lists.
* src/tree.h (tree_function): Add varargs_ok, args_passed,
num_args_passed, and curr_arg_number data members to handle
variable argument lists.
(tree_parameter_list::marked_for_varargs): New data member.
* src/tree.cc (tree_function::takes_varargs): New function.
(tree_function::get_next_arg): New function.
(tree_parameter_list::mark_varargs): New function.
(tree_parameter_list::takes_varargs): New function.
(tree_function::eval): Set curr_function, args_passed, and
num_args_passed for use by get_next_arg.
Mon Nov 8 14:22:34 1993 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.79 released.
* src/builtins.cc (builtin_text_functions): Correct usage message
for who.
* scripts/dgram.m: New function, from R. Bruce Tenison
(btenison@eng.auburn.edu).
* scripts/dlqe.m: Ditto.
* scripts/dlqr.m: Ditto.
* scripts/c2d.m: Ditto.
* src/tree.cc (tree_identifier::name): Make it const.
(tree_builtin::name): Ditto.
(tree_parameter_list::name): Ditto.
(tree_word_list::name): Ditto.
* src/symtab.cc (symbol_table::save): Delete list of names after
saving.
* src/symtab.h (symbol_table): Move #defines outside of class
declaration.
Sun Nov 7 07:03:12 1993 John Eaton (jwe@schoch.che.utexas.edu)
* Makeconf.in (CXX): Don't set from C++. Do set from @CXX@, which
is determined by configure. Don't set C++FLAGS.
* src/tree.cc: (tree_function::eval (int, int)): Simply call
eval (tree_constant *, int, int, int) with nargin = 1 and args =
NULL_TREE_CONST instead of duplicating most of that function in place.
* src/parse.y (func_def2): Reset id_name after renaming identifier.
Clear id_name from top level symbol table before defining identifier.
Sat Nov 6 04:38:57 1993 John Eaton (jwe@schoch.che.utexas.edu)
* configure.in: When checking for g++, set CXX, not GXX.
Merge min changes from Bruce Tenison (btenison@eng.auburn.edu) and
make the corresponding changes for max.
* src/tc-extras.cc (min (ComplexMatrix&, ComplexMatrix&)): New
function.
(max (ComplexMatrix&, ComplexMatrix&)): Ditto.
(column_min): Handle complex args and two return values.
(column_max): Likewise.
* liboctave/Matrix.cc (row_min_loc): New function.
(row_max_loc): New function.
(column_min_loc): Ditto.
(column_max_loc): Ditto.
Fri Nov 5 03:12:55 1993 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.78.
* src/octave.h (clean_up_and_exit): Change form of declaration for
GCC 2.5.x and beyond.
* src/tree.cc (tree_identifier::eval): Correctly handle printing
of identifier tags and conversion to assignment to `ans'.
* src/parse.y (maybe_convert_to_ans_assign): Simplify.
For identifiers, defer decision about making an ans assignment
until evaluation time since identifiers can be undefined at parse
time, and we can't tell what to do until we know what the def is.
* src/tree.cc (tree_identifier::mark_for_possible_ans_assgin): New
function.
* src/tree.cc (tree_index_expression::mark_for_possible_ans_assign):
New function.
* src/tree.h (tree_identifier): Add new private data,
maybe_do_ans_assign.
* src/t-builtins.cc (builtin_who): Major overhaul. Support long
listings.
(print_symbol_info_line): New function.
(print_long_listing): Ditto.
(maybe_list): Ditto.
* src/user-prefs.cc (sv_editor): New function for builtin variable
EDITOR.
* src/octave-hist.cc (do_edit_history): Use user_pref.editor, not
just the EDITOR environment variable.
* src/user-prefs.cc (ignore_function_time_stamp): New function for
new builtin variable ignore_function_time_stamp.
* src/variables.cc (symbol_out_of_date): Use value of new
user_pref.ignore_function_time_stamp to decide whether to check to
see if a file has changed.
* src/tree.h (tree_function): Add new private data, system_m_file.
* src/builtins.cc (string_variables): Add EDITOR and
ignore_function_time_stamp EDITOR to the list.
(bultin_general_functions): Add is_global to the list.
* src/t-builtins.cc (builtin_clear): Make it work with new
variable scoping rules.
(builtin_document): Likewise, using new document_symbol()
function.
(builtin_save): Likewise. Allow regular expression arguments.
Don't save builtin variables that are read-only.
* src/utils.cc (octave_home): Don't declare static.
(octave_lib_dir): Likewise.
(octave_info_dir): Likewise.
(default_editor): New function.
* src/tree.cc (tree_builtin::def): Delete function.
(tree_identifier::def): Likewise.
(tree_identifier::symrec): Likewise.
* src/tree.h (tree_builtin): Store name of function, not pointer
to symbol record.
* src/user-prefs.cc (warn_assign_as_truth_value): Lookup
"warn_assign_as_truth_value", not "user_pref.warn...".
* src/tree-base.h (def): Delete unused virtual function.
(is_prefix_expression): New virtual function.
(mark_for_possible_ans_assign): Likewise.
(is_system_m_file): Likewise.
(stash_m_file_name): No longer needs to be virtual.
(stash_m_file_time): Likewise.
* src/octave.cc (octave_Complex_error_handler): Define, to keep
errors in the Complex class from aborting Octave. This is only a
temporary fix, I hope.
(main): Install it.
(initialize_globals): Get default editor.
(main): Call initialize_symbol_tables to do that instead of
creating them directly in main.
* src/variables.cc (document_symbol): New function.
(initialize_symbol_tables): Likewise.
(install_builtin_mapper_function): Likewise.
(install_builtin_text_function): Likewise.
(install_builtin_general_function): Likewise.
(install_builtin_variable): Likewise.
(install_builtin_variable_as_function): Likewise.
(bind_nargin_and_nargout): Likewise.
(bind_builtin_variable): Likewise.
(link_to_global_variable): Likewise.
(link_to_builtin_variable): Likewise.
(link_to_builtin_or_function): Likewise.
(force_link_to_function): Likewise.
(is_globally_visible): Likewise.
(is_builtin_variable): Likewise.
* src/tree.cc (print_as_scalar): Avoid trying to print row vectors
on one line.
* src/builtins.cc (install_buitlins): Simplify installation of
builtin functions using new install_builtin_*_function functions.
Ditto for using bind_builtin_variable for installing variables.
* src/tree.h (tree_global_command): New class.
* src/tree.cc (tree_global_command::*): Implement new class to
make global command executable.
* src/parse.y (global_decl): Make global an executable statement.
* src/parse.y (func_def2): Rework to match new way of handling
global variables and function names in the symbol table.
Mark functions as `system' or not.
Don't use id_to_define.
If m-file and function names disagree, rename function to match
m-file name.
* src/tree.cc (tree_identifier::rename): New function.
* src/parse.cc, src/parse.h (id_to_define): Delete unused global
variable.
* src/varables.cc (builtin_string_variable): Fix to match new
rules for global and builtin variables.
(builtin_real_scalar_variable): Likewise.
* src/tree.cc (tree_identifier::assign): Make it work with new
rules for global variables.
(tree_identifier::parse_m_file): Likewise.
(tree_identifier::do_lookup): Likewise.
* src/tree.cc (mark_as_system_m_file): New function.
(is_system_m_file): Ditto.
* src/tree.cc (clear_symbol_table): New function, to be used in an
unwined_protect element for clearing function symbol tables on
exit or error.
* src/tree.cc (tree_function::eval): Simplify using
bind_nargin_and_nargout.
Clear symbol table on exit or error with unwind_protect.
* src/tree.cc (tree_prefix_expression::is_prefix_expression): New
function.
* src/g-builtins.cc (builtin_is_global): New function.
* src/lex.l (lookup_identifier): Now that global variable binding
has been fixed, only look for symbols in the current symbol table.
Really. I mean it this time.
* src/symtab.cc: Complete overhaul, to make global variables work
a bit more reasonably.
Mon Nov 1 15:03:39 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/Matrix.h (DiagMatrix::rows): Return nr, not len.
(ComplexDiagMatrix::rows): Ditto.
* src/Matrix.h (DiagMatrix::cols): Return nc, not len.
(ComplexDiagMatrix::cols): Ditto.
(DiagMatrix::columns): Ditto.
(ComplexDiagMatrix::columns): Ditto.
* liboctave/DiagMatrix.cc (DiagMatrix::row): Make it work for
square case.
(DiagMatrix::column): Likewise.
(ComplexDiagMatrix::row): Likewise.
(ComplexDiagMatrix::column): Likewise.
* liboctave/DiagMatrix.cc (DiagMatrix::operator <<): Print spaces
between elements.
(ComplexDiagMatrix::operator <<): Likewise.
Fri Oct 29 15:32:12 1993 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.77.1.
* src/symtab.cc (symbol_record::alias): Don't copy formal_param or
forced_global attribute.
* src/symtabl.cc (symbol_table::bind_globals): Don't bind to
global symbol unless it has forced_global attribute set.
* src/tree.cc (print_as_scalar): New function.
(tree_identifier::eval): Use it.
(tree_simple_assignment_expression::eval): Likewise.
(tree_multi_assignment_expression::eval): Likewise.
* src/lex.l (is_keyword): Give better error message for attempts
to define nested functions.
* src/parse.y (global_decl): Return a command_list to execute
(this makes assignments in global declarations executable).
* src/tree.cc (tree_for_command): Handle line and column info in
constructors and for error messages.
(tree_while_command): Ditto.
(tree_if_command): Ditto.
(tree_break_command): Ditto.
(tree_continue_command): Ditto.
(tree_return_command): Ditto.
(*::eval_error): Only print messages if error_state > 0.
(various): Only need to check that error_state is non-zero before
calling eval_error().
* src/parse.y: Handle line and column information for FOR WHILE IF
ELSEIF ELSE BREAK CONTINUE and FUNC_RET tokens.
* src/lex.l: Likewise.
* src/octave.cc (parse_and_execute): Reset parser before starting
new parse.
* src/tree-plot.cc (various): Check error_state in many more
places, and issue more meaningful error messages.
* src/tree-const.cc (maybe_resize): Don't call
jump_to_top_level() on errors.
(tree_constant_rep (Range)): Likewise.
* src/g-builtins.cc (builtin_error): Use error(), not
print_if_string() to print error messages.
* src/tree-const.cc (print_if_string): Delete unused function.
* src/tc-assign.cc (various): Check error_state after calls to
maybe_resize().
* src/tc-index.cc (various): Always check the state of idx_vectors
after trying to create them.
* src/tc-assign.cc (various): Likewise.
* src/idx-vector.cc: Use 0, not NULL.
Don't include stdlib.h.
(initialized): New data member, set nonzero if the idx_vector has
been properly initialized.
Never call jump_to_top_level () if initialization fails.
Add operator void *(), so we can test the state of an idx_vector
with `if (vector)'.
* src/pager.cc: Explicitly initialize pager_buf to NULL.
* src/tree-base.h: Move includes ahead of other definitions.
* liboctave/NLEqn.cc (NLEqn::NLEqn (const Vector&, const NLFunc)):
Initialize n from xvec, not x.
Mon Oct 25 18:01:12 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/user-prefs.cc (sv_info_file): New function.
* src/user-prefs.h (user_pref): Add info_file to the list.
* src/t-builtins.cc (try_info): Use it instead of
DEFAULT_INFO_FILE.
* src/utils.cc (default_info_file): New function.
(octave_info_dir): Likewise.
* src/defaults.h.in (DEFAULT_INFO_FILE): Delete unnecessary
definition since we figure out what it should be in utils.cc now.
* src/Makefile.in (defaults.h): Don't substitute DEFAULT_INFO_FILE.
* src/Makeconf.in (DEFAULT_INFO_FILE): Delete definition.
* src/octave.cc (info_file): New global variable.
(initialize_globals): Call default_info_file () to initialize it.
(--info-file): New command line option.
* src/builtins.cc (string_variables): Add INFO_FILE to the list.
(install_builtins): Define it.
* info/filesys.c (compress_suffixes): Choose gunzip for .gz files.
Sat Oct 23 17:46:09 1993 John Eaton (jwe@schoch.che.utexas.edu)
* Version 0.77 released.
* src/Makefile.in (INCFLAGS): Don't include info or dld
directories.
* dynamic-ld.cc: Include dld/dld.h, not just dld.h.
* t-buitlins.cc: Include info/info.h, info/dribble.h, and
info/terminal.h, not just info.h, dribble.h, and terminal.h.
* src/t-builtins.cc (builtin_help): New option, -i, for invoking
info browser. If -i is not given, just do what we used to do, but
point to help -i as a way to get additional information.
* builtins.cc (print_usage): New function.
* g-builtins.cc (all builtins): Call print_usage to get usage message.
* t-builtins.cc (all builtins): Likewise.
Fri Oct 22 15:56:16 1993 John Eaton (jwe@schoch.che.utexas.edu)
* Cholesky changes from R. Bruce Tenison (btenison@eng.auburn.edu):
* src/f-chol.cc, src/f-chol.h: New files for the Cholesky
Factorization.
* src/Makefile.in (SOURCES, OBJECTS, DLD_OBJECTS): Add to lists.
* src/g-builtins.cc (builtin_chol): New function.
* src/g-builtins.h: Declare it.
* liboctave/Matrix-ext.cc (CHOL, ComplexCHOL): New classes.
* libcruft/lapack: dpotrf.f, zpotrf.f, dpotf2.f, zpotf2.f: New
files.
* libcruft/blas: dsyrk.f, zherk.f: New files.
Fri Oct 22 14:04:16 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/g-builtins.cc (builtin_schur): Fourth arg for DLD_BUILTIN is
schur, not hess.
* scripts/dare.m: Correct usage of fprintf.
* src/utils.cc (raw_mode): Only complain about stdin not a tty if
interactive or forced interactive.
Thu Oct 21 17:00:57 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/builtins.cc (install_builtins): Try harder to make
initialization of NaN work. Make note about possible fixes if it
still doesn't work.
* src/utils.cc (raw_mode): [HAVE_TERMIOS_H] and [HAVE_TERMIO_H]
Don't set TAB3 since it doesn't seem necessary and some systems
don't have it by this name.
[HAVE_SGTTY_H] To be consistent, don't set XTABS here either.
* src/error.c (error): Call flush_output_to_pager before printing
error message.
(panic): Likewise, before aborting.
* src/symtab.cc (symbol_record::undefine): Delete unused function.
(symbol_table::undefine): Likewise.
* src/symtab.cc (clear): Never delete symbol records from the
table. Only delete the definitions. This makes clear and
undefine equivalent, so we don't need them
* src/tree.cc (tree_function::eval): Call symbol_table::clear, not
symbol_table::undefine.
* src/t-builtins.cc (builtin_clear): Only clear global symbols if
we are at the top level.
* src/parse.y (CLEAR): Delete token.
(word_list_command): Remove code to handle CLEAR as special case.
(expect): Only 19 now.
* src/lex.l (handle_identifier): Remove special code for clear.
It's ok to use it in a function body now.
* src/t-builtins.cc: Include extern "C" declarations for Info stuff.
(builtin_help): If given an argument, try to get help directly
from info file first. If that fails, do as before.
(help_syms_list): New function:
(simple_help): New function.
(try_info): New function.
(help_from_list): New function.
* src/defaults.h.in (DEFAULT_INFO_FILE): Define new macro.
* Makeconf.in: Set value of DEFAULT_INFO_FILE.
* Makeconf.in (INSTALL_PROGRAM): Add definition.
* Makefile.in (SUBDIRS): Add info directory.
(info): New target.
* configure.in: Add autoconf macros to handle info configuration.
* info/Makefile.in: Major changes to make it work with Octave's
Makeconf file, etc. The default action is now to build a
libinfo.a file.
* info/error.c: New file. Move error functions here from info.c.
* info/signals.c (clear_info_signal_handler): New function, useful
if info is used directly in another program.
* info/termdep.h: Handle termios too.
* info/terminal.c (terminal_prep_terminal): Handle termios.
* (terminal_unprep_terminal): Likewise
* info/session.c (initialize_info_session): Add arg to make
clearing the screen conditional. Useful if we want to call
index_entry_exists() first before displaying anything.
Change all callers.
* info/session.c (finish_info_session): New function.
* info/session.c (dispatch_error): Change message to include info
about how to get help and how to quit.
* info/info.c (index_search_p): New flag.
(--index-search): New option, like apropos, but search the indices
and display the first node found.
* info/indices.c (do_info_index_search): New function, modified
from info_index_search to allow searching the index for a string
without prompting for it.
(info_index_search): Just call do_info_index_search.
(index_entry_exists): New function, to allow us to find out if
there is an index entry for a given string without actually
displaying anything.
* info: New directory, containing source for GNU info browser.
Tue Oct 19 00:14:33 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/octave-hist.cc (input_from_tmp_history_file): New global flag.
(do_edit_history): Protect and set it.
(do_run_history): Likewise.
* src/parse.y (func_def2): Use it to see that input is coming from
a temporary file. This means that we shouldn't exit when we're
done reading it, and we should treat it just as if the input were
coming from the keyboard.
* variables.cc (force_global): Force aliasing so it will happen
even if the symbol record is undefined.
* src/lex.l (lookup_identifier): Simplify
* src/lex.l (reset_parser): Reset error_state here.
* src/octave.cc (main): Not here.
Mon Oct 18 14:27:02 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree-const.cc: Delete constructor for tree_constant from
String.
* In src: tree.h, mappers.h, unwind-prot.h, parse.h, file-io.h,
arith-ops.h, tree-base.h, tree-const.h, g-builtins.h,
idx-vector.h, builtins.h, dynamic-ld.h, xdiv.h, xpow.h,
pr-output.h, input.h, symtab.h, utils.h: Avoid including files
unnecessarily.
* In src: tc-inlines.cc, mappers.cc, variables.cc, arith-ops.cc,
tree.cc, tree-const.cc, g-builtins.cc, file-io.cc, idx-vector.cc,
tc-assign.cc, tc-index.cc, builtins.cc, dynamic-ld.cc, xdiv.cc,
xpow.cc, pr-output.cc, tc-extras.cc, input.cc, symtab.cc,
utils.cc: Sprinkle liberally with const.
* In src: f-syl.cc, f-svd.cc, f-schur.cc, f-rand.cc, f-qzval.cc,
f-quad.cc, f-qr.cc, f-qpsol.cc, f-npsol.cc, f-lu.cc,
f-lsode.cc, f-lpsolve.cc, f-inv.cc, f-ifft.cc, f-hess.cc,
f-givens.cc, f-fsqp.cc, f-fsolve.cc, f-fft.cc, f-expm.cc,
f-eig.cc, f-det.cc, f-dassl.cc, f-colloc.cc, f-balance.cc:
Add const qualifier to tree-constant arg.
Sat Oct 16 12:22:24 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/tree-const.h, src/tree-const.cc: Add const qualifier to
constructor arguments passed by reference.
Pass Complex arguments by const reference instead of by value.
* liboctave/Matrix.h, liboctave/Matrix.cc, liboctave/ColVector.cc,
liboctave/RowVector.cc liboctave/DiagMatrix.cc: Pass Complex
arguments by const reference instead of by value.
Wed Oct 13 14:13:29 1993 John Eaton (jwe@schoch.che.utexas.edu)
* src/utils.cc (decode_prompt_string): ctime returns time_t, which
might not be a long.
* src/variables.cc (identifier_exists): Only return non-zero if
the name has a definition.
* src/f-npsol.cc (npsol): Call error(), not message(), to print
error messages.
(linear_constraints_ok): Likewise.
(nonlinear_constraints_ok): Likewise.
* src/f-qpsol.cc (qpsol): Don't try to create the linear
constraint object before checking array sizes. Wouldn't exception
handling be nice?
Call error(), not message(), to print error messages.
Check to ensure that the bounds on linear constraints are
vectors.
* src/lex.l (lookup_identifier): Don't bind global variables
immediately in loops or conditionals, even at the top level.
Sun Oct 10 8:48:00 1993 John Eaton (jwe@schoch.che.utexas.edu)
* README.doc: New file.
* Makefile.in (doc-dist): New target.
* doc/Makefile.in (FORMATTED): New macro.
(doc-dist): New target.
* src/tree.cc (tree_identifier::eval): Don't print anything if an
error is encountered.
(tree_simple_assignment_expression::eval): Likewise.
* src/tc-assign.cc (do_matrix_assignment): Handle resizing
correctly when indices are (:,range), (:,matrix), (range,:), or
(matrix,:) and the lhs is empty or undefined.
Tue Oct 5 04:02:37 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.76 released.
* src/octave.cc (main): Print usage message if we are given more
than one extra argument on the command line.
Delay printing startup message until just before setting the toplevel
jump context.
* src/lex.h (DO_COMMA_INSERT_CHECK): Delete unused macro.
* src/lex.l (handle_identifier): New function.
({IDENT}/{S}*=, {IDENT}{S}*): Use it instead of duplicating code.
(do_comma_insert_check): Use yyunput instad of returning original
character count.
Call directly instead of using DO_COMMA_INSERT_CHECK macro.
Mon Oct 4 08:06:10 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.75.4.
* src/tree-const.cc (tree_constant_rep::eval ()): Avoid calling
rows() and columns() for things like magic_colon.
Sun Oct 3 19:39:33 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
Changes to add line and column info to run-time error messages:
* src/tree.cc (tree_identifier, tree_prefix_expression,
tree_postfix_expression, tree_simple_assignment_expression,
tree_multi_assignment_expression, tree_colon_expression,
tree_index_expression): Modify constructors to allow line and
column information to be stored.
(abort_on_undefined): Delete (now) unnecessary static variable.
(all eval() functions): If error_state, return immediately.
(tree_matrix::eval ()): Call error and return tree_constant()
instead of jumping to top level on error.
(tree_identifier::parse_m_file ()): When starting to read an
M-file, initialize current_input_column to 1, not 0.
(tree_identifier::eval_undefined_error ()): Improve error message
with line and column info if it is available. Don't abort to top
level on errors.
(tree_function::traceback_error ()): New function.
(tree_function::eval ()): Don't jump to top level on errors.
Call traceback_error if there is an error evaluating the command
list.
* src/tree.cc (tree_prefix_expression::eval_error ()): New function.
(tree_postfix_expression::eval_error ()): Ditto.
(tree_unary_expression::eval_error ()): Ditto.
(tree_binary_expression::eval_error ()): Ditto.
(tree_simple_assignment_expression::eval_error ()): Ditto.
(tree_multi_assignment_expression::eval_error ()): Ditto.
(tree_colon_expression::eval_error ()): Ditto.
(tree_index_expression::eval_error ()): Ditto.
* src/tree.cc (tree_function::stash_function_name ()): New function.
* src/parse.y (FCN): Use it.
* src/lex.l: Return line and column info for many (but not all)
tokens.
* src/parse.y: Handle token values with the token class defined in
token.cc.
(check_end ()): New function.
(end_error ()): Improve error messages by including line and
column info.
* src/arith-ops.cc (lots of functions): Don't jump to top level on
errors.
* src/tree.cc (tree_unary_expression::eval ()),
tree_binary_expression::eval ()): Handle error condition here.
* src/gripes.cc (gripe_nonconformant): Add additional form of this
function to allow message to include dimensions. Change most
callers to use new form
* src/octave.cc: Initialize column counter to 1, not 0.
(main): Reset error_state before evaluating each top level
command.
* src/tree-plot.cc (tree_plot_command::eval ()): If error_state,
return immediately.
* src/tree-const.cc (do_binary_op ()): Return tree_constant() instead
of jumping to top level on errors.
(do_unary_op): Likewise.
(tree_constant_rep::eval ()): If error_state, return immediately.
Convert 1x1 matrices to scalars.
* src/tc-assign.cc (tree_constant_rep::do_scalar_assignment ()):
Don't jump to top level on error.
If there is an error while attempting to convert an undefined
variable to a matrix, don't suddenly create an empty matrix.
(tree_constant_rep::fortran_style_matrix_assignment ()): Check
return value of range_max_check() and don't jumpt to top level on
errors.
(tree_constant_rep::vector_assignment ()): Check return value of
index_check and don't jump to top level on errors.
(tree_constant_rep::check_vector_assign ()): Don't jump to top
level on errors.
(tree_constant_rep::do_matrix_assignment ()): Check return value
of index_check and don't jump to top level on errors.
* src/tc-extras.cc (get_dimensions ()): Call error (sets error state)
but don't jump to top level on errors.
(fill_matrix): Return tree_constant() on error.
(identity_matrix): Likewise.
* src/error.cc (error_state): New global variable, initialize to zero.
(error): Set it to one.
* src/tc-index.cc (tree_constant_rep::valid_as_scalar_index ()):
Don't declare unused variable retval.
(tree_constant_rep::do_scalar_index ()): Return tree_constant()
instead of jumping to top level on error.
(tree_constant_rep::fortran_style_matrix_index): Don't jump to top
level on indexing or range errors.
(tree_constant_rep::do_vector_index ()): Likewise.
(tree_constant_rep::do_matrix_index ()): Likewise.
* src/tc-inlines (range_max_check): Return -1 instead of jumping
to top level on error.
(index_check): Likewise.
* src/utils.cc (check_dimensions): Call error, not warning, and
don't jump to top level.
* src/tree-base.h (line_num, column_num): New data members for all
tree classes.
(line (), column ()): New virtual functions to access line and
column info.
* src/lex.l (enum end_tok_type, enum plot_tok_type): Delete
declarations (now in token.h).
* src/lex.h (YY_INPUT, YY_FATAL_ERROR, DO_COMMA_INSERT_CHECK,
TOK_RETURN, BIN_OP_RETURN): Move macro definition here, from
lex.l. Rename RETURN TOK_RETURN.
* src/token.cc, token.h: New files that define a class for tokens
that includes line and column information.
Wed Sep 29 11:15:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/octave.cc: Use GNU getopt to handle option parsing.
* src/getopt.h src/getopt.c src/getopt1.c: New files for GNU
getopt.
* src/Makefile.in: Add them to the appropriate lists.
* src/utils.cc (raw_mode): Use the termios.h terminal driver
interface if it is available.
* configure.in: Check for termios.h
* src/tree-plot.cc (tree_subplot_list::print (int, ostrstream&)):
If the data to be plotted is a string but it doesn't name a file,
try sending it to gnuplot directly.
Tue Sep 28 16:06:42 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* liboctave/QPSOL.cc (QPSOL::minimize (double&, int&, Vector&)):
Correct dimensions of work arrays, based on QPSOL source.
Pass ncon, which is max (1, nclin), not n, as the row dimension of
clin.
* src/f-npsol.cc (linear_constraints_ok): Improve warning for the
case of constraints with zero dimensions.
(nonlinear_constraints_ok): Likewise.
Mon Sep 27 01:20:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.75.3.
* Makefile.in (dist): Make file permissions for distribution rw.
(binary-dist): Ditto.
(local-dist): Ditto.
Sat Sep 25 15:29:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/pr-output.cc: Include stdio.h, for sprintf.
* src/input.cc (octave_gets): Set octave_gets_line to NULL after
freeing it.
* Version 0.75.2.
* liboctave/Matrix.cc (Matrix::operator * (const ColumnVector&):
Correct dimension of return value.
(ComplexMatrix::operator * (const ComplexColumnVector&)): Ditto.
Tue Sep 21 20:42:10 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/tree.cc (tree_identifier::assign (tree_constant&)):
Correctly handle case of hiding a function with a variable when
the variable has not been flagged as global.
tree_identifier::assign (tree_constant&, tree_constant*, int)):
Likewise.
* src/variables.cc (force_global): When a variable is moved to the
global symbol table, mark it as global.
* src/symtab.cc (symbol_record::symbol_record ()): Initialize
forced_global.
(symbol_record::clear_visible ()): Reset forced_global to zero.
(symbol_record::clear_all ()): Ditto.
(symbol_record::mark_as_forced_global ()): New function.
(symbol_record::is_forced_global ()): New function.
(symbol_record::alias ()): Also copy forced_global attribute.
* src/symtab.h (symbol_record::forced_global): New private data
member, used to record when a variable has been explicitly
declared global.
* src/lex.l (lookup_identifier): Look in current scope first.
Mon Sep 20 03:15:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/parse.y, src/tree.cc, src/tree.h: Allow `for' command to
assign to an index expression, not just an identifier.
* src/t-builtins.cc (builtin_clear (int, char **)): Don't delete
g_names twice.
* src/symtab.cc (symbol_table::list (int&)): Make sure count is
initialized to zero.
(symbol_table::var_list (int&)): Ditto.
(symbol_table::fcn_list (int&)): Ditto.
Sat Sep 18 04:06:42 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/lex.l, src/parse.y, src/parse.h: Use new global variable
past_plot_range to make gplot and gsplot smarter about
distinguishing plot ranges and literal matrices.
Fri Sep 17 01:06:30 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.75.1 released.
* src/f-qzval.cc: Include <float.h> for DBL_EPSILON.
* src/symtab.cc (symbol_record::save (ostream&, int)): Don't print
a warning for ans being undefined. Call warning to print the
message, and change the text to make it clearer.
(symbol_table::save (ostream&, int)): Don't crash if there aren't
any symbols to save.
Thu Sep 16 00:21:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/t-builtins.cc (builtin_help): When trying harder to find
help for M-files, only insert the symbol into the global symbol
table if there really is an M-file of the given name in the path.
Wed Sep 15 02:08:27 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.75.
* src/Makefile.in (INCLUDES): Distribute defaults.h
(%.d: %.cc): Don't fail if we can't determine dependencies.
(DISTFILES): Include move-if-change.
Tue Sep 14 21:23:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* scripts/perror.m: Use err, not info for fsolve section.
Mon Sep 13 19:29:26 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/utils.cc (get_m_file_names): Call closedir(), not free(), to
dispose of directory structure.
Sun Sep 12 19:07:36 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/tree-const.cc (tree_constant_rep::double_value): Rearrange
to avoid warning about reaching end of non-void function.
(tree_constant_rep::matrix_value): Ditto.
* src/error.cc (panic): Declare volatile.
* src/utils.cc (jump_to_top_level): Declare as `void volatile',
not `volatile void'.
* src/tree-const.cc (tree_constant_rep::complex_matrix_value):
Make it work even if the internal representation is really a real
or complex scalar or a real matrix.
(tree_constant_rep::complex_scalar_value): Make it work even if
the internal representation is really a real scalar.
* src/f-syl.cc (syl): Delete ComplexMatrixLoad().
Use complex_matrix_value(), not ComplexMatrixLoad().
* src/tree-const.cc (vector_of_empties): Renamed from empty_tree,
moved from f-syl.cc.
* src/f-syl.cc (syl): Call vector_of_empties() instead of empty_tree().
* src/f-qzval.cc (qzvalue): Ditto.
* src/tree-const.h (tree_constant::is_empty): New inline function.
* src/f-syl.cc (syl): Call is_empty instead of empty_arg.
* src/f-qzval.cc (qzvalue): Ditto.
* src/f-expm.cc (matrix_exp): Ditto.
Thu Sep 9 22:40:16 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* liboctave/Matrix.cc (Matrix::transpose): Make it work for empty
matrices.
(ComplexMatrix::transpose): Ditto.
Mon Sep 6 04:56:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/tree-plot.cc (tree_subplot_list::print): If the plot data
is a string and it names a file, plot the data in the file.
* src/octave.cc (execute_startup_files): Try harder to avoid
executing $HOME/.octaverc twice.
* liboctave/DAE.cc (DAE::integrate (Vector&, Matrix&, Vector&)):
Add missing parameter in call to integrate() if no critical points
are specified.
Sat Sep 4 16:18:49 1993 John W. Eaton (jwe@ward.che.utexas.edu)
* src/octave.cc (execute_startup_files): Don't execute
$HOME/.octaverc twice.
Mon Aug 30 11:25:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/t-builtins.cc (builtin_clear): Handle regular expressions.
Fri Aug 27 07:25:32 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* liboctave/RowVector.cc:
(RowVector::operator * (const ColumnVector& a) const): Fix brain-o.
Wed Aug 18 00:29:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* list_primes.m: New M-file.
* src/tc-index.cc (do_scalar_index): Handle two vector args of all
ones.
Tue Aug 17 06:26:04 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/file-io.cc (process_printf_format): Use NINT for * modifier
argument.
Mon Aug 16 19:30:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/mappers.cc: (arg (double)): Return pi for negative real values.
Sun Aug 15 05:08:48 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/octave-hist.cc (mk_tmp_hist_file): New function, extracted
from do_edit_history.
(do_edit_history): Simplify using mk_tmp_hist_file.
(do_run_history): New function.
(edit_history_repl_hist): New function.
* src/t-builtins.cc (builtin_run_history): New function.
* src/builtins.cc (text_functions): Add run_history to the list.
Fri Aug 13 16:04:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tzero.m: New M-file.
* abcdchk.m: New M-file.
* is_symmetric.m: Use tol and norm (A) to decide if A' is close
enough to A to be considered the same.
Wed Aug 11 15:50:59 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.74.1.
Merge in expm changes from A. S. Hodel <scotte@eng.auburn.edu>:
* f-expm.{h,cc}: New files.
* src/Makefile.in: Include them in the usual places.
* src/g-builtins.cc (builtin_expm): The new matrix_exp returns a
tree_constant by value.
Include f-expm.h
* src/tc-extras.cc (matrix_exp): Delete function.
Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
Merge in qzval changes from A. S. Hodel <scotte@eng.auburn.edu>:
* f-qzval.{h,cc}: New files.
* src/Makefile.in: Include them in the usual places.
* src/g-builtins.cc (builtin_qzval): New function.
Include f-qzval.h
* src/g-builtins.h: Declare builtin_qzval.
* src/builtins.cc (general_functions): Add qzval to the list.
* libcruft/eispack: New directory.
* libcruft/Makefile.in (SUBDIRS): Include it.
Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Add libcruft/balgen/Makefile and
libcruft/eispack/Makefile to the list of files to frob.
Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
Merge in syl changes from A. S. Hodel <scotte@eng.auburn.edu>:
* lyap.m: New M-file.
* f-syl.{h,cc}: New files.
* src/Makefile.in: Include them in the usual places.
* src/g-builtins.cc (builtin_syl): New function.
Include f-syl.h
* src/g-builtins.h: Declare builtin_syl.
* src/builtins.cc (general_functions): Add syl to the list.
Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/g-builtins.cc (builtin_balance): Fix typo in doc string.
Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
Merge in givens changes from A. S. Hodel <scotte@eng.auburn.edu>:
* f-givens.{h,cc}: New files.
* src/Makefile.in: Include them in the usual places.
* src/g-builtins.cc (builtin_givens): New function.
Include f-givens.h
* src/g-builtins.h: Declare builtin_givens.
* src/builtins.cc (general_functions): Add givens to the list.
* src/Makefile.in: (defaults.h) Quote substitutions.
Use %foo%, not @foo@ to mark substitution.
* src/defaults.h.in: Use %foo%, no @foo@ to do mark things to
substitute.
* qzhess.m: New M-file.
Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
Merge in balance changes from A. S. Hodel <scotte@eng.auburn.edu>:
* are, is_controllable.m, is_observable.m, is_square.m,
is_symmetric.m: New M-files.
* Matrix.h (AEPBALANCE): New class.
(ComplexAEPBALANCE): New class.
(GEPBALANCE): New class.
* Matrix-ext.cc: Add init functions for balancing classes.
* src/f-balance.{h,cc}: New files.
* src/Makefile.in: Include them in the usual places.
* src/g-builtins.cc (builtin_balance): New function.
Include f-givens.h
* src/g-builtins.h: Declare builtin_balance.
* src/builtins.cc (general_functions): Add balance to the list.
* libcruft/balgen: New directory.
* libcruft/Makefile.in (SUBDIRS): Include it.
Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Use AC_HAVE_LIBRARY to check for -lm.
* src/Makefile.in (defaults.h): Quote substitutions.
Mon Aug 9 13:30:07 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* README.NLP: New file.
* Makefile.in (DISTFILES): Distribute it.
Sun Aug 8 19:05:48 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/move-if-change: New file.
* src/Makefile.in (DISTFILES): Distribute it.
(defaults.h): New rule.
(utils.o): Delete rule, since extra defines are no longer needed.
(INCLUDES): Distribute defaults.h.in.
* src/utils.cc: Include defaults.h to get DEFAULT_PAGER and
OCTAVE_HOME instead of depending on having them defined by the
compile command.
* configure.in (DEFAULT_PAGER): Use AC_PROGRAMS_CHECK.
If we find less, add `-e' flag, so users won't have to type q to
quit paging.
Sat Aug 7 13:34:06 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* f-*.cc: Renamed from tc-*.cc. (Use f- as the file prefix
because most of these functions are ultimately implemented in
Fortran, and, most importantly, it keeps them grouped together.)
* f-*.h: New files, for external declarations of visible functions
defined in f-*.cc.
* g-builtins.cc: Include them all.
* tree-const.h: Don't declare these functions as friends.
* Makefile.in: Cope with new names.
* octave.cc (parse_and_execute (char *, int)): Don't declare static.
* octave.h: Declare it extern here.
* octave-hist.cc (do_edit_history): Use it here.
* octave-hist.cc (do_edit_history): New function.
* t-builtins.cc (builtin_edit_history): Use it.
* t-builtins.cc, t-builtins.h, builtins.cc: Rename edit to
edit_history.
* octave-hist.cc (do_history): Print line numbers by default.
Allow quieter output with -q option.
* g-builtins.cc (builtin_hess): Use DLD_BUILTIN macro to call hess.
* g-builtins.cc (builtin_schur): Likewise
* tc-hess.cc (builtin_hess_2): Call hess with corrrect args.
* tc-schur.cc (builtin_schur_2): Likewise, for schur dude :-).
* tc-fsqp.cc (builtin_fsqp_2): Fix typo.
Thu Aug 5 23:14:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* input.cc (octave_read): Ensure that the last character in the
buffer is a new line.
Wed Aug 4 19:25:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* parse.y (func_def2): Also warn if we encounter a function
definition with the same name as the script file we are reading.
* tree.cc (tree_identifier::do_lookup): Always return NULL_TREE if
a script file was executed.
Tue Aug 3 23:25:45 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* file-io.cc: Delete useless static keyword from File_info class
declaration.
* unwind-prot.cc: Likewise, for unwind_elem and saved_variable
classes.
* tc-rand.cc: Likewise, for enum rand_dist declaration.
* arith-ops.cc: Likewise, for enum Matrix_bool_op declaration.
* tree.cc: Likewise, for struct const_matrix_list declaration.
Fri Jul 23 01:40:38 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* sysdep.cc (malloc_handler): Add missing arg to call to message().
Tue Jul 20 04:09:32 1993 John W. Eaton (jwe@june.che.utexas.edu)
* Version 0.74 released.
* doinstall.sh (version): Run `./octave -v' to get the version
number instead of grabbing it from version.h.
* Fail if we can't get a version number.
* Install ./octave, not src/octave.
* Makefile.in (binary-dist): Don't depend on all.
* Link src/octave to ./octave. (Now that there's no source in
binary distributions, why have a src directory?)
* file-io.cc (process_scanf_format): Rename local variable `i' to
`chars_from_fmt_str'.
* (process_printf_format): Likewise.
* sighandlers.cc (can_interrupt): New global variable.
* (sigint_handler): Use it to decide whether to jump to top level.
* octave.cc (main): Set it after calling setjmp.
* octave.cc (main): Declare saved_sigint_handler to be volatile.
* tree.cc, tree-plot.cc, t-builtins.cc, pager.cc, g-builtins.cc,
file-io.cc: Terminate strstream strings with ends instead of just
using '\0'.
* file-io.cc (process_scanf_format): Skip leading white space for
%s conversions.
* (fopen_file_for_user): Pass tree_constant arg by reference.
* (do_scanf): If doing fprintf, don't fail if first arg is a
string.
Mon Jul 19 16:00:22 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* symtab.cc (pstrcmp): Declare to take char** args, not char*.
Sun Jul 18 13:02:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* file-io.cc (return_valid_file): Pass arg by reference.
* file-io.cc (fclose_internal, fgets_internal, fseek_internal):
Eliminate unnecessary casts to double.
* file-io.cc (return_valid_file, fgets_internal, fopen_internal,
do_printf, do_scanf): Use is_string_type instead of doing the
comparison ourselves.
* g-builtins.cc (builtin_exist, builtin_getenv,
builtin_shell_command): Ditto.
* tc-colloc.cc (collocation_weights): Ditto.
* tc-extras.cc (eval_string, get_user_input): Ditto.
* tc-rand.cc (rand_internal): Ditto.
* tree-plot.cc (tree_subplot_list::print): Ditto.
* variables.cc (is_valid_function, octave_string_variable): Ditto.
Thu Jul 15 02:29:03 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* doc/Makefile.in (TEXINFO): Distribute texinfo.tex too.
* t-builtins.cc (load_variable): Warn if replacing local symbol
with global from file.
* Warn if variable is not marked as global in a file, but already
exists as a global symbol, then go ahead and load it as a global.
Tue Jul 13 01:47:48 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (lookup_identifier): Never alias to global here.
* tree.cc (do_lookup): Don't alias formal parameters to global.
* variables.cc (force_global): Likewise.
* symtab.cc (symbol_table::bind_globals): Likewise.
* symtab.h (symbol_record::formal_param): New field.
* symtab.cc (symbol_record::mark_as_global_parameter): New function.
* (symbol_record::is_formal_parameter): Ditto.
* tree.cc (tree_identifier::mark_as_formal_parameter): Ditto.
* (tree_parameter_list::mark_as_formal_parameters): Ditto.
* parse.y (param_list): Use it to tag formal parameters.
* (func_def1): Ditto.
* arith-ops.cc (DIVIDE_BY_ZERO_ERROR): On IEEE machines, allow
divide by zero errors to be suppressed.
* user-prefs.h (warn_divide_by_zero): New user preference.
* user-prefs.cc (warn_divide_by_zero): New function.
* builtins.cc (builtin_string_variables): Install it with default
value of true.
* tree.cc (tree_multi_assignemnt_expression): Use tree_return_list
instead of tree_param_list.
* (tree_multi_assignment_expression:eval): Make it work.
* tree.cc (tree_return_list): New class. Allow index expressions
and identifiers in return lists.
* (tree_matrix::to_return_list): Rename from to_param_list.
* parse.y (expression): Use it.
* parse.y: Increment and decrement maybe_screwed_again instead of
just setting it to zero or one.
Mon Jul 12 03:23:40 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tc-assign.cc (tree_constant_rep::do_matrix_assignment): Handle
case of lhs being of unknown type.
* lex.l (check_for_garbage_after_fcn_def): Also ignore trailing
commas and semicolons.
Sun Jul 11 00:08:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.73.1 released.
* symtab.cc (symbol_record::alias): Also copy pointer to sv_fcn.
Sat Jul 10 14:34:00 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_function::eval (int, char **, int): New function.
* symtab.cc (symbol_table::bind_globals): New function.
* tree.cc (tree_function::eval): Use it to associate local symbols
with global data.
* symtab.cc (alias): Add optional parameter `force'.
* Version 0.73 released.
* pr-output.cc: Use D_NINT instead of NINT in some cases to avoid
overflow problems on systems that don't have IEEE Inf.
* mappers.cc (round): Likewise. Also avoids conversion of Inf to
INT_MAX on systems that do have IEEE Inf.
* builtins.h: Remove definition of NINT.
* tree.h: Likewise.
* tree-const.h: Likewise.
* utils.cc (NINT): Move function here and improve handling of
extreme values.
* (D_NINT): New function.
* scripts/isempty.m: Don't require the number of rows and columns
to both be zero.
Thu Jul 8 16:25:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.72.2.
* configure.in: Do a better job of grabbing the last argument as
the target_host_type and avoiding setting it to things like
--prefix=/foo/bar
* tree-const.cc (tree_constant_rep::save): Add default case for
mark_as_global switch to avoid warnings from gcc.
* variables.cc (force_global): Cope with symbol table changes.
* tree.cc: (tree_identifier::do_lookup): Likewise.
* lex.l (lookup_identifier): Likewise.
* builtins.cc (install_builtins): Likewise.
* symtab.cc, symtab.h: Massive internal rewrite.
Wed Jul 7 02:18:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tc-assign.cc (tree_constant_rep::do_scalar_assignment): If rhs
is a scalar type, also handle case of lhs being of unknown type.
* Be sure to set the new type of the lhs.
* tree-base.h: Don't include symtab.h.
* tree-const.h: Ditto.
Tue Jul 6 22:47:28 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* parse.y (func_def2): Remove the function name from the top-level
symbol table if defining on command line (an M-file would never be
parsed if there was already an entry with the same name in the top
level symbol table).
* parse.y (word_list_command): Allow clear without any arguments.
* tree.cc (word_list_command::eval): Handle word list commands
with no arguments.
Mon Jul 5 14:43:30 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.72.1.
* help.cc (operators): Document the double quote character.
* lex.l (getting_help): Delete unused variable.
* (HELP_FCN): New exclusive start state.
* ({IDENT}{S}*): Set start state to HELP_FCN instead of setting
getting_help.
* ({IDENT}/{S}*=): Likewise.
* symtab.cc (symbol_table::load): Delete unused function.
* tree-const.cc (tree_constant::load): Return flag telling whether
the constant is global.
* t-builtins.cc (builtin_load): Handle global variables.
* (builtin_save): Likewise.
* symtab.cc (symbol_record::save): Don't save builtin variables
(variables marked as eternal are assumed to be builtin).
* symtab.cc (symbol_record::mark_from_global): New function.
* (symbol_def::undefine): Add optional argument to prevent
deleting symbol's definition.
* (symbol_table::undefine): If this variable has been marked as
defined from a global, call symbol_def::undefine with arg = 1.
* tree.cc (tree_identifier::do_lookup): If a local symbol is
defined from a global, mark it as such.
* symtab.cc (symbol_record::define (symbol_record*)): Delete
unused function.
* tree.cc (tree_identifier::do_lookup (int&)): Use operator=
instead of symbol_record::define().
* variables.cc (force_global (char*)): Likewise.
Sun Jul 4 01:27:44 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* symtab.cc (symbol_record): Define copy constructor and operator=.
* builtins.cc (install_builtins): Make `i' and `j' read-only
functions.
* symtab.cc (symbol_record::define): Respect read-only status of
variables and functions.
Sat Jul 3 19:11:31 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* user-prefs.h (print_empty_dimensions): New user preference variable.
* user-prefs.cc (print_empty_dimensions): New function.
* builtins.cc (print_empty_dimesions): Make default value true.
* tree-const.cc (tree_constant_rep::eval): Use value here.
* cond.m: Handle empty matrices.
* tc-det.m (determinant): Likewise.
* tc-inv.m (inverse): Likewise.
* tc-hess.cc (hess): Use gripe_square_matrix_required instead of
calling error.
* tc-schur.cc (schur): Likewise.
* builtins.cc (propagate_empty_matrices): Change default value to
true.
* tree-const.cc (tree_constant_rep::eval): If a matrix has zero
rows or columns, also print the dimension along with the `[]'
symbol.
* tree-const.cc (do_binary_op): If ok to propagate empty matrices,
go ahead and do the binary operation so that the result will have
consistent dimensions.
* (do_unary_op): Likewyse.
* tc-extras.cc (get_dimensions): Don't force both nr and nc to
zero if one is.
* Matrix.cc, DiagMatrix.cc, ColVector.cc, RowVector.cc: Handle
matrices with zero dimensions in a more consistent fashion.
Thu Jul 1 00:27:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* perror.m: New M-file.
* LP.h, LP.cc: New interface for linear programmming.
* LPsolve.h LPsolve.cc: New files to implement linear programming
using lp_solve.
* NPSOL.cc (minimize): Also return the vector of Lagrange
multipliers.
* tc-npsol.cc (npsol): Optionally return them.
* QPSOL.cc (minimize): Also return the vector of Lagrange
multipliers.
* tc-qpsol.cc (qpsol): Optionally return them.
* tc-qpsol.cc (qpsol): Make it work.
Wed Jun 30 02:19:00 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_lpsolve): New function.
* (builtin_qpsol): Ditto.
* builtins.cc (general_functions): Add them to the list.
* tc-lpsolve.cc: New file.
* tc-qpsol.cc: Ditto.
* src/Makefile.in: Add them to the list of SOURCES and DLD_OBJECTS.
Tue Jun 29 15:02:07 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* liboctave/DAE.cc (integrate): If stop_time_set is false, reset
default value for info[3].
* liboctave/ODE.cc (integrate): Likewise, reset default values of
iopt and itask.
From Thorsten Ohl <ohl@physics.harvard.edu>:
* config.guess: Add check for NeXT.
* configure.in: Add check for NeXT so that readline is configured
properly (really need to improve readline's configuration scheme).
* sysdep.cc (malloc_handler): New function for handling malloc
errors on NeXT systems.
* octave.cc (main): Call sysdep_init before anything else.
* sysdep.cc: New file for system dependent things.
* octave.cc (initialize_globals): Only pass argv[0] since that's
the only thing that's used.
Sat Jun 26 13:00:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_builtin::eval (int, char**, int)): Don't panic if
called for something other than a text_fcn.
* t-builtins.cc (builtin_cd): Rewrite to fix bogus memory
problems.
Fri Jun 25 15:23:03 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* t-builtins.cc (builtin_cd): Don't delete value returned by
get_working_directory.
* g-builtins.cc (builtin_pwd): Likewise, and simplify.
* utils.cc (make_absolute): Always create a new copy to return.
* utils.cc (change_to_directory): Don't delete pointer returned
from get_working_directory().
* (file_in_path): Likewise.
Thu Jun 24 16:48:38 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l ({IDENT}{S}*): Always insert a comma if the next token
doesn't look like some sort of operator, not just if
convert_spaces_to_comma is also true (it may have been turned off
by BIN_OP_RETURN).
* tree-const.h (matrix_ptr): Delete function.
* tc-extras.cc (frobit): Delete function.
* (get_dimensions): New function.
* (identity_matrix): Completely rewrite.
* (fill_matrix): Likewise.
Wed Jun 23 13:50:16 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Matrix-ext.cc (SCHUR::init): Also allow ord flag to be lowercase.
* (ComplexSCHUR::init): Ditto.
* tc-schur.cc (schur): Likewise.
* Matrix-ext.cc (SCHUR::init): Declare sort as char, not char*,
and pass its address to Lapack.
* (ComplexSCHUR::init): Ditto.
* Matrix-ext.cc (SCHUR::select_dig): Make static, and move ahead
of first reference in file.
* (SCHUR::select_ana): Likewise.
* (ComplexSCHUR::select_complex_dig): Likewise.
* (ComplexSCHUR::select_complex_ana): Likewise.
* builtins.cc (install_builtins): Add `J' as an alias for `I'.
* builtins.cc (install_builtins): Always create a new
tree_constant for each variable, since the symbol table doesn't
know how to share them.
* tc-schur.cc (schur): Use warning and error functions instead of
writing directly to cerr.
* tc-hess.cc (hess): Ditto.
* src/Makefile.in (DLD_OBJECTS): Include tc-schur.o and tc-hess.o.
* (SOURCES): Add tc-schur.cc tc-hess.cc.
* Merge Schur and Hessenberg changes:
Fri Mar 19 11:01:19 1993 R. Bruce Tenison (btenison@eng.auburn.edu)
* src/builtins.cc: Changed schur definition to include one more
input. Also changed the help line description
* src/g-builtins.cc: Changed builtin_schur to accept two inputs
Also changed the information to explain ordered schur operation.
* src/tc-schur.cc Added extensions to the SCHUR and ComplexSCHUR
calls to pass extra paramater. Also added check for proper param.
* liboctave/Matrix.h: Modified declarations dgeesx and zgeesx to
accept address of select function. Modified class structures for
SCHUR and ComplexSCHUR to accept extra ordered schur param.
* liboctave/Matrix-ext.cc: Added extensions for the extra ordered
schur paramater.
Wed Mar 17 15:23:14 1993 R. Bruce Tenison (btenison@eng.auburn.edu)
* liboctave/Matrix-ext.cc (HESS and ComplexHESS): Added the
Hessenburg decomposition routines.
* liboctave/Matrix.h Added fortran lapack functions definitions
used in the Hessenburg procedure.
* src/g-builtins.cc (builtin_hess): Hessenburg Decomposition routine
added
* src/g-builtins.h (builtin_hess): Added extern definition.
* liboctave/Matrix.h Added classed HESS and ComplexHESS
* src/tree_const.h added defs for hess.
* src/tc-hess.cc (hess): New file for hess function.
Tue Mar 16 10:46:32 1993 R. Bruce Tenison (btenison@eng.auburn.edu)
* src/g-builtins.cc (builtin_schur): Schur Decomposition routine
added.
* src/g-builtins.h (builtin_schur): Added extern definition.
* liboctave/Matrix.h Added Classes SCHUR and Complex SCHUR, and
added defs for zgeesx and dgeesx (lapack schur decomp)
* liboctave/Matrix-ext.cc (SCHUR and Complex SCHUR): Ditto.
* src/tree-const.h added defs for schur.
* src/tc-schur.cc (schur): New file for schur function.
Tue Jun 22 20:18:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (check_for_garbage_after_fcn_def): New function
* parse.y (fcn_end_or_eof): If reading from an M-file, use it to
print warning about trailing garbage after the end of a function
has been found.
Mon Jun 21 20:21:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tc-assign.cc (tree_constant_rep::assign): Handle case of
assignment to unknown constant too.
* (tree_constant_rep::do_scalar_assignment): Don't fail for
unknown_constant type.
* (tree_constant_rep::do_matrix_assignment): Likewise.
* tree-const.cc (rows): Return 0 for unknown_constant type.
* (columns): Likewise.
* tree.cc (tree_identifier::assign): Defer defining symbol until
assignment is successful.
* When creating a new dummy tree_constant to assign a value to,
leave it an unknown_constant type.
* tc-assign.cc (do_scalar_assignment): If the right hand side
isn't a scalar, maybe try to resize instead.
* (do_matrix_assignment): For A(:,int) and A(int,:) cases, also
resize if left hand side is a scalar.
* norm.m: Allow "fro" to work for scalars and vectors too.
Sun Jun 20 01:17:03 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* NLConst.cc: New file. Move inline function definitions here
from NLConst.h.
* Objective.cc: New file. Move inline function definitions here
from Objective.h
* tree.cc (tree_word_list_command::eval): Call strsave for argv[0]
too, and delete argv before returning.
* (tree_builtin::eval): Likewise, for text functions with no
arguments.
Sat Jun 19 01:37:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (parse_and_execute): Delete calls to delete_buffer
and switch_to_buffer, since that is taken care of by unwinding the
frame.
Fri Jun 18 00:08:36 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_matrix::eval): Delete useless direct = ptr->direct
and ptr = ptr->next statements from size-determining loop.
* parse.y (opt_list): New rule. Replace all occurrences of list
with opt_list.
* tree.cc: (tree_index_expression::eval (int, int)): Don't
complain if the index expression has an empty argument list.
* octave.cc (initialize_globals): Check return value of
getenv ("HOME") against NULL, not the global variable
home_directory that we are trying to initialize.
* tree.cc (tree_function::eval): Quick return if command list
is empty.
* parse.y (func_def3): Allow empty function bodies.
Thu Jun 17 02:08:02 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_while_command): Add constructor for case of
expression only.
* parse.y (statement): Allow empty command list for while commands.
* parse.y (list): Allow empty commands in more places. This ups
the shift/reduce error count by 6, to 19.
* octave.cc (execute_startup_files): Don't delete sd.
* octave.cc (initialize_globals): Make copies of all strings.
* Store more humorous messages if things fail.
Tue Jun 15 11:03:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tc-extras.cc (get_user_input): Finish incomplete change to get
input using readline.
* tc-extras.cc (match_sans_spaces): New function.
* (get_user_input): Use it when checking to see if the user
entered a `quit' command.
* liboctave/Makefile.in: Don't distribute Makedeps.in or include
Makedeps since we generate dependencies automatically now.
* configure.in: Don't create liboctave/Makedeps.
Sun Jun 13 18:31:17 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/xdiv.cc (xdiv): Solve least-squares problem if system of
equations is not square, or if it is singular.
* (xleftdiv): Likewise.
* liboctave/Matrix.h (Matrix::lssolve): New functions for
least-squares solutions of linear systems.
* (ComplexMatrix::lssove): Ditto.
Sat Jun 12 19:07:07 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* libcruft/misc/xstopx.f (xstopx): Call dostop, not do_stop.
* libcruft/misc/dostop.c: Rename from do_stop.c
* (dostop): Likewise.
* src/mappers.cc (xisnan (double)): Define even for systems that
don't have xisnan by always returning false.
* (xisnan (const Complex&)): Likewise.
Fri Jun 11 19:54:58 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* doc/Makefile.in (install): Try harder to install info files.
* libcruft/Makefile.in (install): Run ranlib on installed library.
* liboctave/Makefile.in (install): Ditto.
* readline/Makefile.in (install): Ditto.
Thu Jun 10 00:15:41 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.72 released.
* libcruft/*/*.f: Don't call xstopx with '' since some Fortran
compilers object to zero-length strings.
* libcruft/misc/xstopx.f (xstopx): Don't print empty strings or
single blanks.
* libcruft/misc/gen-d1mach.c (main): Likewise, for generated code.
* test/Makefile.in (check): Set the Tcl variable OCTAVE_PATH.
* test/config/unix-octave.exp: Pass OCTAVE_PATH to OCTAVE using
the new -p flag.
* builtins.cc (install_builtins): Use load_path instead of calling
default_path().
* octave.cc (load_path): New global variable.
* (initialize_globals): Initialize it here by calling default_path().
* (main): Call initialize_globals() before getting command line
arguments.
* Accept new argument, -p PATH.
* octave.cc (clean_up_and_exit): Don't print a message when Octave
exits.
* doinstall.sh: Install M-files in $(libsubdir), not $(libdir).
* Use mkpath to create directories.
* Extract version from version.h.
* Makeconf.in (version): Compute version just once.
* (libsubdir): New directory that includes version number, for
installing M-files in (old versions of Octave may not be able to
understand new M-files).
* src/Makefile.in, libcruft/Makefile.in, liboctave/Makefile.in,
doc/Makefile.in, readline/Makefile.in, scripts/Makefile.in
(install): Use mkpath to create directories.
* scripts/Makefile.in (install): Install M-files in $(libsubdir),
not $(libdir).
* mkpath.c: New file, from Emacs-19.
* Makefile.in (mkpath): New rule.
* (all): Depend on mkpath
* (binary-dist): Distribute it.
* config.guess: Update from bothner@cygnus.com.
* lex.l (<STRING>{QSTR}*[\n\']): Set start state to 0 or MATRIX,
depending on value of braceflag.
* (<DQSTRING>{DQSTR}*[\n\"]): Ditto.
* tree.cc (tree_matrix::eval): Make sure that strings are nul
terminated.
Tue Jun 8 16:08:10 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (clean_up_and_exit): Print `bye-bye' here.
* g-builtins.cc (builtin_quit): Not here.
* pager.cc (terminal_columns): If screenwidth <= 0, return a
default value of 80 columns.
* (terminal_rows): Likewise for screenheight and a default of 24
rows.
* octave.cc (parse_and_execute): Don't fiddle with interactive
states since that screws paging output.
* tree.cc (parse_m_file): Likewise.
* parse.y (input): For `simple_list error END_OF_INPUT' and
`error END_OF_INPUT' use ABORT_PARSE.
* Always accept `simple_list END_OF_INPUT'.
* Always abort for `END_OF_INPUT'.
Mon Jun 8 13:55:41 1993 John C. Campbell (jcc@schoch.che.utexas.edu)
* file-io.h (fopen_file_for_user): New function declaration.
* file-io.cc (fopen_file_for_user): New function.
* (fgets_internal): If file doesn't exist open it for user,
also return (double) -1 on EOF
* (fseek_internal), (ftell_internal), (frewind_internal),
(do_printf): Ditto.
* (fopen_internal): Remove warn_on_not_open flag, limit warns.
Mon Jun 7 00:28:13 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* file-io.cc (do_scanf): Use `type' wherever possible instead of
hardcoding name in messages.
* (do_printf): Ditto.
* file-io.cc (fflush_internal): If flushing stdout, flush output
to the pager instead of calling fflush on a stream.
* (do_printf): Make fprintf (stdout, ...) exactly the same as
printf (...).
* (do_scanf): Make fscanf (stdin, ...) exactly the same as
scanf (...).
* tc-extras.cc (get_user_input): Flush output to pager before
prompting for input.
* libcruft/Makefile.in (DISTFILES): Distribute STOP.patch to show
the changes made to the Fortran sources.
* libcruft/*/*.f: Replace STOP statements with calls to xstopx, so
that Fortran programs won't just quit on us.
* libcruft/misc/xstopx.f: New file.
* libcruft/misc/do_stop.c: New file.
* libcruft/misc/Makefile.in (SPECIAL): Add do_stop.c to the list.
* (SPECIAL_DEPEND): Likewise, for do_stop.o.
* libcruft/Makefile.in (CRUFT_OBJ): Ditto.
* lex.l (")"): Don't pop the top of the in_brace_or_paren stack if
it's empty.
Sun Jun 6 00:41:28 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* liboctave/CollocWt.cc (init): Always compute Gaussian quadrature
weights instead of trying to compute Radau or Lobatto weights if
the endpoints are included.
* Really do compute roots and derivative weights corresponding to
Legendre polynomials if alpha and beta are zero, even if the
endpoints are included.
Sat Jun 5 22:19:55 1993 John C. Campbell (jcc@schoch.che.utexas.edu)
* builtins.cc (builtin_general_functions): Correct max arg counts
for fscanf, scanf, and sscanf.
* g-builtins.cc (builtin_fscanf): Correct argument checks.
* (builtin_sscanf): Likewise.
* file-io.cc (fopen_internal): Don't warn for opening new file.
* file-io.cc (process_printf_format): Handle * for field width and
precision.
* Pass array of arguments and nargin instead of just one arg.
* (do_printf): Call process_printf_format() with new args.
* file-io.cc (process_scanf_format): New function to handle scanf
dirty work.
* (do_scanf): New function.
Sat Jun 5 14:09:41 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (YY_FATAL_ERROR): Redefine here to keep from exiting on
fatal scanner errors.
Fri Jun 4 16:35:25 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_multi_assignment_expression::eval (int)): Check to
see if result is NULL before trying to use it.
* tc-extras.cc (get_user_input): Call gnu_readline() to get input.
Thu Jun 3 00:30:28 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* scripts/*.m: Convert single-quoted strings to use double quotes
since the manual says they are better.
* Version 0.71.10.
* doc/Makefile.in (DISTFILES): Distribute octave.info*.
* Makefile.in (.fname): Delete target and move actions back to the
individual dist targets because this always needs to be done.
* (binary-dist): Strip src/octave.
* doinstall.sh: New file, for binary distributions.
Wed Jun 2 15:11:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Makefile.in (binary-dist): New target, just like dist, except
also distribute libcruft.a, liboctave.a, libreadline.a and
src/octave.
* Makefile.in (.fname): New target.
* (links-for-dist): New target.
* (local-dist): Depend on .fname.
* (dist): Depend on .fname and use links-for-dist.
* octave.cc: Move code to print startup message to just after
option processing so that any messages from startup files will
appear after the normal startup message.
* utils.cc (get_site_defaults): New function.
* (OCTAVE_HOME): Provide default definition.
* (SITE_DEFAULTS): Delete definition.
* octave.cc (execute_startup_files): Use get_site_defaults instead.
* src/Makefile.in (utils.o): Define OCTAVE_HOME to be $(prefix)
here.
* Makeconf.in: Don't define SITE_DEFAULTS or OCTAVE_M_FILE_DIR.
* lex.l (do_string_escapes): Recognize `\"'.
Tue Jun 1 01:28:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.71.9.
* parse.y (maybe_convert_to_ans_assign): Greatly simplify.
* file-io.cc (File_info): Convert from struct to proper class.
* (valid_mode): New function.
* parse.y, parse.h, lex.l, tree-extras.cc (convert_to_ans_assign):
Delete unused variable.
* builtins.cc (SEEK_CUR): Set to 1 to match (normal) system values.
* (SEEK_END): Likewise, set to 2.
* statdefs.h: New file.
* Makefile.in (INCLUDES): Add it to the list.
* octave-hist.cc: Include it.
* variables.cc (identifier_exists): Likewise.
* utils.cc (is_newer): Likewise.
* builtins.cc (SEEK_SET): New builtin varible.
* (SEEK_CUR): Ditto.
* (SEEK_END): Ditto.
* (stdin): Ditto.
* (stdout): Ditto.
* (stderr): Ditto.
* lex.l (strip_trailing_whitespace): New function.
* ({IDENT}{S}*): Use it.
* (<TEXT_FCN>[^ \t\n\;\,]*): Fix to grab trailing spaces.
Use strip_trailing_whitespce() to delete it before returning.
Mon May 31 21:00:00 1993 John C. Campbell (jcc@june.che.utexas.edu)
* file-io.cc, file-io.h: New files to implement C-style file
handling and I/O functions.
* (do_printf): Move here from tc-extras.cc.
* (process_printf_format): Likewise. Also renamed from
process_format.
Mon May 31 00:52:55 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* (tree_function::eval): Now that we can restore values, enable
code to give error for attempts to call functions recursively.
* octave.cc (parse_and_execute): Use unwind-protect functions to
save and restore state.
* tree.cc (parse_m_file): Likewise.
* (tree_function::eval): Likewise.
* tc-extras (eval_string): Likewise.
* unwind-prot.cc (saved_variable): New class to hold values of and
pointers to variables we want to restore.
* (restore_saved_variable): New function.
* unwind-prot.cc (unwind_protect_int_internal): New function.
* (unwind_protect_ptr_internal): Ditto.
* (unwind_protect_var_internal): Ditto.
* unwind-prot.h (unwind_prot_int): New macro.
* unwind-prot.h (unwind_prot_ptr): Ditto.
* unwind-prot.h (unwind_prot_var): Ditto.
* variables.cc (symbol_out_of_date ()): Move here from tree.cc.
* (is_valid_function): Fix logic for finding a function
definition, including checking to see if the current symbol
definition is out of date.
* tree-const.h (is_numeric_or_range_type): New function.
* tree-const.h (is_string_type): New function.
* tree.cc (tree_matrix::eval): Use !is_string_type() instead of
is_numeric_type() to decide that we've seen something other than
a string.
* parse.y (maybe_warn_assign_as_truth_value ()): New function.
* user-prefs.h (warn_assign_as_truth_value): New preference.
* user-prefs.cc (warn_assign_as_truth_value ()): New function.
* builtins.cc (string_variables): Add it to the list.
* tree.h (tree_simple_assignment_expression): Rename class from
tree_assignment_expression.
* (tree_assignment_expression): New class, derived from
tree_expression.
* (tree_simple_assignment_expression): Derive from new
tree_assignment_expression class, not tree_expression class.
* (tree_multi_assignment_expression): Ditto.
Sun May 30 22:40:58 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/Makefile.in (%.d: %.cc): First remove target file, then
redirect into tmp file, and finally move tmp file to target file
only if creating tmp file was successful.
* liboctave/Makefile.in (%.d: %.cc): Ditto.
Sat May 29 18:18:16 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_constant *tree_multi_assignment_expression
::eval (int print, int nargout)): New function.
* (tree_constant tree_multi_assignment_expression::eval (int print)):
Use it to do the real work.
* tree.cc (tree_matrix::to_param_list ()): Also allow index
expressions as long as the argument list is missing.
* parse.y (ans_expression): Now that assignments are just
expressions, don't convert expressions to assignemnts to `ans' if
they already are assignments.
* maybe_convert_to_ans_assign (tree *expr): New function to do the
real work.
* tree.cc (tree_multi_assignment_expression::
is_assignement_expression ()): Return 1.
* tree-base.h (tree::is_index_expression ()): New virtual
function, returns 0.
* tree.cc (tree_index_expression::is_index_expression ()): Return 1.
* tree.cc (tree_assignment): Construct from tree_index_expression
and a tree.
* (tree_index_expression::ident ()): New function.
* (tree_index_expression::arg_list ()): New function.
* parse.y (variable): New rule, returns tree_index_expression.
* parse.y: Rewrite assignment rules so that they are simply
expressions, not special cases.
* Rearrange fact and expression rules into expression (assignement
or simple expression), simple_expr (binary and postfix expressions
or secondary simple expression), and simple_expr1 (constants and
prefix expressions) rules.
* Delete fact rules.
* parse.y: Make EXPR_EQ and EXPR_NE have the same precedence as
the other relational operators.
Fri May 28 10:14:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* unix-octave.exp: Delete use of OCTAVEFLAGS.
* test/config: New directory.
* test/config/Makefile.in: New file.
* test/config/unix-octave.exp: Rename from test/octave-init.exp.
* test/Makefile.in (SOURCES): Delete octave-init.exp from list.
* configure.in: Add test/config/Makefile to the list of Makefiles
to build.
* utils.cc (send_to_plot_stream): Plot lines by default.
Thu May 27 08:03:31 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (\]): Don't pop the top of the in_brace_or_paren stack if
it's empty.
* tree.cc (tree_matrix::eval): Make it work for single element
strings as well.
* Version 0.71.8.
* lex.l (next_token_is_postfix_unary_op): New function.
* (<MATRIX>{SN}*\]{S}*): Use it as well, to decide whether to
insert a comma.
* (<MATRIX>{S}+): Likewise.
* ({IDENT}{S}*): Likewise.
Wed May 26 15:37:27 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* pr-otput.cc (pr_any_float): Use form() now that iostream
formatting bug has been fixed (libg++-2.3.1).
Mon May 24 15:36:22 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (any_arg_is_magic_colon): New function.
* (tree_builtin::eval) Use it to avoid calling builtin functions
with `:' arguments.
Sun May 23 14:07:19 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_fprintf): Correct usage message.
Fri May 21 10:35:40 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.71.7.
* octave.cc (main): Always reset_parser() before every call to
yyparse(), not just on a longjmp return.
* doc/Makefile.in (install): For now, don't try to install
anything.
* lex.l (<MATRIX>{S}+): Call next_token_is_bin_op() instead of
making the check in line.
* (<MATRIX>{SN}*\]{S}*): Likewise.
* (<MATRIX>{S}+): Likewise.
* lex.l (looks_like_bin_op): New function.
* (next_char_is_space): Ditto.
* (next_token_is_bin_op): Ditto.
* lex.l ({IDENT}{S}*): If we're in a brace context and the next
character is an open paren, set convert_spaces_to_comma to 0.
* tree-const.cc (convert_to_str): New function.
* g-builtins.cc (builtin_setstr): New function.
* builtins.cc (builtin_general_functions): Add it to the list.
Thu May 20 17:56:15 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* doc/Makefile.in (SOURCES): Define to be all .texi files.
* (octave.info): Depend on $(SOURCES).
* (octave.dvi): New target.
* Don't distribute the man page.
* lex.l (<MATRIX>{S}+): If the next character is a plus or minus
followed by a space or tab, don't insert a comma. This makes
input like [1 + 1] == 2 and input like [1 +1] == [1 1].
* (<MATRIX>{SN}*\]{S}*): Likewise.
* lex.l (<MATRIX>{S}+): Use in_brace_or_paren and
convert_spaces_to_comma to decide whether to convert spaces to a
comma.
* lex.l ({IDENT}{S}*): If we're in a brace context and the next
character is an open paren, set convert_spaces_to_comma to 0.
* lex.l (<MATRIX>{SN}*\]{S}*): Even if we're still inside some braces,
don't always push a comma onto the input.
* lex.l (<MATRIX>{SN}*\]): Also grab trailing spaces.
* ({IDENT}): Ditto.
* lex.l (in_brace_or_paren): New stack to keep track of whether
the closest enclosing scope is a pair of braces or parens. When
we see a `[' or a `(', push a flag on the stack. When we see a
`]' or a `)', pop the top of the stack.
* lex.l (convert_spaces_to_comma): New flag to control lexer behavior.
* (RETURN): Reset it to 1.
* (most other returns): Reset it to 1.
* lex.l (BIN_OP_RETURN): New macro. Set convert_spaces_to_comma to 0.
* (most binary operators): Use it instead of RETURN.
* lex.l (match_any): New function.
Wed May 19 12:51:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Range.cc (nelem_internal): Don't allow ranges with more than
INT_MAX elements. Return -1 to indicate failure.
* tree-const.cc (tree_constant_rep::tree_constant_rep (double,
double, double)): Check nelem() to see if the range is valid.
* pr-output.cc (all_elements_are_ints (Range&)): We only need to
check the base and the increment, not the limit too.
* Range.cc (nelem_internal): Move function definition here from
Range.h and do a better job of determining the number of elements
in the range.
Tue May 18 09:06:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.71.6.
* tc-extras.cc (find_nonzero_elem_idx): Declare inner loop
iteration variables that are used inside later nested loops
in the outer enclosing scope to make this work for old and new
language definitions (see the ARM, chapter 19: "ANSI/ISO
Resolutions", 6.4/6.5: "The statement or statements immediately
controlled by the condition in a selection-statement, or an
iteration-statement introduce an implicit local scope".
* xpow.cc (elem_xpow (Matrix&, Matrix&)): Likewise.
* tree.cc (tree_identifier::parse_m_file (char*, int)): Set
reading_script_file before calling parse_m_file and restore it
afterward.
Mon May 17 20:04:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.h (prog_name): Declare extern.
* (raw_prog_name): Ditto.
* f2c-compat.sh (ctest.c): Also write a dummy MAIN_ since gcc 2.4
doesn't seem to create an executable now if there are unresolved
externals, and the linker wants to see it on Suns.
Thu May 13 01:06:18 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Makefile.in (DISTFILES): Include Makeconf.in.
* configure.in: Set defaults for CFLAGS, CXXFLAGS, LDFLAGS, and
FFLAGS.
* Don't substitute CDEBUG, COPTIMIZE, FOPTIMIZE, or CXXOPTIMIZE.
* Use AC_PROGRAMS_CHECK instead of our own code for checking for a
Fortran compiler.
* Add Makeconf to the list of files to create.
* src/Makefile.in (octave): Use ALL_LDFLAGS instead of LDFLAGS.
* Makeconf.in (ALL_CFLAGS, ALL_CXXFLAGS, ALL_LDFLAGS): New macros.
* Allow the user to set CFLAGS, CXXFLAGS, and FFLAGS without
screwing things up.
* (CDEBUG, COPTIMIZE, FOPTIMIZE, CXXOPTIMIZE): Delete.
* Provide rules for making .o from .cc or .c files that use
ALL_CXXFLAGS and ALL_CFLAGS.
* src/Makefile.in: Generate dependencies automatically using the
method described in the GNU make manual.
* liboctave/Makefile.in: Likewise.
* All Makefile.in files: Set TOPDIR and include $(TOPDIR)/Makeconf.
* Makeconf.in: New file, for most configuration options.
* tc-rand.cc (rand_internal): Return an empty matrix for rand (0).
Wed May 12 01:32:36 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (clean_up_and_exit): Call close_plot_stream before
quitting.
* Version 0.71.4.
* pr-output.cc (octave_print_internal (ostrstream&, Matrix&)):
Handle wrapping columns neatly, respecting value of split_long_rows.
* (octave_print_internal (ostrstream&, ComplexMatrix&)): Ditto.
* (octave_print_internal (ostrstream&, Range&)): Ditto.
* user-prefs.cc (split_long_rows): New preference variable and
function.
* builtins.cc (builtin_string_variables): Add to list with default
value == true.
Tue May 11 02:20:43 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* pr-output.cc (pr_max_internal): Don't count Inf or NaN when
looking for max value.
* (pr_min_internal): Likewise, for min values.
* pr-output.cc (pr_any_float): Merge pr_float and pr_imag_float.
* pr-output.cc (any_element_is_inf_or_nan (Matrix&)): New function.
* (any_element_is_inf_or_nan (ComplexMatrix&)): New function.
* (all set_format functions (except Range)): Consider Inf and NaN
when computing field width (we'll either print "Inf" (possibly
with a sign) or "NaN").
* pr-output.cc (pr_float): Handle Inf and NaN.
* (pr_imag_float): Ditto.
* pr-output.cc (set_format_style): Make format short set precision
to 3 and max field width to 8.
* pr-output.cc (pr_float): Don't print a sign for -0.0.
* (pr_imag_float): Ditto.
* pr-output.cc (all set_format functions): Return the actual field
width computed or 0 if free format. For complex, return both real
and imaginary field widths.
* Include pager.h for terminal_rows() and terminal_columns().
* pr-output.cc (pr_complex): If imaginary part is -0.0, print a
minus sign but convert the value to 0.0 before printing.
* octave.cc (parse_and_execute (FILE *, int)): Don't use readline
to read commands from files.
* (parse_and_execute (char *, int)): Set reading_script_file
before calling get_input_from_file.
* Version 0.71.3.
* src/Makefile.in (deps): New target.
* Update dependencies using the output from running `make deps'.
* pr-output.cc (set_output_prec_and_fw): New function.
* (set_format_style): Use it.
* (set_format functions): Use user_pref variables for precision
and field width.
* variables.cc (octave_real_scalar_variable): New function.
* buitlins.cc (builtin_string_varaibles): Add output_precision and
max_field_width to the list (really need a separate list for
numeric values...).
* user-prefs.cc (set_output_max_field_width): New function to be
called when output_max_field_width changes.
* (output_precision): Likewise, for output_precision.
* sighandlers.cc (pipe_handler_error_count): New global variable.
* (sigpipe_handler): Use it to keep from printing more than one
broken pipe message between prompts.
* (input.cc): Reset pipe_handler_error_count before printing the
prompt.
Mon May 10 13:06:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* sighandlers.cc (sigpipe_handler): Issue warning and return
instead of aborting.
* user-prefs.cc (all sv_* functions): Don't delete previous value
of a preference string if the new value is bogus.
* user-prefs.cc (all sv_* functions and all functions that handle
user preferences): Return 0 for success, -1 for failure.
* symbtab.cc (symbol_record::define): Check return value of sv_fcn
and restore previous value on failure.
* symtab.h (sv_Function typedef): Change to return int, not void.
* builtins.h (sv_Function typedef): Ditto.
Sun May 9 18:25:00 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* user-prefs.cc (all sv_* functions): Issue a warning if the user
gives us something that's not a string.
Sat May 8 23:40:59 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* ColVector.cc (ColumnVector::min): Upper loop limit is len, not 0.
* (ComplexColumnVector::min): Ditto.
* RowVector.cc (RowVector::min): Ditto.
* (ComplexRowVector::min): Ditto.
Fri May 7 18:41:29 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* pr-output.cc (set_format_style): New function, extracted from
builtin_format().
* t-builtins.cc (builtin_format): Call set_format_style to do real
work.
* pr-output.cc: New file for special formatted printing funcions.
* tree-const.cc (tree_constant_rep::eval): Use new functions.
* user-prefs.cc (sv_pager_binary): New function.
* user-prefs.h (user_preferences) Add new field, pager_binary.
* builtins.cc (builtin_string_variables): Add PAGER to the list.
* utils.cc (default_pager): New function.
* Makefile.in: Define DEFAULT_PAGER for utils.cc, not pager.cc.
* pager.cc (get_pager): Delete function.
* Use user_pref.pager_binary instead of calling get_pager().
Thu May 6 11:05:06 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* pager.cc (pager_buf): Declare as static pointer to ostrstream.
* (initialze_pager): Delete old pager_buf and create new one for
each batch of output. This is needed because once str() is called
for pager buf, it will no longer grow.
* pager.cc (maybe_page_output): Take care of deleting buffer after
str() is called.
* (flush_output_to_pager): Likewise.
* t-builtins.cc (builtin_ls): Likewise.
* (builtin_set): Likewise.
* (builtin_show): Likewise.
* tc-extras.cc (process_format): Likewise.
* (process_format): Likewise.
* tree-plot.cc (tree_plot_command::eval): Likewise.
Wed May 5 10:45:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_shell_command): Buffer characters with an
ostrstream and call maybe_page_output instead of writing directly
to cout.
* (builtin_warranty): Likewise.
* tc-extras (do_printf): Likewise.
* tree.cc (tree_identifier::eval): Likewise.
* (tree_assignment_expression::eval): Likewise.
* (tree_multi_assignment_expression::eval): Likewise.
* tree-const.cc (tree_constant_rep::eval): Likewise.
* t-builtins.cc (builtin_help): Likewise.
* (builtin_ls): Likewise.
* (builtin_who): Likewise.
* user-prefs.h user-prefs.cc (page_screen_output): New preference.
* builtins.cc (string_variables): Add to list with default value
of true.
* input.cc (octave_gets): If interactive, call flush_to_pager()
before prompting.
* utils.cc (terminal_rows): Move to pager.cc
* (terminal_columns): Likewise.
* (get_pager): Likewise.
* pager.h, pager.cc: New file to handle pager stuff.
* src/Makefile.in: Fix things to distribute and compile them.
* libcruft/Makefile.in (CRUFT_OBJ): Strip $(srcdir)/ and convert
from .f to .o in two steps since some versions of GNU make strip
the leading ./ from the output of $(wildcard), causing my pattern
match to fail if compiling in the source tree.
Tue May 4 09:13:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* symtab.cc (symbol_record::define (symbol_record *)): Delete old
name before saving new name.
* (symbol_record::document): Likewise, for var.help and fcn.help.
* parse.y (ABORT_PARSE): Renamed from DO_ABORT.
Mon May 3 01:00:04 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc: Define destructors for every class in tree.h. It
appears that it should always be ok to delete everything in a
command tree once we're done executing it. Function definitions
are still ok because the parser doesn't set global_command to the
tree_function we've built (that's saved somewhere in the symbol
table and shouldn't be deleted until we clear or redefine the
function).
* utils.cc (pathstring_to_vector): Do memory management here so
callers don't have to.
* (default_path): Likewise.
* utils.cc (make_absolute): Return current_path (not a copy) since
it is static.
* (get_working_directory): Return the_current_working_directory
(not a copy) since it is global.
* utils.cc (cleanup_tmp_files): Delete filename when done.
* parse.y: Replace output to cerr with calls to error() or warning().
* DO_ABORT: New macro. Use it instead of YYERROR for errors that
we detect, and call yyerror since bison doesn't.
* (param_list1): Detect invalid parameter lists.
* (yyerror): Don't print pointer if it is past the end of the line.
Sun May 2 13:03:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tc-extras.cc (process_format): Use ostrstream instead of a
fixed-size character string to buffer the format.
* utils.cc (terminal_rows): Get info from readline variable
instead of hardcoded constants.
* (terminal_columns): Likewise.
* utils.cc (maybe_page_output): New function.
* t-builtins.cc (builtin_help): Use it.
* (builtin_who): Ditto.
* Don't include procstream.h anymore since we no longer need it.
* utils.cc (jump_to_top_level): Call run_all_unwind_protects ()
before jumping back to the top level.
Sat May 1 20:59:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* unwind-prot.cc unwind-prot.h: New files to implement memory
cleanup stuff.
* src/Makefile.in: Distribute them.
* Version 0.71.2.
* computer.m: Delete file.
* scripts/Makefile.in (computer.m): Add $(srcdir)/ prefix to
computer.in.
Fri Apr 30 17:03:04 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Matrix.h (<CLASS>::row (int i)): New function for extracting a
row of a matrix where CLASS is one of Matrix, DiagMatrix,
ComplexMatrix, or ComplexDiagMatrix.
* (<CLASS>:: column (int i)): Likewise for columns.
* (<CLASS>::row (char *s)): Likewise, but selection is done with a
character string. Currently we accept anything beginning with `F'
or `f' to mean the first row and anything beginning with `l' or
`L' to mean the last row.
Wed Apr 28 14:23:49 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* scripts/computer.in: New template file for computer.m.
* scripts/Makefile.in (computer.m): Generate a custom computer.m
file using $target_host_type.
* (clean): Delete computer.m.
* configure.in: If last argument is not empty, use its value as
the TARGET.
* If we aren't given a TARGET, use config.guess to find one.
* Substitute target_host_type.
* config.guess: New file, taken from gdb distribution.
* Makefile.in: Distribute it.
* tree-const.cc (force_numeric): New parameter, force_str_conv to
allow us to ignore user preference on string to numeric
conversion.
* (make_numeric): Likewise.
* tree.cc (tree_matrix::eval): Allow range constants in matrix
lists by simply converting them to matrices.
* Ditto for string constants.
Tue Apr 27 17:21:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* utils.cc (smells_like_X11): Delete unneeded function.
* builtins.cc (install_builtins): Don't initialize
graphics_terminal since it's no longer needed.
* utils.cc (pathstring_to_vector): Call tilde_expand on each
element of the path.
* mappers.cc: Include float.h for DBL_MAX.
Wed Apr 21 19:31:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* mappers.cc (xisnan (Complex&)): Rename from isnan.
* builtins.cc (mapper_functions): Use xisnan instead of isnan.
* (install_builtins): Special case for linux for geenerating
infinity and NaN.
Mon Apr 19 14:10:55 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.71.1 released.
* symtab.cc (char **sorted_list (int& count)) New function.
* (char **sorted_var_list (int& count)): Ditto.
* (char **sorted_fcn_list (int& count)): Ditto.
* t-builtins.cc (builtin_who): Check symbol count too.
* utils.cc (send_to_plot_stream): Check is_open(), not just the
state of the stream.
* (close_plot_stream): Likewise.
* procstream.cc, procstream.h: Rewrite, taking a hint from the GNU
fstream class.
Sun Apr 18 17:40:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* t-builtins.cc (builtin_help): Don't call list_in_columns if
there isn't anything to list.
Fri Apr 16 20:57:15 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Makefile.in (DISTDIRS): List dld here.
* (DISTSUBDIRS): Not here.
Thu Apr 15 12:17:08 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.71 released.
* scripts/*.m: Improve help messages for most files.
* libcruft/Makefile.in: Make libcruft.a here.
* libcruft/Makerules.in: Not here.
* PLOTTING: New file.
* Makefile.in: Add it to the list of files we distribute.
* g-builtins.cc (builtin_shell_command): New function.
* builtins.cc (general_functions): Add it to the list.
* procstream.h, procstream.cc (iprocstream): New class.
* lex.l (<MATRIX>{SN}*\]): Maybe insert a comma after reading a `]'.
* t-builtins.cc (builtin_load): Do tilde expansion for the file name.
* (builtin_save): Ditto.
Wed Apr 14 10:40:44 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_function::eval): Until we have a proper call frame
unwinding scheme, comment out previous change.
* tree.cc (tree_matrix::eval): Brain Transplant.
* (tree_matrix::length): New function.
* tree-base.h (matrix_dir): Delete md_none, md_left, and md_up.
The only valid values are md_unknown, md_right, and md_down.
Tue Apr 13 20:07:25 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.h (tree_function::call_depth): New member variable.
* tree.cc (tree_function::eval): Check it to make recursive
function calls fail (waiting for proper symbol table handling).
* utils.cc (pathstring_to_vector): Don't prepend `.' here. We do
that already in default_path() if the user hasn't given us a
loadpath.
* t-builtins.cc (builtin_help): Get help for M-files even if they
haven't been compiled yet.
* List M-files we find in the loadpath.
* utils.cc (get_m_file_names): Split into two functions, add
parameter to specify whether .m suffix is deleted.
* lex.l (grab_help_text): New function.
* (beginning_of_function): New global variable.
* (%|#): Call grab_help_text() if at beginning of a function.
* tree.cc (tree_identifier::document): New function.
* parse.y (func_def2): Use it.
* (help_buf): New global buffer for help text.
Mon Apr 12 00:31:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* utils.cc (get_m_file_names): New function.
* variables.cc (make_name_list): Use it.
* t-builtins.cc (list_in_columns): Put output on an strstream
instead of in a String.
* (builtin_help): Use an strstream instead of a String for buffering.
* (builtin_who): Likewise.
* g-builtins.cc (builtin_keyboard): New function.
* builtins.cc (general_functions): Add to list.
* tc-extras.cc (get_user_input): If the user enters `exit',
`quit', or `return', return instead of eval'ing the string.
* Don't abort on empty input.
* Add additional argument to handle debugging via new `keyboard'
function. If doing debugging, keep reading until we see `exit',
`quit', or `return'.
* menu.m: New M-file.
* New top level plotting functions:
plot.m semilogx.m semilogy.m loglog.m polar.m
title.m xlabel.m ylabel.m grid.m bar.m
stairs.m mesh.m meshdom.m contour.m
* New internal plotting functions:
plot_int.m plot_2_s_s.m plot_2_v_v.m plot_2_v_m.m
plot_2_m_v.m plot_2_m_m.m polar_int.m
* New utility functions:
is_scalar.m is_vector.m is_matrix.m
Sun Apr 11 11:10:29 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* t-buitlins.cc (builtin_ls): New function.
* builtins.cc (text_functions): Add it to the list under the names
`ls' and `dir'.
Sat Apr 10 15:13:05 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* procstream.cc (oprocstream::close): Set badbit for stream after
it is closed.
* utils.cc (close_plot_stream): New function.
* g-buitlins.cc (closeplot): New builtin function.
* builtins.cc (general_functions): Add to list.
* lex.l (cant_be_identifier): New cruft to properly handle the
plot command's `using', `title', and `with' keywords.
Fri Apr 9 09:38:25 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Warn if it looks like gnuplot isn't installed.
* utils.cc (send_to_plot_stream): Check the user's preference for
the gnuplot binary.
* user-prefs.cc (sv_graphics_terminal): Delete function.
* user-prefs.h (graphics_terminal): Delete variable.
* tree-plot.cc (tree_subplot_using::print): Add argument to allow
checking of columns given in using command and use it.
* (tree_plot_command::eval): Change caller.
* parse.y (title): Allow plot title to be any expression.
* tree-plot.cc (subplot_list): Likewise.
* tree-plot.cc (tree_plot_command::eval): Don't let lusers try to
make 2D parametric plots, since that seems to crash gnuplot.
* tree.cc (tree_identifier::parse_m_file): Don't try to stash
m-file name or time parsed if we were actually executing a script
file.
* sombrero.m: New M-file to demonstrate 3D plotting.
* parse.y (plot_options): Allow them to be specified in any order.
* g-builtins.cc (builtin_purge_tmp_files): New function.
* builtins.cc (general_functions): Add to list.
* g-builtins.cc, g-builtins.h (builtin_plot): Delete.
* builtins.cc (general_functions): Delete entry for builtin_plot.
* t-builtins.cc (builtin_set): Check to see if the user is setting
up parametric plotting.
* tree-plot.cc (parametric_plot): New global variable.
* tree_const.cc (save_three_d): New function.
* tree-plot.cc (tree_subplot_list::print): Handle 3D plots.
* Makefile.in: Delete everything having to do with distributing or
making gnuplot.
* configure.in: Likewise.
Thu Apr 8 10:02:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* utils.cc (send_to_plot_stream): New function. Move declaration
of plot_stream to utils.cc and make static.
* t-builtins.cc (builtin_set): New function.
* (builtin_show): Ditto.
* lex.l: Handle set command.
* (doing_set): Yet another global variable to control behavior of
the lexer.
* tree-plot.cc (tree_subplot_using::print): Print warning if scanf
format string is given.
* parse.y (ranges1): Allow lower and upper bounds to be optional.
* tree-plot.cc (tree_plot_range::print): Make it work.
* tree-plot.cc: New file, extracted from tree.cc.
* sighandlers.cc (install_signals): New function.
* (*_handler): New set of functions to handle signals that would
otherwise cause us to abort.
* (my_friendly_exit): Call exit from most signal_handlers to clean
up tmp files, etc.
* lex.l (do_string_escapes): Correctly handle '' quotes.
* Warn about unrecognized escape sequences but convert them to the
escaped character anyway.
* (EXPON): New definition. Use it and ? qualifier to shorten the
expressions for matching numbers.
* (ECHAR): New definition. Use it to correctly match
backslash-escaped characters in strings.
* Definitions: Surround multi-character definitions in ()'s to
avoid potential problems with things like {DEF}*.
* (QQ): Rename from DQ.
* (DQSTR): New definition for strings in double quotes.
* (DQSTRING): New start state. Recognizing a naked " puts us here.
* ("\n"): Turn off quote_is_transpose at the beginning of each line.
* Use error functions instead of writing messages directly.
* Don't include iostream.h -- we don't need it now.
* Do include error.h.
Wed Apr 7 13:12:17 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* sighandlers.h, sighandlers.cc: New files for signal handling
functions.
* Makefile.in: Include them in the usual places.
* octave.cc (interrupt_handler): Move to sighandlers.cc and rename
to sigint_handler.
* utils.cc (mark_for_deletion): New function.
* octave.cc (cleanup_tmp_files): New function.
* octave.cc (main): Register cleanup_tmp_files with atexit
(on_exit for sun).
* Stack.h: Template based stack class converted from libg++
genclass files.
* SLStack.h: Likewise.
* (SLStack::pop): Avoid apparent bug in SLList::remove_front.
Tue Apr 6 10:01:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (almost_match): New function.
* (plot_style_token): New function.
* t-buitlins.cc: Include procstream.h instead of procbuf.h.
* (builtin_help): Simplyfy opening of process output stream.
* (builtin_who): Likewise.
Mon Apr 5 13:48:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tc-extras.cc (tree_constant_to_scalar): Move to tree-const.cc
and make it a member function called to_scalar.
* (tree_constant_to_vector): Likewise.
* (tree_constant_to_matrix): Likewise.
* procstream.h, procstream.cc: New files/classes that implement
an ostream to a process. Built on top of procbuf from libg++.
* src/Makefile.in: Add them to the lists of files/objects.
Sat Apr 3 23:11:56 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Lots of clean-up changes to parse.y, tree.cc, tree.h, and
tree-base.h. Use more specific types than just <tree *> for
nonterminals. This allows us to have fewer virtual functions in
the base class. Safer. Cleaner. Should have always been this
way...
Fri Apr 2 10:04:32 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* parse.y, lex.l: Fix grammar to accept plot command very similar
to the gnuplot plot command.
Wed Mar 31 13:11:56 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (eval_undefined_error): Until we can figure out how to
clear names without causing problems later on, just remove the
symbol name.
* tree.h (tree_plot_command): New class.
* (tree_plot_limits): Ditto.
* (tree_plot_range): Ditto.
* (tree_subplot_list): Ditto.
* (tree_subplot_using): Ditto.
* (tree_subplot_style): Ditto.
* tree-base.h (command_type): Add plot_command to list.
Mon Mar 29 09:53:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* find_exec.c (ABSOLUTE_FILENAME_P): Also return true if the
given filename begins with `.'.
* DAE.cc, DAE.h, DAEFunc.h, tc-dassl.cc: Make sure all calls to
dassl and the user-supplied functions have consistent argument
lists.
* octave.cc (raw_program_name): New global variable to hold the
unprocessed argv[0]. This is to help dld find the absolute path
to the executing program.
* (initialize_globals): Pass in argc and argv from main.
Initialize raw_prog_name.
* builtins.cc (general_functions): Correct help message for dassl.
* g-builtins.cc (dassl_usage): Likewise.
* src/Makefile.in: Lots of changes to make things work with or
without dld.
* Makefile.in: Likewise.
* configure.in: Likewise.
* dld: New directory, containing our copy of the dld sources.
* dynamic-ld.cc, dynamic-ld.h: New files to implement dynamic
loading functions.
* src/Makefile.in: Add them to the distribution, compile them if
doing dynamic loading.
Sun Mar 28 11:03:15 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: When looking for Fortran compilers, check for fc
last to avoid confusion with some vendor's /bin/sh fc builtin.
* Handle new argument --with-dld.
* g-builtins.cc (builtin_warranty): Add 1993 to list of copyright
dates.
Sat Mar 27 17:58:23 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tc-extras.cc: Rename from tree-extras.cc.
* tc-colloc.cc, tc-dassl.cc, tc-det.cc tc-eig.cc, tc-fft.cc,
tc-fsolve.cc, tc-fsqp.cc, tc-ifft.cc, tc-inv.cc, tc-lsode.cc,
tc-lu.cc, tc-npsol.cc, tc-qr.cc, tc-quad.cc, tc-rand.cc,
tc-svd.cc: Split individual functions from tree-extras.cc.
* g-builtins.cc (npsol_usage): Improve message.
* (dassl_usage): Likewise.
* (builtin_lsode): Likewise.
* (builtin_fsolve): Likewise.
* (builtin_quad): Likewise.
* builtins.cc (general_functions): Improve corresponding messages.
* libcruft/fftpack: New directory for fftpack functions.
* libcrutf/fftpack/*.f: Add implicit double precision (a-h,o-z) at
the top of every subroutine.
* tree-extras.cc (fft): Allow propagation of empty matrices.
* (ifft): Ditto.
* Matrix.cc (Matrix::fourier): New function.
* (Matrix::ifourier): Ditto.
* mx-inlines (make_complex): New function.
* tree-extras.cc (fft): Use Matrix::fourier instead of doing real
to complex conversion here and calling ComplexMatrix::fourier.
* (ifft): Likewise, for ifourier.
Sat Mar 27 17:56:59 1993 Fook Fah Yap (ffy@eng.cam.ac.uk)
* Matrix.cc (ComplexMatrix::fourier): New function for fft.
* (ComplexMatrix::ifourier): New function for inverse fft.
* builtins.cc (general_functions): Add fft and ifft to the list of
builtin functions.
* g-builtins.cc (fft): New function.
* (ifft): Ditto.
* tree-extras.cc (fft): New function.
* (ifft): Ditto.
Sat Mar 27 13:53:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (usage_string): New file scope constant.
* (getopt_option_string): Ditto.
* error.cc: Declare all arguments const since we don't change them.
* utils.cc (print_str_or_null): Delete unused function.
* utils.h: Delete declaration.
* tc-assign.cc, tc-index.cc, tc-inlines.cc, tree.cc,
tree-const.cc: More error message cleanups.
* tree-const.cc (print_if_string): Don't write to cerr
unconditionally.
Fri Mar 26 22:00:18 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (min): Avoid function calls as arguments for MIN.
* (column_min): Ditto.
* (max): Likewise, for MAX.
* (column_max): Ditto.
* tree-const.h (NINT): Make it an inline function instead of a
macro.
* tree-extras.cc (fill_matrix (tree_constant&, double, char*)):
Convert to scalar type for complex values too.
* error.h (panic_impossible): New macro to be used in place of
assert (0) calls.
* All .cc files: Replace calls to assert (0) and abort () with
panic_impossible ().
* Many .cc files:: Replace many instances of `cerr << ...' with
calls to gripe() functions.
* gripes.h, gripes.cc: New functions for reporting common errors.
* Makefile.in: Include them in the usual places.
Thu Mar 25 18:42:49 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Many .cc files:: Replace many instances of `cerr << ...' with
calls to error() functions.
* error.h, error.cc: New functions for reporting errors in a
consistent way.
* Makefile.in: Include them in the usual places.
Wed Mar 17 17:29:44 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* symtab.cc (symbol_table::save): New functions.
* t-buitlins.cc (builtin_save): Use new functions for saving
symbols. Handle case of saving all variables.
* g-builtins.cc (builtin_pause): If one argument is given, pause
for that many seconds before continuing. Otherwise, wait for user
input.
* symtab.cc (clear): Actually delete undefined symbol_records and
remove their names from the list.
* lex.l (lookup_identifier): New function. Avoid putting global
names in the local symbol table.
* ({IDENT}): Use it
* ({IDENT}/{S}*=): Ditto.
* tc-index.cc (do_scalar_index (tree_constant*, int)): Make
indexing like a([1,1,1,1]) work for scalars. GAG.
Tue Mar 16 20:08:23 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* t-buitlins.cc (builtin_cd): Call tilde_expand (from readline) on
the argument.
* lex.l (discard_until): Delete unused function.
* When reading numbers, abort if scanf fails to read a number that
we think it should.
* (IDENT): New macro to match identifiers.
* ([_a-zA-Z][_a-zA-Z0-9]*): Use the / operator for trailing
context and split into two cases instead of trying to do the
lookahead ourselves.
* lex.l (do_comma_insert_check): Return the value yyleng had
before yyinput() is called.
* (DO_COMMA_INSERT_CHECK): New macro. This avoids the use of
unput() in do_comma_insert_check() since there seems to be a bug
in flex when calling unput() for '\n'.
Note that this change is necessary if we want to use yyless()
since we cant call yyless() from outside of yylex(), because
Flex's yyless() is a macro that uses some variables local to
yylex().
Mon Mar 15 11:03:43 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_matrix::eval): Undo part of previous change to
make a = [1,2;3,4]; [a,a;a,a] work again.
* parse.y (input): Don't abort for simple_list followed by EOF.
Sun Mar 14 14:38:56 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* RowVector.cc (RowVector::operator << ()): Insert a space between
each element.
* (ComplexRowVector::operator << ()): Ditto.
* g-buitlins.cc (plot): Don't declare plot_prog or plot_term as
static, and don't delete them.
* Matrix.h (all checkelem functions): Don't check for range errors
if NO_RANGE_CHECK is defined.
Sat Mar 13 10:18:51 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Matrix.cc (ComplexMatrix::prod): Make it work.
Thu Mar 11 00:08:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Matrix.h (ellum): Delete function.
* Declare and define new const elem, checkelem, and operator()
functions.
* ColVector.cc, DiagMatrix.cc, RowVector.cc, Matrix.cc, ODE.cc,
LinConst.cc, FEGrid.cc, DAE.cc, Bounds.cc, FEGrid.h:
Change all callers.
* tree-const.cc, tree-extras.cc, xdiv.cc, xpow.cc: Ditto.
* tree.cc (tree_matrix::eval): Improve row and column mismatch
checking -- [[1,2];[3,4]] works now, and [1,2;3,4,[5,6]] is
rejected.
* Reformat error messages to include `error:' prefix.
Wed Mar 10 14:02:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (do_comma_insert): New global variable.
* (reset_parser): Reset it.
* lex.l (do_comma_insert_check): New function. Call it wherever a
token can be directly followed by '['.
* (\[{S}*): Check the value of do_comma_insert.
* lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Only look for names in the
current symbol table.
* parse.y (word_list_cmd): Special case to disallow use of clear
inside a fuction body.
* parse.y (CLEAR): New %token.
* lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Return it if token is "clear".
* t-builtins.cc (builtin_clear): Allow global symbols to be
cleared.
* symtab.cc (symbol_table::undefine): Clarify comment.
* (symbol_table::clear): Don't actually remove names from the
table, just force them to be undefined.
* tree.h (tree_function): Delete unused data member `id'.
* tree.cc (tree_function constructors): Don't initialize id.
Mon Mar 8 15:50:28 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.70 released.
* src/Makefile.in: Update dependencies.
* tree.h: Include stdio.h, for FILE.
* gnuplot-build: For now, always define -DNOGAMMA.
* configure.in: Don't check for gamma().
* libcruft/Makerules.in: Don't use lib.a(obj.o) style dependencies
because it's too slow for large archives.
* liboctave/Makefile.in: Ditto.
Sun Mar 7 16:33:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (parse_and_execute): Save and restore current column
number. Set input line and column number to zero.
* tree.cc (parse_m_file): Likewise.
* tree.cc (tree_identifier::parse_m_file (FILE*, int*)): New
function. If a parse error occurs, ensure that the symbol is
cleared from the global symbol table.
* (tree_identifier::parse_m_file (char*, int): Use it.
* tree.cc (tree_identifier::do_lookup): New function.
* (tree_identifier::eval): Use it.
* utils.cc (decode_prompt_string): Really do use value of PWD.
* user_prefs.cc (sv_loadpath, sv_ps1, sv_ps2, sv_pwd,
sv_gnuplot_binary, sv_graphics_terminal): New functions.
* (sv_graphics_terminal): Warn if terminal isn't valid, but set it
anyway (it's too late to do anything by the time the function is
called).
* In functions that use these variables: Use the value from the
user_pref structure instead of doing a symbol table lookup.
* builtins.cc (builtin_string_variables): Add functions to call
for LOADPATH, PS1, PS2, PWD, gnuplot_binary, and graphics_terminal.
* builtins.cc (PS2): New builtin_string_variables. Set default
value to "> ".
* input.cc (octave_gets): Use it instead of no prompt for
continued input.
* parse.y (yyerror): Use line, column, file name, and text of
current input line to print better parse error messages.
* lex.l (NEW_MATRIX): New exclusive start state. Need this to be
able to match \[{SN}* _and_ get secondary prompting right.
* input.cc (octave_read): Keep track of current input line.
* tree.cc (parse_m_file): Save and restore current line number.
* lex.l (all patterns): Keep track of current input column.
* (fixup_column_count): New function to deal with patterns that
match more than one line.
* input.h, input.cc (current_input_line): Global pointer to
the text of the current input line.
* parse.y, parse.h (input_line_number, current_input_column): New
global variables.
* Almost all source files: Finish (for now, at least) the
reorganization we started for global variables.
Wed Mar 3 14:49:59 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tc-assign.cc, tc-index.cc, tc-inlines.cc: New files, split out
from tree-const.cc.
* Almost all source files: reorganize so that all global data is
declared in some include file or another. It probably wouldn't
hurt to do some more reorganizing to try to eliminate the amount
of global information...
Tue Mar 2 20:49:35 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* variables.h, variables.cc: New files for handling things that
need symbol table information. Lots of files changed to include
variables.h, which now includes the extern declarations for the
symbol tables. The declarations of the symbol tables are now in
variables.cc, but they are still initialized in octave.cc.
Mon Mar 1 11:35:03 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* builtins.h (builtin_string_variables): New field, sv_function,
holds a pointer to the function to call when a variable changes.
* builtins.cc (string_variables): Initialize sv_function field.
* (install_builtins): While installing builtin string variables,
stash sv_function and, if it isn't NULL, call it to initialize
global variable user_pref.
* symtab.h (symbol_record): New field, sv_fcn, holds a pointer to
the function to call when a variable changes.
* symtab.cc (symbol_record::define): Call sv_fcn if it isn't NULL.
* symtab.cc (symbol_record::set_sv_function): New function.
* utils.cc, parse.y, tree.cc, tree-extras.cc, tree-const.cc,
idx-vector.cc, builtins.cc, symtab.cc: Instead of calling
functions like do_fortran_indexing(), get the user's preference
from the global struct user_pref.
* utils.h, utils.cc: Delete all functions like do_fortran_indexing()
that lookup user variables to find integer values.
* user-prefs.h, user-prefs.cc: Move them here, but instead of
returning values, set elements of the new global struct user_pref.
* user-prefs.h, user-prefs.cc: New files for handling global
variables for user preferences.
* Makefile.in: Add them to the SOURCES and INCLUDES macros.
* bsd-math/{acosh,asinh,atanh,log1p}.c: Declare all external
functions used in each file since they might not be in math.h.
* bsd-math/{scalb,copysign,logb,finite,drem,sqrt}.c: New files
from BSD's support.c. Only using scalb, copysign, logb, and
finite for now.
* configure.in: Move tests for f77 closer to the top.
* Allow configuration to proceed even if we can't find a Fortran
compiler or f2c.
* Use `here' documents instead of multiple echos for multi-line
messages.
* Imrpoved checking for missing math functions.
Sun Feb 28 17:45:53 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* test/Makefile.in (check): Try to avoid errors from cp.
* mappers.cc (xfinite): Put test for HAVE_FINITE first.
* libcruft/Makerules.in (LIBCRUFT_DEPEND): Use `=' in assignment
instead of `:='.
* liboctave/Makefile.in: Make an explicit list of sources instead
of using $(wildcard).
Thu Feb 25 20:18:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* bsd-math/copysign.c: New file. HP's don't have this?
* configure.in (LIBOBJS): Also check for copysign, log1p, and
log__L. For each missing user-level function, add -DFOO_MISSING=1
to DEFS.
* src/missing-math.h: For each function we declare, check the
corresponding XXX_MISSING macro. Add declarations for copysign
and log1p.
Wed Feb 24 20:39:32 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (<MATRIX>{SN}*\]/{S}*==): Change scanning pattern to
<MATRIX>{SN}*\]{S}*/== in order to keep flex from generating any
backtracking code.
* (<MATRIX>{SN}*\]/{S}*=): Likewise.
Tue Feb 23 02:45:00 1993 John W. Eaton (jwe@ward.che.utexas.edu)
* Version 0.69 released.
* mappers.cc [_AIX && __GNUG__] : Provide a definition for
finite(), since whatever version we get from the system when using
g++ doesn't work (note that it does seem to work with gcc, xlc,
and xlC).
* bugs.texi: Note that the math.h file from libg++ declares
finite() incorrectly for some systems.
Mon Feb 22 02:04:16 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Look for runtest, but only believe that it exists
if we can also find expect.
* test/Makefile.in (check): Run tests in build directory, not
source directory.
* tree.cc (reading_script_file): New global variable.
* (parse_m_file): Use it, and properly save and restore state so
that nested script files will work.
* octave.cc (parse_and_execute): Properly save and restore state
so that nested script files will work.
* Don't close input file here.
* input.cc (get_input_from (FILE*)): Don't declare mf_instream
static. Set mf_instream if reading and M-file or a script file.
* parse.y: Minor changes to accomodate new lexer.
* lex.l: Major overhaul in an attempt to do better string
handling. Looks much simpler and even seems to work.
* (do_string_escapes): New function.
Sat Feb 20 00:40:32 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_npsol): If npsol is missing, return empty
matrices for x and phi, and -1 for inform.
* num2str.m: Use %g, not %f.
* tree.cc (parse_m_file): Save and restor curr_sym_tab, because
yyparse may mess with it if it encounters a function definition.
* tree-extras.cc (eval_string): Ditto
* octave.cc (parse_and_execute): Ditto
* Makefile.in (DISTDIRS): Add bsd-math to list.
* src/Makefile.in (LIBOBJS): New macro, value set by configure.
(vpath): Add @srcdir@/../bsd-math for LIBOBJS.
(octave): Add $(LIBOBJS) to deps.
* gnuplot-build/Makefile.in: Likewise, for notgnuplot.
* configure.in: Use AC_REPLACE_FUNCS to Check for acosh, asinh,
atanh, and gamma.
* bsd-math: New directory for functions from the BSD math library
to use as replacements for missing functions.
* parse.y (semi_comma, comma_semi): New rules.
(simple_list, simple_list1): Use them to allow empty statements.
(list, list1): Likewise. This allows empty commands as long as
the empty command doesn't contain any newlines.
* parse.y (simple_assign): New rule, allows things like a = b = c.
(multi_assign): Extracted from assignment.
(assignment): Split into simple_assign and multi_assign.
(expression): Allow '(' simple_assign ')' to be an expression.
* tree-extras.cc (eval_string): Return result of last expression
evaluated, to make things like `eval ('1+1;')*2' work.
Fri Feb 19 19:45:21 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_pwd): Use getcwd, which is defined in
unistd.h, instead of getwd, which seems to be a BSDISM.
* utils.cc (decode_prompt_string): Ditto.
* (get_working_directory): Ditto.
* arith_ops.cc (DIVIDE_BY_ZERO_ERROR): Don't rely on
HAVE_IEEE_MATH, use HAVE_ISINF, HAVE_FINITE, and HAVE_ISNAN
instead.
* configure.in: Don't define HAVE_IEEE_MATH.
* tree-extras.cc: Include stdio.h for FILE.
Thu Feb 18 10:17:38 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (gobble_leading_white_space): New function.
* (is_function_file): New function.
* (parse_m_file): Handle case of .m file being just a file of
commands to execute.
* Add optional argument to specify whether to execute a script
file.
* Return whether a script file was executed.
* (tree.cc, tree-extras.cc): Change callers.
* octave.cc (parse_and_execute): new functions.
* (execute_startup_files): Use them.
* lex.l (<COMMENT>\n): Don't gobble new line.
* num2str.m: Don't print '\n'.
Wed Feb 17 21:59:55 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* mappers.cc: Simplify and correct finite, isinf, isnan functions.
* test/octave/t7.oct: New test for finite, isinf, and isnan
functions.
* configure.in: Define HAVE_IEEE_MATH if isnan and either finite
or isinf is available.
* builtins.cc (mapper_functions): Check HAVE_ISNAN instead of
HAVE_IEEE_MATH to determine whether or not to define isnan().
* mappers.cc: Don't check for HAVE_IEEE_MATH. Just check for
individual functions directly.
* g-builtins.cc (npsol_usage): Correct usage message.
* g-builtins.cc: Don't include unistd.h unless HAVE_UNISTD_H is
defined.
* t-builtins.cc: Ditto.
* utils.cc: Ditto.
Tue Feb 16 00:35:44 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.68 released.
* tree.cc (parse_m_file): Set reading_m_file before calling
get_input_from_file.
* Don't mess with current_infile.
* input.cc (get_input_from_file): Set mf_instream if we are
reading an M-file. Otherwise, set rl_instream, (even if we aren't
really using readline -- this is just the `normal' input stream).
* Don't use current_infile.
* (octave_read): If not interactive, check reading_m_file to
determine where to look for input.
* octave.cc (main): Don't use readline if we aren't interactive.
* libcruft/misc/Makefile.in (local-dist): Make sure we don't
distribute a bogus d1mach.f.
(dist): Ditto.
* tree-extras.cc (convert_to_ans_assign): New global variable.
(eval_string): Conditionally turn off assignment to `ans', for
get_user_input ().
* parse.y (ans_expression): Use it.
* lex.l (reset_parser): Reset it.
* g-builtins.cc (builtin_input): New function.
* builtins.cc (general_fucntions): Add it to the list.
* tree-extras.cc (get_user_input): Do most of the real work.
Mon Feb 15 01:14:40 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* t-builtins.cc (load_variable): New function.
(builtin_load): Use it.
* Makefile.in (SUBDIRS): Add the test directory.
(check): Don't depend on all.
Sat Feb 13 05:17:53 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (determinant, lu, matrix_exp, matrix_log,
matrix_sqrt): Handle empty matrix argument.
* Matrix.h: Add constructors of the form Matrix (double a) and
ColumnVector (double a) to make it even easier to form single
element vectors.
Fri Feb 12 03:27:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (main): Add -v option that will print the version
string and quit with a successful exit status.
Thu Feb 11 00:46:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (eig): If given an empty argument, return enough
empty matrices to fill all possible LHS variables.
(qr): Likewise.
(svd): Likewise.
* tree-const.cc (fortran_style_matrix_assignment): Do the right
thing if LHS is an empty matrix.
* tree-extras.cc (qr): Handle empty matrix argument.
* Matrix-ext.cc (QR): Make it work (really!).
(ComplexQR): Ditto.
Wed Feb 10 00:56:31 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* xdiv.cc (xdiv (ComplexMatrix& a, ComplexMatrix& b)): Do
btmp.solve (atmp), like the other three xdiv's. Argh!
* tree-extras.cc (eval_string): New function. Mostly works but
could be very fragile. We desperately need some sort of
`unwind-protect' scheme to avoid disaster when octave is
interrupted.
* g-builtins.cc (builtin_eval): Instead of just aborting, call
eval_string if given one argument.
* input.cc (octave_read): If get_input_from_eval_string is
nonzero, stuff current_eval_string into buf for flex to read.
* tree-extras.cc (char *current_eval_string): New global variable
for eval().
* (int get_input_from_eval_string): Ditto.
* Update copyright notices to include 1993 (now that it's
February...).
Tue Feb 9 14:35:08 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.67 released.
* tree-extras.cc, tree-const.cc: Check the value of the variable
`propagate_empty_matrices' to decide what to do about empty
matrices in binary and unary operations and some function calls.
* builtins.cc (builtin_string_variables): New global variable
`propagate_empty_matrices' with initial value `warn'.
* utils.cc (propagate_empty_matrices): New function.
Mon Feb 8 19:46:51 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-const.cc: Finish changes required to make zero-one indexing
work for indexing and assignment.
Sat Feb 6 15:54:10 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* builtins.cc (builtin_string_variables): New global variable
`prefer_zero_one_indexing' with initial value `false'.
* utils.c (prefer_zero_one_indexing): New function.
Fri Feb 5 13:03:14 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* idx-vector.h, idx-vector.cc: Major overhaul to help with
zero-one style indexing.
* tree-const.cc (matrix_to_index_vector): Delete functions.
* (functions that use idx_vectors): Update for new idx-vector
stuff.
* arith-ops.cc: Don't declare matrix_to_fortran_indices.
* tree-const.cc (matrix_to_index_vector): Add new argument,
allow_neg_one, with default value of false.
* (matrix_to_fortran_indices): Add new argument, allow_zero, with
default value of false.
* g-builtins.cc (builtin_find): New function.
* builtins.cc (general_fucntions): Add it to the list.
* tree-extras.cc (find_nonzero_elem_idx (tree_constant)): Do
most of the real work.
* tree-extras.cc (find_nonzero_elem_idx (const Matrix&): Do the rest.
* (find_nonzero_elem_idx (const ComplexMatrix&): Ditto, for complex.
Wed Feb 3 00:54:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in (DEFAULT_DOT_O_FROM_DOT_F): If using f2c, quote
with single quotes instead of double quotes to avoid problems on
systems (like the NeXT) that strip \'s from double quoted strings.
* utils.c (empty_list_elements_ok): New function.
* tree.cc (matrix_list::eval): Use it.
* builtins.cc (builtin_string_variables): New global variable
`empty_list_elements_ok' with initial value `warn'.
* utils.cc (check_str_pref): New function.
* (resize_on_range_error, prefer_column_vectors,
warn_comma_in_global_decl, do_fortran_indexing,
implicit_str_to_num_ok, treat_neg_dim_as_zero,
ok_to_lose_imaginary_part, return_last_computed_value,
silent_functions, print_answer_id_name): Use it instead of
needlessly duplicating code.
Tue Feb 2 16:58:02 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l ("'"): If it looks like we're defining a matrix, don't set
the start condition to be MAYBE_QSTRING. GAK. There has to be a
better way...
* lex.l: Increment and decrement promptflag instead of just
setting its value. This should help get prompting right for
things like if [1,2;3,4] NL ...
* input.cc (octave_gets): In order to issue a prompt, Require
propmtflag to be greater than zero, not just nonzero.
* tree.cc (tree_if_command): Allow matrices as the expression to
test. Unlike Matlab, a complex value is false only if both the
real and imaginary parts are 0.
* tree.cc (tree_while_command): Ditto.
* tree.cc (tree_for_command): Allow matrices and complex values
in the expression. For matrices, assign each column in turn to
the dummy variable.
* Matrix-ext.cc (qr): Make it work. The LAPACK book gags me again!
* xdiv.cc: When computing right division with complex matrices,
use hermitian() instead of transpose().
* lex.l: Return IMAG_NUM for a numeric constant followed by
[iIjJ], but don't allow spaces between the numeric constant and
the letter (it causes problems inside `[]' where spaces matter...
Mon Feb 1 17:15:19 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree_extras.cc (rand_internal): Make the random number generator
give us a different sequence every time we start octave unless we
specifically set the seed.
Thu Jan 28 00:10:24 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.66 released.
* configure.in: Define PLOTLIB in addition to adding -DUNIXPLOT to
DEFS if we find -lplot, and call AC_SUBST for PLOTLIB.
* QP.cc: Define constructors here.
* QP.h: Not here.
* QP.cc (All constructors that are given H): Force H to be
symmetric.
* (make_h_symmetric): New function.
Wed Jan 27 01:35:53 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* arith-ops.cc (do_unary_op): Do the right thing for complex
logical not operator.
* Matrix.cc (ComplexMatrix::operator ! (void)): Return Matrix
instead of ComplexMatrix.
* mx-inlines.cc (not (Complex *d, int len)): For each element of
d, return (d[i] == 0.0), not (d[i] != 0.0), and return it as a
pointer to double, not Complex.
* configure.in: Check for libcruft/qpsol/qpsol.f.
* Create Makefile in libcruft/qpsol.
* libcruft/qpsol: New directory. Copy QPSOL sources here.
* libcruft/qpsol/Makefile.in: New file.
* libcruft/qpsol/README.MISSING: New file.
* libcuft/Makefile.in: Include qpsol in list of directories to
make.
* QPSOL.h, QPSOL.cc: New file for solving QPs with Gill and
Murray's QPSOL.
* QLD.h, QLD.cc: Delete all minimize functions except
Vector minimize (double&, int&).
* QP.h: Declare minimize functions virtual.
* (Vector minimize (double&, int&): Declare as a pure virtual
function.
* QP.cc: New file to implement generic minimize functions.
Tue Jan 26 00:27:13 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l: Recognize numbers of the form .{digits}E{digits} and
.{digits}E[+-]{digits}
* lex.l: Recognize .\ as ELEFTDIV.
* parse.y: Handle ELEFTDIV.
* tree.cc (tree_binary_expression::eval): Handle el_leftdiv.
* arith-ops.cc (do_binary_op): Handle element by element left
division. Fix some errors in element by element right division.
* tree-base.h (enum expression_type): Add el_leftdiv.
* Version 0.65 released.
* tree-const.cc (tree_constant_rep::eval (tree_constant *args, int
nargin, int nargout, int print)): Fix another brain-o in making
recursive call.s
* src/Makefile.in: Complete changes for CXX instead of C++ make
variables.
* tree-const.cc: For assignment and indexing functions, treat
complex scalars and matrices in the same branch of the switch as
real scalars and matrices -- the double_value() and matrix_value()
functions take care of checking to see if it's ok to lose the
imaginary part.
* tree-const.h (tree_constant_rep::is_numeric_type): New function.
* tree-const.h (tree_constant::make_numeric functions): Use it.
* tree-const.h (tree_constant::make_numeric functions): Return
*this for complex constants too.
Mon Jan 25 18:31:06 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (Matrix min (Matrix&, Matrix&)): Loop over nc and
nr, not nr and nr.
* (Matrix max (Matrix&, Matrix&)): Ditto.
* tree-const.cc (tree_constant_rep::mapper): Fix brain-o in making
recursive call.
Sun Jan 24 20:05:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: If using f2c, explicitly check for -lf2c. If it's
not found, look for -lF77 and -lI77. If a suitable combination
isn't found, print a warning.
* src/Makefile.in liboctave/Makefile.in: GNU Make 3.63 uses CXX
and CXXFLAGS instead of C++ and C++FLAGS. Fix things so that 3.63
will work without sacrificing compatibility with earlier versions.
* tree-const.cc (tree_constant_rep::diag (tree_constant&)): Fix
brain-o in forcing argument to be numeric.
Fri Jan 22 15:03:42 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (interrupt_handler): Declare to take int argument.
* NPSOL.cc (npsol_objfun): Delete leftover debugging message.
Thu Jan 21 14:28:24 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Check version of gcc and issue a warning if it
looks like 1.something.
* Check for g++. Issue a warning if it is missing or if it is
there but it looks like verion 1.something.
* flibs.sh, f2c-compat.sh: Change file permission to 755 to avoid
problems if the uid of the installer is different from the uid of
the owner of the files.
Wed Jan 20 04:18:49 1993 John W. Eaton (jwe@june.che.utexas.edu)
* libcruft/Makerules.in (@DOT_O_DOT_F_C[1234]@): Patterns deleted.
* configure.in: Do multiple line sed substitutions the right way.
Tue Jan 19 14:50:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Use new AC_WITH to accept --with-f2c instead of
--use-f2c.
* Use new AC_HAVE_LIBRARY to find -lplot.
* flibs.sh: Actually avoid including duplicate -lflags.
* Use test, not `['.
Sun Jan 17 16:57:02 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Matrix.h: Declare operator+ and operator- functions for vectors.
* RowVector.cc: Define half of them.
* ColVector.cc: Define the other half.
Fri Jan 15 03:00:46 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/Makefile.in (install): Include version number in name of
installed binary and make a link to $(bindir)/octave.
* Version 0.64 released.
* t-builtins.cc (builtin_clear): Don't allow the user to clear
global symbols by name. If he tries, issue a warning.
* tree.cc (tree_identifier::eval_undefined_error): Don't clear
undefined symbols from the global or local (function) symbol
tables.
Thu Jan 14 02:10:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_function::eval): Save old and set current symbol
table context, so eval_undefined_error() doesn't wipe out top
level symbols.
* Version 0.63 released.
Wed Jan 13 13:16:56 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Nearly every .h and .cc file: Add interface and implementation
#pragmas for G++ in hopes of making smaller objects with -g.
* tree-const: Properly handle assignments like A(:) = RHS when
do_fortran_indexing is true.
* g-builtins.cc (builtin_eig): Correct usage message.
* tree-const.cc (tree_constant_rep (ComplexDiagMatrix&)): Create
and initialize a new complex_scalar. Don't just try to copy the
value...
* Matrix.h: Declare new fill functions for diagonal matrices.
* DiagMatrix.cc: Define them.
* Matrix.h: Declare map functions for row and column vectors.
* RowVector.cc: Define them.
* ColumnVector.cc: Likewise.
* CollocWt.h: Declare data protected instead of private.
* CollocWt.cc (CollocWt::CollocWt (const CollocWt&)): Fix brain-o.
* lex.l: Return IMAG_NUM for a numeric constant followed by
[ \t]*[iIjJ].
* parse.y (IMAG_NUM): New token.
* (fact): Recogize IMAG_NUM and convert its value to a complex
constant.
* Version 0.62 released.
* Makefile.in (local-dist): Include -local in tar.Z filename.
* (split-local-dist): New target.
* (dist): Don't depend on newversion.
* (local-dist): Ditto.
* tree-extras.cc (npsol): If the first argument isn't a vector,
print an error message and return.
* tree.cc (tree_matrix::eval): Always set prev_row_total and
prev_column_total when starting out.
* octave.cc (main): Don't try to detect signal handler failures,
but do call signal() to set up the interrupt handler.
Tue Jan 12 19:59:33 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (npsol): Fix brain-o in checking length of bounds
vectors.
Mon Jan 11 20:32:24 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (set_rand_seed): New function.
(force_to_fit_range): New function.
(current_seed): Really return current seed.
(rand_internal): Allow the user to actually set the seed for the
random number generator.
Sun Jan 10 16:46:06 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.61 released.
* builtins.h, builtins.cc: Rename from builtin-fcns.h,
builtin-fcns.cc (too long for Linux/SysV).
* mappers.cc (xisinf): For non-IEEE machines, consider DBL_MAX to
be infinite.
Fri Jan 8 09:15:57 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* gnuplot-build/Makefile.in (x11targets): Don't worry about
checking HAVE_X11_X_H.
* configure.in: Check for gamma and lgamma for gnuplot.
* gnuplot-build/Makefile.in (Makefile.X11): Only move Makefile to
../Makefile.X11 if xmkmf succeeds.
* gnuplot-build/Makefile.in (x11targets): Check to see that XMKMF
is set *and* that Makefile.X11 exists.
* If making notgnuplot_x11 with Makefile.X11 fails, try again with
Makefile.
* gnuplot-build/Makefile.in: Use @PLOTLIB@ in definintion of LIBS.
* Don't define UNIXPLOT in TERMFLAGS.
* Don't define LN_S; it isn't used anywhere, and configure doesn't
give it a value.
* configure.in: Check for closepl(). If found, define UNIXPLOT,
and substitute -lplot for @PLOTLIB@.
* arith-ops.cc (DIVIDE_BY_ZERO_ERROR): New macro. On systems that
have IEEE math, give a warning but also go ahead and divide by
zero. On systems that don't have IEEE math, just give an error
message and return an undefined tree_constant (it would probably
be possible to handle this so that it works the same everywhere,
but I'm not sure it's worth the effort...).
* builtin-fcns.cc (install_builtins): On systems that don't have
IEEE_MATH, define Inf to be MAX_DBL, but don't define NaN at all.
* configure.in: Check for finite, isnan, and isinf.
* Set HAVE_IEEE_MATH if we find finite and isnan.
* builtin-fcns.cc (install_builtins): Use HAVE_IEEE_MATH instead
of IEEE_MATH.
* mappers.cc: Check HAVE_IEEE_MATH and HAVE_ISINF macros rather
than checking system type.
* graph3d.c (hidden_line_plot): Declare dy and y as double, not
float, since VERYLARGE can be DBL_MAX.
* lsoda.f, lsodar.f, lsodes.f, lsodi.f, lsoibt.f, stoda.f,
stodi.f, zrotg.f, sdot.f: Remove unused files.
* texas_lotto.m: Renamed from win_texas_lotto.m to keep the
filename less than 14 characters.
Thu Jan 7 15:45:29 1993 John W. Eaton (jwe@june.che.utexas.edu)
* utils.cc: Declare ioctl extern "C".
* tree.cc: Include stdio.h to be sure FILE is defined (apparently
not required by older versions of GNU iostream library).
* t-builtins.cc: Likewise.
* g-builtins.cc: Likewise, but for tmpnam.
* tree-const.h (rand_internal): Rename from rand to avoid
conflict with standard library rand (a macro in Linux).
* tree-extras.cc (rand_internal): Fix function definition.
* g-builtins.cc (builtin_rand): Call rand_internal instead of rand.
* octave.cc (main): Don't try to detect signal handler failures.
What's the proper way to do this if RETSIGTYPE is void?
Tue Jan 5 08:14:29 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_matrix::eval): When adding a matrix down or to the
right, column or row dimension mismatches are always errors.
Mon Jan 4 04:58:55 1993 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.60 released.
* xdiv.h, xdiv.cc: New files for Octave-specific matrix division
stuff.
* src/Makefile.in (INCLUDES, SOURCES, OBJECTS): Add xdiv stuff.
* arith-ops.cc: Include xdiv.h.
Sun Jan 3 12:24:04 1993 John W. Eaton (jwe@ward.che.utexas.edu)
* gnuplot-build/Imakefile.in (notgnuplot_x11): In the compile
command, put source file before libraries.
* libcruft/misc/Makefile.in: Don't use -O to compile gen-dimach.c.
Thu Dec 31 00:45:50 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (matrix_sqrt): Don't create D until it is really
needed.
* (matrix_log): Ditto.
* (matrix_exp): Ditto.
[this should really be just one function instead of three...]
* g-builtins.cc (builtin_sqrtm): New function.
* builtin-fcns.cc (general_fucntions): Add it to the list.
* tree-extras.cc (matrix_sqrt): Do the real work.
* Makefile.in: Distribute INSTALL.OCTAVE and configure.in.
* (INSTALL.info): Make ../INSTALL.OCTAVE, not ../INSTALL.
* doc/Makefile.in: Make ../INSTALL.OCTAVE, not ../INSTALL.
* INSTALL.OCTAVE: Rename from INSTALL.
Refer to INSTALL for more info.
* INSTALL: Copy from autoconf distribution.
Refer to INSTALL.OCTAVE for more info.
* octave.cc (main): Remove leading blank line from startup message.
* Don't print it everytime the user types C-c...
* xpow.cc: Finish off remaining cases.
* tree-extras.cc (process_format): New function.
(do_printf): Use it.
Wed Dec 30 00:43:14 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.56.
* g-builtins.cc (builtin_logm): New function.
* builtin-fcns.cc (general_fucntions): Add it to the list.
* tree-extras.cc (matrix_log): Do the real work.
* g-builtins.cc (builtin_expm): New function.
* builtin-fcns.cc (general_fucntions): Add it to the list.
* tree-extras.cc (matrix_exp): Do the real work.
* Matrix-ext.cc (LU): Construct LU decomp. here, not in Matrix class.
(ComplexLU): Likewise.
* Matrix.cc (lu): Deleted. Use LU constructor instead.
Change all uses in octave sources.
* Matrix-ext.cc (EIG): Construct EIG object here, not in Matrix class.
* Matrix.cc (eig): Deleted. Use EIG constructor instead.
Change all uses in octave sources.
* Matrix-ext.cc (SVD): Construct SVD here, not in Matrix class.
(ComplexSVD): Likewise.
* Matrix.cc (svd): Deleted. Use SVD constructor instead.
Change all uses in octave sources.
* Makefile.in: Update for new Matrix file organization.
Don't compile mx-inlines separately -- it's included where needed.
* Matrix.h: Declare Fortran routines we call here, not in Matrix.cc.
Don't declare every class to be a friend of every other class.
* mx-inlines.cc: New file, included by all Matrix-related .cc files.
* Matrix.cc: Split into several files.
* ColVector.cc: New file, from Matrix.cc
* RowVector.cc: Ditto.
* DiagMatrix.cc: Ditto.
* Matrix-ext.cc: Ditto.
* tree-extras.cc (svd): Take advantage of new constructors and
diag functions.
* Matrix.cc (DiagMatrix::diag) New function.
(ComplexDiagMatrix::diag) Ditto.
* tree-extras.cc (eig): Take advantage of new constructors.
* tree-const.cc (tree_constant (DiagMatrix)): New constructor.
(tree_constant (ComplexDiagMatrix)): Ditto.
* Matrix.cc (Matrix (const DiagMatrix)): New constructor.
(ComplexMatrix (const DiagMatrix)): Ditto.
(ComplexMatrix (const ComplexDiagMatrix)): Ditto.
Tue Dec 29 01:14:49 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (main): Print message at startup by default.
Don't print it until just before main loop.
* New -q option (inhibit_startup_message) turns it off.
* New -f option (read_init_files) inhibits reading of startup files.
* Delete -v option.
* (verbose_usage): Reflect changes in arguments, document -d.
* win_texas_lotto.m: Sort picks before returning.
* tree-extras.cc (eig): Return [v,d], not [l,v], where d is a
diagonal matrix made from l.
* builtin-fcns.cc (mapper_functions): Fix last element of
initialization list to have correct number of elements.
* Version 0.55.
* Quad.h: Move all inline functions to Quad.cc to avoid apparent
g++ bug on the RS/6000.
* configure.in: If we find flex, don't define LEXLIB.
* COPYING.LIB: Deleted -- we're not actually distributing anything
under these terms.
* Makefile.in: Don't distribute COPYING.LIB.
Mon Dec 28 00:46:21 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* xpow.h, xpow.cc: New files for safer pow() interface for octave.
* src/Makefile.in (INCLUDES, SOURCES, OBJECTS): Add xpow stuff.
* arith-ops.cc: Include xpow.h.
* Don't declare toplevel jmp_buf.
* t-builtins.cc (builtin_save): Make file and stream static to
avoid dumping core on return (is this a bug in libg++ or g++?).
* (builtin_load): Ditto.
* symtab.cc (load): Make it work again. Yikes! This hasn't
worked since the big symbol table overhaul...
* tree-const.cc (tree_constant_rep::save): Handle complex scalars
and matrices.
* (symbol_def::undefine): Delete previous symbol definition before
defining. This should be ok now, after the parse_m_file fix of
27 Dec.
* getting_help: New global flag.
* ([_a-zA-Z][_a-zA-Z0-9]*): Set it if looking at "help".
* (reset_parser): Clear it.
* lex.l (STRING): Use it to determine what to do with ' ; and , .
* lex.l (QSTRING): Handle the following (C-style) backslash escape
sequences correctly(?).
\a bell \r carriage return
\b backspace \t horizontal tab
\f formfeed \v vertical tab
\n newline \\ backslash
* median.m: New M-file.
* g-builtins.cc (builtin_sort): New function.
* builtin-fcns.cc (general_fucntions): Add it to the list.
* tree-extras.cc (sort): Do most of the real work.
* tree-extras.cc (mx_sort): Do the rest.
Sun Dec 27 17:40:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* t-builtins.cc (builtin_casesen): New function.
* builtin-fcns.cc (text_functions): Add it to the list.
* strcmp.m: Temporarily allow string to numeric conversions.
Maybe strcmp() should be built in to the interpreter?
* norm.m: New M-file.
* builtin-fcns.cc (install_builtins): Treat i and j as functions,
not variables.
* Install inf as an alias for Inf.
* Install nan as an alias for NaN.
* tree.cc (tree_identifier::parse_m_file (char*)): Force new
global symbol to be a function, not a variable.
Tue Dec 22 14:15:57 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_function::eval): Check with silent_functions()
and return_last_value_computed() to determine proper behavoir.
* builtin-fcns.cc (silent_functions): New builtin variable.
* (return_last_value_computed) Ditto.
* utils.cc (silent_functions): New function.
* (return_last_value_computed) Ditto.
[This scheme for determining preferences needs to be reworked...]
* lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Only force yytext[len] to be the
end of the identifier if we gobbled some whitespace.
* Always unput the last character read.
* tree.cc (tree_function::eval) Always turn on printing for
commands inside functions.
Sat Dec 19 14:03:49 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.54.
Fri Dec 18 16:02:59 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* (symbol_def::undefine): Undo previous change. Someone is
calling this function when they shouldn't be...
* tree.cc (parse_m_file): If the script file is successfully
parsed, Ensure that the new symbol is defined in the global
symbol table.
* lex.l: Handle continuation lines with the pattern
{EL}{S}*\n { promptflag = 0; } // Line continuation.
Thu Dec 17 01:47:14 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* symtab.cc (symbol_def::define): Delete previous symbol
definition before defining.
(symbol_def::undefine): Ditto, but new definition is always NULL.
* readline/Makefile.in: Don't compile emacs_keymap.c and
vi_keymap.c since they are included by keymaps.c.
* configure.in: If RETSIGTYPE isn't int, then define
VOID_SIGHANDLER="-DVOID_SIGHANDLER=1".
Substitute VOID_SIGHANDLER.
* readline/Makefile.in (CFLAGS): Add -DVOID_SIGHANDLER if
appropriate.
* tilde.c: Declare xmalloc, not malloc.
* lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Only call unput if we've
actually read something.
* Version 0.53.
Wed Dec 16 01:35:48 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Look in the global symbol table
for names, but ignore functions.
* tree.cc (tree_identifier::eval): Use symbol_out_of_date() to
simplify logic for re-parsing M-files.
Always look in global symbol table for functions in case the
definition has changed (shouldn't the local symbols be undefined
anyway??).
* tree.cc (symbol_out_of_date): New function.
* symtab.cc (symbol_table::undefine): Actually do something.
* (symbol_table::remove_name): Ditto.
* (symbol_table::clear): And so on.
* Matrix.cc (ComplexMatrix::svd): Use complex conjugate transpose,
not simple transpose, for V.
* Version 0.52.
* gnuplot-build/Imakefile (notgnuplot_x11): In the compile
command, put source file before libraries.
* parse.y (assignment): If trying to warn against assignment to a
function, check is_function() instead of !is_variable().
* src/Makefile.in: Distribute input.h.
Tue Dec 15 10:48:22 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (main): Call initialize_readline to set up completion
functions.
* input.cc (make_name_list, command_generator, command_completer,
initialize_readline): New functions.
* input.h: New file.
* lex.l: Include it instead of input.cc.
* src/Makefile.in: Create input.o rather than including it
directly in lex.l.
* builtin-fcns.cc: do_fortran_indexing is now initially false.
prefer_column_vectors is now initially true.
* builtin-fcns.cc (install_builtins): Install i and j
(== sqrt(-1)) as permanent global variables.
* g-builtins.cc (MAXPATHLEN) Provide default definition here.
* t-builtins.cc: Not here.
* g-builtins.cc (quitting_gracefully, interactive,
clean_up_and_exit, verbatim_pwd, getwd) Declare here.
* t-builtins.cc: Not here.
* g-builtins.cc: Also include readline.h and history.h.
* g-builtins.cc: Include version.h and sys/param.h here.
* t-builtins.cc: Not here.
* g-builtins.cc: Move builtin_clc, builtin_clock, builtin_date,
builtin_pause, builtin_quit, builtin_warranty here from
t-builtins.cc.
* builtin-fcns.cc (general_functions): Move builtin_clc,
builtin_clock, builtin_date, builtin_pause, builtin_quit,
builtin_warranty here from text_functions to limit the number of
reserved words.
* scripts/*.m: Check for correct number of input arguments before
proceeding.
* configure.in (DEFAULT_PAGER): Look for less, more, page, and pg.
* t-buitlins.cc (builtin_help): If no arguments are given, list
all the known operators, keywords, functions, and variables.
* t-builtins.cc (builtin_help) Pass the output through PAGER using
a libg++ procbuf.
(builtin_who): Ditto.
* utils.cc (get_pager): New function.
* help.h, help.cc: New files to manage lists of help info for
keywords and operators.
* symtab.cc (symbol_record): Implement the Matlab-style semantics
of functions using two symbol_def objects.
* (symbol_table): Store identifier names in a hash table instead
of a linear list.
* symtab.cc (symbol_def): New class.
Sat Dec 12 00:00:00 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* parse.y (yyerror): Change error text to be more accurate.
* lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Only look in the current symbol
table for names. Function names and other global symbols are now
resolved at execution time.
* symtab.cc (sorted_var_list): New function.
* (sorted_fcn_list): Ditto.
* (var_list): Ditto.
* (fcn_list): Ditto.
These should probably not all be separate functions...
* t-functions.cc (builtin_who): Call sorted_var_list for each
symbol table to print variable names only.
* Accept -fcn, -fcns, or -functions to also list function names.
* Make -all list function names, but under a separate heading from
other symbols.
* builtin-fcns.cc (is_text_function_name): New function.
* lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Use is_text_function_name to
find if a name is a text function name instead of relying on the
symbol tables.
* lex.l (is_keyword): New function.
([_a-zA-Z][_a-zA-Z0-9]*): Use is_keyword instead of having a
special lex pattern for each keyword.
Thu Dec 10 12:25:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* t-builtins.cc: Declare top_level_sym_tab extern.
* Version 0.51.
Wed Dec 9 02:00:38 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (all user_functions): If the return value from a
user's function is bogus, print an error message and abort to the
top level.
* tree-const.cc (all do_matrix_index functions): Major overhaul to
simplify and apply range checking before doing the indexing.
* tree-const.cc (fortran_row, fortran_column, valid_scalar_indices,
matrix_to_fortran_indices): Move here from arith-ops.cc and
declare as `static inline'. Delete declarations from arith-ops.h.
* arith-ops.cc (gripe_nonconformant_assignment): Delete function.
* tree-const.h (TREE_TO_MAT_IDX): Delete macro.
* tree-const.cc (tree_to_mat_idx): Make it an inline function.
* tree-const.cc (all do_matrix_assignment functions): Major
overhaul to simplify resizing and range checking.
* tree-const.cc (): Move here from arith-ops.cc.
Jump to top level on errors.
Return max value.
(indexed_assign_conforms) New function.
(index_check (int)): New function.
(index_check (Range)): New function.
Tue Dec 8 21:07:23 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-const.cc (tree_constant_rep::tree_constant_rep (Range):
Don't create range constants that have less than 2 elements.
* utils.cc (jump_to_top_level): New function.
* All: Replace calls to longjmp with calls to jump_to_top_level().
Don't include <setjmp.h>, except in octave.cc, and utils.cc.
Mon Dec 7 01:57:30 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in: Create Imakefile in gnuplot-build directory.
Look for xmkmf, then X11/X.h.
* gnuplot-build/Makefile.in: Try harder to get notgnuplot_x11 to
build correctly.
* gnuplot-build/Imakefile.in: New file, for building
notgnuplot_x11 if xmkmf is available.
* Version 0.50.
* gnuplot-build/Makefile.in (SUBDIRS): Add docs.
* tree-const.h (make_numeric_or_range_or_magic): New function.
* tree-const.cc (do_matrix_index): Use it instead of make_numeric
so that we actually take advantage of all the special cases we
have for range types as matrix indices.
* tree-const.cc (tree_constant_rep::do_matrix_index (int, Matrix)):
Fix typo.
* DAE.cc (integrate): If returning a matrix of values, don't mix
time with the states.
* ODE.cc (integrate): Likewise.
Sun Dec 6 16:58:41 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (dassl): New function.
* g-builtins.cc (builtin_dassl): Make it work.
* doc/octave.1: Document it.
* DAEFunc.h, DAEFunc.cc, DAE.h, DAE.cc: New files.
* tree-extras.cc (lsode): Clean up. Use available functions
instead of doing everything in line.
* tree.cc (tree_multi_assignment_expression::eval): Don't define
constants that are of unknown type.
Try to be smarter about padding after last value.
* tree-extras.cc (lu): Don't bother trying to return the LU
factorization in a single matrix since this isn't really useful
and isn't compatible with Matlab anyway (they use Linpack, we use
Lapack).
* tree.cc (tree_identifier::assign (rhs, args, nargs)): Only try
to do assignment if rhs is defined.
Sat Dec 5 18:23:55 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (qr): New function.
* g-builtins.cc (builtin_qr): New function.
* builtins.cc: Add builtin_qr to list of builtin functions.
* doc/octave.1: Document it.
* Matrix.cc (Matrix::lu): Use dgesv from Lapack instead of dgefa
since it returns L and U, not some factors that need decoding.
(ComplexMatrix:lu): Likewise.
Fri Dec 4 01:51:05 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* configure.in (INCDIRS): Don't include /usr/local/include.
(LIBDIRS): Don't include /usr/local/lib.
* tree-extras.cc (lu): New function.
* g-builtins.cc (builtin_lu): New function.
* builtins.cc: Add builtin_lu to list of builtin functions.
* doc/octave.1: Document it.
* Matrix.cc (Matrix:lu, ComplexMatrix:lu): New functions.
* Matrix.h, Matrix.cc (LU, ComplexLU): New classes.
* tree-extras.cc (do_quad): New function.
* g-builtins.cc (builtin_quad): New function.
* builtins.cc: Add builtin_quad to list of builtin functions.
* doc/octave.1: Document it.
* doc/Makefile.in (install): Edit the manpage to substitute
correct values in the FILES section.
(dist) Depend on octave.info.
(local-dist): Ditto.
* Quad.h, Quad.cc: New files to implement quadrature.
* NPSOL.cc (npsol_objfun): If compiling with GCC on a Sun, assign
to objf via assign_double().
* sun-utils.h, sun-utils.cc: New files.
* sun-utils.cc: Move declaration and definition of MAIN_ here from
utils.cc.
(access_double): New function, from GCC manual.
(assign_double): New function, after access_double.
Thu Dec 3 03:16:03 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* NEWS: New file.
* Makefile.in: Distribute it.
* scripts/*.m: Change to use new end feature.
* lex.l: Recognize `endif', `endfor', `endfunction', `endif', and
`endwhile', in addtion to `end'.
* parse.y: Check for command/end mismatches.
(end_error): New function.
* doc/octave.1: Document it.
Wed Dec 2 11:57:18 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* libcruft/villad: New directory. Move and split villad.f here
from libcruft/misc.
* configure.in: Create Makefile in libcruft/villad.
* libcruft/Makefile.in: Add libcruft/villad to list of dirs to make.
* All Makefile.in (uninstall): New target.
(distclean): Likewise.
(check): Ditto.
* Try to make clean targets conform with GNU coding standards.
* utils.cc (smells_like_X11): New function.
* builtin-fcns.cc (install_builtins): Don't set graphics terminal
to x11 unless it looks like we're running X11.
* win_texas_lotto.m: New M-file.
* octave.1: Document it.
* arith-ops.h: New file.
* src/Makefile.in: Build arith-ops.o, distribute arith-ops.cc,
arith-ops.h. Maybe this will at least speed up recompiles.
* THANKS: New file
* Makefile.in: Distribute it.
* configure.in: Create Makefile in gnuplot-build/docs.
* gnuplot-build/docs/Makefile.in: New file.
* Create and install notgnuplot.gih.
Tue Dec 1 00:15:48 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_identifier::eval (int)): Only pad after if printing.
(tree_multi_assignment_expression::eval (int)): Ditto.
(tree_assignment_expression::eval (int)): Ditto.
* hankel.m: Use disp to print message.
* toeplitz.m: Ditto.
* lex.l (<MATRIX>{SN}*\]/{S}*=): Check maybe_screwed_again to
decide whether to return SCREW_TWO or ']'.
* doc/Makefile.in (install): Really install the manpage.
* Version 0.49.
* Matrix.cc (ComplexMatrix::operator !): New function.
* arith-ops.cc (do_unar_op): Use it.
* tree-extras.cc (inverse, svd, eig): Don't try to operate on
empty matrices.
* Matrix.h, Matrix.cc: (EIG): New class.
(Matrix::eig): New functions.
(ComplexMatrix::eig): Ditto.
* tree-extras (eig): Use them.
* g-builtins.cc (builtin_eig): New function.
* builtin-fcns.cc (general_functions): Add eig to list.
* dococtave.1: Document it.
* Matrix.h, Matrix.cc: (ComplexDET): New class.
* tree-extras (determinant): Use it.
Mon Nov 30 04:02:29 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Matrix.h, Matrix.cc (ComplexSVD): New class.
* tree-extras (svd): Use it.
* Matrix.cc (svd): Use lapack instead of linpack to compute SVD.
* libcruft/Makefile.in: Replace eispack with lapack in
subdirectory list.
* libcruft/eispack: Delete directory.
* libcruft/lapack/Makefile.in: New file.
* configure.in: Create Makefile in libcruft/lapack, not
libcruft/eispack.
* libcruft/lapack: New directory.
* Copy files for SVD and Eigenvalue computation here.
* lex.l (<MATRIX>{SN}*\]/{S}*=): Only return SCREW_TWO if not
defining a function.
* arith-ops.cc (do_binary_op (double, double)): For pow operator,
don't create complex value if exponent is really an int.
* configure.in: Check for f77 last.
* Print warnings if bison or lex is not found.
* Reformat fatal no f2c/f77 error message.
* flib.sh: Make it work even if xlf is called f77.
Sun Nov 29 01:55:41 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc: Include f77-uscore.h.
* Use F77_FCN macro when declaring or calling Fortran functions.
* configure.in: After checking to see that it's not garbage, add
the output of f2c-compat.sh to DEFS.
* f2c-compat.sh: Figure out whether or not we need to append an
underscore to Fortran function names.
* flibs.sh: Handle xlf -v output as special case.
* octave.cc: Only define BADSIG if it isn't already defined.
* g-builtins.cc: Ditto.
* configure.in: Don't create man/Makefile.
* man: Directory deleted.
* doc/Makefile.in: Distribute and install octave.1.
* doc/octave.1: Renamed from man/octave.1.
Sat Nov 28 15:54:39 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* man/Makefile.in (install): Install manpage.
* octave.1: rename from octave.man
* octave.1: Document builtin variables and command line editing
(stolen from bash man page).
* tree-const.cc (eval (int print)): Convert complex values to real
if imaginary part is zero.
* octave.cc (log_usage): Deleted.
(main): Don't call log_usage.
* g-builtins.cc (builtin_sqrt): Delete.
(builtin_log): Ditto.
(builtin_log10): Ditto.
* tree-const.h, tree-const.cc (sqrt_internal): Delete.
(log_internal): Ditto.
(log10_internal): Ditto.
* tree-const.cc (mapper): Handle neg_arg_complex.
* builtin-fcns.h (Mapper_fcn): New field neg_arg_complex.
* builtin-fcns.cc: (mapper_functions[]): Initialize it for list of
mapper functions.
* builtin-fcns.cc: (mapper_functions[]): Move log, log10, and sqrt
back here from general_functions[].
Fri Nov 27 17:05:21 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (tree_constant_to_vector): Handle complex scalars
and matrices.
Wed Nov 25 17:32:42 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* man/octave.man: New file, very incomplete.
* man/Makefile.in: Include octave.man in list of files to
distribute.
* g-buitlins.cc (builtin_rand): Handle nargin == 1.
* tree-extras.cc (rand): Likewise.
* rem.m: New M-file. Implemented as M-file because it's much
simpler!
* configure.in (DEFAULT_DOT_C_FROM_DOT_F): Escape % characters in
rule to avoid problems with autoconf, which uses % for sed command
delimeters.
(DEFAULT_DOT_O_FROM_DOT_F): Ditto.
Tue Nov 24 00:21:34 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (fill_matrix): Don't try to create matrices with
negative dimensions.
(frobit): Likewise.
* utils.cc (check_dimensions): New function.
* utils.cc (treat_neg_dim_as_zero): New function.
* builtin-fcns.cc (treat_neg_dim_as_zero): New builtin variable,
default value is false.
* tree-const.h (tree_constant::bump_value): Like, assign, check
reference count and possibly make a new copy before changing
anything.
* tree-base.h (is_builtin): New virtual function.
* tree.cc (tree_builtin::is_builtin): New function.
* parse.y (ans_expression): Also check to see if the lone
expression is a builtin text-style function invoked without any
arguments.
* octave.cc, t-builtins.cc: Print copyright and other normal
(non-error) message on cout instead of cerr.
* t-builtins.cc (builtin_warranty): Don't return message in
retval.
(builtin_history): Likewise.
(builtin_help): Also.
(builtin_who): Ditto.
* Version 0.48.
* tree-extras.cc: Fix most functions to handle complex arguments.
Still need to finish SVD and DET (waiting for these functions in
the Matrix class).
* tree.cc (tree_multi_assignment::eval): Optionally print names
for result variables.
* tree-const.h (tree_constant::eval (int print, int nargout)):
New function. Simply ignore nargout.
* tree.cc (tree_matrix::eval (int print, int nargout)): Ditto.
* tree.cc (tree_parameter_list::name): New function.
* lex.l (<NEWMAT>): Delete rules, start condition because they are
unecessary.
* lex.l (<MATRIX>{SN}*\]): Split into three rules. Use trailing
context instead of home-brew lookahead.
Mon Nov 23 00:51:51 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* utils.cc (ok_to_lose_imaginary_part): New function.
* builtin-fcns.cc (ok_to_lose_imaginary_part): New builtin
variable, default value is warn.
* tree-const.h (double_value): Maybe return real part if invoked
for complex tree_constant.
* tree-const.h (matrix_value): Ditto.
* Version 0.47. This one wasn't tested, but there have been a lot
of significant changes and I wanted a backup.
* tree-const.cc (sqrt_internal): New function. Sqrt isn't
implemented as a mapper function since negative real arguments
give complex results.
(log_internal): Ditto.
(log10_internal): Ditto.
* builtin-fcns.cc: Move sqrt, log, and log10 from mapper struct
initializer to general function struct initializer.
* rot90.m: New M-file. Still needs rem() to be complete.
* tree-const.cc (mapper): Handle mapper functions for complex
variables.
* mappers.h, mappers.cc: New file for mapper functions.
* builtin-fcns.h, builtin-fcns.cc: Rename from builtins.h
builtins.cc.
* flipud.m: Don't do indexing on lhs.
* fliplr.m: Likewise.
Sun Nov 22 17:09:36 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* arith-ops.cc (do_binary_op (double, double)): Handle a^b for
a < 0.
* builtins.cc: Make sqrt a general builtin function instead of a
mapper function.
* g-builtins.cc (builtin_sqrt): New function.
* tree-const.cc (sqrt_internal): New function.
Sat Nov 21 16:41:02 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-const.h, tree-const.cc: Complete most changes required to
handle complex types. There are lots of details, most will be
omitted here.
* tree-const.h (is_real_type) New function.
(is_complex_type): Ditto.
(is_scalar_type): Ditto.
(is_matrix_type): Ditto.
* tree-const.h (REP_RHS_MATRIX, REP_ELEM_ASSIGN, CRMATRIX,
ASSIGN_CRMATRIX_TO, CRMATRIX_ASSIGN_REP_ELEM,
CRMATRIX_ASSIGN_ELEM): New macro for dealing with real and complex
matrices in the same tree_constant_rep function.
* tree-const.cc: Include arith-ops.cc.
* arith-op.cc: New file for functions that implement unary and
binary operations for the tree_constat classes.
* Mark all operations that aren't implemented yet with a
XXX FIXME XXX comment. There are about 35-40 things left to fix
in this file.
Thu Nov 19 00:25:16 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.46.
[ This one wasn't tested, but there have been a lot of significant
changes and I wanted a backup. ]
* tree-const.cc (tree_constant_rep::do_unary_op): Handle Complex.
(do_unary_op (Complex&, tree::expression_type)): New function.
(do_unary_op (ComplexMatrix&, tree_expression_type): Ditto.
* tree-const.cc (tree_constant_rep::assign): Handle Complex
(still needs updated support functions in order to work).
* tree.cc (tree_matrix::eval): Handle Complex.
(tree_identifier::eval): Ditto.
(tree_for_command::eval): Ditto.
Wed Nov 18 23:33:13 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree_const.cc (tree_constant_rep::rows): Handle Complex.
(tree_constant_rep::columns): Ditto.
(tree_constant_rep::all): Ditto.
(tree_constant_rep::any): Ditto.
(tree_constant_rep::cumprod): Ditto.
(tree_constant_rep::cumsum): Ditto.
(tree_constant_rep::prod): Ditto.
(tree_constant_rep::sum): Ditto.
(tree_constant_rep::sumsq): Ditto.
* tree_const.h, tree_const.cc (tree_constant::complex_value): New
function.
(tree_constant_rep::complex_value): Ditto
(tree_constant::complex_matrix_value): New
(tree_constant_rep::complex_matrix_value): New
* tree_const.cc (tree_constant_rep::~tree_constant_rep): Handle
complex scalars and matrices.
(tree_constant_rep::force_numeric): Ditto.
(tree_constant_rep::make_numeric): Ditto.
(tree_constant_rep::eval): Ditto.
(tree_constant_rep::bump_value): Ditto. C++, for C == a
complex value is C = C + 1. Should I even do this? Hmmm.
* tree-const.h, tree-const.cc: Begin adding support for Compelex.
* Add complex_scalar and complex_matrix to value union.
* Add complex_scalar_constant and complex_matrix_constant to type
tag enum.
* New constructors.
* Matrix.h, Matrix.cc: Major changes to add Complex support.
Tue Nov 17 14:40:45 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Matrix.cc (RowVector::operator (const Matrix&)): New function.
* Matrix.cc (ColumnVector::transpose): New function.
Eliminate friend function that served the same purpose.
(RowVector::transpose): Ditto.
Mon Nov 16 09:57:33 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (QSTRING): Fix to allow '' inside a string to represent a
single quote. Makes computer.m a little funnier.
Fri Nov 13 18:46:39 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.45.
* computer.m: New M-file.
* tril.m: Ditto.
* triu.m: Ditto.
* doc (*.texi): Can now produce BUGS, INSTALL, and octave.info
files without generating errors, though the organization is
probably till very wrong.
* Makefile.in (newversion): Add magic to handle major versions
other than 0, and major/minor versions of any length.
Thu Nov 12 01:37:45 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.h, tree-const.h, builtins.cc, g-builtins.cc,
tree-extras.cc: Conditionally compile code for NPSOL and FSQP
based on FSQP_MISSING and NPSOL_MISSING.
* g-builtins.cc (builtin_npsol): If NPSOL is missing, always call
npsol_usage() to print out message indicating why NPSOL doesn't
work.
* g-builtins.cc (builtin_fsqp): Likewise for FSQP.
* configure.in: Check for srcdir/libcruft/npsol/npsol.f and
srcdir/libcruft/fsqp/fsqp.f. If missing, define NPSOL_MISSING or
FSQP_MISSING and add them to DEFS.
* libcruft/npsol/README.MISSING: New file.
* libcruft/fsqp/README.MISSING: Ditto.
* libcruft/npsol/Makefile.in (dist): Don't distribute sources
because of license restriction. Do distribute Makefile.in and
README.MISSING.
* libcruft/fsqp/Makefile.in (dist): Ditto.
* All Makefile.in files (local-dist): New target, usually the same
as dist.
* parse.y (ans_expression): Check to see that the RHS isn't just
an identifier.
* tree.cc (tree_identifier::eval (int)): Maybe print id name.
* tree.cc (tree_assignment::eval (int)): Ditto.
* buitlins.cc (print_answer_id_name): New builtin variable.
* utils.cc (print_answer_id_name): New function.
Tue Nov 10 10:58:36 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (log_usage): Surround with #if 0/#endif.
Mon Nov 9 13:42:54 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* symtab.cc (load): Only issue error mesasge if attempt to find
_first_ name keyword fails.
* tree-const.cc (make_numeric_or_magic): New function. Like
make_numeric except also pass magic_colons.
* tree-const.cc (all do_matrix_index functions): Matrix ndices can
be naked colons, so use make_numeric_or_magic on index arguments
instead of make_numeric.
* liboctave/Makefie.in (install): Install .h files in $(includedir).
(includedir): New macro, default value $(prefix)/include.
* tree.cc (tree_function::eval (int print)): Force arguments to be
undefined.
* tree-const.h (tree_constant::assign (rhs, args, nargs)): Check
reference count before assigning.
* tree.cc (tree_identifier::assign (rhs, args, nargs)): Don't eval
lhs before doing assignment.
* tree.cc (parse_m_file): Gobble leading white space, including
comments.
Fri Nov 6 16:52:59 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.44.
* g-builtins.cc (builtin_getenv): New function.
* isempty.m: New M-file.
* g-builtins.cc (builtin_exist): New function.
* utils.cc (identifier_exists): Handle the dirty details.
* utils.cc (warn_comma_in_global_decl): New function.
* builtins.cc (warn_comma_in_global_decl): New builtin variable.
Initial value is true.
* parse.y (global_decl): Handle global declarations here,
including optional initialization.
* t-builtins.cc (builtin_global): Deleted.
Thu Nov 5 23:59:39 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_feval): New function.
* tree-extras.cc (feval): Handle the dirty details.
* g-builtins.cc (builtin_rand): New function.
* tree-extras.cc (rand): Handle the dirty details.
Wed Nov 4 14:54:17 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* num2str.m: New M-file.
* int2str.m: Ditto.
* g-builtins.cc (builtin_disp): New function.
* g-builtins.cc (builtin_fprintf, builtin_printf,
builtin_sprintf): New functions.
* tree-extras.cc (do_printf): New function to handle the gory
details.
* g-builtins.cc (builtin_flops): Implement here because we may
actually want to count operations at some point.
Tue Nov 3 17:06:40 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-const.cc (do_binary_op): Detect and give error message for
optations on empty matrices.
(do_unary_op): Likewise.
* parse.y (matrix): Convert `[]' and `[;]' to empty matrices
instead of (tree_matrix *) NULL.
Mon Nov 2 11:23:40 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* src/Makefile.in: Update dependencies.
* liboctave/Makefile.in: Ditto.
* tree-const.cc (force_numeric): Consult matlab_strings()
before doing string to number conversion.
* builtins.cc (matlab_strings): New builtin variable.
* utils.cc (matlab_strings): New function.
* tree-extras.cc (linear_constraints_ok): New function.
(linear_constraints_ok): Ditto.
(npsol): Use them to avoid creating inconsistent sets of
constraints and crashing. It would really be nice to have
exception handling.
* symtab.cc (load): Issue error mesasges if attempt to find
name keyword fails.
* Version 0.43.
* tree-extras.cc (npsol): Use new minimize (phi, inform).
Handle nargout == 3.
* g-builtins.cc (builtin_npsol): Allow nargout == 3.
* NPSOL.cc (set_default_options): New function.
(all constructors): Use it.
(operator =): Use it and print warning message (setting default
options doesn't represent a true copy and it would be somewhat
difficult to fix this...).
* npchkd.f (npchkd): Only write message if msglvl > 0.
Sun Nov 1 00:58:16 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* gnuplot-build/Makefile.in (LIBDIRS): Set correctly.
(notgnuplot): Use it.
* libcruft/misc/gen-d1mach.c: Generate d1mach.f at build time
instead of depending on the installer to get it right.
* libcruft/Makefile.in (gen-d1mach): New target.
* libcruft/Makerules.in (SPECIAL): New macro.
(DISTFILES): Include it.
* libcruft/Makerules.in (SPECIAL_DEPEND): Ditto.
(../../libcruft.a): Use it.
Mon Oct 26 02:25:11 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (is_valid_function): Try harder to find M-files
that may not have been parsed yet.
* symtab.cc (define (symbol_record*)): New function. Make it
simple to copy all fields of a symbol_record if we already have
one.
* utils.cc (force_global): Use it.
* utils.cc (valid_identifier): Allow underscores in names.
* tree-extras.cc (npsol): Force column vector to be returned.
(fsolve): Ditto.
* Version 0.42.
* tree-extras.cc (fsolve): New function for solving nonlinear
algebraic equations. This needs much more work if it is to
provide all the functionality of Matlab's fsolve.
* tree-extras.cc (fsolve_user_function): New function.
* libcruft/minpack: Import needed functions.
* tree-extras.cc: (npsol (tree_constant*, int, int): Completely
rewrite to handle all of the follwing:
1. npsol (x, phi)
2. npsol (x, phi, lb, ub)
3. npsol (x, phi, lb, ub, llb, c, lub)
4. npsol (x, phi, lb, ub, llb, c, lub, nllb, g, nlub)
5. npsol (x, phi, lb, ub, nllb, g, nlub)
6. npsol (x, phi, llb, c, lub, nllb, g, nlub)
7. npsol (x, phi, llb, c, lub)
8. npsol (x, phi, nllb, g, nlub)
* tree-extras.cc (npsol_constraint_function): New function.
* tree-extras.cc (tree_constant_to_vector): New function.
(tree_constant_to_matrix): Ditto.
(takes_correct_nargs): Ditto.
Fri Oct 23 10:19:51 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (is_valid_function): New function.
(npsol): Use it.
* utils.cc (s_plural): New function.
(es_plural): Ditto.
* tree-extras.cc (npsol): Improve checks for valid objective
function.
* tree.cc (tree_function::max_expected_args): New function.
Thu Oct 22 18:42:07 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_lsode): Quick check of arguments, then
call lsode (tree_constant *, int, int).
* Move rest of code for implementing builtin_lsode to
tree-extras.cc.
* g-builtins.cc (builtin_npsol: Quick check of arguments, then
call npsol (tree_constant *, int, int).
* Move rest of code for implementing builtin_npsol to
tree-extras.cc.
* tree-const.cc: Simplify functions that require numeric arguments
by always calling make_numeric for them instead of doing it
conditionally.
* tree.cc: Ditto.
* tree-extras.cc: Ditto.
* tree-const.h (tree_constant::make_numeric): Return *this if
already a numeric type.
* NLP.cc: In constructors, don't try to assign NULL to bounds
objects.
* tree-const.cc (tree_constant_rep::valid_as_scalar_index (void)):
New function.
* tree-const.cc (valid_scalar_indices (tree_constant*, int):
New function.
* tree-const.cc (tree_constant_rep::do_scalar_index): Simplify by
using functions to determine if arguments are valid as indices.
(tree_constant_rep::do_scalar_assignment): Likewise.
Wed Oct 21 14:11:58 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-extras.cc (determinant): Make it work again.
* tree.cc (tree_identifier::eval (tree_constant*, int, int, int):
Simplify logic. Only have one ans->eval() call.
* tree-const.cc (tree_constant_rep::eval (tree_constant*, int,
int, int): Properly handle indexing of range constants.
* tree-const.cc (stupid_fortran_style_matrix_index): Preserve row
or column orientation for vectors.
* toeplitz.m: New M-file.
* invhilb.m: Ditto.
* hankel.m: Ditto.
* tree-extras.cc (max): Handle two arg case.
tree-extras.cc (max): Likewise.
(min (Matrix&, Matrix&): New function.
(max (Matrix&, Matrix&): Ditto.
Tue Oct 20 15:13:57 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.41.
Mon Oct 19 16:46:35 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* rows.m: New M-file.
* g-builtins.cc (builtin_rows): Delete function.
* g-builtins.h (builtin_rows): Delete declaration.
* builtins.cc (general_functions): Delete from initialization list.
* columns.m: New M-file.
* g-builtins.cc (builtin_columns): Delete function.
* g-builtins.h (builtin_columns): Delete declaration.
* builtins.cc (general_functions): Delete from initialization list.
* length.m: New M-file.
* g-builtins.cc (builtin_length): Delete function.
* g-builtins.h (builtin_length): Delete declaration.
* builtins.cc (general_functions): Delete from initialization list.
* g-builtins.cc (builtin_size): If two values are expected to be
returned, put nr and nc in separate registers.
Sun Oct 18 13:37:17 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree-base.h: Extract base tree class declarations from tree.h.
* tree-const.cc, tree-const.h: Extract tree_constant class from
from tree.cc, tree.h.
Change all uses of tree.h to use either or both of tree-base.h and
tree-const.h.
* Matrix.cc (solve): Replaces LinEqn class.
tree.cc (do_binary_op) Use it.
* g-builtins.cc (builtin_max): New function.
tree.cc (tree_constant::max): New friend.
* g-builtins.cc (builtin_min): New function.
tree.cc (tree_constant::min): New friend.
* cond.m: New M-file.
* rank.m: New M-file.
* g-builtins.cc (builtin_svd): New function.
tree.cc (tree_constant::svd): New friend function.
* g-builtins.cc (builtin_svd): New function.
tree.cc (tree_constant::svd): New friend function.
* t-builtins.cc (builtin_format): New function. Implement some of
the Matlab options (sort of).
* Major changes to liboctave source. A new Matrix.cc/Matrix.h
completely replaces the old Matrix/Vec/AVec code. All other
classes that use Matrix/Vector objects have been updated (or
deleted, if they are no longer needed). All callers changed in
octave sources.
Sun Oct 11 21:22:16 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_function::eval): Don't define more function
parameters than are expected. If fewer arguments than expected
are actually supplied, force them to be undefined.
* parse.y (fact): Give warning and abort for identifiers followed
by '['. This should catch most improper uses of [] instead of ()
for indexing operators.
* tree.cc (do_binary_op (Matrix&, Matrix&, tree::expression_type):
Handle element by element exponentiation.
Tue Sep 22 10:09:06 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.40.
Mon Sep 21 13:09:06 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l: Accept ** and .** as well as ^ and .^ as exponentiation
operators.
Fri Sep 18 15:19:51 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.h tree.cc utils.cc g-builtins.cc: Elimitate need for
overloaded operator-> in the tree_constant class. Also eliminate
uses of ->string, ->scalar, etc. Instead, always call
.string_value(), .double_value(), etc.
* builtins.cc (install_builtins): Reserve `ans' as an
uninitialized global variable (should it really be global?).
* parse.y (ans_expression): Handle default assignemnt to builtin
variable ans.
(command): Use it.
Tue Sep 15 14:06:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.39.
* tree.cc (tree_identifier::bump_value): Don't try to increment
undefined symbols or values.
(tree_prefix_expression::eval): Don't call bump_value if id is a
NULL_TREE.
(tree_prefix_expression::eval): Likewise.
* g-builtins.cc (lsode_builtin): Handle extra arguments.
liboctave/ODE.cc (integ): Add template for handling bad returns
from lsode.
* tree.cc (class tree_return_command): Implementation is just like
break and continue. Something seems wrong about this...
lex.l (return): Recognize return statement.
parse.y (statement): Handle function returns.
tree.cc (various eval functions): Check to see if we are returning
from a function.
* tree.cc (tree_for_command::eval): Set abort_on_undefined when
evaluating the loop body.
(tree_while_command::eval): Ditto.
* tree.cc (class tree_idenfier): Improve searching/parsing M-files
when handling undefined names.
tree.cc (tree_identifier::parse_m_file (char*)): New function.
(tree_identifier::parse_m_file (void)): Use it.
* utils.cc (force_global): New function.
* symtab.cc (symbol_table::remove_name(char *)): New function.
* tree.h, tree.cc (class tree_constant): Split into two classes,
tree_constant (handle) and tree_constant_rep (body) to enable use
of `smart pointers' and reference counted memory management.
(Lots of things are different with this change.)
Sat Aug 22 11:58:27 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.38.
* lex.l (COMMA_KLUDGE): Delete production, all uses. This doesn't
seem to be necessary anymore, and the mystery output lines
disappear without it.
* builtins.cc (make_eternal (char *)): New function.
(install_builtins): Make LOADPATH, eps, pi, Inf, and NaN eternal.
* New M-files: mean.m, std.m, hadamard.m, vander.m, hilb.m,
linspace.m, logspace.m.
* tree.cc (tree_function::eval): Don't check number of arguments
supplied against total number possible (previously thought to be
`expected') so that user-defined functions can have variable
numbers of arguments.
* tree.cc (tree_identifier::eval_undefined_error): New function.
(tree_identifier::eval): Use it.
* octave.cc (abort_on_undefined): New global symbol to control
whether we should jump to top level after an undefined symbol has
been encountered.
tree.cc (tree_function::eval) Set it before evaluating function
body, restore to previous value after successful completion.
tree.cc (tree_identifier::eval_undefined_error): Use it
Fri Aug 20 09:31:14 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc: New mapper functions:
isnan: Uses xisnan, which calls IEEE function isnan.
isinf: Uses xisinf which calls IEEE functions finite and isnan,
or isinf if available.
finite: Uses xfinite, which calls IEEE function finite.
abs: Uses fabs.
* g-builtins.cc (sumsq): New function.
(diag): New function.
* tree.cc (tree_constant::sumsq): New function
(tree_constant::diag): New function
* Matrix.cc (sumsq): New function.
(diag): Ditto.
Thu Aug 20 00:36:44 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_error): New function.
* gnuplot-build/Makefile.in (dist): Actually create `term'
subdirectory.
* Lots of changes to tree.cc tree_assignment_expression::eval and
tree_index_expression::eval to make matrix indexing work like
Matlab.
(do_fortran_indexing): New user-level variable to control this
behavior. If this variable is false, things like
a([1,2;3,4], [1,2;3,4]) = b
become syntax errors. Otherwise, Matlab braindamage prevails.
Tue Aug 18 13:15:46 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.37.
* tree.cc (do_matrix_assignment): Conditionally allow single
indices for Matrix assignments.
(do_matrix_index): Ditto.
* utils.cc (do_fortran_indexing): New function.
utils.h: Declare it.
builtins.cc (install_builtins): Default value for new
do_fortran_indexing variable.
* builtins.cc (install_builtins): Bind eps to the value
DBL_EPSILON from float.h. Make it read only (will this cause
trouble)?
* Bind Inf to 1/0 (will only work for IEEE machines.
* Bind NaN to 0/0 (will only work for IEEE machines.
* Add round, fix, floor, ceil, and sign to builtin mapper functions.
(round): New function.
(fix): Ditto.
(signum): Ditto.
* Add clc (clear screen function).
* Add home (clear screen function). To be just like Matlab, this
wouldn't clear the screen.
* New M-files: fliplr.m, flipud.m, trace.m, reshape.m.
* utils.cc (bind_variable): Revise bind_string_variable so that it
takes a tree_constant as an argument.
(bind_protected_variable): Likewise for the function
bind_protected_string_variable.
(bind_string_variable): Delete.
(bind_protected_string_variable): Ditto.
utils.h: Fix declarations.
builtins.cc t-builtins.cc: Fix callers.
* builtins.cc (install_builtins): Bind LOADPATH here.
octave.cc (initialize_globals): Not here.
* Makefile.in (SOURCES): Add new scripts directory.
(scripts): New target.
libcruft/Makefile.in (install): Don't depend on all.
* utils.cc (m_file_in_path): Get path from LOADPATH variable.
tree.cc (tree_identifier::parse_m_file): Modify caller.
* src/Makefile.in (OCTAVE_M_FILE_DIR): New variable.
(utils.o): Use it.
utils.cc (default_path): Use it.
* utils.cc (pathstring_to_vector): New function.
(default_path): Return colon separated path instead of vector of
paths.
* octave.cc (initialize_globals): Use pathstring_to_vector here.
Bind output of default_path to LOADPATH variable.
Eliminate octave_path global variable.
* tree.cc (isstr): New function.
(all): Ditto.
(any): Ditto.
(cumprod): Ditto.
(cumsum): Ditto.
(prod): Ditto.
(sum): Ditto.
* g-builtins.cc (builtin_isstr): New function.
(builtin_all): Ditto.
(builtin_any): Ditto.
(builtin_cumprod): Ditto.
(builtin_cumsum): Ditto.
(builtin_prod): Ditto.
(builtin_sum): Ditto.
* Matrix.cc (all): New function.
(any): Ditto.
(cumprod): Ditto.
(cumsum): Ditto.
(prod): Ditto.
(sum): Ditto.
* scripts: New directory.
scripts/strcmp.m: New file (first M-file function in distribution!).
scripts/Makefile.in: New file.
configure.in: Include scripts/Makefile in list of files to create.
Sat Aug 15 18:32:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.36.
Fri Aug 14 08:44:10 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (id_to_define): New global variable.
(curr_m_file_name): Ditto.
(current_infile): Ditto.
* tree.h tree.cc (tree_identifier::parse_m_file): New function.
(tree_identifier::eval): Handle M-files.
* tree.h (stash_m_file_name): New virtual function.
(stash_m_file_time): Ditto.
(time_parsed): Ditto.
(m_file_name): Ditto.
* tree.h tree.cc (tree_function::stash_m_file_name) New function.
(tree_function::stash_m_file_time): Ditto.
(tree_function::time_parsed): Ditto.
(tree_function::m_file_name): Ditto.
* lex.l (reading_m_file): New global variable.
(delete_buffer): New function.
(yywrap): New function. Always return 0 (is this a smart thing to
do?).
* parse.y (func_def2): Handle input from m-files (sort of).
* octave.cc (octave_path): New global variable.
(using_readline): Ditto.
(no_line_editing): Ditto.
* octave.cc (main): Initialize current_command_number before
calling setjmp.
* Increment it in main command loop, not in parse.y.
* utils.h utils.cc (default_path): New function.
(m_file_in_path): Ditto.
(is_newer): Ditto.
* octave.cc (main): Execute commands here.
* parse.y (input): Not here.
* octave.cc (tree *global_command): New global variable that
points to the current command to be executed.
Thu Aug 13 07:08:11 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* parse.y: Make word_list_cmd a fact, not a command, so that
things like `y = who -all' can work. You can't do that in Matlab.
* t-builtins.cc (builtin_who): Print symbols in columns, sorted.
(list_in_columns) New function, mostly stolen from GNU ls.
* symtab.h symtab.cc (char **list (void)) New function.
(char **sorted_list (void) New function.
* tree.cc (various eval functions): Handle printing results of
text and general functions here. Straighten out other printing
stuff, maybe...
* t-builtins.h t-builtins.cc: Make text functions return
tree_constant* instead of int, delete print flag argument.
* g-builtins.h g-builtins.cc: Delete print flag argument.
* Version 0.35.
Wed Aug 12 15:12:23 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_builtin::eval): Call mapper function with
print = 0 to avoid getting two answers.
(specific do_matrix_assignment functions): Handle resizing
correctly for `:' indices.
(tree_colon_expression::eval): Don't crash if the evaluation of
an operand yields a NULL_TREE_CONST.
Mon Aug 10 07:31:37 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_identifier::define): Return NULL_TREE_CONST if
symbol_record::define fails.
(tree_identifier::assign): Likewise.
* symtab.h (symbol_lifetime): New attribute for symbol_records.
Can be either temporary or eternal.
(symbol_class): Delete eternal attribute.
* builtins.cc (install_builtins): Mark all builtins as eternal.
* Version 0.34.
* tree.h: Delete ttype, enum list of tree types.
* g-builtins.h g-builtins.cc (builtin_colloc): New function.
* liboctave (various): Add missing return values, etc. so that
liboctave compiles cleanly.
* tree.h tree.cc (tree_multi_assignment): New class to implement
assignments to more than one variable. Does it work? Maybe...
* tree.h (tree_constant **eval (int, int)): New virtual function.
(is_identifier): Another one.
* symtab.h (eternal): New class for symbol_records.
* symtab.h symtab.cc (make_eternal): New function.
* builtins.cc (install_builtins): Make builtin variables eternal.
* tree.cc (list_to_vector): Surround by `#if 0/#endif' to avoid
compilation warning.
Sun Aug 9 03:18:38 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* t-builtins.h t-builtins.cc (builtin_cd): New function adapted
from bash for changing the current working directory.
(builtin_pwd): New function adapted from bash for printing the
current working directory.
* utils.h utils.cc: New functions from bash for changing and
printing the current working directory:
pathname_backup make_absolute
get_working_directory change_to_directory
* utils.h utils.cc (bind_string_variable): New function.
(bind_protected_string_variable): Likewise.
* octave.cc (initialze_globals): New function.
* utils.h utils.cc: New functions from bash, mostly for fancy
prompting:
polite_directory_format absolute_pathname
absolute_program base_pathname
read_octal sub_append_string
decode_prompt_string
Thu Aug 6 02:39:31 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* octave.cc (initialize_history): Fix up to
(octave_hist_file) New global variable.
(octave_hist_size) Ditto.
(history_lines_this_session) Ditto.
(history_lines_in_file) Ditto.
* input.cc (octave_gets): Keep track of number of lines read
during the current session.
* utils.cc (default_history_file): New function. Look for
OCTAVE_HISTFILE environment variable and use its value if
possible.
(default_history_size): New function. Look for OCTAVE_HISTSIZE
environment variable and use its value if possible.
* t-builtins.cc (builtin_history): Steal from bash and modify to
work with octave.
* g-builtins.cc (builtin_det): New function.
* tree.h tree.cc (determinant): New function
* g-builtins.cc: Rewrite functions that use fill_matrix, inverse,
and identity_matrix to use new versions implemented as friends of
tree_constant. This is being done in an attempt to get rid of all
calls to tree_constant::const_type() outside of tree.cc.
* tree.cc (tree_constant): Implement new functions for filling
and inverting tree constants as matrices, and for creating an
identity matrix from a tree_constant.
* g-builtins.cc (builtin_inv): New function.
builtins.cc: Allow builtin_inv to be called as either inv(A) or
inverse(A).
* tree.cc (do_binary_op (Matrix, Matrix)): Better handling of
solution of linear equations for square coefficient matrices.
* LinEqn.cc (solve): Don't exit on singular matrices. Implement
new variations of these functions that will allow status checking.
* src/Makefile.in: Define GNUPLOT_BINARY and SITE_DEFAULTS.
Specific rules for octave.o and builtins.o to avoid defining
GNUPLOT_BINARY and SITE_DEFAULTS for all .cc targets.
* builtins.cc: Use macro GNUPLOT_BINARY.
* octave.cc (execute_startup_files): Use macro SITE_DEFAULTS.
Execute commands from SITE_DEFAULTS file.
* t-buitlins.cc (builtin_pause): Make it work.
* configure.in: Check for termio.h and/or sgtty.h.
* octave.cc (clean_up): Reset terminal state to cooked mode.
(main) Likewise, after return from SIGINT signal handler.
* utils.h utils.cc (raw_mode): New function (mostly stolen from
less(1)) toggle input processing for stdin to raw/cooked modes.
(kbhit): New function to read one character from cin in raw mode
without echoing it.
* builtins.cc: Fix expected number of arguments in lists of
builtins.
* tree.h tree.cc (max_args_expected (void)): New virtual function.
(tree_builtins::) Provide a definition of it.
* lex.l (identifier): Before gobbling up text function arguments,
check to see that we expect some.
* symtab.h symtab.cc (max_args_expected): Return max args expected
by a symbol (currently only valid for tree_builtins).
Wed Aug 5 05:03:59 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* utils.h utils.cc (resize_on_range_error): Decide what to return
based on value of global variable of same name.
(prefer_column_vectors): Likewise.
* Version 0.33.
* parse.y (func_def2): Call define (tree *, symbol_type), not
define (tree *), so that the symbol type is set for user-defined
functions.
(assignment): Catch assignments to functions here.
* tree.h tree.cc (tree_identifier::define (tree *, symbol_type):
New function (be careful out there...).
* symtab.h (symbol_type): Add new `user_function' enum value.
* tree.cc (do_matrix_assignment): Call prefer_column_vectors().
* tree.h tree.cc (do_matrix_assignment (...)): New functions to
implement assignment to indexed matrices.
(do_scalar_assignment (...)): New function to implement assignment
to an indexed scalar.
* utils.h utils.cc (resize_on_range_error): New function. Should
eventually decide what to return based on value of global variable
of same name.
(prefer_column_vectors): New function.
Tue Aug 4 05:37:47 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_constant::save): New function.
(tree_constant::load): New function.
* symtab.cc (symbol_record::save): New function.
(symbol_table::load): New function.
* t-builtins.cc (builtin_load): Start implementation. Yikes, this
is probably going to need a lot of work to be very robust...
* t-builtins.cc (builtin_save): Implement by asking the
symbol_record to save itself. Maybe this should really be done by
asking the symbol table to save a symbol...
* utils.cc (extract_keyword): New function.
(valid_identifier): New function.
Fri Jul 31 04:16:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* parse.y (func_def3): Extra error cases for empty function
bodies.
(func_def1, func_def1a, func_def1b): Slighly straighten out some
truly twisted logic, eliminate func_def1a, rename func_def1b to
func_def1a, and make statementss like function [x,y] = foo() end
work properly (I think).
(func_def*): Put function name in global symbol table, not top
level symbold table. This makes them accessible from other
functions, eh?
* t-builtins.cc (builtin_who): Accept -all, -local, -global, and
-top flags.
Thu Jul 30 00:39:40 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* lex.l (current_buffer): New function to return current flex
input buffer. Will need this to be able to switch file contexts.
* Version 0.32.
* lex.l (create_buffer, switch_to_buffer): New functions to handle
input from various streams. This should be enough to allow us to
implement Matlab-like M-files.
octave.cc (main, execute_startup_files): Use them.
* octave.cc (execute_startup_files): Execute commands from
$HOME/.octaverc and ./.octaverc.
* g-builtins.cc (builtin_plot): Delete temporary files.
Ignore SIGINT while gnuplot is executing.
Wed Jul 29 20:16:25 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (all_args_defined): New function to check a
tree_constant** vector to see if all elements are non-null.
(tree_index_expression::eval (int)): Use it, and abort the
evaluation if test fails.
* terminals.h, terminals.cc: New files for doing things with
gnuplot graphics terminal names.
src/Makefile.in: Handle new files.
Tue Jul 28 00:25:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* g-builtins.cc (builtin_plot): Make it work, at least halfway.
* g-builtins.cc (builtin_save): New function.
* gnuplot-build/Makefile.in: Add -DREADLINE and remove readline.o
from list of objects to actually enable the GNU command line
editing.
* configure.in: Use AC_PROG_CHECK macro to search for f2c and f77.
Check for several common Un*x Fortran compilers.
Add extra messages.
* g-builtins.cc g-builtins.h: New files for builtin general
functions extracted from builtins.cc.
* t-builtins.cc t-builtins.h: New files for builtin text functions
extracted from builtins.cc.
* Makefile.in (split-dist): New target.
* Version 0.31.
Mon Jul 27 22:01:58 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_constant::do_matrix_index (tree_constant **, int):
Allow single argument to work for matrices that are really row or
column vectors.
* lex.l: Accept `<>' in addition to `!=' and `~=' as `not equal'
comparison operators.
* libcruft/Makerules: Allow for compiling the Fortran routines
with the native Fortran compiler instead of translating to C.
* f2c-compat.sh, flibs.sh: New scripts which try to determine
whether it will be possible for us to use the system's Fortran
compiler directly, and if so, what libraries to add to the loader
command. These scripts are known to work on SPARCstations running
SunOS and DECstations running Ultrix. Not tested elsewhere...
* configure.in: Use them.
* Makefile.in: Distribute them.
Wed Jul 22 00:04:48 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* builtins.cc: Begin implementation of NLP solver using NPSOL.
Tue Jul 21 13:44:13 1992 John W. Eaton (jwe@june.che.utexas.edu)
* octave.cc: If printing version information, also print pointer
to warranty info.
* builtins.cc: Implement the Matlab functions ones, zeros, eye,
clock, date, size, length, and global.
Implement warranty builtin.
(builtin_clear): Fix to work with global variables.
* symtab.cc (clear): Fix to work properly with global variables.
Mon Jul 20 11:58:23 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc (tree_constant::do_matrix_index (tree_constant**, int)):
Make string indices work.
(tree_constant::force_numeric): Don't special case
single-character strings (this uncovers a flaw in the design of
the constructor for the magic colon operator...).
Fri Jul 17 16:33:00 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.30.
* tree.cc: Delete undefined identifiers when trying to eval them.
* builtins.cc: Add beginnings of builtin who and clear functions.
* symtab.cc symtab.h (clear): New function.
* tree.cc, tree.h, parse.y: Implement matrix indexing with colon
expressions, implement the magic colon operator for column and row
selection.
* tree.cc tree.h: Completely rework colon expressions.
Thu Jul 16 09:27:48 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* gnuplot-dist: Rename from gnuplot-3.2 so we're not tied to a
version number.
Tue Jul 14 11:22:35 1992 John W. Eaton (jwe@ward.che.utexas.edu)
* tree.cc builtins.cc: Make argc/nargs/nargin work like C:
the argument count is the number of command line arguments plus
the function name. This goes for `argument lists' for matrices as
well as functions. It seems a bit awkward but at it's consistent,
and it's like C. Hmm. Maybe this is a bad choice...
* utils.cc utils.h: New files for utility functions.
Mon Jul 13 00:29:50 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.29.
* tree.cc tree_constant::tree_constant (matrix): Automatically
convert 1x1 matrices to scalars.
* parse.y lex.l: Fix up a bunch of stupid stuff and reduce the
number of shift/reduce conflicts to 16 (all but one because of the
optional separator garbage).
* parse.y lex.l: Allow for assignments to lists of identifiers to
be partially parsed. This will still require some error checking
in tree.cc to ensure that the list is made up of identifiers only,
since that's not enforced by the grammar (I don't see a way to do
it, do you?)
Sun Jul 12 11:24:33 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* tree.cc tree.h parse.y lex.l: Implement logical AND (symbol &),
OR (symbol |), and not (symbol ~). Also provide the C-style
operators &&, ||, and !).
* Matrix.cc Matrix.h: Provide stupid element-wise logical
operators for matrices.
* Version 0.28.
* parse.y lex.l tree.cc tree.h: Implement C-style prefix and
postfix increment and decrement operators (symbols ++ and --
respectively).
* parse.y lex.l tree.cc tree.h: Implement break and continue.
* tree.cc tree.h: Assignment to matrix elements roughed out.
* gnuplot/tree.cc: Solution of linear equations via the lift
division operator partially implemented. Singular coefficient
matrices aren't handled very well yet...
* gnuplot-build/Makefile.in: Make this work to build gnuplot for
generic X11/unix environments.
* Remove -Wall from CFLAGS to avoid loads of warnings.
* Use GNU readline instead of the one that comes with gnuplot.
* gnuplot-build/*.diff: Various patches for various things.
Sat Jul 11 10:14:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.26
* src/Makefile.in: Distribute lex.cc, parse.cc, y.tab.h.
* src/Makefile.in (dist): Depend on lex.cc and parse.cc.
* gnuplot-build: New directory for patching and building gnuplot.
This is apparenty required because the gnuplot license won't allow
distrubution of modified versions, but will allow patches to be
distributed.
* gnuplot-build/Makefile.in: New file.
* gnuplot-3.2: New directory.
* readline: New directory from the bash-1.12 distribution, plus
tilde.c from bash's lib/glob directory and xmalloc.c from bash's
lib/malloc directory.
* readline/Makefile.in, readline/doc/Makefile.in,
readline/examples/Makefile.in: New files.
* All Makefie.in files: Allow make to work from any directory, not
just the top level one.
Fri Jul 10 22:20:56 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* SERVICE: Remove, since it seems too specific to GNU products.
Thu Jul 9 07:48:33 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.20.
* Solution of ODEs with LSODE partially implemented. It's
possible to solve some simple equations.
* tree.cc tree.h (tree_constant): Add string constants and make
them work more or less like string constants in Matlab (implicit
conversion to ASCII numbers -- gag. This isn't complete, and it
it assumes that ASCII is the character set for the host
machine/compiler...).
Tue Jul 7 07:28:35 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.19.
* User defined function definitions and calls to them mostly work.
Still need to implement multiple return values correctly.
Mon Jul 6 04:23:37 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.18.
* lex.l parse.y tree.cc tree.h: Begin implementation of
user-defined functions.
Sun Jul 5 19:27:08 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.17.
* lex.l: Replace SAVE_STRING macro with a function.
* builtins.cc (builtin_document): New builtin function.
(builtin_help): Make it work.
* lex.l: More rules for gathering text. These are still not quite
as they should be, but they will work in most cases. I think the
flex generated scanner is either going to have to be reworked or
replaced with a handemade version at some point (probably soon)...
* tree.cc tree.h: Add tree_word_list and tree_word_list_command
classes for text functions.
Fri Jul 3 05:13:15 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.16.
* builtins.h builtins.cc: New files for builtin functions.
Implement a few simple builtin functions.
* tree.cc tree.h: Add tree_builtin type for builtin functions.
* tree.cc tree.h: eval (args...) New virtual function.
Thu Jul 2 01:27:38 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.15.
* symtab.h, symtab.cc: Allow variables and functions to be tagged
as read-only or read-write.
Wed Jul 1 15:54:36 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* input.cc and octave.cc: allow input to come from a file.
* lex.l: to accept `#' as a comment character (allows one to
use the `#!/bin/octave' style script hack).
* doc: New directory containing skeleton stuff
* SERVICE: New file from GCC.
* BUGS: New file, now produced from doc/bugs.texi.
* INSTALL: New file, now produced from doc/install.texi.
Sat Jun 27 15:52:37 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.14.
* Fixed parser to eliminate reduce/reduce conflicts.
* Fixed parser to recognize assignment to multiple identifiers
(e.g., [E,V] = eig (A); ).
* Quickie implementation of indexed array evaluation. Works for
scalar indices, but not range/array indices.
Fri Jun 26 04:23:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.12.
* Hooks added for indexed array evaluation and assignment.
* Colon expression implementation improved.
* Implementation of for command eval() improved.
Thu Jun 25 00:28:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.11.
* Colon expressions added.
* For command added, but the implementation needs work.
Wed Jun 24 15:09:36 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.10.
* Cheesy signal handler added to catch interrupts.
* Matrix input works, even for nested matrices. Some error
checking is done while the matrix is evaluated to ensure that
the number of rows and columns match up.
Mon Jun 22 00:21:49 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.9.
* Command line matrix input partially implemented. It's not yet
possible to enter nested matrices, but it is possible to enter
simple matrices (e.g. [1,2;a,b+c], where a, b, and c are scalars.
* Version 0.8.
* If commands added.
* Version 0.7.
* Command chains added.
* Boolean operations added, tested for scalars.
* While loop added, tested for simple commands.
Fri Jun 19 05:50:44 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.6.
At this early stage, while a lot of changes are being made very
quickly, ChangeLog entries will probably just list features added.
* Variable assignment works for scalars.
* Simple scalar expressions work.
Thu Jun 18 06:44:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu)
* Version 0.5.
* src/version.h: For all the pre-alpha distributions, count
versions as 0.1, etc. instead of 0.01.
* Makefile: (dist) Automatically update version_string in
src/version.h.
* symtab.h, symbtab.cc: New files for symbol tables.
* tree.h, tree.cc: New files for parse trees.
* Lots of work unrecorded here. Octave is now self-contained, the
tree routines are being redesigned, etc.
Fri Mar 20 17:03:16 1992 John W. Eaton (jwe@andy.che.utexas.edu)
* Version 0.02. Octave understands some simple matrix
expressions, but it is not yet possible for matrix elements to
be constructed from expressions.
Thu Mar 19 06:13:39 1992 John W. Eaton (jwe@andy.che.utexas.edu)
* Version 0.01. Octave understands simple scalar expressions.
Hey, Hey! It is not yet self contained -- I'm still linking to
the old libraries in /usr/local/c++-classes, and this isn't likely
to change for a while. (Other things are much more important than
making the distribution work on other machines. Sorry...)
Fri Feb 21 05:06:38 1992 John W. Eaton (jwe@andy.che.utexas.edu)
* Version 0.00. This includes the basic directory structure,
makefiles, and a lot of the old Fortran source, including a way to
make a libcruft.a. Octave compiles and accepts input (with
history and editing) but doesn't do much else.
Wed Feb 19 06:20:44 1992 John W. Eaton (jwe@andy.che.utexas.edu)
* ChangeLog: New file.
|