-static int
- numFigs = 0, /* number of figure arrays. */
- numPoints, /* number of points in each array. */
- nWork, /* current work array number. */
- nFrom, /* current from array number. */
- nTo, /* current to array number. */
- nNext, /* current next array number (after to).*/
- shift, /* shifts the starting point of a figure */
- figType;
-static long delay; /* usecs to wait between updates. */
-static XPoint
- *aWork[2], /* working arrays. */
- *a[MAXFIGS], /* the figure arrays. */
- *aTmp, /* used as source when interrupting morph */
- *aPrev, /* previous points displayed. */
- *aCurr, /* the current points displayed. */
- *aFrom, /* figure converting from. */
- *aTo, /* figure converting to. */
- *aNext, /* figure converting to next time. */
- *aSlopeFrom, /* slope at start of morph */
- *aSlopeTo; /* slope at end of morph */
-static int scrWidth, scrHeight;
-static double currGamma, maxGamma = 1.0, deltaGamma;
-static GC gcDraw, gcClear;
-static Display *dpy;
-static Window window;
+struct state {
+ Display *dpy;
+ Window window;
+
+ int numFigs; /* number of figure arrays. */
+ int numPoints; /* number of points in each array. */
+ int nWork; /* current work array number. */
+ int nFrom; /* current from array number. */
+ int nTo; /* current to array number. */
+ int nNext; /* current next array number (after to).*/
+ int shift; /* shifts the starting point of a figure */
+ int figType;
+
+ long delay; /* usecs to wait between updates. */
+
+ XPoint *aWork[2]; /* working arrays. */
+ XPoint *a[MAXFIGS]; /* the figure arrays. */
+ XPoint *aTmp; /* used as source when interrupting morph */
+ XPoint *aPrev; /* previous points displayed. */
+ XPoint *aCurr; /* the current points displayed. */
+ XPoint *aFrom; /* figure converting from. */
+ XPoint *aTo; /* figure converting to. */
+ XPoint *aNext; /* figure converting to next time. */
+ XPoint *aSlopeFrom; /* slope at start of morph */
+ XPoint *aSlopeTo; /* slope at end of morph */
+
+ int scrWidth, scrHeight;
+ double currGamma, maxGamma, deltaGamma;
+ GC gcDraw, gcClear;
+};
+