Add missing declaration for make_bigz
[sxemacs] / src / ent / ent-int.h
1 /*
2   ent-int.c -- Ordinary Integers for SXEmacs
3   Copyright (C) 2005, 2006 Sebastian Freundt
4
5   Author:  Sebastian Freundt
6
7 This file is part of SXEmacs
8
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.
13
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.
18
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/>. */
21
22
23 #ifndef INCLUDED_ent_int_h_
24 #define INCLUDED_ent_int_h_
25
26 #ifdef UNO
27 /* Uno complains about several inline functions that include conditions with
28    assignments and side effects if we don't do this */
29 #undef __GNUC__
30 #endif
31
32 extern EMACS_INT Vmost_negative_int, Vmost_positive_int;
33 extern Lisp_Object Qzero, Qone;
34
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))
39 #else
40 #define make_integer(x) make_int(x)
41 #endif
42
43 extern Bufpos marker_position(Lisp_Object);
44 extern_inline EMACS_INT ent_int(Lisp_Object);
45
46 \f
47 extern_inline EMACS_INT
48 ent_int(Lisp_Object number)
49 {
50         if (!CHARP(number) && !MARKERP(number))
51                 return XINT(number);
52         else if (CHARP(number))
53                 return XCHAR(number);
54         else if (MARKERP(number))
55                 return marker_position(number);
56         else
57                 return 0;
58 }
59
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);
64
65 #endif /* INCLUDED_ent_int_h_ */