# HG changeset patch # User jwe # Date 824346529 0 # Node ID 0e6a0a271998fc50f33d73303def89f122288928 # Parent 3496ec9bee35e124aaff639e89630631869ebb2b [project @ 1996-02-15 01:08:15 by jwe] diff -r 3496ec9bee35 -r 0e6a0a271998 src/balance.cc --- a/src/balance.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/balance.cc Thu Feb 15 01:08:49 1996 +0000 @@ -43,7 +43,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("balance", Fbalance, Sbalance, FSbalance, 11, +DEFUN_DLD_BUILTIN (balance, args, nargout, "AA = balance (A [, OPT]) or [[DD,] AA] = balance (A [, OPT])\n\ \n\ generalized eigenvalue problem:\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/chol.cc --- a/src/chol.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/chol.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("chol", Fchol, Schol, FSchol, 11, +DEFUN_DLD_BUILTIN (chol, args, nargout, "R = chol (X): cholesky factorization") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/colloc.cc --- a/src/colloc.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/colloc.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("colloc", Fcolloc, Scolloc, FScolloc, 10, +DEFUN_DLD_BUILTIN (colloc, args, , "[R, A, B, Q] = colloc (N [, \"left\"] [, \"right\"]): collocation weights") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/dassl.cc --- a/src/dassl.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/dassl.cc Thu Feb 15 01:08:49 1996 +0000 @@ -105,7 +105,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("dassl", Fdassl, Sdassl, FSdassl, 10, +DEFUN_DLD_BUILTIN (dassl, args, , "dassl (\"function_name\", x_0, xdot_0, t_out)\n\ dassl (F, X_0, XDOT_0, T_OUT, T_CRIT)\n\ \n\ @@ -317,8 +317,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("dassl_options", Fdassl_options, Sdassl_options, - FSdassl_options, 10, +DEFUN_DLD_BUILTIN (dassl_options, args, , "dassl_options (KEYWORD, VALUE)\n\ \n\ Set or show options for dassl. Keywords may be abbreviated\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/data.cc --- a/src/data.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/data.cc Thu Feb 15 01:08:49 1996 +0000 @@ -55,7 +55,7 @@ #define ABS(x) (((x) < 0) ? (-x) : (x)) #endif -DEFUN ("all", Fall, Sall, 10, +DEFUN (all, args, , "all (X): are all elements of X nonzero?") { Octave_object retval; @@ -70,7 +70,7 @@ return retval; } -DEFUN ("any", Fany, Sany, 10, +DEFUN (any, args, , "any (X): are any elements of X nonzero?") { Octave_object retval; @@ -139,7 +139,7 @@ return retval; } -DEFUN ("atan2", Fatan2, Satan2, 10, +DEFUN (atan2, args, , "atan2 (Y, X): atan (Y / X) in range -pi to pi") { Octave_object retval; @@ -225,7 +225,7 @@ return retval; } -DEFUN ("cumprod", Fcumprod, Scumprod, 10, +DEFUN (cumprod, args, , "cumprod (X): cumulative products") { Octave_object retval; @@ -262,7 +262,7 @@ return retval; } -DEFUN ("cumsum", Fcumsum, Scumsum, 10, +DEFUN (cumsum, args, , "cumsum (X): cumulative sums") { Octave_object retval; @@ -544,7 +544,7 @@ return retval; } -DEFUN ("diag", Fdiag, Sdiag, 10, +DEFUN (diag, args, , "diag (X [,k]): form/extract diagonals") { Octave_object retval; @@ -561,7 +561,7 @@ return retval; } -DEFUN ("prod", Fprod, Sprod, 10, +DEFUN (prod, args, , "prod (X): products") { Octave_object retval; @@ -598,7 +598,7 @@ return retval; } -DEFUN ("size", Fsize, Ssize, 11, +DEFUN (size, args, nargout, "[m, n] = size (x): return rows and columns of X\n\ \n\ d = size (x): return number of rows and columns of x as a row vector\n\ @@ -650,7 +650,7 @@ return retval; } -DEFUN ("sum", Fsum, Ssum, 10, +DEFUN (sum, args, , "sum (X): sum of elements") { Octave_object retval; @@ -687,7 +687,7 @@ return retval; } -DEFUN ("sumsq", Fsumsq, Ssumsq, 10, +DEFUN (sumsq, args, , "sumsq (X): sum of squares of elements") { Octave_object retval; @@ -724,7 +724,7 @@ return retval; } -DEFUN ("is_struct", Fis_struct, Sis_struct, 10, +DEFUN (is_struct, args, , "is_struct (x): return nonzero if x is a structure") { Octave_object retval; @@ -746,7 +746,7 @@ return retval; } -DEFUN ("struct_elements", Fstruct_elements, Sstruct_elements, 10, +DEFUN (struct_elements, args, , "struct_elements (S)\n\ \n\ Return a list of the names of the elements of the structure S.") @@ -771,7 +771,7 @@ return retval; } -DEFUN ("struct_contains", Fstruct_contains, Sstruct_contains, 10, +DEFUN (struct_contains, args, , "struct_contains (S, NAME)\n\ \n\ return nonzero if S is a structure with element NAME") @@ -889,7 +889,7 @@ return m; } -DEFUN ("ones", Fones, Sones, 10, +DEFUN (ones, args, , "ones (N), ones (N, M), ones (X): create a matrix of all ones") { Octave_object retval; @@ -918,7 +918,7 @@ return retval; } -DEFUN ("zeros", Fzeros, Szeros, 10, +DEFUN (zeros, args, , "zeros (N), zeros (N, M), zeros (X): create a matrix of all zeros") { Octave_object retval; @@ -989,7 +989,7 @@ return m; } -DEFUN ("eye", Feye, Seye, 10, +DEFUN (eye, args, , "eye (N), eye (N, M), eye (X): create an identity matrix") { Octave_object retval; @@ -1018,7 +1018,7 @@ return retval; } -DEFUN ("linspace", Flinspace, Slinspace, 10, +DEFUN (linspace, args, , "usage: linspace (x1, x2, n)\n\ \n\ Return a vector of n equally spaced points between x1 and x2\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/defun-dld.h --- a/src/defun-dld.h Thu Feb 15 00:40:56 1996 +0000 +++ b/src/defun-dld.h Thu Feb 15 01:08:49 1996 +0000 @@ -38,12 +38,12 @@ #if defined (OCTAVE_LITE) && defined (WITH_DYNAMIC_LINKING) #if ! defined (MAKE_BUILTINS) -#define DEFUN_DLD_BUILTIN(name, fname, sname, fsname, unused_arg_flags, doc) \ - DEFUN_DLD(name, fname, sname, fsname, unused_arg_flags, doc) +#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, fname, fsname, sname, unused_arg_flags, doc) \ - DEFUN_INTERNAL (name, fname, sname, unused_arg_flags, 0, doc) +#define DEFUN_DLD_BUILTIN(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. @@ -55,11 +55,11 @@ // definition of the function. #if ! defined (MAKE_BUILTINS) -#define DEFUN_DLD(name, fname, sname, fsname, unused_arg_flags, doc) \ - DECLARE_FUN_ ## unused_arg_flags(fname); \ - DEFINE_FUN_STRUCT (name, fname, sname, 0, doc); \ - DEFINE_FUN_STRUCT_FUN (sname, fsname) \ - DECLARE_FUN_ ## unused_arg_flags (fname) +#define DEFUN_DLD(name, args_name, nargout_name, doc) \ + DECLARE_FUN (name, args_name, nargout_name); \ + DEFINE_FUN_STRUCT (name, 0, doc); \ + DEFINE_FUN_STRUCT_FUN (name) \ + DECLARE_FUN (name, args_name, nargout_name) #endif #endif diff -r 3496ec9bee35 -r 0e6a0a271998 src/defun-int.h --- a/src/defun-int.h Thu Feb 15 00:40:56 1996 +0000 +++ b/src/defun-int.h Thu Feb 15 01:08:49 1996 +0000 @@ -34,12 +34,11 @@ // mkdefs will create a .def file for every .cc file that uses DEFUN, // DEFUN_TEXT, or DEFUN_DLD. -#define DEFUN_INTERNAL(name, fname, sname, unused_arg_flags, \ - is_text_fcn, doc) \ +#define DEFUN_INTERNAL(name, args_name, nargout_name, is_text_fcn, doc) \ BEGIN_INSTALL_BUILTIN \ - extern DECLARE_FUN_ ## unused_arg_flags (fname); \ - DEFINE_FUN_STRUCT (name, fname, sname, is_text_fcn, doc); \ - install_builtin_function (sname); \ + extern DECLARE_FUN (name, args_name, nargout_name); \ + DEFINE_FUN_STRUCT (name, is_text_fcn, doc); \ + install_builtin_function (S ## name); \ END_INSTALL_BUILTIN // Generate code for making another name for an existing function. @@ -54,9 +53,8 @@ // Generate the first line of the function definition. This ensures // that the internal functions all have the same signature. -#define DEFUN_INTERNAL(name, fname, sname, unused_arg_flags, \ - is_text_fcn, doc) \ - DECLARE_FUN_ ## unused_arg_flags (fname) +#define DEFUN_INTERNAL(name, args_name, nargout_name, is_text_fcn, doc) \ + DECLARE_FUN (name, args_name, nargout_name) // No definition is required for an alias. @@ -67,34 +65,18 @@ // Define the structure that will be used to insert this function into // the symbol table. -#define DEFINE_FUN_STRUCT(name, fname, sname, is_text_fcn, doc) \ - static builtin_function sname (name, is_text_fcn, fname, doc) +#define DEFINE_FUN_STRUCT(name, is_text_fcn, doc) \ + static builtin_function S ## name (#name, is_text_fcn, F ## name, doc) -#define DEFINE_FUN_STRUCT_FUN(sname, fsname) \ +#define DEFINE_FUN_STRUCT_FUN(name) \ builtin_function& \ - fsname (void) \ + FS ## name (void) \ { \ - return sname; \ + return S ## name; \ } -// Declare an internal function named fname. This is the interface -// used by all internal functions in Octave that are also callable -// from the Octave language. The funny suffixes are used to help us -// avoid warnings from g++ about unused arguments. - -#define DECLARE_FUN_00(fname) \ - Octave_object fname (const Octave_object&, int) - -#define DECLARE_FUN_01(fname) \ - Octave_object fname (const Octave_object&, int nargout) - -#define DECLARE_FUN_10(fname) \ - Octave_object fname (const Octave_object& args, int) - -#define DECLARE_FUN_11(fname) \ - Octave_object fname (const Octave_object& args, int nargout) - -#define DECLARE_FUN_(fname) DECLARE_FUN_11 (fname) +#define DECLARE_FUN(name, args_name, nargout_name) \ + Octave_object F ## name (const Octave_object& args_name, int nargout_name) #endif diff -r 3496ec9bee35 -r 0e6a0a271998 src/defun.h --- a/src/defun.h Thu Feb 15 00:40:56 1996 +0000 +++ b/src/defun.h Thu Feb 15 01:08:49 1996 +0000 @@ -32,13 +32,7 @@ // Define a builtin variable. // -// name is the name of the variable, as a string. -// -// sname is the name of the structure that is used to hold -// information about the variable, and that is passed to -// install_builtin_variable to register it in the symbol table. -// By convention, it is constructed by prefixing name with the -// character SBV. +// name is the name of the variable, unquoted. // // defn is the initial value for the variable. // @@ -59,8 +53,29 @@ // // doc is the simple help text for this variable. -#define DEFVAR_INT(name, sname, defn, inst_as_fcn, protect, \ - sv_fcn, doc) \ +#define DEFVAR(name, defn, inst_as_fcn, sv_fcn, doc) \ + DEFVAR_INT (#name, SBV_ ## name, defn, inst_as_fcn, 0, sv_fcn, doc) + +// Define a builtin-constant, and a corresponding variable that can be +// redefined. This is just the same as DEFVAR, except that it defines +// `name' as a variable, and `__name__' as a constant that cannot be +// redefined. + +#define DEFCONST(name, defn, inst_as_fcn, sv_fcn, doc) \ + DEFVAR_INT (#name, SBV_ ## name, defn, inst_as_fcn, 0, sv_fcn, doc); \ + DEFVAR_INT ("__" ## #name ## "__", XSBV_ ## name, defn, 0, 1, sv_fcn, doc) + +// This one can be used when `name' cannot be used directly (if it is +// already defined as a macro). In that case, name is already a +// quoted string, and the name of the structure has to be passed too. + +#define DEFCONSTX(name, sname, defn, inst_as_fcn, sv_fcn, doc) \ + DEFVAR_INT (#name, sname, defn, inst_as_fcn, 0, sv_fcn, doc); \ + DEFVAR_INT ("__" ## name ## "__", X ## sname, defn, 0, 1, sv_fcn, doc) + +// How builtin variables are actually installed. + +#define DEFVAR_INT(name, sname, defn, inst_as_fcn, protect, sv_fcn, doc) \ do \ { \ builtin_variable sname (name, new tree_constant (defn), \ @@ -70,44 +85,20 @@ } \ while (0) -#define DEFVAR(name, sname, defn, inst_as_fcn, sv_fcn, doc) \ - DEFVAR_INT (name, sname, defn, inst_as_fcn, 0, sv_fcn, doc) - -// Define a builtin-constant, and a corresponding variable that can be -// redefined. This is just the same as DEFVAR, except that it defines -// `name' as a variable, and `__name__' as a constant that cannot be -// redefined. - -#define DEFCONST(name, sname, defn, inst_as_fcn, sv_fcn, doc) \ - DEFVAR_INT (name, sname, defn, inst_as_fcn, 0, sv_fcn, doc); \ - DEFVAR_INT ("__" ## name ## "__", sname, defn, 0, 1, sv_fcn, doc) - // Define a builtin function. // -// name is the name of the function, as a string. -// -// fname is the name of the C++ function. By convention, it is -// constructed by prefixing name with the character F. +// name is the name of the function, unqouted. // -// sname is the name of the structure that is used to hold -// information about the function, and that is passed to -// install_builtin_function to register the function in the symbol -// table. By convention, it is constructed by prefixing name with -// the character S. +// args_name is the name of the Octave_object variable used to pass +// the argument list to this function. // -// unused_arg_flags is used to decide how to declare the function so -// that g++ doesn't complain about unused arguments. It can be -// one of: -// -// 00: Both of the arguments args and nargout are unused. -// 10: The argument args is unused. -// 01: The argument nargout is unused. -// 11 or missing: Both of the arguments args and nargout are used. +// nargout_name is the name of the int variable used to pass the +// number of output arguments this function is expected to produce. // // doc is the simple help text for the function. -#define DEFUN(name, fname, sname, unused_arg_flags, doc) \ - DEFUN_INTERNAL (name, fname, sname, unused_arg_flags, 0, doc) +#define DEFUN(name, args_name, nargout_name, doc) \ + DEFUN_INTERNAL (name, args_name, nargout_name, 0, doc) // Define a builtin text-style function. // @@ -115,18 +106,12 @@ // called from the Octave language without using parenthesis to // surround the arguments). -#define DEFUN_TEXT(name, fname, sname, unused_arg_flags, doc) \ - DEFUN_INTERNAL (name, fname, sname, unused_arg_flags, 1, doc) +#define DEFUN_TEXT(name, args_name, nargout_name, doc) \ + DEFUN_INTERNAL (name, args_name, nargout_name, 1, doc) // Define a mapper function. // -// name is the name of the function as a string -// -// sname is the name of the structure that is used to hold -// information about the function, and that is passed to -// install_builtin_mapper to register the function in the symbol -// table. By convention, it is constructed by prefixing name with -// the character S. +// name is the name of the function, unquoqted. // // can_ret_cmplx_for_real is a flag that says whether this function // can create a complex number given a real-valued argument @@ -149,14 +134,14 @@ // // doc is the simple help text for the function. -#define DEFUN_MAPPER(name, sname, can_ret_cmplx_for_real, lo, hi, \ +#define DEFUN_MAPPER(name, can_ret_cmplx_for_real, lo, hi, \ d_d_map, d_c_map, c_c_map, doc) \ do \ { \ - builtin_mapper_function sname (name, can_ret_cmplx_for_real, \ + builtin_mapper_function S ## name (#name, can_ret_cmplx_for_real, \ lo, hi, d_d_map, d_c_map, \ c_c_map, doc); \ - install_builtin_mapper (sname); \ + install_builtin_mapper (S ## name); \ } \ while (0) diff -r 3496ec9bee35 -r 0e6a0a271998 src/det.cc --- a/src/det.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/det.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("det", Fdet, Sdet, FSdet, 10, +DEFUN_DLD_BUILTIN (det, args, , "det (X): determinant of a square matrix") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/dirfns.cc --- a/src/dirfns.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/dirfns.cc Thu Feb 15 01:08:49 1996 +0000 @@ -307,7 +307,7 @@ return cd_ok; } -DEFUN_TEXT ("cd", Fcd, Scd, 10, +DEFUN_TEXT (cd, args, , "cd [dir]\n\ \n\ change current working directory\n\ @@ -353,7 +353,7 @@ // Get a directory listing. -DEFUN_TEXT ("ls", Fls, Sls, 10, +DEFUN_TEXT (ls, args, , "ls [options]\n\ \n\ print a directory listing") @@ -402,7 +402,7 @@ DEFALIAS (dir, ls); -DEFUN ("pwd", Fpwd, Spwd, 01, +DEFUN (pwd, , nargout, "pwd (): print current working directory") { Octave_object retval; @@ -433,7 +433,7 @@ return retval; } -DEFUN ("readdir", Freaddir, Sreaddir, 10, +DEFUN (readdir, args, , "readdir (NAME)\n\ \n\ Return an array of strings containing the list of all files in the @@ -473,7 +473,7 @@ // XXX FIXME XXX -- should probably also allow second arg to specify // mode. -DEFUN ("mkdir", Fmkdir, Smkdir, 10, +DEFUN (mkdir, args, , "mkdir (NAME)\n\ \n\ Create the directory named by NAME. If successful, returns 0;\n\ @@ -509,7 +509,7 @@ return retval; } -DEFUN ("rmdir", Frmdir, Srmdir, 10, +DEFUN (rmdir, args, , "rmdir (NAME)\n\ \n\ Remove the directory named by NAME. If successful, returns 0;\n\ @@ -545,7 +545,7 @@ return retval; } -DEFUN ("rename", Frename, Srename, 10, +DEFUN (rename, args, , "rename (FROM, TO)\n\ \n\ Rename a file. If successful, returns 0;\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/eig.cc --- a/src/eig.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/eig.cc Thu Feb 15 01:08:49 1996 +0000 @@ -35,7 +35,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("eig", Feig, Seig, FSeig, 11, +DEFUN_DLD_BUILTIN (eig, args, nargout, "eig (X) or [V, D] = eig (X): compute eigenvalues and eigenvectors of X") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/error.cc --- a/src/error.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/error.cc Thu Feb 15 01:08:49 1996 +0000 @@ -243,7 +243,7 @@ return retval; } -DEFUN ("error", Ferror, Serror, 10, +DEFUN (error, args, , "error (FMT, ...): print message according to FMT and set error state.\n\ \n\ This should eventually take us up to the top level, possibly\n\ @@ -257,7 +257,7 @@ return handle_message (error, "unspecified error", args); } -DEFUN ("warning", Fwarning, Swarning, 10, +DEFUN (warning, args, , "warning (FMT, ...): print a warning message according to FMT.\n\ \n\ See also: error, printf") @@ -265,7 +265,7 @@ return handle_message (warning, "unspecified warning", args); } -DEFUN ("usage", Fusage, Susage, 10, +DEFUN (usage, args, , "usage (FMT, ...): print a usage message according to FMT.\n\ \n\ See also: error, printf") diff -r 3496ec9bee35 -r 0e6a0a271998 src/expm.cc --- a/src/expm.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/expm.cc Thu Feb 15 01:08:49 1996 +0000 @@ -34,7 +34,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("expm", Fexpm, Sexpm, FSexpm, 10, +DEFUN_DLD_BUILTIN (expm, args, , "expm (X): matrix exponential, e^A") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/fft.cc --- a/src/fft.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/fft.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ // This function should be merged with Fifft. -DEFUN_DLD_BUILTIN ("fft", Ffft, Sfft, FSfft, 10, +DEFUN_DLD_BUILTIN (fft, args, , "fft (X [, N]): fast fourier transform of a vector") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/fft2.cc --- a/src/fft2.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/fft2.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ // This function should be merged with Fifft2. -DEFUN_DLD_BUILTIN ("fft2", Ffft2, Sfft2, FSfft2, 10, +DEFUN_DLD_BUILTIN (fft2, args, , "fft2 (X [, N] [, M])\n\ \n\ two dimensional fast fourier transform of a vector") diff -r 3496ec9bee35 -r 0e6a0a271998 src/file-io.cc --- a/src/file-io.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/file-io.cc Thu Feb 15 01:08:49 1996 +0000 @@ -250,7 +250,7 @@ return retval; } -DEFUN ("fclose", Ffclose, Sfclose, 10, +DEFUN (fclose, args, , "fclose (FILENAME or FILENUM): close a file") { Octave_object retval; @@ -301,7 +301,7 @@ return retval; } -DEFUN ("fflush", Ffflush, Sfflush, 10, +DEFUN (fflush, args, , "fflush (FILENAME or FILENUM): flush buffered data to output file") { Octave_object retval; @@ -417,7 +417,7 @@ return retval; } -DEFUN ("fgetl", Ffgetl, Sfgetl, 11, +DEFUN (fgetl, args, nargout, "[STRING, LENGTH] = fgetl (FILENAME or FILENUM [, LENGTH])\n\ \n\ read a string from a file") @@ -434,7 +434,7 @@ return retval; } -DEFUN ("fgets", Ffgets, Sfgets, 11, +DEFUN (fgets, args, nargout, "[STRING, LENGTH] = fgets (FILENAME or FILENUM [, LENGTH])\n\ \n\ read a string from a file") @@ -515,7 +515,7 @@ return retval; } -DEFUN ("fopen", Ffopen, Sfopen, 10, +DEFUN (fopen, args, , "FILENUM = fopen (FILENAME, MODE): open a file\n\ \n\ Valid values for mode include:\n\ @@ -565,7 +565,7 @@ return retval; } -DEFUN ("freport", Ffreport, Sfreport, 10, +DEFUN (freport, args, , "freport (): list open files and their status") { Octave_object retval; @@ -596,7 +596,7 @@ return retval; } -DEFUN ("frewind", Ffrewind, Sfrewind, 10, +DEFUN (frewind, args, , "frewind (FILENAME or FILENUM): set file position at beginning of file") { Octave_object retval; @@ -692,7 +692,7 @@ return retval; } -DEFUN ("fseek", Ffseek, Sfseek, 10, +DEFUN (fseek, args, , "fseek (FILENAME or FILENUM, OFFSET [, ORIGIN])\n\ \n\ set file position for reading or writing") @@ -732,7 +732,7 @@ return retval; } -DEFUN ("ftell", Fftell, Sftell, 10, +DEFUN (ftell, args, , "POSITION = ftell (FILENAME or FILENUM): returns the current file position") { Octave_object retval; @@ -1088,7 +1088,7 @@ return retval; } -DEFUN ("fprintf", Ffprintf, Sfprintf, 10, +DEFUN (fprintf, args, , "fprintf (FILENAME or FILENUM, FORMAT, ...)") { Octave_object retval; @@ -1105,7 +1105,7 @@ // Formatted printing. -DEFUN ("printf", Fprintf, Sprintf, 10, +DEFUN (printf, args, , "printf (FORMAT, ...)") { Octave_object retval; @@ -1122,7 +1122,7 @@ // Formatted printing to a string. -DEFUN ("sprintf", Fsprintf, Ssprintf, 10, +DEFUN (sprintf, args, , "s = sprintf (FORMAT, ...)") { Octave_object retval; @@ -1463,7 +1463,7 @@ return retval; } -DEFUN ("fscanf", Ffscanf, Sfscanf, 11, +DEFUN (fscanf, args, nargout, "[A, B, C, ...] = fscanf (FILENAME or FILENUM, FORMAT)") { Octave_object retval; @@ -1480,7 +1480,7 @@ // Formatted reading. -DEFUN ("scanf", Fscanf, Sscanf, 11, +DEFUN (scanf, args, nargout, "[A, B, C, ...] = scanf (FORMAT)") { Octave_object retval; @@ -1497,7 +1497,7 @@ // Formatted reading from a string. -DEFUN ("sscanf", Fsscanf, Ssscanf, 11, +DEFUN (sscanf, args, nargout, "[A, B, C, ...] = sscanf (STRING, FORMAT)") { Octave_object retval; @@ -1723,7 +1723,7 @@ return retval; } -DEFUN ("fread", Ffread, Sfread, 11, +DEFUN (fread, args, nargout, "[DATA, COUNT] = fread (FILENUM, SIZE, PRECISION)\n\ \n\ Reads data in binary form of type PRECISION from a file.\n\ @@ -1807,7 +1807,7 @@ return retval; } -DEFUN ("fwrite", Ffwrite, Sfwrite, 10, +DEFUN (fwrite, args, , "COUNT = fwrite (FILENUM, DATA, PRECISION)\n\ \n\ Writes data to a file in binary form of size PRECISION\n\ @@ -1857,7 +1857,7 @@ return retval; } -DEFUN ("feof", Ffeof, Sfeof, 10, +DEFUN (feof, args, , "ERROR = feof (FILENAME or FILENUM)\n\ \n\ Returns a non zero value for an end of file condition for the\n\ @@ -1905,7 +1905,7 @@ return retval; } -DEFUN ("ferror", Fferror, Sferror, 11, +DEFUN (ferror, args, nargout, "ERROR = ferror (FILENAME or FILENUM)\n\ \n\ Returns a non zero value for an error condition on the\n\ @@ -1986,7 +1986,7 @@ return retval; } -DEFUN ("popen", Fpopen, Spopen, 10, +DEFUN (popen, args, , "FILENUM = popen (FILENAME, MODE)\n\ \n\ start a process and create a pipe. Valid values for mode are:\n\ @@ -2039,7 +2039,7 @@ return retval; } -DEFUN ("pclose", Fpclose, Spclose, 10, +DEFUN (pclose, args, , "pclose (FILENAME or FILENUM)\n\ \n\ Close a pipe and terminate the associated process") @@ -2139,7 +2139,7 @@ return retval; } -DEFUN ("execute", Fexecute, Sexecute, 10, +DEFUN (execute, args, , "[STDIN, STDOUT, PID] = execute (COMMAND)\n\ \n\ Start a program and redirect its stdin to STDIN and its stdout to STDOUT") @@ -2173,7 +2173,7 @@ return retval; } -DEFUN ("sync_system", Fsync_system, Ssync_system, 10, +DEFUN (sync_system, args, , "RETCODE = sync_system (FILENAME)\n\ \n\ Start a program and wait until it terminates") @@ -2226,7 +2226,7 @@ } } -DEFUN ("async_system", Fasync_system, Sasync_system, 10, +DEFUN (async_system, args, , "PID = async_system (FILENAME)\n\ \n\ Create a new process and start FILENAME") @@ -2285,7 +2285,7 @@ return retval; } -DEFUN ("waitpid", Fwaitpid, Swaitpid, 10, +DEFUN (waitpid, args, , "STATUS = waitpid (PID, OPTIONS)\n\ \n\ wait for process PID to terminate\n\ @@ -2350,7 +2350,7 @@ return retval; } -DEFUN ("mkfifo", Fmkfifo, Smkfifo, 10, +DEFUN (mkfifo, args, , "STATUS = mkfifo (NAME, MODE)\n\ \n\ Create a FIFO special file named NAME with file mode MODE\n\ @@ -2391,7 +2391,7 @@ return retval; } -DEFUN ("unlink", Funlink, Sunlink, 10, +DEFUN (unlink, args, , "STATUS = unlink (NAME)\n\ \n\ Delete the file NAME\n\ @@ -2441,7 +2441,7 @@ return m; } -DEFUN ("stat", Fstat, Sstat, 10, +DEFUN (stat, args, , "stat (NAME)\n\ \n\ Given the name of a file, return a structure with the following @@ -2485,7 +2485,7 @@ return retval; } -DEFUN ("lstat", Flstat, Slstat, 10, +DEFUN (lstat, args, , "lstat (NAME)\n\ \n\ Like stat (NAME), but if NAME refers to a symbolic link, returns\n\ @@ -2513,8 +2513,7 @@ return retval; } -DEFUN ("octave_tmp_file_name", Foctave_tmp_file_name, - Soctave_tmp_file_name, 10, +DEFUN (octave_tmp_file_name, args, , "octave_tmp_file_name ()") { tree_constant retval; @@ -2556,7 +2555,7 @@ return retval; } -DEFUN ("umask", Fumask, Sumask, 10, +DEFUN (umask, args, , "umask (MASK)\n\ \n\ Change the file permission mask for file creation for the current diff -r 3496ec9bee35 -r 0e6a0a271998 src/filter.cc --- a/src/filter.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/filter.cc Thu Feb 15 01:08:49 1996 +0000 @@ -147,7 +147,7 @@ return filter (b, a, x, si); } -DEFUN_DLD_BUILTIN ("filter", Ffilter, Sfilter, FSfilter, 10, +DEFUN_DLD_BUILTIN (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\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/find.cc --- a/src/find.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/find.cc Thu Feb 15 01:08:49 1996 +0000 @@ -158,7 +158,7 @@ return find_to_fortran_idx (i_idx, j_idx, tmp, m_nr, nargout); } -DEFUN_DLD_BUILTIN ("find", Ffind, Sfind, FSfind, 11, +DEFUN_DLD_BUILTIN (find, args, nargout, "find (X) or [I, J, V] = find (X): Return indices of nonzero elements") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/fsolve.cc --- a/src/fsolve.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/fsolve.cc Thu Feb 15 01:08:49 1996 +0000 @@ -121,7 +121,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("fsolve", Ffsolve, Sfsolve, FSfsolve, 11, +DEFUN_DLD_BUILTIN (fsolve, args, nargout, "Solve nonlinear equations using Minpack. Usage:\n\ \n\ [X, INFO] = fsolve (F, X0)\n\ @@ -283,8 +283,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("fsolve_options", Ffsolve_options, Sfsolve_options, - FSfsolve_options, 10, +DEFUN_DLD_BUILTIN (fsolve_options, args, nargout, "fsolve_options (KEYWORD, VALUE)\n\ \n\ Set or show options for fsolve. Keywords may be abbreviated\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/fsqp.cc --- a/src/fsqp.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/fsqp.cc Thu Feb 15 01:08:49 1996 +0000 @@ -54,12 +54,12 @@ #endif #if defined (FSQP_MISSING) -DEFUN_DLD_BUILTIN ("fsqp", Ffsqp, Sfsqp, FSfsqp, 00, +DEFUN_DLD_BUILTIN (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", Ffsqp, Sfsqp, FSfsqp, 00, +DEFUN_DLD_BUILTIN (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\ @@ -89,14 +89,12 @@ } #if defined (FSQP_MISSING) -DEFUN_DLD_BUILTIN ("fsqp_options", Ffsqp_options, Sfsqp_options, - FSfsqp_options, 00, +DEFUN_DLD_BUILTIN (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", Ffsqp_options, Sfsqp_options, - FSfsqp_options, 00, +DEFUN_DLD_BUILTIN (fsqp_options, , , "fsqp_options (KEYWORD, VALUE)\n\ \n\ Set or show options for fsqp. Keywords may be abbreviated\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/givens.cc --- a/src/givens.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/givens.cc Thu Feb 15 01:08:49 1996 +0000 @@ -32,7 +32,7 @@ #include "help.h" #include "oct-obj.h" -DEFUN_DLD_BUILTIN ("givens", Fgivens, Sgivens, FSgivens, 11, +DEFUN_DLD_BUILTIN (givens, args, nargout, "G = givens (X, Y)\n\ \n\ compute orthogonal matrix G = [c s; -conj (s) c]\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/help.cc --- a/src/help.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/help.cc Thu Feb 15 01:08:49 1996 +0000 @@ -667,12 +667,12 @@ } #ifdef USE_GNU_INFO -DEFUN_TEXT ("help", Fhelp, Shelp, 10, +DEFUN_TEXT (help, args, , "help [-i] [topic ...]\n\ \n\ print cryptic yet witty messages") #else -DEFUN_TEXT ("help", Fhelp, Shelp, 10, +DEFUN_TEXT (help, args, , "help [topic ...]\n\ \n\ print cryptic yet witty messages") @@ -706,7 +706,7 @@ return retval; } -DEFUN_TEXT ("type", Ftype, Stype, 11, +DEFUN_TEXT (type, args, nargout, "type NAME ...]\n\ \n\ display the definition of each NAME that refers to a function") @@ -852,7 +852,7 @@ return retval; } -DEFUN_TEXT ("which", Fwhich, Swhich, 11, +DEFUN_TEXT (which, args, nargout, "which NAME ...\n\ \n\ display the type of each NAME. If NAME is defined from an function\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/hess.cc --- a/src/hess.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/hess.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("hess", Fhess, Shess, FShess, 11, +DEFUN_DLD_BUILTIN (hess, args, nargout, "[P, H] = hess (A) or H = hess (A): Hessenberg decomposition") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/ifft.cc --- a/src/ifft.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/ifft.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ // This function should be merged with Ffft. -DEFUN_DLD_BUILTIN ("ifft", Fifft, Sifft, FSifft, 10, +DEFUN_DLD_BUILTIN (ifft, args, , "ifft (X [, N]): inverse fast fourier transform of a vector") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/ifft2.cc --- a/src/ifft2.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/ifft2.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ // This function should be merged with Ffft2. -DEFUN_DLD_BUILTIN ("ifft2", Fifft2, Sifft2, FSifft2, 10, +DEFUN_DLD_BUILTIN (ifft2, args, , "ifft2 (X [, N] [, M])\n\ \n\ two dimensional inverse fast fourier transform of a vector") diff -r 3496ec9bee35 -r 0e6a0a271998 src/input.cc --- a/src/input.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/input.cc Thu Feb 15 01:08:49 1996 +0000 @@ -1087,7 +1087,7 @@ return retval; } -DEFUN ("input", Finput, Sinput, 10, +DEFUN (input, args, , "input (PROMPT [, S])\n\ \n\ Prompt user for input. If the second argument is present, return @@ -1105,7 +1105,7 @@ return retval; } -DEFUN ("keyboard", Fkeyboard, Skeyboard, 10, +DEFUN (keyboard, args, , "keyboard (PROMPT)\n\ \n\ maybe help in debugging function files") @@ -1122,7 +1122,7 @@ return retval; } -DEFUN_TEXT("echo", Fecho, Secho, 10, +DEFUN_TEXT(echo, args, , "echo [options]\n\ \n\ echo [on|off] -- enable or disable echoing of commands as\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/inv.cc --- a/src/inv.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/inv.cc Thu Feb 15 01:08:49 1996 +0000 @@ -33,7 +33,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("inv", Finv, Sinv, FSinv, 10, +DEFUN_DLD_BUILTIN (inv, args, , "inv (X): inverse of a square matrix") { Octave_object retval; @@ -108,7 +108,7 @@ // alias_builtin() won't do the right thing if we are actually using // dynamic linking. -DEFUN_DLD_BUILTIN ("inverse", Finverse, Sinverse, FSinverse, 11, +DEFUN_DLD_BUILTIN (inverse, args, nargout, "inverse (X): inverse of a square matrix") { return Finv (args, nargout); diff -r 3496ec9bee35 -r 0e6a0a271998 src/load-save.cc --- a/src/load-save.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/load-save.cc Thu Feb 15 01:08:49 1996 +0000 @@ -2186,7 +2186,7 @@ return retval; } -DEFUN_TEXT ("load", Fload, Sload, 11, +DEFUN_TEXT (load, args, nargout, "load [-force] [-ascii] [-binary] [-mat-binary] file [pattern ...]\n\ \n\ Load variables from a file.\n\ @@ -2999,7 +2999,7 @@ warning ("unable to open `%s' for writing...", fname); } -DEFUN_TEXT ("save", Fsave, Ssave, 10, +DEFUN_TEXT (save, args, , "save [-ascii] [-binary] [-float-binary] [-mat-binary] \n\ [-save-builtins] file [pattern ...]\n\ \n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/log.cc --- a/src/log.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/log.cc Thu Feb 15 01:08:49 1996 +0000 @@ -38,7 +38,7 @@ // XXX FIXME XXX -- the next two functions should really be just // one... -DEFUN_DLD_BUILTIN ("logm", Flogm, Slogm, FSlogm, 10, +DEFUN_DLD_BUILTIN (logm, args, , "logm (X): matrix logarithm") { Octave_object retval; @@ -150,7 +150,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("sqrtm", Fsqrtm, Ssqrtm, FSsqrtm, 10, +DEFUN_DLD_BUILTIN (sqrtm, args, , "sqrtm (X): matrix sqrt") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/lpsolve.cc --- a/src/lpsolve.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/lpsolve.cc Thu Feb 15 01:08:49 1996 +0000 @@ -32,7 +32,7 @@ #include "help.h" #include "oct-obj.h" -DEFUN_DLD_BUILTIN ("lp_solve", Flp_solve, Slp_solve, FSlp_solve, 00, +DEFUN_DLD_BUILTIN (lp_solve, , , "lp_solve (): solve linear programs using lp_solve.") { Octave_object retval; @@ -49,8 +49,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("lp_solve_options", Flp_solve_options, - Slp_solve_options, FSlp_solve_options, 00, +DEFUN_DLD_BUILTIN (lp_solve_options, , , "lp_solve_options (KEYWORD, VALUE)\n\ \n\ Set or show options for lp_solve. Keywords may be abbreviated\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/lsode.cc --- a/src/lsode.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/lsode.cc Thu Feb 15 01:08:49 1996 +0000 @@ -94,7 +94,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("lsode", Flsode, Slsode, FSlsode, 11, +DEFUN_DLD_BUILTIN (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\ @@ -298,8 +298,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("lsode_options", Flsode_options, Slsode_options, - FSlsode_options, 10, +DEFUN_DLD_BUILTIN (lsode_options, args, , "lsode_options (KEYWORD, VALUE)\n\ \n\ Set or show options for lsode. Keywords may be abbreviated\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/lu.cc --- a/src/lu.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/lu.cc Thu Feb 15 01:08:49 1996 +0000 @@ -36,7 +36,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("lu", Flu, Slu, FSlu, 11, +DEFUN_DLD_BUILTIN (lu, args, nargout, "[L, U, P] = lu (A): LU factorization") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/mappers.cc --- a/src/mappers.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/mappers.cc Thu Feb 15 01:08:49 1996 +0000 @@ -336,106 +336,106 @@ void install_mapper_functions (void) { - DEFUN_MAPPER ("abs", Sabs, 0, 0.0, 0.0, fabs, abs, 0, + DEFUN_MAPPER (abs, 0, 0.0, 0.0, fabs, abs, 0, "abs (X): compute abs (X) for each element of X"); - DEFUN_MAPPER ("acos", Sacos, 1, -1.0, 1.0, acos, 0, acos, + DEFUN_MAPPER (acos, 1, -1.0, 1.0, acos, 0, acos, "acos (X): compute acos (X) for each element of X"); - DEFUN_MAPPER ("acosh", Sacosh, 1, 1.0, DBL_MAX, acosh, 0, acosh, + DEFUN_MAPPER (acosh, 1, 1.0, DBL_MAX, acosh, 0, acosh, "acosh (X): compute acosh (X) for each element of X"); - DEFUN_MAPPER ("angle", Sangle, 0, 0.0, 0.0, arg, arg, 0, + DEFUN_MAPPER (angle, 0, 0.0, 0.0, arg, arg, 0, "angle (X): compute arg (X) for each element of X"); - DEFUN_MAPPER ("arg", Sarg, 0, 0.0, 0.0, arg, arg, 0, + DEFUN_MAPPER (arg, 0, 0.0, 0.0, arg, arg, 0, "arg (X): compute arg (X) for each element of X"); - DEFUN_MAPPER ("asin", Sasin, 1, -1.0, 1.0, asin, 0, asin, + DEFUN_MAPPER (asin, 1, -1.0, 1.0, asin, 0, asin, "asin (X): compute asin (X) for each element of X"); - DEFUN_MAPPER ("asinh", Sasinh, 0, 0.0, 0.0, asinh, 0, asinh, + DEFUN_MAPPER (asinh, 0, 0.0, 0.0, asinh, 0, asinh, "asinh (X): compute asinh (X) for each element of X"); - DEFUN_MAPPER ("atan", Satan, 0, 0.0, 0.0, atan, 0, atan, + DEFUN_MAPPER (atan, 0, 0.0, 0.0, atan, 0, atan, "atan (X): compute atan (X) for each element of X"); - DEFUN_MAPPER ("atanh", Satanh, 1, -1.0, 1.0, atanh, 0, atanh, + DEFUN_MAPPER (atanh, 1, -1.0, 1.0, atanh, 0, atanh, "atanh (X): compute atanh (X) for each element of X"); - DEFUN_MAPPER ("ceil", Sceil, 0, 0.0, 0.0, ceil, 0, ceil, + DEFUN_MAPPER (ceil, 0, 0.0, 0.0, ceil, 0, ceil, "ceil (X): round elements of X toward +Inf"); - DEFUN_MAPPER ("conj", Sconj, 0, 0.0, 0.0, conj, 0, conj, + DEFUN_MAPPER (conj, 0, 0.0, 0.0, conj, 0, conj, "conj (X): compute complex conjugate for each element of X"); - DEFUN_MAPPER ("cos", Scos, 0, 0.0, 0.0, cos, 0, cos, + DEFUN_MAPPER (cos, 0, 0.0, 0.0, cos, 0, cos, "cos (X): compute cos (X) for each element of X"); - DEFUN_MAPPER ("cosh", Scosh, 0, 0.0, 0.0, cosh, 0, cosh, + DEFUN_MAPPER (cosh, 0, 0.0, 0.0, cosh, 0, cosh, "cosh (X): compute cosh (X) for each element of X"); - DEFUN_MAPPER ("erf", Serf, 0, 0.0, 0.0, xerf, 0, 0, + DEFUN_MAPPER (erf, 0, 0.0, 0.0, xerf, 0, 0, "erf (X): compute erf (X) for each element of X"); - DEFUN_MAPPER ("erfc", Serfc, 0, 0.0, 0.0, xerfc, 0, 0, + DEFUN_MAPPER (erfc, 0, 0.0, 0.0, xerfc, 0, 0, "erfc (X): compute erfc (X) for each element of X"); - DEFUN_MAPPER ("exp", Sexp, 0, 0.0, 0.0, exp, 0, exp, + DEFUN_MAPPER (exp, 0, 0.0, 0.0, exp, 0, exp, "exp (X): compute exp (X) for each element of X"); - DEFUN_MAPPER ("finite", Sfinite, 0, 0.0, 0.0, xfinite, xfinite, 0, + DEFUN_MAPPER (finite, 0, 0.0, 0.0, xfinite, xfinite, 0, "finite (X): return 1 for finite elements of X"); - DEFUN_MAPPER ("fix", Sfix, 0, 0.0, 0.0, fix, 0, fix, + DEFUN_MAPPER (fix, 0, 0.0, 0.0, fix, 0, fix, "fix (X): round elements of X toward zero"); - DEFUN_MAPPER ("floor", Sfloor, 0, 0.0, 0.0, floor, 0, floor, + DEFUN_MAPPER (floor, 0, 0.0, 0.0, floor, 0, floor, "floor (X): round elements of X toward -Inf"); - DEFUN_MAPPER ("gamma", Sgamma, 0, 0.0, 0.0, xgamma, 0, 0, + DEFUN_MAPPER (gamma, 0, 0.0, 0.0, xgamma, 0, 0, "gamma (X): compute gamma (X) for each element of X"); - DEFUN_MAPPER ("isinf", Sisinf, 0, 0.0, 0.0, xisinf, xisinf, 0, + DEFUN_MAPPER (isinf, 0, 0.0, 0.0, xisinf, xisinf, 0, "isinf (X): return 1 for elements of X infinite"); - DEFUN_MAPPER ("imag", Simag, 0, 0.0, 0.0, imag, imag, 0, + DEFUN_MAPPER (imag, 0, 0.0, 0.0, imag, imag, 0, "imag (X): return imaginary part for each elements of X"); - DEFUN_MAPPER ("isnan", Sisnan, 0, 0.0, 0.0, xisnan, xisnan, 0, + DEFUN_MAPPER (isnan, 0, 0.0, 0.0, xisnan, xisnan, 0, "isnan (X): return 1 where elements of X are NaNs"); - DEFUN_MAPPER ("lgamma", Slgamma, 0, 0.0, 0.0, xlgamma, 0, 0, + DEFUN_MAPPER (lgamma, 0, 0.0, 0.0, xlgamma, 0, 0, "lgamma (X): compute log gamma (X) for each element of X"); - DEFUN_MAPPER ("log", Slog, 1, 0.0, DBL_MAX, log, 0, log, + DEFUN_MAPPER (log, 1, 0.0, DBL_MAX, log, 0, log, "log (X): compute log (X) for each element of X"); - DEFUN_MAPPER ("log10", Slog10, 1, 0.0, DBL_MAX, log10, 0, log10, + DEFUN_MAPPER (log10, 1, 0.0, DBL_MAX, log10, 0, log10, "log10 (X): compute log10 (X) for each element of X"); - DEFUN_MAPPER ("real", Sreal, 0, 0.0, 0.0, real, real, 0, + DEFUN_MAPPER (real, 0, 0.0, 0.0, real, real, 0, "real (X): return real part for each element of X"); - DEFUN_MAPPER ("round", Sround, 0, 0.0, 0.0, round, 0, round, + DEFUN_MAPPER (round, 0, 0.0, 0.0, round, 0, round, "round (X): round elements of X to nearest integer"); - DEFUN_MAPPER ("sign", Ssign, 0, 0.0, 0.0, signum, 0, signum, + DEFUN_MAPPER (sign, 0, 0.0, 0.0, signum, 0, signum, "sign (X): apply signum function to elements of X"); - DEFUN_MAPPER ("sin", Ssin, 0, 0.0, 0.0, sin, 0, sin, + DEFUN_MAPPER (sin, 0, 0.0, 0.0, sin, 0, sin, "sin (X): compute sin (X) for each element of X"); - DEFUN_MAPPER ("sinh", Ssinh, 0, 0.0, 0.0, sinh, 0, sinh, + DEFUN_MAPPER (sinh, 0, 0.0, 0.0, sinh, 0, sinh, "sinh (X): compute sinh (X) for each element of X"); - DEFUN_MAPPER ("sqrt", Ssqrt, 1, 0.0, DBL_MAX, sqrt, 0, sqrt, + DEFUN_MAPPER (sqrt, 1, 0.0, DBL_MAX, sqrt, 0, sqrt, "sqrt (X): compute sqrt (X) for each element of X"); - DEFUN_MAPPER ("tan", Stan, 0, 0.0, 0.0, tan, 0, tan, + DEFUN_MAPPER (tan, 0, 0.0, 0.0, tan, 0, tan, "tan (X): compute tan (X) for each element of X"); - DEFUN_MAPPER ("tanh", Stanh, 0, 0.0, 0.0, tanh, 0, tanh, + DEFUN_MAPPER (tanh, 0, 0.0, 0.0, tanh, 0, tanh, "tanh (X): compute tanh (X) for each element of X"); DEFALIAS (gammaln, lgamma); diff -r 3496ec9bee35 -r 0e6a0a271998 src/minmax.cc --- a/src/minmax.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/minmax.cc Thu Feb 15 01:08:49 1996 +0000 @@ -362,7 +362,7 @@ return result; } -DEFUN_DLD_BUILTIN ("min", Fmin, Smin, FSmin, 11, +DEFUN_DLD_BUILTIN (min, args, nargout, "min (X): minimum value(s) of a vector (matrix)") { Octave_object retval; @@ -590,7 +590,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("max", Fmax, Smax, FSmax, 11, +DEFUN_DLD_BUILTIN (max, args, nargout, "max (X): maximum value(s) of a vector (matrix)") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/npsol.cc --- a/src/npsol.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/npsol.cc Thu Feb 15 01:08:49 1996 +0000 @@ -231,12 +231,12 @@ #endif #if defined (NPSOL_MISSING) -DEFUN_DLD_BUILTIN ("npsol", Fnpsol, Snpsol, FSnpsol, 00, +DEFUN_DLD_BUILTIN (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", Fnpsol, Snpsol, FSnpsol, 11, +DEFUN_DLD_BUILTIN (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\ @@ -773,14 +773,12 @@ #endif #if defined (NPSOL_MISSING) -DEFUN_DLD_BUILTIN ("npsol_options", Fnpsol_options, Snpsol_options, - FSnpsol_options, 00, +DEFUN_DLD_BUILTIN (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", Fnpsol_options, Snpsol_options, - FSnpsol_options, 10, +DEFUN_DLD_BUILTIN (npsol_options, args, , "npsol_options (KEYWORD, VALUE)\n\ \n\ Set or show options for npsol. Keywords may be abbreviated\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/oct-hist.cc --- a/src/oct-hist.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/oct-hist.cc Thu Feb 15 01:08:49 1996 +0000 @@ -514,7 +514,7 @@ unlink (name.c_str ()); } -DEFUN_TEXT ("edit_history", Fedit_history, Sedit_history, 10, +DEFUN_TEXT (edit_history, args, , "edit_history [first] [last]\n\ \n\ edit commands from the history list") @@ -533,7 +533,7 @@ return retval; } -DEFUN_TEXT ("history", Fhistory, Shistory, 10, +DEFUN_TEXT (history, args, , "history [N] [-w file] [-r file] [-q]\n\ \n\ display, save, or load command history") @@ -552,7 +552,7 @@ return retval; } -DEFUN_TEXT ("run_history", Frun_history, Srun_history, 10, +DEFUN_TEXT (run_history, args, , "run_history [first] [last]\n\ \n\ run commands from the history list") diff -r 3496ec9bee35 -r 0e6a0a271998 src/pager.cc --- a/src/pager.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/pager.cc Thu Feb 15 01:08:49 1996 +0000 @@ -193,7 +193,7 @@ diary_stream << s; } -DEFUN_TEXT ("diary", Fdiary, Sdiary, 10, +DEFUN_TEXT (diary, args, , "diary [on|off]\n\ diary [file]\n\ \n\ @@ -245,7 +245,7 @@ return retval; } -DEFUN_TEXT ("more", Fmore, Smore, 10, +DEFUN_TEXT (more, args, , "more on\n\ more off\n\ \n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/pinv.cc --- a/src/pinv.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/pinv.cc Thu Feb 15 01:08:49 1996 +0000 @@ -33,7 +33,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("pinv", Fpinv, Spinv, FSpinv, 10, +DEFUN_DLD_BUILTIN (pinv, args, , "pinv ( [, tol])\n\ Returns the pseudoinverse of X; singular values less than tol are ignored.") { diff -r 3496ec9bee35 -r 0e6a0a271998 src/pr-output.cc --- a/src/pr-output.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/pr-output.cc Thu Feb 15 01:08:49 1996 +0000 @@ -1542,7 +1542,7 @@ } } -DEFUN ("disp", Fdisp, Sdisp, 10, +DEFUN (disp, args, , "disp (X): display value without name tag") { Octave_object retval; @@ -1705,7 +1705,7 @@ } } -DEFUN_TEXT ("format", Fformat, Sformat, 10, +DEFUN_TEXT (format, args, , "format [style]\n\ \n\ set output formatting style") diff -r 3496ec9bee35 -r 0e6a0a271998 src/pt-fcn.cc --- a/src/pt-fcn.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/pt-fcn.cc Thu Feb 15 01:08:49 1996 +0000 @@ -487,7 +487,7 @@ print_code_new_line (os); } -DEFUN ("va_arg", Fva_arg, Sva_arg, 10, +DEFUN (va_arg, args, , "va_arg (): return next argument in a function that takes a\n\ variable number of parameters") { @@ -516,7 +516,7 @@ return retval; } -DEFUN ("va_start", Fva_start, Sva_start, 10, +DEFUN (va_start, args, , "va_start (): reset the pointer to the list of optional arguments\n\ to the beginning") { @@ -545,7 +545,7 @@ return retval; } -DEFUN ("vr_val", Fvr_val, Svr_val, 10, +DEFUN (vr_val, args, , "vr_val (X): append X to the list of optional return values for a function that allows a variable number of return values") { diff -r 3496ec9bee35 -r 0e6a0a271998 src/pt-plot.cc --- a/src/pt-plot.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/pt-plot.cc Thu Feb 15 01:08:49 1996 +0000 @@ -989,7 +989,7 @@ } } -DEFUN ("clearplot", Fclearplot, Sclearplot, 00, +DEFUN (clearplot, , , "clearplot (): clear the plot window") { Octave_object retval; @@ -1015,7 +1015,7 @@ DEFALIAS (clg, clearplot); -DEFUN ("closeplot", Fcloseplot, Scloseplot, 00, +DEFUN (closeplot, , , "closeplot (): close the stream to plotter") { Octave_object retval; @@ -1023,7 +1023,7 @@ return retval; } -DEFUN_TEXT ("hold", Fhold, Shold, 10, +DEFUN_TEXT (hold, args, , "hold [on|off]\n\ \n\ determine whether the plot window is cleared before the next line is\n\ @@ -1061,7 +1061,7 @@ return retval; } -DEFUN ("ishold", Fishold, Sishold, 00, +DEFUN (ishold, , , "ishold\n\ \n\ Return 1 if hold is on, otherwise return 0.") @@ -1069,7 +1069,7 @@ return (double) (! clear_before_plotting); } -DEFUN ("purge_tmp_files", Fpurge_tmp_files, Spurge_tmp_files, 00, +DEFUN (purge_tmp_files, , , "delete temporary data files used for plotting") { Octave_object retval; @@ -1077,7 +1077,7 @@ return retval; } -DEFUN_TEXT ("set", Fset, Sset, 10, +DEFUN_TEXT (set, args, , "set [options]\n\ \n\ set plotting options") @@ -1123,7 +1123,7 @@ return retval; } -DEFUN_TEXT ("show", Fshow, Sshow, 10, +DEFUN_TEXT (show, args, , "show [options]\n\ \n\ show plotting options") diff -r 3496ec9bee35 -r 0e6a0a271998 src/qpsol.cc --- a/src/qpsol.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/qpsol.cc Thu Feb 15 01:08:49 1996 +0000 @@ -81,12 +81,12 @@ #endif #if defined (QPSOL_MISSING) -DEFUN_DLD_BUILTIN ("qpsol", Fqpsol, Sqpsol, FSqpsol, 00, +DEFUN_DLD_BUILTIN (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", Fqpsol, Sqpsol, FSqpsol, 11, +DEFUN_DLD_BUILTIN (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\ @@ -414,14 +414,12 @@ #endif #if defined (QPSOL_MISSING) -DEFUN_DLD_BUILTIN ("qpsol_options", Fqpsol_options, Sqpsol_options, - FSqpsol_options, 00, +DEFUN_DLD_BUILTIN (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", Fqpsol_options, Sqpsol_options, - FSqpsol_options, 10, +DEFUN_DLD_BUILTIN (qpsol_options, args, , "qpsol_options (KEYWORD, VALUE)\n \n\ Set or show options for qpsol. Keywords may be abbreviated\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/qr.cc --- a/src/qr.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/qr.cc Thu Feb 15 01:08:49 1996 +0000 @@ -38,7 +38,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("qr", Fqr, Sqr, FSqr, 11, +DEFUN_DLD_BUILTIN (qr, args, nargout, "[Q, R] = qr (X): form Q unitary and R upper triangular such\n\ that Q * R = X\n\ \n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/quad.cc --- a/src/quad.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/quad.cc Thu Feb 15 01:08:49 1996 +0000 @@ -85,7 +85,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("quad", Fquad, Squad, FSquad, 11, +DEFUN_DLD_BUILTIN (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\ @@ -355,8 +355,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("quad_options", Fquad_options, Squad_options, - FSquad_options, 10, +DEFUN_DLD_BUILTIN (quad_options, args, , "quad_options (KEYWORD, VALUE)\n\ \n\ Set or show options for quad. Keywords may be abbreviated\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/qzval.cc --- a/src/qzval.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/qzval.cc Thu Feb 15 01:08:49 1996 +0000 @@ -35,7 +35,7 @@ #include "help.h" #include "oct-obj.h" -DEFUN_DLD_BUILTIN ("qzval", Fqzval, Sqzval, FSqzval, 10, +DEFUN_DLD_BUILTIN (qzval, args, , "X = qzval (A, B)\n\ \n\ compute generalized eigenvalues of the matrix pencil (A - lambda B).\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/rand.cc --- a/src/rand.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/rand.cc Thu Feb 15 01:08:49 1996 +0000 @@ -331,7 +331,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("rand", Frand, Srand, FSrand, 11, +DEFUN_DLD_BUILTIN (rand, args, nargout, "rand -- generate a random value from a uniform distribution\n\ \n\ rand (N) -- generate N x N matrix\n\ @@ -365,7 +365,7 @@ F77_FCN (setcgn, SETCGN) (current_distribution); } -DEFUN_DLD_BUILTIN ("randn", Frandn, Srandn, FSrandn, 11, +DEFUN_DLD_BUILTIN (randn, args, nargout, "randn -- generate a random value from a normal distribution\n\ \n\ randn (N) -- generate N x N matrix\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/resource.cc --- a/src/resource.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/resource.cc Thu Feb 15 01:08:49 1996 +0000 @@ -102,7 +102,7 @@ return m; } -DEFUN ("getrusage", Fgetrusage, Sgetrusage, 00, +DEFUN (getrusage, , , "getrusage ()\n\ \n\ Return system resource statistics.") diff -r 3496ec9bee35 -r 0e6a0a271998 src/schur.cc --- a/src/schur.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/schur.cc Thu Feb 15 01:08:49 1996 +0000 @@ -38,7 +38,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("schur", Fschur, Sschur, FSschur, 11, +DEFUN_DLD_BUILTIN (schur, args, nargout, "[U, S] = schur (A) or S = schur (A)\n\ \n\ or, for ordered Schur:\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/sort.cc --- a/src/sort.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/sort.cc Thu Feb 15 01:08:49 1996 +0000 @@ -309,7 +309,7 @@ return retval; } -DEFUN_DLD_BUILTIN ("sort", Fsort, Ssort, FSsort, 11, +DEFUN_DLD_BUILTIN (sort, args, nargout, "[S, I] = sort (X)\n\ \n\ sort the columns of X, optionally return sort index") diff -r 3496ec9bee35 -r 0e6a0a271998 src/strfns.cc --- a/src/strfns.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/strfns.cc Thu Feb 15 01:08:49 1996 +0000 @@ -37,7 +37,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN ("isstr", Fisstr, Sisstr, 10, +DEFUN (isstr, args, , "isstr (X): return 1 if X is a string, 0 otherwise") { Octave_object retval; @@ -52,7 +52,7 @@ return retval; } -DEFUN ("setstr", Fsetstr, Ssetstr, 10, +DEFUN (setstr, args, , "setstr (V): convert a vector to a string") { Octave_object retval; @@ -67,7 +67,7 @@ return retval; } -DEFUN ("toascii", Ftoascii, Stoascii, 10, +DEFUN (toascii, args, , "toascii (STRING): return ASCII representation of STRING in a matrix") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/svd.cc --- a/src/svd.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/svd.cc Thu Feb 15 01:08:49 1996 +0000 @@ -38,7 +38,7 @@ #include "user-prefs.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("svd", Fsvd, Ssvd, FSsvd, 11, +DEFUN_DLD_BUILTIN (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\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/syl.cc --- a/src/syl.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/syl.cc Thu Feb 15 01:08:49 1996 +0000 @@ -34,7 +34,7 @@ #include "oct-obj.h" #include "utils.h" -DEFUN_DLD_BUILTIN ("syl", Fsyl, Ssyl, FSsyl, 11, +DEFUN_DLD_BUILTIN (syl, args, nargout, "X = syl (A, B, C): solve the Sylvester equation A X + X B + C = 0") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/sysdep.cc --- a/src/sysdep.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/sysdep.cc Thu Feb 15 01:08:49 1996 +0000 @@ -524,7 +524,7 @@ #endif } -DEFUN ("clc", Fclc, Sclc, 00, +DEFUN (clc, , , "clc (): clear screen") { Octave_object retval; @@ -548,7 +548,7 @@ DEFALIAS (home, clc); -DEFUN ("getenv", Fgetenv, Sgetenv, 10, +DEFUN (getenv, args, , "getenv (STRING): get environment variable values") { Octave_object retval; @@ -575,7 +575,7 @@ return retval; } -DEFUN ("putenv", Fputenv, Sputenv, 10, +DEFUN (putenv, args, , "putenv (VAR, VALUE): define environment variable VAR=VALUE") { Octave_object retval; @@ -604,7 +604,7 @@ return retval; } -DEFUN ("kbhit", Fkbhit, Skbhit, 00, +DEFUN (kbhit, , , "kbhit: get a single character from the terminal") { Octave_object retval; @@ -623,7 +623,7 @@ return retval; } -DEFUN ("pause", Fpause, Spause, 10, +DEFUN (pause, args, , "pause (seconds): suspend program execution") { Octave_object retval; @@ -664,7 +664,7 @@ // XXX FIXME XXX -- maybe this should only return 1 if IEEE floating // point functions really work. -DEFUN ("isieee", Fisieee, Sisieee, 00, +DEFUN (isieee, , , "isieee (): return 1 if host uses IEEE floating point") { return (double) (native_float_format == OCTAVE_IEEE_LITTLE @@ -711,7 +711,7 @@ return retval; } -DEFUN ("tilde_expand", Ftilde_expand, Stilde_expand, 10, +DEFUN (tilde_expand, args, , "tilde_expand (STRING): perform tilde expansion on STRING") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/timefns.cc --- a/src/timefns.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/timefns.cc Thu Feb 15 01:08:49 1996 +0000 @@ -90,7 +90,7 @@ return &tm; } -DEFUN ("time", Ftime, Stime, 00, +DEFUN (time, , , "time ()\n\ \n\ Return current time. On Unix systems, this is the number of\n\ @@ -122,7 +122,7 @@ return (double) now + fraction; } -DEFUN ("gmtime", Fgmtime, Sgmtime, 10, +DEFUN (gmtime, args, , "gmtime (TIME)\n\ \n\ Given a value returned from time(), return a structure like that\n\ @@ -150,7 +150,7 @@ return retval; } -DEFUN ("localtime", Flocaltime, Slocaltime, 10, +DEFUN (localtime, args, , "localtime (TIME)\n\ \n\ Given a value returned from time(), return a structure with\n\ @@ -189,7 +189,7 @@ return retval; } -DEFUN ("mktime", Fmktime, Smktime, 10, +DEFUN (mktime, args, , "mktime (TMSTRUCT)") { Octave_object retval; @@ -211,7 +211,7 @@ return retval; } -DEFUN ("strftime", Fstrftime, Sstrftime, 10, +DEFUN (strftime, args, , "strftime (FMT, TMSTRUCT)\n\ \n\ Performs `%' substitutions similar to those in printf. Except where\n\ diff -r 3496ec9bee35 -r 0e6a0a271998 src/toplev.cc --- a/src/toplev.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/toplev.cc Thu Feb 15 01:08:49 1996 +0000 @@ -262,7 +262,7 @@ return retval; } -DEFUN ("source", Fsource, Ssource, 10, +DEFUN (source, args, , "source (FILE)\n\ \n\ Parse and execute the contents of FILE. Like executing commands in a\n\ @@ -325,7 +325,7 @@ panic_impossible (); } -DEFUN_TEXT ("casesen", Fcasesen, Scasesen, 10, +DEFUN_TEXT (casesen, args, , "casesen [on|off]") { Octave_object retval; @@ -347,7 +347,7 @@ return retval; } -DEFUN ("computer", Fcomputer, Scomputer, 11, +DEFUN (computer, args, nargout, "computer ():\n\ \n\ Have Octave ask the system, \"What kind of computer are you?\"") @@ -382,7 +382,7 @@ return retval; } -DEFUN ("flops", Fflops, Sflops, 10, +DEFUN (flops, args, , "flops (): count floating point operations") { int nargin = args.length (); @@ -395,7 +395,7 @@ return 0.0; } -DEFUN ("quit", Fquit, Squit, 00, +DEFUN (quit, , , "quit (): exit Octave gracefully") { Octave_object retval; @@ -406,7 +406,7 @@ DEFALIAS (exit, quit); -DEFUN ("warranty", Fwarranty, Swarranty, 00, +DEFUN (warranty, , , "warranty (): describe copying conditions") { Octave_object retval; @@ -455,7 +455,7 @@ return retval; } -DEFUN ("feval", Ffeval, Sfeval, 11, +DEFUN (feval, args, nargout, "feval (NAME, ARGS, ...)\n\ \n\ evaluate NAME as a function, passing ARGS as its arguments") @@ -548,7 +548,7 @@ return eval_string (s, 1, parse_status, nargout); } -DEFUN ("eval", Feval, Seval, 11, +DEFUN (eval, args, nargout, "eval (TRY, CATCH)\n\ \n\ Evaluate the string TRY as octave code. If that fails, evaluate the\n\ @@ -598,7 +598,7 @@ // Execute a shell command. -DEFUN ("system", Fsystem, Ssystem, 11, +DEFUN (system, args, nargout, "system (string [, return_output]): execute shell commands") { Octave_object retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/utils.cc --- a/src/utils.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/utils.cc Thu Feb 15 01:08:49 1996 +0000 @@ -390,7 +390,7 @@ return make_absolute (p.find (name), the_current_working_directory); } -DEFUN ("file_in_path", Ffile_in_path, Sfile_in_path, 10, +DEFUN (file_in_path, args, , "file_in_path (PATH, NAME)") { Octave_object retval; @@ -530,8 +530,7 @@ return retval; } -DEFUN ("undo_string_escapes", Fundo_string_escapes, - Sundo_string_escapes, 10, +DEFUN (undo_string_escapes, args, , "undo_string_escapes (STRING)") { tree_constant retval; diff -r 3496ec9bee35 -r 0e6a0a271998 src/variables.cc --- a/src/variables.cc Thu Feb 15 00:40:56 1996 +0000 +++ b/src/variables.cc Thu Feb 15 01:08:49 1996 +0000 @@ -163,7 +163,7 @@ return ans; } -DEFUN ("is_global", Fis_global, Sis_global, 10, +DEFUN (is_global, args, , "is_global (X): return 1 if the string X names a global variable\n\ otherwise, return 0.") { @@ -192,7 +192,7 @@ return retval; } -DEFUN ("exist", Fexist, Sexist, 10, +DEFUN (exist, args, , "exist (NAME): check if variable or file exists\n\ \n\ returns:\n\ @@ -1190,7 +1190,7 @@ return status; } -DEFUN_TEXT ("document", Fdocument, Sdocument, 10, +DEFUN_TEXT (document, args, , "document symbol string ...\n\ \n\ Associate a cryptic message with a variable name.") @@ -1332,7 +1332,7 @@ return retval; } -DEFUN_TEXT ("who", Fwho, Swho, 10, +DEFUN_TEXT (who, args, , "who [-all] [-builtins] [-functions] [-long] [-variables]\n\ \n\ List currently defined symbol(s). Options may be shortened to one\n\ @@ -1352,7 +1352,7 @@ return retval; } -DEFUN_TEXT ("whos", Fwhos, Swhos, 10, +DEFUN_TEXT (whos, args, , "whos [-all] [-builtins] [-functions] [-long] [-variables]\n\ \n\ List currently defined symbol(s). Options may be shortened to one\n\ @@ -1586,128 +1586,117 @@ // XXX FIXME XX -- these should probably be moved to where they // logically belong instead of being all grouped here. - DEFVAR ("EDITOR", SBV_EDITOR, editor, 0, sv_editor, + DEFVAR (EDITOR, editor, 0, sv_editor, "name of the editor to be invoked by the edit_history command"); - DEFVAR ("EXEC_PATH", SBV_EXEC_PATH, exec_path, 0, sv_exec_path, + DEFVAR (EXEC_PATH, exec_path, 0, sv_exec_path, "colon separated list of directories to search for programs to run"); - DEFCONST ("I", SBV_I, Complex (0.0, 1.0), 0, 0, + DEFCONST (I, Complex (0.0, 1.0), 0, 0, "sqrt (-1)"); - DEFCONST ("Inf", SBV_Inf, octave_Inf, 0, 0, + DEFCONST (Inf, octave_Inf, 0, 0, "infinity"); - DEFVAR ("INFO_FILE", SBV_INFO_FILE, info_file, 0, sv_info_file, + DEFVAR (INFO_FILE, info_file, 0, sv_info_file, "name of the Octave info file"); - DEFVAR ("INFO_PROGRAM", SBV_INFO_PROGRAM, info_prog, 0, sv_info_prog, + DEFVAR (INFO_PROGRAM, info_prog, 0, sv_info_prog, "name of the Octave info reader"); - DEFCONST ("J", SBV_J, Complex (0.0, 1.0), 0, 0, + DEFCONST (J, Complex (0.0, 1.0), 0, 0, "sqrt (-1)"); - DEFCONST ("NaN", SBV_NaN, octave_NaN, 0, 0, + DEFCONST (NaN, octave_NaN, 0, 0, "not a number"); - DEFVAR ("LOADPATH", SBV_LOADPATH, load_path, 0, sv_loadpath, + DEFVAR (LOADPATH, load_path, 0, sv_loadpath, "colon separated list of directories to search for scripts"); - DEFVAR ("IMAGEPATH", SBV_IMAGEPATH, OCTAVE_IMAGEPATH, 0, + DEFVAR (IMAGEPATH, OCTAVE_IMAGEPATH, 0, sv_imagepath, "colon separated list of directories to search for image files"); - DEFCONST ("OCTAVE_VERSION", SBV_version, OCTAVE_VERSION, 0, 0, + DEFCONSTX ("OCTAVE_VERSION", SBV_OCTAVE_VERSION, OCTAVE_VERSION, 0, 0, "Octave version"); - DEFVAR ("PAGER", SBV_PAGER, default_pager (), 0, sv_pager_binary, + DEFVAR (PAGER, default_pager (), 0, sv_pager_binary, "path to pager binary"); - DEFVAR ("PS1", SBV_PS1, "\\s:\\#> ", 0, sv_ps1, + DEFVAR (PS1, "\\s:\\#> ", 0, sv_ps1, "primary prompt string"); - DEFVAR ("PS2", SBV_PS2, "> ", 0, sv_ps2, + DEFVAR (PS2, "> ", 0, sv_ps2, "secondary prompt string"); - DEFVAR ("PS4", SBV_PS4, "+ ", 0, sv_ps4, + DEFVAR (PS4, "+ ", 0, sv_ps4, "string printed before echoed input (enabled by --echo-input)"); - DEFCONST ("PWD", SBV_PWD, - get_working_directory ("initialize_globals"), 0, sv_pwd, + DEFCONST (PWD, get_working_directory ("initialize_globals"), 0, sv_pwd, "current working directory"); - DEFCONST ("SEEK_SET", SBV_SEEK_SET, 0.0, 0, 0, + DEFCONST (SEEK_SET, 0.0, 0, 0, "used with fseek to position file relative to the beginning"); - DEFCONST ("SEEK_CUR", SBV_SEEK_CUR, 1.0, 0, 0, + DEFCONST (SEEK_CUR, 1.0, 0, 0, "used with fseek to position file relative to the current position"); - DEFCONST ("SEEK_END", SBV_SEEK_END, 2.0, 0, 0, + DEFCONST (SEEK_END, 2.0, 0, 0, "used with fseek to position file relative to the end"); - DEFVAR ("ans", SBV_ans, , 0, 0, + DEFVAR (ans, , 0, 0, ""); - DEFCONST ("argv", SBV_argv, , 0, 0, + DEFCONST (argv, , 0, 0, "the command line arguments this program was invoked with"); - DEFVAR ("automatic_replot", SBV_automatic_replot, 0.0, - 0, automatic_replot, + DEFVAR (automatic_replot, 0.0, 0, automatic_replot, "if true, auto-insert a replot command when a plot changes"); - DEFVAR ("beep_on_error", SBV_beep_on_error, 0.0, 0, - beep_on_error, + DEFVAR (beep_on_error, 0.0, 0, beep_on_error, "if true, beep before printing error messages"); - DEFVAR ("completion_append_char", SBV_completion_append_char, " ", - 0, sv_completion_append_char, + DEFVAR (completion_append_char, " ", 0, sv_completion_append_char, "the string to append after successful command-line completion\n\ attempts"); - DEFCONST ("error_text", SBV_current_error_text, "", 0, 0, + DEFCONST (error_text, "", 0, 0, "the text of error messages that would have been printed in the body of the most recent unwind_protect statement or the TRY part of\n\ the most recent eval() command. Outside of unwind_protect and\n\ eval(), or if no error has ocurred within them, the value of\n\ __error_text__ is guaranteed to be the empty string."); - DEFVAR ("default_return_value", SBV_default_return_value, Matrix (), - 0, 0, + DEFVAR (default_return_value, Matrix (), 0, 0, "the default for value for unitialized variables returned from\n\ functions. Only used if the variable initialize_return_values is\n\ set to \"true\"."); - DEFVAR ("default_save_format", SBV_default_save_format, "ascii", - 0, sv_default_save_format, + DEFVAR (default_save_format, "ascii", 0, sv_default_save_format, "default format for files created with save, may be one of\n\ \"binary\", \"text\", or \"mat-binary\""); - DEFVAR ("define_all_return_values", SBV_define_all_return_values, - 0.0, 0, define_all_return_values, + DEFVAR (define_all_return_values, 0.0, 0, define_all_return_values, "control whether values returned from functions should have a\n\ value even if one has not been explicitly assigned. See also\n\ default_return_value"); - DEFVAR ("do_fortran_indexing", SBV_do_fortran_indexing, 0.0, 0, - do_fortran_indexing, + DEFVAR (do_fortran_indexing, 0.0, 0, do_fortran_indexing, "allow single indices for matrices"); - DEFVAR ("echo_executing_commands", SBV_echo_executing_commands, 0.0, 0, - echo_executing_commands, + DEFVAR (echo_executing_commands, 0.0, 0, echo_executing_commands, "echo commands as they are executed"); - DEFCONST ("e", SBV_e, exp (1.0), 0, 0, + DEFCONST (e, exp (1.0), 0, 0, "exp (1)"); - DEFVAR ("empty_list_elements_ok", SBV_empty_list_elements_ok, - "warn", 0, empty_list_elements_ok, + DEFVAR (empty_list_elements_ok, "warn", 0, empty_list_elements_ok, "ignore the empty element in expressions like `a = [[], 1]'"); - DEFCONST ("eps", SBV_eps, DBL_EPSILON, 0, 0, + DEFCONST (eps, DBL_EPSILON, 0, 0, "machine precision"); - DEFVAR ("gnuplot_binary", SBV_gnuplot_binary, "gnuplot", 0, - sv_gnuplot_binary, + DEFVAR (gnuplot_binary, "gnuplot", 0, sv_gnuplot_binary, "path to gnuplot binary"); #ifdef GNUPLOT_HAS_MULTIPLOT @@ -1716,180 +1705,145 @@ double with_multiplot = 0.0; #endif - DEFVAR ("gnuplot_has_multiplot", SBV_gnuplot_has_multiplot, - with_multiplot, 0, gnuplot_has_multiplot, + DEFVAR (gnuplot_has_multiplot, with_multiplot, 0, gnuplot_has_multiplot, "true if gnuplot supports multiplot, false otherwise"); - DEFVAR ("history_file", SBV_history_file, - default_history_file (), 0, sv_history_file, + DEFVAR (history_file, default_history_file (), 0, sv_history_file, "name of command history file"); - DEFVAR ("history_size", SBV_history_size, - default_history_size (), 0, history_size, + DEFVAR (history_size, default_history_size (), 0, history_size, "number of commands to save in the history list"); - DEFCONST ("i", SBV_i, Complex (0.0, 1.0), 1, 0, + DEFCONST (i, Complex (0.0, 1.0), 1, 0, "sqrt (-1)"); - DEFVAR ("ignore_function_time_stamp", - SBV_ignore_function_time_stamp, "system", 0, - ignore_function_time_stamp, + DEFVAR (ignore_function_time_stamp, "system", 0, ignore_function_time_stamp, "don't check to see if function files have changed since they were\n\ last compiled. Possible values are \"system\" and \"all\""); - DEFVAR ("implicit_str_to_num_ok", SBV_implicit_str_to_num_ok, - 0.0, 0, implicit_str_to_num_ok, + DEFVAR (implicit_str_to_num_ok, 0.0, 0, implicit_str_to_num_ok, "allow implicit string to number conversion"); - DEFCONST ("inf", SBV_inf, octave_Inf, 0, 0, + DEFCONST (inf, octave_Inf, 0, 0, "infinity"); - DEFCONST ("j", SBV_j, Complex (0.0, 1.0), 1, 0, + DEFCONST (j, Complex (0.0, 1.0), 1, 0, "sqrt (-1)"); - DEFCONST ("nan", SBV_nan, octave_NaN, 0, 0, + DEFCONST (nan, octave_NaN, 0, 0, "not a number"); - DEFVAR ("ok_to_lose_imaginary_part", SBV_ok_to_lose_imaginary_part, - "warn", 0, ok_to_lose_imaginary_part, + DEFVAR (ok_to_lose_imaginary_part, "warn", 0, ok_to_lose_imaginary_part, "silently convert from complex to real by dropping imaginary part"); - DEFVAR ("output_max_field_width", SBV_output_max_field_width, 10.0, - 0, set_output_max_field_width, + DEFVAR (output_max_field_width, 10.0, 0, set_output_max_field_width, "maximum width of an output field for numeric output"); - DEFVAR ("output_precision", SBV_output_precision, 5.0, 0, - set_output_precision, + DEFVAR (output_precision, 5.0, 0, set_output_precision, "number of significant figures to display for numeric output"); - DEFVAR ("page_screen_output", SBV_page_screen_output, 1.0, 0, - page_screen_output, + DEFVAR (page_screen_output, 1.0, 0, page_screen_output, "if possible, send output intended for the screen through the pager"); - DEFCONST ("pi", SBV_pi, 4.0 * atan (1.0), 0, 0, + DEFCONST (pi, 4.0 * atan (1.0), 0, 0, "ratio of the circumference of a circle to its diameter"); - DEFVAR ("prefer_column_vectors", SBV_prefer_column_vectors, 1.0, - 0, prefer_column_vectors, + DEFVAR (prefer_column_vectors, 1.0, 0, prefer_column_vectors, "prefer column/row vectors"); - DEFVAR ("prefer_zero_one_indexing", SBV_prefer_zero_one_indexing, - 0.0, 0, prefer_zero_one_indexing, + DEFVAR (prefer_zero_one_indexing, 0.0, 0, prefer_zero_one_indexing, "when there is a conflict, prefer zero-one style indexing"); - DEFVAR ("print_answer_id_name", SBV_print_answer_id_name, 1.0, 0, - print_answer_id_name, + DEFVAR (print_answer_id_name, 1.0, 0, print_answer_id_name, "set output style to print `var_name = ...'"); - DEFVAR ("print_empty_dimensions", SBV_print_empty_dimensions, - 1.0, 0, print_empty_dimensions, + DEFVAR (print_empty_dimensions, 1.0, 0, print_empty_dimensions, "also print dimensions of empty matrices"); - DEFCONST ("program_invocation_name", SBV_program_invocation_name, - raw_prog_name, 0, 0, + DEFCONST (program_invocation_name, raw_prog_name, 0, 0, "the full name of the current program or script, including the\n\ directory specification"); - DEFCONST ("program_name", SBV_program_name, prog_name, 0, 0, + DEFCONST (program_name, prog_name, 0, 0, "the name of the current program or script"); - DEFVAR ("propagate_empty_matrices", SBV_propagate_empty_matrices, - 1.0, 0, propagate_empty_matrices, + DEFVAR (propagate_empty_matrices, 1.0, 0, propagate_empty_matrices, "operations on empty matrices return an empty matrix, not an error"); #if 0 - DEFVAR ("read_only_constants", SBV_read_only_constants, 1.0, 0, - read_only_constants, + DEFVAR (read_only_constants, 1.0, 0, read_only_constants, "allow built-in constants to be modified"); #endif - DEFCONST ("realmax", SBV_realmax, DBL_MAX, 0, 0, + DEFCONST (realmax, DBL_MAX, 0, 0, "realmax (): return largest representable floating point number"); - DEFCONST ("realmin", SBV_realmin, DBL_MIN, 0, 0, + DEFCONST (realmin, DBL_MIN, 0, 0, "realmin (): return smallest representable floating point number"); - DEFVAR ("resize_on_range_error", SBV_resize_on_range_error, 1.0, - 0, resize_on_range_error, + DEFVAR (resize_on_range_error, 1.0, 0, resize_on_range_error, "enlarge matrices on assignment"); - DEFVAR ("return_last_computed_value", - SBV_return_last_computed_value, 0.0, 0, - return_last_computed_value, + DEFVAR (return_last_computed_value, 0.0, 0, return_last_computed_value, "if a function does not return any values explicitly, return the\n\ last computed value"); - DEFVAR ("save_precision", SBV_save_precision, 15.0, 0, - set_save_precision, + DEFVAR (save_precision, 15.0, 0, set_save_precision, "number of significant figures kept by the ASCII save command"); - DEFVAR ("saving_history", SBV_saving_history, 1.0, 0, saving_history, + DEFVAR (saving_history, 1.0, 0, saving_history, "save command history"); - DEFVAR ("silent_functions", SBV_silent_functions, 0.0, 0, - silent_functions, + DEFVAR (silent_functions, 0.0, 0, silent_functions, "suppress printing results in called functions"); - DEFVAR ("split_long_rows", SBV_split_long_rows, 1.0, 0, - split_long_rows, + DEFVAR (split_long_rows, 1.0, 0, split_long_rows, "split long matrix rows instead of wrapping"); - DEFVAR ("struct_levels_to_print", SBV_struct_levels_to_print, 2.0, - 0, struct_levels_to_print, + DEFVAR (struct_levels_to_print, 2.0, 0, struct_levels_to_print, "number of levels of structure elements to print"); #ifdef USE_GNU_INFO - DEFVAR ("suppress_verbose_help_message", - SBV_suppress_verbose_help_message, 0.0, 0, - suppress_verbose_help_message, + DEFVAR (suppress_verbose_help_message, 0.0, 0, suppress_verbose_help_message, "suppress printing of message pointing to additional help in the\n\ help and usage functions"); #endif - DEFCONST ("stdin", SBV_stdin, 0.0, 0, 0, + DEFCONSTX ("stdin", SBV_stdin, 0.0, 0, 0, "file number of the standard input stream"); - DEFCONST ("stdout", SBV_stdout, 1.0, 0, 0, + DEFCONSTX ("stdout", SBV_stderr, 1.0, 0, 0, "file number of the standard output stream"); - DEFCONST ("stderr", SBV_stderr, 2.0, 0, 0, + DEFCONSTX ("stderr", SBV_stderr, 2.0, 0, 0, "file number of the standard error stream"); - DEFVAR ("treat_neg_dim_as_zero", SBV_treat_neg_dim_as_zero, 0.0, 0, - treat_neg_dim_as_zero, + DEFVAR (treat_neg_dim_as_zero, 0.0, 0, treat_neg_dim_as_zero, "convert negative dimensions to zero"); - DEFVAR ("warn_assign_as_truth_value", - SBV_warn_assign_as_truth_value, 1.0, 0, - warn_assign_as_truth_value, + DEFVAR (warn_assign_as_truth_value, 1.0, 0, warn_assign_as_truth_value, "produce warning for assignments used as truth values"); - DEFVAR ("warn_comma_in_global_decl", SBV_warn_comma_in_global_decl, - 1.0, 0, warn_comma_in_global_decl, + DEFVAR (warn_comma_in_global_decl, 1.0, 0, warn_comma_in_global_decl, "produce warning for commas in global declarations"); - DEFVAR ("warn_divide_by_zero", SBV_warn_divide_by_zero, 1.0, 0, - warn_divide_by_zero, + DEFVAR (warn_divide_by_zero, 1.0, 0, warn_divide_by_zero, "on IEEE machines, allow divide by zero errors to be suppressed"); - DEFVAR ("warn_function_name_clash", SBV_warn_function_name_clash, - 1.0, 0, warn_function_name_clash, + DEFVAR (warn_function_name_clash, 1.0, 0, warn_function_name_clash, "produce warning if function name conflicts with file name"); - DEFVAR ("warn_missing_semicolon", SBV_warn_missing_semicolon, - 0.0, 0, warn_missing_semicolon, + DEFVAR (warn_missing_semicolon, 0.0, 0, warn_missing_semicolon, "produce a warning if a statement in a function file is not terminated with a semicolon"); - DEFVAR ("whitespace_in_literal_matrix", - SBV_whitespace_in_literal_matrix, "", 0, - whitespace_in_literal_matrix, + DEFVAR (whitespace_in_literal_matrix, "", 0, whitespace_in_literal_matrix, "control auto-insertion of commas and semicolons in literal matrices"); } // Deleting names from the symbol tables. -DEFUN_TEXT ("clear", Fclear, Sclear, 10, +DEFUN_TEXT (clear, args, , "clear [-x] [name ...]\n\ \n\ Clear symbol(s) matching a list of globbing patterns.\n\