Undo change in xdisp.c in 2012-06-29T11:48:08Z!dmantipov@yandex.ru.
[bpt/emacs.git] / src / process.c
index aaf8693..de7fc14 100644 (file)
@@ -353,7 +353,7 @@ static struct fd_callback_data
 void
 add_read_fd (int fd, fd_callback func, void *data)
 {
-  xassert (fd < MAXDESC);
+  eassert (fd < MAXDESC);
   add_keyboard_wait_descriptor (fd);
 
   fd_callback_info[fd].func = func;
@@ -366,7 +366,7 @@ add_read_fd (int fd, fd_callback func, void *data)
 void
 delete_read_fd (int fd)
 {
-  xassert (fd < MAXDESC);
+  eassert (fd < MAXDESC);
   delete_keyboard_wait_descriptor (fd);
 
   fd_callback_info[fd].condition &= ~FOR_READ;
@@ -383,7 +383,7 @@ delete_read_fd (int fd)
 void
 add_write_fd (int fd, fd_callback func, void *data)
 {
-  xassert (fd < MAXDESC);
+  eassert (fd < MAXDESC);
   FD_SET (fd, &write_mask);
   if (fd > max_input_desc)
     max_input_desc = fd;
@@ -400,7 +400,7 @@ delete_write_fd (int fd)
 {
   int lim = max_input_desc;
 
-  xassert (fd < MAXDESC);
+  eassert (fd < MAXDESC);
   FD_CLR (fd, &write_mask);
   fd_callback_info[fd].condition &= ~FOR_WRITE;
   if (fd_callback_info[fd].condition == 0)
@@ -625,35 +625,18 @@ make_process (Lisp_Object name)
   printmax_t i;
 
   p = allocate_process ();
-
-  p->infd = -1;
-  p->outfd = -1;
-  p->tick = 0;
-  p->update_tick = 0;
-  p->pid = 0;
-  p->pty_flag = 0;
-  p->raw_status_new = 0;
+  /* Initialize Lisp data.  Note that allocate_process initializes all
+     Lisp data to nil, so do it only for slots which should not be nil.  */
   p->status = Qrun;
   p->mark = Fmake_marker ();
-  p->kill_without_query = 0;
-  p->write_queue = Qnil;
 
-#ifdef ADAPTIVE_READ_BUFFERING
-  p->adaptive_read_buffering = 0;
-  p->read_output_delay = 0;
-  p->read_output_skip = 0;
-#endif
+  /* Initialize non-Lisp data.  Note that allocate_process zeroes out all
+     non-Lisp data, so do it only for slots which should not be zero.  */
+  p->infd = -1;
+  p->outfd = -1;
 
 #ifdef HAVE_GNUTLS
   p->gnutls_initstage = GNUTLS_STAGE_EMPTY;
-  /* Default log level.  */
-  p->gnutls_log_level = 0;
-  /* GnuTLS handshakes attempted for this connection.  */
-  p->gnutls_handshakes_tried = 0;
-  p->gnutls_p = 0;
-  p->gnutls_state = NULL;
-  p->gnutls_x509_cred = NULL;
-  p->gnutls_anon_cred = NULL;
 #endif
 
   /* If name is already in use, modify it until it is unused.  */
@@ -4259,7 +4242,7 @@ wait_reading_process_output_1 (void)
      an additional duration to wait, measured in nanoseconds
      If TIME_LIMIT is zero, then:
        If NSECS == 0, there is no limit.
-       If NSECS > 0, the timeout consists of NSEC only.
+       If NSECS > 0, the timeout consists of NSECS only.
        If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative.
 
    READ_KBD is a lisp value:
@@ -6832,18 +6815,18 @@ extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
 
    Wait for timeout to elapse and/or keyboard input to be available.
 
-   time_limit is:
+   TIME_LIMIT is:
      timeout in seconds
      If negative, gobble data immediately available but don't wait for any.
 
-   nsec is:
+   NSECS is:
      an additional duration to wait, measured in nanoseconds
      If TIME_LIMIT is zero, then:
-       If NSEC == 0, there is no limit.
-       If NSEC > 0, the timeout consists of NSEC only.
+       If NSECS == 0, there is no limit.
+       If NSECS > 0, the timeout consists of NSECS only.
        If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative.
 
-   read_kbd is a Lisp_Object:
+   READ_KBD is a Lisp_Object:
      0 to ignore keyboard input, or
      1 to return when input is available, or
      -1 means caller will actually read the input, so don't throw to
@@ -6852,7 +6835,7 @@ extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
    see full version for other parameters. We know that wait_proc will
      always be NULL, since `subprocesses' isn't defined.
 
-   do_display != 0 means redisplay should be done to show subprocess
+   DO_DISPLAY != 0 means redisplay should be done to show subprocess
    output that arrives.
 
    Return true if we received input from any process.  */