Compare commits
No commits in common. "cd06d110270ba7948c38190b3a4a32c8ba6a9595" and "cc57be501c7601978d7cb36e654d119fa108bb99" have entirely different histories.
cd06d11027
...
cc57be501c
@ -1,22 +0,0 @@
|
|||||||
From 16dba5978146b6d3a540ac7c8f415eda49280847 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
|
|
||||||
Date: Thu, 23 Jul 2020 20:11:24 +0200
|
|
||||||
Subject: [PATCH] fix use of global variabel
|
|
||||||
|
|
||||||
---
|
|
||||||
src/parse_config.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/parse_config.h b/src/parse_config.h
|
|
||||||
index 2dffa4f..4e68bb4 100644
|
|
||||||
--- a/src/parse_config.h
|
|
||||||
+++ b/src/parse_config.h
|
|
||||||
@@ -85,7 +85,7 @@ typedef struct colours
|
|
||||||
colours;
|
|
||||||
#endif /* HAVE_CURSES_COLOR */
|
|
||||||
|
|
||||||
-int use_manual;
|
|
||||||
+extern int use_manual;
|
|
||||||
|
|
||||||
int parse_config (void);
|
|
||||||
int parse_line (char *line);
|
|
||||||
BIN
pinfo-0.6.10.tar.bz2
Normal file
BIN
pinfo-0.6.10.tar.bz2
Normal file
Binary file not shown.
@ -1,63 +0,0 @@
|
|||||||
From fc67ceacd81f0c74fcab85447c23a532ae482827 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sergei Trofimovich <slyich@gmail.com>
|
|
||||||
Date: Thu, 11 Nov 2021 18:59:57 +0000
|
|
||||||
Subject: [PATCH 1/2] src/utils.c: suppres unused parameter warning
|
|
||||||
|
|
||||||
utils.c:372:62: error: unused parameter 'completions' [-Werror=unused-parameter]
|
|
||||||
372 | getstring_with_completion(char *prompt, const char * const * completions)
|
|
||||||
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
|
|
||||||
---
|
|
||||||
src/utils.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/utils.c b/src/utils.c
|
|
||||||
index 2e4139c..34c9b88 100644
|
|
||||||
--- a/src/utils.c
|
|
||||||
+++ b/src/utils.c
|
|
||||||
@@ -394,7 +394,7 @@ getstring_with_completion(char *prompt, const char * const * completions)
|
|
||||||
curs_set(0);
|
|
||||||
|
|
||||||
#else
|
|
||||||
-
|
|
||||||
+ (void)completions; /* unused */
|
|
||||||
move(maxy - 1, 0);
|
|
||||||
buf = readlinewrapper(prompt);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
||||||
From ab604fdb67296dad27f3a25f3c9aabdd2fb8c3fa Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sergei Trofimovich <slyich@gmail.com>
|
|
||||||
Date: Thu, 11 Nov 2021 19:02:24 +0000
|
|
||||||
Subject: [PATCH 2/2] src/video.c: use %ld to print longs
|
|
||||||
|
|
||||||
ncurses-6.3 added printf()-stype attribute annotations for gcc-like
|
|
||||||
compilers that can now detect argument mismatches:
|
|
||||||
|
|
||||||
video.c:114:26: error: format '%d' expects argument of type 'int',
|
|
||||||
but argument 3 has type 'long unsigned int' [-Werror=format=]
|
|
||||||
114 | printw(_("Viewing line %d/%d, 100%%"), lines, lines);
|
|
||||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
---
|
|
||||||
src/video.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/video.c b/src/video.c
|
|
||||||
index f6b444a..195d781 100644
|
|
||||||
--- a/src/video.c
|
|
||||||
+++ b/src/video.c
|
|
||||||
@@ -109,9 +109,9 @@ showscreen(char **message, unsigned long lines, unsigned long pos, long cursor,
|
|
||||||
mymvhline(maxy - 1, 0, ' ', maxx);
|
|
||||||
move(maxy - 1, 0);
|
|
||||||
if ((pos < lines - 1) &&(lines > pos + maxy - 2))
|
|
||||||
- printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines);
|
|
||||||
+ printw(_("Viewing line %ld/%ld, %ld%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines);
|
|
||||||
else
|
|
||||||
- printw(_("Viewing line %d/%d, 100%%"), lines, lines);
|
|
||||||
+ printw(_("Viewing line %ld/%ld, 100%%"), lines, lines);
|
|
||||||
info_add_highlights(pos, cursor, lines, column, message);
|
|
||||||
attrset(normal);
|
|
||||||
move(0, 0);
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
From 23c169877fda839f0634b2d193eaf26de290f141 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
|
|
||||||
Date: Thu, 23 Jul 2020 20:39:04 +0200
|
|
||||||
Subject: [PATCH] workaround false positie in gcc-10 stringop-overflow checks
|
|
||||||
|
|
||||||
---
|
|
||||||
src/utils.c | 8 +++-----
|
|
||||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/utils.c b/src/utils.c
|
|
||||||
index cb2fe76..2e4139c 100644
|
|
||||||
--- a/src/utils.c
|
|
||||||
+++ b/src/utils.c
|
|
||||||
@@ -848,10 +848,9 @@ char *
|
|
||||||
make_tempfile()
|
|
||||||
{
|
|
||||||
char *filename;
|
|
||||||
- size_t len;
|
|
||||||
|
|
||||||
/* TODO: fix hardcoded /tmp */
|
|
||||||
- char tmpfile_template[] = "/tmp/pinfo.XXXXXX";
|
|
||||||
+ char tmpfile_template[32] = "/tmp/pinfo.XXXXXX";
|
|
||||||
|
|
||||||
/* create a tmpfile */
|
|
||||||
int fd = mkstemp(tmpfile_template);
|
|
||||||
@@ -864,9 +863,8 @@ make_tempfile()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* allocate a new string and copy the filename there */
|
|
||||||
- len = strlen(tmpfile_template)+1;
|
|
||||||
- filename = xmalloc(len+1); /* guarenteerd to be set to \0's */
|
|
||||||
- strncpy(filename, tmpfile_template, len);
|
|
||||||
+ filename = xmalloc(33); /* guarenteerd to be set to \0's */
|
|
||||||
+ strncpy(filename, tmpfile_template, 32);
|
|
||||||
|
|
||||||
/* close the file */
|
|
||||||
close(fd);
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
||||||
Binary file not shown.
30
pinfo-0.6.9-infosuff.patch
Normal file
30
pinfo-0.6.9-infosuff.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
--- pinfo-0.6.9/src/filehandling_functions.c.infosuff 2006-03-16 16:15:02.000000000 +0100
|
||||||
|
+++ pinfo-0.6.9/src/filehandling_functions.c 2006-09-18 14:32:32.000000000 +0200
|
||||||
|
@@ -94,6 +94,7 @@
|
||||||
|
/* iterate over all files in the directory */
|
||||||
|
while ((dp = readdir(dir)) != NULL)
|
||||||
|
{
|
||||||
|
+ int info_suffix;
|
||||||
|
/* use strcat rather than strdup, because xmalloc handles all
|
||||||
|
* malloc errors */
|
||||||
|
char *thisfile = xmalloc(strlen(dp->d_name)+1);
|
||||||
|
@@ -101,7 +102,9 @@
|
||||||
|
|
||||||
|
/* strip suffixes (so "gcc.info.gz" -> "gcc") */
|
||||||
|
strip_compression_suffix(thisfile);
|
||||||
|
+ info_suffix = strlen(thisfile);
|
||||||
|
strip_info_suffix(thisfile);
|
||||||
|
+ info_suffix -= strlen(thisfile);
|
||||||
|
|
||||||
|
/* compare this file with the file we're looking for */
|
||||||
|
if (strcmp(thisfile,bname) == 0)
|
||||||
|
@@ -110,7 +113,8 @@
|
||||||
|
matched++;
|
||||||
|
/* put it in the buffer */
|
||||||
|
strncat(Buf, thisfile, 1023-strlen(Buf));
|
||||||
|
- strncat(Buf, ".info", 1023-strlen(Buf));
|
||||||
|
+ if (info_suffix)
|
||||||
|
+ strncat(Buf, ".info", 1023-strlen(Buf));
|
||||||
|
|
||||||
|
/* clean up, and exit the loop */
|
||||||
|
xfree(thisfile);
|
||||||
39
pinfo-0.6.9-mansection.patch
Normal file
39
pinfo-0.6.9-mansection.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
--- 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 */
|
||||||
@ -7,7 +7,7 @@
|
|||||||
-char *safe_group = "nogroup";
|
-char *safe_group = "nogroup";
|
||||||
+char *safe_group = "nobody";
|
+char *safe_group = "nobody";
|
||||||
|
|
||||||
#ifndef HAVE_DECL_CURS_SET
|
#ifndef HAVE_CURS_SET
|
||||||
void
|
void
|
||||||
--- pinfo-0.6.9/src/pinforc.in.nogroup 2007-01-19 13:42:14.000000000 +0100
|
--- pinfo-0.6.9/src/pinforc.in.nogroup 2007-01-19 13:42:14.000000000 +0100
|
||||||
+++ pinfo-0.6.9/src/pinforc.in 2007-01-19 13:45:35.000000000 +0100
|
+++ pinfo-0.6.9/src/pinforc.in 2007-01-19 13:45:35.000000000 +0100
|
||||||
|
|||||||
33
pinfo.spec
33
pinfo.spec
@ -1,20 +1,16 @@
|
|||||||
Name: pinfo
|
Name: pinfo
|
||||||
Version: 0.6.13
|
Version: 0.6.10
|
||||||
Release: 1
|
Release: 22
|
||||||
Summary: An user-friendly, console-based viewer for Info documents
|
Summary: An user-friendly, console-based viewer for Info documents
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://github.com/baszoetekouw/pinfo
|
URL: http://pinfo.alioth.debian.org
|
||||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source: http://ftp.corbina.net/pub/Linux/gentoo/distfiles/d9/pinfo-0.6.10.tar.bz2
|
||||||
Patch0001: pinfo-0.6.9-xdg.patch
|
Patch0001: pinfo-0.6.9-xdg.patch
|
||||||
# https://github.com/baszoetekouw/pinfo/commit/fc67ceacd81f0c74fcab85447c23a532ae482827
|
Patch0002: pinfo-0.6.9-infosuff.patch
|
||||||
# https://github.com/baszoetekouw/pinfo/commit/ab604fdb67296dad27f3a25f3c9aabdd2fb8c3fa
|
|
||||||
Patch0002: pinfo-0.6.13-gccwarn.patch
|
|
||||||
Patch0003: pinfo-0.6.9-nogroup.patch
|
Patch0003: pinfo-0.6.9-nogroup.patch
|
||||||
# https://github.com/baszoetekouw/pinfo/commit/23c169877fda839f0634b2d193eaf26de290f141
|
Patch0004: pinfo-0.6.9-mansection.patch
|
||||||
Patch0004: pinfo-0.6.13-stringop-overflow.patch
|
|
||||||
Patch0005: pinfo-0.6.9-infopath.patch
|
Patch0005: pinfo-0.6.9-infopath.patch
|
||||||
Patch0006: pinfo-0.6.10-man.patch
|
Patch0006: pinfo-0.6.10-man.patch
|
||||||
Patch0007: bugfix-of-gcc-10.patch
|
|
||||||
|
|
||||||
BuildRequires: ncurses-devel automake gettext-devel libtool texinfo
|
BuildRequires: ncurses-devel automake gettext-devel libtool texinfo
|
||||||
Requires: xdg-utils
|
Requires: xdg-utils
|
||||||
@ -42,30 +38,19 @@ Pinfo-help provides man pages and other related help documents for pinfo.
|
|||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%license COPYING
|
%doc AUTHORS COPYING
|
||||||
%doc AUTHORS
|
|
||||||
%{_bindir}/pinfo
|
%{_bindir}/pinfo
|
||||||
%{_infodir}/pinfo.info*
|
%{_infodir}/pinfo.info*
|
||||||
%config(noreplace) %{_sysconfdir}/pinforc
|
%config(noreplace) %{_sysconfdir}/pinforc
|
||||||
|
%exclude %{_infodir}/dir
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc Changelog* NEWS README.md TECHSTUFF
|
%doc ChangeLog* NEWS README TECHSTUFF
|
||||||
%{_mandir}/man1/pinfo.1*
|
%{_mandir}/man1/pinfo.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Oct 08 2023 yaoxin <yao_xin001@hoperun.com> - 0.6.13-1
|
|
||||||
- Upgrade to 0.6.13
|
|
||||||
|
|
||||||
* Tue Aug 3 2021 Shenmei Tu <tushenmei@huawei.com> - 0.6.10-24
|
|
||||||
- bugfix-of-gcc-10.patch
|
|
||||||
|
|
||||||
* Fri July 30 2021 Shenmei Tu <tushenmei@huawei.com> - 0.6.10-23
|
|
||||||
- bug fix of multiple definition
|
|
||||||
|
|
||||||
* Fri Feb 14 2020 lingsheng <lingsheng@huawei.com> - 0.6.10-22
|
* Fri Feb 14 2020 lingsheng <lingsheng@huawei.com> - 0.6.10-22
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: github
|
|
||||||
src_repo: baszoetekouw/pinfo
|
|
||||||
tag_prefix: '^v'
|
|
||||||
seperator: '.'
|
|
||||||
Loading…
x
Reference in New Issue
Block a user