* [PATCH] fixes for xosview
@ 1998-02-15 15:23 Quezcal
0 siblings, 0 replies; only message in thread
From: Quezcal @ 1998-02-15 15:23 UTC (permalink / raw)
I wanted to get xosview running, this is a diff to build it on a
rh-5.0 system from the xosview source from the SRPMS with egcs in
/usr/local, dont to the c++ -> /usr/local/bin/c++ change if you dont
have that.
.
Changes:
- remove suid root. we dont need it.
- Change Xdefaults to something that results in less CPU usage (less
updates) and have no network monitor per default so we dont crash when
the kernel has no ip accounting
- Fix some X weirdness
- remove serial monitor, no idea how to make it work and I dont need it.
- fix number of IRQs. Check for your Systems irqs in /usr/include/asm/irq.h
I dont use NO_IRQS as we need a String defined, too. Too much hassle to
do it the nice way right now.
- fix the TOP define so we find our libraries
Hope this helps anybody who wants xosview. Maybe someone at redhat will
include the binary in the distribution again. And does some of these "fixes"
the nice proper way.
Olaf
diff -bur -N /usr/src/redhat/BUILD/xosview-1.4.1/Makefile xosview-1.4.1-AXP/Makefile
--- /usr/src/redhat/BUILD/xosview-1.4.1/Makefile Fri Mar 8 22:00:32 1996
+++ xosview-1.4.1-AXP/Makefile Sun Feb 15 16:00:56 1998
@@ -36,7 +36,7 @@
ifeq ($(METERDIR),linux)
install:
- install -c -s -m 4755 $(EXE) /usr/bin/X11
+ install -c -s -m 755 $(EXE) /usr/bin/X11
install -c Xdefaults /usr/lib/X11/app-defaults/XOsview
endif
diff -bur -N /usr/src/redhat/BUILD/xosview-1.4.1/Makefile.config xosview-1.4.1-AXP/Makefile.config
--- /usr/src/redhat/BUILD/xosview-1.4.1/Makefile.config Sun Feb 15 16:10:55 1998
+++ xosview-1.4.1-AXP/Makefile.config Sun Feb 8 09:35:51 1998
@@ -12,7 +12,7 @@
# filesystem for NetBSD does not yet provide enough information for
# xosview to use it exclusively.
-TOP = ./
+TOP = .
#
# Choose your OS
@@ -29,14 +29,14 @@
#
# C++ compiler
#
-CXX = c++
+CXX = /usr/local/bin/c++
CXXFLAGS = -Wall -pipe $(DEFINES)
#
# Link flags and libraries
#
LFLAGS = -L$(METERDIR) -L/usr/X11R6/lib
-LIBS = -lmeter -lX11
+LIBS = -lmeter -lX11 -lstdc++
ifeq ($(METERDIR),linux)
# ********** Begin Linux specific stuff. ************
diff -bur -N /usr/src/redhat/BUILD/xosview-1.4.1/Xdefaults xosview-1.4.1-AXP/Xdefaults
--- /usr/src/redhat/BUILD/xosview-1.4.1/Xdefaults Fri Mar 8 17:11:03 1996
+++ xosview-1.4.1-AXP/Xdefaults Sun Feb 15 16:01:26 1998
@@ -8,65 +8,65 @@
! xosview*geometry: +5+5
! xosview*display:
xosview*labels: True
-xosview*meterLabelColor: wheat
+!xosview*meterLabelColor: wheat
xosview*usedlabels: True
-xosview*usedLabelColor: orange
+!xosview*usedLabelColor: orange
xosview*borderwidth: 0
xosview*font: 7x13bold
-xosview*background: navy
-xosview*foreground: wheat
+!xosview*background: navy
+!xosview*foreground: wheat
! Load Meter Resources
xosview*load: True
-xosview*loadWarnColor: orange
-xosview*loadProcColor: seagreen
-xosview*loadIdleColor: aquamarine
+!xosview*loadWarnColor: orange
+!xosview*loadProcColor: seagreen
+!xosview*loadIdleColor: aquamarine
xosview*loadPriority: 50
xosview*loadAlarmThreshold: 2
! CPU Meter Resources
xosview*cpu: True
-xosview*cpuUserColor: seagreen
-xosview*cpuNiceColor: yellow
-xosview*cpuSystemColor: orange
-xosview*cpuInterruptColor : red
-xosview*cpuFreeColor: aquamarine
-xosview*cpuPriority: 1
+!xosview*cpuUserColor: seagreen
+!xosview*cpuNiceColor: yellow
+!xosview*cpuSystemColor: orange
+!xosview*cpuInterruptColor : red
+!xosview*cpuFreeColor: aquamarine
+xosview*cpuPriority: 10
xosview*cpuDecay: True
! Memory Meter Resources
! Not all of these are used by a specific platform.
xosview*mem: True
-xosview*memUsedColor: seagreen
-xosview*memSharedColor: SkyBlue
-xosview*memBufferColor: orange
-xosview*memFreeColor: aquamarine
-xosview*memTextColor: blue
-xosview*memOtherColor: orange
-xosview*memActiveColor: blue
-xosview*memInactiveColor: lightblue
+!xosview*memUsedColor: seagreen
+!xosview*memSharedColor: SkyBlue
+!xosview*memBufferColor: orange
+!xosview*memFreeColor: aquamarine
+!xosview*memTextColor: blue
+!xosview*memOtherColor: orange
+!xosview*memActiveColor: blue
+!xosview*memInactiveColor: lightblue
xosview*memPriority: 10
-xosview*memDecay: False
+xosview*memDecay: True
! Swap Meter Resources
xosview*swap: True
-xosview*swapUsedColor: seagreen
-xosview*swapFreeColor: aquamarine
-xosview*swapPriority: 10
-xosview*swapDecay: False
+!xosview*swapUsedColor: seagreen
+!xosview*swapFreeColor: aquamarine
+xosview*swapPriority: 50
+xosview*swapDecay: True
! Network Meter Resources
-xosview*network: 2000
+xosview*network: 0
xosview*netInColor: SkyBlue
xosview*netOutColor: SlateBlue1
xosview*netBackground: aquamarine
-xosview*netPriority: 2
+xosview*netPriority: 600
xosview*netDecay: True
! Serial Meter Resources
@@ -77,10 +77,10 @@
xosview*serial4: False
xosview*serialOnColor: red
xosview*serialOffColor: aquamarine
-xosview*serialPriority: 1
+xosview*serialPriority: 600
! Interrupt Meter Resources
xosview*interrupts: True
-xosview*intOnColor: red
-xosview*intOffColor: aquamarine
+!xosview*intOnColor: red
+!xosview*intOffColor: aquamarine
diff -bur -N /usr/src/redhat/BUILD/xosview-1.4.1/linux/intmeter.cc xosview-1.4.1-AXP/linux/intmeter.cc
--- /usr/src/redhat/BUILD/xosview-1.4.1/linux/intmeter.cc Fri Feb 16 16:45:27 1996
+++ xosview-1.4.1-AXP/linux/intmeter.cc Sun Feb 15 15:59:35 1998
@@ -16,9 +16,9 @@
IntMeter::IntMeter( XOSView *parent,
const char *, const char *, int dolegends,
int dousedlegends )
-: BitMeter( parent, "INTS", "IRQs (0 - 15)", 16,
+: BitMeter( parent, "INTS", NOIRQTXT, NOIRQ,
dolegends, dousedlegends ) {
- for ( int i = 0 ; i < 16 ; i++ )
+ for ( int i = 0 ; i < NOIRQ; i++ )
irqs_[i] = lastirqs_[i] = 0;
}
@@ -29,7 +29,7 @@
void IntMeter::checkevent( void ){
getirqs();
- for ( int i = 0 ; i < 16 ; i++ ){
+ for ( int i = 0 ; i < NOIRQ ; i++ ){
bits_[i] = ((irqs_[i] - lastirqs_[i]) != 0);
lastirqs_[i] = irqs_[i];
}
diff -bur -N /usr/src/redhat/BUILD/xosview-1.4.1/linux/intmeter.h xosview-1.4.1-AXP/linux/intmeter.h
--- /usr/src/redhat/BUILD/xosview-1.4.1/linux/intmeter.h Fri Feb 16 16:45:27 1996
+++ xosview-1.4.1-AXP/linux/intmeter.h Sun Feb 15 15:58:49 1998
@@ -9,6 +9,8 @@
#include "bitmeter.h"
+#define NOIRQ 33
+#define NOIRQTXT "IRQs (0 - 32)"
class IntMeter : public BitMeter {
public:
@@ -21,7 +23,7 @@
void checkResources( void );
protected:
- unsigned long irqs_[16], lastirqs_[16];
+ unsigned long irqs_[NOIRQ], lastirqs_[NOIRQ];
void getirqs( void );
};
diff -bur -N /usr/src/redhat/BUILD/xosview-1.4.1/linux/serialmeter.cc xosview-1.4.1-AXP/linux/serialmeter.cc
--- /usr/src/redhat/BUILD/xosview-1.4.1/linux/serialmeter.cc Fri Feb 16 16:45:27 1996
+++ xosview-1.4.1-AXP/linux/serialmeter.cc Sun Feb 8 09:35:51 1998
@@ -63,8 +63,12 @@
void SerialMeter::getserial( void ){
// get the LSR and MSR
- unsigned char lsr = inb(_port + UART_LSR);
- unsigned char msr = inb(_port + UART_MSR);
+ // unsigned char lsr = inb(_port + UART_LSR);
+ // unsigned char msr = inb(_port + UART_MSR);
+
+ // Broken , no serial
+ unsigned char lsr = 0;
+ unsigned char msr = 0;
//cerr <<"lsr = " <<(int)lsr <<", msr = " <<(int)msr <<endl;
diff -bur -N /usr/src/redhat/BUILD/xosview-1.4.1/xwin.cc xosview-1.4.1-AXP/xwin.cc
--- /usr/src/redhat/BUILD/xosview-1.4.1/xwin.cc Fri Feb 16 16:45:30 1996
+++ xosview-1.4.1-AXP/xwin.cc Sun Feb 8 09:35:52 1998
@@ -46,9 +46,9 @@
// Set up the default Events
events_ = NULL;
- addEvent( new Event( this, ConfigureNotify, configureEvent ) );
- addEvent( new Event( this, ClientMessage, deleteEvent ) );
- addEvent( new Event( this, MappingNotify, mappingNotify ) );
+ addEvent( new Event( this, ConfigureNotify, &configureEvent ) );
+ addEvent( new Event( this, ClientMessage, &deleteEvent ) );
+ addEvent( new Event( this, MappingNotify, &mappingNotify ) );
//openDisplay(); // Done explicitly in xosview.cc.
}
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-02-15 15:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-02-15 15:23 [PATCH] fixes for xosview Quezcal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox