Hello community,

here is the log from the commit of package xosview for openSUSE:Factory checked 
in at 2013-04-12 20:45:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xosview (Old)
 and      /work/SRC/openSUSE:Factory/.xosview.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xosview", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/xosview/xosview.changes  2013-03-11 
07:54:15.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xosview.new/xosview.changes     2013-04-12 
20:45:41.000000000 +0200
@@ -1,0 +2,19 @@
+Tue Apr  9 13:34:24 UTC 2013 - [email protected]
+
+- Update to xosview version 1.14
+    This release makes small fixes, including one for a bug that
+    could cause random crashes.
+    1.13: This release makes changes to temperature sensing, adds
+          significant performance optimizations, and fixes bugs.
+    1.12: This release fixes a number of long-standing issues with
+          screen updates and redrawing.
+    1.11: The only change in this release is to fix a bug which
+          prevents use with Red Hat Enterprise Linux 6 kernels
+    1.10: This release adds a new configurable (and simplified)
+          CPU meter, plus several Linux and BSD improvements.
+    1.9.4: This release improves temperature sensor displays and
+           BSD support, and fixes bugs.
+    1.9.3: This release adds a simplified build system and some
+           minor changes.
+
+-------------------------------------------------------------------

Old:
----
  xosview-1.9.2-appdef.dif
  xosview-1.9.2-diskstat.dif
  xosview-1.9.2-double.patch
  xosview-1.9.2-float-conv.patch
  xosview-1.9.2-irda.patch
  xosview-1.9.2-longint.patch
  xosview-1.9.2-maxlimit.patch
  xosview-1.9.2-procsys.patch
  xosview-1.9.2-serial.patch
  xosview-1.9.2.tar.bz2

New:
----
  xosview-1.14-appdef.dif
  xosview-1.14-diskstat.dif
  xosview-1.14-longint.patch
  xosview-1.14-maxlimit.patch
  xosview-1.14-procsys.patch
  xosview-1.14-serial.patch
  xosview-1.14-sysinfo.patch
  xosview-1.14.dif
  xosview-1.14.tar.gz
  xosview-rpmlintrc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xosview.spec ++++++
--- /var/tmp/diff_new_pack.slc45g/_old  2013-04-12 20:45:46.000000000 +0200
+++ /var/tmp/diff_new_pack.slc45g/_new  2013-04-12 20:45:46.000000000 +0200
@@ -28,28 +28,26 @@
 #Requires:    desktop-data-SuSE
 # This because /usr/bin/xrdb is part of xorg-x11
 Requires:       xorg-x11
-Version:        1.9.2
+Version:        1.14
 Release:        0
 Summary:        System Load Information
 License:        GPL-2.0+
 Group:          System/Monitoring
-Url:            http://sourceforge.net/projects/xosview/
-Source:         xosview-%{version}.tar.bz2
+Url:            https://github.com/hills/xosview
+Source:         xosview-%{version}.tar.gz
 Source1:        rc.config.xosview
 Source2:        xosview.png
 Source3:        xosview.desktop
 Source4:        xosview.sh
+Source5:        xosview-rpmlintrc
 Patch:          xosview-%{version}.dif
 Patch1:         xosview-%{version}-serial.patch
 Patch2:         xosview-%{version}-procsys.patch
 Patch3:         xosview-%{version}-maxlimit.patch
-Patch4:         xosview-%{version}-irda.patch
-Patch6:         xosview-%{version}-double.patch
 Patch7:         xosview-%{version}-longint.patch
-Patch8:         xosview-%{version}-float-conv.patch
+Patch8:         xosview-%{version}-sysinfo.patch
 Patch10:        xosview-%{version}-appdef.dif
 Patch11:        xosview-%{version}-diskstat.dif
-Patch12:        xosview-config.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %define _appdefdir  %{_datadir}/X11/app-defaults
 
@@ -60,64 +58,53 @@
 
 %prep
 %setup -q
-%patch1  -p0 -b ".serial"
-%patch2  -p0 -b ".procsys"
-%patch3  -p0 -b ".maxlimit"
-%patch4  -p0 -b ".irda"
-%patch6  -p0 -b ".double"
-%patch7  -p0 -b ".ulong"
-%patch8  -p0 -b ".float-conv"
+%patch1  -p0 -b .serial
+%patch2  -p0 -b .procsys
+%patch3  -p0 -b .maxlimit
+%patch7  -p0 -b .ulong
+%patch8  -p0 -b .sysinfo
 %patch10 -p0 -b ".appdef"
 %patch11 -p0 -b ".diskstat"
-%patch12 
 %patch
 
 %build
-  CFLAGS="$RPM_OPT_FLAGS"
-CXXFLAGS=""
-      CC=gcc
+  OPTFLAGS="$RPM_OPT_FLAGS"
      CXX=g++
 case "$RPM_OPT_FLAGS" in
 *-fno-const-strings*) ;;
 *)
