Commit 41d03b9a authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(list_processes_1): Remove unused variables.

(Fopen_network_stream, create_process): Add parentheses to
conditional expressions.
(create_process): Put declaration of sigchld in #if 0.
(Fopen_network_stream): Removed unused variables.
(Fopen_network_stream, wait_reading_process_input,
wait_reading_process_input, send_process, send_process): Ditto.
(toplevel): Add prototypes for set_waiting_for_input and
keyboard_bit_set.
parent 0868e74e
...@@ -143,6 +143,8 @@ Lisp_Object Qlast_nonmenu_event; ...@@ -143,6 +143,8 @@ Lisp_Object Qlast_nonmenu_event;
#include "syswait.h" #include "syswait.h"
extern void set_waiting_for_input P_ ((EMACS_TIME *));
extern int errno; extern int errno;
extern char *strerror (); extern char *strerror ();
#ifdef VMS #ifdef VMS
...@@ -214,6 +216,8 @@ int update_tick; ...@@ -214,6 +216,8 @@ int update_tick;
#include "sysselect.h" #include "sysselect.h"
extern int keyboard_bit_set P_ ((SELECT_TYPE *));
/* If we support a window system, turn on the code to poll periodically /* If we support a window system, turn on the code to poll periodically
to detect C-g. It isn't actually used when doing interrupt input. */ to detect C-g. It isn't actually used when doing interrupt input. */
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
...@@ -932,9 +936,7 @@ list_processes_1 () ...@@ -932,9 +936,7 @@ list_processes_1 ()
{ {
register Lisp_Object tail, tem; register Lisp_Object tail, tem;
Lisp_Object proc, minspace, tem1; Lisp_Object proc, minspace, tem1;
register struct buffer *old = current_buffer;
register struct Lisp_Process *p; register struct Lisp_Process *p;
register int state;
char tembuf[80]; char tembuf[80];
XSETFASTINT (minspace, 1); XSETFASTINT (minspace, 1);
...@@ -1333,9 +1335,11 @@ create_process (process, new_argv, current_dir) ...@@ -1333,9 +1335,11 @@ create_process (process, new_argv, current_dir)
struct sigaction sighup_action; struct sigaction sighup_action;
#endif #endif
#else /* !POSIX_SIGNALS */ #else /* !POSIX_SIGNALS */
#if 0
#ifdef SIGCHLD #ifdef SIGCHLD
SIGTYPE (*sigchld)(); SIGTYPE (*sigchld)();
#endif #endif
#endif /* 0 */
#endif /* !POSIX_SIGNALS */ #endif /* !POSIX_SIGNALS */
/* Use volatile to protect variables from being clobbered by longjmp. */ /* Use volatile to protect variables from being clobbered by longjmp. */
volatile int forkin, forkout; volatile int forkin, forkout;
...@@ -1445,7 +1449,7 @@ create_process (process, new_argv, current_dir) ...@@ -1445,7 +1449,7 @@ create_process (process, new_argv, current_dir)
setup_coding_system (XPROCESS (process)->encode_coding_system, setup_coding_system (XPROCESS (process)->encode_coding_system,
proc_encode_coding_system[outchannel]); proc_encode_coding_system[outchannel]);
if (!NILP (buffer) && NILP (XBUFFER (buffer)->enable_multibyte_characters) if ((!NILP (buffer) && NILP (XBUFFER (buffer)->enable_multibyte_characters))
|| (NILP (buffer) && NILP (buffer_defaults.enable_multibyte_characters))) || (NILP (buffer) && NILP (buffer_defaults.enable_multibyte_characters)))
{ {
/* In unibyte mode, character code conversion should not take /* In unibyte mode, character code conversion should not take
...@@ -1814,15 +1818,12 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ ...@@ -1814,15 +1818,12 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
Lisp_Object name, buffer, host, service; Lisp_Object name, buffer, host, service;
{ {
Lisp_Object proc; Lisp_Object proc;
register int i;
#ifndef HAVE_GETADDRINFO #ifndef HAVE_GETADDRINFO
struct sockaddr_in address; struct sockaddr_in address;
struct servent *svc_info; struct servent *svc_info;
struct hostent *host_info_ptr, host_info; struct hostent *host_info_ptr, host_info;
char *(addr_list[2]); char *(addr_list[2]);
IN_ADDR numeric_addr; IN_ADDR numeric_addr;
struct hostent host_info_fixed;
int port; int port;
#else /* HAVE_GETADDRINFO */ #else /* HAVE_GETADDRINFO */
struct addrinfo hints, *res, *lres; struct addrinfo hints, *res, *lres;
...@@ -2100,8 +2101,8 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ ...@@ -2100,8 +2101,8 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
if (!NILP (Vcoding_system_for_read)) if (!NILP (Vcoding_system_for_read))
val = Vcoding_system_for_read; val = Vcoding_system_for_read;
else if (!NILP (buffer) && NILP (XBUFFER (buffer)->enable_multibyte_characters) else if ((!NILP (buffer) && NILP (XBUFFER (buffer)->enable_multibyte_characters))
|| NILP (buffer) && NILP (buffer_defaults.enable_multibyte_characters)) || (NILP (buffer) && NILP (buffer_defaults.enable_multibyte_characters)))
/* We dare not decode end-of-line format by setting VAL to /* We dare not decode end-of-line format by setting VAL to
Qraw_text, because the existing Emacs Lisp libraries Qraw_text, because the existing Emacs Lisp libraries
assume that they receive bare code including a sequene of assume that they receive bare code including a sequene of
...@@ -2367,11 +2368,11 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) ...@@ -2367,11 +2368,11 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
Lisp_Object read_kbd; Lisp_Object read_kbd;
int do_display; int do_display;
{ {
register int channel, nfds, m; register int channel, nfds;
static SELECT_TYPE Available; static SELECT_TYPE Available;
int xerrno; int xerrno;
Lisp_Object proc; Lisp_Object proc;
EMACS_TIME timeout, end_time, garbage; EMACS_TIME timeout, end_time;
SELECT_TYPE Atemp; SELECT_TYPE Atemp;
int wait_channel = -1; int wait_channel = -1;
struct Lisp_Process *wait_proc = 0; struct Lisp_Process *wait_proc = 0;
...@@ -3321,7 +3322,7 @@ send_process (proc, buf, len, object) ...@@ -3321,7 +3322,7 @@ send_process (proc, buf, len, object)
if (CODING_REQUIRE_ENCODING (coding)) if (CODING_REQUIRE_ENCODING (coding))
{ {
int require = encoding_buffer_size (coding, len); int require = encoding_buffer_size (coding, len);
int offset, dummy; int offset;
unsigned char *temp_buf = NULL; unsigned char *temp_buf = NULL;
/* Remember the offset of data because a string or a buffer may /* Remember the offset of data because a string or a buffer may
...@@ -3403,7 +3404,6 @@ send_process (proc, buf, len, object) ...@@ -3403,7 +3404,6 @@ send_process (proc, buf, len, object)
{ {
int this = len; int this = len;
SIGTYPE (*old_sigpipe)(); SIGTYPE (*old_sigpipe)();
int flush_pty = 0;
/* Decide how much data we can send in one batch. /* Decide how much data we can send in one batch.
Long lines need to be split into multiple batches. */ Long lines need to be split into multiple batches. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment