Rename from SHORTBITS, INTBITS, LONGBITS.
CHECK_NATNUM (length, 0);
- bits_per_value = sizeof (EMACS_INT) * INTBITS / sizeof (int);
+ bits_per_value = sizeof (EMACS_INT) * BITS_PER_CHAR;
length_in_elts = (XFASTINT (length) + bits_per_value - 1) / bits_per_value;
length_in_chars = length_in_elts * sizeof (EMACS_INT);
{
int count = specpdl_ptr - specpdl;
Lisp_Object number;
- int nbits = min (VALBITS, INTBITS);
+ int nbits = min (VALBITS, BITS_PER_INT);
XSETINT (number, ((EMACS_INT) 1 << (nbits - 1)) - 1);
#include "syssignal.h"
-#ifdef MSDOS
-/* These are redefined (correctly, but differently) in values.h. */
-#undef INTBITS
-#undef LONGBITS
-#undef SHORTBITS
-#endif
-
#ifdef LISP_FLOAT_TYPE
#ifdef STDC_HEADERS
else if (BOOL_VECTOR_P (array))
{
int val;
- int bits_per_char = INTBITS / sizeof (int);
if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size)
args_out_of_range (array, idx);
- val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / bits_per_char];
- return (val & (1 << (idxval % bits_per_char)) ? Qt : Qnil);
+ val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR];
+ return (val & (1 << (idxval % BITS_PER_CHAR)) ? Qt : Qnil);
}
else if (CHAR_TABLE_P (array))
{
else if (BOOL_VECTOR_P (array))
{
int val;
- int bits_per_char = INTBITS / sizeof (int);
if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size)
args_out_of_range (array, idx);
- val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / bits_per_char];
+ val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR];
if (! NILP (newelt))
- val |= 1 << (idxval % bits_per_char);
+ val |= 1 << (idxval % BITS_PER_CHAR);
else
- val &= ~(1 << (idxval % bits_per_char));
- XBOOL_VECTOR (array)->data[idxval / bits_per_char] = val;
+ val &= ~(1 << (idxval % BITS_PER_CHAR));
+ XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR] = val;
}
else if (CHAR_TABLE_P (array))
{
size_bound = -size_bound;
size_bound += 50;
- if (size_bound > (unsigned) (1 << (INTBITS - 1)))
+ if (size_bound > (unsigned) (1 << (BITS_PER_INT - 1)))
error ("Format padding too large");
/* Make sure we have that much. */
#ifdef LISP_FLOAT_TYPE
-#ifdef MSDOS
-/* These are redefined (correctly, but differently) in values.h. */
-#undef INTBITS
-#undef LONGBITS
-#undef SHORTBITS
-#endif
-
/* Work around a problem that happens because math.h on hpux 7
defines two static variables--which, in Emacs, are not really static,
because `static' is defined as nothing. The problem is that they are
if (BOOL_VECTOR_P (arg))
{
Lisp_Object val;
- int bits_per_char = INTBITS / sizeof (int);
int size_in_chars
- = (XBOOL_VECTOR (arg)->size + bits_per_char) / bits_per_char;
+ = (XBOOL_VECTOR (arg)->size + BITS_PER_CHAR) / BITS_PER_CHAR;
val = Fmake_bool_vector (Flength (arg), Qnil);
bcopy (XBOOL_VECTOR (arg)->data, XBOOL_VECTOR (val)->data,
XSETFASTINT (elt, XSTRING (this)->data[thisindex++]);
else if (BOOL_VECTOR_P (this))
{
- int bits_per_char = INTBITS / sizeof (int);
int size_in_chars
- = ((XBOOL_VECTOR (this)->size + bits_per_char)
- / bits_per_char);
+ = ((XBOOL_VECTOR (this)->size + BITS_PER_CHAR)
+ / BITS_PER_CHAR);
int byte;
- byte = XBOOL_VECTOR (val)->data[thisindex / bits_per_char];
+ byte = XBOOL_VECTOR (val)->data[thisindex / BITS_PER_CHAR];
if (byte & (1 << thisindex))
elt = Qt;
else
/* Boolvectors are compared much like strings. */
if (BOOL_VECTOR_P (o1))
{
- int bits_per_char = INTBITS / sizeof (int);
int size_in_chars
- = (XBOOL_VECTOR (o1)->size + bits_per_char) / bits_per_char;
+ = (XBOOL_VECTOR (o1)->size + BITS_PER_CHAR) / BITS_PER_CHAR;
if (XBOOL_VECTOR (o1)->size != XBOOL_VECTOR (o2)->size)
return 0;
else if (BOOL_VECTOR_P (array))
{
register unsigned char *p = XBOOL_VECTOR (array)->data;
- int bits_per_char = INTBITS / sizeof (int);
int size_in_chars
- = (XBOOL_VECTOR (array)->size + bits_per_char) / bits_per_char;
+ = (XBOOL_VECTOR (array)->size + BITS_PER_CHAR) / BITS_PER_CHAR;
charval = (! NILP (item) ? -1 : 0);
for (index = 0; index < size_in_chars; index++)
lmargin + (XFASTINT (prevline) == BEG
? start_hpos : 0),
0,
- from, 1 << (INTBITS - 2), 0,
+ from, 1 << (BITS_PER_INT - 2), 0,
width, hscroll, 0, w);
vpos -= pos.vpos;
first = 0;
lmargin + (XFASTINT (prevline) == BEG
? start_hpos : 0),
0,
- from, 1 << (INTBITS - 2), 0,
+ from, 1 << (BITS_PER_INT - 2), 0,
width, hscroll, 0, w);
did_motion = 1;
}
did_motion = 0;
}
return compute_motion (from, vpos, pos.hpos, did_motion,
- ZV, vtarget, - (1 << (INTBITS - 2)),
+ ZV, vtarget, - (1 << (BITS_PER_INT - 2)),
width, hscroll, pos.vpos * width, w);
}
That won't work because so many places use `int'. */
if (Z - BEG + GAP_SIZE + increment
- >= ((unsigned) 1 << (min (INTBITS, VALBITS) - 1)))
+ >= ((unsigned) 1 << (min (BITS_PER_INT, VALBITS) - 1)))
error ("Buffer exceeds maximum size");
BLOCK_INPUT;
{
gdb_valbits = VALBITS,
gdb_gctypebits = GCTYPEBITS,
- gdb_emacs_intbits = sizeof (EMACS_INT) * INTBITS / sizeof (int),
+ gdb_emacs_intbits = sizeof (EMACS_INT) * BITS_PER_CHAR,
#ifdef DATA_SEG_BITS
gdb_data_seg_bits = DATA_SEG_BITS
#else
/* Extract the value of a Lisp_Object as a signed integer. */
#ifndef XINT /* Some machines need to do this differently. */
-#define XINT(a) (((a) << (INTBITS-VALBITS)) >> (INTBITS-VALBITS))
+#define XINT(a) (((a) << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))
#endif
/* Extract the value as an unsigned integer. This is a basis
#define XGCTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK))
#endif
-#if VALBITS + GCTYPEBITS == INTBITS - 1
+#if VALBITS + GCTYPEBITS == BITS_PER_INT - 1
/* Make XMARKBIT faster if mark bit is sign bit. */
#ifndef XMARKBIT
#define XMARKBIT(a) ((a) < 0)
#ifdef EXPLICIT_SIGN_EXTEND
/* Make sure we sign-extend; compilers have been known to fail to do so. */
-#define XINT(a) (((a).i << (INTBITS-VALBITS)) >> (INTBITS-VALBITS))
+#define XINT(a) (((a).i << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))
#else
#define XINT(a) ((a).s.val)
#endif /* EXPLICIT_SIGN_EXTEND */
#ifdef MSDOS
#include "msdos.h"
-/* These are redefined (correctly, but differently) in values.h. */
-#undef INTBITS
-#undef LONGBITS
-#undef SHORTBITS
#endif
#include <math.h>
if (c == '"')
{
Lisp_Object tmp, val;
- int bits_per_char = INTBITS / sizeof (int);
- int size_in_chars = ((XFASTINT (length) + bits_per_char)
- / bits_per_char);
+ int size_in_chars = ((XFASTINT (length) + BITS_PER_CHAR)
+ / BITS_PER_CHAR);
UNREAD (c);
tmp = read1 (readcharfun, pch, first_in_list);
register int i;
register unsigned char c;
struct gcpro gcpro1;
- int bits_per_char = INTBITS / sizeof (int);
int size_in_chars
- = (XBOOL_VECTOR (obj)->size + bits_per_char) / bits_per_char;
+ = (XBOOL_VECTOR (obj)->size + BITS_PER_CHAR) / BITS_PER_CHAR;
GCPRO1 (obj);
pos = *compute_motion (tlbufpos, 0,
XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0,
0,
- PT, 2, - (1 << (SHORTBITS - 1)),
+ PT, 2, - (1 << (BITS_PER_SHORT - 1)),
window_internal_width (w) - 1,
XINT (w->hscroll),
pos_tab_offset (w, tlbufpos), w);
+ (hscroll ? 1 - hscroll : 0)),
0,
ZV, height / 2,
- - (1 << (SHORTBITS - 1)),
+ - (1 << (BITS_PER_SHORT - 1)),
width, hscroll, pos_tab_offset (w, startp), w);
BUF_PT (current_buffer) = pos.bufpos;
if (w != XWINDOW (selected_window))
/* Compute the cursor position after that newline. */
ep = *compute_motion (pos, vpos, val.hpos, did_motion, tem,
- height, - (1 << (SHORTBITS - 1)),
+ height, - (1 << (BITS_PER_SHORT - 1)),
width, hscroll, pos_tab_offset (w, bp.bufpos), w);
/* If changes reach past the text available on the frame,
if (PT <= xp.bufpos)
{
pp = *compute_motion (ep.bufpos, ep.vpos, ep.hpos, 1,
- PT, height, - (1 << (SHORTBITS - 1)),
+ PT, height, - (1 << (BITS_PER_SHORT - 1)),
width, hscroll, epto, w);
}
else
{
pp = *compute_motion (xp.bufpos, xp.vpos, xp.hpos, 1,
- PT, height, - (1 << (SHORTBITS - 1)),
+ PT, height, - (1 << (BITS_PER_SHORT - 1)),
width, hscroll,
pos_tab_offset (w, xp.bufpos), w);
}
if (debug_end_pos)
{
val = *compute_motion (start, 0, lmargin, 0, ZV,
- height, - (1 << (SHORTBITS - 1)),
+ height, - (1 << (BITS_PER_SHORT - 1)),
width, hscroll, pos_tab_offset (w, start), w);
if (val.vpos != XFASTINT (w->window_end_vpos))
abort ();
&& XINT (height) > 0
/* The string must have enough bits for width * height. */
&& ((XSTRING (XCONS (XCONS (XCONS (arg)->cdr)->cdr)->car)->size
- * (INTBITS / sizeof (int)))
+ * (BITS_PER_INT / sizeof (int)))
>= XFASTINT (width) * XFASTINT (height))))
? Qt : Qnil);
}
{
/* If char is out of range, try the font's default char instead. */
c = font->default_char;
- row = c >> (INTBITS - 8);
+ row = c >> (BITS_PER_INT - 8);
within = c & 0177;
}
if (!(within >= font->min_char_or_byte2
{
/* If char is out of range, try the font's default char instead. */
c = font->default_char;
- row = c >> (INTBITS - 8);
+ row = c >> (BITS_PER_INT - 8);
within = c & 0177;
}
if (!(within >= font->min_char_or_byte2