summaryrefslogtreecommitdiff
path: root/sysutils/xperfmon3/files/patch-ab
blob: 7ed45a98894f69cbdc9058d30e836c842db6ddf5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
*** ../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);
  }