2 ent-int.c -- Ordinary Integers for SXEmacs
3 Copyright (C) 2005, 2006 Sebastian Freundt
5 Author: Sebastian Freundt
7 This file is part of SXEmacs
9 SXEmacs is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 SXEmacs is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 #ifndef INCLUDED_ent_int_h_
24 #define INCLUDED_ent_int_h_
27 /* Uno complains about several inline functions that include conditions with
28 assignments and side effects if we don't do this */
32 extern EMACS_INT Vmost_negative_int, Vmost_positive_int;
33 extern Lisp_Object Qzero, Qone;
35 #if defined HAVE_MPZ && (defined WITH_GMP || defined WITH_MP)
36 extern Lisp_Object make_bigz(long);
37 #define make_integer(x) \
38 (NUMBER_FITS_IN_AN_EMACS_INT(x) ? make_int(x) : make_bigz(x))
40 #define make_integer(x) make_int(x)
43 extern Bufpos marker_position(Lisp_Object);
44 extern_inline EMACS_INT ent_int(Lisp_Object);
47 extern_inline EMACS_INT
48 ent_int(Lisp_Object number)
50 if (!CHARP(number) && !MARKERP(number))
52 else if (CHARP(number))
54 else if (MARKERP(number))
55 return marker_position(number);
60 extern void init_optables_INT_T(void);
61 extern void init_ent_int(void);
62 extern void syms_of_ent_int(void);
63 extern void vars_of_ent_int(void);
65 #endif /* INCLUDED_ent_int_h_ */