comparison src/DLD-FUNCTIONS/__gnuplot_raw__.l @ 7138:f70121606be5

[project @ 2007-11-09 02:06:54 by jwe]
author jwe
date Fri, 09 Nov 2007 02:06:55 +0000
parents 373c39904877
children 9dd8e2c98bd2
comparison
equal deleted inserted replaced
7137:38fe664f0ef1 7138:f70121606be5
687 } 687 }
688 688
689 return name; 689 return name;
690 } 690 }
691 691
692 #define WARN_OBSOLETE(nm) \
693 do \
694 { \
695 static warned = false; \
696 \
697 if (! warned) \
698 { \
699 warning (nm ## ": this function is obsolete and will be removed from a future version of Octave"); \
700 \
701 warned = true; \
702 } \
703 } \
704 while (0)
705
692 DEFUN_DLD (__gnuplot_save_data__, args, , 706 DEFUN_DLD (__gnuplot_save_data__, args, ,
693 "-*- texinfo -*-\n\ 707 "-*- texinfo -*-\n\
694 @deftypefn {Loadable Function} {} __gnuplot_save_data__ (@var{data}, @var{ndim}, @var{parametric})\n\ 708 @deftypefn {Loadable Function} {} __gnuplot_save_data__ (@var{data}, @var{ndim}, @var{parametric})\n\
709 @strong{This function is obsolete and will be removed from a future version\n\
710 of Octave.}\n\
695 @end deftypefn") 711 @end deftypefn")
696 { 712 {
713 WARN_OBSOLETE ("__gnuplot_save_data__");
714
697 octave_value retval; 715 octave_value retval;
698 716
699 int nargin = args.length (); 717 int nargin = args.length ();
700 718
701 if (nargin > 0 && nargin < 4) 719 if (nargin > 0 && nargin < 4)
1569 @deftypefnx {Loadable Function} {@var{old_val} = } gnuplot_command_plot (@var{new_val})\n\ 1587 @deftypefnx {Loadable Function} {@var{old_val} = } gnuplot_command_plot (@var{new_val})\n\
1570 @strong{This function is obsolete and will be removed from a future version\n\ 1588 @strong{This function is obsolete and will be removed from a future version\n\
1571 of Octave.}\n\ 1589 of Octave.}\n\
1572 @end deftypefn") 1590 @end deftypefn")
1573 { 1591 {
1592 WARN_OBSOLETE ("gnuplot_command_plot");
1593
1574 return SET_INTERNAL_VARIABLE (gnuplot_command_plot); 1594 return SET_INTERNAL_VARIABLE (gnuplot_command_plot);
1575 } 1595 }
1576 1596
1577 DEFUN_DLD (gnuplot_command_replot, args, nargout, 1597 DEFUN_DLD (gnuplot_command_replot, args, nargout,
1578 "-*- texinfo -*-\n\ 1598 "-*- texinfo -*-\n\
1580 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_replot (@var{new_val})\n\ 1600 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_replot (@var{new_val})\n\
1581 @strong{This function is obsolete and will be removed from a future version\n\ 1601 @strong{This function is obsolete and will be removed from a future version\n\
1582 of Octave.}\n\ 1602 of Octave.}\n\
1583 @end deftypefn") 1603 @end deftypefn")
1584 { 1604 {
1605 WARN_OBSOLETE ("gnuplot_command_replot");
1606
1585 return SET_INTERNAL_VARIABLE (gnuplot_command_replot); 1607 return SET_INTERNAL_VARIABLE (gnuplot_command_replot);
1586 } 1608 }
1587 1609
1588 DEFUN_DLD (gnuplot_command_splot, args, nargout, 1610 DEFUN_DLD (gnuplot_command_splot, args, nargout,
1589 "-*- texinfo -*-\n\ 1611 "-*- texinfo -*-\n\
1591 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_splot (@var{new_val})\n\ 1613 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_splot (@var{new_val})\n\
1592 @strong{This function is obsolete and will be removed from a future version\n\ 1614 @strong{This function is obsolete and will be removed from a future version\n\
1593 of Octave.}\n\ 1615 of Octave.}\n\
1594 @end deftypefn") 1616 @end deftypefn")
1595 { 1617 {
1618 WARN_OBSOLETE ("gnuplot_command_splot");
1619
1596 return SET_INTERNAL_VARIABLE (gnuplot_command_splot); 1620 return SET_INTERNAL_VARIABLE (gnuplot_command_splot);
1597 } 1621 }
1598 1622
1599 DEFUN_DLD (gnuplot_command_using, args, nargout, 1623 DEFUN_DLD (gnuplot_command_using, args, nargout,
1600 "-*- texinfo -*-\n\ 1624 "-*- texinfo -*-\n\
1602 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_using (@var{new_val})\n\ 1626 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_using (@var{new_val})\n\
1603 @strong{This function is obsolete and will be removed from a future version\n\ 1627 @strong{This function is obsolete and will be removed from a future version\n\
1604 of Octave.}\n\ 1628 of Octave.}\n\
1605 @end deftypefn") 1629 @end deftypefn")
1606 { 1630 {
1631 WARN_OBSOLETE ("gnuplot_command_using");
1632
1607 return SET_INTERNAL_VARIABLE (gnuplot_command_using); 1633 return SET_INTERNAL_VARIABLE (gnuplot_command_using);
1608 } 1634 }
1609 1635
1610 DEFUN_DLD (gnuplot_command_with, args, nargout, 1636 DEFUN_DLD (gnuplot_command_with, args, nargout,
1611 "-*- texinfo -*-\n\ 1637 "-*- texinfo -*-\n\
1612 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_with ()\n\ 1638 @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_with ()\n\
1613 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_with (@var{new_val})\n\ 1639 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_with (@var{new_val})\n\
1614 of Octave.}\n\ 1640 of Octave.}\n\
1615 @end deftypefn") 1641 @end deftypefn")
1616 { 1642 {
1643 WARN_OBSOLETE ("gnuplot_command_with");
1644
1617 return SET_INTERNAL_VARIABLE (gnuplot_command_with); 1645 return SET_INTERNAL_VARIABLE (gnuplot_command_with);
1618 } 1646 }
1619 1647
1620 DEFUN_DLD (gnuplot_command_axes, args, nargout, 1648 DEFUN_DLD (gnuplot_command_axes, args, nargout,
1621 "-*- texinfo -*-\n\ 1649 "-*- texinfo -*-\n\
1623 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_axes (@var{new_val})\n\ 1651 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_axes (@var{new_val})\n\
1624 @strong{This function is obsolete and will be removed from a future version\n\ 1652 @strong{This function is obsolete and will be removed from a future version\n\
1625 of Octave.}\n\ 1653 of Octave.}\n\
1626 @end deftypefn") 1654 @end deftypefn")
1627 { 1655 {
1656 WARN_OBSOLETE ("gnuplot_command_axes");
1657
1628 return SET_INTERNAL_VARIABLE (gnuplot_command_axes); 1658 return SET_INTERNAL_VARIABLE (gnuplot_command_axes);
1629 } 1659 }
1630 1660
1631 DEFUN_DLD (gnuplot_command_title, args, nargout, 1661 DEFUN_DLD (gnuplot_command_title, args, nargout,
1632 "-*- texinfo -*-\n\ 1662 "-*- texinfo -*-\n\
1634 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_title (@var{new_val})\n\ 1664 @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_title (@var{new_val})\n\
1635 @strong{This function is obsolete and will be removed from a future version\n\ 1665 @strong{This function is obsolete and will be removed from a future version\n\
1636 of Octave.}\n\ 1666 of Octave.}\n\
1637 @end deftypefn") 1667 @end deftypefn")
1638 { 1668 {
1669 WARN_OBSOLETE ("gnuplot_command_title");
1670
1639 return SET_INTERNAL_VARIABLE (gnuplot_command_title); 1671 return SET_INTERNAL_VARIABLE (gnuplot_command_title);
1640 } 1672 }
1641 1673
1642 DEFUN_DLD (gnuplot_command_end, args, nargout, 1674 DEFUN_DLD (gnuplot_command_end, args, nargout,
1643 "-*- texinfo -*-\n\ 1675 "-*- texinfo -*-\n\
1646 @strong{This function is obsolete and will be removed from a future version\n\ 1678 @strong{This function is obsolete and will be removed from a future version\n\
1647 of Octave.}\n\ 1679 of Octave.}\n\
1648 \n\ 1680 \n\
1649 @end deftypefn") 1681 @end deftypefn")
1650 { 1682 {
1683 WARN_OBSOLETE ("gnuplot_command_end");
1684
1651 return SET_INTERNAL_VARIABLE (gnuplot_command_end); 1685 return SET_INTERNAL_VARIABLE (gnuplot_command_end);
1652 } 1686 }
1653 1687
1654 DEFUN_DLD (gnuplot_use_title_option, args, nargout, 1688 DEFUN_DLD (gnuplot_use_title_option, args, nargout,
1655 "-*- texinfo -*-\n\ 1689 "-*- texinfo -*-\n\
1661 \n\ 1695 \n\
1662 @strong{This function is obsolete and will be removed from a future version\n\ 1696 @strong{This function is obsolete and will be removed from a future version\n\
1663 of Octave.}\n\ 1697 of Octave.}\n\
1664 @end deftypefn") 1698 @end deftypefn")
1665 { 1699 {
1700 WARN_OBSOLETE ("gnuplot_command_use_title_option");
1701
1666 return SET_INTERNAL_VARIABLE (gnuplot_use_title_option); 1702 return SET_INTERNAL_VARIABLE (gnuplot_use_title_option);
1667 } 1703 }
1668 1704
1669 DEFUN_DLD (__clear_plot_window__, , , 1705 DEFUN_DLD (__clear_plot_window__, , ,
1670 "-*- texinfo -*-\n\ 1706 "-*- texinfo -*-\n\
1674 \n\ 1710 \n\
1675 @strong{This function is obsolete and will be removed from a future version\n\ 1711 @strong{This function is obsolete and will be removed from a future version\n\
1676 of Octave.}\n\ 1712 of Octave.}\n\
1677 @end deftypefn") 1713 @end deftypefn")
1678 { 1714 {
1715 WARN_OBSOLETE ("__clear_plot_window__");
1716
1679 gnuplot::clear (); 1717 gnuplot::clear ();
1680 1718
1681 return octave_value_list (); 1719 return octave_value_list ();
1682 } 1720 }
1683 1721
1690 Close stream to the @code{gnuplot} subprocess. If you are using X11,\n\ 1728 Close stream to the @code{gnuplot} subprocess. If you are using X11,\n\
1691 this will close the plot window.\n\ 1729 this will close the plot window.\n\
1692 @seealso{close}\n\ 1730 @seealso{close}\n\
1693 @end deftypefn") 1731 @end deftypefn")
1694 { 1732 {
1733 WARN_OBSOLETE ("closeplot");
1734
1695 gnuplot::close (); 1735 gnuplot::close ();
1696 1736
1697 return octave_value_list (); 1737 return octave_value_list ();
1698 } 1738 }
1699 1739
1709 \n\ 1749 \n\
1710 @strong{This function is obsolete and will be removed from a future version\n\ 1750 @strong{This function is obsolete and will be removed from a future version\n\
1711 of Octave.}\n\ 1751 of Octave.}\n\
1712 @end deftypefn") 1752 @end deftypefn")
1713 { 1753 {
1754 WARN_OBSOLETE ("purge_tmp_files");
1755
1714 gnuplot::cleanup_tmp_files (); 1756 gnuplot::cleanup_tmp_files ();
1715 1757
1716 return octave_value_list (); 1758 return octave_value_list ();
1717 } 1759 }
1718 1760
1723 \n\ 1765 \n\
1724 @strong{This function is obsolete and will be removed from a future version\n\ 1766 @strong{This function is obsolete and will be removed from a future version\n\
1725 of Octave.}\n\ 1767 of Octave.}\n\
1726 @end deftypefn") 1768 @end deftypefn")
1727 { 1769 {
1770 WARN_OBSOLETE ("__gnuplot_raw__");
1771
1728 if (args.length () == 1 && args(0).is_string ()) 1772 if (args.length () == 1 && args(0).is_string ())
1729 { 1773 {
1730 std::string cmd = args(0).string_value (); 1774 std::string cmd = args(0).string_value ();
1731 1775
1732 gnuplot::send_raw (cmd); 1776 gnuplot::send_raw (cmd);
1744 \n\ 1788 \n\
1745 @strong{This function is obsolete and will be removed from a future version\n\ 1789 @strong{This function is obsolete and will be removed from a future version\n\
1746 of Octave.}\n\ 1790 of Octave.}\n\
1747 @end deftypefn") 1791 @end deftypefn")
1748 { 1792 {
1793 WARN_OBSOLETE ("__gnuplot_send_inline_data__");
1794
1749 octave_value retval; 1795 octave_value retval;
1750 1796
1751 int nargin = args.length (); 1797 int nargin = args.length ();
1752 1798
1753 if (nargin > 0 && nargin < 4) 1799 if (nargin > 0 && nargin < 4)
1782 \n\ 1828 \n\
1783 @strong{This function is obsolete and will be removed from a future version\n\ 1829 @strong{This function is obsolete and will be removed from a future version\n\
1784 of Octave.}\n\ 1830 of Octave.}\n\
1785 @end deffn") 1831 @end deffn")
1786 { 1832 {
1833 WARN_OBSOLETE ("__gnuplot_set__");
1834
1787 string_vector argv = args.make_argv ("set"); 1835 string_vector argv = args.make_argv ("set");
1788 1836
1789 if (! error_state) 1837 if (! error_state)
1790 gnuplot::set (argv); 1838 gnuplot::set (argv);
1791 1839
1799 \n\ 1847 \n\
1800 @strong{This function is obsolete and will be removed from a future version\n\ 1848 @strong{This function is obsolete and will be removed from a future version\n\
1801 of Octave.}\n\ 1849 of Octave.}\n\
1802 @end deffn") 1850 @end deffn")
1803 { 1851 {
1852 WARN_OBSOLETE ("__gnuplot_show__");
1853
1804 string_vector argv = args.make_argv ("show"); 1854 string_vector argv = args.make_argv ("show");
1805 1855
1806 if (! error_state) 1856 if (! error_state)
1807 gnuplot::show (argv); 1857 gnuplot::show (argv);
1808 1858
1814 Plot with gnuplot.\n\ 1864 Plot with gnuplot.\n\
1815 \n\ 1865 \n\
1816 @strong{This function is obsolete and will be removed from a future version\n\ 1866 @strong{This function is obsolete and will be removed from a future version\n\
1817 of Octave.}") 1867 of Octave.}")
1818 { 1868 {
1869 WARN_OBSOLETE ("__gnuplot_plot__");
1870
1819 string_vector argv = args.make_argv ("plot"); 1871 string_vector argv = args.make_argv ("plot");
1820 1872
1821 if (! error_state) 1873 if (! error_state)
1822 gnuplot::plot (argv); 1874 gnuplot::plot (argv);
1823 1875
1829 Plot with gnuplot.\n\ 1881 Plot with gnuplot.\n\
1830 \n\ 1882 \n\
1831 @strong{This function is obsolete and will be removed from a future version\n\ 1883 @strong{This function is obsolete and will be removed from a future version\n\
1832 of Octave.}") 1884 of Octave.}")
1833 { 1885 {
1886 WARN_OBSOLETE ("__gnuplot_splot__");
1887
1834 string_vector argv = args.make_argv ("splot"); 1888 string_vector argv = args.make_argv ("splot");
1835 1889
1836 if (! error_state) 1890 if (! error_state)
1837 gnuplot::plot (argv); 1891 gnuplot::plot (argv);
1838 1892
1844 Plot with gnuplot.\n\ 1898 Plot with gnuplot.\n\
1845 \n\ 1899 \n\
1846 @strong{This function is obsolete and will be removed from a future version\n\ 1900 @strong{This function is obsolete and will be removed from a future version\n\
1847 of Octave.}") 1901 of Octave.}")
1848 { 1902 {
1903 WARN_OBSOLETE ("__gnuplot_replot__");
1904
1849 string_vector argv = args.make_argv ("replot"); 1905 string_vector argv = args.make_argv ("replot");
1850 1906
1851 if (! error_state) 1907 if (! error_state)
1852 gnuplot::plot (argv); 1908 gnuplot::plot (argv);
1853 1909