From 8413399ae90c22a33e94b0634dd0c6046f0f81e7 Mon Sep 17 00:00:00 2001 From: Rafał Psota Date: Nov 18 2008 11:46:55 +0000 Subject: non-printable character filter patch (#504144) --- diff --git a/htop-0.8.1-nonprint.patch b/htop-0.8.1-nonprint.patch new file mode 100644 index 0000000..cbebc06 --- /dev/null +++ b/htop-0.8.1-nonprint.patch @@ -0,0 +1,11 @@ +--- RichString.c.orig 2008-03-09 03:23:49.000000000 +0100 ++++ RichString.c 2008-11-18 12:30:21.000000000 +0100 +@@ -89,7 +89,7 @@ + inline void RichString_appendn(RichString* this, int attrs, char* data_c, int len) { + int last = MIN(RICHSTRING_MAXLEN - 1, len + this->len); + for (int i = this->len, j = 0; i < last; i++, j++) +- this->chstr[i] = data_c[j] | attrs; ++ this->chstr[i] = ((data_c[j] > 31) ? data_c[j] : '?' ) | attrs; + this->chstr[last] = 0; + this->len = last; + } diff --git a/htop.spec b/htop.spec index e8c68b4..9979ec2 100644 --- a/htop.spec +++ b/htop.spec @@ -1,6 +1,6 @@ Name: htop Version: 0.8.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Interactive process viewer Summary(pl): Interaktywna przeglądarka procesów @@ -8,6 +8,7 @@ Group: Applications/System License: GPL+ URL: http://htop.sourceforge.net/ Source0: http://download.sourceforge.net/htop/%{name}-%{version}.tar.gz +Patch0: %{name}-0.8.1-nonprint.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -24,6 +25,7 @@ do top(1). %prep %setup -q +%patch0 -p0 sed -i s#"INSTALL_DATA = @INSTALL_DATA@"#"INSTALL_DATA = @INSTALL_DATA@ -p"# Makefile.in sed -i -e '2,3d' -e '9d' htop.desktop @@ -40,7 +42,7 @@ desktop-file-install \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --vendor fedora \ --delete-original \ - --remove-category=Application \ + --remove-category=Application\ $RPM_BUILD_ROOT%{_datadir}/applications/htop.desktop #remove empty direcories @@ -61,6 +63,8 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Nov 18 2008 Rafał Psota - 0.8.1-2 +- non-printable character filter patch (#504144) * Tue Oct 14 2008 Rafał Psota - 0.8.1-1 - update to 0.8.1 * Thu Jul 31 2008 Rafał Psota - 0.8-1