patch-xengine_c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. $OpenBSD: patch-xengine_c,v 1.1 2002/07/31 06:10:56 pvalchev Exp $
  2. --- xengine.c.orig Sun Jul 14 21:16:31 2002
  3. +++ xengine.c Sun Jul 14 21:16:31 2002
  4. @@ -29,13 +29,13 @@ static char sccsid[] = "@(#)xengine.
  5. #define PI 3.141592654
  6. -XtCallbackProc redraw_callback();
  7. -XtTimerCallbackProc Cylcle();
  8. +void redraw_callback( Widget, XEvent*, String*, Cardinal*);
  9. +void Cycle( XtPointer, XtIntervalId* );
  10. Widget toplevel, base, rpm_info, engine;
  11. GC gcPiston, gcShaft, gcCylinder, gcRoter, gcBack, gcDep, gcPre, gcEngine;
  12. Pixmap enginePixmap;
  13. -int width, height;
  14. +Dimension width, height;
  15. String colors[] = {"gray", "lightseagreen", "dimgrey", "forestgreen", "black", "red", "cyan", "firebrick"};
  16. @@ -47,7 +47,7 @@ main(argc, argv)
  17. Arg args[10];
  18. XtTranslations newTranslations;
  19. static XtActionsRec redrawActions[] = {
  20. - {"expose", (XtCallbackProc) redraw_callback},
  21. + {"expose", redraw_callback},
  22. };
  23. static char *overrideTranslations =
  24. @@ -59,8 +59,6 @@ main(argc, argv)
  25. int i;
  26. int count;
  27. - XtTimerCallbackProc Cycle();
  28. -
  29. toplevel = XtInitialize("xengine", "XEngine", NULL, 0, &argc, argv);
  30. for (count = 1; count < argc; count++) {
  31. @@ -170,7 +168,7 @@ main(argc, argv)
  32. XtMainLoop();
  33. }
  34. -XtCallbackProc
  35. +void
  36. redraw_callback(w, event, params, nparams)
  37. Widget w;
  38. XEvent *event;
  39. @@ -180,22 +178,19 @@ redraw_callback(w, event, params, nparam
  40. Arg args[10];
  41. - XtSetArg(args[0], XtNwidth, 0);
  42. - XtSetArg(args[1], XtNheight, 0);
  43. + XtSetArg(args[0], XtNwidth, &width);
  44. + XtSetArg(args[1], XtNheight, &height);
  45. XtGetValues(w, args, 2);
  46. - width = args[0].value;
  47. - height = args[1].value;
  48. -
  49. XFreePixmap(XtDisplay(engine), enginePixmap);
  50. enginePixmap = XCreatePixmap(XtDisplay(engine), XtWindow(engine), width, height, DefaultDepthOfScreen(XtScreen(engine)));
  51. }
  52. -XtTimerCallbackProc
  53. +void
  54. Cycle(client_data, id)
  55. - caddr_t client_data;
  56. - XtIntervalId id;
  57. + XtPointer client_data;
  58. + XtIntervalId* id;
  59. {
  60. Arg args[10];