aboutsummaryrefslogtreecommitdiff
path: root/Sgraph.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-16 18:15:08 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-16 18:15:08 +0000
commit2c0095c270269c36c38a423bed4be6f3b6eeec9f (patch)
tree067e4537531b9c679b81b2e421fa8c91661c8d11 /Sgraph.c
parentb58b3d8b52c41f604469bbb8f7c90d39dbccb33a (diff)
add data container
Diffstat (limited to 'Sgraph.c')
-rw-r--r--Sgraph.c5
1 files changed, 2 insertions, 3 deletions
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;