]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_session_check_input): Remove numchars arg.
authorKim F. Storm <storm@cua.dk>
Fri, 27 Feb 2004 23:49:32 +0000 (23:49 +0000)
committerKim F. Storm <storm@cua.dk>
Fri, 27 Feb 2004 23:49:32 +0000 (23:49 +0000)
src/xsmfns.c

index 091d21327aceed06ff157dcb75bfdfec7d8ca059..e486e5c6e322384003af36bd3129ea3436b35294 100644 (file)
@@ -106,13 +106,10 @@ Lisp_Object Vx_session_previous_id;
 
 /* Handle any messages from the session manager.  If no connection is
    open to a session manager, just return 0.
-   Otherwise returns the number of events stored in buffer BUFP,
-   which can hold up to *NUMCHARS characters.  At most one event is
-   stored, a SAVE_SESSION_EVENT. */
+   Otherwise returns 1 if SAVE_SESSION_EVENT is stored in buffer BUFP.  */
 int
-x_session_check_input (bufp, numchars)
+x_session_check_input (bufp)
      struct input_event *bufp;
-     int *numchars;
 {
   SELECT_TYPE read_fds;
   EMACS_TIME tmout;
@@ -146,16 +143,11 @@ x_session_check_input (bufp, numchars)
 
   /* Check if smc_interact_CB was called and we shall generate a
      SAVE_SESSION_EVENT. */
-  if (*numchars > 0 && emacs_event.kind != NO_EVENT)
-    {
-      bcopy (&emacs_event, bufp, sizeof (struct input_event));
-      bufp++;
-      (*numchars)--;
-
-      return 1;
-    }
+  if (emacs_event.kind == NO_EVENT)
+    return 0;
 
-  return 0;
+  bcopy (&emacs_event, bufp, sizeof (struct input_event));
+  return 1;
 }
 
 /* Return non-zero if we have a connection to a session manager.*/