$OpenBSD: patch-xengine_c,v 1.1 2002/07/31 06:10:56 pvalchev Exp $
--- xengine.c.orig	Sun Jul 14 21:16:31 2002
+++ xengine.c	Sun Jul 14 21:16:31 2002
@@ -29,13 +29,13 @@ static char     sccsid[] = "@(#)xengine.
 
 #define	PI	3.141592654
 
-XtCallbackProc  redraw_callback();
-XtTimerCallbackProc Cylcle();
+void redraw_callback( Widget, XEvent*, String*, Cardinal*);
+void Cycle( XtPointer, XtIntervalId* );
 
 Widget          toplevel, base, rpm_info, engine;
 GC              gcPiston, gcShaft, gcCylinder, gcRoter, gcBack, gcDep, gcPre, gcEngine;
 Pixmap          enginePixmap;
-int             width, height;
+Dimension       width, height;
 
 String          colors[] = {"gray", "lightseagreen", "dimgrey", "forestgreen", "black", "red", "cyan", "firebrick"};
 
@@ -47,7 +47,7 @@ main(argc, argv)
 	Arg             args[10];
 	XtTranslations  newTranslations;
 	static XtActionsRec redrawActions[] = {
-		{"expose", (XtCallbackProc) redraw_callback},
+		{"expose", redraw_callback},
 	};
 
 	static char    *overrideTranslations =
@@ -59,8 +59,6 @@ main(argc, argv)
 	int             i;
 	int             count;
 
-	XtTimerCallbackProc Cycle();
-
 	toplevel = XtInitialize("xengine", "XEngine", NULL, 0, &argc, argv);
 
 	for (count = 1; count < argc; count++) {
@@ -170,7 +168,7 @@ main(argc, argv)
 	XtMainLoop();
 }
 
-XtCallbackProc
+void
 redraw_callback(w, event, params, nparams)
 	Widget          w;
 	XEvent         *event;
@@ -180,22 +178,19 @@ redraw_callback(w, event, params, nparam
 
 	Arg             args[10];
 
-	XtSetArg(args[0], XtNwidth, 0);
-	XtSetArg(args[1], XtNheight, 0);
+	XtSetArg(args[0], XtNwidth, &width);
+	XtSetArg(args[1], XtNheight, &height);
 	XtGetValues(w, args, 2);
 
-	width = args[0].value;
-	height = args[1].value;
-
 	XFreePixmap(XtDisplay(engine), enginePixmap);
 	enginePixmap = XCreatePixmap(XtDisplay(engine), XtWindow(engine), width, height, DefaultDepthOfScreen(XtScreen(engine)));
 
 }
 
-XtTimerCallbackProc
+void
 Cycle(client_data, id)
-	caddr_t         client_data;
-	XtIntervalId    id;
+	XtPointer       client_data;
+	XtIntervalId*   id;
 {
 
 	Arg             args[10];
