Commit bed9664a authored by Stefan Monnier's avatar Stefan Monnier

(DATAGRAM_CONN_P, list_processes_1)

(Fprocess_datagram_address, Fset_process_datagram_address)
(Fset_network_process_options, server_accept_connection):
Fix some int/Lisp_Object confusions (thank you union types).
parent 0fc8f792
2002-04-01 Stefan Monnier <monnier@cs.yale.edu>
* xterm.c (XTread_socket): Fix int/Lisp_Object confusion.
* process.c (DATAGRAM_CONN_P, list_processes_1)
(Fprocess_datagram_address, Fset_process_datagram_address)
(Fset_network_process_options, server_accept_connection):
Fix some int/Lisp_Object confusions (thank you union types).
2002-04-01 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
* msdos.c: Rename x_autoselect_window_p to autoselect_window_p.
* w32term.c: Likewise.
(note_mouse_movement): Put code for x_autoselect_window_p in #if 0.
(note_mouse_movement): Put code for x_autoselect_window_p in #if 0.
* keyboard.c (Qselect_window): New symbol.
(head_table): Use it.
(keys_of_keyboard): Bound select-window event to
handle-select-window.
(kbd_buffer_get_event): Make a Lisp event from
SELECT_WINDOW_EVENT.
(keys_of_keyboard): Bound select-window event to handle-select-window.
(kbd_buffer_get_event): Make a Lisp event from SELECT_WINDOW_EVENT.
* xterm.c: Rename x_autoselect_window_p to autoselect_window_p.
(last_window): New variable.
......@@ -19,8 +26,7 @@
(XTread_socket): Generate SELECT_WINDOW_EVENTs only for
Emacs windows.
* termhooks.h (enum event_kind): New event type
`SELECT_WINDOW_EVENT'.
* termhooks.h (enum event_kind): New event type `SELECT_WINDOW_EVENT'.
2002-03-31 Gerd Moellmann <gerd@gnu.org>
......@@ -36,8 +42,8 @@
2002-03-30 Gerd Moellmann <gerd@gnu.org>
* dispnew.c (direct_output_for_insert): Call
mark_window_display_accurate.
* dispnew.c (direct_output_for_insert):
Call mark_window_display_accurate.
2002-03-29 Jason Rumney <jasonr@gnu.org>
......
......@@ -307,7 +307,7 @@ struct sockaddr_and_len {
int len;
} datagram_address[MAXDESC];
#define DATAGRAM_CHAN_P(chan) (datagram_address[chan].sa != 0)
#define DATAGRAM_CONN_P(proc) (PROCESSP (proc) && datagram_address[XPROCESS (proc)->infd].sa != 0)
#define DATAGRAM_CONN_P(proc) (PROCESSP (proc) && datagram_address[XINT (XPROCESS (proc)->infd)].sa != 0)
#else
#define DATAGRAM_CHAN_P(chan) (0)
#define DATAGRAM_CONN_P(proc) (0)
......@@ -1200,7 +1200,7 @@ list_processes_1 (query_only)
if (INTEGERP (port))
port = Fnumber_to_string (port);
sprintf (tembuf, "(network %s server on %s)\n",
(DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"),
(DATAGRAM_CHAN_P (XINT (p->infd)) ? "datagram" : "stream"),
XSTRING (port)->data);
insert_string (tembuf);
}
......@@ -1216,7 +1216,7 @@ list_processes_1 (query_only)
host = Fnumber_to_string (host);
}
sprintf (tembuf, "(network %s connection to %s)\n",
(DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"),
(DATAGRAM_CHAN_P (XINT (p->infd)) ? "datagram" : "stream"),
XSTRING (host)->data);
insert_string (tembuf);
}
......@@ -2119,7 +2119,7 @@ DEFUN ("process-datagram-address", Fprocess_datagram_address, Sprocess_datagram_
if (!DATAGRAM_CONN_P (process))
return Qnil;
channel = XPROCESS (process)->infd;
channel = XINT (XPROCESS (process)->infd);
return conv_sockaddr_to_lisp (datagram_address[channel].sa,
datagram_address[channel].len);
}
......@@ -2139,7 +2139,7 @@ Returns nil upon error setting address, ADDRESS otherwise. */)
if (!DATAGRAM_CONN_P (process))
return Qnil;
channel = XPROCESS (process)->infd;
channel = XINT (XPROCESS (process)->infd);
len = get_lisp_to_sockaddr_size (address, &family);
if (datagram_address[channel].len != len)
......@@ -2374,10 +2374,10 @@ usage: (set-network-process-options PROCESS &rest OPTIONS) */)
process = args[0];
CHECK_PROCESS (process);
if (nargs > 1 && XPROCESS (process)->infd >= 0)
if (nargs > 1 && XINT (XPROCESS (process)->infd) >= 0)
{
opts = Flist (nargs, args);
set_socket_options (XPROCESS (process)->infd, opts, 0);
set_socket_options (XINT (XPROCESS (process)->infd), opts, 0);
}
return process;
}
......@@ -3528,7 +3528,7 @@ server_accept_connection (server, channel)
(STRINGP (host) ? host : build_string ("-")),
build_string ("\n")));
if (p->sentinel)
if (!NILP (p->sentinel))
exec_sentinel (proc,
concat3 (build_string ("open from "),
(STRINGP (host) ? host : build_string ("-")),
......
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