diff options
| author | Tom Tromey | 2018-08-09 17:56:53 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-08-09 17:56:53 -0600 |
| commit | accb7b7ecc19f85c2750ded1046a464bc73c6a52 (patch) | |
| tree | 1aa94af022d6700a93a8ff2b73f5b210046ac010 /src/lread.c | |
| parent | f822a2516d88eeb2118fbbc8554f155e86dfd74e (diff) | |
| parent | 53483df0de0085dbc9ef0b15a0f629ab808b0147 (diff) | |
| download | emacs-accb7b7ecc19f85c2750ded1046a464bc73c6a52.tar.gz emacs-accb7b7ecc19f85c2750ded1046a464bc73c6a52.zip | |
Merge remote-tracking branch 'origin/master' into feature/bignum
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/lread.c b/src/lread.c index 3a2d9c8a6d3..df2fe581203 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -72,6 +72,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 72 | #define file_tell ftell | 72 | #define file_tell ftell |
| 73 | #endif | 73 | #endif |
| 74 | 74 | ||
| 75 | #if IEEE_FLOATING_POINT | ||
| 76 | # include <ieee754.h> | ||
| 77 | #endif | ||
| 78 | |||
| 75 | /* The objects or placeholders read with the #n=object form. | 79 | /* The objects or placeholders read with the #n=object form. |
| 76 | 80 | ||
| 77 | A hash table maps a number to either a placeholder (while the | 81 | A hash table maps a number to either a placeholder (while the |
| @@ -2730,7 +2734,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 2730 | int c; | 2734 | int c; |
| 2731 | bool uninterned_symbol = false; | 2735 | bool uninterned_symbol = false; |
| 2732 | bool multibyte; | 2736 | bool multibyte; |
| 2733 | char stackbuf[MAX_ALLOCA]; | 2737 | char stackbuf[128]; /* Small, as read1 is recursive (Bug#31995). */ |
| 2734 | current_thread->stack_top = stackbuf; | 2738 | current_thread->stack_top = stackbuf; |
| 2735 | 2739 | ||
| 2736 | *pch = 0; | 2740 | *pch = 0; |
| @@ -3616,7 +3620,7 @@ substitute_object_recurse (struct subst *subst, Lisp_Object subtree) | |||
| 3616 | return subtree; | 3620 | return subtree; |
| 3617 | 3621 | ||
| 3618 | /* If we've been to this node before, don't explore it again. */ | 3622 | /* If we've been to this node before, don't explore it again. */ |
| 3619 | if (!EQ (Qnil, Fmemq (subtree, subst->seen))) | 3623 | if (!NILP (Fmemq (subtree, subst->seen))) |
| 3620 | return subtree; | 3624 | return subtree; |
| 3621 | 3625 | ||
| 3622 | /* If this node can be the entry point to a cycle, remember that | 3626 | /* If this node can be the entry point to a cycle, remember that |
| @@ -3763,14 +3767,18 @@ string_to_number (char const *string, int base, int flags) | |||
| 3763 | cp += 3; | 3767 | cp += 3; |
| 3764 | value = INFINITY; | 3768 | value = INFINITY; |
| 3765 | } | 3769 | } |
| 3770 | #if IEEE_FLOATING_POINT | ||
| 3766 | else if (cp[-1] == '+' | 3771 | else if (cp[-1] == '+' |
| 3767 | && cp[0] == 'N' && cp[1] == 'a' && cp[2] == 'N') | 3772 | && cp[0] == 'N' && cp[1] == 'a' && cp[2] == 'N') |
| 3768 | { | 3773 | { |
| 3769 | state |= E_EXP; | 3774 | state |= E_EXP; |
| 3770 | cp += 3; | 3775 | cp += 3; |
| 3771 | /* NAN is a "positive" NaN on all known Emacs hosts. */ | 3776 | union ieee754_double u |
| 3772 | value = NAN; | 3777 | = { .ieee_nan = { .exponent = -1, .quiet_nan = 1, |
| 3778 | .mantissa0 = n >> 31 >> 1, .mantissa1 = n }}; | ||
| 3779 | value = u.d; | ||
| 3773 | } | 3780 | } |
| 3781 | #endif | ||
| 3774 | else | 3782 | else |
| 3775 | cp = ecp; | 3783 | cp = ecp; |
| 3776 | } | 3784 | } |
| @@ -4236,7 +4244,7 @@ usage: (unintern NAME OBARRAY) */) | |||
| 4236 | session if we unintern them, as well as even more ways to use | 4244 | session if we unintern them, as well as even more ways to use |
| 4237 | `setq' or `fset' or whatnot to make the Emacs session | 4245 | `setq' or `fset' or whatnot to make the Emacs session |
| 4238 | unusable. Let's not go down this silly road. --Stef */ | 4246 | unusable. Let's not go down this silly road. --Stef */ |
| 4239 | /* if (EQ (tem, Qnil) || EQ (tem, Qt)) | 4247 | /* if (NILP (tem) || EQ (tem, Qt)) |
| 4240 | error ("Attempt to unintern t or nil"); */ | 4248 | error ("Attempt to unintern t or nil"); */ |
| 4241 | 4249 | ||
| 4242 | XSYMBOL (tem)->u.s.interned = SYMBOL_UNINTERNED; | 4250 | XSYMBOL (tem)->u.s.interned = SYMBOL_UNINTERNED; |