Mercurial > hg > xemacs-beta
comparison src/data.c @ 4765:1257b938f03a
automatic merge
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Fri, 04 Dec 2009 10:59:45 +0900 |
parents | aa5ed11f473b |
children | a98ca4640147 e0db3c197671 |
comparison
equal
deleted
inserted
replaced
4764:dec62ca5a899 | 4765:1257b938f03a |
---|---|
156 void | 156 void |
157 check_int_range (EMACS_INT val, EMACS_INT min, EMACS_INT max) | 157 check_int_range (EMACS_INT val, EMACS_INT min, EMACS_INT max) |
158 { | 158 { |
159 if (val < min || val > max) | 159 if (val < min || val > max) |
160 args_out_of_range_3 (make_int (val), make_int (min), make_int (max)); | 160 args_out_of_range_3 (make_int (val), make_int (min), make_int (max)); |
161 } | |
162 | |
163 /* On some machines, XINT needs a temporary location. | |
164 Here it is, in case it is needed. */ | |
165 | |
166 EMACS_INT sign_extend_temp; | |
167 | |
168 /* On a few machines, XINT can only be done by calling this. */ | |
169 /* XEmacs: only used by m/convex.h */ | |
170 EMACS_INT sign_extend_lisp_int (EMACS_INT num); | |
171 EMACS_INT | |
172 sign_extend_lisp_int (EMACS_INT num) | |
173 { | |
174 if (num & (1L << (INT_VALBITS - 1))) | |
175 return num | ((-1L) << INT_VALBITS); | |
176 else | |
177 return num & (EMACS_INT) ((1UL << INT_VALBITS) - 1); | |
178 } | 161 } |
179 | 162 |
180 | 163 |
181 /* Data type predicates */ | 164 /* Data type predicates */ |
182 | 165 |