From 3d7408814941f9a050ecd804b2f99ba617b5768d Mon Sep 17 00:00:00 2001 From: Miloslav Trmac Date: Dec 04 2006 21:42:24 +0000 Subject: - Don't replace 0xA0 by a space in makeinfo Related: #208511 - Fix some rpmlint warnings --- diff --git a/texinfo-4.8-0xA0.patch b/texinfo-4.8-0xA0.patch new file mode 100644 index 0000000..ae23786 --- /dev/null +++ b/texinfo-4.8-0xA0.patch @@ -0,0 +1,71 @@ +--- texinfo-4.8/makeinfo/makeinfo.c.0xA0 2004-12-19 18:15:42.000000000 +0100 ++++ texinfo-4.8/makeinfo/makeinfo.c 2006-12-04 22:37:54.000000000 +0100 +@@ -2427,6 +2427,10 @@ + len = fill_column - output_column; + break; + ++ case NON_BREAKING_SPACE: ++ len = 1; ++ break; ++ + default: + /* ASCII control characters appear as two characters in the output + (e.g., ^A). But characters with the high bit set are just one +@@ -2584,7 +2588,7 @@ + character = ';'; + } + else +- character = META (' '); /* unmeta-d in flush_output */ ++ character = NON_BREAKING_SPACE; /* restored in flush_output */ + } + + insertion_paragraph_closed = 0; +@@ -2922,17 +2926,11 @@ + node_line_number++; + } + +- /* If we turned on the 8th bit for a space inside @w, turn it +- back off for output. This might be problematic, since the +- 0x80 character may be used in 8-bit character sets. Sigh. +- In any case, don't do this for HTML, since the nbsp character +- is valid input and must be passed along to the browser. */ +- if (!html && (output_paragraph[i] & meta_character_bit)) +- { +- int temp = UNMETA (output_paragraph[i]); +- if (temp == ' ') +- output_paragraph[i] &= 0x7f; +- } ++ /* If we turned on the 8th bit for a space inside @w, turn it back off ++ for output. Don't do this for HTML, since the nbsp character is valid ++ input and must be passed along to the browser. */ ++ if (!html && output_paragraph[i] == NON_BREAKING_SPACE) ++ output_paragraph[i] = ' '; + } + + fwrite (output_paragraph, 1, output_paragraph_offset, output_stream); +--- texinfo-4.8/makeinfo/makeinfo.h.0xA0 2004-11-30 03:03:23.000000000 +0100 ++++ texinfo-4.8/makeinfo/makeinfo.h 2006-12-04 22:35:06.000000000 +0100 +@@ -242,13 +242,6 @@ + #define coerce_to_upper(c) ((islower(c) ? toupper(c) : (c))) + #define coerce_to_lower(c) ((isupper(c) ? tolower(c) : (c))) + +-#define control_character_bit 0x40 /* %01000000, must be off. */ +-#define meta_character_bit 0x080/* %10000000, must be on. */ +-#define CTL(c) ((c) & (~control_character_bit)) +-#define UNCTL(c) coerce_to_upper(((c)|control_character_bit)) +-#define META(c) ((c) | (meta_character_bit)) +-#define UNMETA(c) ((c) & (~meta_character_bit)) +- + #define whitespace(c) ((c) == '\t' || (c) == ' ') + #define sentence_ender(c) ((c) == '.' || (c) == '?' || (c) == '!') + #define cr_or_whitespace(c) (whitespace(c) || (c) == '\r' || (c) == '\n') +@@ -282,6 +275,9 @@ + + #define COMMAND_PREFIX '@' + ++/* A byte value to represent a non-breaking space until flush_output (). */ ++#define NON_BREAKING_SPACE 036 ++ + #define END_VERBATIM "end verbatim" + + /* Stuff for splitting large files. The numbers for Emacs diff --git a/texinfo.spec b/texinfo.spec index f04631b..602a414 100644 --- a/texinfo.spec +++ b/texinfo.spec @@ -1,7 +1,7 @@ -Summary: Tools needed to create Texinfo format documentation files. +Summary: Tools needed to create Texinfo format documentation files Name: texinfo Version: 4.8 -Release: 14%{?dist} +Release: 15 License: GPL Group: Applications/Publishing Url: http://www.gnu.org/software/texinfo/ @@ -10,7 +10,9 @@ Source1: info-dir Source2: texi2pdf.man Patch0: texinfo-4.8-zlib.patch Patch1: texinfo-4.8-texindex.patch -Prereq: /sbin/install-info +Patch2: texinfo-4.8-0xA0.patch +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info Buildroot: %{_tmppath}/%{name}-%{version}-root BuildRequires: zlib-devel, ncurses-devel @@ -28,7 +30,7 @@ online and print documentation from the same source file and/or if you are going to write documentation for the GNU Project. %package -n info -Summary: A stand-alone TTY-based reader for GNU texinfo documentation. +Summary: A stand-alone TTY-based reader for GNU texinfo documentation Group: System Environment/Base # By making info prereq bash, other packages which have triggers based on # info don't run those triggers until bash is in place as well. This is an @@ -60,6 +62,7 @@ for printing using TeX. %setup -q %patch0 -p1 -b .zlib %patch1 -p1 -b .texindex +%patch2 -p1 -b .0xA0 %build @@ -137,6 +140,11 @@ fi %{_mandir}/man1/texi2pdf.1* %changelog +* Mon Dec 4 2006 Miloslav Trmac - 4.8-15 +- Don't replace 0xA0 by a space in makeinfo + Related: #208511 +- Fix some rpmlint warnings + * Sun Nov 5 2006 Miloslav Trmac - 4.8-14 - Remove off-line sorting from texindex (fixes CVE 2006-4810) @@ -356,7 +364,7 @@ fi * Wed Jan 26 2000 Bernhard Rosenkraenzer - move info-stnd.info* to the info package, /sbin/install-info it - in %post (Bug #6632) + in %%post (Bug #6632) * Thu Jan 13 2000 Jeff Johnson - recompile to eliminate ncurses foul-up. @@ -379,7 +387,7 @@ fi * Thu Mar 11 1999 Cristian Gafton - version 3.12f -- make /usr/info/dir to be a %config(noreplace) +- make /usr/info/dir to be a %%config(noreplace) * Wed Nov 25 1998 Jeff Johnson - rebuild to fix docdir perms. @@ -398,13 +406,13 @@ fi - translations modified for de * Tue Jun 9 1998 Jeff Johnson -- add %attr to permit non-root build. +- add %%attr to permit non-root build. * Thu May 07 1998 Prospector System - translations modified for de, fr, tr * Sun Apr 12 1998 Cristian Gafton -- added %clean +- added %%clean - manhattan build * Wed Mar 04 1998 Cristian Gafton