Compare commits
No commits in common. "bb7207a76f901c4e14934c076107a8db0758856a" and "34f497e157e091ee97019714cc03327c44f0f22a" have entirely different histories.
bb7207a76f
...
34f497e157
@ -1,40 +0,0 @@
|
|||||||
From e9e8dd148b9454abb5a7704d6f6249f7aa7aeded Mon Sep 17 00:00:00 2001
|
|
||||||
From: herengui <herengui@uniontech.com>
|
|
||||||
Date: Thu, 10 Mar 2022 18:14:43 +0800
|
|
||||||
Subject: [PATCH] Replace Curses mvprintw() with va_list-based equivalent
|
|
||||||
|
|
||||||
Instead of allocating a buffer for the formatted string and printing
|
|
||||||
it with mvprintw() -- which should have a "%s" format argument to guard
|
|
||||||
against '%' characters in the formatted string, hat tip Andreas Tille --,
|
|
||||||
use vw_printw() which takes a va_list so can do the formatting itself.
|
|
||||||
|
|
||||||
Signed-off-by: herengui <herengui@uniontech.com>
|
|
||||||
---
|
|
||||||
bam_tview_curses.c | 8 ++------
|
|
||||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/bam_tview_curses.c b/bam_tview_curses.c
|
|
||||||
index 11db0da..37fb033 100644
|
|
||||||
--- a/bam_tview_curses.c
|
|
||||||
+++ b/bam_tview_curses.c
|
|
||||||
@@ -78,15 +78,11 @@ static void curses_destroy(tview_t* base) {
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void curses_mvprintw(struct AbstractTview* tv,int y ,int x,const char* fmt,...) {
|
|
||||||
- unsigned int size=tv->mcol+2;
|
|
||||||
- char* str=malloc(size);
|
|
||||||
- if(str==0) exit(EXIT_FAILURE);
|
|
||||||
va_list argptr;
|
|
||||||
va_start(argptr, fmt);
|
|
||||||
- vsnprintf(str,size, fmt, argptr);
|
|
||||||
+ if (wmove(stdscr, y, x) != ERR)
|
|
||||||
+ vw_printw(stdscr, fmt, argptr);
|
|
||||||
va_end(argptr);
|
|
||||||
- mvprintw(y,x,str);
|
|
||||||
- free(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void curses_mvaddch(struct AbstractTview* tv,int y,int x,int ch) {
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
||||||
@ -1,14 +1,12 @@
|
|||||||
Name: samtools
|
Name: samtools
|
||||||
Version: 1.12
|
Version: 1.12
|
||||||
Release: 5
|
Release: 2
|
||||||
Summary: Tools (written in C using htslib) for manipulating next-generation sequencing data
|
Summary: Tools (written in C using htslib) for manipulating next-generation sequencing data
|
||||||
License: MIT and BSD
|
License: MIT and BSD
|
||||||
URL: http://www.htslib.org
|
URL: http://www.htslib.org
|
||||||
Source0: https://github.com/samtools/samtools/archive/%{name}-%{version}.tar.bz2
|
Source0: https://github.com/samtools/samtools/archive/%{name}-%{version}.tar.bz2
|
||||||
|
|
||||||
Patch0: Replace-Curses-mvprintw-with-va_list-based-equivalen.patch
|
BuildRequires: gcc gdb autoconf automake make zlib-devel htslib-devel perl-Getopt-Long ncurses-devel bzip2-devel xz-devel
|
||||||
|
|
||||||
BuildRequires: gcc autoconf automake make zlib-devel htslib-devel ncurses-devel bzip2-devel xz-devel
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The original samtools package has been split into three separate but tightly coordinated projects:
|
The original samtools package has been split into three separate but tightly coordinated projects:
|
||||||
@ -17,16 +15,16 @@ The original samtools package has been split into three separate but tightly coo
|
|||||||
bcftools: calling and other tools for handling VCF, BCF
|
bcftools: calling and other tools for handling VCF, BCF
|
||||||
See also http://github.com/samtools/
|
See also http://github.com/samtools/
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Header files and libraries for compiling against %{name}
|
Summary: Header files and libraries for compiling against %{name}
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Header files and libraries for compiling against %{name}
|
Header files and libraries for compiling against %{name}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%setup -q -n %{name}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoheader
|
autoheader
|
||||||
@ -59,16 +57,6 @@ install -D -p -m 0755 libbam.a %{buildroot}%{_libdir}/libbam.a
|
|||||||
%{_libdir}/libbam.a
|
%{_libdir}/libbam.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Mar 10 2022 herengui <herengui@uniontech.com> - 1.12-5
|
|
||||||
- fix build error
|
|
||||||
|
|
||||||
* Tue Feb 08 2022 herengui <herengui@uniontech.com> - 1.12-4
|
|
||||||
- rebuild for htslib version updated.
|
|
||||||
|
|
||||||
* Tue Jul 20 2021 herengui <herengui@uniontech.com> - 1.12-3
|
|
||||||
- remove useless buildrequires.
|
|
||||||
- replace tab with space
|
|
||||||
|
|
||||||
* Thu Mar 25 2021 herengui <herengui@uniontech.com> - 1.12-2
|
* Thu Mar 25 2021 herengui <herengui@uniontech.com> - 1.12-2
|
||||||
- Add devel package
|
- Add devel package
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: github
|
|
||||||
src_repo: samtools/samtools
|
|
||||||
tag_prefix: ^
|
|
||||||
separator: .
|
|
||||||
Loading…
x
Reference in New Issue
Block a user