-    if $CXX $CFLAGS -fno-const-strings -S -o /dev/null -xc /dev/null > 
/dev/null 2>&1 ; then
-       CXXFLAGS="-fno-const-strings"
+    if $CXX $OPTFLAGS -fno-const-strings -S -o /dev/null -xc /dev/null > 
/dev/null 2>&1 ; then
+       OPTFLAGS="$OPTFLAGS -fno-const-strings"
     fi
 esac
-export CFLAGS CXXFLAGS CXX CC
-(cd config/; autoconf; cp configure ../)
-%configure --with-x                    \
-       --x-includes=%{_includedir}     \
-       --x-libraries=%{_libdir}        \
-       --enable-auto-depend            \
-       --enable-linux-syscalls         \
-       --disable-linux-memstat
 make clean
-make
+make PLATFORM=linux OPTFLAGS="$OPTFLAGS" PREFIX=%{_exec_prefix}
 
 %install
 mkdir -p %{buildroot}%{_bindir}
 mkdir -p %{buildroot}%{_mandir}/man1
 mkdir -p %{buildroot}%{_appdefdir}
-make PREFIX_TO_USE=%{buildroot}%{_exec_prefix} \
-     MANDIR=%{buildroot}%{_mandir}/man1 \
-     XAPPLOADDIR=%{buildroot}%{_appdefdir} \
-     install install-man
-mkdir -p %{buildroot}%{_docdir}/xosview/
+mkdir -p %{buildroot}%{_docdir}/xosview
+make PREFIX=%{_exec_prefix} \
+     MANDIR=%{_mandir} \
+     XAPPLOADDIR=%{_appdefdir} \
+     DESTDIR=%{buildroot} \
+     install
+install -m 0444 Xdefaults         %{buildroot}%{_appdefdir}/XOsview
 install -m 0444 README            %{buildroot}%{_docdir}/xosview/
 install -m 0444 README.linux      %{buildroot}%{_docdir}/xosview/
 mv %{buildroot}%{_bindir}/xosview %{buildroot}%{_bindir}/xosview.bin
 sed 's|@@BINDIR@@|%{_bindir}|' < %{S:4} > %{buildroot}%{_bindir}/xosview
 chmod 0755 %{buildroot}%{_bindir}/xosview
 chmod 0755 %{buildroot}%{_bindir}/xosview.bin
-mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
-install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/usr/share/pixmaps/
-mkdir -p $RPM_BUILD_ROOT/usr/share/applications
-install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/usr/share/applications/
+mkdir -p   %{buildroot}%{_datadir}/pixmaps
+install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/
+mkdir -p %{buildroot}%{_datadir}/applications
+install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/applications
 
 %files
 %defattr(-,root,root)
-%{_prefix}/share/pixmaps/xosview.png
+%{_datadir}/pixmaps/xosview.png
 %{_datadir}/applications/xosview.desktop
 %{_bindir}/xosview
 %{_bindir}/xosview.bin

++++++ xosview-1.9.2-appdef.dif -> xosview-1.14-appdef.dif ++++++
--- /work/SRC/openSUSE:Factory/xosview/xosview-1.9.2-appdef.dif 2012-02-08 
17:21:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xosview.new/xosview-1.14-appdef.dif     
2013-04-12 20:45:41.000000000 +0200
@@ -1,50 +1,50 @@
 --- Xrm.cc
-+++ Xrm.cc     2012-02-07 16:45:31.561934420 +0000
++++ Xrm.cc     2013-04-09 10:07:23.161439587 +0000
 @@ -9,6 +9,7 @@
  #include <stdio.h>    //  For snprintf().
  #include <ctype.h>
  #include <iostream>
 +#include <sys/stat.h> //  For stat().
  #include <unistd.h>  //  for access(), etc.  BCG
- #include "snprintf.h"
- #include "general.h"
-@@ -140,29 +141,34 @@ Listed from weakest to strongest:
+ #ifndef NULL
+ #define NULL 0
+@@ -138,30 +139,34 @@ Listed from weakest to strongest:
  
    //  Merge in the system resource database.
    char rfilename[2048];
 +  struct stat st;
    int result;
+   const int rlen = sizeof rfilename;
  
    // Get the app-defaults
 +  result = snprintf(rfilename, sizeof rfilename, 
"/usr/share/X11/app-defaults/%s",
 +    XrmQuarkToString(_class));
-+  if (result >= 0 && (size_t)result < sizeof rfilename && stat(rfilename, 
&st) == 0)
-+    XrmCombineFileDatabase (rfilename, &_db, 1);
++  if (result >= 0 && result < rlen && stat(rfilename, &st) == 0)
    result = snprintf(rfilename, sizeof rfilename, "/etc/X11/app-defaults/%s",
      XrmQuarkToString(_class));
