changeset 21567:3d25f9f4a62b

maint: Eliminate Britishicisms in the code. * oct-stream.cc, __magick_read__.cc, Array.h, flag.m, lines.m, prism.m, __contour__.m: Use 'optimize' and 'color' rather than British spellings.
author Rik <rik@octave.org>
date Wed, 30 Mar 2016 21:35:51 -0700
parents 02826fb0f261
children 3d60ed163b70
files libinterp/corefcn/oct-stream.cc libinterp/dldfcn/__magick_read__.cc liboctave/array/Array.h scripts/image/flag.m scripts/image/lines.m scripts/image/prism.m scripts/plot/draw/private/__contour__.m
diffstat 7 files changed, 28 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc	Wed Mar 30 17:28:43 2016 -0700
+++ b/libinterp/corefcn/oct-stream.cc	Wed Mar 30 21:35:51 2016 -0700
@@ -1169,7 +1169,7 @@
     }
 }
 
-// Delimited stream, optimised to read strings of characters separated
+// Delimited stream, optimized to read strings of characters separated
 // by single-character delimiters.
 //
 // The reason behind this class is that octstream doesn't provide
@@ -1194,7 +1194,7 @@
 
   ~delimited_stream (void);
 
-  // Called when optimised sequence of get is finished.  Ensures that
+  // Called when optimized sequence of get is finished.  Ensures that
   // there is a remaining delimiter in buf, or loads more data in.
   void field_done (void)
   {
@@ -3095,7 +3095,7 @@
                       std::string& val) const
 {
   int c1 = std::istream::traits_type::eof ();
-  std::ostringstream obuf;              // Is this optimised for growing?
+  std::ostringstream obuf;              // Is this optimized for growing?
 
   while (is && ((c1 = (is && ! is.eof ())
                  ? is.get_undelim ()
@@ -3202,7 +3202,7 @@
                         std::string& val) const
 {
   int c1 = std::istream::traits_type::eof ();
-  std::ostringstream obuf;              // Is this optimised for growing?
+  std::ostringstream obuf;              // Is this optimized for growing?
 
   while (is && pattern.find (c1 = is.get_undelim ()) != std::string::npos)
     obuf << static_cast<char> (c1);
@@ -3573,7 +3573,7 @@
   bool have_delims = false;
   for (int i = 0; i < last; i += 2)
     {
-      std::string param = args(i).xstring_value ("%s: Invalid paramter type <%s> for parameter %d",
+      std::string param = args(i).xstring_value ("%s: Invalid parameter type <%s> for parameter %d",
                                                  who.c_str (),
                                                  args(i).type_name ().c_str (),
                                                  i/2 + 1);
@@ -3733,7 +3733,7 @@
                    who.c_str ());
         }
       else
-        error ("%s: unrecognised option '%s'", who.c_str (), param.c_str ());
+        error ("%s: unrecognized option '%s'", who.c_str (), param.c_str ());
     }
 
   whitespace_table = std::string (256, '\0');
--- a/libinterp/dldfcn/__magick_read__.cc	Wed Mar 30 17:28:43 2016 -0700
+++ b/libinterp/dldfcn/__magick_read__.cc	Wed Mar 30 21:35:51 2016 -0700
@@ -439,7 +439,7 @@
         }
     }
 
-  const octave_idx_type colour_stride = nRows * nCols;
+  const octave_idx_type color_stride = nRows * nCols;
   switch (type)
     {
     case Magick::BilevelType:           // Monochrome bi-level image
@@ -506,7 +506,7 @@
         img = T (dim_vector (nRows, nCols, 3, nFrames));
         P *img_fvec = img.fortran_vec ();
 
-        const octave_idx_type frame_stride  = colour_stride * 3;
+        const octave_idx_type frame_stride = color_stride * 3;
         for (octave_idx_type frame = 0; frame < nFrames; frame++)
           {
             OCTAVE_QUIT;
@@ -516,8 +516,8 @@
 
             octave_idx_type idx = 0;
             P *rbuf   = img_fvec;
-            P *gbuf   = img_fvec + colour_stride;
-            P *bbuf   = img_fvec + colour_stride * 2;
+            P *gbuf   = img_fvec + color_stride;
+            P *bbuf   = img_fvec + color_stride * 2;
 
             for (octave_idx_type col = 0; col < nCols; col++)
               {
@@ -544,7 +544,7 @@
         P *img_fvec = img.fortran_vec ();
         P *a_fvec   = alpha.fortran_vec ();
 
-        const octave_idx_type frame_stride  = colour_stride * 3;
+        const octave_idx_type frame_stride = color_stride * 3;
 
         // Unlike the index for the other channels, this one won't need
         // to be reset on each frame since it's a separate matrix.
@@ -558,8 +558,8 @@
 
             octave_idx_type idx = 0;
             P *rbuf   = img_fvec;
-            P *gbuf   = img_fvec + colour_stride;
-            P *bbuf   = img_fvec + colour_stride * 2;
+            P *gbuf   = img_fvec + color_stride;
+            P *bbuf   = img_fvec + color_stride * 2;
 
             for (octave_idx_type col = 0; col < nCols; col++)
               {
@@ -585,7 +585,7 @@
         img   = T (dim_vector (nRows, nCols, 4, nFrames));
         P *img_fvec = img.fortran_vec ();
 
-        const octave_idx_type frame_stride  = colour_stride * 4;
+        const octave_idx_type frame_stride = color_stride * 4;
         for (octave_idx_type frame = 0; frame < nFrames; frame++)
           {
             OCTAVE_QUIT;
@@ -595,9 +595,9 @@
 
             octave_idx_type idx = 0;
             P *cbuf   = img_fvec;
-            P *mbuf   = img_fvec + colour_stride;
-            P *ybuf   = img_fvec + colour_stride * 2;
-            P *kbuf   = img_fvec + colour_stride * 3;
+            P *mbuf   = img_fvec + color_stride;
+            P *ybuf   = img_fvec + color_stride * 2;
+            P *kbuf   = img_fvec + color_stride * 3;
 
             for (octave_idx_type col = 0; col < nCols; col++)
               {
@@ -625,7 +625,7 @@
         P *img_fvec = img.fortran_vec ();
         P *a_fvec   = alpha.fortran_vec ();
 
-        const octave_idx_type frame_stride  = colour_stride * 4;
+        const octave_idx_type frame_stride = color_stride * 4;
 
         // Unlike the index for the other channels, this one won't need
         // to be reset on each frame since it's a separate matrix.
@@ -643,9 +643,9 @@
 
             octave_idx_type idx = 0;
             P *cbuf   = img_fvec;
-            P *mbuf   = img_fvec + colour_stride;
-            P *ybuf   = img_fvec + colour_stride * 2;
-            P *kbuf   = img_fvec + colour_stride * 3;
+            P *mbuf   = img_fvec + color_stride;
+            P *ybuf   = img_fvec + color_stride * 2;
+            P *kbuf   = img_fvec + color_stride * 3;
 
             for (octave_idx_type col = 0; col < nCols; col++)
               {
@@ -1401,7 +1401,7 @@
 
   const octave_scalar_map options = args(4).xscalar_map_value ("__magick_write__: OPTIONS must be a struct");
 
-  const octave_value img  = args(2);
+  const octave_value img = args(2);
   const Matrix cmap = args(3).xmatrix_value ("__magick_write__: invalid MAP");
 
   std::vector<Magick::Image> imvec;
--- a/liboctave/array/Array.h	Wed Mar 30 17:28:43 2016 -0700
+++ b/liboctave/array/Array.h	Wed Mar 30 21:35:51 2016 -0700
@@ -661,7 +661,7 @@
   cat (int dim, octave_idx_type n, const Array<T> *array_list);
 
   //! Apply function fcn to each element of the Array<T>. This function
-  //! is optimised with a manually unrolled loop.
+  //! is optimized with a manually unrolled loop.
   template <typename U, typename F>
   Array<U>
   map (F fcn) const
--- a/scripts/image/flag.m	Wed Mar 30 17:28:43 2016 -0700
+++ b/scripts/image/flag.m	Wed Mar 30 21:35:51 2016 -0700
@@ -54,7 +54,7 @@
 
 %!demo
 %! ## Show the 'flag' colormap profile and as an image
-%! cmap = flag (12);  # 4 colours, therefore cycle 3 times
+%! cmap = flag (12);  # 4 colors, therefore cycle 3 times
 %! subplot (2, 1, 1);
 %! rgbplot (cmap, "composite");
 %! subplot (2, 1, 2);
--- a/scripts/image/lines.m	Wed Mar 30 17:28:43 2016 -0700
+++ b/scripts/image/lines.m	Wed Mar 30 21:35:51 2016 -0700
@@ -54,7 +54,7 @@
 
 %!demo
 %! ## Show the 'lines' colormap profile and as an image
-%! cmap = lines (21); # default has 7 colours, therefore cycle 3 times
+%! cmap = lines (21); # default has 7 colors, therefore cycle 3 times
 %! subplot (2, 1, 1);
 %! rgbplot (cmap, "composite");
 %! subplot (2, 1, 2);
--- a/scripts/image/prism.m	Wed Mar 30 17:28:43 2016 -0700
+++ b/scripts/image/prism.m	Wed Mar 30 21:35:51 2016 -0700
@@ -54,7 +54,7 @@
 
 %!demo
 %! ## Show the 'prism' colormap profile and as an image
-%! cmap = prism (18); # 6 colours, therefore cycle 3 times
+%! cmap = prism (18); # 6 colors, therefore cycle 3 times
 %! subplot (2, 1, 1);
 %! rgbplot (cmap, "composite");
 %! subplot (2, 1, 2);
--- a/scripts/plot/draw/private/__contour__.m	Wed Mar 30 17:28:43 2016 -0700
+++ b/scripts/plot/draw/private/__contour__.m	Wed Mar 30 21:35:51 2016 -0700
@@ -244,7 +244,7 @@
 
     ## Handle for each level the case where we have (a) hole(s) in a patch.
     ## Those are to be filled with the color of level below or with the
-    ## background colour.
+    ## background color.
     for k = 1:numel (lev)
       lvl_idx = find (abs (cont_lev - lev(k)) < lvl_eps);
       len = numel (lvl_idx);
@@ -268,7 +268,7 @@
         endwhile
         if (numel (mark) > 0)
           ## All marked contours describe a hole in a larger contour of
-          ## the same level and must be filled with colour of level below.
+          ## the same level and must be filled with color of level below.
           ma_idx = lvl_idx(mark);
           if (k > 1)
             ## Find color of level below.