[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-octave-devel] Bug#790626: Octave FTBFS With Texinfo 6



On Mon, Jul 06, 2015 at 20:19:32 -0400, Scott Kitterman wrote:
> On July 6, 2015 8:08:31 PM EDT, Norbert Preining <preining@logic.at> wrote:
> >On Mon, 06 Jul 2015, Scott Kitterman wrote:
> >> Thanks.  Would you be able to look at octave 3.8.2 in unstable as
> >well?  The 
> >> code you fixed in escape-backslash-for-texinfo-in-source isn't in
> >3.8.2, but it 
> >> appears to have similar problems elsewhere.
> >
> >Have you tried fixing the Makefile.am fragment as in the debdiff
> >I sent you? The outdated texinfo.tex is the problem.
> >
> >I am trying a build now with the Makefile.am in doc/interp fixed up.
> 
> I did try that and it changed the error, but it seems there's something else as well.

Much thanks Norbert for investigating and finding the necessary changes.
I've confirmed that these changes are necessary for building upstream
source also. I'll take care of making sure these are addressed upstream.

JFTR, Octave ships texmf.cnf because some older supported distros still
have ‘save_size = 5000’ which has caused errors for some users.

I've updated your patch to use upstream's @xbackslash{} macro instead as
used elsewhere in the documentation for this very purpose, attached.

Also attached is a patch appropriate for 3.8.2 to fix the same class of
markup, adapted from an upstream changeset already part of 4.0 [1].
Tested on 3.8.2 upstream source, not yet tested in a Debian build.

[1] http://hg.savannah.gnu.org/hgweb/octave/rev/e51473fdb622

-- 
mike
diff --git a/doc/interpreter/func.txi b/doc/interpreter/func.txi
--- a/doc/interpreter/func.txi
+++ b/doc/interpreter/func.txi
@@ -114,8 +114,8 @@
 @end example
 
 The @code{printf} statement (@pxref{Input and Output}) simply tells
-Octave to print the string @qcode{"\a"}.  The special character @samp{\a}
-stands for the alert character (ASCII 7).  @xref{Strings}.
+Octave to print the string @qcode{"@xbackslashchar{}a"}.  The special character
+@samp{\a} stands for the alert character (ASCII 7).  @xref{Strings}.
 
 Once this function is defined, you can ask Octave to evaluate it by
 typing the name of the function.
diff --git a/libinterp/corefcn/error.cc b/libinterp/corefcn/error.cc
--- a/libinterp/corefcn/error.cc
+++ b/libinterp/corefcn/error.cc
@@ -1093,11 +1093,12 @@
 which will only stop execution if an error has been found.\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape\n\
