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 #define make_integer(x) \
37 (NUMBER_FITS_IN_AN_EMACS_INT(x) ? make_int(x) : make_bigz(x))
39 #define make_integer(x) make_int(x)
42 extern Bufpos marker_position(Lisp_Object);
43 extern_inline EMACS_INT ent_int(Lisp_Object);
46 extern_inline EMACS_INT
47 ent_int(Lisp_Object number)
49 if (!CHARP(number) && !MARKERP(number))
51 else if (CHARP(number))
53 else if (MARKERP(number))
54 return marker_position(number);
59 extern void init_optables_INT_T(void);
60 extern void init_ent_int(void);
61 extern void syms_of_ent_int(void);
62 extern void vars_of_ent_int(void);
64 #endif /* INCLUDED_ent_int_h_ */