aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorJoakim Verona2011-02-05 11:23:09 +0100
committerJoakim Verona2011-02-05 11:23:09 +0100
commit4bd51ad5c3445b644dfb017d5b57b10a90aa325f (patch)
tree894801e7308ce4ecc34933f959e28f4b9cff9533 /src/data.c
parent13cfe8df462ab8da9f0028e16cc84dcaceaca3d1 (diff)
parent9bcaafce5351d270ac514e23cb69ff1a5fd35229 (diff)
downloademacs-4bd51ad5c3445b644dfb017d5b57b10a90aa325f.tar.gz
emacs-4bd51ad5c3445b644dfb017d5b57b10a90aa325f.zip
merge from upstream. currently seems to have bitroted and i get segfaults
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/data.c b/src/data.c
index c28dc9b4bae..927bc7c5a47 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,6 +1,5 @@
1/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter. 1/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2 Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2011
3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
5 4
6This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -94,8 +93,6 @@ Lisp_Object Qinteractive_form;
94 93
95static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); 94static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *);
96 95
97Lisp_Object Vmost_positive_fixnum, Vmost_negative_fixnum;
98
99 96
100void 97void
101circular_list_error (Lisp_Object list) 98circular_list_error (Lisp_Object list)
@@ -135,21 +132,6 @@ args_out_of_range_3 (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3)
135 xsignal3 (Qargs_out_of_range, a1, a2, a3); 132 xsignal3 (Qargs_out_of_range, a1, a2, a3);
136} 133}
137 134
138/* On some machines, XINT needs a temporary location.
139 Here it is, in case it is needed. */
140
141int sign_extend_temp;
142
143/* On a few machines, XINT can only be done by calling this. */
144
145int
146sign_extend_lisp_int (EMACS_INT num)
147{
148 if (num & (((EMACS_INT) 1) << (VALBITS - 1)))
149 return num | (((EMACS_INT) (-1)) << VALBITS);
150 else
151 return num & ((((EMACS_INT) 1) << VALBITS) - 1);
152}
153 135
154/* Data type predicates */ 136/* Data type predicates */
155 137
@@ -2390,7 +2372,7 @@ NUMBER may be an integer or a floating point number. */)
2390 2372
2391 if (FLOATP (number)) 2373 if (FLOATP (number))
2392 { 2374 {
2393 char pigbuf[350]; /* see comments in float_to_string */ 2375 char pigbuf[FLOAT_TO_STRING_BUFSIZE];
2394 2376
2395 float_to_string (pigbuf, XFLOAT_DATA (number)); 2377 float_to_string (pigbuf, XFLOAT_DATA (number));
2396 return build_string (pigbuf); 2378 return build_string (pigbuf);
@@ -3315,12 +3297,12 @@ syms_of_data (void)
3315 3297
3316 XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function; 3298 XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function;
3317 3299
3318 DEFVAR_LISP ("most-positive-fixnum", &Vmost_positive_fixnum, 3300 DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum,
3319 doc: /* The largest value that is representable in a Lisp integer. */); 3301 doc: /* The largest value that is representable in a Lisp integer. */);
3320 Vmost_positive_fixnum = make_number (MOST_POSITIVE_FIXNUM); 3302 Vmost_positive_fixnum = make_number (MOST_POSITIVE_FIXNUM);
3321 XSYMBOL (intern_c_string ("most-positive-fixnum"))->constant = 1; 3303 XSYMBOL (intern_c_string ("most-positive-fixnum"))->constant = 1;
3322 3304
3323 DEFVAR_LISP ("most-negative-fixnum", &Vmost_negative_fixnum, 3305 DEFVAR_LISP ("most-negative-fixnum", Vmost_negative_fixnum,
3324 doc: /* The smallest value that is representable in a Lisp integer. */); 3306 doc: /* The smallest value that is representable in a Lisp integer. */);
3325 Vmost_negative_fixnum = make_number (MOST_NEGATIVE_FIXNUM); 3307 Vmost_negative_fixnum = make_number (MOST_NEGATIVE_FIXNUM);
3326 XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; 3308 XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1;
@@ -3353,5 +3335,3 @@ init_data (void)
3353#endif /* uts */ 3335#endif /* uts */
3354} 3336}
3355 3337
3356/* arch-tag: 25879798-b84d-479a-9c89-7d148e2109f7
3357 (do not change this comment) */