-sequences (e.g., @qcode{\"\\n\"} => newline) are processed in @var{template}\n\
-regardless of whether @var{template} has been defined within single quotes\n\
-as long as there are two or more input arguments.\n\
+sequences (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are processed in\n\
+@var{template} regardless of whether @var{template} has been defined within\n\
+single quotes as long as there are two or more input arguments.\n\
 Use a second backslash to stop interpolation of the escape sequence (e.g.,\n\
-\"\\\\n\") or use the @code{regexptranslate} function.\n\
+\"@xbackslashchar{}@xbackslashchar{}n\") or use the @code{regexptranslate}\n\
+function.\n\
 @seealso{warning, lasterror}\n\
 @end deftypefn")
 {
@@ -1265,11 +1266,12 @@
 workspace.\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape\n\
-sequences (e.g., @qcode{\"\\n\"} => newline) are processed in @var{template}\n\
-regardless of whether @var{template} has been defined within single quotes\n\
-as long as there are two or more input arguments.\n\
+sequences (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are processed in\n\
+@var{template} regardless of whether @var{template} has been defined within\n\
+single quotes as long as there are two or more input arguments.\n\
 Use a second backslash to stop interpolation of the escape sequence (e.g.,\n\
-\"\\\\n\") or use the @code{regexptranslate} function.\n\
+\"@xbackslashchar{}@xbackslashchar{}n\") or use the @code{regexptranslate}\n\
+function.\n\
 @seealso{warning_ids, lastwarn, error}\n\
 @end deftypefn")
 {
diff --git a/libinterp/corefcn/regexp.cc b/libinterp/corefcn/regexp.cc
--- a/libinterp/corefcn/regexp.cc
+++ b/libinterp/corefcn/regexp.cc
@@ -677,10 +677,11 @@
 @end table\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, ordinary escape\n\
-sequences (e.g., @qcode{\"\\n\"} => newline) are processed in @var{pat}\n\
-regardless of whether @var{pat} has been defined within single quotes.  Use\n\
-a second backslash to stop interpolation of the escape sequence (e.g.,\n\
-\"\\\\n\") or use the @code{regexptranslate} function.\n\
+sequences (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are processed in\n\
+@var{pat} regardless of whether @var{pat} has been defined within single\n\
+quotes.  Use a second backslash to stop interpolation of the escape sequence\n\
+(e.g., \"@xbackslashchar{}@xbackslashchar{}n\") or use the\n\
+@code{regexptranslate} function.\n\
 \n\
 The outputs of @code{regexp} default to the order given below\n\
 \n\
@@ -1309,10 +1310,11 @@
 @end table\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, ordinary escape\n\
-sequences (e.g., @qcode{\"\\n\"} => newline) are processed in both @var{pat}\n\
-and @var{repstr} regardless of whether they were defined within single\n\
-quotes.  Use a second backslash to stop interpolation of the escape sequence\n\
-(e.g., \"\\\\n\") or use the @code{regexptranslate} function.\n\
+sequences (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are processed in\n\
+both @var{pat} and @var{repstr} regardless of whether they were defined\n\
+within single quotes.  Use a second backslash to stop interpolation of the\n\
+escape sequence (e.g., \"@xbackslashchar{}@xbackslashchar{}n\") or use the\n\
+@code{regexptranslate} function.\n\
 @seealso{regexp, regexpi, strrep}\n\
 @end deftypefn")
 {
diff --git a/libinterp/corefcn/variables.cc b/libinterp/corefcn/variables.cc
--- a/libinterp/corefcn/variables.cc
+++ b/libinterp/corefcn/variables.cc
@@ -2543,8 +2543,9 @@
 leftmost column.  @code{left-min} specifies the minimum field width to the\n\
 left of the specified balance column.\n\
 \n\
-The default format is\n\
-@qcode{\"  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;\\n\"}.\n\
+The default format is:\n\
+\n\
+@qcode{\"  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;@xbackslashchar{}n\"}\n\
 \n\
 When called from inside a function with the @qcode{\"local\"} option, the\n\
 variable is changed locally for the function and any subroutines it calls.  \n\
diff --git a/scripts/gui/msgbox.m b/scripts/gui/msgbox.m
--- a/scripts/gui/msgbox.m
+++ b/scripts/gui/msgbox.m
@@ -23,7 +23,7 @@
 ## Display @var{msg} using a message dialog box. 
 ##
 ## The message may have multiple lines separated by newline characters
-## (@qcode{"\n"}), or it may be a cellstr array with one element for each
+## (@qcode{"@xbackslashchar{}n"}), or it may be a cellstr array with one element for each
 ## line.  The optional input @var{title} (character string) can be used to
 ## decorate the dialog caption.
 ##
diff --git a/scripts/io/dlmwrite.m b/scripts/io/dlmwrite.m
--- a/scripts/io/dlmwrite.m
+++ b/scripts/io/dlmwrite.m
@@ -50,9 +50,11 @@
 ##
 ## @item @qcode{"newline"}
 ## The character(s) to use to separate each row.  Three special cases
-## exist for this option.  @qcode{"unix"} is changed into @qcode{"\n"},
-## @qcode{"pc"} is changed into @qcode{"\r\n"}, and @qcode{"mac"} is changed
-## into @qcode{"\r"}.  Other values for this option are kept as is.
+## exist for this option.  @qcode{"unix"} is changed into
+## @qcode{"@xbackslashchar{}n"}, @qcode{"pc"} is changed into
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"}, and @qcode{"mac"} is changed
+## into @qcode{"@xbackslashchar{}r"}.  Any other value is used directly as the
+## newline separator.
 ##
 ## @item @qcode{"roffset"}
 ## See @var{r} above.
@@ -70,7 +72,7 @@
 ## @end example
 ##
 ## @example
-## dlmwrite ("file.tex", a, "delimiter", "&", "newline", "\\n")
+## dlmwrite ("file.tex", a, "delimiter", "&", "newline", "\n")
 ## @end example
 ##
 ## @seealso{dlmread, csvread, csvwrite}
diff --git a/scripts/io/strread.m b/scripts/io/strread.m
--- a/scripts/io/strread.m
+++ b/scripts/io/strread.m
@@ -147,8 +147,10 @@
 ## @item @qcode{"whitespace"}
 ## Any character in @var{value} will be interpreted as whitespace and
 ## trimmed; the string defining whitespace must be enclosed in double
-## quotes for proper processing of special characters like \t.
-## The default value for whitespace = @qcode{" \b\r\n\t"} (note the space).
+## quotes for proper processing of special characters like
+## @qcode{"@xbackslashchar{}t"}.  The default value for whitespace is
+## @qcode{" @xbackslashchar{}b@xbackslashchar{}r@xbackslashchar{}n@xbackslashchar{}t"}
+## (note the space).
 ## Unless whitespace is set to '' (empty) AND at least one @qcode{"%s"} format
 ## conversion specifier is supplied, a space is always part of whitespace.
 ##
@@ -159,11 +161,11 @@
 ## depends on the last character of @var{str}:
 ##
 ## @table @asis
-## @item last character = @qcode{"\n"}
+## @item last character = @qcode{"@xbackslashchar{}n"}
 ## Data columns are padded with empty fields or Nan so that all columns
 ## have equal length 
 ##
-## @item last character is not @qcode{"\n"}
+## @item last character is not @qcode{"@xbackslashchar{}n"}
 ## Data columns are not padded; strread returns columns of unequal length
 ##
 ## @end table
diff --git a/scripts/io/textread.m b/scripts/io/textread.m
--- a/scripts/io/textread.m
+++ b/scripts/io/textread.m
@@ -36,7 +36,8 @@
 ## The first @var{value} number of lines of @var{filename} are skipped.
 ##
 ## @item @qcode{"endofline"}:
-## Specify a single character or @qcode{"\r\n"}.  If no value is given, it
+## Specify a single character or
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"}.  If no value is given, it
 ## will be inferred from the file.  If set to "" (empty string) EOLs are
 ## ignored as delimiters.
 ## @end itemize
diff --git a/scripts/io/textscan.m b/scripts/io/textscan.m
--- a/scripts/io/textscan.m
+++ b/scripts/io/textscan.m
@@ -40,10 +40,10 @@
 ## leaves output in distinct columns.
 ##
 ## @item @qcode{"endofline"}:
-## Specify @qcode{"\r"}, @qcode{"\n"} or @qcode{"\r\n"} (for CR, LF, or
-## CRLF).  If no value is given, it will be inferred from the file.  If set
-## to "" (empty string) EOLs are ignored as delimiters and added to
-## whitespace.
+## Specify @qcode{"@xbackslashchar{}r"}, @qcode{"@xbackslashchar{}n"} or
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"} (for CR, LF, or CRLF).  If no
+## value is given, it will be inferred from the file.  If set to "" (empty
+## string) EOLs are ignored as delimiters and added to whitespace.
 ##
 ## @item @qcode{"headerlines"}:
 ## The first @var{value} number of lines of @var{fid} are skipped.
diff --git a/libinterp/corefcn/utils.cc b/libinterp/corefcn/utils.cc
--- a/libinterp/corefcn/utils.cc
+++ b/libinterp/corefcn/utils.cc
@@ -1438,7 +1438,7 @@ indexing using @var{ind} will not perfor
 \n\
 Implementation Note: Strings are first converted to double values before the\n\
 checks for valid indices are made.  Unless a string contains the NULL\n\
-character @nospell{\"\\0\"}, it will always be a valid index.\n\
+character @nospell{\"@xbackslashchar{}0\"}, it will always be a valid index.\n\
 @end deftypefn")
 {
   octave_value retval;
diff --git a/scripts/io/beep.m b/scripts/io/beep.m
--- a/scripts/io/beep.m
+++ b/scripts/io/beep.m
@@ -20,9 +20,9 @@
 ## @deftypefn {Function File} {} beep ()
 ## Produce a beep from the speaker (or visual bell).
 ##
-## This function sends the alarm character @qcode{"\a"} to the terminal.
-## Depending on the user's configuration this may produce an audible beep,
-## a visual bell, or nothing at all.
+## This function sends the alarm character @qcode{"@xbackslashchar{}a"} to the
+## terminal.  Depending on the user's configuration this may produce an
+## audible beep, a visual bell, or nothing at all.
 ## @seealso{puts, fputs, printf, fprintf}
 ## @end deftypefn
 

Reply to: