Summary: update function definitions

This commit is contained in:
bch 2017-02-26 16:02:48 +00:00
parent a63975b5f9
commit 9484298c47

View File

@ -51,7 +51,7 @@ static XtResource resources[] = {
#undef offset #undef offset
static void Initialize(), Destroy(), Redisplay(), MoveChart(), SetPoints(); static void Initialize(), Destroy(), Redisplay(), MoveChart(MemStripChartWidget w, Boolean blit), SetPoints();
static Boolean SetValues(); static Boolean SetValues();
static int repaint_window(); static int repaint_window();
@ -114,9 +114,7 @@ static void draw_it();
*/ */
static void static void
CreateGC(w, which) CreateGC(MemStripChartWidget w, unsigned int which)
MemStripChartWidget w;
unsigned int which;
{ {
XGCValues myXGCV; XGCValues myXGCV;
@ -165,9 +163,7 @@ CreateGC(w, which)
*/ */
static void static void
DestroyGC(w, which) DestroyGC(MemStripChartWidget w, unsigned int which)
MemStripChartWidget w;
unsigned int which;
{ {
if (which & FOREGROUND) if (which & FOREGROUND)
XtReleaseGC((Widget) w, w->mem_strip_chart.fgGC); XtReleaseGC((Widget) w, w->mem_strip_chart.fgGC);
@ -205,9 +201,7 @@ DestroyGC(w, which)
*/ */
static void static void
DrawMemStrip(w, x) DrawMemStrip(MemStripChartWidget w, unsigned int x)
MemStripChartWidget w;
unsigned int x;
{ {
int top, bottom; int top, bottom;
@ -260,10 +254,7 @@ DrawMemStrip(w, x)
} }
/* ARGSUSED */ /* ARGSUSED */
static void Initialize (greq, gnew, args, num_args) static void Initialize (Widget greq, Widget gnew, ArgList args, Cardinal *num_args)
Widget greq, gnew;
ArgList args;
Cardinal *num_args;
{ {
MemStripChartWidget w = (MemStripChartWidget)gnew; MemStripChartWidget w = (MemStripChartWidget)gnew;
@ -281,8 +272,7 @@ static void Initialize (greq, gnew, args, num_args)
SetPoints(w); SetPoints(w);
} }
static void Destroy (gw) static void Destroy (Widget gw)
Widget gw;
{ {
MemStripChartWidget w = (MemStripChartWidget)gw; MemStripChartWidget w = (MemStripChartWidget)gw;
@ -300,10 +290,7 @@ static void Destroy (gw)
*/ */
/* ARGSUSED */ /* ARGSUSED */
static void Redisplay(w, event, region) static void Redisplay(Widget w, XEvent *event, Region region)
Widget w;
XEvent *event;
Region region;
{ {
if (event->type == GraphicsExpose) if (event->type == GraphicsExpose)
(void) repaint_window ((MemStripChartWidget)w, event->xgraphicsexpose.x, (void) repaint_window ((MemStripChartWidget)w, event->xgraphicsexpose.x,
@ -315,9 +302,7 @@ static void Redisplay(w, event, region)
/* ARGSUSED */ /* ARGSUSED */
static void static void
draw_it(client_data, id) draw_it(XtPointer client_data, XtIntervalId *id)
XtPointer client_data;
XtIntervalId *id; /* unused */
{ {
MemStripChartWidget w = (MemStripChartWidget)client_data; MemStripChartWidget w = (MemStripChartWidget)client_data;
MemStripChartCallbackData value; MemStripChartCallbackData value;
@ -356,7 +341,8 @@ draw_it(client_data, id)
w->mem_strip_chart.valuedata[w->mem_strip_chart.interval] = value; w->mem_strip_chart.valuedata[w->mem_strip_chart.interval] = value;
if (XtIsRealized((Widget)w)) { if (XtIsRealized((Widget)w)) {
DrawMemStrip(w, w->mem_strip_chart.interval, value); /* XXX DrawMemStrip(w, w->mem_strip_chart.interval, value); */
DrawMemStrip(w, w->mem_strip_chart.interval);
/* /*
* Fill in the graph lines we just painted over. * Fill in the graph lines we just painted over.
@ -385,9 +371,7 @@ draw_it(client_data, id)
*/ */
static int static int
repaint_window(w, left, width) repaint_window(MemStripChartWidget w, int left, int width)
MemStripChartWidget w;
int left, width;
{ {
int i, j; int i, j;
int next = w->mem_strip_chart.interval; int next = w->mem_strip_chart.interval;
@ -425,7 +409,7 @@ repaint_window(w, left, width)
/* Draw data point lines. */ /* Draw data point lines. */
for (i = left; i < width; i++) { for (i = left; i < width; i++) {
DrawMemStrip(w, i, w->mem_strip_chart.valuedata[i]); DrawMemStrip(w, i);
} }
/* Draw graph reference lines */ /* Draw graph reference lines */
@ -445,9 +429,7 @@ repaint_window(w, left, width)
*/ */
static void static void
MoveChart(w, blit) MoveChart(MemStripChartWidget w, Boolean blit)
MemStripChartWidget w;
Boolean blit;
{ {
double old_max; double old_max;
int left, i, j; int left, i, j;
@ -509,10 +491,7 @@ MoveChart(w, blit)
} }
/* ARGSUSED */ /* ARGSUSED */
static Boolean SetValues (current, request, new, args, num_args) static Boolean SetValues (Widget current, Widget request, Widget new, ArgList args, Cardinal *num_args)
Widget current, request, new;
ArgList args;
Cardinal *num_args;
{ {
MemStripChartWidget old = (MemStripChartWidget)current; MemStripChartWidget old = (MemStripChartWidget)current;
MemStripChartWidget w = (MemStripChartWidget)new; MemStripChartWidget w = (MemStripChartWidget)new;
@ -583,8 +562,7 @@ static Boolean SetValues (current, request, new, args, num_args)
#define HEIGHT ( (unsigned int) w->core.height) #define HEIGHT ( (unsigned int) w->core.height)
static void static void
SetPoints(widget) SetPoints(Widget widget)
Widget widget;
{ {
MemStripChartWidget w = (MemStripChartWidget) widget; MemStripChartWidget w = (MemStripChartWidget) widget;
XPoint * points; XPoint * points;