1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-13 23:36:08 +00:00
freebsd-ports/sysutils/xperfmon3/files/patch-ab
Gary Jennejohn 091207b6c2 Update to version 3.0. This version only works for FreeBSD 3.0R or
higher.
Submitted from: Lars Koeller (the maintainer)
1999-02-04 05:10:54 +00:00

171 lines
6.5 KiB
Plaintext

*** ../xperfmon++/misc.c Wed Jul 27 22:29:33 1994
--- ./misc.c Sun Jan 10 21:14:22 1999
***************
*** 1,10 ****
/* Copyright 1994, Roger Smith for Sterling Software and NASA-Ames Research Center
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
! * documentation, and that the name of NASA and Sterling Software (collectively
* or individually) are not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. NASA and Sterling Software makes no representations about the
--- 1,17 ----
+ /*
+ * Enhancement and error correction for FreeBSD-3.X
+ * COPYRIGHT 1998 by Lars Köller <Lars.Koeller@Uni-Bielefeld.de>
+ *
+ * $Id: misc.c,v 3.3 1999/01/10 20:13:27 lkoeller Exp lkoeller $
+ */
+
/* Copyright 1994, Roger Smith for Sterling Software and NASA-Ames Research Center
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
! * documentation, and that the name of NASA and Sterling Software (collectively
* or individually) are not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. NASA and Sterling Software makes no representations about the
***************
*** 15,27 ****
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NASA & STERLING SOFTWARE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
! * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* 1994 Revision
* Author: Roger Smith, Sterling Software @ NASA-Ames Research Center
* Moffett Field, California, rsmith@proteus.arc.nasa.gov
*/
#include <stdio.h>
#include <X11/IntrinsicP.h>
--- 22,40 ----
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NASA & STERLING SOFTWARE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
! * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* 1994 Revision
* Author: Roger Smith, Sterling Software @ NASA-Ames Research Center
* Moffett Field, California, rsmith@proteus.arc.nasa.gov
*/
+
+ #ifndef LINT
+ static char rcsid[] = "$Id: misc.c,v 3.3 1999/01/10 20:13:27 lkoeller Exp lkoeller $";
+ #endif
+
+ #include "fbsd_vers.h"
#include <stdio.h>
#include <X11/IntrinsicP.h>
***************
*** 42,48 ****
static void adjust_timeout();
! /* This routine interprets the key that was pressed on top of the window.
* It returns TRUE if Quit has been selected, signaling that the program
* is done.
*/
--- 55,61 ----
static void adjust_timeout();
! /* This routine interprets the key that was pressed on top of the window.
* It returns TRUE if Quit has been selected, signaling that the program
* is done.
*/
***************
*** 58,64 ****
int i, keycode, length = 0;
/* PerfmonWidget pw = (PerfmonWidget) w;*/
! length = XLookupString(event, strbuf, STRBUFSIZE, &keycode, NULL);
switch (keycode) {
case 'Q':
case 'q':
--- 71,77 ----
int i, keycode, length = 0;
/* PerfmonWidget pw = (PerfmonWidget) w;*/
! length = XLookupString((XKeyEvent *)event, strbuf, STRBUFSIZE, (KeySym *)&keycode, NULL);
switch (keycode) {
case 'Q':
case 'q':
***************
*** 88,103 ****
break;
case 'L':
case 'l': /* print out a chart of current limit settings */
! printf("\n%10s %5s %5s %5s %5s\n",
! "Widget", "Hi ", "Hi ", "Low", "Low ");
! printf("%10s %5s %5s %5s %5s\n",
! "Name ", "Warn", "Alarm", "Warn", "Alarm");
! printf("%10s %5s %5s %5s %5s\n",
! "------", "-----","-----","-----","-----");
for ( i=0; i<NUM_GRAPHS; i++ ) {
if ( perfmon[i] ) {
PerfChartWidget pw = (PerfChartWidget)perfmon[i];
! printf("%10s %5d %5d %5d %5d\n",
widgetLabels[i],
pw->strip_chart.highWarn,
pw->strip_chart.highAlarm,
--- 101,116 ----
break;
case 'L':
case 'l': /* print out a chart of current limit settings */
! printf("\n%16s %6s %6s %6s %6s\n",
! " Widget ", " Hi ", " Hi ", " Low", " Low ");
! printf("%16s %6s %6s %6s %6s\n",
! " Name ", " Warn", " Alarm", " Warn", " Alarm");
! printf("%16s %6s %6s %6s %6s\n",
! "--------", "------","------","------","------");
for ( i=0; i<NUM_GRAPHS; i++ ) {
if ( perfmon[i] ) {
PerfChartWidget pw = (PerfChartWidget)perfmon[i];
! printf("%16s %6d %6d %6d %6d\n",
widgetLabels[i],
pw->strip_chart.highWarn,
pw->strip_chart.highAlarm,
***************
*** 152,158 ****
appData.interval += delta;
XtRemoveTimeOut(appData.interval_id);
!
appData.interval_id =
XtAppAddTimeOut(appData.app_context,
appData.interval*appData.ms_per_sec, start_graphs, (caddr_t) appData.toplevel);
--- 165,171 ----
appData.interval += delta;
XtRemoveTimeOut(appData.interval_id);
!
appData.interval_id =
XtAppAddTimeOut(appData.app_context,
appData.interval*appData.ms_per_sec, start_graphs, (caddr_t) appData.toplevel);
***************
*** 160,166 ****
(void)gethostname(hostname, sizeof(hostname));
c = (char *) ((long) &hostname[0] + (int) strlen(hostname));
! sprintf(c, "\nUpdate Interval = %5.1f secs",
(float)(appData.interval*appData.ms_per_sec)/1000.0);
XtVaSetValues(labelBox, XtNlabel, hostname, NULL);
}
--- 173,179 ----
(void)gethostname(hostname, sizeof(hostname));
c = (char *) ((long) &hostname[0] + (int) strlen(hostname));
! sprintf(c, "\nUpdate Interval = %5.1f secs",
(float)(appData.interval*appData.ms_per_sec)/1000.0);
XtVaSetValues(labelBox, XtNlabel, hostname, NULL);
}