changeset 31898:0db880f38b1f

maint: Use "nonzero" rather than "non-zero" in code base. * file-editor-tab.cc, __ichol__.cc, interpreter.cc, mex.cc, oct-stream.cc, __ode15__.cc, ov-base-diag.cc, ov-base-mat.cc, ov-perm.cc, parse.h, CDiagMatrix.cc, Range.cc, dDiagMatrix.cc, dec2bin.m, dec2hex.m: Use "nonzero" rather than "non-zero" in code base.
author Rik <rik@octave.org>
date Wed, 08 Mar 2023 09:28:28 -0800
parents 8c7dcaf2e1b6
children c01849481834
files libgui/src/m-editor/file-editor-tab.cc libinterp/corefcn/__ichol__.cc libinterp/corefcn/interpreter.cc libinterp/corefcn/mex.cc libinterp/corefcn/oct-stream.cc libinterp/dldfcn/__ode15__.cc libinterp/octave-value/ov-base-diag.cc libinterp/octave-value/ov-base-mat.cc libinterp/octave-value/ov-perm.cc libinterp/parse-tree/parse.h liboctave/array/CDiagMatrix.cc liboctave/array/Range.cc liboctave/array/dDiagMatrix.cc scripts/strings/dec2bin.m scripts/strings/dec2hex.m
diffstat 15 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libgui/src/m-editor/file-editor-tab.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -3085,7 +3085,7 @@
           int editor_linenr = -1;
           marker *bp = nullptr;
 
-          // If comes back indicating a non-zero breakpoint marker,
+          // If comes back indicating a nonzero breakpoint marker,
           // reuse it if possible
           emit find_translated_line_number (line, editor_linenr, bp);
           if (bp != nullptr)
--- a/libinterp/corefcn/__ichol__.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/corefcn/__ichol__.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -117,7 +117,7 @@
         iw[ridx[j]] = j;
 
       jrow = Llist[k];
