comparison src/process.c @ 52527:3ea59ac8dfa5

(Fnetwork_interface_info): Fix type error. (Fnetwork_interface_list): Doc fix. (read_process_output, read_process_output): Delete unused var.
author Dave Love <fx@gnu.org>
date Thu, 18 Sep 2003 10:39:47 +0000
parents fd2be6cea0e7
children 03137a8dc8cb
comparison
equal deleted inserted replaced
52526:b2e8d358bdbe 52527:3ea59ac8dfa5
2447 OPTION is not a supported option, return nil instead; otherwise return t. */) 2447 OPTION is not a supported option, return nil instead; otherwise return t. */)
2448 (process, option, value, no_error) 2448 (process, option, value, no_error)
2449 Lisp_Object process, option, value; 2449 Lisp_Object process, option, value;
2450 Lisp_Object no_error; 2450 Lisp_Object no_error;
2451 { 2451 {
2452 int s, i; 2452 int s;
2453 2453
2454 CHECK_PROCESS (process); 2454 CHECK_PROCESS (process);
2455 2455
2456 s = XINT (XPROCESS (process)->infd); 2456 s = XINT (XPROCESS (process)->infd);
2457 if (s < 0) 2457 if (s < 0)
3341 #ifdef SIOCGIFCONF 3341 #ifdef SIOCGIFCONF
3342 DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0, 3342 DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0,
3343 doc: /* Return an alist of all network interfaces and their network address. 3343 doc: /* Return an alist of all network interfaces and their network address.
3344 Each element is a cons, the car of which is a string containing the 3344 Each element is a cons, the car of which is a string containing the
3345 interface name, and the cdr is the network address in internal 3345 interface name, and the cdr is the network address in internal
3346 format; see the description of ADDRESS in 'make-network-process'. */) 3346 format; see the description of ADDRESS in `make-network-process'. */)
3347 () 3347 ()
3348 { 3348 {
3349 struct ifconf ifconf; 3349 struct ifconf ifconf;
3350 struct ifreq *ifreqs = NULL; 3350 struct ifreq *ifreqs = NULL;
3351 int ifaces = 0; 3351 int ifaces = 0;
3519 int n; 3519 int n;
3520 3520
3521 any++; 3521 any++;
3522 for (n = 0; n < 6; n++) 3522 for (n = 0; n < 6; n++)
3523 p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]); 3523 p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]);
3524 elt = Fcons (XINT (rq.ifr_hwaddr.sa_family), hwaddr); 3524 elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr);
3525 } 3525 }
3526 #endif 3526 #endif
3527 res = Fcons (elt, res); 3527 res = Fcons (elt, res);
3528 3528
3529 elt = Qnil; 3529 elt = Qnil;
4605 int 4605 int
4606 read_process_output (proc, channel) 4606 read_process_output (proc, channel)
4607 Lisp_Object proc; 4607 Lisp_Object proc;
4608 register int channel; 4608 register int channel;
4609 { 4609 {
4610 register int nchars, nbytes; 4610 register int nbytes;
4611 char *chars; 4611 char *chars;
4612 register Lisp_Object outstream; 4612 register Lisp_Object outstream;
4613 register struct buffer *old = current_buffer; 4613 register struct buffer *old = current_buffer;
4614 register struct Lisp_Process *p = XPROCESS (proc); 4614 register struct Lisp_Process *p = XPROCESS (proc);
4615 register int opoint; 4615 register int opoint;