From 2c0095c270269c36c38a423bed4be6f3b6eeec9f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 16 Sep 2014 18:15:08 +0000 Subject: add data container --- Sgraph.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Sgraph.c') diff --git a/Sgraph.c b/Sgraph.c index d880c60..34cdd5a 100644 --- a/Sgraph.c +++ b/Sgraph.c @@ -143,7 +143,8 @@ Initialize(Widget request, Widget w, ArgList args, Cardinal *nargs) { SgraphWidget sw = (SgraphWidget)w; - sw->sgraph.data = NULL; + sw->sgraph.leftData = XtCalloc(sw->sgraph.sizeData, sizeof(double)); + sw->sgraph.rightData = XtCalloc(sw->sgraph.sizeData, sizeof(double)); warnx("Initialize"); GetGC(w); @@ -211,8 +212,6 @@ Redisplay(Widget w, XEvent *event, Region r) width + BORDER, BORDER, width - 2 * BORDER, height - 2 * BORDER); */ - if (sw->sgraph.data != NULL) - warnx("%d", *(int *)sw->sgraph.data); XClearWindow(XtDisplay(sw), XtWindow(sw)); n = (n + 1) % width; -- cgit v1.2.3