aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-08-18 10:01:52 -0700
committerPaul Eggert2011-08-18 10:01:52 -0700
commit76667214e7bdc7f6196de2bb6d7e14ef879a2694 (patch)
tree58ca2d3448d502ff4ac2e46aefc8b90582c4d1ab /src
parent2fab8395070ff77b836cb8ca9b84c261c4387a9a (diff)
parent92b714445aac9be4227684f9c90cd61c3a0f02d5 (diff)
downloademacs-76667214e7bdc7f6196de2bb6d7e14ef879a2694.tar.gz
emacs-76667214e7bdc7f6196de2bb6d7e14ef879a2694.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/dispextern.h6
-rw-r--r--src/process.c36
3 files changed, 32 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fe8df6ffe41..275856c44e0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -421,6 +421,18 @@
421 (gs_load): Use printmax_t to print the widest integers possible. 421 (gs_load): Use printmax_t to print the widest integers possible.
422 Check for integer overflow when computing image height and width. 422 Check for integer overflow when computing image height and width.
423 423
4242011-08-18 Eli Zaretskii <eliz@gnu.org>
425
426 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
427 members before the level stack, so they would be saved and
428 restored when copying iterator state. Fixes incorrect reordering
429 around TABs covered by display properties.
430
4312011-08-18 Andreas Schwab <schwab@linux-m68k.org>
432
433 * process.c (Fnetwork_interface_list): Correctly determine buffer
434 size.
435
4242011-08-17 Chong Yidong <cyd@stupidchicken.com> 4362011-08-17 Chong Yidong <cyd@stupidchicken.com>
425 437
426 * eval.c (internal_condition_case, internal_condition_case_1) 438 * eval.c (internal_condition_case, internal_condition_case_1)
diff --git a/src/dispextern.h b/src/dispextern.h
index 14f2b3ac631..9cefea27e1c 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1860,6 +1860,9 @@ struct bidi_it {
1860 EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */ 1860 EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */
1861 bidi_dir_t sor; /* direction of start-of-run in effect */ 1861 bidi_dir_t sor; /* direction of start-of-run in effect */
1862 int scan_dir; /* direction of text scan, 1: forw, -1: back */ 1862 int scan_dir; /* direction of text scan, 1: forw, -1: back */
1863 EMACS_INT disp_pos; /* position of display string after ch */
1864 int disp_prop_p; /* if non-zero, there really is a
1865 `display' property/string at disp_pos */
1863 int stack_idx; /* index of current data on the stack */ 1866 int stack_idx; /* index of current data on the stack */
1864 /* Note: Everything from here on is not copied/saved when the bidi 1867 /* Note: Everything from here on is not copied/saved when the bidi
1865 iterator state is saved, pushed, or popped. So only put here 1868 iterator state is saved, pushed, or popped. So only put here
@@ -1868,9 +1871,6 @@ struct bidi_it {
1868 struct bidi_string_data string; /* string to reorder */ 1871 struct bidi_string_data string; /* string to reorder */
1869 bidi_dir_t paragraph_dir; /* current paragraph direction */ 1872 bidi_dir_t paragraph_dir; /* current paragraph direction */
1870 EMACS_INT separator_limit; /* where paragraph separator should end */ 1873 EMACS_INT separator_limit; /* where paragraph separator should end */
1871 EMACS_INT disp_pos; /* position of display string after ch */
1872 int disp_prop_p; /* if non-zero, there really is a
1873 `display' property/string at disp_pos */
1874 unsigned first_elt : 1; /* if non-zero, examine current char first */ 1874 unsigned first_elt : 1; /* if non-zero, examine current char first */
1875 unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */ 1875 unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */
1876 unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */ 1876 unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */
diff --git a/src/process.c b/src/process.c
index 9f3bb0e5803..08da53b4a40 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3581,33 +3581,31 @@ format; see the description of ADDRESS in `make-network-process'. */)
3581 if (s < 0) 3581 if (s < 0)
3582 return Qnil; 3582 return Qnil;
3583 3583
3584 again: 3584 do
3585
3586 buf = xpalloc (buf, &buf_size, sizeof *ifreq, INT_MAX, 1);
3587 ifconf.ifc_buf = buf;
3588 ifconf.ifc_len = buf_size;
3589 if (ioctl (s, SIOCGIFCONF, &ifconf))
3590 { 3585 {
3591 close (s); 3586 buf = xpalloc (buf, &buf_size, 1, INT_MAX, 1);
3592 xfree (buf); 3587 ifconf.ifc_buf = buf;
3593 return Qnil; 3588 ifconf.ifc_len = buf_size;
3589 if (ioctl (s, SIOCGIFCONF, &ifconf))
3590 {
3591 close (s);
3592 xfree (buf);
3593 return Qnil;
3594 }
3594 } 3595 }
3595 3596 while (ifconf.ifc_len == buf_size);
3596 if (ifconf.ifc_len == buf_size)
3597 goto again;
3598 3597
3599 close (s); 3598 close (s);
3600 3599
3601 res = Qnil; 3600 res = Qnil;
3602 for (ifreq = ifconf.ifc_req; 3601 ifreq = ifconf.ifc_req;
3603 (char *) ifreq < (char *) (ifconf.ifc_req) + ifconf.ifc_len; 3602 while ((char *) ifreq < (char *) ifconf.ifc_req + ifconf.ifc_len)
3604 )
3605 { 3603 {
3606 struct ifreq *ifq = ifreq; 3604 struct ifreq *ifq = ifreq;
3607#ifdef HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 3605#ifdef HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN
3608#define SIZEOF_IFREQ(sif) \ 3606#define SIZEOF_IFREQ(sif) \
3609 ((sif)->ifr_addr.sa_len < sizeof(struct sockaddr) ? \ 3607 ((sif)->ifr_addr.sa_len < sizeof (struct sockaddr) \
3610 sizeof((*sif)) : sizeof ((sif)->ifr_name) + sif->ifr_addr.sa_len) 3608 ? sizeof (*(sif)) : sizeof ((sif)->ifr_name) + (sif)->ifr_addr.sa_len)
3611 3609
3612 int len = SIZEOF_IFREQ (ifq); 3610 int len = SIZEOF_IFREQ (ifq);
3613#else 3611#else
@@ -3615,7 +3613,7 @@ format; see the description of ADDRESS in `make-network-process'. */)
3615#endif 3613#endif
3616 char namebuf[sizeof (ifq->ifr_name) + 1]; 3614 char namebuf[sizeof (ifq->ifr_name) + 1];
3617 i += len; 3615 i += len;
3618 ifreq = (struct ifreq*) ((char*) ifreq + len); 3616 ifreq = (struct ifreq *) ((char *) ifreq + len);
3619 3617
3620 if (ifq->ifr_addr.sa_family != AF_INET) 3618 if (ifq->ifr_addr.sa_family != AF_INET)
3621 continue; 3619 continue;