--- xosview-1.8.2.orig/linux/serialmeter.cc
+++ xosview-1.8.2/linux/serialmeter.cc
@@ -32,7 +32,7 @@
 
 #include <unistd.h>
 #if defined(GNULIBC) || defined(__GLIBC__)
-#if !defined(__hppa__) && !defined(__mips__)
+#if !defined(__hppa__) && !defined(__mips__) && !defined(__sparc__)
 #include <sys/io.h>
 #endif
 #if !defined(__alpha__) && !defined(__sparc__) && !defined(__powerpc__) && !defined(__ia64__) && !defined(__hppa__) && !defined(__arm__) && !defined(__mips__)
--- xosview-1.8.2.orig/linux/netmeter.cc
+++ xosview-1.8.2/linux/netmeter.cc
@@ -119,6 +119,7 @@
   useGraph_ = parent_->isResourceTrue( "netGraph" );
   dodecay_ = parent_->isResourceTrue( "netDecay" );
   SetUsedFormat (parent_->getResource("netUsedFormat"));
+  netIface_ = parent_->getResource( "netIface" );
 
   _ipsock = socket(AF_INET, SOCK_DGRAM, 0);
   if (_ipsock == -1) {
@@ -171,13 +172,30 @@
         }
     else
         {
+	  std::string ifname;
 	  ifs.ignore(1024, '\n');
 	  ifs.ignore(1024, '\n');
 
 	  while (ifs)
 	      {
-	      ifs.ignore(1024, ':');
-              ifs >> str_in;
+		if (netIface_ == "False" ) 
+		  {
+		    ifs.ignore(1024, ':');
+		  }
+		else
+		  {
+		    ifs.get(buf, 128, ':');
+		    ifname = buf;
+		    ifs.ignore(1, ':');
+		    ifname.erase(0, ifname.find_first_not_of(" ") );
+		    if (ifname != netIface_) 
+		      {
+			ifs.ignore(1024,'\n');
+			continue;
+		      }
+		  }
+
+	      ifs >> str_in;
               if (str_in == "No")
                 continue;
               else
--- xosview-1.8.2.orig/linux/lmstemp.cc
+++ xosview-1.8.2/linux/lmstemp.cc
@@ -19,15 +19,18 @@
 #include <dirent.h>
 #include <sys/stat.h>
 
-static const char PROC_SENSORS[] = "/proc/sys/dev/sensors";
+static const char PROC_SENSORS_24[] = "/proc/sys/dev/sensors";
+static const char PROC_SENSORS_26[] = "/sys/bus/i2c/devices";
 
 LmsTemp::LmsTemp( XOSView *parent, const char *filename, const char *label,
 		 const char *caption)
   : FieldMeter( parent, 3, label, caption, 1, 1, 0 ){
-    if(!checksensors(filename)) {
-	std::cerr <<"Can not find file : " <<PROC_SENSORS <<"/*/" << filename
-          << std::endl;
-    	parent_->done(1);
+    if(!checksensors(1, PROC_SENSORS_24, filename)) {
+	if(!checksensors(0, PROC_SENSORS_26, filename)) {
+	    std::cerr <<"Can not find file : " <<PROC_SENSORS_24 <<"/*/" << filename
+		      << std::endl;
+	    parent_->done(1);
+	}
     }
     char *p;
     if ((p = strrchr(caption,'/')) != 0)
@@ -40,14 +43,14 @@
 }
 
 /* this part is adapted from ProcMeter3.2 */
-int  LmsTemp::checksensors(const char* filename)
+int  LmsTemp::checksensors(int isproc, const char *dir, const char* filename)
 {
   bool found = false;
   DIR *d1, *d2;
   struct dirent *ent1, *ent2;
   struct stat buf;
 
-  d1=opendir(PROC_SENSORS);
+  d1=opendir(dir);
   if(!d1)
     return false;
   else
@@ -61,7 +64,7 @@
 	  if(!strncmp(ent1->d_name,"..", 2))
 	    continue;
 
-	  snprintf(dirname, 64, "%s/%s",PROC_SENSORS ,ent1->d_name);
+	  snprintf(dirname, 64, "%s/%s",dir ,ent1->d_name);
 	  if(stat(dirname,&buf)==0 && S_ISDIR(buf.st_mode))
 	    {
 	      d2=opendir(dirname);
@@ -75,12 +78,17 @@
 
 		      char f[80];
 		      snprintf(f, 80, "%s/%s",dirname,ent2->d_name);
+
 		      if(stat(f,&buf)!=0 || !S_ISREG(buf.st_mode))
 			continue;
 
-		      if(!strncmp(ent2->d_name, filename, strlen(filename)))
+		      if((isproc && !strncmp(ent2->d_name, filename, strlen(filename))) ||
+			 (!isproc && !strncmp(ent2->d_name, filename, strlen(filename)) && !strcmp(ent2->d_name+strlen(filename), "_input")))
 			{
+			  if (!isproc)
+			      f[strlen(f)-6] = '\0';
 			  strcpy(_filename, f);
+			  _isproc = isproc;
 			  found = true;
 			  break;
 			}
@@ -137,17 +145,49 @@
 //
 
 void LmsTemp::getlmstemp( void ){
-  std::ifstream file( _filename );
+  // dummy, high changed from integer to double to allow it to display
+  // the full value, unfit for an int. (See Debian bug #183695)
+  double dummy, high;
+
+  if (_isproc) {
+    std::ifstream file( _filename );
+
+    if ( !file ){
+	std::cerr <<"Can not open file : " <<file << std::endl;
+	parent_->done(1);
+	return;
+    }
 
-  if ( !file ){
-    std::cerr <<"Can not open file : " <<file << std::endl;
-    parent_->done(1);
-    return;
+    file >> high >> dummy >> fields_[0];
   }
+  else {
+      char f[128], *p;
+      strcpy(f, _filename);
+      p = f+strlen(f);
+
+      strcpy(p, "_input");
+      std::ifstream file1(f);
+      if ( !file1 ){
+	  std::cerr <<"Can not open file : " <<file1 << std::endl;
+	  parent_->done(1);
+	  return;
+      }
+      file1 >> fields_[0];
+      
+      strcpy(p, "_max");
+      std::ifstream file2(f);
+      if ( !file2 ){
+	  std::cerr <<"Can not open file : " <<file2 << std::endl;
+	  parent_->done(1);
+	  return;
+      }
+      file2 >> high;
 
-  int dummy, high;
+      fields_[0] = (fields_[0]+500)/1000;
+      high = (high+500)/1000;
+  }
+  
   total_ = _highest;  // Max temp
-  file >> high >> dummy >> fields_[0];
   fields_[1] = high - fields_[0];
   if(fields_[1] <= 0) {	// alarm
     fields_[1] = 0;
--- xosview-1.8.2.orig/linux/swapmeter.cc
+++ xosview-1.8.2/linux/swapmeter.cc
@@ -76,24 +76,25 @@
 
   if (total_)
     setUsed (fields_[0], total_);
+
 }
 #else
 void SwapMeter::getswapinfo( void ){
   std::ifstream meminfo( MEMFILENAME );
   if ( !meminfo ){
-    std::cerr <<"Con not open file : " <<MEMFILENAME << std::endl;
+    std::cerr <<"Cannot open file : " <<MEMFILENAME << std::endl;
     exit( 1 );
   }
 
   total_ = fields_[0] = fields_[1] = 0;
 
   char buf[256];
-  char ignore[256];
+  string ignore;
 
   // Get the info from the "standard" meminfo file.
   while (!meminfo.eof()){
     meminfo.getline(buf, 256);
-    istrstream line(buf, 256);
+    std::istringstream line(std::string(buf, 256));
 
     if(!strncmp("SwapTotal", buf, strlen("SwapTotal")))
         line >> ignore >> total_;
--- xosview-1.8.2.orig/linux/btrymeter.cc
+++ xosview-1.8.2/linux/btrymeter.cc
@@ -44,10 +44,16 @@
   if (getapminfo() || getacpiinfo())
     return;
 
-  std::cerr <<"Cannot get battery information" << std::endl;
-  std::cerr <<"If using APM, have you loaded the `apm' module?" << std::endl;
-  std::cerr <<"If using ACPI, have you loaded the `battery' module?" << std::endl;
-  parent_->done(1);
+  // We can hit this spot in any of two cases:
+  // - We have an ACPI system and the battery is removed
+  // - We have neither ACPI nor APM in the system
+  // We report an empty battery (i.e., we are running off AC power) instead of
+  // original behavior of just exiting the program.
+  // (Refer to Debian bug report #281565)
+  total_ = 100;
+  fields_[0] = 0;
+  fields_[1] = 100;
+  setUsed(fields_[0], total_);
 }
 
 
@@ -62,6 +68,12 @@
   char buff[256];
   loadinfo >> buff >> buff >> buff >> buff >> buff >> buff >> fields_[0];
 
+  // If the battery status is reported as a negative number, it means we are
+  // running on AC power and no battery status is available - Report it as
+  // completely empty (0). (Refer to Debian bug report #281565)
+  if (fields_[0] < 0) 
+    fields_[0] = 0;
+
   total_ = 100;
 
   fields_[1] = total_ - fields_[0];
@@ -113,7 +125,7 @@
 
 bool BtryMeter::getacpiinfofield(const std::string& filename,
 				 const std::string& fieldname,
-				 float& value){
+				 double& value){
   std::ifstream loadinfo(filename.c_str());
   if (!loadinfo)
     return false; // how come?
--- xosview-1.8.2.orig/linux/memmeter.h
+++ xosview-1.8.2/linux/memmeter.h
@@ -28,7 +28,7 @@
 
   class LineInfo {
   public:
-    LineInfo(const char *id, float *val) 
+    LineInfo(const char *id, double *val) 
       { _line = -1; _id = id; _val = val; _idlen = strlen(_id); }
     LineInfo(void) {};
     
@@ -43,7 +43,7 @@
     int _line;
     const char *_id;
     int _idlen;
-    float *_val;
+    double *_val;
   };
   
   LineInfo *_MIlineInfos;
--- xosview-1.8.2.orig/linux/lmstemp.h
+++ xosview-1.8.2/linux/lmstemp.h
@@ -28,10 +28,11 @@
 protected:
 
   void getlmstemp( void );
-  int  checksensors(const char* filename);
+  int  checksensors(int isproc, const char *dir, const char* filename);
 private:
   char _filename[80];
   int _highest;
+  int _isproc;
 };
 
 
--- xosview-1.8.2.orig/linux/btrymeter.h
+++ xosview-1.8.2/linux/btrymeter.h
@@ -30,7 +30,7 @@
   bool getacpiinfo( void );
   bool getacpiinfofield(const std::string& filename,
 			const std::string& fieldname,
-			float& value);
+			double& value);
 
   int alarmThreshold;
 };
--- xosview-1.8.2.orig/linux/intmeter.cc
+++ xosview-1.8.2/linux/intmeter.cc
@@ -63,12 +63,10 @@
       exit(1);
     }
 
-    char buffer[128];
-    vfile >> buffer >> buffer >> buffer;
-    *strrchr(buffer, '.') = '\0';
-    std::istringstream is(std::string(buffer, 128));
-    float rval = 0.0;
-    is >> rval;
+    std::string dump;
+    float rval;
+    vfile >> dump >> dump; // Drop the first two words
+    vfile >> rval; // Drops everything but #.# (float regex)
 
     return rval;
 }
--- xosview-1.8.2.orig/linux/netmeter.h
+++ xosview-1.8.2/linux/netmeter.h
@@ -25,6 +25,7 @@
   void checkResources( void );
 protected:
   float maxpackets_;
+  std::string netIface_;
 
 private:
   int _ipsock;
--- xosview-1.8.2.orig/xwin.cc
+++ xosview-1.8.2/xwin.cc
@@ -1,5 +1,5 @@
 //
-// $Id$
+// $Id: xwin.cc,v 1.15 2002/03/24 23:52:51 zedpobre Exp $
 //
 
 #include <X11/Xatom.h>
@@ -10,7 +10,7 @@
 #include "xwin.h"
 #include "Xrm.h"
 
-CVSID("$Id$");
+CVSID("$Id: xwin.cc,v 1.15 2002/03/24 23:52:51 zedpobre Exp $");
 CVSID_DOT_H(XWIN_H_CVSID);
 
 //-----------------------------------------------------------------------------
@@ -103,6 +103,7 @@
 				fgcolor_, bgcolor_);
 
 
+
   setHints( argc, argv );
 
   // Finally, create a graphics context for the main window
@@ -124,11 +125,13 @@
 	XSetWindowBackgroundPixmap(display_,window_,background_pixmap);
   }
 
-  // Do transparency if requested
-  if(isResourceTrue("transparent"))
-  {
-        XSetWindowBackgroundPixmap(display_,window_,ParentRelative);
-  }         
+  // Transparency disabled for Debian builds as it just gets garbled up
+  // (see Debian bug #130633)
+//   // Do transparency if requested
+//   if(isResourceTrue("transparent"))
+//   {
+//         XSetWindowBackgroundPixmap(display_,window_,ParentRelative);
+//   }         
   
   // add the events
   Event *tmp = events_;
--- xosview-1.8.2.orig/fieldmeter.cc
+++ xosview-1.8.2/fieldmeter.cc
@@ -297,7 +297,7 @@
   delete[] colors_;
   delete[] lastvals_;
   delete[] lastx_;
-  fields_ = new float[numfields_];
+  fields_ = new double[numfields_];
   colors_ = new unsigned long[numfields_];
   lastvals_ = new int[numfields_];
   lastx_ = new int[numfields_];
--- xosview-1.8.2.orig/xosview.1
+++ xosview-1.8.2/xosview.1
@@ -1,6 +1,6 @@
 '\" t
 .\" @(#)xosview.1	1.8.2 1/99 "
-.TH XOSVIEW 1.8.2 "$Date$"
+.TH XOSVIEW 1 1.8.2 "$Date$"
 .UC
 .SH NAME
 xosview \- X based system monitor
@@ -210,10 +210,9 @@
 Sets the Resource name xosview will use (same as the -name option
 for typical X applications like xterm).  When performing resource
 lookups, xosview will look under \fIname\fP, and then under
-``xosview''.  For an example, perform the following (as
-documented in README.netbsd):
+``xosview''.  For an example, in order to request the ``stipple''
+style (see /usr/share/doc/xosview/README.stipple):
 .RS
-  xrdb -merge Xdefaults.stipple
   xosview -name xosvstipple &
   xosview -name xosvstipplebw &
 .RE
@@ -494,7 +493,7 @@
 xosview*cpu: (True or False)
 .RS
 If True then xosview will display a cpu meter.  On linux SMP machines this
-will cause a seperate meter to be displayed for each cpu if Jerome Forissier's
+will cause a separate meter to be displayed for each cpu if Jerome Forissier's
 kernel patch has been applied.  See the 'README.linux' file for more
 details. On IRIX 6.5, the resource cpuFormat decides which meters are
 created for multiple CPUs.
@@ -665,9 +664,15 @@
 This number is used to specify the expected maximum bandwidth
 (in bytes / sec) for the meter.  When the expected maximum bandwidth
 (\fImaxBytes\fP) is exceeded then the network meter will display the
-relative percentage of network usage (25% incomming, 75% outgoing).
+relative percentage of network usage (25% incoming, 75% outgoing).
 .RE
 
+xosview*netIface: \fIinterface\fP
+.RS
+If False, xosview will display the data received/transmitted by any of
+the network interfaces. Otherwise, xosview will only display the data
+received/transmitted by the specified network interface. 
+
 .\"  net{In,Out}Color:
 .cc net In incoming
 .cc net Out outgoing
@@ -827,7 +832,7 @@
 Name of temperature file from /proc/sys/dev/sensors/*/*, N=1..
 .br
 Note if more files with same name exists, only the first is found. There is
-currently no possiblity to configure equal named files on different busses
+currently no possibility to configure equal named files on different busses
 (which would be rarely necessary, I hope).
 .br
 eg.
--- xosview-1.8.2.orig/confdefs.h
+++ xosview-1.8.2/confdefs.h
@@ -0,0 +1,5 @@
+
+#define HAVE_BOOL 1
+#define LONG_LONG long long
+#define HAVE_SNPRINTF 1
+#define HAVE_VSNPRINTF 1
--- xosview-1.8.2.orig/Xrm.cc
+++ xosview-1.8.2/Xrm.cc
@@ -98,7 +98,11 @@
     char fcn_lower[1024];
     strncpy(fcn_lower, className(), 1024);
     char* p = fcn_lower;
-    while (p && *p)  *p++ = tolower(*p);
+    while (p && *p)
+    {
+	*p = tolower(*p);
+	p++;
+    }
     snprintf(fcn, 1024, "%s.%s", fcn_lower, rname);
     XrmGetResource(_db, frn, fcn, &type, &val);
   }
--- xosview-1.8.2.orig/hpux/loadmeter.cc
+++ xosview-1.8.2/hpux/loadmeter.cc
@@ -39,7 +39,7 @@
     //  prevent this whole problem, the load meter can not be a decay
     //  meter.  The load is a decaying average kind of thing anyway,
     //  so having a decaying load average is redundant.
-    cerr << "Warning:  The loadmeter can not be configured as a decay\n"
+	  std::cerr << "Warning:  The loadmeter can not be configured as a decay\n"
          << "  meter.  See the source code (" << __FILE__ << ") for further\n"
          << "  details.\n";
     dodecay_ = 0;
--- xosview-1.8.2.orig/Xdefaults
+++ xosview-1.8.2/Xdefaults
@@ -21,7 +21,8 @@
 !xosview*display:
 xosview*captions:           True
 xosview*labels:             True
-xosview*transparent:        False
+! Transparency disabled in Debian builds - See bug #130633
+! xosview*transparent:        False
 xosview*meterLabelColor:    wheat
 xosview*usedlabels:         True
 xosview*usedLabelColor:     wheat
@@ -137,6 +138,7 @@
 xosview*netDecay:           True
 xosview*netGraph:           True
 xosview*netUsedFormat:	    autoscale
+xosview*netIface:           False
 
 ! Linux-only resources:
 
@@ -217,6 +219,10 @@
 xosview*verticalMargin:        5
 xosview*verticalSpacing:       5
 
+xosview*horizontalMargin:      5
+xosview*verticalMargin:        5
+xosview*verticalSpacing:       5
+
 ! Lms Temp
 xosview*lmstemp:	False
 xosview*lmstempActColor:	blue
--- xosview-1.8.2.orig/sunos5/diskmeter.cc
+++ xosview-1.8.2/sunos5/diskmeter.cc
@@ -7,7 +7,7 @@
 
 #include "diskmeter.h"
 #include "xosview.h"
-#include <fstream.h>
+#include <fstream>
 #include <stdlib.h>
 
 
--- xosview-1.8.2.orig/sunos5/cpumeter.cc
+++ xosview-1.8.2/sunos5/cpumeter.cc
@@ -8,7 +8,7 @@
 #include <unistd.h>
 #include <ctype.h>
 #include <string.h>
-#include <strstream.h>
+#include <sstream>
 
 CPUMeter::CPUMeter(XOSView *parent, kstat_ctl_t *_kc, int cpuid)
 	: FieldMeterGraph(parent, CPU_STATES, toUpper(cpuStr(cpuid)),
@@ -92,13 +92,14 @@
 const char *CPUMeter::cpuStr(int num)
 {
 	static char buffer[32];
-	ostrstream str(buffer, 32);
+	std::ostringstream str;
 
 	str << "cpu";
 	if (num != 0)
 		str << (num - 1);
-	str << ends;
+	str << std::ends;
 
+	str.str().copy(buffer, 32, 0);
 	return buffer;
 }
 
--- xosview-1.8.2.orig/sunos5/loadmeter.cc
+++ xosview-1.8.2/sunos5/loadmeter.cc
@@ -52,7 +52,7 @@
 		 * anyway, so having a decaying load average is
 		 * redundant.
 		 */
-		cerr << "Warning:  The loadmeter can not be configured as a decay\n"
+		std::cerr << "Warning:  The loadmeter can not be configured as a decay\n"
 		     << "  meter.  See the source code (" << __FILE__ << ") for further\n"
 		     << "  details.\n";
 		dodecay_ = 0;
--- xosview-1.8.2.orig/irix65/cpumeter.cc
+++ xosview-1.8.2/irix65/cpumeter.cc
@@ -8,7 +8,7 @@
 #include <unistd.h>
 #include <ctype.h>
 #include <string.h>
-#include <strstream.h>
+#include <sstream>
 
 CPUMeter::CPUMeter(XOSView *parent, int cpuid)
     : FieldMeterGraph(parent, USED_CPU_STATES, toUpper(cpuStr(cpuid)),
@@ -19,7 +19,7 @@
             cputime_[i][j] = 0;
 
     if ((sinfosz = sysmp(MP_SASZ, MPSA_SINFO)) < 0) {
-        cerr << "sysinfo scall interface not supported" << endl;
+	    std::cerr << "sysinfo scall interface not supported" << std::endl;
         parent_->done(1);
         return;
     }
--- xosview-1.8.2.orig/irix65/loadmeter.cc
+++ xosview-1.8.2/irix65/loadmeter.cc
@@ -61,7 +61,7 @@
         //  prevent this whole problem, the load meter can not be a decay
         //  meter.  The load is a decaying average kind of thing anyway,
         //  so having a decaying load average is redundant.
-        cerr << "Warning:  The loadmeter can not be configured as a decay\n"
+	    std::cerr << "Warning:  The loadmeter can not be configured as a decay\n"
              << "  meter. See the source code (" <<__FILE__<< ") for further\n"
              << "  details.\n";
         dodecay_ = 0;
@@ -77,7 +77,7 @@
 void LoadMeter::getloadinfo(void)
 {
     if (rstat (hostname, &res) != 0) {
-        cerr << hostname <<endl;
+	    std::cerr << hostname <<std::endl;
         perror ("rstat");
         return;
     }
--- xosview-1.8.2.orig/irix65/gfxmeter.cc
+++ xosview-1.8.2/irix65/gfxmeter.cc
@@ -70,7 +70,7 @@
         //  prevent this whole problem, the gfx meter can not be a decay
         //  meter.  The gfx is a decaying average kind of thing anyway,
         //  so having a decaying gfx average is redundant.
-        cerr << "Warning:  The gfxmeter can not be configured as a decay\n"
+	    std::cerr << "Warning:  The gfxmeter can not be configured as a decay\n"
              << "  meter. See the source code (" <<__FILE__<< ") for further\n"
              << "  details.\n";
         dodecay_ = 0;
--- xosview-1.8.2.orig/Xdefaults.in
+++ xosview-1.8.2/Xdefaults.in
@@ -21,7 +21,8 @@
 !xosview*display:
 xosview*captions:           True
 xosview*labels:             True
-xosview*transparent:        False
+! Transparency disabled in Debian builds - See bug #130633
+! xosview*transparent:        False
 xosview*meterLabelColor:    wheat
 xosview*usedlabels:         True
 xosview*usedLabelColor:     wheat
@@ -137,6 +138,7 @@
 xosview*netDecay:           True
 xosview*netGraph:           True
 xosview*netUsedFormat:	    autoscale
+xosview*netIface:           False
 
 ! Linux-only resources:
 
@@ -217,6 +219,10 @@
 xosview*verticalMargin:        5
 xosview*verticalSpacing:       5
 
+xosview*horizontalMargin:      5
+xosview*verticalMargin:        5
+xosview*verticalSpacing:       5
+
 ! Lms Temp
 xosview*lmstemp:	False
 xosview*lmstempActColor:	blue
--- xosview-1.8.2.orig/config/aclocal.m4
+++ xosview-1.8.2/config/aclocal.m4
@@ -55,7 +55,7 @@
 
 dnl	For gcc-based (or primarily-gcc) OS's, set EXTRA_CXXFLAGS to -Wall -O4
 AC_DEFUN(AC_GCC_EXTRA_CXXFLAGS, [
-	EXTRA_CXXFLAGS="-Wall -O4"
+	EXTRA_CXXFLAGS="-W -Wall -O2"
 ])
 
 AC_DEFUN(SMP_LINUX,
@@ -137,7 +137,7 @@
 #ifdef CONFIG_MODVERSIONS
 yes
 #endif
-], [USE_MOD_VERSIONS=-DMODVERSIONS] AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
+], [USE_MOD_VERSIONS=-DMODVERSIONS; AC_MSG_RESULT(yes)], AC_MSG_RESULT(no))
 SMP_LINUX
 INSTALL_ARGS='-m 755'
 fi
@@ -158,7 +158,7 @@
 #ifdef CONFIG_MODVERSIONS
 yes
 #endif
-], [USE_MOD_VERSIONS=-DMODVERSIONS] AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
+], [USE_MOD_VERSIONS=-DMODVERSIONS; AC_MSG_RESULT(yes)], AC_MSG_RESULT(no))
         SMP_LINUX
 else
         MEMSTAT=
