LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File xosview-1.9.2.dif of Package xosview (Project X11:Utilities)

--- README.linux
+++ README.linux	2006-07-26 16:08:30.000000000 +0000
@@ -26,7 +26,7 @@ To install xosview:
      to /usr/bin/X11/xosview and will be suid root.  If you do not want to
      run xosview suid root (this will just disable the serial meters) you
      can change the permissions to whatever you like.  The X defaults for
-     xosview (Xdefaults) are copied to /usr/lib/X11/app-defaults/XOsview.
+     xosview (Xdefaults) are copied to /usr/share/X11/app-defaults/XOsview.
 
   To run xosview :
 
--- README.security
+++ README.security	2006-07-26 16:08:30.000000000 +0000
@@ -0,0 +1,35 @@
+
+Xosview, serial meters, and suid bit
+====================================
+
+   The program xosview is able to display the serial interfaces of your
+   system.  Unfortunately this requires root permissions.  Therefore this
+   feature is *disabled* by default in
+
+        /usr/share/X11/app-defaults/XOsview
+
+   and the program /usr/X11R6/bin/xosview does *not* run suid root due to
+   lack of security of xosview. It *is* exploitable at some parts of its code.
+
+   If you want to use the serial meters you have to change `xosview*serial<X>'
+   in /usr/share/X11/app-defaults/XOsview *and* add a line
+
+      /usr/X11R6/bin/xosview.bin   root.root    4755
+
+   to /etc/permissions.local. If you are using PERMISSION_SECURITY="easy local"
+   in /etc/rc.config and you don't want xosview to be suid root you should add
+   the line
+
+      /usr/X11R6/bin/xosview.bin   root.root    0755
+
+   to /etc/permissions.local.  In both cases, after the next run of SuSEconfig
+   the permissions are set according to your choice.
+
+   In normal cases the serial meters are not very useful. Therefore
+   the secure defaults should be used.
+
+
+   Have a lot of fun...
+
+                            Your SuSE Team
+
--- Xdefaults.in
+++ Xdefaults.in	2012-02-08 09:56:49.646433717 +0000
@@ -15,131 +15,127 @@
 
 ! General Resources
 
-!xosview*title:
-!xosview*geometry:           +5+5
-!xosview*display:
-xosview*captions:           True
-xosview*labels:             True
-! Transparency disabled in Debian builds - See bug #130633
-xosview*transparent:        False
-xosview*meterLabelColor:    wheat
-xosview*usedlabels:         True
-xosview*usedLabelColor:     wheat
-xosview*borderwidth:        1
-xosview*font:               7x13bold
-xosview*background:         navy
-xosview*foreground:         wheat
-xosview*enableStipple:	    False ! Change to true to try beta stipple support.
-xosview*samplesPerSec:      10    ! not yet supported
-xosview*graphNumCols:       128   ! number of samples shown in a graph
+!*title:
+!*geometry:          +5+5
+!*geometry:          184x158
+!*display:
+*captions:           True
+*labels:             True
+*transparent:        False
+*meterLabelColor:    black
+*usedlabels:         True
+*usedLabelColor:     black
+*borderwidth:        1
+*font:               6x10
+*background:         grey77
+*foreground:         black
+*enableStipple:      False ! Change to true to try beta stipple support.
+*samplesPerSec:      10    ! not yet supported
+*graphNumCols:       128   ! number of samples shown in a graph
 
 ! Load Meter Resources
 ! We don't need to enable the Decay option, as it is already time-averaged.
 
-xosview*load:               True
-xosview*loadCritColor:      red
-xosview*loadWarnColor:      orange
-xosview*loadProcColor:      seagreen
-xosview*loadIdleColor:      aquamarine
-xosview*loadPriority:       20
-xosview*loadCritThreshold:  auto  ! auto or number
-xosview*loadWarnThreshold:  auto  ! auto or number
-xosview*loadDecay:          False
-xosview*loadGraph:          False
-xosview*loadUsedFormat:     float
-xosview*loadCpuSpeed:       True
+*load:               True
+*loadCritColor:      red
+*loadWarnColor:      orange
+*loadProcColor:      blue
+*loadIdleColor:      green2
+*loadPriority:       20
+*loadCritThreshold:  auto  ! auto or number
+*loadWarnThreshold:  auto  ! auto or number
+*loadDecay:          False
+*loadGraph:          False
+*loadUsedFormat:     float
+*loadCpuSpeed:       True
 
 ! Gfx Meter Resources ( Irix )
 
-xosview*gfx:               True
-xosview*gfxCritColor:      red
-xosview*gfxWarnColor:      orange
-xosview*gfxSwapColor:      seagreen
-xosview*gfxIdleColor:      aquamarine
-xosview*gfxPriority:       1    ! don't change, until you know what you do
-xosview*gfxCritThreshold:  120  ! swapbuffers/s per pipe
-xosview*gfxWarnThreshold:  60   ! swapbuffers/s per pipe
-xosview*gfxDecay:          False
-xosview*gfxGraph:          False
-xosview*gfxUsedFormat:	   autoscale
+*gfx:               True
+*gfxCritColor:      red
+*gfxWarnColor:      orange
+*gfxSwapColor:      seagreen
+*gfxIdleColor:      aquamarine
+*gfxPriority:       1    ! don't change, until you know what you do
+*gfxCritThreshold:  120  ! swapbuffers/s per pipe
+*gfxWarnThreshold:  60   ! swapbuffers/s per pipe
+*gfxDecay:          False
+*gfxGraph:          False
+*gfxUsedFormat:	   autoscale
 
 ! CPU Meter Resources
 
-xosview*cpu:                True
-xosview*cpuUserColor:       seagreen
-xosview*cpuNiceColor:       yellow
-xosview*cpuSystemColor:     orange
-xosview*cpuInterruptColor:  red
-xosview*cpuSInterruptColor: orange red
-xosview*cpuSoftIntColor:    red
-xosview*cpuWaitColor:       lightblue
-xosview*cpuFreeColor:       aquamarine
-xosview*cpuGuestColor:      blue
-xosview*cpuStolenColor:     purple
-xosview*cpuPriority:        1
-xosview*cpuDecay:           True
-xosview*cpuGraph:           True
-xosview*cpuUsedFormat:	    percent
-xosview*cpuFormat:          auto   ! single, all, auto or both
+*cpu:                True
+*cpuUserColor:       blue
+*cpuNiceColor:       yellow
+*cpuSystemColor:     red
+*cpuInterruptColor:  SkyBlue3
+*cpuSInterruptColor: OrangeRed
+*cpuSoftIntColor:    DarkOrange
+*cpuWaitColor:       white
+*cpuFreeColor:       green2
+*cpuGuestColor:      DarkBlue
+*cpuStolenColor:     purple
+*cpuPriority:        1
+*cpuDecay:           True
+*cpuGraph:           False
+*cpuUsedFormat:	     percent
+*cpuFormat:          auto   ! single, all, auto or both
 
 ! Memory Meter Resources
 ! Not all of these are used by a specific platform.
 
-xosview*mem:                True
-xosview*memKernelColor:     yellow
-xosview*memUsedColor:       seagreen
-xosview*memSharedColor:     SkyBlue
-xosview*memBufferColor:     orange
-xosview*memSlabColor:	    blue
-xosview*memMapColor:	    SlateBlue1
-xosview*memCacheColor:      red
-xosview*memFreeColor:       aquamarine
-xosview*memTextColor:       blue
-xosview*memOtherColor:      orange
-xosview*memActiveColor:	    blue
-xosview*memInactiveColor:   lightblue
-xosview*memPriority:        10
-xosview*memDecay:           False
-xosview*memGraph:           False
-xosview*memUsedFormat:	    autoscale
+*mem:                True
+*memUsedColor:       blue
+*memSharedColor:     yellow
+*memBufferColor:     DarkOrange
+*memSlabColor:	     DarkBlue
+*memMapColor:        SkyBlue3
+*memCacheColor:      red
+*memFreeColor:       green2
+*memPriority:        10
+*memDecay:           False
+*memGraph:           False
+*memUsedFormat:	     autoscale
 
 ! Swap Meter Resources
 
-xosview*swap:               True
-xosview*swapUsedColor:      seagreen
-xosview*swapFreeColor:      aquamarine
-xosview*swapReservedColor:  yellow
-xosview*swapPriority:       10
-xosview*swapDecay:          False
-xosview*swapGraph:          False
-xosview*swapUsedFormat:	    autoscale
+*swap:               True
+*swapUsedColor:      blue
+*swapFreeColor:      green2
+*swapReservedColor:  yellow
+*swapPriority:       10
+*swapDecay:          False
+*swapGraph:          False
+*swapUsedFormat:	    autoscale
 
 
 ! Page Meter Resources
 
-xosview*page:               True
-xosview*pageBandwidth:      120
-xosview*pageInColor:        SkyBlue
-xosview*pageOutColor:       SlateBlue1
-xosview*pageIdleColor:      aquamarine
-xosview*pagePriority:       5
-xosview*pageDecay:          False
-xosview*pageGraph:          False
-xosview*pageUsedFormat:     autoscale
+*page:               True
+*pageBandwidth:      120
+*pageInColor:        blue
+*pageOutColor:       red
+*pageIdleColor:      green2
+*pagePriority:       5
+*pageDecay:          False
+*pageGraph:          False
+*pageUsedFormat:     autoscale
 
 
 ! Network Meter Resources
 
-xosview*net:		    True
-xosview*netBandwidth:       10000000  ! for 100Mbit/s
-xosview*netInColor:         SkyBlue
-xosview*netOutColor:        SlateBlue1
-xosview*netBackground:      aquamarine
-xosview*netPriority:        2
-xosview*netDecay:           True
-xosview*netGraph:           True
-xosview*netUsedFormat:	    autoscale
-xosview*netIface:           False
+*net:		     True
+*netBandwidth:       1000000  ! for 100Mbit/s
+!*netBandwidth:      10000000  ! for 100Mbit/s
+*netInColor:         blue
+*netOutColor:        red
+*netBackground:      green2
+*netPriority:        2
+*netDecay:           True
+*netGraph:           False
+*netUsedFormat:	     autoscale
+*netIface:           False
 
 ! Linux-only resources:
 
@@ -149,125 +145,125 @@ xosview*netIface:           False
 ! (autodetection may fail sometimes, if the port is
 ! locked by ppp/slip for example)
 
-!xosview*serial0:            0x3f8
-!xosview*serial1:            0x2f8
-!xosview*serial2:            0x3e8
-!xosview*serial3:            0x2e8
-xosview*serial0:            False
-xosview*serial1:            False
-xosview*serial2:            False
-xosview*serial3:            False
-xosview*serial4:            False
-xosview*serial5:            False
-xosview*serial6:            False
-xosview*serial7:            False
-xosview*serial8:            False
-xosview*serial9:            False
-xosview*serialOnColor:      red
-xosview*serialOffColor:     aquamarine
-xosview*serialPriority:     1
+!*serial0:            0x3f8
+!*serial1:            0x2f8
+!*serial2:            0x3e8
+!*serial3:            0x2e8
+*serial0:            False
+*serial1:            False
+*serial2:            False
+*serial3:            False
+*serial4:            False
+*serial5:            False
+*serial6:            False
+*serial7:            False
+*serial8:            False
+*serial9:            False
+*serialOnColor:      red
+*serialOffColor:     blue
+*serialPriority:     1
 
 ! Interrupt Meter Resources
 
-xosview*interrupts:         False
-xosview*intOnColor:         red
-xosview*intOffColor:        aquamarine
-xosview*intPriority:	    1
+*interrupts:         False
+*intOnColor:         red
+*intOffColor:        blue
+*intPriority:	     1
 
 ! Interrupt Rate Meter Resources
-xosview*irqrate:	True
-xosview*irqrateUsedColor:	red
-xosview*irqrateIdleColor:	black
-xosview*irqratePriority:	1
-xosview*irqrateUsedFormat:  autoscale
-xosview*irqrateDecay:	True
-xosview*irqrateGraph:	False
+*irqrate:	        True
+*irqrateUsedColor:	red
+*irqrateIdleColor:	blue
+*irqratePriority:	1
+*irqrateUsedFormat:     autoscale
+*irqrateDecay:	        True
+*irqrateGraph:	        False
 
 ! Battery Meter Resources
 
-xosview*battery:            True
-xosview*batteryLeftColor:   orange
-xosview*batteryUsedColor:   aquamarine
-xosview*batteryPriority:    50
-xosview*batteryUsedFormat:  percent
-xosview*batteryChargeColor: green
-xosview*batteryFullColor:   magenta
-xosview*batteryLowColor:    red
-xosview*batteryCritColor:   red
-xosview*batteryNoneColor:   grey
+*battery:            True
+*batteryLeftColor:   blue
+*batteryUsedColor:   red
+*batteryPriority:    50
+*batteryUsedFormat:  percent
+*batteryChargeColor: green2
+*batteryFullColor:   magenta
+*batteryLowColor:    orange
+*batteryCritColor:   red
+*batteryNoneColor:   grey
 
 ! Wireless Meter Resources
 
-xosview*wireless:            True
-xosview*PoorQualityColor:    red
-xosview*FairQualityColor:    orange
-xosview*GoodQualityColor:    seagreen
-xosview*wirelessUsedColor:   aquamarine
-xosview*wirelessPriority:    1 
-xosview*wirelessUsedFormat:  autoscale
-xosview*wirelessDecay:       True
+*wireless:            True
+*PoorQualityColor:    red
+*FairQualityColor:    orange
+*GoodQualityColor:    seagreen
+*wirelessUsedColor:   aquamarine
+*wirelessPriority:    1 
+*wirelessUsedFormat:  autoscale
+*wirelessDecay:       True
 
 ! Disk Meter Resources
 
-xosview*disk:		    True
-xosview*diskUsedColor:	    seagreen
-xosview*diskIdleColor:	    aquamarine
-xosview*diskWriteColor:     SlateBlue1
-xosview*diskReadColor:      SkyBlue
-xosview*diskBandwidth:      100000000 ! 100MB/s
-xosview*diskPriority:	    10
-xosview*diskDecay:	    True
-xosview*diskUsedFormat:     autoscale
-xosview*diskGraph:	    True
-
-
-xosview*RAID:                 False
-xosview*RAIDdevicecount:      1
-xosview*RAIDdiskOnlineColor:  green
-xosview*RAIDdiskFailureColor: red
-xosview*RAIDresyncdoneColor:  yellow
-xosview*RAIDresynctodoColor:  red
-xosview*RAIDresynccompleteColor:  green
-xosview*RAIDPriority:         20
-xosview*RAIDUsedFormat:       percent
-
-xosview*horizontalMargin:      5
-xosview*verticalMargin:        5
-xosview*verticalSpacing:       5
+*disk:		      True
+*diskUsedColor:	      red
+*diskIdleColor:	      green2
+*diskWriteColor:      orange
+*diskReadColor:       blue
+*diskBandwidth:       100000000 ! 100MB/s
+*diskPriority:	      10
+*diskDecay:	      True
+*diskUsedFormat:      autoscale
+*diskGraph:	      True
+
+
+*RAID:                 False
+*RAIDdevicecount:      1
+*RAIDdiskOnlineColor:  green2
+*RAIDdiskFailureColor: red
+*RAIDresyncdoneColor:  yellow
+*RAIDresynctodoColor:  red
+*RAIDresynccompleteColor:  orange
+*RAIDPriority:         20
+*RAIDUsedFormat:       percent
+
+*horizontalMargin:      5
+*verticalMargin:        5
+*verticalSpacing:       5
 
 ! Lms Temp
-xosview*lmstemp:	False
-xosview*lmstempActColor:	blue
-xosview*lmstempHighColor:	red
-xosview*lmstempIdleColor:      aquamarine
-! xosview*lmstempHighest:	100
+*lmstemp:	False
+*lmstempActColor:	blue
+*lmstempHighColor:	red
+*lmstempIdleColor:      green2
+! *lmstempHighest:	100
 ! default 100
-xosview*lmstemp1:	temp
-xosview*lmstemp2:	remote_temp
+*lmstemp1:	        temp
+*lmstemp2:	        remote_temp
 ! for more sensors just add entries here
 ! note, there is currently no way to configure sensors with same
 ! name in different subdirs
-! xosview*lmstempLabel1:	TMP
+! *lmstempLabel1:	TMP
 ! labels for avove sensors (default = TMP)
-xosview*lmstempLabel2:	RTMP
-xosview*lmstempPriority: 20
-xosview*lmstempUsedFormat: autoscale
-
-xosview*NFSDStats:       False
-xosview*NFSDStatCallsColor:     green
-xosview*NFSDStatBadCallsColor: red
-xosview*NFSDStatUDPColor:       yellow
-xosview*NFSDStatTCPColor:       orange
-xosview*NFSDStatIdleColor:      aquamarine
-xosview*NFSDStatDecay:		True
-xosview*NFSDStatGraph:		False
-xosview*NFSDStatUsedFormat:	percent
-
-xosview*NFSStats:       False
-xosview*NFSStatReTransColor:    red
-xosview*NFSStatAuthRefrshColor: yellow
-xosview*NFSStatCallsColor:      SkyBlue
-xosview*NFSStatIdleColor:       aquamarine
-xosview*NFSStatDecay:		True
-xosview*NFSStatGraph:		False
-xosview*NFSStatUsedFormat:	percent
+*lmstempLabel2:	        RTMP
+*lmstempPriority:       20
+*lmstempUsedFormat:     autoscale
+
+*NFSDStats:       False
+*NFSDStatCallsColor:    green2
+*NFSDStatBadCallsColor: red
+*NFSDStatUDPColor:      yellow
+*NFSDStatTCPColor:      orange
+*NFSDStatIdleColor:     blue
+*NFSDStatDecay:		True
+*NFSDStatGraph:		False
+*NFSDStatUsedFormat:	percent
+
+*NFSStats:       False
+*NFSStatReTransColor:    SkyBlue3
+*NFSStatAuthRefrshColor: seagreen
+*NFSStatCallsColor:      green2
+*NFSStatIdleColor:       blue
+*NFSStatDecay:		True
+*NFSStatGraph:		False
+*NFSStatUsedFormat:	percent
--- bitmeter.cc
+++ bitmeter.cc	2006-07-26 16:10:55.000000000 +0000
@@ -89,9 +89,9 @@ void BitMeter::draw( void ){
 
     int offset;
     if ( dousedlegends_ )
-      offset = parent_->textWidth( "XXXXXXXXX" );
+      offset = parent_->textWidth( "XXXXXXXXXXX" );
     else
-      offset = parent_->textWidth( "XXXXX" );
+      offset = parent_->textWidth( "XXXXXM" );
 
     parent_->drawString( x_ - offset + 1, y_ + height_, title_ );
     parent_->setForeground( onColor_ );
--- fieldmeter.cc
+++ fieldmeter.cc	2006-07-27 11:45:40.000000000 +0000
@@ -183,9 +183,9 @@ FieldMeter<F>::draw( void ){
 
     int offset;
     if ( dousedlegends_ )
-      offset = parent_->textWidth( "XXXXXXXXX" );
+      offset = parent_->textWidth( "XXXXXXXXXXX" );
     else
-      offset = parent_->textWidth( "XXXXX" );
+      offset = parent_->textWidth( "XXXXXM" );
 
     parent_->drawString( x_ - offset + 1, y_ + height_, title_ );
   }
@@ -236,7 +236,7 @@ FieldMeter<F>::drawused( int manditory )
 
   parent_->setStippleN(0);	/*  Use all-bits stipple.  */
   static const int onechar = parent_->textWidth( "X" );
-  static int xoffset = parent_->textWidth( "XXXXX" );
+  static int xoffset = parent_->textWidth( "XXXXXM" );
 
   char buf[10];
 
--- llist.cc
+++ llist.cc	2007-03-16 14:56:22.000000000 +0000
@@ -233,24 +233,32 @@ void *LList::findc( int which ){
 }
 
 void LList::save( int size, FILE *fp ){
+  size_t r;
   int i;
   void *buf;
 
-  fwrite( &n_, sizeof( int ), 1, fp );	/*  save n  */
+  r = fwrite( &n_, sizeof( int ), 1, fp );	/*  save n  */
+  if (r != sizeof ( int ))
+    return ;
 
   setc( 1 );
   for ( i = 1 ; i <= n_ ; i ++ ) {
     buf = findc();
-    fwrite ( buf, size, 1, fp );
+    r = fwrite ( buf, size, 1, fp );
+    if (r != size)
+      break;
     incc();
   }
 }
 
 int LList::restore( int size, FILE *fp ){
-  int i;
+  size_t r;
+  int i = 0;
   void *buf;
 
-  fread ( &i, sizeof ( int ), 1, fp );
+  r = fread ( &i, sizeof ( int ), 1, fp );
+  if (r != sizeof ( int ))
+    return ( 1 );
 
   for ( ; i > 0 ; i-- ) {
     if ( ( buf = new char[size] ) == NULL ) return ( 0 );
--- xosview.1
+++ xosview.1	2006-07-26 16:08:30.000000000 +0000
@@ -335,7 +335,7 @@ and \'purple\'):
 The following is a list of X resources supported by \fIxosview\fP.  Each has
 a default value assigned to it.  These values can be found in the file
 Xdefaults which can be obtained in the source distribution of xosview.
-They can be overridden in the usual places (/usr/lib/X11/app-defaults/XOsview,
+They can be overridden in the usual places (/usr/share/X11/app-defaults/XOsview,
 $HOME/.Xdefaults, etc.).
 
 It should be noted that it is OK to have a resource defined for a port of
--- xosview.cc
+++ xosview.cc	2007-03-16 14:48:58.000000000 +0000
@@ -7,6 +7,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/time.h>
+#include <errno.h>
 #include "snprintf.h"
 #include "general.h"
 #include "xosview.h"
@@ -162,9 +163,9 @@ void XOSView::checkVersion(int argc, cha
 void XOSView::figureSize ( void ) {
   if ( legend_ ){
     if ( !usedlabels_ )
-      xoff_ = textWidth( "XXXXX" );
+      xoff_ = textWidth( "XXXXXM" );
     else
-      xoff_ = textWidth( "XXXXXXXXX" );
+      xoff_ = textWidth( "XXXXXXXXXXX" );
 
     yoff_ = caption_ ? textHeight() + textHeight() / 4 : 0;
   }
--- xwin.cc
+++ xwin.cc	2007-03-16 14:42:11.000000000 +0000
@@ -1,6 +1,7 @@
 #include <X11/Xatom.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <errno.h>
 #include "snprintf.h"
 #include "general.h"
 #include "xwin.h"
--- linux/MeterMaker.cc
+++ linux/MeterMaker.cc	2006-07-26 16:08:30.000000000 +0000
@@ -130,6 +130,7 @@ if ( stats ) {
       }
 #endif
 
+#if !defined(__s390__) && !defined(__s390x__)
   // check for the interrupt meter
   if (_xos->isResourceTrue("interrupts")) {
     int cpuCount = IntMeter::countCPUs();
@@ -137,6 +138,7 @@ if ( stats ) {
     for (int i = 0 ; i < cpuCount ; i++)
       push(new IntMeter(_xos, i));
   }
+#endif
 
   // check for the battery meter
   if (_xos->isResourceTrue("battery") && BtryMeter::has_source())
--- linux/cpumeter.cc
+++ linux/cpumeter.cc	2012-02-07 17:02:50.166342236 +0000
@@ -85,6 +85,7 @@ void CPUMeter::getcputime( void ){
     static int cputime_to_field[9] = { 0, 1, 2, 8, 5, 4, 3, 7, 6 };
     int field = cputime_to_field[i];
     fields_[field] = cputime_[cpuindex_][i] - cputime_[oldindex][i];
+    if (fields_[field] < 0 ) fields_[field] = 0;	// Bug workaround
     total_ += fields_[field];
   }
 
--- linux/diskmeter.cc
+++ linux/diskmeter.cc	2006-07-27 11:41:55.000000000 +0000
@@ -163,7 +163,7 @@ void DiskMeter::getvmdiskinfo(void)
     // read second value
     stats >> two;
 
-    updateinfo(one, two, 4);
+    updateinfo(one, two, 2);	// The factor is 2 and NOT 4
 }
 
 void DiskMeter::getdiskinfo( void )
--- linux/netmeter.cc
+++ linux/netmeter.cc	2006-07-26 16:08:30.000000000 +0000
@@ -28,6 +28,7 @@
 #include "xosview.h"
 
 #include <unistd.h>
+//#include <iomanip.h>
 #include <fstream>
 #include <string.h>
 #include <stdlib.h>
--- Xrmcommandline.h
+++ Xrmcommandline.h	2012-02-08 11:35:38.333935270 +0000
@@ -10,88 +10,88 @@ static XrmOptionDescRec options[] = {
 //    it is self-consistent, and self-explanatory.
 
 //  General, X11 resources:
-{ "-display", "*display", XrmoptionSepArg, (caddr_t) NULL },
-{ "-font", "*font", XrmoptionSepArg, (caddr_t) NULL },
-{ "-title", "*title", XrmoptionSepArg, (caddr_t) NULL },
-{ "-geometry", "*geometry", XrmoptionSepArg, (caddr_t) NULL },
-{ "-hmargin", "*horizontalMargin", XrmoptionSepArg, (caddr_t) NULL },
-{ "-vmargin", "*verticalMargin", XrmoptionSepArg, (caddr_t) NULL },
-{ "-vspacing", "*verticalSpacing", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-display", (char*)"*display", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-font", (char*)"*font", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-title", (char*)"*title", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-geometry", (char*)"*geometry", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-hmargin", (char*)"*horizontalMargin", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-vmargin", (char*)"*verticalMargin", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-vspacing", (char*)"*verticalSpacing", XrmoptionSepArg, (caddr_t) NULL },
 
 
 //  XOSView-specific resources:
-{ "-labels", "*labels", XrmoptionNoArg, "False" },
-{ "+labels", "*labels", XrmoptionNoArg, "True" },
-{ "-captions", "*captions", XrmoptionNoArg, "False" },
-{ "+captions", "*captions", XrmoptionNoArg, "True" },
-{ "-usedlabels", "*usedlabels", XrmoptionNoArg, "False" },
-{ "+usedlabels", "*usedlabels", XrmoptionNoArg, "True" },
-{ "-samplesPerSec", "*samplesPerSec", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-labels", (char*)"*labels", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+labels", (char*)"*labels", XrmoptionNoArg, (XPointer)"True" },
+{ (char*)"-captions", (char*)"*captions", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+captions", (char*)"*captions", XrmoptionNoArg, (XPointer)"True" },
+{ (char*)"-usedlabels", (char*)"*usedlabels", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+usedlabels", (char*)"*usedlabels", XrmoptionNoArg, (XPointer)"True" },
+{ (char*)"-samplesPerSec", (char*)"*samplesPerSec", XrmoptionSepArg, (caddr_t) NULL },
 //  CPU resources
-{ "-cpu", "*cpu", XrmoptionNoArg, "False" },
-{ "+cpu", "*cpu", XrmoptionNoArg, "True" },
+{ (char*)"-cpu", (char*)"*cpu", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+cpu", (char*)"*cpu", XrmoptionNoArg, (XPointer)"True" },
 // Load resources
-{ "-load", "*load", XrmoptionNoArg, "False" },
-{ "+load", "*load", XrmoptionNoArg, "True" },
+{ (char*)"-load", (char*)"*load", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+load", (char*)"*load", XrmoptionNoArg, (XPointer)"True" },
 // Memmeter resources
-{ "-mem", "*mem", XrmoptionNoArg, "False" },
-{ "+mem", "*mem", XrmoptionNoArg, "True" },
+{ (char*)"-mem", (char*)"*mem", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+mem", (char*)"*mem", XrmoptionNoArg, (XPointer)"True" },
 // Swapmeter resources
-{ "-swap", "*swap", XrmoptionNoArg, "False" },
-{ "+swap", "*swap", XrmoptionNoArg, "True" },
+{ (char*)"-swap", (char*)"*swap", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+swap", (char*)"*swap", XrmoptionNoArg, (XPointer)"True" },
 // Batterymeter resources
-{ "-battery", "*battery", XrmoptionNoArg, "False" },
-{ "+battery", "*battery", XrmoptionNoArg, "True" },
+{ (char*)"-battery", (char*)"*battery", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+battery", (char*)"*battery", XrmoptionNoArg, (XPointer)"True" },
 // Wirelessmeter resources
-{ "-wireless", "*wireless", XrmoptionNoArg, "False" },
-{ "+wireless", "*wireless", XrmoptionNoArg, "True" },
+{ (char*)"-wireless", (char*)"*wireless", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+wireless", (char*)"*wireless", XrmoptionNoArg, (XPointer)"True" },
 //  GFX resources
-{ "-gfx", "*gfx", XrmoptionNoArg, "False" },
-{ "+gfx", "*gfx", XrmoptionNoArg, "True" },
+{ (char*)"-gfx", (char*)"*gfx", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+gfx", (char*)"*gfx", XrmoptionNoArg, (XPointer)"True" },
 
 // Networkmeter resources
-{ "-net", "*net", XrmoptionNoArg, "False" },
-{ "+net", "*net", XrmoptionNoArg, "True" },
+{ (char*)"-net", (char*)"*net", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+net", (char*)"*net", XrmoptionNoArg, (XPointer)"True" },
 //  Previously, network was overloaded to be the bandwidth and the
 //  on/off flag.  Now, we have -net for on/off, and networkBandwidth
 //  for bandwidth, with the alias networkBW, and network for backwards
 //  compatibility.
-{ "-network", "*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
-{ "-networkBW", "*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
-{ "-networkBandwidth", "*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-network", (char*)"*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-networkBW", (char*)"*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-networkBandwidth", (char*)"*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
 
 // Page Meter
-{ "-page", "*page", XrmoptionNoArg, "False" },
-{ "+page", "*page", XrmoptionNoArg, "True" },
-{ "-pagespeed", "*pageBandWidth", XrmoptionSepArg, (caddr_t) NULL },
+{ (char*)"-page", (char*)"*page", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+page", (char*)"*page", XrmoptionNoArg, (XPointer)"True" },
+{ (char*)"-pagespeed", (char*)"*pageBandWidth", XrmoptionSepArg, (caddr_t) NULL },
 
 #if !defined(__hpux__) && !defined(__hpux)
 //  Disk Meter Options
-{ "-disk", "*disk", XrmoptionNoArg, "False" },
-{ "+disk", "*disk", XrmoptionNoArg, "True" },
+{ (char*)"-disk", (char*)"*disk", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+disk", (char*)"*disk", XrmoptionNoArg, (XPointer)"True" },
 #endif
 
 // Interrupt meter resources  --  all sorts of aliases.
-{ "-int", "*interrupts", XrmoptionNoArg, "False" },
-{ "+int", "*interrupts", XrmoptionNoArg, "True" },
-{ "-ints", "*interrupts", XrmoptionNoArg, "False" },
-{ "+ints", "*interrupts", XrmoptionNoArg, "True" },
-{ "-interrupts", "*interrupts", XrmoptionNoArg, "False" },
-{ "+interrupts", "*interrupts", XrmoptionNoArg, "True" },
+{ (char*)"-int", (char*)"*interrupts", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+int", (char*)"*interrupts", XrmoptionNoArg, (XPointer)"True" },
+{ (char*)"-ints", (char*)"*interrupts", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+ints", (char*)"*interrupts", XrmoptionNoArg, (XPointer)"True" },
+{ (char*)"-interrupts", (char*)"*interrupts", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+interrupts", (char*)"*interrupts", XrmoptionNoArg, (XPointer)"True" },
 
 // Intrate meter resources, for platforms that support it.
-{ "-irqrate", "*irqrate", XrmoptionNoArg, "False" },
-{ "+irqrate", "*irqrate", XrmoptionNoArg, "True" },
-{ "-intrate", "*irqrate", XrmoptionNoArg, "False" },
-{ "+intrate", "*irqrate", XrmoptionNoArg, "True" },
+{ (char*)"-irqrate", (char*)"*irqrate", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+irqrate", (char*)"*irqrate", XrmoptionNoArg, (XPointer)"True" },
+{ (char*)"-intrate", (char*)"*irqrate", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+intrate", (char*)"*irqrate", XrmoptionNoArg, (XPointer)"True" },
 
 // lmstemp resources
-{ "-lmstemp", "*lmstemp", XrmoptionNoArg, "False" },
-{ "+lmstemp", "*lmstemp", XrmoptionNoArg, "True" },
+{ (char*)"-lmstemp", (char*)"*lmstemp", XrmoptionNoArg, (XPointer)"False" },
+{ (char*)"+lmstemp", (char*)"*lmstemp", XrmoptionNoArg, (XPointer)"True" },
 
 //  Special, catch-all option here --
-//    xosview -xrm "*memFreeColor: purple" should work, for example.
-{ "-xrm", "*xrm", XrmoptionResArg, (caddr_t) NULL },
+//    xosview -xrm (char*)"*memFreeColor: purple" should work, for example.
+{ (char*)"-xrm", (char*)"*xrm", XrmoptionResArg, (caddr_t) NULL },
 };
 //  This auto-detects changes in the number of options.
 static const int NUM_OPTIONS = sizeof(options) / sizeof(options[0]);