diff options
| author | Joakim Verona | 2011-08-19 10:05:18 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-08-19 10:05:18 +0200 |
| commit | a6df1daab828f67f244af22a24bd19cf7d0f1c1b (patch) | |
| tree | 943656e1eb310ee2143016738b7e1048b0cc84d6 /src | |
| parent | de4d3934cb9838ac138718a4236ad631863c681d (diff) | |
| parent | 5226c7c0169c61977d8914a5feb385bde36077ee (diff) | |
| download | emacs-a6df1daab828f67f244af22a24bd19cf7d0f1c1b.tar.gz emacs-a6df1daab828f67f244af22a24bd19cf7d0f1c1b.zip | |
upstream
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 24 | ||||
| -rw-r--r-- | src/bidi.c | 2 | ||||
| -rw-r--r-- | src/dispextern.h | 6 | ||||
| -rw-r--r-- | src/eval.c | 28 | ||||
| -rw-r--r-- | src/process.c | 63 |
5 files changed, 69 insertions, 54 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2aa0e157afe..2b5b6fd0602 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2011-08-18 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * bidi.c (bidi_get_type): If bidi_type_table reports zero as the | ||
| 4 | character bidirectional type, use STRONG_L instead. Fixes crashes | ||
| 5 | in a buffer produced by `describe-categories'. | ||
| 6 | |||
| 7 | * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p | ||
| 8 | members before the level stack, so they would be saved and | ||
| 9 | restored when copying iterator state. Fixes incorrect reordering | ||
| 10 | around TABs covered by display properties. | ||
| 11 | |||
| 12 | 2011-08-18 Andreas Schwab <schwab@linux-m68k.org> | ||
| 13 | |||
| 14 | * process.c (Fnetwork_interface_list): Correctly determine buffer | ||
| 15 | size. | ||
| 16 | |||
| 17 | 2011-08-17 Chong Yidong <cyd@stupidchicken.com> | ||
| 18 | |||
| 19 | * eval.c (internal_condition_case, internal_condition_case_1) | ||
| 20 | (internal_condition_case_2, internal_condition_case_n): Remove | ||
| 21 | unnecessary aborts (Bug#9081). | ||
| 22 | |||
| 1 | 2011-08-17 Eli Zaretskii <eliz@gnu.org> | 23 | 2011-08-17 Eli Zaretskii <eliz@gnu.org> |
| 2 | 24 | ||
| 3 | * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file | 25 | * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file |
| @@ -61,7 +83,7 @@ | |||
| 61 | 2011-08-14 Kenichi Handa <handa@m17n.org> | 83 | 2011-08-14 Kenichi Handa <handa@m17n.org> |
| 62 | 84 | ||
| 63 | * process.c (create_process): Call setup_process_coding_systems | 85 | * process.c (create_process): Call setup_process_coding_systems |
| 64 | after the pid of the process is set to -1. | 86 | after the pid of the process is set to -1 (Bug#8162). |
| 65 | 87 | ||
| 66 | 2011-08-14 Eli Zaretskii <eliz@gnu.org> | 88 | 2011-08-14 Eli Zaretskii <eliz@gnu.org> |
| 67 | 89 | ||
diff --git a/src/bidi.c b/src/bidi.c index c0eee33ab3f..7517eca5aed 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -108,6 +108,8 @@ bidi_get_type (int ch, bidi_dir_t override) | |||
| 108 | abort (); | 108 | abort (); |
| 109 | 109 | ||
| 110 | default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); | 110 | default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); |
| 111 | if (default_type == 0) | ||
| 112 | default_type = STRONG_L; | ||
| 111 | 113 | ||
| 112 | if (override == NEUTRAL_DIR) | 114 | if (override == NEUTRAL_DIR) |
| 113 | return default_type; | 115 | return default_type; |
diff --git a/src/dispextern.h b/src/dispextern.h index 3927ddf82bb..4d890fe6a37 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1869,6 +1869,9 @@ struct bidi_it { | |||
| 1869 | EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */ | 1869 | EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */ |
| 1870 | bidi_dir_t sor; /* direction of start-of-run in effect */ | 1870 | bidi_dir_t sor; /* direction of start-of-run in effect */ |
| 1871 | int scan_dir; /* direction of text scan, 1: forw, -1: back */ | 1871 | int scan_dir; /* direction of text scan, 1: forw, -1: back */ |
| 1872 | EMACS_INT disp_pos; /* position of display string after ch */ | ||
| 1873 | int disp_prop_p; /* if non-zero, there really is a | ||
| 1874 | `display' property/string at disp_pos */ | ||
| 1872 | int stack_idx; /* index of current data on the stack */ | 1875 | int stack_idx; /* index of current data on the stack */ |
| 1873 | /* Note: Everything from here on is not copied/saved when the bidi | 1876 | /* Note: Everything from here on is not copied/saved when the bidi |
| 1874 | iterator state is saved, pushed, or popped. So only put here | 1877 | iterator state is saved, pushed, or popped. So only put here |
| @@ -1877,9 +1880,6 @@ struct bidi_it { | |||
| 1877 | struct bidi_string_data string; /* string to reorder */ | 1880 | struct bidi_string_data string; /* string to reorder */ |
| 1878 | bidi_dir_t paragraph_dir; /* current paragraph direction */ | 1881 | bidi_dir_t paragraph_dir; /* current paragraph direction */ |
| 1879 | EMACS_INT separator_limit; /* where paragraph separator should end */ | 1882 | EMACS_INT separator_limit; /* where paragraph separator should end */ |
| 1880 | EMACS_INT disp_pos; /* position of display string after ch */ | ||
| 1881 | int disp_prop_p; /* if non-zero, there really is a | ||
| 1882 | `display' property/string at disp_pos */ | ||
| 1883 | unsigned first_elt : 1; /* if non-zero, examine current char first */ | 1883 | unsigned first_elt : 1; /* if non-zero, examine current char first */ |
| 1884 | unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */ | 1884 | unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */ |
| 1885 | unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */ | 1885 | unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */ |
diff --git a/src/eval.c b/src/eval.c index ef169e80e27..e37425020c9 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1461,13 +1461,6 @@ internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers, | |||
| 1461 | struct catchtag c; | 1461 | struct catchtag c; |
| 1462 | struct handler h; | 1462 | struct handler h; |
| 1463 | 1463 | ||
| 1464 | /* Since Fsignal will close off all calls to x_catch_errors, | ||
| 1465 | we will get the wrong results if some are not closed now. */ | ||
| 1466 | #if HAVE_X_WINDOWS | ||
| 1467 | if (x_catching_errors ()) | ||
| 1468 | abort (); | ||
| 1469 | #endif | ||
| 1470 | |||
| 1471 | c.tag = Qnil; | 1464 | c.tag = Qnil; |
| 1472 | c.val = Qnil; | 1465 | c.val = Qnil; |
| 1473 | c.backlist = backtrace_list; | 1466 | c.backlist = backtrace_list; |
| @@ -1506,13 +1499,6 @@ internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg, | |||
| 1506 | struct catchtag c; | 1499 | struct catchtag c; |
| 1507 | struct handler h; | 1500 | struct handler h; |
| 1508 | 1501 | ||
| 1509 | /* Since Fsignal will close off all calls to x_catch_errors, | ||
| 1510 | we will get the wrong results if some are not closed now. */ | ||
| 1511 | #if HAVE_X_WINDOWS | ||
| 1512 | if (x_catching_errors ()) | ||
| 1513 | abort (); | ||
| 1514 | #endif | ||
| 1515 | |||
| 1516 | c.tag = Qnil; | 1502 | c.tag = Qnil; |
| 1517 | c.val = Qnil; | 1503 | c.val = Qnil; |
| 1518 | c.backlist = backtrace_list; | 1504 | c.backlist = backtrace_list; |
| @@ -1555,13 +1541,6 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object), | |||
| 1555 | struct catchtag c; | 1541 | struct catchtag c; |
| 1556 | struct handler h; | 1542 | struct handler h; |
| 1557 | 1543 | ||
| 1558 | /* Since Fsignal will close off all calls to x_catch_errors, | ||
| 1559 | we will get the wrong results if some are not closed now. */ | ||
| 1560 | #if HAVE_X_WINDOWS | ||
| 1561 | if (x_catching_errors ()) | ||
| 1562 | abort (); | ||
| 1563 | #endif | ||
| 1564 | |||
| 1565 | c.tag = Qnil; | 1544 | c.tag = Qnil; |
| 1566 | c.val = Qnil; | 1545 | c.val = Qnil; |
| 1567 | c.backlist = backtrace_list; | 1546 | c.backlist = backtrace_list; |
| @@ -1604,13 +1583,6 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *), | |||
| 1604 | struct catchtag c; | 1583 | struct catchtag c; |
| 1605 | struct handler h; | 1584 | struct handler h; |
| 1606 | 1585 | ||
| 1607 | /* Since Fsignal will close off all calls to x_catch_errors, | ||
| 1608 | we will get the wrong results if some are not closed now. */ | ||
| 1609 | #if HAVE_X_WINDOWS | ||
| 1610 | if (x_catching_errors ()) | ||
| 1611 | abort (); | ||
| 1612 | #endif | ||
| 1613 | |||
| 1614 | c.tag = Qnil; | 1586 | c.tag = Qnil; |
| 1615 | c.val = Qnil; | 1587 | c.val = Qnil; |
| 1616 | c.backlist = backtrace_list; | 1588 | c.backlist = backtrace_list; |
diff --git a/src/process.c b/src/process.c index 71a6f91a7bb..2125478907f 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3580,38 +3580,57 @@ format; see the description of ADDRESS in `make-network-process'. */) | |||
| 3580 | if (s < 0) | 3580 | if (s < 0) |
| 3581 | return Qnil; | 3581 | return Qnil; |
| 3582 | 3582 | ||
| 3583 | again: | 3583 | ifconf.ifc_buf = 0; |
| 3584 | buf_size *= 2; | 3584 | ifconf.ifc_len = 0; |
| 3585 | buf = xrealloc(buf, buf_size); | 3585 | if (ioctl (s, SIOCGIFCONF, &ifconf) == 0 && ifconf.ifc_len > 0) |
| 3586 | if (!buf) | ||
| 3587 | { | 3586 | { |
| 3588 | close (s); | 3587 | ifconf.ifc_buf = xmalloc (ifconf.ifc_len); |
| 3589 | return Qnil; | 3588 | if (ifconf.ifc_buf == NULL) |
| 3589 | { | ||
| 3590 | close (s); | ||
| 3591 | return Qnil; | ||
| 3592 | } | ||
| 3593 | if (ioctl (s, SIOCGIFCONF, &ifconf)) | ||
| 3594 | { | ||
| 3595 | close (s); | ||
| 3596 | xfree (ifconf.ifc_buf); | ||
| 3597 | return Qnil; | ||
| 3598 | } | ||
| 3590 | } | 3599 | } |
| 3600 | else | ||
| 3601 | do | ||
| 3602 | { | ||
| 3603 | buf_size *= 2; | ||
| 3604 | buf = xrealloc (buf, buf_size); | ||
| 3605 | if (!buf) | ||
| 3606 | { | ||
| 3607 | close (s); | ||
| 3608 | return Qnil; | ||
| 3609 | } | ||
| 3591 | 3610 | ||
| 3592 | ifconf.ifc_buf = buf; | 3611 | ifconf.ifc_buf = buf; |
| 3593 | if (ioctl (s, SIOCGIFCONF, &ifconf)) | 3612 | ifconf.ifc_len = buf_size; |
| 3594 | { | 3613 | if (ioctl (s, SIOCGIFCONF, &ifconf)) |
| 3595 | close (s); | 3614 | { |
| 3596 | xfree (buf); | 3615 | close (s); |
| 3597 | return Qnil; | 3616 | xfree (buf); |
| 3598 | } | 3617 | return Qnil; |
| 3618 | } | ||
| 3599 | 3619 | ||
| 3600 | if (ifconf.ifc_len == buf_size) | 3620 | } |
| 3601 | goto again; | 3621 | while (ifconf.ifc_len == buf_size); |
| 3602 | 3622 | ||
| 3603 | close (s); | 3623 | close (s); |
| 3604 | 3624 | ||
| 3605 | res = Qnil; | 3625 | res = Qnil; |
| 3606 | for (ifreq = ifconf.ifc_req; | 3626 | ifreq = ifconf.ifc_req; |
| 3607 | (char *) ifreq < (char *) (ifconf.ifc_req) + ifconf.ifc_len; | 3627 | while ((char *) ifreq < (char *) ifconf.ifc_req + ifconf.ifc_len) |
| 3608 | ) | ||
| 3609 | { | 3628 | { |
| 3610 | struct ifreq *ifq = ifreq; | 3629 | struct ifreq *ifq = ifreq; |
| 3611 | #ifdef HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN | 3630 | #ifdef HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN |
| 3612 | #define SIZEOF_IFREQ(sif) \ | 3631 | #define SIZEOF_IFREQ(sif) \ |
| 3613 | ((sif)->ifr_addr.sa_len < sizeof(struct sockaddr) ? \ | 3632 | ((sif)->ifr_addr.sa_len < sizeof (struct sockaddr) \ |
| 3614 | sizeof((*sif)) : sizeof ((sif)->ifr_name) + sif->ifr_addr.sa_len) | 3633 | ? sizeof (*(sif)) : sizeof ((sif)->ifr_name) + (sif)->ifr_addr.sa_len) |
| 3615 | 3634 | ||
| 3616 | int len = SIZEOF_IFREQ (ifq); | 3635 | int len = SIZEOF_IFREQ (ifq); |
| 3617 | #else | 3636 | #else |
| @@ -3619,7 +3638,7 @@ format; see the description of ADDRESS in `make-network-process'. */) | |||
| 3619 | #endif | 3638 | #endif |
| 3620 | char namebuf[sizeof (ifq->ifr_name) + 1]; | 3639 | char namebuf[sizeof (ifq->ifr_name) + 1]; |
| 3621 | i += len; | 3640 | i += len; |
| 3622 | ifreq = (struct ifreq*) ((char*) ifreq + len); | 3641 | ifreq = (struct ifreq *) ((char *) ifreq + len); |
| 3623 | 3642 | ||
| 3624 | if (ifq->ifr_addr.sa_family != AF_INET) | 3643 | if (ifq->ifr_addr.sa_family != AF_INET) |
| 3625 | continue; | 3644 | continue; |