Mercurial > hg > octave-nkf
changeset 2465:7ee42ff6536a
[project @ 1996-11-03 08:54:14 by jwe]
line wrap: on
line diff
--- a/doc/interpreter/arith.texi +++ b/doc/interpreter/arith.texi @@ -128,7 +128,7 @@ see @ref{Linear Algebra}. @end deftypefn -@deftypefn {Mapping Function} {} max (@var{x}) +@deftypefn {Loadable Function} {} max (@var{x}) For a vector argument, return the maximum value. For a matrix argument, return the maximum value from each column, as a row vector. Thus, @@ -143,7 +143,7 @@ comparison. @end deftypefn -@deftypefn {Mapping Function} {} min (@var{x}) +@deftypefn {Loadable Function} {} min (@var{x}) Like @code{max}, but return the minimum value. @end deftypefn
--- a/doc/interpreter/diffeq.texi +++ b/doc/interpreter/diffeq.texi @@ -40,7 +40,7 @@ @noindent using Hindmarsh's ODE solver LSODE. -@deftypefn {Built-in Function} {} lsode (@var{fcn}, @var{x0}, @var{t_out}, @var{t_crit}) +@deftypefn {Lodable Function} {} lsode (@var{fcn}, @var{x0}, @var{t_out}, @var{t_crit}) The first argument is the name of the function to call to compute the vector of right hand sides. It must have the form @@ -98,7 +98,7 @@ @end example @end deftypefn -@deftypefn {Built-in Function} {} lsode_options (@var{opt}, @var{val}) +@deftypefn {Lodable Function} {} lsode_options (@var{opt}, @var{val}) When called with two arguments, this function allows you set options parameters for the function @code{lsode}. Given one argument, @code{lsode_options} returns the value of the corresponding option. If @@ -128,7 +128,7 @@ @end example @end ifinfo -@deftypefn {Built-in Function} {[@var{x}, @var{xdot}] =} dassl (@var{fcn}, @var{x_0}, @var{xdot_0}, @var{t_out}, @var{t_crit}) +@deftypefn {Loadable Function} {[@var{x}, @var{xdot}] =} dassl (@var{fcn}, @var{x_0}, @var{xdot_0}, @var{t_out}, @var{t_crit}) The first argument is the name of the function to call to compute the vector of residuals. It must have the form @@ -156,7 +156,7 @@ discontinuity in the derivative. @end deftypefn -@deftypefn {Built-in Function} {} dassl_options (@var{opt}, @var{val}) +@deftypefn {Loadable Function} {} dassl_options (@var{opt}, @var{val}) When called with two arguments, this function allows you set options parameters for the function @code{lsode}. Given one argument, @code{dassl_options} returns the value of the corresponding option. If
--- a/doc/interpreter/linalg.texi +++ b/doc/interpreter/linalg.texi @@ -19,9 +19,9 @@ @node Basic Matrix Functions, Matrix Factorizations, Linear Algebra, Linear Algebra @section Basic Matrix Functions -@deftypefn {Built-in Function} {@var{aa} =} balance (@var{a}, @var{opt}) -@deftypefnx {Built-in Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt}) -@deftypefnx {Built-in Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb]} =} balance (@var{a}, @var{b}, @var{opt}) +@deftypefn {Loadable Function} {@var{aa} =} balance (@var{a}, @var{opt}) +@deftypefnx {Loadable Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt}) +@deftypefnx {Loadable Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb]} =} balance (@var{a}, @var{b}, @var{opt}) @code{[dd, aa] = balance (a)} returns @code{aa = dd \ a * dd}. @code{aa} is a matrix whose row/column norms are roughly equal in @@ -66,12 +66,12 @@ singular value decomposition. @end deftypefn -@deftypefn {Built-in Function} {} det (@var{a}) +@deftypefn {Loadable Function} {} det (@var{a}) Compute the determinant of @var{a} using LINPACK. @end deftypefn -@deftypefn {Built-in Function} {@var{lambda} =} eig (@var{a}) -@deftypefnx {Built-in Function} {[@var{v}, @var{lambda}] =} eig (@var{a}) +@deftypefn {Loadable Function} {@var{lambda} =} eig (@var{a}) +@deftypefnx {Loadable Function} {[@var{v}, @var{lambda}] =} eig (@var{a}) The eigenvalues (and eigenvectors) of a matrix are computed in a several step process which begins with a Hessenberg decomposition (see @code{hess}), followed by a Schur decomposition (see @code{schur}), from @@ -81,8 +81,8 @@ See also: @code{hess}, @code{schur}. @end deftypefn -@deftypefn {Built-in Function} {@var{G} =} givens (@var{x}, @var{y}) -@deftypefnx {Built-in Function} {[@var{c}, @var{s}] =} givens (@var{x}, @var{y}) +@deftypefn {Loadable Function} {@var{G} =} givens (@var{x}, @var{y}) +@deftypefnx {Loadable Function} {[@var{c}, @var{s}] =} givens (@var{x}, @var{y}) @code{G = givens(x, y)} returns a @iftex @tex @@ -96,8 +96,8 @@ @code{G [x; y] = [*; 0]} (x, y scalars) @end deftypefn -@deftypefn {Built-in Function} {} inv (@var{a}) -@deftypefnx {Built-in Function} {} inverse (@var{a}) +@deftypefn {Loadable Function} {} inv (@var{a}) +@deftypefnx {Loadable Function} {} inverse (@var{a}) Compute the inverse of the square matrix @var{a}. @end deftypefn @@ -195,7 +195,7 @@ @node Matrix Factorizations, Functions of a Matrix, Basic Matrix Functions, Linear Algebra @section Matrix Factorizations -@deftypefn {Built-in Function} {} chol (@var{a}) +@deftypefn {Loadable Function} {} chol (@var{a}) Compute the Cholesky factor, @var{r}, of the symmetric positive definite matrix @var{a}, where @iftex @@ -211,8 +211,8 @@ @end ifinfo @end deftypefn -@deftypefn {Built-in Function} {@var{h} =} hess (@var{a}) -@deftypefnx {Built-in Function} {[@var{p}, @var{h}] =} hess (@var{a}) +@deftypefn {Loadable Function} {@var{h} =} hess (@var{a}) +@deftypefnx {Loadable Function} {[@var{p}, @var{h}] =} hess (@var{a}) Compute the Hessenberg decomposition of the matrix @var{a}. The Hessenberg decomposition is usually used as the first step in an @@ -224,7 +224,7 @@ (@code{i >= j+1 => h (i, j) = 0}). @end deftypefn -@deftypefn {Built-in Function} {[@var{l}, @var{u}, @var{p}] =} lu (@var{a}) +@deftypefn {Loadable Function} {[@var{l}, @var{u}, @var{p}] =} lu (@var{a}) Compute the LU decomposition of @var{a}, using subroutines from LAPACK. The result is returned in a permuted form, according to the optional return value @var{p}. For example, given the matrix @@ -255,7 +255,7 @@ @end example @end deftypefn -@deftypefn {Built-in Function} {[@var{q}, @var{r}] =} qr (@var{a}) +@deftypefn {Loadable Function} {[@var{q}, @var{r}] =} qr (@var{a}) Compute the QR factorization of @var{a}, using standard LAPACK subroutines. For example, given the matrix @code{a = [1, 2; 3, 4]}, @@ -340,8 +340,8 @@ @code{span (a)}. @end deftypefn -@deftypefn {Built-in Function} {@var{s}} schur (@var{a}) -@deftypefnx {Built-in Function} {[@var{u}, @var{s}] =} schur (@var{a}, @var{opt}) +@deftypefn {Loadable Function} {@var{s}} schur (@var{a}) +@deftypefnx {Loadable Function} {[@var{u}, @var{s}] =} schur (@var{a}, @var{opt}) The Schur decomposition is used to compute eigenvalues of a square matrix, and has applications in the solution of algebraic Riccati equations in control (see @code{are} and @code{dare}). @@ -546,8 +546,8 @@ @end ifinfo @end deftypefn -@deftypefn {Built-in Function} {@var{s} =} svd (@var{a}) -@deftypefnx {Built-in Function} {[@var{u}, @var{s}, @var{v}] =} svd (@var{a}) +@deftypefn {Loadable Function} {@var{s} =} svd (@var{a}) +@deftypefnx {Loadable Function} {[@var{u}, @var{s}, @var{v}] =} svd (@var{a}) Compute the singular value decomposition of @var{a} @iftex @tex @@ -628,7 +628,7 @@ @node Functions of a Matrix, , Matrix Factorizations, Linear Algebra @section Functions of a Matrix -@deftypefn {Built-in Function} {} expm (@var{a}) +@deftypefn {Loadable Function} {} expm (@var{a}) Returns the exponential of a matrix, defined as the infinite Taylor series @iftex @@ -714,13 +714,13 @@ is ill-conditioned. @end deftypefn -@deftypefn {Built-in Function} {} logm (@var{a}) +@deftypefn {Loadable Function} {} logm (@var{a}) Compute the matrix logarithm of the square matrix @var{a}. Note that this is currently implemented in terms of an eigenvalue expansion and needs to be improved to be more robust. @end deftypefn -@deftypefn {Built-in Function} {} sqrtm (@var{a}) +@deftypefn {Loadable Function} {} sqrtm (@var{a}) Compute the matrix square root of the square matrix @var{a}. Note that this is currently implemented in terms of an eigenvalue expansion and needs to be improved to be more robust. @@ -751,11 +751,11 @@ edition}. @end deftypefn -@deftypefn {Built-in Function} {} qzval (@var{a}, @var{b}) +@deftypefn {Loadable Function} {} qzval (@var{a}, @var{b}) Compute generalized eigenvalues. @end deftypefn -@deftypefn {Built-in Function} {} syl (@var{a}, @var{b}, @var{c}) +@deftypefn {Loadable Function} {} syl (@var{a}, @var{b}, @var{c}) Solve the Sylvester equation @iftex @tex
--- a/doc/interpreter/matrix.texi +++ b/doc/interpreter/matrix.texi @@ -114,7 +114,7 @@ @end example @end deftypefn -@deftypefn {Built-in Function} {} find (@var{x}) +@deftypefn {Loadable Function} {} find (@var{x}) The function @code{find} returns a vector of indices of nonzero elements of a matrix. To obtain a single index for each matrix element, Octave pretends that the columns of a matrix form one long vector (like Fortran @@ -250,7 +250,7 @@ matrix must match the total number of elements in the new matrix. @end deftypefn -@deftypefn {Built-in Function} {[s, i] =} sort (@var{x}) +@deftypefn {Loadable Function} {[s, i] =} sort (@var{x}) Returns a copy of @var{x} with the elements elements arranged in increasing order. For matrices, @code{sort} orders the elements in each column.
--- a/doc/interpreter/nonlin.texi +++ b/doc/interpreter/nonlin.texi @@ -26,13 +26,13 @@ using the function @code{fsolve}, which is based on the MINPACK subroutine @code{hybrd}. -@deftypefn {Built-in Function} {[@var{x}, @var{info}] =} fsolve (@var{fcn}, @var{x0}) +@deftypefn {Loadable Function} {[@var{x}, @var{info}] =} fsolve (@var{fcn}, @var{x0}) Given @var{fcn}, the name of a function of the form @code{f (@var{x})} and an initial starting point @var{x0}, @code{fsolve} solves the set of equations such that @code{f(@var{x}) == 0}. @end deftypefn -@deftypefn {Built-in Function} {} fsolve_options (@var{opt}, @var{val}) +@deftypefn {Loadable Function} {} fsolve_options (@var{opt}, @var{val}) When called with two arguments, this function allows you set options parameters for the function @code{fsolve}. Given one argument, @code{fsolve_options} returns the value of the corresponding option. If
--- a/doc/interpreter/optim.texi +++ b/doc/interpreter/optim.texi @@ -22,13 +22,13 @@ @node Quadratic Programming, Nonlinear Programming, Optimization, Optimization @section Quadratic Programming -@deftypefn {Built-in Function} {[@var{x}, @var{obj}, @var{info}, @var{lambda}] =} qpsol (@var{x}, @var{H}, @var{c}, @var{lb}, @var{ub}, @var{lb}, @var{A}, @var{ub}) +@deftypefn {Loadable Function} {[@var{x}, @var{obj}, @var{info}, @var{lambda}] =} qpsol (@var{x}, @var{H}, @var{c}, @var{lb}, @var{ub}, @var{lb}, @var{A}, @var{ub}) Solve quadratic programs using Gill and Murray's QPSOL. Because QPSOL is not freely redistributable, this function is only available if you have obtained your own copy of QPSOL. @xref{Installation}. @end deftypefn -@deftypefn {Built-in Function} {} qpsol_options (@var{opt}, @var{val}) +@deftypefn {Loadable Function} {} qpsol_options (@var{opt}, @var{val}) When called with two arguments, this function allows you set options parameters for the function @code{qpsol}. Given one argument, @code{qpsol_options} returns the value of the corresponding option. If @@ -40,10 +40,10 @@ @section Nonlinear Programming @ignore -@deftypefn {Built-in Function} {} fsqp () +@deftypefn {Loadable Function} {} fsqp () @end deftypefn -@deftypefn {Built-in Function} {} fsqp_options (@var{opt}, @var{val}) +@deftypefn {Loadable Function} {} fsqp_options (@var{opt}, @var{val}) When called with two arguments, this function allows you set options parameters for the function @code{fsqp}. Given one argument, @code{fsqp_options} returns the value of the corresponding option. If @@ -54,7 +54,7 @@ Sorry, this hasn't been implemented yet. @end ignore -@deftypefn {Built-in Function} {[@var{x}, @var{obj}, @var{info}, @var{lambda}] =} npsol (@var{x}, @var{phi}, @var{lb}, @var{ub}, @var{lb}, @var{A}, @var{ub}, @var{lb}, @var{g}, @var{ub}) +@deftypefn {Loadable Function} {[@var{x}, @var{obj}, @var{info}, @var{lambda}] =} npsol (@var{x}, @var{phi}, @var{lb}, @var{ub}, @var{lb}, @var{A}, @var{ub}, @var{lb}, @var{g}, @var{ub}) Solve nonlinear programs using Gill and Murray's NPSOL. Because NPSOL is not freely redistributable, this function is only available if you have obtained your own copy of NPSOL. @xref{Installation}. @@ -70,7 +70,7 @@ where x is a vector and y is a scalar. @end deftypefn -@deftypefn {Built-in Function} {} npsol_options (@var{opt}, @var{val}) +@deftypefn {Loadable Function} {} npsol_options (@var{opt}, @var{val}) When called with two arguments, this function allows you set options parameters for the function @code{npsol}. Given one argument, @code{npsol_options} returns the value of the corresponding option. If
--- a/doc/interpreter/quad.texi +++ b/doc/interpreter/quad.texi @@ -13,7 +13,7 @@ @node Functions of one Variable, Orthogonal Collocation, Quadrature, Quadrature @section Functions of one Variable -@deftypefn {Built-in Function} {[@var{v}, @var{ier}, @var{nfun}] =} quad (@var{f}, @var{a}, @var{b}, @var{tol}, @var{sing}) +@deftypefn {Loadable Function} {[@var{v}, @var{ier}, @var{nfun}] =} quad (@var{f}, @var{a}, @var{b}, @var{tol}, @var{sing}) Integrate a nonlinear function of one variable using Quadpack. The first argument is the name of the function to call to compute the value of the integrand. It must have the form @@ -39,7 +39,7 @@ integrand is known to be singular. @end deftypefn -@deftypefn {Built-in Function} {} quad_options (@var{opt}, @var{val}) +@deftypefn {Loadable Function} {} quad_options (@var{opt}, @var{val}) When called with two arguments, this function allows you set options parameters for the function @code{quad}. Given one argument, @code{quad_options} returns the value of the corresponding option. If @@ -50,7 +50,7 @@ @node Orthogonal Collocation, , Functions of one Variable, Quadrature @section Orthogonal Collocation -@deftypefn {Built-in Function} {[@var{r}, @var{A}, @var{B}, @var{q}] =} colloc (@var{n}, "left", "right") +@deftypefn {Loadable Function} {[@var{r}, @var{A}, @var{B}, @var{q}] =} colloc (@var{n}, "left", "right") Compute derivative and integral weight matrices for orthogonal collocation using the subroutines given in J. Villadsen and M. L. Michelsen, @cite{Solution of Differential Equation Models by
--- a/doc/interpreter/signal.texi +++ b/doc/interpreter/signal.texi @@ -20,7 +20,7 @@ padded with zeros. @end deftypefn -@deftypefn {Built-in Function} {} ifft (@var{a} [, @var{n}]) +@deftypefn {Loadable Function} {} ifft (@var{a} [, @var{n}]) Compute the inverse FFT of @var{a} using subroutines from FFTPACK. If @var{a} is a matrix, @code{fft} computes the inverse FFT for each column of @var{a}. @@ -32,7 +32,7 @@ padded with zeros. @end deftypefn -@deftypefn {Built-in Function} {} fft2 (@var{a} [, @var{n} [, @var{m}]]) +@deftypefn {Loadable Function} {} fft2 (@var{a} [, @var{n} [, @var{m}]]) Compute the two dimensional FFT of @var{a}. The optional arguments @var{n} and @var{m} may be used specify the @@ -41,7 +41,7 @@ zeros. @end deftypefn -@deftypefn {Built-in Function} {} ifft2 (@var{a} [, @var{n} [, @var{m}]]) +@deftypefn {Loadable Function} {} ifft2 (@var{a} [, @var{n} [, @var{m}]]) Compute the two dimensional inverse FFT of @var{a}. The optional arguments @var{n} and @var{m} may be used specify the @@ -70,7 +70,7 @@ overlap-add method to filter @var{x} with @var{b} using an N-point FFT. @end deftypefn -@deftypefn {Built-in Function} {y =} filter (@var{b}, @var{a}, @var{x}) +@deftypefn {Loadable Function} {y =} filter (@var{b}, @var{a}, @var{x}) This function returns the solution to the following linear, time-invariant difference equation: @iftex @@ -153,7 +153,7 @@ @end ifinfo @end deftypefn -@deftypefn {Built-in Function} {[@var{y}, @var{sf}] =} filter (@var{b}, @var{a}, @var{x}, @var{si}) +@deftypefn {Loadable Function} {[@var{y}, @var{sf}] =} filter (@var{b}, @var{a}, @var{x}, @var{si}) This is the same as the @code{filter} function described above, except that @var{si} is taken as the initial state of the system and the final state is returned as @var{sf}. The state vector is a column vector
--- a/doc/interpreter/special.texi +++ b/doc/interpreter/special.texi @@ -69,9 +69,9 @@ the same as the arguments for @code{eye}. @end deftypefn -@deftypefn {Built-in Function} {} rand (@var{x}) -@deftypefnx {Built-in Function} {} rand (@var{n}, @var{m}) -@deftypefnx {Built-in Function} {} rand (@code{"seed"}, @var{x}) +@deftypefn {Loadable Function} {} rand (@var{x}) +@deftypefnx {Loadable Function} {} rand (@var{n}, @var{m}) +@deftypefnx {Loadable Function} {} rand (@code{"seed"}, @var{x}) Returns a matrix with random elements uniformly distributed on the interval (0, 1). The arguments are handled the same as the arguments for @code{eye}. In @@ -93,9 +93,9 @@ @code{rand} returns the current value of the seed. @end deftypefn -@deftypefn {Built-in Function} {} randn (@var{x}) -@deftypefnx {Built-in Function} {} randn (@var{n}, @var{m}) -@deftypefnx {Built-in Function} {} randn (@code{"seed"}, @var{x}) +@deftypefn {Loadable Function} {} randn (@var{x}) +@deftypefnx {Loadable Function} {} randn (@var{n}, @var{m}) +@deftypefnx {Loadable Function} {} randn (@code{"seed"}, @var{x}) Returns a matrix with normally distributed random elements. The arguments are handled the same as the arguments for @code{eye}. In addition, you can set the seed for the random number generator using the
--- a/doc/interpreter/system.texi +++ b/doc/interpreter/system.texi @@ -23,7 +23,7 @@ @node Timing Utilities, Filesystem Utilities, System Utilities, System Utilities @section Timing Utilities -@deftypefn {Built-in Function} {} time () +@deftypefn {Loadable Function} {} time () Return the current time as the number of seconds since the epoch. The epoch is referenced to 00:00:00 CUT (Coordinated Universal Time) 1 Jan 1970. @@ -68,16 +68,16 @@ Time zone. @end table -@deftypefn {Built-in Function} {} mktime (@var{time_struct}) +@deftypefn {Loadable Function} {} mktime (@var{time_struct}) Convert a time structure to the number of seconds since the epoch. @end deftypefn -@deftypefn {Built-in Function} {} localtime (@var{t}) +@deftypefn {Loadable Function} {} localtime (@var{t}) Given a value returned from time (or any nonnegative integer), return a time structure corresponding to the local time zone. @end deftypefn -@deftypefn {Built-in Function} {} gmtime (@var{t}) +@deftypefn {Loadable Function} {} gmtime (@var{t}) Given a value returned from time (or any nonnegative integer), return a time structure corresponding to CUT. @end deftypefn @@ -88,7 +88,7 @@ equivalent to @code{asctime (localtime (time))}. @end deftypefn -@deftypefn {Built-in Function} {} strftime (@var{time_struct}) +@deftypefn {Loadable Function} {} strftime (@var{time_struct}) Format a time structure in a flexible way using @samp{%} substitutions similar to those in @code{printf}. Except where noted, substituted fields have a fixed size; numeric fields are padded if necessary. @@ -557,28 +557,28 @@ The initial shell. @end table -@deftypefn {Built-in Function} {passwd_struct =} getpwent () +@deftypefn {Loadable Function} {passwd_struct =} getpwent () Return an entry from the password database, opening it if necessary. Once the end of the data has been reached, @code{getpwent} returns 0. @end deftypefn -@deftypefn {Built-in Function} {passwd_struct =} getpwuid (@var{uid}). +@deftypefn {Loadable Function} {passwd_struct =} getpwuid (@var{uid}). Return the first entry from the password database with the user ID @var{uid}. If the user ID does not exist in the database, @code{getpwuid} returns 0. @end deftypefn -@deftypefn {Built-in Function} {passwd_struct =} getpwnam (@var{name}) +@deftypefn {Loadable Function} {passwd_struct =} getpwnam (@var{name}) Return the first entry from the password database with the user name @var{name}. If the user name does not exist in the database, @code{getpwname} returns 0. @end deftypefn -@deftypefn {Built-in Function} {} setpwent () +@deftypefn {Loadable Function} {} setpwent () Return the internal pointer to the beginning of the password database. @end deftypefn -@deftypefn {Built-in Function} {} endpwent () +@deftypefn {Loadable Function} {} endpwent () Close the password database. @end deftypefn @@ -605,7 +605,7 @@ the built-in variable @code{OCTAVE_VERSION}. @xref{Built-in Variables}. @end deftypefn -@deftypefn {Built-in Function} {} getrusage () +@deftypefn {Loadable Function} {} getrusage () Return a structure containing a number of statistics about the current Octave process. Not all fields are available on all systems. If it is not possible to get CPU time statistics, the CPU time slots are set to
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,18 @@ Sun Nov 3 00:45:30 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + * mk-oct-links.in: In sed command, match "DEFUN_DLD *( *", not + "DEFUN_DLD_BUILTIN *( *". + + * chol.cc, colloc.cc, dassl.cc, det.cc, eig.cc, expm.cc, fft.cc, + fft2.cc, filter.cc, find.cc, fsolve.cc, fsqp.cc, getpwent.cc, + getrusage.cc, givens.cc, hess.cc, ifft.cc, ifft2.cc, inv.cc, + log.cc, lpsolve.cc, lsode.cc, lu.cc, minmax.cc, npsol.cc, pinv.cc, + qpsol.cc, qr.cc, quad.cc, qzval.cc, rand.cc, schur.cc, sort.cc, + svd.cc, syl.cc, time.cc: Change all uses of DEFUN_DLD_BUILTIN to + be just DEFUN_DLD. + + * defun-dld.h: Eliminate DEFUN_DLD_BUILTIN. + * syswait.h: Use #ifdef HAVE_SYS_WAIT_H, not #if HAVE_SYS_WAIT_H to decide whether to include sys/wait.h.
--- a/src/balance.cc +++ b/src/balance.cc @@ -41,7 +41,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (balance, args, nargout, +DEFUN_DLD (balance, args, nargout, "AA = balance (A [, OPT]) or [[DD,] AA] = balance (A [, OPT])\n\ \n\ generalized eigenvalue problem:\n\
--- a/src/chol.cc +++ b/src/chol.cc @@ -34,7 +34,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (chol, args, nargout, +DEFUN_DLD (chol, args, nargout, "R = chol (X): cholesky factorization") { octave_value_list retval;
--- a/src/colloc.cc +++ b/src/colloc.cc @@ -35,7 +35,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (colloc, args, , +DEFUN_DLD (colloc, args, , "[R, A, B, Q] = colloc (N [, \"left\"] [, \"right\"]): collocation weights") { octave_value_list retval;
--- a/src/dassl.cc +++ b/src/dassl.cc @@ -105,7 +105,7 @@ return retval; } -DEFUN_DLD_BUILTIN (dassl, args, , +DEFUN_DLD (dassl, args, , "dassl (\"function_name\", x_0, xdot_0, t_out)\n\ dassl (F, X_0, XDOT_0, T_OUT, T_CRIT)\n\ \n\ @@ -319,7 +319,7 @@ return retval; } -DEFUN_DLD_BUILTIN (dassl_options, args, , +DEFUN_DLD (dassl_options, args, , "dassl_options (KEYWORD, VALUE)\n\ \n\ Set or show options for dassl. Keywords may be abbreviated\n\
--- a/src/defun-dld.h +++ b/src/defun-dld.h @@ -33,27 +33,18 @@ // time. // // If Octave is not configured for dynamic linking of builtin -// functions, this is exactly like DEFUN. +// functions, this is similar to DEFUN, except that it will generate +// an extra static struct and an extra externally visible function. +// +// The first DECLARE_FUN is for the struct, the second is for the +// definition of the function. -#if defined (OCTAVE_LITE) && defined (WITH_DYNAMIC_LINKING) -#if ! defined (MAKE_BUILTINS) -#define DEFUN_DLD_BUILTIN(name, args_name, nargout_name, doc) \ - DEFUN_DLD (name, args_name, nargout_name, doc) -#endif -#else -#define DEFUN_DLD_BUILTIN(name, args_name, nargout_name, doc) \ +#if defined (MAKE_BUILTINS) +#if ! (defined (OCTAVE_LITE) && defined (WITH_DYNAMIC_LINKING)) +#define DEFUN_DLD(name, args_name, nargout_name, doc) \ DEFUN_INTERNAL (name, args_name, nargout_name, 0, doc) #endif - -// Define a function that may be loaded dynamically at run time. -// -// If Octave is not configured for dynamic linking of builtin -// functions, this won't do anything useful. -// -// The forward declaration is for the struct, the second is for the -// definition of the function. - -#if ! defined (MAKE_BUILTINS) +#else #define DEFUN_DLD(name, args_name, nargout_name, doc) \ DECLARE_FUN (name, args_name, nargout_name); \ DEFINE_FUN_STRUCT (name, 0, doc); \
--- a/src/det.cc +++ b/src/det.cc @@ -34,7 +34,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (det, args, , +DEFUN_DLD (det, args, , "det (X): determinant of a square matrix") { octave_value_list retval;
--- a/src/eig.cc +++ b/src/eig.cc @@ -33,7 +33,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (eig, args, nargout, +DEFUN_DLD (eig, args, nargout, "eig (X) or [V, D] = eig (X): compute eigenvalues and eigenvectors of X") { octave_value_list retval;
--- a/src/expm.cc +++ b/src/expm.cc @@ -33,7 +33,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (expm, args, , +DEFUN_DLD (expm, args, , "expm (X): matrix exponential, e^A") { octave_value_list retval;
--- a/src/fft.cc +++ b/src/fft.cc @@ -34,7 +34,7 @@ // This function should be merged with Fifft. -DEFUN_DLD_BUILTIN (fft, args, , +DEFUN_DLD (fft, args, , "fft (X [, N]): fast fourier transform of a vector") { octave_value_list retval;
--- a/src/fft2.cc +++ b/src/fft2.cc @@ -34,7 +34,7 @@ // This function should be merged with Fifft2. -DEFUN_DLD_BUILTIN (fft2, args, , +DEFUN_DLD (fft2, args, , "fft2 (X [, N] [, M])\n\ \n\ two dimensional fast fourier transform of a vector")
--- a/src/filter.cc +++ b/src/filter.cc @@ -148,7 +148,7 @@ return filter (b, a, x, si); } -DEFUN_DLD_BUILTIN (filter, args, , +DEFUN_DLD (filter, args, , "usage: [y [, sf]] = filter (b, a, x [, si])\n\ \n\ y = filter (b, a, x) returns the solution to the following linear,\n\
--- a/src/find.cc +++ b/src/find.cc @@ -157,7 +157,7 @@ return find_to_fortran_idx (i_idx, j_idx, tmp, m_nr, nargout); } -DEFUN_DLD_BUILTIN (find, args, nargout, +DEFUN_DLD (find, args, nargout, "find (X) or [I, J, V] = find (X): Return indices of nonzero elements") { octave_value_list retval;
--- a/src/fsolve.cc +++ b/src/fsolve.cc @@ -121,7 +121,7 @@ return retval; } -DEFUN_DLD_BUILTIN (fsolve, args, nargout, +DEFUN_DLD (fsolve, args, nargout, "Solve nonlinear equations using Minpack. Usage:\n\ \n\ [X, INFO] = fsolve (F, X0)\n\ @@ -280,7 +280,7 @@ return retval; } -DEFUN_DLD_BUILTIN (fsolve_options, args, , +DEFUN_DLD (fsolve_options, args, , "fsolve_options (KEYWORD, VALUE)\n\ \n\ Set or show options for fsolve. Keywords may be abbreviated\n\
--- a/src/fsqp.cc +++ b/src/fsqp.cc @@ -53,12 +53,12 @@ #endif #if defined (FSQP_MISSING) -DEFUN_DLD_BUILTIN (fsqp, , , +DEFUN_DLD (fsqp, , , "This function requires FSQP, which is not freely\n\ redistributable. For more information, read the file\n\ libcruft/fsqp/README.MISSING in the source distribution.") #else -DEFUN_DLD_BUILTIN (fsqp, , , +DEFUN_DLD (fsqp, , , "[X, PHI] = fsqp (X, PHI [, LB, UB] [, LB, A, UB] [, LB, G, UB])\n\ \n\ Groups of arguments surrounded in `[]' are optional, but\n\ @@ -88,12 +88,12 @@ } #if defined (FSQP_MISSING) -DEFUN_DLD_BUILTIN (fsqp_options, , , +DEFUN_DLD (fsqp_options, , , "This function requires FSQP, which is not freely\n\ redistributable. For more information, read the file\n\ libcruft/fsqp/README.MISSING in the source distribution.") #else -DEFUN_DLD_BUILTIN (fsqp_options, , , +DEFUN_DLD (fsqp_options, , , "fsqp_options (KEYWORD, VALUE)\n\ \n\ Set or show options for fsqp. Keywords may be abbreviated\n\
--- a/src/getpwent.cc +++ b/src/getpwent.cc @@ -79,7 +79,7 @@ } #endif -DEFUN_DLD_BUILTIN (getpwent, , , +DEFUN_DLD (getpwent, , , "getpwent ()\n\ \n\ Read an entry from the password-file stream, opening it if necessary.") @@ -95,7 +95,7 @@ return retval; } -DEFUN_DLD_BUILTIN (getpwuid, args, , +DEFUN_DLD (getpwuid, args, , "getpwuid (UID)\n\ \n\ Search for a password entry with a matching user ID.") @@ -130,7 +130,7 @@ return retval; } -DEFUN_DLD_BUILTIN (getpwnam, args, , +DEFUN_DLD (getpwnam, args, , "getpwnam (NAME)\n\ \n\ Search for password entry with a matching username.") @@ -156,7 +156,7 @@ return retval; } -DEFUN_DLD_BUILTIN (setpwent, , , +DEFUN_DLD (setpwent, , , "setpwent ()\n\ \n\ Rewind the password-file stream.") @@ -172,7 +172,7 @@ return retval; } -DEFUN_DLD_BUILTIN (endpwent, , , +DEFUN_DLD (endpwent, , , "endpwent ()\n\ \n\ Close the password-file stream.")
--- a/src/getrusage.cc +++ b/src/getrusage.cc @@ -63,7 +63,7 @@ // System resource functions. -DEFUN_DLD_BUILTIN (getrusage, , , +DEFUN_DLD (getrusage, , , "getrusage ()\n\ \n\ Return system resource statistics.")
--- a/src/givens.cc +++ b/src/givens.cc @@ -31,7 +31,7 @@ #include "help.h" #include "oct-obj.h" -DEFUN_DLD_BUILTIN (givens, args, nargout, +DEFUN_DLD (givens, args, nargout, "G = givens (X, Y)\n\ \n\ compute orthogonal matrix G = [c s; -conj (s) c]\n\
--- a/src/hess.cc +++ b/src/hess.cc @@ -34,7 +34,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (hess, args, nargout, +DEFUN_DLD (hess, args, nargout, "[P, H] = hess (A) or H = hess (A): Hessenberg decomposition") { octave_value_list retval;
--- a/src/ifft.cc +++ b/src/ifft.cc @@ -34,7 +34,7 @@ // This function should be merged with Ffft. -DEFUN_DLD_BUILTIN (ifft, args, , +DEFUN_DLD (ifft, args, , "ifft (X [, N]): inverse fast fourier transform of a vector") { octave_value_list retval;
--- a/src/ifft2.cc +++ b/src/ifft2.cc @@ -34,7 +34,7 @@ // This function should be merged with Ffft2. -DEFUN_DLD_BUILTIN (ifft2, args, , +DEFUN_DLD (ifft2, args, , "ifft2 (X [, N] [, M])\n\ \n\ two dimensional inverse fast fourier transform of a vector")
--- a/src/inv.cc +++ b/src/inv.cc @@ -31,7 +31,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (inv, args, , +DEFUN_DLD (inv, args, , "inv (X): inverse of a square matrix") { octave_value_list retval; @@ -106,7 +106,7 @@ // alias_builtin() won't do the right thing if we are actually using // dynamic linking. -DEFUN_DLD_BUILTIN (inverse, args, nargout, +DEFUN_DLD (inverse, args, nargout, "inverse (X): inverse of a square matrix") { return Finv (args, nargout);
--- a/src/log.cc +++ b/src/log.cc @@ -36,7 +36,7 @@ // XXX FIXME XXX -- the next two functions should really be just // one... -DEFUN_DLD_BUILTIN (logm, args, , +DEFUN_DLD (logm, args, , "logm (X): matrix logarithm") { octave_value_list retval; @@ -148,7 +148,7 @@ return retval; } -DEFUN_DLD_BUILTIN (sqrtm, args, , +DEFUN_DLD (sqrtm, args, , "sqrtm (X): matrix sqrt") { octave_value_list retval;
--- a/src/lpsolve.cc +++ b/src/lpsolve.cc @@ -31,7 +31,7 @@ #include "help.h" #include "oct-obj.h" -DEFUN_DLD_BUILTIN (lp_solve, , , +DEFUN_DLD (lp_solve, , , "lp_solve (): solve linear programs using lp_solve.") { octave_value_list retval; @@ -48,7 +48,7 @@ return retval; } -DEFUN_DLD_BUILTIN (lp_solve_options, , , +DEFUN_DLD (lp_solve_options, , , "lp_solve_options (KEYWORD, VALUE)\n\ \n\ Set or show options for lp_solve. Keywords may be abbreviated\n\
--- a/src/lsode.cc +++ b/src/lsode.cc @@ -94,7 +94,7 @@ return retval; } -DEFUN_DLD_BUILTIN (lsode, args, nargout, +DEFUN_DLD (lsode, args, nargout, "lsode (F, X0, T_OUT, T_CRIT)\n\ \n\ The first argument is the name of the function to call to\n\ @@ -299,7 +299,7 @@ return retval; } -DEFUN_DLD_BUILTIN (lsode_options, args, , +DEFUN_DLD (lsode_options, args, , "lsode_options (KEYWORD, VALUE)\n\ \n\ Set or show options for lsode. Keywords may be abbreviated\n\
--- a/src/lu.cc +++ b/src/lu.cc @@ -34,7 +34,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (lu, args, nargout, +DEFUN_DLD (lu, args, nargout, "[L, U, P] = lu (A): LU factorization") { octave_value_list retval;
--- a/src/minmax.cc +++ b/src/minmax.cc @@ -362,7 +362,7 @@ return result; } -DEFUN_DLD_BUILTIN (min, args, nargout, +DEFUN_DLD (min, args, nargout, "min (X): minimum value(s) of a vector (matrix)") { octave_value_list retval; @@ -575,7 +575,7 @@ return retval; } -DEFUN_DLD_BUILTIN (max, args, nargout, +DEFUN_DLD (max, args, nargout, "max (X): maximum value(s) of a vector (matrix)") { octave_value_list retval;
--- a/src/mk-oct-links.in +++ b/src/mk-oct-links.in @@ -15,7 +15,7 @@ for f in "$@"; do base=`basename $f | sed 's/\.cc$//'` fcns=`grep -h '^ *DEFUN_DLD' $f |\ - sed -e 's/DEFUN_DLD_BUILTIN *( *//' -e 's/ *,.*$//' |\ + sed -e 's/DEFUN_DLD *( *//' -e 's/ *,.*$//' |\ sort -u` if [ -n "$fcns" ]; then for n in $fcns; do
--- a/src/npsol.cc +++ b/src/npsol.cc @@ -231,12 +231,12 @@ #endif #if defined (NPSOL_MISSING) -DEFUN_DLD_BUILTIN (npsol, , , +DEFUN_DLD (npsol, , , "This function requires NPSOL, which is not freely\n\ redistributable. For more information, read the file\n\ libcruft/npsol/README.MISSING in the source distribution.") #else -DEFUN_DLD_BUILTIN (npsol, args, nargout, +DEFUN_DLD (npsol, args, nargout, "[X, OBJ, INFO, LAMBDA] = npsol (X, PHI [, LB, UB] [, A_LB, A, A_UB]\n\ [, G_LB, G, G_UB])\n\ \n\ @@ -770,12 +770,12 @@ #endif #if defined (NPSOL_MISSING) -DEFUN_DLD_BUILTIN (npsol_options, , , +DEFUN_DLD (npsol_options, , , "This function requires NPSOL, which is not freely\n\ redistributable. For more information, read the file\n\ libcruft/npsol/README.MISSING in the source distribution.") #else -DEFUN_DLD_BUILTIN (npsol_options, args, , +DEFUN_DLD (npsol_options, args, , "npsol_options (KEYWORD, VALUE)\n\ \n\ Set or show options for npsol. Keywords may be abbreviated\n\
--- a/src/pinv.cc +++ b/src/pinv.cc @@ -31,7 +31,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (pinv, args, , +DEFUN_DLD (pinv, args, , "pinv ( [, tol])\n\ Returns the pseudoinverse of X; singular values less than tol are ignored.") {
--- a/src/qpsol.cc +++ b/src/qpsol.cc @@ -81,12 +81,12 @@ #endif #if defined (QPSOL_MISSING) -DEFUN_DLD_BUILTIN (qpsol, , , +DEFUN_DLD (qpsol, , , "This function requires QPSOL, which is not freely\n\ redistributable. For more information, read the file\n\ libcruft/qpsol/README.MISSING in the source distribution.") #else -DEFUN_DLD_BUILTIN (qpsol, args, nargout, +DEFUN_DLD (qpsol, args, nargout, "[X, OBJ, INFO, LAMBDA] = qpsol (X, H, C [, LB, UB] [, A_LB, A, A_UB])\n\ \n\ Groups of arguments surrounded in `[]' are optional, but\n\ @@ -411,12 +411,12 @@ #endif #if defined (QPSOL_MISSING) -DEFUN_DLD_BUILTIN (qpsol_options, , , +DEFUN_DLD (qpsol_options, , , "This function requires QPSOL, which is not freely\n\ redistributable. For more information, read the file\n\ libcruft/qpsol/README.MISSING in the source distribution.") #else -DEFUN_DLD_BUILTIN (qpsol_options, args, , +DEFUN_DLD (qpsol_options, args, , "qpsol_options (KEYWORD, VALUE)\n \n\ Set or show options for qpsol. Keywords may be abbreviated\n\
--- a/src/qr.cc +++ b/src/qr.cc @@ -36,7 +36,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (qr, args, nargout, +DEFUN_DLD (qr, args, nargout, "[Q, R] = qr (X): form Q unitary and R upper triangular such\n\ that Q * R = X\n\ \n\
--- a/src/quad.cc +++ b/src/quad.cc @@ -85,7 +85,7 @@ return retval; } -DEFUN_DLD_BUILTIN (quad, args, nargout, +DEFUN_DLD (quad, args, nargout, "[V, IER, NFUN] = quad (F, A, B [, TOL] [, SING])\n\ \n\ Where the first argument is the name of the function to call to\n\ @@ -352,7 +352,7 @@ return retval; } -DEFUN_DLD_BUILTIN (quad_options, args, , +DEFUN_DLD (quad_options, args, , "quad_options (KEYWORD, VALUE)\n\ \n\ Set or show options for quad. Keywords may be abbreviated\n\
--- a/src/qzval.cc +++ b/src/qzval.cc @@ -34,7 +34,7 @@ #include "help.h" #include "oct-obj.h" -DEFUN_DLD_BUILTIN (qzval, args, , +DEFUN_DLD (qzval, args, , "X = qzval (A, B)\n\ \n\ compute generalized eigenvalues of the matrix pencil (A - lambda B).\n\
--- a/src/rand.cc +++ b/src/rand.cc @@ -325,7 +325,7 @@ return retval; } -DEFUN_DLD_BUILTIN (rand, args, nargout, +DEFUN_DLD (rand, args, nargout, "rand -- generate a random value from a uniform distribution\n\ \n\ rand (N) -- generate N x N matrix\n\ @@ -359,7 +359,7 @@ F77_FCN (setcgn, SETCGN) (current_distribution); } -DEFUN_DLD_BUILTIN (randn, args, nargout, +DEFUN_DLD (randn, args, nargout, "randn -- generate a random value from a normal distribution\n\ \n\ randn (N) -- generate N x N matrix\n\
--- a/src/schur.cc +++ b/src/schur.cc @@ -36,7 +36,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (schur, args, nargout, +DEFUN_DLD (schur, args, nargout, "[U, S] = schur (A) or S = schur (A)\n\ \n\ or, for ordered Schur:\n\
--- a/src/sort.cc +++ b/src/sort.cc @@ -308,7 +308,7 @@ return retval; } -DEFUN_DLD_BUILTIN (sort, args, nargout, +DEFUN_DLD (sort, args, nargout, "[S, I] = sort (X)\n\ \n\ sort the columns of X, optionally return sort index")
--- a/src/svd.cc +++ b/src/svd.cc @@ -36,7 +36,7 @@ #include "pr-output.h" #include "utils.h" -DEFUN_DLD_BUILTIN (svd, args, nargout, +DEFUN_DLD (svd, args, nargout, "S = svd (X) or [U, S, V] = svd (X [, 0])\n\ \n\ Compute the singular value decomposition of X. Given a second input\n\
--- a/src/syl.cc +++ b/src/syl.cc @@ -33,7 +33,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN (syl, args, nargout, +DEFUN_DLD (syl, args, nargout, "X = syl (A, B, C): solve the Sylvester equation A X + X B + C = 0") { octave_value_list retval;
--- a/src/time.cc +++ b/src/time.cc @@ -89,7 +89,7 @@ return &tm; } -DEFUN_DLD_BUILTIN (time, , , +DEFUN_DLD (time, , , "time ()\n\ \n\ Return current time. On Unix systems, this is the number of\n\ @@ -121,7 +121,7 @@ return (double) now + fraction; } -DEFUN_DLD_BUILTIN (gmtime, args, , +DEFUN_DLD (gmtime, args, , "gmtime (TIME)\n\ \n\ Given a value returned from time(), return a structure like that\n\ @@ -149,7 +149,7 @@ return retval; } -DEFUN_DLD_BUILTIN (localtime, args, , +DEFUN_DLD (localtime, args, , "localtime (TIME)\n\ \n\ Given a value returned from time(), return a structure with\n\ @@ -188,7 +188,7 @@ return retval; } -DEFUN_DLD_BUILTIN (mktime, args, , +DEFUN_DLD (mktime, args, , "mktime (TMSTRUCT)") { octave_value_list retval; @@ -210,7 +210,7 @@ return retval; } -DEFUN_DLD_BUILTIN (strftime, args, , +DEFUN_DLD (strftime, args, , "strftime (FMT, TMSTRUCT)\n\ \n\ Performs `%' substitutions similar to those in printf. Except where\n\