-      // Iterate over each non-zero element in the actual row.
+      // Iterate over each nonzero element in the actual row.
       while (jrow != -1)
         {
           jjrow = Lfirst[jrow];
@@ -296,8 +296,8 @@
             {
               j = ridx_l[jj];
               // If the element in the j position of the row is zero,
-              // then it will become non-zero, so we add it to the
-              // vector that tracks non-zero elements in the working row.
+              // then it will become nonzero, so we add it to the
+              // vector that tracks nonzero elements in the working row.
               if (! mark[j])
                 {
                   mark[j] = true;
@@ -330,7 +330,7 @@
           ridx_l = ridx_out_l.fortran_vec ();
         }
 
-      // The sorting of the non-zero elements of the working column can be
+      // The sorting of the nonzero elements of the working column can be
       // handled in a couple of ways.  The most efficient two I found, are
       // keeping the elements in an ordered binary search tree dynamically or
       // keep them unsorted in a vector and at the end of the outer iteration
@@ -341,7 +341,7 @@
       ridx_l[total_len] = k;
       w_len = 1;
 
-      // Extract the non-zero elements of working column and
+      // Extract the nonzero elements of working column and
       // drop the elements that are lower than droptol * cols_norm[k].
       for (i = 0; i < ind ; i++)
         {
--- a/libinterp/corefcn/interpreter.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/corefcn/interpreter.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -1073,7 +1073,7 @@
     std::cout << octave_startup_message () << "\n" << std::endl;
 }
 
-// Initialize by reading startup files.  Return non-zero if an exception
+// Initialize by reading startup files.  Return nonzero if an exception
 // occurs when reading any of them, but don't exit early because of an
 // exception.
 
--- a/libinterp/corefcn/mex.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/corefcn/mex.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -707,7 +707,7 @@
   {
     if (m_val.issparse ())
       {
-        // For sparse arrays, return the first non-zero value.
+        // For sparse arrays, return the first nonzero value.
         const void *m_data = m_val.mex_get_data ();
         if (m_data == nullptr)
           return 0.0;
--- a/libinterp/corefcn/oct-stream.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/corefcn/oct-stream.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -4325,7 +4325,7 @@
         if (value != T ())
           {
             // If conversion produces an integer that overflows, failbit is set
-            // but value is non-zero.  We want to treat this case as success,
+            // but value is nonzero.  We want to treat this case as success,
             // so clear  failbit from the stream state to keep going.
             // FIXME: Maybe set error state on octave stream?  Matlab does
             // *not* indicate an error message on overflow.
--- a/libinterp/dldfcn/__ode15__.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/dldfcn/__ode15__.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -523,7 +523,7 @@
     {
       // Allocate memory for sparse Jacobian defined in user function.
       // This will always be required at least once since we set the number
-      // of non-zero elements to zero initially.
+      // of nonzero elements to zero initially.
       if (SUNSparseMatrix_Reallocate (Jac, nnz))
         error ("Unable to allocate sufficient memory for IDA sparse matrix");
     }
--- a/libinterp/octave-value/ov-base-diag.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/octave-value/ov-base-diag.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -276,7 +276,7 @@
   return retval;
 }
 
-// Return true if this matrix has all true elements (non-zero, not NA/NaN).
+// Return true if this matrix has all true elements (nonzero, not NA/NaN).
 template <typename DMT, typename MT>
 bool
 octave_base_diag<DMT, MT>::is_true () const
--- a/libinterp/octave-value/ov-base-mat.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/octave-value/ov-base-mat.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -417,7 +417,7 @@
   return retval;
 }
 
-// Return true if this matrix has all true elements (non-zero, not NA/NaN).
+// Return true if this matrix has all true elements (nonzero, not NA/NaN).
 template <typename MT>
 bool
 octave_base_matrix<MT>::is_true () const
--- a/libinterp/octave-value/ov-perm.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/octave-value/ov-perm.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -134,7 +134,7 @@
   return retval;
 }
 
-// Return true if this matrix has all true elements (non-zero, not NaN/NA).
+// Return true if this matrix has all true elements (nonzero, not NaN/NA).
 // A permutation cannot have NaN/NA.
 bool
 octave_perm_matrix::is_true () const
--- a/libinterp/parse-tree/parse.h	Wed Mar 08 09:04:19 2023 -0800
+++ b/libinterp/parse-tree/parse.h	Wed Mar 08 09:28:28 2023 -0800
@@ -726,7 +726,7 @@
 
 protected:
 
-  // Contains error message if Bison-generated parser returns non-zero
+  // Contains error message if Bison-generated parser returns nonzero
   // status.
   std::string m_parse_error_msg;
 
--- a/liboctave/array/CDiagMatrix.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/liboctave/array/CDiagMatrix.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -320,7 +320,7 @@
   info = 0;
   octave_idx_type len = r;        // alias for readability
   octave_idx_type z_count  = 0;   // zeros
-  octave_idx_type nz_count = 0;   // non-zeros
+  octave_idx_type nz_count = 0;   // nonzeros
   for (octave_idx_type i = 0; i < len; i++)
     {
       if (xelem (i, i) == 0.0)
--- a/liboctave/array/Range.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/liboctave/array/Range.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -350,7 +350,7 @@
 {
   // Note that the order of the following checks matters.
 
-  // If there are no elements, there can be no non-zero elements.
+  // If there are no elements, there can be no nonzero elements.
   if (nel == 0)
     return 0;
 
--- a/liboctave/array/dDiagMatrix.cc	Wed Mar 08 09:04:19 2023 -0800
+++ b/liboctave/array/dDiagMatrix.cc	Wed Mar 08 09:28:28 2023 -0800
@@ -243,7 +243,7 @@
   info = 0;
   octave_idx_type len = r;        // alias for readability
   octave_idx_type z_count  = 0;   // zeros
-  octave_idx_type nz_count = 0;   // non-zeros
+  octave_idx_type nz_count = 0;   // nonzeros
   for (octave_idx_type i = 0; i < len; i++)
     {
       if (xelem (i, i) == 0.0)
--- a/scripts/strings/dec2bin.m	Wed Mar 08 09:04:19 2023 -0800
+++ b/scripts/strings/dec2bin.m	Wed Mar 08 09:28:28 2023 -0800
@@ -55,7 +55,7 @@
 ##
 ## Programming tip: @code{dec2bin} discards any fractional part of the input.
 ## If you need the fractional part to be converted too, call @code{dec2base}
-## with a non-zero number of decimal places.  You can also use @code{fix} or
+## with a nonzero number of decimal places.  You can also use @code{fix} or
 ## @code{round} on fractional inputs to ensure predictable rounding behavior.
 ##
 ## @seealso{bin2dec, dec2base, dec2hex}
--- a/scripts/strings/dec2hex.m	Wed Mar 08 09:04:19 2023 -0800
+++ b/scripts/strings/dec2hex.m	Wed Mar 08 09:28:28 2023 -0800
@@ -52,7 +52,7 @@
 ##
 ## Programming tip: @code{dec2hex} discards any fractional part of the input.
 ## If you need the fractional part to be converted too, call @code{dec2base}
-## with a non-zero number of decimal places.  You can also use @code{fix} or
+## with a nonzero number of decimal places.  You can also use @code{fix} or
 ## @code{round} on fractional inputs to ensure predictable rounding behavior.
 ##
 ## @seealso{hex2dec, dec2base, dec2bin}