git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Variable setting in -be
[exim.git]
/
src
/
exim_monitor
/
em_strip.c
diff --git
a/src/exim_monitor/em_strip.c
b/src/exim_monitor/em_strip.c
index 9f1cdad7273e31387390bb2908cc95caa282e550..03864d2908b2dcc84b1bf8fbe392d65d915f252b 100644
(file)
--- a/
src/exim_monitor/em_strip.c
+++ b/
src/exim_monitor/em_strip.c
@@
-1,10
+1,8
@@
-/* $Cambridge: exim/src/exim_monitor/em_strip.c,v 1.3 2006/02/07 11:18:59 ph10 Exp $ */
-
/*************************************************
* Exim Monitor *
*************************************************/
/*************************************************
* Exim Monitor *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 200
6
*/
+/* Copyright (c) University of Cambridge 1995 - 200
9
*/
/* See the file NOTICE for conditions of use and distribution. */
/* See the file NOTICE for conditions of use and distribution. */
@@
-23,7
+21,7
@@
static int size_first_time = 1; /* and another */
static int stripchart_count = 0; /* count stripcharts created */
static int *stripchart_delay; /* vector of delay counts */
static Widget *stripchart_label; /* vector of label widgets */
static int stripchart_count = 0; /* count stripcharts created */
static int *stripchart_delay; /* vector of delay counts */
static Widget *stripchart_label; /* vector of label widgets */
-static int *stripchart_last_total; /* vector of prevous values */
+static int *stripchart_last_total; /* vector of prev
i
ous values */
static int *stripchart_max; /* vector of maxima */
static int *stripchart_middelay; /* vector of */
static int *stripchart_midmax; /* vector of */
static int *stripchart_max; /* vector of maxima */
static int *stripchart_middelay; /* vector of */
static int *stripchart_midmax; /* vector of */
@@
-60,12
+58,13
@@
a little game in order to ensure that the double value is correctly
passed back via the value pointer without the compiler doing an
unwanted cast. */
passed back via the value pointer without the compiler doing an
unwanted cast. */
-static void stripchartAction(Widget w, XtPointer client_data, XtPointer value)
+static void
+stripchartAction(Widget w, XtPointer client_data, XtPointer value)
{
{
-double *ptr = (double *)value;
+double *
ptr = (double *)value;
static int thresholds[] =
{10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 0};
static int thresholds[] =
{10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 0};
-int num = (
int
)client_data;
+int num = (
long
)client_data;
int oldmax = 0;
int newmax = 0;
int newvalue = 0;
int oldmax = 0;
int newmax = 0;
int newvalue = 0;
@@
-142,7
+141,7
@@
while (thresholds[i] > 0)
thresh : stripchart_midmax[num];
if (newmax == 10) sprintf(CS buffer, "%s", stripchart_name[num]);
else sprintf(CS buffer, "%s x%d", stripchart_name[num], newmax/10);
thresh : stripchart_midmax[num];
if (newmax == 10) sprintf(CS buffer, "%s", stripchart_name[num]);
else sprintf(CS buffer, "%s x%d", stripchart_name[num], newmax/10);
- if (size_stripchart != NULL && num == 1) Ustrcat(buffer, "%");
+ if (size_stripchart != NULL && num == 1) Ustrcat(buffer,
US
"%");
xs_SetValues(stripchart_label[num], 1, "label", buffer);
oldmax = stripchart_max[num];
stripchart_max[num] = newmax;
xs_SetValues(stripchart_label[num], 1, "label", buffer);
oldmax = stripchart_max[num];
stripchart_max[num] = newmax;
@@
-215,7
+214,8
@@
and for the second if it is a partition size display; its update time is
initially set to 1 second so that it gives an immediate display of the queue.
The first time its callback function is obeyed, the update time gets reset. */
initially set to 1 second so that it gives an immediate display of the queue.
The first time its callback function is obeyed, the update time gets reset. */
-void create_stripchart(Widget parent, uschar *title)
+void
+create_stripchart(Widget parent, uschar *title)
{
Widget chart;
{
Widget chart;
@@
-251,7
+251,7
@@
xs_SetValues(chart, 11,
XtNfromVert, label);
XtAddCallback(chart, "getValue", stripchartAction,
XtNfromVert, label);
XtAddCallback(chart, "getValue", stripchartAction,
- (XtPointer)stripchart_count);
+ (XtPointer)
(long)
stripchart_count);
stripchart_last_total[stripchart_count] = 0;
stripchart_max[stripchart_count] = 10;
stripchart_last_total[stripchart_count] = 0;
stripchart_max[stripchart_count] = 10;