Mercurial > octave-nkf
comparison scripts/plot/print.m @ 8239:041bb0c64f07
orient.m,print.f: validate figure handle
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Mon, 20 Oct 2008 10:29:04 -0400 |
parents | e36e891f2349 |
children | 399af34bb4bf |
comparison
equal
deleted
inserted
replaced
8238:6ef647359f07 | 8239:041bb0c64f07 |
---|---|
188 elseif (length (arg) >= 1 && arg(1) == "-") | 188 elseif (length (arg) >= 1 && arg(1) == "-") |
189 error ("print: unknown option `%s'", arg); | 189 error ("print: unknown option `%s'", arg); |
190 elseif (length (arg) > 0) | 190 elseif (length (arg) > 0) |
191 name = arg; | 191 name = arg; |
192 endif | 192 endif |
193 elseif (ishandle (arg)) | 193 elseif (isfigure (arg)) |
194 figure (arg); | 194 figure (arg); |
195 else | 195 else |
196 error ("print: expecting inputs to be character string options or a figure handle"); | 196 error ("print: expecting inputs to be character string options or a figure handle"); |
197 endif | 197 endif |
198 endfor | 198 endfor |
437 system (sprintf ("lpr %s '%s'", printer, printname)); | 437 system (sprintf ("lpr %s '%s'", printer, printname)); |
438 unlink (printname); | 438 unlink (printname); |
439 endif | 439 endif |
440 | 440 |
441 unwind_protect_cleanup | 441 unwind_protect_cleanup |
442 if (ishandle (old_fig)) | 442 if (isfigure (old_fig)) |
443 figure (old_fig) | 443 figure (old_fig) |
444 endif | 444 endif |
445 end_unwind_protect | 445 end_unwind_protect |
446 | 446 |
447 endfunction | 447 endfunction |