--  if (rfilename != NULL)
-+  if (result >= 0 && (size_t)result < sizeof rfilename && stat(rfilename, 
&st) == 0)
+-  if (result >= 0 && result < rlen)
++  if (result >= 0 && result < rlen  && stat(rfilename, &st) == 0)
      XrmCombineFileDatabase (rfilename, &_db, 1);
    result = snprintf(rfilename, sizeof rfilename, 
"/usr/lib/X11/app-defaults/%s",
      XrmQuarkToString(_class));
--  if (result >= 0 && result < sizeof rfilename)
-+  if (result >= 0 && (size_t)result < sizeof rfilename && stat(rfilename, 
&st) == 0)
+-  if (result >= 0 && result < rlen)
++  if (result >= 0 && result < rlen  && stat(rfilename, &st) == 0)
      XrmCombineFileDatabase (rfilename, &_db, 1);
    result = snprintf(rfilename, sizeof rfilename, 
"/usr/X11R6/lib/X11/app-defaults/%s",
      XrmQuarkToString(_class));
--  if (result >= 0 && result < sizeof rfilename)
-+  if (result >= 0 && (size_t)result < sizeof rfilename && stat(rfilename, 
&st) == 0)
+-  if (result >= 0 && result < rlen)
++  if (result >= 0 && result < rlen  && stat(rfilename, &st) == 0)
      XrmCombineFileDatabase (rfilename, &_db, 1);
    //  Try a few more, for SunOS/Solaris folks.
    result = snprintf(rfilename, sizeof rfilename, 
"/usr/openwin/lib/X11/app-defaults/%s",
      XrmQuarkToString(_class));
--  if (result >= 0 && result < sizeof rfilename)
-+  if (result >= 0 && (size_t)result < sizeof rfilename && stat(rfilename, 
&st) == 0)
+-  if (result >= 0 && result < rlen)
++  if (result >= 0 && result < rlen  && stat(rfilename, &st) == 0)
      XrmCombineFileDatabase (rfilename, &_db, 1);
    result = snprintf(rfilename, sizeof rfilename, 
"/usr/local/X11R6/lib/X11/app-defaults/%s",
        XrmQuarkToString(_class));
--  if (result >= 0 && result < sizeof rfilename)
-+  if (result >= 0 && (size_t)result < sizeof rfilename && stat(rfilename, 
&st) == 0)
+-  if (result >= 0 && result < rlen)
++  if (result >= 0 && result < rlen  && stat(rfilename, &st) == 0)
      XrmCombineFileDatabase (rfilename, &_db, 1);
  
    //  Now, check for an XOSView file in the XAPPLRESDIR directory...

++++++ xosview-1.9.2-diskstat.dif -> xosview-1.14-diskstat.dif ++++++
--- /work/SRC/openSUSE:Factory/xosview/xosview-1.9.2-diskstat.dif       
2012-02-08 17:21:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xosview.new/xosview-1.14-diskstat.dif   
2013-04-12 20:45:41.000000000 +0200
@@ -1,121 +1,126 @@
 --- linux/diskmeter.cc
-+++ linux/diskmeter.cc 2008-05-15 15:52:19.000000000 +0000
-@@ -219,8 +219,8 @@ void DiskMeter::update_info(unsigned lon
++++ linux/diskmeter.cc 2013-04-09 10:54:11.561439430 +0000
+@@ -209,7 +209,6 @@ void DiskMeter::update_info(const diskma
+     float itim = IntervalTimeInMicrosecs();
+     // the sum of all disks
+     unsigned long long all_bytes_read = 0, all_bytes_written = 0;
+-    unsigned int sect_size = 512; // disk stats in /sys are always in 512 
byte units
+ 
+     // avoid strange values at first call
+     // (by this - the first value displayed becomes zero)
+@@ -235,13 +234,11 @@ void DiskMeter::update_info(const diskma
+             all_bytes_written += it->second - sysfs_write_prev_[it->first];
      }
  
+-    all_bytes_read *= sect_size;
+-    all_bytes_written *= sect_size;
+     XOSDEBUG("disk: read: %llu, written: %llu\n", all_bytes_read, 
all_bytes_written);
+ 
      // convert rate from bytes/microsec into bytes/second
--    fields_[0] = ((rsum - sysfs_read_prev_ ) * 1e6 ) / itim;
--    fields_[1] = ((wsum - sysfs_write_prev_) * 1e6 ) / itim;
-+    fields_[0] = ((rsum - sysfs_read_prev_ ) * 1e5 ) / itim;
-+    fields_[1] = ((wsum - sysfs_write_prev_) * 1e5 ) / itim;
+-    fields_[0] = all_bytes_read * 1e6 / itim;
+-    fields_[1] = all_bytes_written * 1e6 / itim;
++    fields_[0] = all_bytes_read * 1e5 / itim;
++    fields_[1] = all_bytes_written * 1e5 / itim;
  
      // fix overflow (conversion bug?)
      if (fields_[0] < 0.0)
-@@ -257,19 +257,14 @@ void DiskMeter::getsysfsdiskinfo( void )
+@@ -273,9 +270,7 @@ void DiskMeter::getsysfsdiskinfo( void )
          // just sum up everything in /sys/block/*/stat
  
    std::string sysfs_dir = _statFileName;
 -  std::string disk;
    struct stat buf;
 -  std::ifstream diskstat;
- 
-   // the sum of all disks:
-   unsigned long long all_bytes_read,all_bytes_written;
- 
-   // ... while this is only one disk's value:
--  unsigned long sec_read,sec_written;
-   unsigned long sect_size;
- 
--  unsigned long dummy;
--
-   IntervalTimerStop();
-   total_ = maxspeed_;
- 
-@@ -281,29 +276,83 @@ void DiskMeter::getsysfsdiskinfo( void )
- 
-   // reset all sums
-   all_bytes_read=all_bytes_written=0L;
--  sect_size=0L;
+   char line[128];
+   unsigned long vals[7];
+   diskmap reads, writes;
+@@ -292,12 +287,65 @@ void DiskMeter::getsysfsdiskinfo( void )
  
    // visit every /sys/block/*/stat and sum up the values:
- 
    for (struct dirent *dirent; (dirent = readdir(dir)) != NULL; ) {
 +    std::string disk;
++    std::ifstream diskstat;
++    unsigned long sect_size;
 +
-     if (strncmp(dirent->d_name, ".", 1) == 0
--        || strncmp(dirent->d_name, "..", 2) == 0)
-+        || strncmp(dirent->d_name, "..", 2) == 0
-+        || strncmp(dirent->d_name, "loop", 4) == 0
-+        || strncmp(dirent->d_name, "ram", 3) == 0
-+        || strncmp(dirent->d_name, "fd", 2) == 0)
+     if (strncmp(dirent->d_name, ".", 1) == 0 ||
+-        strncmp(dirent->d_name, "..", 2) == 0)
++      strncmp(dirent->d_name, "..", 2) == 0 ||
++      strncmp(dirent->d_name, "loop", 4) == 0 ||
++      strncmp(dirent->d_name, "ram", 3) == 0 ||
++      strncmp(dirent->d_name, "fd", 2) == 0)
        continue;
  
-     disk = sysfs_dir + "/" + dirent->d_name;
- 
+     disk = sysfs_dir + dirent->d_name;
      if (stat(disk.c_str(), &buf) == 0 && buf.st_mode & S_IFDIR) {
-+       std::string tmp;
++      std::string tmp;
 +
-+       // only scan for real HW (raid, md, and lvm all mapped on them)
-+       tmp = disk + "/device";
-+       if (lstat(tmp.c_str(), &buf) != 0 || (buf.st_mode & S_IFLNK) == 0)
-+               continue;
-+
-+       // ignore removable devices
-+       tmp = disk + "/removable";
-+       if (stat(tmp.c_str(), &buf) == 0 && buf.st_mode & S_IFREG) {
-+               std::ifstream removable;
-+               int isremovable = 0;
-+
-+               removable.open(tmp.c_str());
-+               if (removable.good()) {
-+                   removable >> isremovable;
-+                   removable.close();
-+                   removable.clear();
-+               }
-+
-+               if (isremovable) continue;
-+       }
-+
-+       sect_size = 0UL;
-+
-+       tmp = "/dev/";
-+       tmp += dirent->d_name;
-+       if (lstat(tmp.c_str(), &buf) == 0)
-+               sect_size = (unsigned long)buf.st_blksize;
-+
-+       if (sect_size == 0UL) {
-+           tmp = disk + "/queue/max_sectors_kb";
-+           if (stat(tmp.c_str(), &buf) == 0 && (buf.st_mode & S_IFREG)) {
-+               std::ifstream max_sectors_kb;
-+
-+               max_sectors_kb.open(tmp.c_str());
-+               if (max_sectors_kb.good()) {
-+                   max_sectors_kb >> sect_size;
-+                   //XOSDEBUG("disk stat: %lu\n", sect_size);
-+                   max_sectors_kb.close();
-+                   max_sectors_kb.clear(); 
-+               }
-+           }
-+       }
-+
-+       if (sect_size == 0UL)
-+                sect_size = 512; // XXX: not always true
-+
-        // is a dir, locate 'stat' file in it
-        disk = disk + "/stat";
-        if (stat(disk.c_str(), &buf) == 0 && buf.st_mode & S_IFREG) {
-+                std::ifstream diskstat;
-+
-                 //XOSDEBUG("disk stat: %s\n",disk.c_str() );
-                 diskstat.open(disk.c_str());
-                 if ( diskstat.good() ) {
-+                   unsigned long sec_read, sec_written, dummy;
-+
-                    sec_read=sec_written=0L;
-                    diskstat >> dummy >> dummy >> sec_read >> dummy >> dummy 
>> dummy >> sec_written;
++      // only scan for real HW (raid, md, and lvm all mapped on them)
++      tmp = disk + "/device";
++      if (lstat(tmp.c_str(), &buf) != 0 || (buf.st_mode & S_IFLNK) == 0)
++      continue;
++
++      // ignore removable devices
++      tmp = disk + "/removable";
++      if (stat(tmp.c_str(), &buf) == 0 && buf.st_mode & S_IFREG) {
++      std::ifstream removable;
++      int isremovable = 0;
++
++      removable.open(tmp.c_str());
++      if (removable.good()) {
++        removable >> isremovable;
++        removable.close();
++        removable.clear();
++      }
++      if (isremovable)
++        continue;
++      }
++
++      tmp = "/dev/";
++      tmp += dirent->d_name;
++      if (lstat(tmp.c_str(), &buf) == 0)
++      sect_size = (unsigned long)buf.st_blksize;
++
++      if (sect_size == 0UL) {
++      tmp = disk + "/queue/hw_sectors_kb";
++      if (stat(tmp.c_str(), &buf) == 0 && (buf.st_mode & S_IFREG)) {
++        std::ifstream hw_sectors_kb;
++
++        hw_sectors_kb.open(tmp.c_str());
++        if (hw_sectors_kb.good()) {
++          hw_sectors_kb >> sect_size;
++          //XOSDEBUG("disk stat: %lu\n", sect_size);
++          hw_sectors_kb.close();
++          hw_sectors_kb.clear();
++        }
++      }
++      }
++
++      if (sect_size == 0UL)
++      sect_size = 512;
++
+       // is a dir, locate 'stat' file in it
+       disk += "/stat";
+       diskstat.open(disk.c_str());
+@@ -308,8 +356,8 @@ void DiskMeter::getsysfsdiskinfo( void )
+           vals[i] = strtoul(cur, &end, 10);
+           cur = end;
+         }
+-        reads[dirent->d_name]  = vals[2];
+-        writes[dirent->d_name] = vals[6];
++        reads[dirent->d_name]  = (unsigned long long)vals[2] * (unsigned long 
long)sect_size;
++        writes[dirent->d_name] = (unsigned long long)vals[6] * (unsigned long 
long)sect_size;
+ 
+         XOSDEBUG("disk stat: %s | read: %lu, written: %lu\n", disk.c_str(), 
vals[2], vals[6]);
+         diskstat.close();
+--- linux/diskmeter.h
++++ linux/diskmeter.h  2013-04-09 10:52:04.801939594 +0000
+@@ -11,8 +11,7 @@
+ #include <map>
+ #include <string>
  
--                   sect_size = 512; // XXX: not always true
+-typedef std::map<std::string, unsigned long> diskmap;
 -
-                    // XXX: ignoring wrap around case for each disk
-                    // (would require saving old vals for each disk etc..)
-                    all_bytes_read    += (unsigned long long) sec_read * 
(unsigned long long) sect_size;
++typedef std::map<std::string, unsigned long long> diskmap;
+ 
+ class DiskMeter : public FieldMeterGraph
+     {

++++++ xosview-1.9.2-longint.patch -> xosview-1.14-longint.patch ++++++
--- /work/SRC/openSUSE:Factory/xosview/xosview-1.9.2-longint.patch      
2012-02-08 17:21:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xosview.new/xosview-1.14-longint.patch  
2013-04-12 20:45:41.000000000 +0200
@@ -1,20 +1,20 @@
 --- linux/intmeter.cc
-+++ linux/intmeter.cc  2012-02-08 10:38:29.000000000 +0100
-@@ -17,11 +17,11 @@
++++ linux/intmeter.cc  2013-04-09 09:39:39.121939047 +0000
+@@ -12,11 +12,11 @@
+ #include <stdlib.h>
+ 
  static const char *INTFILE     = "/proc/interrupts";
- static const char *VERSIONFILE = "/proc/version";
+-static std::map<int,int> realintnum;
++static std::map<const int,int> realintnum;
  
--std::map<int,int> realintnum;
-+std::map<const int,int> realintnum;
  
  IntMeter::IntMeter( XOSView *parent, int cpu)
-   : BitMeter( parent, "INTS", "", 1,
--              0, 0 ), _cpu(cpu), _old(true) {
-+              0, 0 ), _cpu(cpu), _old(true), max(1024) {
-  if (getLinuxVersion() <= 2.0)
-       _old = true;
-  else
-@@ -91,10 +91,12 @@ void IntMeter::getirqs( void ){
+-  : BitMeter( parent, "INTS", "", 1, 0, 0 ), _cpu(cpu) {
++  : BitMeter( parent, "INTS", "", 1, 0, 0 ), _cpu(cpu), max(1024) {
+   _old = ( CPUMeter::getkernelversion() <= 2000000 ? true : false );
+   irqs_ = lastirqs_ = NULL;
+   initirqcount();
+@@ -61,13 +61,15 @@ void IntMeter::getirqs( void ){
    }
  
    if (!_old)
@@ -22,22 +22,16 @@
 +      intfile.ignore(max, '\n');
  
    while ( !intfile.eof() ){
-     intfile >> idx;
+     std::getline(intfile, line);
+     if ( line.find_first_of("0123456789") > line.find_first_of(':') )
+       break;  // reached non-numeric interrupts
+     idx = strtoul(line.c_str(), &end, 10);
 +    if (idx >= max)
-+      break;
++      break;
      intno = realintnum[idx];
-     if(intno>=numBits())
-       updateirqcount(intno,false);
-@@ -103,7 +105,7 @@ void IntMeter::getirqs( void ){
-     if ( !intfile.eof() ){
-       for (int i = 0 ; i <= _cpu ; i++)
-           intfile >>count;
--      intfile.ignore(1024, '\n');
-+      intfile.ignore(max, '\n');
- 
-       irqs_[intno] = count;
-     }
-@@ -170,7 +172,7 @@ void IntMeter::initirqcount( void ){
+     if ( intno >= numBits() )
+       updateirqcount(intno, false);
+@@ -164,7 +166,7 @@ void IntMeter::initirqcount( void ){
    if (!_old) {
      for (i=0; i<16; i++)
        realintnum[i] = i;
@@ -46,7 +40,7 @@
    }
  
    /* just looking for the highest number interrupt that
-@@ -187,7 +189,7 @@ void IntMeter::initirqcount( void ){
+@@ -181,7 +183,7 @@ void IntMeter::initirqcount( void ){
        intno = idx;
        realintnum[i] = idx++;
      }
@@ -56,11 +50,11 @@
    updateirqcount(intno, true);
  }
 --- linux/intmeter.h
-+++ linux/intmeter.h   2012-02-08 09:37:34.843758155 +0000
-@@ -26,6 +26,7 @@ protected:
- 
++++ linux/intmeter.h   2013-04-09 09:37:58.593938911 +0000
+@@ -27,6 +27,7 @@ protected:
    int _cpu;
    bool _old;
+   bool separate_;
 +  const int max;
  
    void getirqs( void );

++++++ xosview-1.9.2-maxlimit.patch -> xosview-1.14-maxlimit.patch ++++++
--- /work/SRC/openSUSE:Factory/xosview/xosview-1.9.2-maxlimit.patch     
2012-02-08 17:21:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xosview.new/xosview-1.14-maxlimit.patch 
2013-04-12 20:45:41.000000000 +0200
@@ -1,5 +1,5 @@
 --- xosview.h
-+++ xosview.h  2012-02-01 09:14:06.914433620 +0000
++++ xosview.h  2012-02-01 09:14:07.000000000 +0000
 @@ -7,6 +7,7 @@
  #ifndef _XOSVIEW_H_
  #define _XOSVIEW_H_
@@ -9,29 +9,29 @@
  #include "Xrm.h"  //  For Xrm resource manager class.
  
 --- linux/cpumeter.cc
-+++ linux/cpumeter.cc  2012-02-01 09:15:16.521934032 +0000
-@@ -15,7 +15,7 @@
- #include <ctype.h>
++++ linux/cpumeter.cc  2013-04-09 08:54:53.617939403 +0000
+@@ -23,7 +23,7 @@ static const char STATFILENAME[] = "/pro
+ static const char VERSIONFILENAME[] = "/proc/sys/kernel/osrelease";
+ static int cputime_to_field[10] = { 0, 1, 2, 9, 5, 4, 3, 8, 6, 7 };
  
- static const char STATFILENAME[] = "/proc/stat";
 -#define MAX_PROCSTAT_LENGTH 4096
 +#define MAX_PROCSTAT_LENGTH   BUFFER_SIZE
  
  CPUMeter::CPUMeter(XOSView *parent, const char *cpuID)
- : FieldMeterGraph( parent, 9, toUpper(cpuID), 
"USR/NICE/SYS/SI/HI/WIO/GST/ST/IDLE" ) {
+ : FieldMeterGraph( parent, 10, toUpper(cpuID), 
"USR/NIC/SYS/SI/HI/WIO/GST/NGS/STL/IDLE" ) {
 --- linux/diskmeter.cc
-+++ linux/diskmeter.cc 2012-02-01 09:14:59.081934045 +0000
++++ linux/diskmeter.cc 2012-02-01 09:14:59.000000000 +0000
 @@ -15,7 +15,7 @@
  #include <errno.h>
- 
+ #include <limits.h>
  
 -#define MAX_PROCSTAT_LENGTH 2048
 +#define MAX_PROCSTAT_LENGTH   BUFFER_SIZE
  
+ 
  DiskMeter::DiskMeter( XOSView *parent, float max ) : FieldMeterGraph(
-   parent, 3, "DISK", "READ/WRITE/IDLE"), _vmstat(false),
 --- linux/pagemeter.cc
-+++ linux/pagemeter.cc 2012-02-01 09:14:42.149964689 +0000
++++ linux/pagemeter.cc 2012-02-01 09:14:42.000000000 +0000
 @@ -12,7 +12,7 @@
  #include <sys/stat.h>
  #include <unistd.h>

++++++ xosview-1.9.2-procsys.patch -> xosview-1.14-procsys.patch ++++++
--- /work/SRC/openSUSE:Factory/xosview/xosview-1.9.2-procsys.patch      
2012-02-08 17:21:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xosview.new/xosview-1.14-procsys.patch  
2013-04-12 20:45:41.000000000 +0200
@@ -1,98 +1,49 @@
---- linux/intmeter.cc
-+++ linux/intmeter.cc  2012-02-08 11:59:17.001933755 +0100
-@@ -3,7 +3,7 @@
- //
+--- linux/cpumeter.cc
++++ linux/cpumeter.cc  2013-04-09 08:52:16.941732556 +0000
+@@ -4,6 +4,8 @@
  //  This file may be distributed under terms of the GPL
  //
--
+ 
 +#define USE_UNAME     1       // Use fast uname API
- #include "intmeter.h"
- #include "xosview.h"
++
  #include "cpumeter.h"
-@@ -11,8 +11,9 @@
+ #include "xosview.h"
+ #include <fstream>
+@@ -13,6 +15,9 @@
+ #include <string>
  #include <sstream>
- #include <map>
- #include <stdlib.h>
--
--
+ #include <ctype.h>
 +#ifdef USE_UNAME
 +# include <sys/utsname.h>
 +#endif
- static const char *INTFILE     = "/proc/interrupts";
- static const char *VERSIONFILE = "/proc/version";
  
-@@ -55,6 +56,7 @@ void IntMeter::checkResources( void ){
+ static const char STATFILENAME[] = "/proc/stat";
+ static const char VERSIONFILENAME[] = "/proc/sys/kernel/osrelease";
+@@ -337,6 +342,9 @@ const char *CPUMeter::toUpper(const char
  }
  
- float IntMeter::getLinuxVersion(void) {
+ int CPUMeter::getkernelversion(void){
++  static int major = 0, minor = 0, micro = 0;
++  if (!major) {
 +#ifndef USE_UNAME
-     std::ifstream vfile(VERSIONFILE);
-     if (!vfile) {
-       std::cerr << "Can not open file : " << VERSIONFILE << std::endl;
-@@ -65,7 +67,12 @@ float IntMeter::getLinuxVersion(void) {
-     float rval;
-     vfile >> dump >> dump; // Drop the first two words
-     vfile >> rval; // Drops everything but #.# (float regex)
--
-+#else
-+    struct utsname myosrelease;
-+    char *myendptr;
-+    uname(&myosrelease);
-+    float rval = strtof(myosrelease.release, &myendptr);
-+#endif
-     return rval;
- }
- 
---- linux/netmeter.cc
-+++ linux/netmeter.cc  2012-02-01 09:11:43.109934021 +0000
-@@ -22,6 +22,7 @@
- // its display.
- //-----------------------------------------------------------------------
+   std::ifstream f(VERSIONFILENAME);
+   if (!f) {
+     std::cerr << "Can not get kernel version from " << VERSIONFILENAME << "." 
<< std::endl;
+@@ -344,10 +352,13 @@ int CPUMeter::getkernelversion(void){
+   }
  
-+#define USE_UNAME     1       // Use fast uname API
- 
- #include "netmeter.h"
- #include "xosview.h"
-@@ -32,6 +33,9 @@
- #include <stdlib.h>
- #include <sys/socket.h>
- #include <sys/ioctl.h>
-+#ifdef USE_UNAME
-+# include <sys/utsname.h>
-+#endif
- #if defined(GNULIBC) || defined(__GLIBC__)
- #include <net/if.h>
- #else
-@@ -59,6 +63,7 @@ NetMeter::~NetMeter( void ){
- 
- void NetMeter::checkOSVersion(void)
-     {
-+#ifndef USE_UNAME
-     std::ifstream ifs("/proc/sys/kernel/osrelease");
-     if (!ifs)
-         {
-@@ -66,14 +71,22 @@ void NetMeter::checkOSVersion(void)
-           << std::endl;
-         exit(1);
-         }
+   std::string version;
+-  int major = 0, minor = 0, micro = 0;
 -
-+#else
-+    struct utsname myosrelease;
-+    char *myendptr;
-+#endif
-     int major, minor;
-     _bytesInDev = 0;
-+#ifndef USE_UNAME
-     ifs >> major;
-     ifs.ignore(1);
-     ifs >> minor;
-     ifs.ignore(1);
+   f >> version;
+   sscanf(version.c_str(), "%d.%d.%d", &major, &minor, &micro);
 -
+-  return ( major*1000000 + minor*1000 + micro);
 +#else
-+    uname(&myosrelease);
-+    major=strtol(myosrelease.release, &myendptr, 10);
-+    minor=strtol(myendptr+1, (char **)NULL, 10);
++  struct utsname myosrelease;
++  uname(&myosrelease);
++  sscanf(myosrelease.release, "%d.%d.%d", &major, &minor, &micro);
 +#endif
-     if (major > 2 || (major == 2 && minor >= 1))
-         {
-       // check presence of iacct and oacct chains
++  }
++  return (major*1000000 + minor*1000 + micro);
+ }

++++++ xosview-1.9.2-serial.patch -> xosview-1.14-serial.patch ++++++
--- /work/SRC/openSUSE:Factory/xosview/xosview-1.9.2-serial.patch       
2013-03-11 07:54:15.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xosview.new/xosview-1.14-serial.patch   
2013-04-12 20:45:41.000000000 +0200
@@ -1,21 +1,6 @@
-Index: config/Makefile.linux.in
-===================================================================
---- config/Makefile.linux.in.orig
-+++ config/Makefile.linux.in
-@@ -26,7 +26,7 @@ raidmeter.o \
- lmstemp.o \
- MeterMaker.o
- 
--FAIL_ARCHS = arm m68k powerpc s390 sparc 3D s390x powerpc64
-+FAIL_ARCHS = arm m68k powerpc s390 sparc 3D s390x powerpc64 aarch64
- 
- # Test for arm specifically, because arm can show up as a number of
- # things prefixed by "arm"
-Index: linux/MeterMaker.cc
-===================================================================
---- linux/MeterMaker.cc.orig
-+++ linux/MeterMaker.cc
-@@ -108,7 +108,7 @@ if ( stats ) {
+--- linux/MeterMaker.cc
++++ linux/MeterMaker.cc        2013-04-09 00:00:00.000000000 +0000
+@@ -111,7 +111,7 @@ void MeterMaker::makeMeters(void){
  
  
    // check for the serial meters.

++++++ xosview-1.14-sysinfo.patch ++++++
--- linux/swapmeter.cc
+++ linux/swapmeter.cc  2013-04-09 12:10:10.713438774 +0000
@@ -4,11 +4,16 @@
 //  This file may be distributed under terms of the GPL
 //
 
+#define USE_SYSCALLS   1       // Use fast sysinfo API
+
 #include "swapmeter.h"
 #include "xosview.h"
 #include <fstream>
 #include <sstream>
 #include <stdlib.h>
+#ifdef USE_SYSCALLS
+# include <sys/sysinfo.h>
+#endif
 
 static const char MEMFILENAME[] = "/proc/meminfo";
 
@@ -37,7 +42,25 @@ void SwapMeter::checkevent( void ){
   drawfields();
 }
 
+#ifdef USE_SYSCALLS
+void SwapMeter::getswapinfo( void ){
+  struct sysinfo sinfo;
+  typeof (sinfo.mem_unit) unit;
+
+  sysinfo(&sinfo);
+  unit = (sinfo.mem_unit ? sinfo.mem_unit : 1);
+  total_ = (double)sinfo.totalswap * unit;
+  fields_[0] = (double)(sinfo.totalswap - sinfo.freeswap) * unit;
 
+  if ( total_ == 0 ){
+    total_ = 1;
+    fields_[0] = 0;
+  }
+
+  if (total_)
+    setUsed (fields_[0], total_);
+}
+#else
 void SwapMeter::getswapinfo( void ){
   std::ifstream meminfo( MEMFILENAME );
   if ( !meminfo ){
@@ -78,3 +101,4 @@ void SwapMeter::getswapinfo( void ){
   if (total_)
     setUsed (fields_[0], total_);
 }
+#endif
++++++ xosview-1.9.2-appdef.dif -> xosview-1.14.dif ++++++
++++ 939 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/xosview/xosview-1.9.2-appdef.dif
++++ and /work/SRC/openSUSE:Factory/.xosview.new/xosview-1.14.dif

++++++ xosview-rpmlintrc ++++++
addFilter(".*non-etc-or-var-file-marked-as-conffile.*")
addFilter(".*no-manual-page-for-binary.*")
++++++ xosview.desktop ++++++
--- /var/tmp/diff_new_pack.slc45g/_old  2013-04-12 20:45:46.000000000 +0200
+++ /var/tmp/diff_new_pack.slc45g/_new  2013-04-12 20:45:46.000000000 +0200
@@ -1,5 +1,5 @@
 [Desktop Entry]
-Categories=System;Monitor
+Categories=System;Monitor;
 Encoding=UTF-8
 Name=X osview
 GenericName=System Monitor

++++++ xosview.png ++++++
Files /var/tmp/diff_new_pack.slc45g/_old and /var/tmp/diff_new_pack.slc45g/_new 
differ

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to