--- xosview-1.8.2.orig/config/Makefile.linux.in
+++ xosview-1.8.2/config/Makefile.linux.in
@@ -7,6 +7,9 @@
 include ../Makefile.config
 @AUTODEPRULE_SUBDIR@
 
+#arch=$(shell uname -m)
+#export arch
+
 CXXFLAGS += -I@top_srcdir@
 
 OBJS = \
--- xosview-1.8.2.orig/config/configure.in
+++ xosview-1.8.2/config/configure.in
@@ -1,5 +1,5 @@
 dnl
-dnl $Id$
+dnl $Id: configure.in,v 1.52 2002/02/18 02:11:13 bgrayson Exp $
 dnl
 AC_INIT(xosview.1)
 CF_TOP_SRCDIR
@@ -10,6 +10,74 @@
 ICE_CXX_LONG_LONG
 AC_PATH_X
 CXXFLAGS="$CXXFLAGS -I$x_includes"
+
+dnl
+dnl Added a proper check for the snprintf() function
+dnl
+
+AC_DEFUN([AC_FUNC_SNPRINTF],
+[AC_CHECK_FUNCS(snprintf vsnprintf)
+AC_MSG_CHECKING(for working snprintf)
+AC_CACHE_VAL(ac_cv_have_working_snprintf,
+[AC_TRY_RUN(
+[#include <stdio.h>
+
+int main(void)
+{
+    char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
+    char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
+    int i;
+    i = snprintf (bufs, 2, "%s", "111");
+    if (strcmp (bufs, "1")) exit (1);
+    if (i != 3) exit (1);
+    i = snprintf (bufd, 2, "%d", 111);
+    if (strcmp (bufd, "1")) exit (1);
+    if (i != 3) exit (1);
+    exit(0);
+}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)])
+AC_MSG_RESULT([$ac_cv_have_working_snprintf])
+AC_MSG_CHECKING(for working vsnprintf)
+AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
+[AC_TRY_RUN(
+[#include <stdio.h>
+#include <stdarg.h>
+
+int my_vsnprintf (char *buf, const char *tmpl, ...)
+{
+    int i;
+    va_list args;
+    va_start (args, tmpl);
+    i = vsnprintf (buf, 2, tmpl, args);
+    va_end (args);
+    return i;
+}
+
+int main(void)
+{
+    char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
+    char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
+    int i;
+    i = my_vsnprintf (bufs, "%s", "111");
+    if (strcmp (bufs, "1")) exit (1);
+    if (i != 3) exit (1);
+    i = my_vsnprintf (bufd, "%d", 111);
+    if (strcmp (bufd, "1")) exit (1);
+    if (i != 3) exit (1);
+    exit(0);
+}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)])
+AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
+if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
+  AC_LIBOBJ(snprintf)
+  AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.])
+  AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken")
+fi])
+
+AC_FUNC_SNPRINTF
+
+dnl
+dnl End snprintf() check
+dnl
+
 case $host_os in
 linux*)
   LIBS="-L$x_libraries $LIBS"
