- Don't replace 0xA0 by a space in makeinfo Related: #208511

- Fix some rpmlint warnings
This commit is contained in:
Miloslav Trmac 2006-12-04 21:42:24 +00:00
parent 08060e8f8f
commit 3d74088149
2 changed files with 87 additions and 8 deletions

71
texinfo-4.8-0xA0.patch Normal file
View File

@ -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

View File

@ -1,7 +1,7 @@
Summary: Tools needed to create Texinfo format documentation files. Summary: Tools needed to create Texinfo format documentation files
Name: texinfo Name: texinfo
Version: 4.8 Version: 4.8
Release: 14%{?dist} Release: 15
License: GPL License: GPL
Group: Applications/Publishing Group: Applications/Publishing
Url: http://www.gnu.org/software/texinfo/ Url: http://www.gnu.org/software/texinfo/
@ -10,7 +10,9 @@ Source1: info-dir
Source2: texi2pdf.man Source2: texi2pdf.man
Patch0: texinfo-4.8-zlib.patch Patch0: texinfo-4.8-zlib.patch
Patch1: texinfo-4.8-texindex.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 Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: zlib-devel, ncurses-devel 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. are going to write documentation for the GNU Project.
%package -n info %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 Group: System Environment/Base
# By making info prereq bash, other packages which have triggers based on # 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 # 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 %setup -q
%patch0 -p1 -b .zlib %patch0 -p1 -b .zlib
%patch1 -p1 -b .texindex %patch1 -p1 -b .texindex
%patch2 -p1 -b .0xA0
%build %build
@ -137,6 +140,11 @@ fi
%{_mandir}/man1/texi2pdf.1* %{_mandir}/man1/texi2pdf.1*
%changelog %changelog
* Mon Dec 4 2006 Miloslav Trmac <mitr@redhat.com> - 4.8-15
- Don't replace 0xA0 by a space in makeinfo
Related: #208511
- Fix some rpmlint warnings
* Sun Nov 5 2006 Miloslav Trmac <mitr@redhat.com> - 4.8-14 * Sun Nov 5 2006 Miloslav Trmac <mitr@redhat.com> - 4.8-14
- Remove off-line sorting from texindex (fixes CVE 2006-4810) - Remove off-line sorting from texindex (fixes CVE 2006-4810)
@ -356,7 +364,7 @@ fi
* Wed Jan 26 2000 Bernhard Rosenkraenzer <bero@redhat.com> * Wed Jan 26 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- move info-stnd.info* to the info package, /sbin/install-info it - 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 <jbj@redhat.com> * Thu Jan 13 2000 Jeff Johnson <jbj@redhat.com>
- recompile to eliminate ncurses foul-up. - recompile to eliminate ncurses foul-up.
@ -379,7 +387,7 @@ fi
* Thu Mar 11 1999 Cristian Gafton <gafton@redhat.com> * Thu Mar 11 1999 Cristian Gafton <gafton@redhat.com>
- version 3.12f - 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 <jbj@redhat.com> * Wed Nov 25 1998 Jeff Johnson <jbj@redhat.com>
- rebuild to fix docdir perms. - rebuild to fix docdir perms.
@ -398,13 +406,13 @@ fi
- translations modified for de - translations modified for de
* Tue Jun 9 1998 Jeff Johnson <jbj@redhat.com> * Tue Jun 9 1998 Jeff Johnson <jbj@redhat.com>
- add %attr to permit non-root build. - add %%attr to permit non-root build.
* Thu May 07 1998 Prospector System <bugs@redhat.com> * Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr - translations modified for de, fr, tr
* Sun Apr 12 1998 Cristian Gafton <gafton@redhat.com> * Sun Apr 12 1998 Cristian Gafton <gafton@redhat.com>
- added %clean - added %%clean
- manhattan build - manhattan build
* Wed Mar 04 1998 Cristian Gafton <gafton@redhat.com> * Wed Mar 04 1998 Cristian Gafton <gafton@redhat.com>