Mercurial > octave-nkf
comparison scripts/help/doc.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | f22bbc5d56e9 |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
10548:479536c5bb10 | 10549:95c3e38098bf |
---|---|
43 if (nargin == 1) | 43 if (nargin == 1) |
44 ## Get the directory where the function lives. | 44 ## Get the directory where the function lives. |
45 ## FIXME -- maybe we should have a better way of doing this. | 45 ## FIXME -- maybe we should have a better way of doing this. |
46 | 46 |
47 if (ischar (fname)) | 47 if (ischar (fname)) |
48 ftype = exist (fname); | 48 ftype = exist (fname); |
49 else | 49 else |
50 error ("doc: expecting argument to be a character string"); | 50 error ("doc: expecting argument to be a character string"); |
51 endif | 51 endif |
52 else | 52 else |
53 fname = ""; | 53 fname = ""; |
54 endif | 54 endif |
55 | 55 |
79 ## FIXME -- don't change the order of the arguments below because | 79 ## FIXME -- don't change the order of the arguments below because |
80 ## the info-emacs-info script currently expects --directory DIR as | 80 ## the info-emacs-info script currently expects --directory DIR as |
81 ## the third and fourth arguments. Someone should fix that. | 81 ## the third and fourth arguments. Someone should fix that. |
82 | 82 |
83 cmd = sprintf ("\"%s\" --file \"%s\" --directory \"%s\"", | 83 cmd = sprintf ("\"%s\" --file \"%s\" --directory \"%s\"", |
84 info_program (), info_file_name, info_dir); | 84 info_program (), info_file_name, info_dir); |
85 | 85 |
86 have_fname = ! isempty (fname); | 86 have_fname = ! isempty (fname); |
87 | 87 |
88 if (have_fname) | 88 if (have_fname) |
89 status = system (sprintf ("%s --index-search %s", cmd, fname)); | 89 status = system (sprintf ("%s --index-search %s", cmd, fname)); |
90 endif | 90 endif |
91 | 91 |
92 if (! (have_fname && status == 0)) | 92 if (! (have_fname && status == 0)) |
93 status = system (cmd); | 93 status = system (cmd); |
94 if (status == 127) | 94 if (status == 127) |
95 warning ("unable to find info program `%s'", info_program ()); | 95 warning ("unable to find info program `%s'", info_program ()); |
96 endif | 96 endif |
97 endif | 97 endif |
98 | 98 |
99 if (nargout > 0) | 99 if (nargout > 0) |
100 retval = status; | 100 retval = status; |