ports/sysutils/xloadface/files/patch-01
David E. O'Brien a236bfc478 `xloadface' is a network load monitor for X11. This program use the rwhod
database for display `user' and `CPU load'.   It displays a face for
each machine gotten from rwho.  Quite cute.

The README and manpage are in Japanese.

Closes-PR:  ports/2115

Submitted by:   furusawa@com.cs.osakafu-u.ac.jp
1996-12-04 02:04:58 +00:00

324 lines
8.8 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff -cr xloadface-1.6.1.org/ArrangeBox.c xloadface-1.6.1/ArrangeBox.c
*** xloadface-1.6.1.org/ArrangeBox.c Tue Oct 29 23:39:53 1996
--- xloadface-1.6.1/ArrangeBox.c Thu Nov 28 11:26:32 1996
***************
*** 69,75 ****
},
{
/* box_class fields */
! /* empty */ NULL,
},
{
/* ArrangeBox class fields */
--- 69,75 ----
},
{
/* box_class fields */
! /* empty */ 0,
},
{
/* ArrangeBox class fields */
***************
*** 194,201 ****
w->core.parent->core.border_width);
XtResizeWindow(w->core.parent);
}
! XtResizeWidget(w,width,height,w->core.border_width);
! XtResizeWindow(w);
}
}
--- 194,201 ----
w->core.parent->core.border_width);
XtResizeWindow(w->core.parent);
}
! XtResizeWidget((Widget)w,width,height,w->core.border_width);
! XtResizeWindow((Widget)w);
}
}
***************
*** 203,217 ****
* Insert child method
*/
static void
! InsertChild(w,arg,num_args)
Widget w;
- ArgList arg;
- Cardinal *num_args;
{
ArrangeBoxWidget ab;
ab = (ArrangeBoxWidget)w->core.parent;
! (*((CompositeClassRec*)XtSuperclass(ab))->composite_class.insert_child)(w,arg,num_args);
RearrangeSize(ab);
}
--- 203,215 ----
* Insert child method
*/
static void
! InsertChild(w)
Widget w;
{
ArrangeBoxWidget ab;
ab = (ArrangeBoxWidget)w->core.parent;
! (*((CompositeClassRec*)XtSuperclass(ab))->composite_class.insert_child)(w);
RearrangeSize(ab);
}
diff -cr xloadface-1.6.1.org/Imakefile xloadface-1.6.1/Imakefile
*** xloadface-1.6.1.org/Imakefile Tue Oct 29 23:39:53 1996
--- xloadface-1.6.1/Imakefile Thu Nov 28 11:26:32 1996
***************
*** 11,14 ****
SYS_LIBRARIES = -lm
ComplexProgramTarget(xloadface)
- InstallManPage(xloadface.1,$(MANDIR)/xalive.n)
--- 11,13 ----
diff -cr xloadface-1.6.1.org/LabeledPicture.c xloadface-1.6.1/LabeledPicture.c
*** xloadface-1.6.1.org/LabeledPicture.c Tue Oct 29 23:39:53 1996
--- xloadface-1.6.1/LabeledPicture.c Thu Nov 28 11:26:32 1996
***************
*** 153,159 ****
Window rootwin;
lp->label_width = XTextWidth(lp->font,lp->label,strlen(lp->label));
! if (lp->pixmap != NULL && lp->pixmap != AiNullPixmap) {
XGetGeometry(XtDisplay(w),lp->pixmap,
&rootwin,
&x,
--- 153,159 ----
Window rootwin;
lp->label_width = XTextWidth(lp->font,lp->label,strlen(lp->label));
! if (lp->pixmap != 0 && lp->pixmap != AiNullPixmap) {
XGetGeometry(XtDisplay(w),lp->pixmap,
&rootwin,
&x,
***************
*** 355,361 ****
{
UnSelectIt(w);
if (w->labeled_picture.sensitive) {
! XtCallCallbacks(w, AiNcallback, (caddr_t)event);
}
}
--- 355,361 ----
{
UnSelectIt(w);
if (w->labeled_picture.sensitive) {
! XtCallCallbacks((Widget)w, AiNcallback, (caddr_t)event);
}
}
***************
*** 391,397 ****
AdjustSize(w,True);
if (width != w->core.width || height != w->core.height) {
! XtResizeWidget(w,
w->core.width,
w->core.height,
w->core.border_width);
--- 391,397 ----
AdjustSize(w,True);
if (width != w->core.width || height != w->core.height) {
! XtResizeWidget((Widget)w,
w->core.width,
w->core.height,
w->core.border_width);
diff -cr xloadface-1.6.1.org/LoadFace.c xloadface-1.6.1/LoadFace.c
*** xloadface-1.6.1.org/LoadFace.c Tue Oct 29 23:39:53 1996
--- xloadface-1.6.1/LoadFace.c Thu Nov 28 11:26:32 1996
***************
*** 2,7 ****
--- 2,8 ----
#include <X11/StringDefs.h>
#include "LoadFaceP.h"
#include <stdio.h>
+ #include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <math.h>
***************
*** 166,172 ****
{
LoadFaceWidget w = (LoadFaceWidget)new;
! CALL_SUPER(w,expose,(new));
}
#define HERE(w,tag) (w)->core_class.tag
--- 167,173 ----
{
LoadFaceWidget w = (LoadFaceWidget)new;
! CALL_SUPER(w,expose,(new,NULL,NULL));
}
#define HERE(w,tag) (w)->core_class.tag
***************
*** 208,221 ****
picture = class->faces_data[0].pixmap;
}
AiChangePixmap(w,picture,False,True);
! CALL_SUPER(new,initialize,(request,new));
if (w->load_face.interval > 0) {
if (w->load_face.shuffle)
firstInterval = random()%(w->load_face.interval*2000);
else
firstInterval = w->load_face.interval*1000;
w->load_face.interval_id =
! XtAppAddTimeOut(XtWidgetToApplicationContext(w),
firstInterval,
updateLoad,
(caddr_t)w);
--- 209,222 ----
picture = class->faces_data[0].pixmap;
}
AiChangePixmap(w,picture,False,True);
! CALL_SUPER(new,initialize,(request,new,NULL,NULL));
if (w->load_face.interval > 0) {
if (w->load_face.shuffle)
firstInterval = random()%(w->load_face.interval*2000);
else
firstInterval = w->load_face.interval*1000;
w->load_face.interval_id =
! XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)w),
firstInterval,
updateLoad,
(caddr_t)w);
***************
*** 262,268 ****
wd.wd_sendtime = wd.wd_recvtime = 0;
AiChangeLoad(w,&wd);
w->load_face.interval_id =
! XtAppAddTimeOut(XtWidgetToApplicationContext(w),
w->load_face.interval*1000,
updateLoad,
(caddr_t)w);
--- 263,269 ----
wd.wd_sendtime = wd.wd_recvtime = 0;
AiChangeLoad(w,&wd);
w->load_face.interval_id =
! XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)w),
w->load_face.interval*1000,
updateLoad,
(caddr_t)w);
***************
*** 290,297 ****
newFace = FACE(w,newload);
AiChangePixmap(w,newFace->pixmap,False,False);
! if (XtIsRealized(w) && oldload != newload)
! CALL_SELF(w, expose, (w));
}
static void
--- 291,298 ----
newFace = FACE(w,newload);
AiChangePixmap(w,newFace->pixmap,False,False);
! if (XtIsRealized((Widget)w) && oldload != newload)
! CALL_SELF(w, expose, (w,NULL,NULL));
}
static void
diff -cr xloadface-1.6.1.org/MachineInfo.c xloadface-1.6.1/MachineInfo.c
*** xloadface-1.6.1.org/MachineInfo.c Tue Oct 29 23:39:53 1996
--- xloadface-1.6.1/MachineInfo.c Thu Nov 28 11:26:32 1996
***************
*** 295,299 ****
LINE_SKIP(w->machine_info.title_font)+
LINE_SKIP(w->machine_info.load_info_font)*3+
LINE_SKIP(w->machine_info.user_info_font)*nusers(wd);
! XtResizeWidget(w, w->core.width, h, w->core.border_width);
}
--- 295,299 ----
LINE_SKIP(w->machine_info.title_font)+
LINE_SKIP(w->machine_info.load_info_font)*3+
LINE_SKIP(w->machine_info.user_info_font)*nusers(wd);
! XtResizeWidget((Widget)w, w->core.width, h, w->core.border_width);
}
diff -cr xloadface-1.6.1.org/alive.h xloadface-1.6.1/alive.h
*** xloadface-1.6.1.org/alive.h Tue Oct 29 23:39:53 1996
--- xloadface-1.6.1/alive.h Thu Nov 28 11:27:09 1996
***************
*** 31,37 ****
#define SSIZE sizeof(u_short)
#define LSIZE sizeof(u_long)
! #define SPOOLDIR "/usr/spool/rwho"
#define ORGAN_FILE "/etc/host_org"
typedef char bool;
--- 31,37 ----
#define SSIZE sizeof(u_short)
#define LSIZE sizeof(u_long)
! #define SPOOLDIR "/var/rwho"
#define ORGAN_FILE "/etc/host_org"
typedef char bool;
diff -cr xloadface-1.6.1.org/widgets.c xloadface-1.6.1/widgets.c
*** xloadface-1.6.1.org/widgets.c Tue Oct 29 23:39:53 1996
--- xloadface-1.6.1/widgets.c Thu Nov 28 11:26:32 1996
***************
*** 224,230 ****
/***** Popup Info *****/
PopupInfo = XtCreatePopupShell("PopupInfo",transientShellWidgetClass,
! Toplevel,NULL,NULL);
PopupPane = mkWidget("InfoPane",arrangeBoxWidgetClass,PopupInfo,
AiNvertNum, 1,
AiNresizeParent, True,
--- 224,230 ----
/***** Popup Info *****/
PopupInfo = XtCreatePopupShell("PopupInfo",transientShellWidgetClass,
! Toplevel,NULL,0);
PopupPane = mkWidget("InfoPane",arrangeBoxWidgetClass,PopupInfo,
AiNvertNum, 1,
AiNresizeParent, True,
***************
*** 236,242 ****
/***** Popup Help *****/
helpScreen = XtCreatePopupShell("Help",transientShellWidgetClass,
! Toplevel,NULL,NULL);
addFaces();
adjustWindowSize();
--- 236,242 ----
/***** Popup Help *****/
helpScreen = XtCreatePopupShell("Help",transientShellWidgetClass,
! Toplevel,NULL,0);
addFaces();
adjustWindowSize();
diff -cr xloadface-1.6.1.org/xloadface.1 xloadface-1.6.1/xloadface.1
*** xloadface-1.6.1.org/xloadface.1 Tue Oct 29 23:39:53 1996
--- xloadface-1.6.1/xloadface.1 Thu Nov 28 11:26:51 1996
***************
*** 104,110 ****
$@%0%k!<%WL>$r>JN,$7$?>l9g$K$O$3$N%0%k!<%W$,I=<($5$l$k!%(J
.SH FILES
.TP
! .IR /usr/spool/rwho/whod.* $@3F%[%9%H$N>pJs(J
.TP
.IR /etc/host_org $@%0%k!<%W5-=R%U%!%$%k(J
.SH RELATED INFORMATION
--- 104,110 ----
$@%0%k!<%WL>$r>JN,$7$?>l9g$K$O$3$N%0%k!<%W$,I=<($5$l$k!%(J
.SH FILES
.TP
! .IR /var/rwho/whod.* $@3F%[%9%H$N>pJs(J
.TP
.IR /etc/host_org $@%0%k!<%W5-=R%U%!%$%k(J
.SH RELATED INFORMATION