--- xosview-1.8.2.orig/debian/menu
+++ xosview-1.8.2/debian/menu
@@ -0,0 +1,3 @@
+?package(xosview):needs="X11" section="Apps/System"\
+  title="Xosview" command="/usr/bin/xosview"\
+  hints="Monitoring"
--- xosview-1.8.2.orig/debian/dirs
+++ xosview-1.8.2/debian/dirs
@@ -0,0 +1,3 @@
+usr/bin
+usr/share/man/man1
+etc/X11/app-defaults
--- xosview-1.8.2.orig/debian/copyright
+++ xosview-1.8.2/debian/copyright
@@ -0,0 +1,50 @@
+This package was debianized by Zed Pobre <zed@debian.org> on
+Tue Sep  8 17:52:59 CDT 1998
+
+It was downloaded from http://prdownloads.sourceforge.net/xosview/
+
+********************************************************************************
+* COPYING **********************************************************************
+********************************************************************************
+  $Id: COPYING,v 1.1 1997/02/14 06:14:46 bgrayson Exp $
+
+  The majority of the xosview source code is covered by the GNU
+General Public License (GPL), which on a Debian system can be found in
+/usr/share/common-licenses/GPL.
+
+  In addition, a portion of the NetBSD port's code is covered under
+the traditional BSD copyright, which is presented in COPYING.BSD.  If you
+plan on modifying or distributing any portion of this code, make sure
+that you agree to the terms in the BSD copyright (which in general is
+less restrictive than the GPL, from what I've seen, but I'm not a
+lawyer-type).  These files are:
+  netbsd/swapinternal.cc
+
+  Lastly, various portions of the xosview source code were developed
+by various authors who have intentionally chosen to allow the user
+to choose between the BSD copyright or the GPL copyright.  These files
+are:
+  fieldmeterdecay.h
+  fieldmeterdecay.cc
+  general.h
+  netbsd/MeterMaker.h
+  netbsd/MeterMaker.cc
+  netbsd/cpumeter.h
+  netbsd/cpumeter.cc
+  netbsd/diskmeter.h
+  netbsd/diskmeter.cc
+  netbsd/loadmeter.h
+  netbsd/loadmeter.cc
+  netbsd/memmeter.h
+  netbsd/memmeter.cc
+  netbsd/netbsd.h
+  netbsd/netbsd.cc
+  netbsd/netmeter.h
+  netbsd/netmeter.cc
+  netbsd/swapmeter.h
+  netbsd/swapmeter.cc
+    
+  Brian Grayson, Feb. 1997
+
+On a Debian system the BSD copyright can be found in
+/usr/share/common-licenses/BSD
--- xosview-1.8.2.orig/debian/README.stipple
+++ xosview-1.8.2/debian/README.stipple
@@ -0,0 +1,23 @@
+The contents of this file have been copied from the upstream's
+README.netbsd, which is not included in the Debian package as it is,
+in general, not relevant. You can find useful this bit of information,
+which applies to any xosview installation:
+
+  Stipple support:
+    Also, NetBSD-mac68k people (and others) that have monochrome systems
+      may want to try out the new stipple code -- set the enableStipple
+      resource to true, and choose black and white for the various
+      fields.  The fields are automatically stippled 100%, 75%, 50%, and
+      25% in a fixed fashion (future versions may allow the user to
+      specify the stipple percentage).
+
+    Some resources were included with the xosview source code to allow
+      an easy example.  Type 'xrdb -merge Xdefaults.stipple', followed
+      by 'xosview -name xosvstipple &' and 'xosview -name xosvstipplebw &'.
+      This will bring up two xosview windows, one using stippling with
+      color (xosvstipple) and one using only black and white
+      (xosvstipplebw).
+
+    The stipple support is fairly experimental, so provide any
+      feedback you can -- positive, negative, etc.
+
--- xosview-1.8.2.orig/debian/control
+++ xosview-1.8.2/debian/control
@@ -0,0 +1,16 @@
+Source: xosview
+Build-Depends: autoconf, autotools-dev, debhelper (>= 4.0.0), libx11-dev, libxpm-dev, libxt-dev, x-dev
+Section: utils
+Priority: optional
+Maintainer: Kartik Mistry <kartik.mistry@gmail.com>
+Standards-Version: 3.7.2
+
+Package: xosview
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: X based system monitor
+ Xosview is a monitor which displays the status of several
+ system based parameters.  These include  CPU  usage,  load
+ average,  memory  usage,  swap space usage, network usage,
+ interrupts, and serial port status.  Appearance is fully
+ configurable via command line or X resources.
--- xosview-1.8.2.orig/debian/docs
+++ xosview-1.8.2/debian/docs
@@ -0,0 +1 @@
+README README.linux TODO 
--- xosview-1.8.2.orig/debian/changelog
+++ xosview-1.8.2/debian/changelog
@@ -0,0 +1,507 @@
+xosview (1.8.2-10.roman.1) unstable; urgency=low
+
+  * Re-integrated my patch for lmstemp.cc so that it can read temperatures
+    from 2.6 /sys interface.
+
+ -- Roman Hodek <roman@hodek.net>  Mon,  1 Jan 2007 16:13:15 +0100
+
+xosview (1.8.2-10) unstable; urgency=low
+
+  * New Maintainer (Closes: #390066)
+  * standards-version to 3.7.2
+
+ -- Kartik Mistry <kartik.mistry@gmail.com>  Fri, 29 Sep 2006 10:16:09 +0530
+
+xosview (1.8.2-9) unstable; urgency=low
+
+  * Acknowledged patch by Roberto Sanchez, included in Lars Wirzenius'
+    NMU for 1.8.2-8.1 (Closes: #364629)
+  * Incorporated Joachim Reichel's patch for aclocal.m4, fixing FTBFS on
+    s390 (Closes: #368289)
+  * Upgraded standards-version to 3.7.2.0 (no changes needed)
+
+ -- Gunnar Wolf <gwolf@debian.org>  Mon,  5 Jun 2006 20:07:31 -0500
+
+xosview (1.8.2-8.1) unstable; urgency=low
+
+  * Non-maintainer upload by Lars Wirzenius using patch by Roberto 
+    C. Sanchez <roberto@familiasanchez.net> from the bug tracking system.
+  * Added portable check for snprintf to configure.in using code from
+    file:///usr/share/doc/autoconf-archive/htmldoc/ac_func_snprintf.html.
+    (Closes: #364629)
+
+ -- Lars Wirzenius <liw@iki.fi>  Sat, 21 May 2006 07:09:00 +0300
+
+xosview (1.8.2-8) unstable; urgency=low
+
+  * Substituted build-dependency on xlibs-dev for its component packages
+    libx11-dev, libxpm-dev, libxt-dev, x-dev
+
+ -- Gunnar Wolf <gwolf@debian.org>  Wed,  4 Jan 2006 14:46:12 -0600
+
+xosview (1.8.2-7) unstable; urgency=low
+
+  * Acknowledged NMU for 316265 - Shame on me, looks dead simple! :-(
+    Thanks, Blars (Closes: #316265)
+  * Moved the Xdefaults out of /usr/share/doc to leave only one instance
+    in /etc/x11/app-defaults - What were they doing there in the first
+    place?
+  * Added the .stipple XDefaults to the end of the main file, documented
+    it in the man page
+
+ -- Gunnar Wolf <gwolf@debian.org>  Mon,  5 Sep 2005 12:08:19 -0500
+
+xosview (1.8.2-6.1) unstable; urgency=low
+
+  * 0 day NMU for RC bug durring BSP
+  * don't include sys/io.h on sparc (closes: #316265)
+
+ -- Blars Blarson <blarson@blars.org>  Sat,  3 Sep 2005 04:58:57 +0000
+
+xosview (1.8.2-6) unstable; urgency=low
+
+  * Rebuilt so dh_installmenu puts the menu in /usr/share/menu instead
+    of /usr/lib/menu
+  * Changed float to double in various meters as to prevent numbers over
+    2^32 (now common in RAM on large systems) from becoming wrong
+    (Closes: #151611)
+
+ -- Gunnar Wolf <gwolf@debian.org>  Wed, 22 Jun 2005 00:17:47 -0500
+
+xosview (1.8.2-5) unstable; urgency=low
+
+  * Bumped up standards-version to 3.6.2
+
+ -- Gunnar Wolf <gwolf@debian.org>  Tue, 21 Jun 2005 23:38:11 -0500
+
+xosview (1.8.2-4) unstable; urgency=low
+
+  * Fixed: lmstemp didn't show the right information - Thanks to Robert
+    Schueler for the (obvious) patch, excuse me for not dealing with it
+    earlier! (Closes: #183695)
+  * Fixed: Now properly deals with the absence of a battery without
+    spitting out loads of errors. Attila Kinali's hint was in the right
+    direction, only I prefered to do something about the errors. 
+    (Closes: #281565) 
+
+ -- Gunnar Wolf <gwolf@debian.org>  Tue,  3 May 2005 13:47:31 -0500
+
+xosview (1.8.2-3) unstable; urgency=low
+
+  * Disabled transparency as its result is definitively less than
+    satsifactory (Closes: #130633)
+  * Fixed some typos in the man page - Thanks to A. Costa for pointing
+    it out (Closes: #306715)
+
+ -- Gunnar Wolf <gwolf@debian.org>  Tue,  3 May 2005 10:31:35 -0500
+
+xosview (1.8.2-2) unstable; urgency=low
+
+  * Added a 'xosview*netIface' Xresource to allow to monitor a specific
+    network interface (Closes: #89941)
+
+ -- Gunnar Wolf <gwolf@debian.org>  Sat, 16 Oct 2004 09:47:25 -0500
+
+xosview (1.8.2-1) unstable; urgency=low
+
+  * New upstream release, incorporates most previous .diffs into the
+    upstream source. (Closes: #221885)
+  * Bumped up standards-version to 3.6.1
+
+ -- Gunnar Wolf <gwolf@debian.org>  Thu, 26 Aug 2004 18:47:21 -0500
+
+xosview (1.8.0-9) unstable; urgency=low
+
+  * New maintainer (Closes: #246973)
+  * Fixed some Lintian warnings (manpage section wrong in .TH, unquoted
+    elements in menu... Minor stuff)
+
+ -- Gunnar Wolf <gwolf@debian.org>  Mon, 10 May 2004 15:32:03 -0500
+
+xosview (1.8.0-8) unstable; urgency=low
+
+  * Don't overwrite the previous NMU fixes when orphaning.  This allows it
+    to compile with g++-3.x, of course.  I'm such an idiot.
+  * Acknowledge NMU fixes:
+    (closes: #200175, #215824, #186499, #194342, #196324)
+
+ -- Zed Pobre <zed@debian.org>  Sun,  2 May 2004 11:25:19 -0500
+
+xosview (1.8.0-7) unstable; urgency=low
+
+  * Package orphaned.
+  * Force compilation with g++-2.95, since I can no longer get it to build
+    otherwise.
+
+ -- Zed Pobre <zed@debian.org>  Sun,  2 May 2004 11:01:49 -0500
+
+xosview (1.8.0-6) unstable; urgency=low
+
+  * Fix buggy pointer arithmetic in Xrm.cc that was causing some
+    resources not to load properly if when compiled with g++-3.2 and a
+    high level of optimization (closes: #182281).
+
+ -- Zed Pobre <zed@debian.org>  Sun, 27 Apr 2003 14:42:09 -0500
+
+xosview (1.8.0-5.2) unstable; urgency=low
+
+  * Non-Maintainer Upload
+  * Adapt patch for kernel 2.5/2.6 (Closes: #215824, #200175)
+  * Change EXTRA_CXXFLAGS from "-Wall -O4 -pipe" to "-W -Wall -O2"
+  * If you like this patch please let <da-manager@debian.org> know you
+    value my work and that he should find it in his heart to process my NM
+    application
+
+ -- Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>  Sat, 10 Jan 2004 11:41:47 +0100
+
+xosview (1.8.0-5.1) unstable; urgency=low
+
+  * Non-Maintainer Upload
+  * Apply patch to allow building under ANSI-standard C++ compilers
+    (specifically, GCC 3.3). (Closes: #186499, #196324)
+
+ -- Joel Baker <fenton@debian.org>  Sat, 23 Aug 2003 22:18:47 -0600
+
+xosview (1.8.0-5) unstable; urgency=low
+
+  * Rebuild with modern debhelper (closes: #177464)
+  * g++-3.2 is now the standard g++, so build-dependencies set
+    back. (closes: #170566)
+
+ -- Zed Pobre <zed@debian.org>  Sun,  9 Feb 2003 15:55:01 -0600
+
+xosview (1.8.0-4) unstable; urgency=low
+
+  * Compile with g++-3.2.
+  * Alter build-dependencies to match.
+
+ -- Zed Pobre <zed@debian.org>  Mon, 28 Oct 2002 18:03:47 -0600
+
+xosview (1.8.0-3) unstable; urgency=medium
+
+  * Added Build-Depends: autoconf (closes: #141908)
+
+ -- Zed Pobre <zed@debian.org>  Tue,  9 Apr 2002 00:58:58 -0500
+
+xosview (1.8.0-2) unstable; urgency=medium
+
+  * Removed root test on clean (not required)
+  * Only remove rpath when $host_os is linux*, and make the modification
+    in config/configure.in, not configure
+  * Rebuild configure from configure.in in the configure stage and remove
+    it on clean.
+  * Remove linux/memstat/Makefile on clean
+  * Updated watch file for new upstream location
+  * Revert the "using namespace std;" from linux/netmeter.cc and the
+    "std::hex" from serialmeter.cc.  These appear to be no longer
+    necessary for g++-3.0 compiles.  I'm sure the hppa folks will tell me
+    if I'm wrong.
+  * Changed the transparency code to the simpler form used by Tim van
+    Erven <tripudium@chello.nl>; this fixes the badpixmap error given when
+    xosview is compiled with gcc-3.0 and transparency is turned on.
+  * Applied (a slightly modified) patch from Helge Deller <deller@gmx.de>
+    to increase the buffer size allocated for reading /proc/stat.  On hppa
+    (PA-RISC) /proc/stat has very long lines, since there are virtualized
+    interrupts, and xosview will hang on startup if the information in
+    /proc/stat is larger than the buffer (closes: #141706)
+  * Added a README.cvs for people who end up wanting to make a debian
+    package directly out of a cvs version.  As of this release, we are now
+    synchronized with upstream cvs.
+
+ -- Zed Pobre <zed@debian.org>  Sun,  7 Apr 2002 23:49:50 -0500
+
+xosview (1.8.0-1) unstable; urgency=low
+
+  * All patches seem to have been reapplied successfully to new upstream
+    version 1.8.0.
+  * Remove all autogenerated targets on clean
+  * Force the use of g++-3.0.  This should help make sure that any further
+    changes don't break architectures without g++-2.95
+  * Updated debian/copyright to reflect new upstream location at
+    SourceForge
+
+ -- Zed Pobre <zed@debian.org>  Sun, 17 Mar 2002 16:06:25 -0600
+
+xosview (1.7.3-12) unstable; urgency=low
+
+  * Officially fix the C++ bug in Xrm.h (thanks to Jérôme Marant for the
+    NMU while my dev box was toasted) (closes: #133658)
+
+ -- Zed Pobre <zed@debian.org>  Sat,  2 Mar 2002 19:14:21 -0600
+
+xosview (1.7.3-11) unstable; urgency=medium
+
+  * Add "using namespace std;" to linux/netmeter.cc, which should fix up
+    the last build problem on hppa (I hope) (closes: #132889)
+
+ -- Zed Pobre <zed@debian.org>  Mon, 11 Feb 2002 14:43:24 -0600
+
+xosview (1.7.3-10) unstable; urgency=medium
+
+  * Undocumented fixes from the 3.1 NMU reinstated:
+    * s/friend XWin/friend class Xwin/ in xwin.h
+    * ia64, hppa, arm, mips (and alpha, but that was already taken care
+      of) cannot deal with ioperm, so exclude them in
+      linux/serialmeter.cc.
+    * use std::hex instead of hex in serialmeter.cc
+  * The above changes mean that arm and mips can actually compile
+    serialmeter.cc, so remove the ugly hack used in 1.7.3-9.
+  * The ioperm changes should fix compilation on mips (closes: #117297),
+    and the C++ changes should fix hppa (closes: #126469).
+
+ -- Zed Pobre <zed@debian.org>  Sun,  3 Feb 2002 18:19:06 -0600
+
+xosview (1.7.3-9) unstable; urgency=medium
+
+  * Nasty hack in config/Makefile.linux.in to test for the presence of
+    "arm" inside of @host_cpu@, and if found, set $(ARCH) to arm,
+    otherwise set $(ARCH) to @host_cpu@, and then test $(ARCH) against
+    $(FAIL_ARCH).  This closes: #117297 again, but means that any future
+    hardware that returns "arm" as a substring of its @host_cpu@ result
+    will not have a serialmeter.  This may be just as well.  Thanks to
+    willy in #debian-devel for the suggestion.
+  * Add s390 to the list, while we're at it (closes: 127469)
+  * Add powerpc to the list (Thanks to Andrew Sharp, but next time could
+    you please use the bug system?  I almost lost your e-mail...)
+  * If we add too many more architectures to the list, it might get easier
+    simply to list the architectures that DO have ioperm() and serialmeter
+    support.
+  * Tim van Erven's patch to add transparancy looks fairly safe, so I'm
+    adding it.  (closes: #127549)
+  * Remove config.cache and config.status in clean target.
+  * Medium urgency, since it fixes building on three architectures.
+
+ -- Zed Pobre <zed@debian.org>  Tue, 22 Jan 2002 19:08:58 -0600
+
+xosview (1.7.3-8) unstable; urgency=low
+
+  * Add arm to FAIL_ARCH list in config/Makefile.linux.in.  This wasn't a
+    lost portability patch, arm simply had never been added to the list.
+    (closes: #117297)
+
+ -- Zed Pobre <zed@debian.org>  Fri,  2 Nov 2001 18:29:34 -0600
+
+xosview (1.7.3-7) unstable; urgency=low
+
+  * Update config.guess and config.sub in the correct location (config/
+    subdirectory).  (closes: #115022 again)
+
+ -- Zed Pobre <zed@debian.org>  Wed, 24 Oct 2001 16:06:48 -0500
+
+xosview (1.7.3-6) unstable; urgency=low
+
+  * Update config.guess and config.sub; this fixes builds on several
+    architectures. (closes: #115022)
+  * Fixed path in menu entry (closes: #116618)
+
+ -- Zed Pobre <zed@debian.org>  Mon, 22 Oct 2001 21:39:22 -0500
+
+xosview (1.7.3-5) unstable; urgency=low
+
+  * Section: utils instead of x11
+  * Removed debugging message in intmeter.cc left in the -4 patch
+  * Added xlibs-dev to Build-Depends (closes: #112941)
+
+ -- Zed Pobre <zed@debian.org>  Thu, 20 Sep 2001 17:30:25 -0500
+
+xosview (1.7.3-4) unstable; urgency=medium
+
+  * The "It's Not Quite A Year Late" release.
+  * Removed the dune-chemicals.txt from the config directory.  Amazing
+    what strange things can get copied into the wrong directories and yet
+    remain unnoticed.
+  * Patches from Massimo Dal Zotto:
+    * Added -hmargin, -vmargin and -vspacing options to allow more precise
+      control of widget geometry when swallowed by gnome-panel.
+      * (I modified this patch to use the typesafe MIN and MAX macros that
+        Linus approved for the 2.4.10 Linux kernel, just because I like
+        them, and did minor cosmetic changes --Zed)
+    * Changed defresources.awk to generate a human readable version of
+      defresources.cc.
+    * Discarded the IRQ patch in favor of the one from David Fries.
+  * Applied patch from David Fries <dfries@mail.win.org> to set irqs_ and
+    lastirqs_ at run time (closes: #108738)
+  * Corrected xosview*networkBandwidth -> xosview*netBandwidth in the
+    manpage (closes: #109491)
+  * Added a "Monitoring" hint element to the xosview menu entry.  I am
+    somewhat wary of this, since I know of no other menu entries also
+    using that hint, but it seems to be a reasonable category to create,
+    so I might as well be the first.  (closes: #82549)
+  * Copy across /usr/share/automake/config.{guess,sub} to fix breakage on
+    arm and hppa.  Thanks to LaMont Jones <lamont@debian.org> for the NMU
+    on this earlier. (closes: #96549, #105032)
+  * DH_COMPAT=3.
+  * Standards-Version 3.5.6; moved the binary to /usr/bin, the manpage to
+    /usr/share/man/man1 (and put it back to .1 from .1x); Build-Depends
+    added for debhelper.  I've probably missed others, but the
+    autobuilders will file bugs, I'm sure.
+  * Removed the *BSD specific README files.
+
+ -- Zed Pobre <zed@debian.org>  Tue, 18 Sep 2001 19:15:08 -0500
+
+xosview (1.7.3-3) unstable; urgency=low
+
+  * Quickie change to move /usr/X11R6/lib/X11/app-defaults to
+    /etc/X11/app-defaults.
+  * Massimo Dal Zotto: I haven't forgotten about your patches; I just
+    haven't had time to finish putting them in and testing them, so
+    they're completely left out of this upload.
+
+ -- Zed Pobre <zed@debian.org>  Tue, 19 Dec 2000 23:42:06 -0600
+
+xosview (1.7.3-2) unstable; urgency=low
+
+  * Fixed the manpage reference to loadAlarmThreshold so that it now
+    correctly uses loadWarnThreshold.  I've sent a note about this
+    upstream, along with a comment about 2 being too low for a default
+    value. (closes: #60178)
+  * The xosview binary is no longer compiled with -R (rpath) set.  I
+    patched configure directly to do this, pending a discussion with
+    upstream, so don't rebuild it with autoconf.
+
+ -- Zed Pobre <zed@debian.org>  Sat,  8 Apr 2000 13:36:46 -0500
+
+xosview (1.7.3-1) unstable; urgency=medium
+
+  * New upstream release
+  * The upstream CHANGES file notes that the negative numbers cosmetic bug
+    has been fixed, so this might fix bug #19019 finally.
+
+ -- Zed Pobre <zed@debian.org>  Wed, 17 Nov 1999 15:52:13 -0600
+
+xosview (1.7.2-2) unstable; urgency=medium
+
+  * Rebuild with DEBIAN_BUILDARCH unset (closes: #50443)
+
+ -- Zed Pobre <zed@debian.org>  Wed, 17 Nov 1999 15:29:29 -0600
+
+xosview (1.7.2-1) unstable; urgency=low
+
+  * New upstream release (BSDI support)
+
+ -- Zed Pobre <zed@debian.org>  Sat, 13 Nov 1999 17:16:26 -0600
+
+xosview (1.7.1-7) unstable; urgency=low
+
+  * Switched over to FHS.
+  * Yanked a bad -7 from Incoming before it was installed.  This replaces
+    it.
+
+ -- Zed Pobre <zed@debian.org>  Fri, 10 Sep 1999 23:21:49 -0500
+
+xosview (1.7.1-6) unstable; urgency=low
+
+  * Backed out the previous workaround for dh_compress failing, since it's
+    no longer needed.
+
+ -- Zed Pobre <zed@debian.org>  Sun, 15 Aug 1999 11:33:51 -0500
+
+xosview (1.7.1-5) unstable; urgency=low
+
+  * Okay, so it really does have to be XOsview...
+  * Bumped the standards version (required updating the references to the
+    licenses) while I was at it.
+  * Fixed the ungzipped CHANGES file problem, which stemmed from
+    dh_compress not behaving as I expected (not sure if that's a bug yet),
+    and not paying attention the last time I updated.  Lintian would have
+    caught it if I'd checked, naughty naughty...  Fixes bug#41983.
+
+ -- Zed Pobre <zed@debian.org>  Sat, 14 Aug 1999 17:28:43 -0500
+
+xosview (1.7.1-4) unstable; urgency=low
+
+  * Fixed the rules file to copy the xdefaults file as Xosview rather than
+    Xdefaults.  I'm leaving it however as Xosview rather than XOsview
+    unless someone has a compelling reason to do it otherwise.  Thanks to
+    Marcus Jodorf <m@bogomips.de> for pointing it out.  Closes bug#40557.
+
+ -- Zed Pobre <zed@debian.org>  Fri, 16 Jul 1999 08:43:57 -0500
+
+xosview (1.7.1-3) unstable; urgency=low
+
+  * Modified the mc68k patch to make use of @host_cpu@ and to also allow
+    for the addition of sparc to the exclusion list (thanks to Christian
+    Meder <meder@isr.uni-stuttgart.de> for a patch for this).  This should
+    close bug #33231.  At this point the original mc68000 patch has been
+    sent upstream (and been included for the next official release), but
+    this new patch has not.
+
+ -- Zed Pobre <zed@debian.org>  Fri, 25 Jun 1999 12:35:25 -0500
+
+xosview (1.7.1-2) unstable; urgency=low
+
+  * Fixed the mc68000 patch, which apparantly partially failed on one
+    file.  Should be working now.  Should fix bugs #24324, #28930,
+    #37851.  The sparc patch isn't in yet.
+
+ -- Zed Pobre <zed@debian.org>  Mon, 17 May 1999 13:55:34 -0500
+
+xosview (1.7.1-1) unstable; urgency=low
+
+  * New upstream version.  This should work with kernels > 2.2.1.
+  * The __mc68000__ and __KERNEL__ patches were reapplied, since I've been
+    bad and haven't sent these patches upstream yet.  I'll get to it RSN.
+  * Turned off memstat to get the thing to compile on my system.  Thank
+    Joey Hess for prompting me to putz with it again long enough to figure
+    out that this was responsible.  This release seems to fix bugs #33795,
+    #34511, #35796, #37462.  I'm going to have to talk to the Alpha and
+    M68k people again for some of the other bugs, though.
+
+ -- Zed Pobre <zed@debian.org>  Tue, 11 May 1999 23:32:37 -0500
+
+xosview (1.6.1-4) frozen unstable; urgency=low
+
+  * The bugfixes from 1.6.1-3 were considered high enough priority to make
+    it into frozen.  By request, and with the consent of Brian White, I am
+    uploading this again designated frozen and unstable.  No changes.
+
+ -- Zed Pobre <zed@debian.org>  Wed, 20 Jan 1999 08:28:11 -0600
+
+xosview (1.6.1-3) unstable; urgency=low
+
+  * Use "#ifdef __mc68000__", not "#ifdef __mc68k__ in MeterMaker.cc.
+    This should *really* fix bug#24324, I hope.
+  * Added a "#define __KERNEL__" to linux/memstat/memstat-2.0.c to work
+    around odd compile problems on m68k platforms (fixes bug#28930)
+  * Thanks to Roman Hodek for help getting the above together.
+
+ -- Zed Pobre <zed@debian.org>  Thu, 10 Dec 1998 01:13:25 -0600
+
+xosview (1.6.1-2) unstable; urgency=low
+
+  * Integrated a variant of the patch sent by Frank Neumann
+    <Frank.Neumann@Informatik.Uni-Oldenburg.DE> that fixes the m68k
+    compilation problems due to the lack of an ioperm() call on m68k
+    platforms.  Someone with an m68k please test this and let me know
+    if it works (I changed the MeterMaker.cc patch so that it didn't
+    assume you had an i386 if you didn't have an m68k, but I'm not sure if
+    I did it correctly).  If this works, it fixes bug#24324.
+
+ -- Zed Pobre <zed@debian.org>  Sun, 25 Oct 1998 13:00:57 -0600
+
+xosview (1.6.1-1) unstable; urgency=low
+
+  * This version uses ttyS instead of cua (fixes bug#14343)
+  * Menu entry added for System (fixes bug#22179)
+  * Redundant licences removed from copyright file and replaced with
+    pointers to the ones in /usr/doc/copyright (fixes bug#17931)
+  * Package reconstructed using debhelper.    
+  * New upstream release.  This one works with the /proc of later 2.1.x 
+    kernels.  (fixes bug#17995)
+  * New maintainer.  Official release.  (fixes bug#15882)
+
+ -- Zed Pobre <zed@debian.org>  Tue,  8 Sep 1998 18:07:49 -0500
+
+xosview (1.5.0-1.1) unstable; urgency=low
+
+  * Compiled for libc6.
+
+ -- Adam Heath <adam.heath@usa.net>  Fri, 23 Jan 1998 18:12:21 -0500
+
+xosview (1.5.0-1) unstable; urgency=low
+
+  * New upstream release
+  * Maintainer change
+  * Initial release was 1.3.2-6 by joost witteveen <joostje@debian.org>
+
+ -- Radu Duta <rduta@debian.org>  Tue, 11 Nov 1997 09:03:52 -1100
--- xosview-1.8.2.orig/debian/README.debian
+++ xosview-1.8.2/debian/README.debian
@@ -0,0 +1,7 @@
+xosview for DEBIAN
+----------------------
+
+The memstat module required to display shared memory percentage has
+been disabled due to compilation problems.
+
+Zed Pobre <zed@debian.org>
--- xosview-1.8.2.orig/debian/watch
+++ xosview-1.8.2/debian/watch
@@ -0,0 +1,4 @@
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site				   Directory	 Pattern		Version	Script
+http://prdownloads.sourceforge.net /xosview/	 xosview-(.*)\.tar\.gz	debian	uupdate
--- xosview-1.8.2.orig/debian/rules
+++ xosview-1.8.2/debian/rules
@@ -0,0 +1,77 @@
+#!/usr/bin/make -f
+# MAde with the aid of dh_make, by Craig Small
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+export DH_COMPAT=4
+
+PACKAGE=xosview
+
+CXX=g++
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	ln -sf /usr/share/misc/config.guess config/
+	ln -sf /usr/share/misc/config.sub config/
+	cd config && $(MAKE)
+	CXX=$(CXX) ./configure --prefix=/usr --disable-linux-memstat
+	touch configure-stamp
+
+build: configure-stamp build-stamp
+build-stamp:
+	dh_testdir
+	$(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	rm -f build-stamp configure-stamp
+	rm -f configure config.cache config.status
+	rm -f config/config.guess config/config.sub
+	rm -f linux/memstat/Makefile
+
+	-$(MAKE) distclean
+
+	dh_clean
+
+# Build architecture-independent files here.
+binary-indep: build
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	cp xosview debian/$(PACKAGE)/usr/bin/
+	cp Xdefaults debian/$(PACKAGE)/etc/X11/app-defaults/XOsview
+	grep xosvstipple Xdefaults.stipple >> \
+		debian/$(PACKAGE)/etc/X11/app-defaults/XOsview
+
+	dh_installdocs debian/README.stipple
+
+	dh_installexamples
+	dh_installmenu
+
+	cp xosview.1 debian/$(PACKAGE)/usr/share/man/man1/xosview.1
+
+	dh_installchangelogs -k CHANGES
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_makeshlibs
+	dh_md5sums
+	dh_builddeb
+
+source diff:                                                                  
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
--- xosview-1.8.2.orig/xosview.cc
+++ xosview-1.8.2/xosview.cc
@@ -58,6 +58,26 @@
 
 #endif // sgi
 
+#define MIN(x,y)		\
+({				\
+    const typeof(x) _x = x;	\
+    const typeof(y) _y = y;	\
+				\
+    (void) (&_x == &_y); 	\
+				\
+    _x < _y ? _x : _y;		\
+})
+
+#define MAX(x,y)		\
+({				\
+    const typeof(x) _x = x;	\
+    const typeof(y) _y = y;	\
+				\
+    (void) (&_x == &_y); 	\
+				\
+    _x > _y ? _x : _y;		\
+})
+
 double MAX_SAMPLES_PER_SECOND = 10;
 
 CVSID("$Id$");
--- xosview-1.8.2.orig/config.log
+++ xosview-1.8.2/config.log
@@ -0,0 +1,34 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+configure:563: checking host system type
+configure:588: checking for c++
+configure:620: checking whether the C++ compiler (c++  ) works
+configure:636: c++ -o conftest    conftest.C  1>&5
+configure:662: checking whether the C++ compiler (c++  ) is a cross-compiler
+configure:667: checking whether we are using GNU C++
+configure:676: c++ -E conftest.C
+configure:695: checking whether c++ accepts -g
+configure:729: checking whether c++ supports bool types
+configure:750: c++ -c -g -O2  conftest.C 1>&5
+configure:781: checking whether c++ supports long long types
+configure:802: c++ -c -g -O2  conftest.C 1>&5
+configure:836: checking how to run the C preprocessor
+configure:857: cc -E  conftest.c >/dev/null 2>conftest.out
+configure:920: checking for X
+configure:987: cc -E  conftest.c >/dev/null 2>conftest.out
+configure:1063: cc -o conftest    conftest.c -lXt  1>&5
+configure:1157: checking for snprintf
+configure:1185: cc -o conftest    conftest.c  1>&5
+configure:1169: warning: conflicting types for built-in function 'snprintf'
+configure:1157: checking for vsnprintf
+configure:1185: cc -o conftest    conftest.c  1>&5
+configure:1169: warning: conflicting types for built-in function 'vsnprintf'
+configure:1210: checking for working snprintf
+configure:1236: cc -o conftest    conftest.c  1>&5
+configure: In function 'main':
+configure:1227: warning: incompatible implicit declaration of built-in function 'exit'
+configure:1252: checking for working vsnprintf
+configure:1289: cc -o conftest    conftest.c  1>&5
+configure: In function 'main':
+configure:1280: warning: incompatible implicit declaration of built-in function 'exit'
--- xosview-1.8.2.orig/fieldmeter.h
+++ xosview-1.8.2/fieldmeter.h
@@ -43,8 +43,8 @@
   enum UsedType { INVALID_0, FLOAT, PERCENT, AUTOSCALE, INVALID_TAIL };
 
   int numfields_;
-  float *fields_;
-  float total_, used_, lastused_;
+  double *fields_;
+  double total_, used_, lastused_;
   int *lastvals_, *lastx_;
   unsigned long *colors_;
   unsigned long usedcolor_;

