Mercurial > octave-nkf
changeset 17242:3f4091dddc13
doc: Update doc cache delimiter to work with Texinfo 5.0 (bug #39778)
* doc/interpreter/mk_doc_cache.m: Change doc delimiter to ASCII 30
(record separator) because Texinfo 5.0 uses ASCII 31 (unit separator).
Use hexadecimal representation for consistency with other scripts.
* libinterp/corefcn/help.cc (install_built_in_docstrings): Change doc
delimiter to ASCII 30 (record separator).
* doc/interpreter/munge-texi.pl, libinterp/gendoc.pl, scripts/mkdoc.pl:
Change doc delimiter to ASCII 30 (record separator). Use hexadecimal escape
sequence for consistency and to avoid using literal control characters.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Tue, 13 Aug 2013 23:42:30 -0400 |
parents | 03a666018e0f |
children | f4c8c66faf34 |
files | doc/interpreter/mk_doc_cache.m doc/interpreter/munge-texi.pl libinterp/corefcn/help.cc libinterp/gendoc.pl scripts/mkdoc.pl |
diffstat | 5 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/mk_doc_cache.m Tue Aug 13 21:38:12 2013 -0400 +++ b/doc/interpreter/mk_doc_cache.m Tue Aug 13 23:42:30 2013 -0400 @@ -24,7 +24,7 @@ docstrings_files = args(2:end); ## Special character used as break between DOCSTRINGS -doc_delim = char (31); +doc_delim = char (0x1e); ## Read the contents of all the DOCSTRINGS files into TEXT. ## It is more efficient to fork to shell for makeinfo only once on large data @@ -52,7 +52,7 @@ ## Strip Texinfo markers and docstring separators. text = regexprep (text, "-\\*- texinfo -\\*-[ \t]*[\r\n]*", ""); -text = strrep (text, '@', "@@"); +text = strrep (text, [doc_delim "@"], [doc_delim "@@"]); ## Write data to temporary file for input to makeinfo [fid, name, msg] = mkstemp ("octave_doc_XXXXXX", true);
--- a/doc/interpreter/munge-texi.pl Tue Aug 13 21:38:12 2013 -0400 +++ b/doc/interpreter/munge-texi.pl Tue Aug 13 23:42:30 2013 -0400 @@ -6,7 +6,7 @@ $top_srcdir = shift (@ARGV); # Constant patterns -$doc_delim = qr/^\c_/; +$doc_delim = qr/^\x{1e}/; $tex_delim = qr/\Q-*- texinfo -*-\E/; $comment_line = qr/^\s*(?:$|#)/; # Pre-declare hash size for efficiency
--- a/libinterp/corefcn/help.cc Tue Aug 13 21:38:12 2013 -0400 +++ b/libinterp/corefcn/help.cc Tue Aug 13 23:42:30 2013 -0400 @@ -967,7 +967,7 @@ if (file) { // Ignore header; - file.ignore (1000, 0x1f); + file.ignore (1000, 0x1e); if (file.gcount () == 1000) { @@ -988,7 +988,7 @@ while (! file.eof ()) { - file.getline (buf, bufsize, 0x1f); + file.getline (buf, bufsize, 0x1e); std::string tmp (buf);
--- a/libinterp/gendoc.pl Tue Aug 13 21:38:12 2013 -0400 +++ b/libinterp/gendoc.pl Tue Aug 13 23:42:30 2013 -0400 @@ -64,7 +64,7 @@ foreach $i (0 .. $#func_list) { $func = $func_list[$i]; - print "$func\n"; + print "\x{1e}$func\n"; print "\@c $func $src_fname\n"; print $docstr[$i],"\n"; }
--- a/scripts/mkdoc.pl Tue Aug 13 21:38:12 2013 -0400 +++ b/scripts/mkdoc.pl Tue Aug 13 23:42:30 2013 -0400 @@ -52,7 +52,7 @@ @help_txt = gethelp ($fcn, $full_fname); next MFILE if ($help_txt[0] eq ""); - print "$fcn\n"; + print "\x{1e}$fcn\n"; print "\@c $fcn scripts/$m_fname\n"; foreach $_ (@help_txt)