rpms/pinfo/FC-6 pinfo-0.6.9-mansection.patch, NONE, 1.1 pinfo.spec, 1.29, 1.30
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Feb 23 14:27:03 UTC 2007
Author: mlichvar
Update of /cvs/dist/rpms/pinfo/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv24287
Modified Files:
pinfo.spec
Added Files:
pinfo-0.6.9-mansection.patch
Log Message:
- save section of first man page to history (#208738)
Resolves: #208738
pinfo-0.6.9-mansection.patch:
manual.c | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
--- NEW FILE pinfo-0.6.9-mansection.patch ---
--- pinfo-0.6.9/src/manual.c.mansection 2006-03-16 15:14:30.000000000 +0100
+++ pinfo-0.6.9/src/manual.c 2007-02-23 14:52:30.000000000 +0100
@@ -167,16 +167,29 @@
}
i = len;
/* find the beginning of the last token */
- for (i = len - 1;(i > 0) &&(!isspace(name1[i])); i--);
-
- /* if we've found space, then we move to the first nonspace character */
- if (i > 0)
- i++;
+ for (i = len - 1;(i >= 0) &&(!isspace(name1[i])); i--)
+ ;
+ i++;
/* filename->name */
- strcpy(manualhistory[0].name, &name1[i]);
+ snprintf(manualhistory[0].name, 256, "%s", &name1[i]);
+
/* section unknown */
- strcpy(manualhistory[0].sect, "");
+ manualhistory[0].sect[0] = 0;
+
+ /* try to find section */
+ if (i > 1) {
+ for (i--; (i >= 0) && isspace(name1[i]); i--)
+ ;
+ if (i >= 0) {
+ name1[i + 1] = 0;
+ for (; (i >= 0) && !isspace(name1[i]); i--)
+ ;
+ i++;
+ snprintf(manualhistory[0].sect, 32, "%s", &name1[i]);
+ }
+ }
+
/* selected unknown */
manualhistory[0].selected = -1;
/* pos=0 */
Index: pinfo.spec
===================================================================
RCS file: /cvs/dist/rpms/pinfo/FC-6/pinfo.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- pinfo.spec 19 Jan 2007 13:20:44 -0000 1.29
+++ pinfo.spec 23 Feb 2007 14:27:01 -0000 1.30
@@ -1,7 +1,7 @@
Summary: An info file viewer.
Name: pinfo
Version: 0.6.9
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: System Environment/Base
License: GPL
URL: http://pinfo.alioth.debian.org
@@ -9,6 +9,7 @@
Patch1: pinfo-0.6.8-htmlview.patch
Patch2: pinfo-0.6.9-infosuff.patch
Patch3: pinfo-0.6.9-nogroup.patch
+Patch4: pinfo-0.6.9-mansection.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel
@@ -26,6 +27,7 @@
%patch1 -p1 -b .links
%patch2 -p1 -b .infosuff
%patch3 -p1 -b .nogroup
+%patch4 -p1 -b .mansection
%build
%configure --without-readline
@@ -68,6 +70,9 @@
rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Feb 23 2007 Miroslav Lichvar <mlichvar at redhat.com> 0.6.9-3.fc6
+- save section of first man page to history (#208738)
+
* Fri Jan 19 2007 Miroslav Lichvar <mlichvar at redhat.com> 0.6.9-2
- use correct group when dropping group privileges (#221107)
- open also files without .info suffix
More information about the fedora-cvs-commits
mailing list