Mercurial > hg > 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 +++ b/doc/interpreter/mk_doc_cache.m @@ -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 +++ b/doc/interpreter/munge-texi.pl @@ -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 +++ b/libinterp/corefcn/help.cc @@ -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);