]> git.eshelyaron.com Git - emacs.git/commitdiff
* atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Mar 2011 06:48:05 +0000 (23:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Mar 2011 06:48:05 +0000 (23:48 -0700)
locals to avoid shadowing.

src/ChangeLog
src/atimer.c

index 69aaa359887f7b408ea6bf65dfed7ae4b97ab9e0..6ba2133de6603bf991d9e117a0c5715d285ecd66 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-18  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename
+       locals to avoid shadowing.
+
        * sound.c (wav_play, au_play, Fplay_sound_internal):
        Fix pointer signedness.
        (alsa_choose_format): Remove unused local var.
index 309a4eaee4f0f7b1fc0d57da1dd32272c1a67da0..e10add961eb9d6cd806b9ab549f90de843592f91 100644 (file)
@@ -86,7 +86,7 @@ SIGTYPE alarm_signal_handler (int signo);
    to cancel_atimer; don't free it yourself.  */
 
 struct atimer *
-start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn,
+start_atimer (enum atimer_type type, EMACS_TIME timestamp, atimer_callback fn,
              void *client_data)
 {
   struct atimer *t;
@@ -94,10 +94,10 @@ start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn,
   /* Round TIME up to the next full second if we don't have
      itimers.  */
 #ifndef HAVE_SETITIMER
-  if (EMACS_USECS (time) != 0)
+  if (EMACS_USECS (timestamp) != 0)
     {
-      EMACS_SET_USECS (time, 0);
-      EMACS_SET_SECS (time, EMACS_SECS (time) + 1);
+      EMACS_SET_USECS (timestamp, 0);
+      EMACS_SET_SECS (timestamp, EMACS_SECS (timestamp) + 1);
     }
 #endif /* not HAVE_SETITIMER */
 
@@ -123,18 +123,18 @@ start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn,
   switch (type)
     {
     case ATIMER_ABSOLUTE:
-      t->expiration = time;
+      t->expiration = timestamp;
       break;
 
     case ATIMER_RELATIVE:
       EMACS_GET_TIME (t->expiration);
-      EMACS_ADD_TIME (t->expiration, t->expiration, time);
+      EMACS_ADD_TIME (t->expiration, t->expiration, timestamp);
       break;
 
     case ATIMER_CONTINUOUS:
       EMACS_GET_TIME (t->expiration);
-      EMACS_ADD_TIME (t->expiration, t->expiration, time);
-      t->interval = time;
+      EMACS_ADD_TIME (t->expiration, t->expiration, timestamp);
+      t->interval = timestamp;
       break;
     }
 
@@ -187,24 +187,24 @@ cancel_atimer (struct atimer *timer)
 }
 
 
-/* Append two lists of atimers LIST1 and LIST2 and return the
+/* Append two lists of atimers LIST_1 and LIST_2 and return the
    result list.  */
 
 static struct atimer *
-append_atimer_lists (struct atimer *list1, struct atimer *list2)
+append_atimer_lists (struct atimer *list_1, struct atimer *list_2)
 {
-  if (list1 == NULL)
-    return list2;
-  else if (list2 == NULL)
-    return list1;
+  if (list_1 == NULL)
+    return list_2;
+  else if (list_2 == NULL)
+    return list_1;
   else
     {
       struct atimer *p;
 
-      for (p = list1; p->next; p = p->next)
+      for (p = list_1; p->next; p = p->next)
        ;
-      p->next = list2;
-      return list1;
+      p->next = list_2;
+      return list_1;
     }
 }
 
@@ -287,28 +287,28 @@ set_alarm (void)
 {
   if (atimers)
     {
-      EMACS_TIME now, time;
+      EMACS_TIME now, timestamp;
 #ifdef HAVE_SETITIMER
       struct itimerval it;
 #endif
 
       /* Determine s/us till the next timer is ripe.  */
       EMACS_GET_TIME (now);
-      EMACS_SUB_TIME (time, atimers->expiration, now);
+      EMACS_SUB_TIME (timestamp, atimers->expiration, now);
 
 #ifdef HAVE_SETITIMER
       /* Don't set the interval to 0; this disables the timer.  */
       if (EMACS_TIME_LE (atimers->expiration, now))
        {
-         EMACS_SET_SECS (time, 0);
-         EMACS_SET_USECS (time, 1000);
+         EMACS_SET_SECS (timestamp, 0);
+         EMACS_SET_USECS (timestamp, 1000);
        }
 
       memset (&it, 0, sizeof it);
-      it.it_value = time;
+      it.it_value = timestamp;
       setitimer (ITIMER_REAL, &it, 0);
 #else /* not HAVE_SETITIMER */
-      alarm (max (EMACS_SECS (time), 1));
+      alarm (max (EMACS_SECS (timestamp), 1));
 #endif /* not HAVE_SETITIMER */
     }
 }
@@ -442,4 +442,3 @@ init_atimer (void)
   /* pending_signals is initialized in init_keyboard.*/
   signal (SIGALRM, alarm_signal_handler);
 }
-