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	Sun Mar 09 10:51:48 1997 +0000
+++ b/liboctave/Array.h	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/liboctave/data-conv.h	Sun Mar 09 11:03:18 1997 +0000
@@ -84,7 +84,7 @@
     LS_SHORT,
     LS_INT,
     LS_FLOAT,
-    LS_DOUBLE,
+    LS_DOUBLE
   };
 
 extern void
--- a/liboctave/dbleQR.h	Sun Mar 09 10:51:48 1997 +0000
+++ b/liboctave/dbleQR.h	Sun Mar 09 11:03:18 1997 +0000
@@ -40,7 +40,7 @@
     {
       std,
       raw,
-      economy,
+      economy
     };
 
   QR (void) : q (), r () { }
--- a/liboctave/dbleSVD.h	Sun Mar 09 10:51:48 1997 +0000
+++ b/liboctave/dbleSVD.h	Sun Mar 09 11:03:18 1997 +0000
@@ -41,7 +41,7 @@
     {
       std,
       economy,
-      sigma_only,
+      sigma_only
     };
 
   SVD (void) : sigma (), left_sm (), right_sm () { }
--- a/liboctave/idx-vector.h	Sun Mar 09 10:51:48 1997 +0000
+++ b/liboctave/idx-vector.h	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/liboctave/lo-mappers.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/liboctave/prog-args.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/dirfns.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/error.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/file-io.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/fsolve.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/input.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/load-save.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/npsol.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/pt-fcn.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/qpsol.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/quad.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/syscalls.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/toplev.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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	Sun Mar 09 10:51:48 1997 +0000
+++ b/src/variables.cc	Sun Mar 09 11:03:18 1997 +0000
@@ -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")