Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
17404:5e552cd9315a | 17405:3f0ed69d21c6 |
---|---|
88 arg_st.use_color = -1; | 88 arg_st.use_color = -1; |
89 elseif (strcmp (arg, "-solid")) | 89 elseif (strcmp (arg, "-solid")) |
90 arg_st.force_solid = 1; | 90 arg_st.force_solid = 1; |
91 elseif (strcmp (arg, "-dashed")) | 91 elseif (strcmp (arg, "-dashed")) |
92 arg_st.force_solid = -1; | 92 arg_st.force_solid = -1; |
93 elseif (strncmp (arg, "-portrait", numel (arg))) | 93 elseif (strncmp (arg, "-portrait", length (arg))) |
94 arg_st.orientation = "portrait"; | 94 arg_st.orientation = "portrait"; |
95 elseif (strncmp (arg, "-landscape", numel (arg))) | 95 elseif (strncmp (arg, "-landscape", length (arg))) |
96 arg_st.orientation = "landscape"; | 96 arg_st.orientation = "landscape"; |
97 elseif (strcmp (arg, "-loose")) | 97 elseif (strcmp (arg, "-loose")) |
98 arg_st.loose = true; | 98 arg_st.loose = true; |
99 arg_st.tight_flag = false; | 99 arg_st.tight_flag = false; |
100 elseif (strcmp (arg, "-tight")) | 100 elseif (strcmp (arg, "-tight")) |
120 arg_st.fig2dev_binary = arg{10:end}; | 120 arg_st.fig2dev_binary = arg{10:end}; |
121 elseif (strncmp (arg, "-PSTOEDIT:", 9)) | 121 elseif (strncmp (arg, "-PSTOEDIT:", 9)) |
122 arg_st.pstoedit_binary = arg{10:end}; | 122 arg_st.pstoedit_binary = arg{10:end}; |
123 elseif (strncmpi (arg, "-textalphabits=", 15)) | 123 elseif (strncmpi (arg, "-textalphabits=", 15)) |
124 n = find (arg == "="); | 124 n = find (arg == "="); |
125 if (! isempty (n) && n == numel (arg) - 1 && ismember (arg(end), "124")) | 125 if (! isempty (n) && n == numel (arg) - 1 && any (arg(end) == "124")) |
126 arg_st.ghostscript.antialiasing_textalphabits = str2num (arg(end)); | 126 arg_st.ghostscript.antialiasing_textalphabits = str2num (arg(end)); |
127 else | 127 else |
128 error ("print: improper syntax, or value, for TextAlphaBits"); | 128 error ("print: improper syntax, or value, for TextAlphaBits"); |
129 endif | 129 endif |
130 elseif (strncmpi (arg, "-graphicsalphabits=", 19)) | 130 elseif (strncmpi (arg, "-graphicsalphabits=", 19)) |
131 n = find (arg == "="); | 131 n = find (arg == "="); |
132 if (! isempty (n) && n == numel (arg) - 1 && ismember (arg(end), "124")) | 132 if (! isempty (n) && n == numel (arg) - 1 && any (arg(end) == "124")) |
133 arg_st.ghostscript.antialiasing_graphicsalphabits = str2num (arg(end)); | 133 arg_st.ghostscript.antialiasing_graphicsalphabits = str2num (arg(end)); |
134 else | 134 else |
135 error ("print: improper syntax, or value, for GraphicsAlphaBits"); | 135 error ("print: improper syntax, or value, for GraphicsAlphaBits"); |
136 endif | 136 endif |
137 elseif ((length (arg) > 2) && arg(1:2) == "-G") | 137 elseif ((length (arg) > 2) && arg(1:2) == "-G") |