Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
68be917d
Commit
68be917d
authored
Oct 31, 1995
by
Karl Heuer
Browse files
(BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG):
Rename from SHORTBITS, INTBITS, LONGBITS.
parent
1b124db4
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
35 additions
and
61 deletions
+35
-61
src/alloc.c
src/alloc.c
+2
-2
src/data.c
src/data.c
+6
-15
src/doprnt.c
src/doprnt.c
+1
-1
src/floatfns.c
src/floatfns.c
+0
-7
src/fns.c
src/fns.c
+6
-10
src/indent.c
src/indent.c
+3
-3
src/insdel.c
src/insdel.c
+1
-1
src/lisp.h
src/lisp.h
+4
-4
src/lread.c
src/lread.c
+2
-7
src/print.c
src/print.c
+1
-2
src/xdisp.c
src/xdisp.c
+6
-6
src/xfaces.c
src/xfaces.c
+1
-1
src/xterm.c
src/xterm.c
+2
-2
No files found.
src/alloc.c
View file @
68be917d
...
...
@@ -1091,7 +1091,7 @@ Both LENGTH and INIT must be numbers. INIT matters only in whether it is t or n
CHECK_NATNUM
(
length
,
0
);
bits_per_value
=
sizeof
(
EMACS_INT
)
*
INT
BITS
/
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
);
...
...
@@ -1428,7 +1428,7 @@ inhibit_garbage_collection ()
{
int
count
=
specpdl_ptr
-
specpdl
;
Lisp_Object
number
;
int
nbits
=
min
(
VALBITS
,
INT
BITS
);
int
nbits
=
min
(
VALBITS
,
BITS
_PER_INT
);
XSETINT
(
number
,
((
EMACS_INT
)
1
<<
(
nbits
-
1
))
-
1
);
...
...
src/data.c
View file @
68be917d
...
...
@@ -31,13 +31,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#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
...
...
@@ -1532,13 +1525,12 @@ or a byte-code object. INDEX starts at 0.")
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
))
{
...
...
@@ -1639,18 +1631,17 @@ ARRAY may be a vector or a string. IDX starts at 0.")
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
))
{
...
...
src/doprnt.c
View file @
68be917d
...
...
@@ -104,7 +104,7 @@ doprnt (buffer, bufsize, format, format_end, nargs, args)
size_bound
=
-
size_bound
;
size_bound
+=
50
;
if
(
size_bound
>
(
unsigned
)
(
1
<<
(
INT
BITS
-
1
)))
if
(
size_bound
>
(
unsigned
)
(
1
<<
(
BITS
_PER_INT
-
1
)))
error
(
"Format padding too large"
);
/* Make sure we have that much. */
...
...
src/floatfns.c
View file @
68be917d
...
...
@@ -53,13 +53,6 @@ Lisp_Object Qarith_error;
#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
...
...
src/fns.c
View file @
68be917d
...
...
@@ -318,9 +318,8 @@ with the original.")
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
,
...
...
@@ -432,12 +431,11 @@ concat (nargs, args, target_type, last_special)
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
...
...
@@ -1075,9 +1073,8 @@ internal_equal (o1, o2, depth)
/* 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
;
...
...
@@ -1160,9 +1157,8 @@ ARRAY is a vector, string, char-table, or bool-vector.")
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
++
)
...
...
src/indent.c
View file @
68be917d
...
...
@@ -1139,7 +1139,7 @@ vmotion (from, vtarget, w)
lmargin
+
(
XFASTINT
(
prevline
)
==
BEG
?
start_hpos
:
0
),
0
,
from
,
1
<<
(
INT
BITS
-
2
),
0
,
from
,
1
<<
(
BITS
_PER_INT
-
2
),
0
,
width
,
hscroll
,
0
,
w
);
vpos
-=
pos
.
vpos
;
first
=
0
;
...
...
@@ -1185,7 +1185,7 @@ vmotion (from, vtarget, w)
lmargin
+
(
XFASTINT
(
prevline
)
==
BEG
?
start_hpos
:
0
),
0
,
from
,
1
<<
(
INT
BITS
-
2
),
0
,
from
,
1
<<
(
BITS
_PER_INT
-
2
),
0
,
width
,
hscroll
,
0
,
w
);
did_motion
=
1
;
}
...
...
@@ -1196,7 +1196,7 @@ vmotion (from, vtarget, w)
did_motion
=
0
;
}
return
compute_motion
(
from
,
vpos
,
pos
.
hpos
,
did_motion
,
ZV
,
vtarget
,
-
(
1
<<
(
INT
BITS
-
2
)),
ZV
,
vtarget
,
-
(
1
<<
(
BITS
_PER_INT
-
2
)),
width
,
hscroll
,
pos
.
vpos
*
width
,
w
);
}
...
...
src/insdel.c
View file @
68be917d
...
...
@@ -299,7 +299,7 @@ make_gap (increment)
That won't work because so many places use `int'. */
if
(
Z
-
BEG
+
GAP_SIZE
+
increment
>=
((
unsigned
)
1
<<
(
min
(
INT
BITS
,
VALBITS
)
-
1
)))
>=
((
unsigned
)
1
<<
(
min
(
BITS
_PER_INT
,
VALBITS
)
-
1
)))
error
(
"Buffer exceeds maximum size"
);
BLOCK_INPUT
;
...
...
src/lisp.h
View file @
68be917d
...
...
@@ -102,7 +102,7 @@ enum gdb_lisp_params
{
gdb_valbits
=
VALBITS
,
gdb_gctypebits
=
GCTYPEBITS
,
gdb_emacs_intbits
=
sizeof
(
EMACS_INT
)
*
INT
BITS
/
sizeof
(
int
)
,
gdb_emacs_intbits
=
sizeof
(
EMACS_INT
)
*
BITS
_PER_CHAR
,
#ifdef DATA_SEG_BITS
gdb_data_seg_bits
=
DATA_SEG_BITS
#else
...
...
@@ -271,7 +271,7 @@ enum pvec_type
/* Extract the value of a Lisp_Object as a signed integer. */
#ifndef XINT
/* Some machines need to do this differently. */
#define XINT(a) (((a) << (
INT
BITS-VALBITS)) >> (
INT
BITS-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
...
...
@@ -316,7 +316,7 @@ extern int pure_size;
#define XGCTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK))
#endif
#if VALBITS + GCTYPEBITS ==
INT
BITS - 1
#if VALBITS + GCTYPEBITS == BITS
_PER_INT
- 1
/* Make XMARKBIT faster if mark bit is sign bit. */
#ifndef XMARKBIT
#define XMARKBIT(a) ((a) < 0)
...
...
@@ -354,7 +354,7 @@ extern int pure_size;
#ifdef EXPLICIT_SIGN_EXTEND
/* Make sure we sign-extend; compilers have been known to fail to do so. */
#define XINT(a) (((a).i << (
INT
BITS-VALBITS)) >> (
INT
BITS-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 */
...
...
src/lread.c
View file @
68be917d
...
...
@@ -50,10 +50,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef MSDOS
#include "msdos.h"
/* These are redefined (correctly, but differently) in values.h. */
#undef INTBITS
#undef LONGBITS
#undef SHORTBITS
#endif
#include <math.h>
...
...
@@ -1203,9 +1199,8 @@ read1 (readcharfun, pch, first_in_list)
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
);
...
...
src/print.c
View file @
68be917d
...
...
@@ -933,9 +933,8 @@ print (obj, printcharfun, escapeflag)
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
);
...
...
src/xdisp.c
View file @
68be917d
...
...
@@ -987,7 +987,7 @@ redisplay ()
pos
=
*
compute_motion
(
tlbufpos
,
0
,
XINT
(
w
->
hscroll
)
?
1
-
XINT
(
w
->
hscroll
)
:
0
,
0
,
PT
,
2
,
-
(
1
<<
(
SHORT
BITS
-
1
)),
PT
,
2
,
-
(
1
<<
(
BITS_PER_
SHORT
-
1
)),
window_internal_width
(
w
)
-
1
,
XINT
(
w
->
hscroll
),
pos_tab_offset
(
w
,
tlbufpos
),
w
);
...
...
@@ -1531,7 +1531,7 @@ redisplay_window (window, just_this_one)
+
(
hscroll
?
1
-
hscroll
:
0
)),
0
,
ZV
,
height
/
2
,
-
(
1
<<
(
SHORT
BITS
-
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
))
...
...
@@ -1967,7 +1967,7 @@ try_window_id (window)
/* Compute the cursor position after that newline. */
ep
=
*
compute_motion
(
pos
,
vpos
,
val
.
hpos
,
did_motion
,
tem
,
height
,
-
(
1
<<
(
SHORT
BITS
-
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,
...
...
@@ -2023,13 +2023,13 @@ try_window_id (window)
if
(
PT
<=
xp
.
bufpos
)
{
pp
=
*
compute_motion
(
ep
.
bufpos
,
ep
.
vpos
,
ep
.
hpos
,
1
,
PT
,
height
,
-
(
1
<<
(
SHORT
BITS
-
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
<<
(
SHORT
BITS
-
1
)),
PT
,
height
,
-
(
1
<<
(
BITS_PER_
SHORT
-
1
)),
width
,
hscroll
,
pos_tab_offset
(
w
,
xp
.
bufpos
),
w
);
}
...
...
@@ -2250,7 +2250,7 @@ try_window_id (window)
if
(
debug_end_pos
)
{
val
=
*
compute_motion
(
start
,
0
,
lmargin
,
0
,
ZV
,
height
,
-
(
1
<<
(
SHORT
BITS
-
1
)),
height
,
-
(
1
<<
(
BITS_PER_
SHORT
-
1
)),
width
,
hscroll
,
pos_tab_offset
(
w
,
start
),
w
);
if
(
val
.
vpos
!=
XFASTINT
(
w
->
window_end_vpos
))
abort
();
...
...
src/xfaces.c
View file @
68be917d
...
...
@@ -400,7 +400,7 @@ DEFUN ("pixmap-spec-p", Fpixmap_spec_p, Spixmap_spec_p, 1, 1, 0,
&&
XINT
(
height
)
>
0
/* The string must have enough bits for width * height. */
&&
((
XSTRING
(
XCONS
(
XCONS
(
XCONS
(
arg
)
->
cdr
)
->
cdr
)
->
car
)
->
size
*
(
INT
BITS
/
sizeof
(
int
)))
*
(
BITS
_PER_INT
/
sizeof
(
int
)))
>=
XFASTINT
(
width
)
*
XFASTINT
(
height
))))
?
Qt
:
Qnil
);
}
...
...
src/xterm.c
View file @
68be917d
...
...
@@ -970,7 +970,7 @@ font_char_overlap_left (font, c)
{
/* If char is out of range, try the font's default char instead. */
c = font->default_char;
row = c >> (
INT
BITS - 8);
row = c >> (BITS
_PER_INT
- 8);
within = c & 0177;
}
if (!(within >= font->min_char_or_byte2
...
...
@@ -1015,7 +1015,7 @@ font_char_overlap_right (font, c)
{
/* If char is out of range, try the font's default char instead. */
c = font->default_char;
row = c >> (
INT
BITS - 8);
row = c >> (BITS
_PER_INT
- 8);
within = c & 0177;
}
if (!(within >= font->min_char_or_byte2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment