This is a static copy of a profile reportHome
graphics/private/inputcheck>LocalCheckDevice (40 calls, 0.000 sec)
Generated 05-Aug-2011 13:03:33 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/private/inputcheck.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
298 | end | 40 | 0 s | 0% |  |
267 | pj.Driver = cur_arg(3:end); | 40 | 0 s | 0% |  |
266 | if length(devIndex) == 1 | 40 | 0 s | 0% |  |
265 | devIndex = find(strcmp( cur_ar... | 40 | 0 s | 0% |  |
262 | if ( size(cur_arg, 2) > 2 ) | 40 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
272 | STRMATCH will be removed in a future release. Use STRNCMP instead. |
288 | STRMATCH will be removed in a future release. Use STRNCMP instead. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 43 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 26 |
Code lines that did run | 5 |
Code lines that did not run | 21 |
Coverage (did run/can run) | 19.23 % |
Function listing
time calls line
256 function [ pj, devIndex ] = LocalCheckDevice( pj, cur_arg, devices )
257 %LocalCheckDevice Verify device given is supported, and only one is given.
258 % device proper starts after '-d', if only '-d'
259 % we will later echo out possible choices
260
261 %We already know first two characters are '-d'
40 262 if ( size(cur_arg, 2) > 2 )
263
264 %Is there one unique match?
40 265 devIndex = find(strcmp( cur_arg(3:end), devices));
40 266 if length(devIndex) == 1
40 267 pj.Driver = cur_arg(3:end);
268
269 else
270 %Is there one partial match, i.e. -dtiffn[ocompression]
271 %todo how to do partial matches with strcmp?
272 devIndex = strmatch( cur_arg(3:end), devices );
273 if length( devIndex ) == 1
274 %Save the full name
275 pj.Driver = devices{devIndex};
276
277 elseif length( devIndex ) > 1
278 error( 'MATLAB:Print:deviceOpt', 'Device option ''%s''is not unique',cur_arg )
279
280 else
281 % A special case, -djpegnn, where nn == quality level
282 if strncmp( cur_arg, '-djpeg', 6 )
283 if isempty( str2num(cur_arg(7:end)) ) %#ok
284 error( 'MATLAB:Print:jpegQlvl', 'JPEG quality level in device name must be numeric.' );
285 end
286 %We want to keep quality level in device name.
287 pj.Driver = cur_arg(3:end);
288 devIndex = strmatch('jpeg',devices);
289 else
290 error('MATLAB:Print:illegalDeviceOpt', 'Illegal device option, ''%s'', specified.',cur_arg);
291 end
292 end
293 end
294 else
295 devIndex = 0;
296 end
297 %EOFunction LocalCheckDevice
40 298 end
Other subfunctions in this file are not included in this listing.