diff scripts/plot/private/__print_parse_opts__.m @ 17405:3f0ed69d21c6

Replace unnecessary instances of strncmp with strcmp. * scripts/optimization/optimget.m, scripts/plot/__gnuplot_drawnow__.m, scripts/plot/fill.m, scripts/plot/private/__go_draw_axes__.m, scripts/plot/private/__pie__.m, scripts/plot/private/__print_parse_opts__.m, scripts/plot/private/__quiver__.m, scripts/plot/private/__tight_eps_bbox__.m, scripts/plot/stairs.m, scripts/plot/uigetfile.m, scripts/strings/strsplit.m, scripts/strings/validatestring.m: Replace unnecessary instances of strncmp with strcmp.
author Rik <rik@octave.org>
date Tue, 10 Sep 2013 18:31:39 -0700
parents 50794f5e2323
children
line wrap: on
line diff
--- a/scripts/plot/private/__print_parse_opts__.m	Tue Sep 10 16:31:34 2013 -0700
+++ b/scripts/plot/private/__print_parse_opts__.m	Tue Sep 10 18:31:39 2013 -0700
@@ -90,9 +90,9 @@
         arg_st.force_solid = 1;
       elseif (strcmp (arg, "-dashed"))
         arg_st.force_solid = -1;
-      elseif (strncmp (arg, "-portrait", numel (arg)))
+      elseif (strncmp (arg, "-portrait", length (arg)))
         arg_st.orientation = "portrait";
-      elseif (strncmp (arg, "-landscape", numel (arg)))
+      elseif (strncmp (arg, "-landscape", length (arg)))
         arg_st.orientation = "landscape";
       elseif (strcmp (arg, "-loose"))
         arg_st.loose = true;
@@ -122,14 +122,14 @@
         arg_st.pstoedit_binary = arg{10:end};
       elseif (strncmpi (arg, "-textalphabits=", 15))
         n = find (arg == "=");
-        if (! isempty (n) && n == numel (arg) - 1 && ismember (arg(end), "124"))
+        if (! isempty (n) && n == numel (arg) - 1 && any (arg(end) == "124"))
           arg_st.ghostscript.antialiasing_textalphabits = str2num (arg(end));
         else
           error ("print: improper syntax, or value, for TextAlphaBits");
         endif
       elseif (strncmpi (arg, "-graphicsalphabits=", 19))
         n = find (arg == "=");
-        if (! isempty (n) && n == numel (arg) - 1 && ismember (arg(end), "124"))
+        if (! isempty (n) && n == numel (arg) - 1 && any (arg(end) == "124"))
           arg_st.ghostscript.antialiasing_graphicsalphabits = str2num (arg(end));
         else
           error ("print: improper syntax, or value, for GraphicsAlphaBits");