diff mac/src/mac.c @ 37738:c04e66e2c50c

* src/Emacs.r: Change About box message. * makefile.MPW: Add md5.c.x to EmacsObjects. * src/mac.c (select): Call WaitNextEvent instead of Delay. (pause): Ditto. (sleep): Ditto. * src/macterm.c (do_app_resume): Set cursor to arrow. (clear_mouse_face): check for NIL Lisp object instead of null pointer. * INSTALL: Delete note on compiling Lisp files on a Unix system. Add note on turning off end of line conversion.
author Andrew Choi <akochoi@shaw.ca>
date Tue, 15 May 2001 11:08:46 +0000
parents 923b8d6d8277
children bd309345e7ea
line wrap: on
line diff
--- a/mac/src/mac.c	Tue May 15 10:42:45 2001 +0000
+++ b/mac/src/mac.c	Tue May 15 11:08:46 2001 +0000
@@ -808,7 +808,6 @@
 {
   EMACS_TIME end_time, now;
   EventRecord e;
-  unsigned long final_tick;
 
   /* Can only handle wait for keyboard input.  */
   if (n > 1 || wfds || efds)
@@ -840,7 +839,7 @@
           }
       }
       
-      Delay (1UL, &final_tick);
+      WaitNextEvent (0, &e, 1UL, NULL);	/* Accept no event; wait 1 tic. by T.I.*/
       
       EMACS_GET_TIME (now);
       EMACS_SUB_TIME (now, end_time, now);
@@ -856,13 +855,14 @@
 int
 pause ()
 {
-  unsigned long final_tick;
+  EventRecord e;
+  unsigned long tick;
   
   if (!target_ticks)  /* no alarm pending */
     return -1;
 
-  while (TickCount () <= target_ticks)
-    Delay (1UL, &final_tick);  /* wait 1/60 second before retrying */
+  if ( (tick = TickCount ()) < target_ticks )
+    WaitNextEvent (0, &e, target_ticks - tick, NULL);	/* Accept no event; just wait. by T.I.*/
   
   target_ticks = 0;
   if (alarm_signal_func)
@@ -964,9 +964,10 @@
 unsigned int
 sleep (unsigned int seconds)
 {
-  unsigned long final_tick;
-
-  Delay (seconds * 60UL, &final_tick);
+  EventRecord e;
+
+  WaitNextEvent (0, &e, seconds * 60UL, NULL);	/* Accept no event; just wait. by T.I.*/
+
   return (0);
 }
 #endif /* __MRC__ */