patch-ttyplay_c 811 B

12345678910111213141516171819202122
  1. $OpenBSD: patch-ttyplay_c,v 1.1 2009/03/23 17:42:40 naddy Exp $
  2. --- ttyplay.c.orig Mon Mar 23 11:32:09 2009
  3. +++ ttyplay.c Mon Mar 23 11:32:52 2009
  4. @@ -81,7 +81,7 @@ double
  5. ttywait (struct timeval prev, struct timeval cur, double speed)
  6. {
  7. static struct timeval drift = {0, 0};
  8. - struct timeval start;
  9. + struct timeval start, orig_diff;
  10. struct timeval diff = timeval_diff(prev, cur);
  11. fd_set readfs;
  12. @@ -100,7 +100,7 @@ ttywait (struct timeval prev, struct timeval cur, doub
  13. *
  14. * Save "diff" since select(2) may overwrite it to {0, 0}.
  15. */
  16. - struct timeval orig_diff = diff;
  17. + orig_diff = diff;
  18. select(1, &readfs, NULL, NULL, &diff);
  19. diff = orig_diff; /* Restore the original diff value. */
  20. if (FD_ISSET(0, &readfs)) { /* a user hits a character? */