comparison scripts/image/private/imwrite_filename.m @ 19865:e9f89866074c

maint: Cleanup some .m files to follow Octave coding conventions. * accumarray.m, validateattributes.m, iscolormap.m, __imread__.m, __imwrite__.m, imwrite_filename.m, strread.m, getappdata.m, appearance/annotation.m, shrinkfaces.m, rundemos.m, runtests.m, datenum.m, datestr.m: Break long lines before && and ||.
author John W. Eaton <jwe@octave.org>
date Thu, 26 Feb 2015 13:13:40 -0500
parents 9fc020886ae9
children
comparison
equal deleted inserted replaced
19864:17d647821d61 19865:e9f89866074c
46 ## Next, we get the file extension. 46 ## Next, we get the file extension.
47 ## if we have an odd number of leftover arguments, and the next argument 47 ## if we have an odd number of leftover arguments, and the next argument
48 ## is a string, we consider it the file extension. Otherwise we will 48 ## is a string, we consider it the file extension. Otherwise we will
49 ## extract what we can from the previously found filename. 49 ## extract what we can from the previously found filename.
50 options_idx = filename_idx + 1; 50 options_idx = filename_idx + 1;
51 if (numel (varargin) > filename_idx && 51 if (numel (varargin) > filename_idx
52 rem (length (varargin) - filename_idx, 2) != 0 && 52 && rem (length (varargin) - filename_idx, 2) != 0
53 ischar (varargin{filename_idx + 1})) 53 && ischar (varargin{filename_idx + 1}))
54 ext = varargin{filename_idx + 1}; 54 ext = varargin{filename_idx + 1};
55 options_idx++; 55 options_idx++;
56 else 56 else
57 [~, ~, ext] = fileparts (filename); 57 [~, ~, ext] = fileparts (filename);
58 if (! isempty (ext)) 58 if (! isempty (ext))