diff --git a/htop-non-printable-characters.patch b/htop-non-printable-characters.patch new file mode 100644 index 0000000..3bc6b46 --- /dev/null +++ b/htop-non-printable-characters.patch @@ -0,0 +1,17 @@ +Index: htop-0.8.1/RichString.c +=================================================================== +--- htop-0.8.1.orig/RichString.c ++++ htop-0.8.1/RichString.c +@@ -56,11 +56,11 @@ inline void RichString_appendn(RichStrin + if (len<0) + return; + int last = MIN(RICHSTRING_MAXLEN - 1, len + this->len); + for (int i = this->len, j = 0; i < last; i++, j++) { + memset(&this->chstr[i], 0, sizeof(this->chstr[i])); +- this->chstr[i].chars[0] = data[j]; ++ this->chstr[i].chars[0] = (data[j] > 31) ? data[j] : '?'; + this->chstr[i].attr = attrs; + } + this->chstr[last].chars[0] = 0; + this->len = last; + } diff --git a/htop.changes b/htop.changes index f6977ba..3bfcc13 100644 --- a/htop.changes +++ b/htop.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Nov 21 10:57:51 CET 2008 - thoenig@suse.de + +- add python to build requires + +------------------------------------------------------------------- +Fri Nov 21 09:45:29 CET 2008 - thoenig@suse.de + +- add patch htop-non-printable-characters.patch: Don't try to show + non-printable charcaters (bnc#440951) + ------------------------------------------------------------------- Tue Sep 23 19:15:12 CEST 2008 - thoenig@suse.de diff --git a/htop.spec b/htop.spec index e33ef9f..3943e64 100644 --- a/htop.spec +++ b/htop.spec @@ -22,13 +22,14 @@ Name: htop Url: http://htop.sourceforge.net Summary: An Interactive text-mode Process Viewer for Linux Version: 0.8.1 -Release: 1 +Release: 2 License: GPL v2 or later Group: System/Monitoring Source0: %{name}-%{version}.tar.bz2 Patch0: %{name}-desktop-file-fix-thoenig-01.patch +Patch1: %{name}-non-printable-characters.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: ncurses-devel +BuildRequires: ncurses-devel python AutoReqProv: on %description @@ -46,6 +47,7 @@ Authors: %prep %setup %patch0 -p0 +%patch1 -p1 %build %configure \ @@ -67,6 +69,11 @@ rm -rf %{_buildroot} %{_mandir}/*/%{name}* %changelog +* Fri Nov 21 2008 thoenig@suse.de +- add python to build requires +* Fri Nov 21 2008 thoenig@suse.de +- add patch htop-non-printable-characters.patch: Don't try to show + non-printable charcaters (bnc#440951) * Tue Sep 23 2008 thoenig@suse.de - Linux-VServer support - battery meter