I've noticed that Texinfo has not been updated very much at all as far as the tarballs go. Well, there are quite a few issues so far, the most annoying one is that info just shows a blank screen for the file list, which you really can't do anything with. Well, I have compiled a list of fixes, mostly from Fedora, that fix some issues with Texinfo, including the blank info screen problem I mentioned eariler. The patch is attached, please give me feedback on it.
-- William Immendorf The ultimate in free computing. Messages in plain text, please, no HTML. GPG key ID: 1697BE98 If it's not signed, it's not from me. -------------- "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman
Submitted By: William Immendorf <will.immend...@gmail.com> Date: May 1, 2011 Initial Package Version: 4.13a Upstream Status: (Mostly) Applied Origin: Fedora, with the XZ support added from Gentoo. Description: Various fixes, including those for: * info: Blank info screen when showing info catalog * install-info: Memory allocation bug with old style "--section 'Foo'" arguments * info: Segfault when using index in the help window * texi2dvi: Issue with newer versions of grep * makeinfo: Issue with the get_sectioning_number function Also includes support for XZ-compressed info files. diff -Naur texinfo-4.13.orig/doc/info-stnd.texi texinfo-4.13/doc/info-stnd.texi --- texinfo-4.13.orig/doc/info-stnd.texi 2008-09-18 18:31:56.000000000 +0000 +++ texinfo-4.13/doc/info-stnd.texi 2011-05-01 21:50:01.815014001 +0000 @@ -195,21 +195,21 @@ @cindex Info files, compressed In every directory Info tries, if @var{filename} is not found, Info looks for it with a number of known extensions of Info files@footnote{ -@file{.info}, @file{-info}, @file{/index}, and @file{.inf}.}. For every -known extension, Info looks for a compressed file, if a regular file -isn't found. Info supports files compressed with @code{gzip}, -@code{bzip2}, @code{compress} and @code{yabba} programs; it calls -@code{gunzip}, @code{bunzip2}, @code{uncompress} and @code{unyabba}, -accordingly, to decompress such files. Compressed Info files are -assumed to have @file{.z}, @file{.gz}, @file{.bz2}, @file{.Z}, or -@file{.Y} extensions, possibly in addition to one of the known Info -files extensions@footnote{The MS-DOS version allows for the Info -extension, such as @code{.inf}, and the short compressed file -extensions, such as @file{.z} and @file{.gz}, to be merged into a single -extension, since DOS doesn't allow more than a single dot in the -basename of a file. Thus, on MS-DOS, if Info looks for @file{bison}, -file names like @file{bison.igz} and @file{bison.inz} will be found and -decompressed by @code{gunzip}.}. +@file{.info}, @file{-info}, @file{/index}, and @file{.inf}.}. For +every known extension, Info looks for a compressed file, if a regular +file isn't found. Info supports files compressed with @code{gzip}, +@code{xz}, @code{bzip2}, @code{lzma}, @code{compress} and @code{yabba} +programs, assumed to have @file{.z}, @file{.gz}, @file{.xz}, +@file{.bz2}, @file{.lzma}, @file{.Z}, or @file{.Y} extensions, +possibly after one of the known Info files extensions. + +On MS-DOS, Info allows for the Info extension, such as @code{.inf}, +and the short compressed file extensions, such as @file{.z} and +@file{.gz}, to be merged into a single extension, since DOS doesn't +allow more than a single dot in the basename of a file. Thus, on +MS-DOS, if Info looks for @file{bison}, file names like +@file{bison.igz} and @file{bison.inz} will be found and decompressed +by @code{gunzip}. @item --help @itemx -h diff -Naur texinfo-4.13.orig/info/filesys.c texinfo-4.13/info/filesys.c --- texinfo-4.13.orig/info/filesys.c 2008-06-12 12:39:20.000000000 +0000 +++ texinfo-4.13/info/filesys.c 2011-05-01 21:50:01.815014001 +0000 @@ -54,6 +54,7 @@ static COMPRESSION_ALIST compress_suffixes[] = { { ".gz", "gunzip" }, + { ".xz", "unxz" }, { ".bz2", "bunzip2" }, { ".lzma", "unlzma" }, { ".z", "gunzip" }, diff -Naur texinfo-4.13.orig/info/indices.c texinfo-4.13/info/indices.c --- texinfo-4.13.orig/info/indices.c 2008-06-12 12:39:20.000000000 +0000 +++ texinfo-4.13/info/indices.c 2011-05-01 21:49:40.521014001 +0000 @@ -192,6 +192,7 @@ index for, build and remember an index now. */ fb = file_buffer_of_window (window); if (!initial_index_filename || + !fb || (FILENAME_CMP (initial_index_filename, fb->filename) != 0)) { info_free_references (index_index); @@ -287,8 +288,9 @@ return 0; fb = file_buffer_of_window (window); - if (!initial_index_filename - || (FILENAME_CMP (initial_index_filename, fb->filename) != 0)) + if (!initial_index_filename || + !fb || + (FILENAME_CMP (initial_index_filename, fb->filename) != 0)) { info_free_references (index_index); index_index = info_indices_of_file_buffer (fb); diff -Naur texinfo-4.13.orig/info/window.c texinfo-4.13/info/window.c --- texinfo-4.13.orig/info/window.c 2008-09-18 18:31:59.000000000 +0000 +++ texinfo-4.13/info/window.c 2011-05-01 21:49:09.437014002 +0000 @@ -1581,7 +1581,7 @@ const char *carried_over_ptr; size_t carried_over_len, carried_over_count; const char *cur_ptr = mbi_cur_ptr (iter); - int cur_len = mb_len (mbi_cur (iter)); + size_t cur_len = mb_len (mbi_cur (iter)); int replen; int delim = 0; int rc; @@ -1754,7 +1754,7 @@ mbi_advance (iter)) { const char *cur_ptr = mbi_cur_ptr (iter); - int cur_len = mb_len (mbi_cur (iter)); + size_t cur_len = mb_len (mbi_cur (iter)); if (cur_len == 1) { @@ -1852,8 +1852,8 @@ mbi_advance (iter)) { const char *cur_ptr = mbi_cur_ptr (iter); - int cur_len = mb_len (mbi_cur (iter)); - int replen; + size_t cur_len = mb_len (mbi_cur (iter)); + size_t replen; if (cur_ptr >= endp) break; diff -Naur texinfo-4.13.orig/install-info/install-info.c texinfo-4.13/install-info/install-info.c --- texinfo-4.13.orig/install-info/install-info.c 2008-05-22 12:11:33.000000000 +0000 +++ texinfo-4.13/install-info/install-info.c 2011-05-01 21:50:01.816014001 +0000 @@ -400,6 +400,11 @@ len -= 3; ret[len] = 0; } + else if (len > 3 && FILENAME_CMP (ret + len - 3, ".xz") == 0) + { + len -= 3; + ret[len] = 0; + } else if (len > 4 && FILENAME_CMP (ret + len - 4, ".bz2") == 0) { len -= 4; @@ -659,6 +664,12 @@ { *opened_filename = concat (filename, ".gz", ""); f = fopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + *opened_filename = concat (filename, ".xz", ""); + f = fopen (*opened_filename, FOPEN_RBIN); + } if (!f) { free (*opened_filename); @@ -702,7 +713,6 @@ else pfatal_with_name (filename); } - } /* Read first few bytes of file rather than relying on the filename. If the file is shorter than this it can't be usable anyway. */ @@ -727,6 +737,15 @@ #else *compression_program = "gzip"; #endif + + else if (data[0] == '\xFD' && data[1] == '7' && data[2] == 'z' + && data[3] == 'X' && data[4] == 'Z' && data[5] == 0) +#ifndef STRIP_DOT_EXE + *compression_program = "xz.exe"; +#else + *compression_program = "xz"; +#endif + else if (data[0] == 'B' && data[1] == 'Z' && data[2] == 'h') #ifndef STRIP_DOT_EXE *compression_program = "bzip2.exe"; @@ -1757,7 +1776,7 @@ err = argz_add (&argz, &argz_len, opt); free (opt); opt = NULL; - opt = xmalloc (strlen (regex) + sizeof ("--section=")); + opt = xmalloc (strlen (title) + sizeof ("--section=")); if (sprintf (opt, "--section=%s", title) == -1) err = 1; if (!err) diff -Naur texinfo-4.13.orig/makeinfo/sectioning.c texinfo-4.13/makeinfo/sectioning.c --- texinfo-4.13.orig/makeinfo/sectioning.c 2007-07-01 21:20:33.000000000 +0000 +++ texinfo-4.13/makeinfo/sectioning.c 2011-05-01 21:49:55.407014002 +0000 @@ -256,14 +256,14 @@ return xstrdup (""); else if (enum_marker == APPENDIX_MAGIC) { - char s[1]; + char s[2]; sprintf (s, "%c", numbers[0] + 64); return xstrdup (s); } else { char s[5]; - sprintf (s, "%d", numbers[0]); + sprintf (s, "%4d", numbers[0]); return xstrdup (s); } } diff -Naur texinfo-4.13.orig/util/texi2dvi texinfo-4.13/util/texi2dvi --- texinfo-4.13.orig/util/texi2dvi 2008-09-18 18:46:01.000000000 +0000 +++ texinfo-4.13/util/texi2dvi 2011-05-01 21:49:48.496014019 +0000 @@ -1683,7 +1683,7 @@ # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex), # prepend `./' in order to avoid that the tools take it as an option. - echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >&6 \ + echo "$command_line_filename" | $EGREP '^(/|[A-Za-z]:/)' >&6 \ || command_line_filename="./$command_line_filename" # See if the file exists. If it doesn't we're in trouble since, even
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page