patch-main_c 897 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $OpenBSD: patch-main_c,v 1.2 2017/05/10 23:34:25 espie Exp $
  2. Index: main.c
  3. --- main.c.orig
  4. +++ main.c
  5. @@ -2,6 +2,9 @@
  6. #define EXTERN
  7. #include "xchomp.h"
  8. +void play_game(void);
  9. +
  10. +int
  11. main(argc, argv)
  12. int argc;
  13. char *argv[];
  14. @@ -74,6 +77,7 @@ char *argv[];
  15. /*
  16. * The following function contains the main game loop.
  17. */
  18. +void
  19. play_game() {
  20. register int i;
  21. char c_buf;
  22. @@ -166,7 +170,7 @@ play_game() {
  23. if (event.xany.window != window) continue;
  24. switch (event.type) {
  25. case KeyPress:
  26. - XLookupString(&event, &c_buf, 1, &last_key, &status);
  27. + XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status);
  28. if (last_key == XK_space)
  29. if (!pause_seq())
  30. goto demo;
  31. @@ -347,6 +351,7 @@ play_game() {
  32. }
  33. +void
  34. do_exit()
  35. {
  36. destroy_regions();