diff scripts/plot/private/__pie__.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 1c89599167a6
children
line wrap: on
line diff
--- a/scripts/plot/private/__pie__.m	Tue Sep 10 16:31:34 2013 -0700
+++ b/scripts/plot/private/__pie__.m	Tue Sep 10 18:31:39 2013 -0700
@@ -114,7 +114,7 @@
       set (h, "clim", [1, len]);
     endif
 
-    if (strncmp (caller, "pie3", 4))
+    if (strcmp (caller, "pie3"))
       ln = length (xn);
       zlvl = 0.35;
       sx = repmat (xoff + [0, -sind(xn), 0], [2, 1]);
@@ -128,7 +128,7 @@
         patch(xoff + [0, -sind(xn)], yoff + [0, cosd(xn)], zlvl * ones (1, ln + 1), i);
         text(xt, yt, zlvl, labels{i})];
 
-    elseif (strncmp (caller, "pie", 3))
+    elseif (strcmp (caller, "pie"))
       if (xt > 0)
         align = "left";
       else
@@ -145,10 +145,10 @@
 
   addlistener (gca, "view", {@update_text_pos, hlist});
 
-  if (strncmp (caller, "pie3", 4))
+  if (strcmp (caller, "pie3"))
     axis ([-1.25, 1.25, -1.25, 1.25, -0.05, 0.4], "equal", "off");
     view (-37.5, 30);
-  elseif (strncmp (caller, "pie", 3))
+  elseif (strcmp (caller, "pie"))
     axis ([-1.5, 1.5, -1.5, 1.5], "square", "off");
   endif
 endfunction