Mercurial > hg > octave-nkf
changeset 2802:bca5fbab2e52
[project @ 1997-03-09 11:02:27 by jwe]
author | jwe |
---|---|
date | Sun, 09 Mar 1997 11:03:18 +0000 |
parents | a98f5a21f026 |
children | f96fae33b877 |
files | liboctave/Array.h liboctave/data-conv.h liboctave/dbleQR.h liboctave/dbleSVD.h liboctave/idx-vector.h liboctave/lo-mappers.cc liboctave/prog-args.cc src/dirfns.cc src/error.cc src/file-io.cc src/fsolve.cc src/input.cc src/load-save.cc src/npsol.cc src/pt-fcn.cc src/qpsol.cc src/quad.cc src/syscalls.cc src/toplev.cc src/variables.cc |
diffstat | 20 files changed, 49 insertions(+), 50 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.h +++ b/liboctave/Array.h @@ -171,7 +171,7 @@ // unnecessarily force a copy, but that is not so easy, and I see no // clean way to do it. - T& Array<T>::checkelem (int n) + T& checkelem (int n) { if (n < 0 || n >= rep->length ()) return range_error ("T& Array<T>::checkelem", n); @@ -194,7 +194,7 @@ T& operator () (int n) { return elem (n); } #endif - T Array<T>::checkelem (int n) const + T checkelem (int n) const { if (n < 0 || n >= rep->length ()) return range_error ("T Array<T>::checkelem", n); @@ -202,12 +202,12 @@ return xelem (n); } - T Array<T>::elem (int n) const { return xelem (n); } + T elem (int n) const { return xelem (n); } #if defined (BOUNDS_CHECKING) - T Array<T>::operator () (int n) const { return checkelem (n); } + T operator () (int n) const { return checkelem (n); } #else - T Array<T>::operator () (int n) const { return elem (n); } + T operator () (int n) const { return elem (n); } #endif void resize (int n);
--- a/liboctave/data-conv.h +++ b/liboctave/data-conv.h @@ -84,7 +84,7 @@ LS_SHORT, LS_INT, LS_FLOAT, - LS_DOUBLE, + LS_DOUBLE }; extern void
--- a/liboctave/dbleQR.h +++ b/liboctave/dbleQR.h @@ -40,7 +40,7 @@ { std, raw, - economy, + economy }; QR (void) : q (), r () { }
--- a/liboctave/dbleSVD.h +++ b/liboctave/dbleSVD.h @@ -41,7 +41,7 @@ { std, economy, - sigma_only, + sigma_only }; SVD (void) : sigma (), left_sm (), right_sm () { }
--- a/liboctave/idx-vector.h +++ b/liboctave/idx-vector.h @@ -42,7 +42,7 @@ { public: - idx_vector_rep::idx_vector_rep (void) + idx_vector_rep (void) { colon = 0; len = 0; @@ -70,7 +70,7 @@ idx_vector_rep (const idx_vector_rep& a); - idx_vector_rep::~idx_vector_rep (void) { delete [] data; } + ~idx_vector_rep (void) { delete [] data; } idx_vector_rep& operator = (const idx_vector_rep& a); @@ -133,7 +133,7 @@ public: - idx_vector::idx_vector (void) + idx_vector (void) { rep = new idx_vector_rep (); rep->count = 1; @@ -175,7 +175,7 @@ rep->count++; } - idx_vector::~idx_vector (void) + ~idx_vector (void) { if (--rep->count <= 0) delete rep; @@ -194,22 +194,22 @@ return *this; } - idx_vector::operator void * () const + operator void * () const { return static_cast<void *> (rep->ok ()); } - int idx_vector::capacity (void) const { return rep->capacity (); } - int idx_vector::length (int cl) const { return rep->length (cl); } + int capacity (void) const { return rep->capacity (); } + int length (int cl) const { return rep->length (cl); } - int idx_vector::elem (int n) const { return rep->elem (n); } - int idx_vector::checkelem (int n) const { return rep->checkelem (n); } - int idx_vector::operator () (int n) const { return rep->operator () (n); } + int elem (int n) const { return rep->elem (n); } + int checkelem (int n) const { return rep->checkelem (n); } + int operator () (int n) const { return rep->operator () (n); } - int idx_vector::max (void) const { return rep->max (); } - int idx_vector::min (void) const { return rep->min (); } + int max (void) const { return rep->max (); } + int min (void) const { return rep->min (); } - int idx_vector::one_zero_only (void) const { return rep->one_zero_only (); } - int idx_vector::zeros_count (void) const { return rep->zeros_count (); } - int idx_vector::ones_count (void) const { return rep->ones_count (); } + int one_zero_only (void) const { return rep->one_zero_only (); } + int zeros_count (void) const { return rep->zeros_count (); } + int ones_count (void) const { return rep->ones_count (); } int is_colon (void) const { return rep->is_colon (); } int is_colon_equiv (int n, int sort_uniq = 0) const
--- a/liboctave/lo-mappers.cc +++ b/liboctave/lo-mappers.cc @@ -264,7 +264,6 @@ Complex atanh (const Complex& x) { - static Complex i (0, 1); Complex retval = log ((1 + x) / (1 - x)) / 2.0; return retval; } @@ -278,7 +277,8 @@ Complex fix (const Complex& x) { - return Complex (real (x), imag (x)); + return Complex (static_cast<int> (real (x)), + static_cast<int> (imag (x))); } Complex
--- a/liboctave/prog-args.cc +++ b/liboctave/prog-args.cc @@ -33,7 +33,7 @@ { if (long_opts) return ::getopt_long (xargc, xargv, short_opts, - (struct option *) long_opts, 0); + static_cast<const struct option *> (long_opts), 0); else return ::getopt (xargc, xargv, short_opts); }
--- a/src/dirfns.cc +++ b/src/dirfns.cc @@ -443,7 +443,7 @@ DEFUN (readdir, args, , "[FILES, STATUS, MSG] = readdir (NAME)\n\ \n\ -Return an array of strings containing the list of all files in the +Return an array of strings containing the list of all files in the\n\ named directory in FILES, or an empty matrix if an error occurs\n\ \n\ If successful, STATUS is 0 and MSG is an empty string. Otherwise,\n\
--- a/src/error.cc +++ b/src/error.cc @@ -255,7 +255,7 @@ This should eventually take us up to the top level, possibly\n\ printing traceback messages as we go.\n\ \n\ -If the resulting error message ends in a newline character, traceback +If the resulting error message ends in a newline character, traceback\n\ messages are not printed.\n\ \n\ See also: printf")
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -934,7 +934,7 @@ SKIP : number of bytes to skip before each element is read\n\ (default is 0)\n\ \n\ - ARCH : string specifying the data format for the file. Valid + ARCH : string specifying the data format for the file. Valid\n\ values are\n\ \n\ native -- the format of the current machine (default)\n\ @@ -1071,7 +1071,7 @@ SKIP : number of bytes to skip before each element is read\n\ (the default is 0)\n\ \n\ - ARCH : string specifying the data format for the file. Valid + ARCH : string specifying the data format for the file. Valid\n\ values are\n\ \n\ native -- the format of the current machine (default)\n\ @@ -1079,12 +1079,11 @@ ieee-be -- IEEE little endian\n\ vaxd -- VAX D floating format\n\ vaxg -- VAX G floating format\n\ - cray -- Cray floating format\n + cray -- Cray floating format\n\ \n\ however, conversions are currently only supported for ieee-be, and\n\ ieee-le formats.\n\ \n\ -\n\ COUNT : number of elements written") { octave_value retval = -1.0; @@ -1307,10 +1306,10 @@ DEFUN (umask, args, , "umask (MASK)\n\ \n\ -Change the file permission mask for file creation for the current -process. MASK is an integer, interpreted as an octal number. If -successful, returns the previous value of the mask (as an integer to -be interpreted as an octal number); otherwise an error message is +Change the file permission mask for file creation for the current\n\ +process. MASK is an integer, interpreted as an octal number. If\n\ +successful, returns the previous value of the mask (as an integer to\n\ +be interpreted as an octal number); otherwise an error message is\n\ printed.") { octave_value_list retval;
--- a/src/fsolve.cc +++ b/src/fsolve.cc @@ -129,7 +129,7 @@ Where the first argument is the name of the function to call to\n\ compute the vector of function values. It must have the form\n\ \n\ - y = f (x) + y = f (x)\n\ \n\ where y and x are vectors.") {
--- a/src/input.cc +++ b/src/input.cc @@ -1102,7 +1102,7 @@ DEFUN (input, args, , "input (PROMPT [, S])\n\ \n\ -Prompt user for input. If the second argument is present, return +Prompt user for input. If the second argument is present, return\n\ value as a string.") { octave_value_list retval;
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -1572,11 +1572,11 @@ \n\ Load variables from a file.\n\ \n\ -If no argument is supplied to select a format, load tries to read the -named file as an Octave binary, then as a .mat file, and then as an +If no argument is supplied to select a format, load tries to read the\n\ +named file as an Octave binary, then as a .mat file, and then as an\n\ Octave text file.\n\ \n\ -If the option -force is given, variables with the same names as those +If the option -force is given, variables with the same names as those\n\ found in the file will be replaced with the values read from the file.") { octave_value_list retval;
--- a/src/npsol.cc +++ b/src/npsol.cc @@ -250,7 +250,7 @@ \n\ where x is a vector and y is a scalar.\n\ \n\ -The argument G is a string containing the name of the function that +The argument G is a string containing the name of the function that\n\ defines the nonlinear constraints. It must be of the form\n\ \n\ y = g (x)\n\
--- a/src/pt-fcn.cc +++ b/src/pt-fcn.cc @@ -487,7 +487,7 @@ } DEFUN (vr_val, args, , - "vr_val (X): append X to the list of optional return values for a + "vr_val (X): append X to the list of optional return values for a\n\ function that allows a variable number of return values") { octave_value_list retval;
--- a/src/qpsol.cc +++ b/src/qpsol.cc @@ -431,7 +431,7 @@ libcruft/qpsol/README.MISSING in the source distribution.") #else DEFUN_DLD (qpsol_options, args, , - "qpsol_options (KEYWORD, VALUE)\n + "qpsol_options (KEYWORD, VALUE)\n\ \n\ Set or show options for qpsol. Keywords may be abbreviated\n\ to the shortest match.")
--- a/src/quad.cc +++ b/src/quad.cc @@ -95,7 +95,7 @@ Where the first argument is the name of the function to call to\n\ compute the value of the integrand. It must have the form\n\ \n\ - y = f (x) + y = f (x)\n\ \n\ where y and x are scalars.\n\ \n\
--- a/src/syscalls.cc +++ b/src/syscalls.cc @@ -146,7 +146,7 @@ \n\ Replace current process with a new process.\n\ \n\ -If successful, exec does not return. If exec does return, status will +If successful, exec does not return. If exec does return, status will\n\ be nonzero, and MSG will contain a system-dependent error message.") { octave_value_list retval; @@ -606,7 +606,7 @@ DEFUN (stat, args, , "[S, ERR, MSG] = stat (NAME)\n\ \n\ - Given the name of a file, return a structure S with the following + Given the name of a file, return a structure S with the following\n\ elements:\n\ \n\ dev : id of device containing a directory entry for this file\n\
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -820,7 +820,7 @@ DEFUN (atexit, args, , "atexit (NAME): register NAME as a function to call when Octave exits\n\ \n\ -Functions are called with no arguments in the reverse of the order in +Functions are called with no arguments in the reverse of the order in\n\ which they were registered with atexit()") { octave_value_list retval;
--- a/src/variables.cc +++ b/src/variables.cc @@ -1621,7 +1621,7 @@ "echo commands as they are executed"); DEFCONST (error_text, "", 0, 0, - "the text of error messages that would have been printed in the + "the text of error messages that would have been printed in the\n\ 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\ @@ -1678,7 +1678,7 @@ \n\ Clear symbol(s) matching a list of globbing patterns.\n\ \n\ -If no arguments are given, clear all user-defined variables and +If no arguments are given, clear all user-defined variables and\n\ functions.\n\ \n\ With -x, exclude the named variables")