patch-demo_c 633 B

12345678910111213141516171819202122
  1. $OpenBSD: patch-demo_c,v 1.2 2017/05/10 23:34:25 espie Exp $
  2. Index: demo.c
  3. --- demo.c.orig
  4. +++ demo.c
  5. @@ -6,6 +6,7 @@
  6. * for the game.
  7. */
  8. +void
  9. demo_seq()
  10. {
  11. int i, xx, yy, direction, ascent, descent, len;
  12. @@ -127,7 +128,7 @@ demo_seq()
  13. if (event.xany.window != window) continue;
  14. switch (event.type) {
  15. case KeyPress:
  16. - XLookupString(&event, &c_buf, 1, &last_key, &status);
  17. + XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status);
  18. if ((last_key == XK_q) || (last_key == XK_Q))
  19. do_exit();
  20. XFillRectangle(display, window, clearGC, 0, 0, WIN_WIDTH,