Mercurial > hg > octave-jordi
changeset 9891:1506a17832c9
doc building fixes for class methods
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 30 Nov 2009 14:32:10 -0500 |
parents | 483c4b09b788 |
children | ac69e6f4b33d |
files | doc/ChangeLog doc/interpreter/mk_doc_cache.m doc/interpreter/munge-texi.cc doc/interpreter/system.txi scripts/ChangeLog scripts/mkdoc |
diffstat | 6 files changed, 31 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,12 @@ +2009-11-30 John W. Eaton <jwe@octave.org> + + * interpreter/munge-texi.cc (process_texi_input_file): Double @ in + symbol_name used in @anchor. + (extract_docstring): Double @ in function name used in @ref. + + * interpreter/mk_doc_cache.m (cmd): Transform @ in class names to + @@ when processing DOCSTRINGS files. + 2009-11-30 John W. Eaton <jwe@octave.org> * interpreter/Makefile.a (nodist_octave_TEXINFOS): Add
--- a/doc/interpreter/mk_doc_cache.m +++ b/doc/interpreter/mk_doc_cache.m @@ -59,6 +59,7 @@ text = regexprep (text, "@seealso *{([^}]*)}", "See also: $1."); text = regexprep (text, "-\\*- texinfo -\\*-[ \t]*[\r\n]*", ""); +text = regexprep (text, "@", "@@"); [fid, name, msg] = mkstemp ("octave_doc_XXXXXX", true);
--- a/doc/interpreter/munge-texi.cc +++ b/doc/interpreter/munge-texi.cc @@ -127,6 +127,9 @@ else doc += ", "; + if (function_name[0] == '@') + function_name = "@" + function_name; + doc += "@ref{doc-" + function_name + ",," + function_name + "}"; @@ -276,6 +279,9 @@ // possible using @anchor{TAG} (new with // Texinfo 4.0). + if (symbol_name[0] == '@') + symbol_name = "@" + symbol_name; + os << "@anchor{doc-" << symbol_name << "}\n"; os << doc_string.substr (j);
--- a/doc/interpreter/system.txi +++ b/doc/interpreter/system.txi @@ -252,15 +252,15 @@ @node FTP objects @subsection FTP objects -@DOCSTRING(ftp) +@DOCSTRING(@ftp/ftp) -@DOCSTRING(mget) +@DOCSTRING(@ftp/mget) -@DOCSTRING(mput) +@DOCSTRING(@ftp/mput) -@DOCSTRING(ascii) +@DOCSTRING(@ftp/ascii) -@DOCSTRING(binary) +@DOCSTRING(@ftp/binary) @node URL manipulation @subsection URL manipulation
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-11-30 John W. Eaton <jwe@octave.org> + + * mkdoc: Handle classes in function names. + 2009-11-27 David Bateman <dbateman@free.fr> * @ftp/ascii.m, @ftp/binary.m, @ftp/cd.m, @ftp/close.m,
--- a/scripts/mkdoc +++ b/scripts/mkdoc @@ -44,8 +44,12 @@ else echo "$prefix$arg" | $PERL -n -e 'chop; $f = "$_"; - next unless m{(.*)/(.*)\.m}; - for (qx{./gethelp $2 "$f" < "$f"}) { + next unless m{(.*)/(@|)([^/]*)/(.*)\.m}; + $fcn = "$4"; + if ($2) { + $fcn = "$2$3/$fcn"; + } + for (qx{./gethelp $fcn "$f" < "$f"}) { s/^\s+\@/\@/ unless $i_am_in_example; s/^\s+\@group/\@group/; s/^\s+\@end\s+group/\@end\s+group/;