X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fexim_monitor%2Fem_strip.c;h=2a5f0b84e72969bab41d9dd0b4453e2c8034ac55;hb=6c4545562d5b520ad23d9470382dde4b2af9671f;hp=4d76fb5da0a801a0d0707a06e4269dad849547d8;hpb=184e88237dea64ce48076cdd0184612d057cbafd;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/exim_monitor/em_strip.c b/src/exim_monitor/em_strip.c index 4d76fb5da..2a5f0b84e 100644 --- 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.4 2007/01/08 10:50:17 ph10 Exp $ */ - /************************************************* * Exim Monitor * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2007 */ +/* Copyright (c) University of Cambridge 1995 - 2009 */ /* 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_last_total; /* vector of prevous values */ +static int *stripchart_last_total; /* vector of previous values */ 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. */ -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}; -int num = (int)client_data; +int num = (long)client_data; int oldmax = 0; int newmax = 0; int newvalue = 0; @@ -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. */ -void create_stripchart(Widget parent, uschar *title) +void +create_stripchart(Widget parent, uschar *title) { Widget chart; @@ -251,7 +251,7 @@ xs_SetValues(chart, 11, XtNfromVert, label); XtAddCallback(chart, "getValue", stripchartAction, - (XtPointer)stripchart_count); + (XtPointer)(long)stripchart_count); stripchart_last_total[stripchart_count] = 0; stripchart_max[stripchart_count] = 10;