Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
81d70626
Commit
81d70626
authored
Apr 29, 1998
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Flsh, Fash): Handle out-of-range shift counts reasonably.
parent
3036594f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/data.c
src/data.c
+10
-2
No files found.
src/data.c
View file @
81d70626
...
...
@@ -2481,8 +2481,12 @@ In this case, the sign bit is duplicated.")
CHECK_NUMBER
(
value
,
0
);
CHECK_NUMBER
(
count
,
1
);
if
(
XINT
(
count
)
>
0
)
if
(
XINT
(
count
)
>=
BITS_PER_EMACS_INT
)
XSETINT
(
val
,
0
);
else
if
(
XINT
(
count
)
>
0
)
XSETINT
(
val
,
XINT
(
value
)
<<
XFASTINT
(
count
));
else
if
(
XINT
(
count
)
<=
-
BITS_PER_EMACS_INT
)
XSETINT
(
val
,
XINT
(
value
)
<
0
?
-
1
:
0
);
else
XSETINT
(
val
,
XINT
(
value
)
>>
-
XINT
(
count
));
return
val
;
...
...
@@ -2500,8 +2504,12 @@ In this case, zeros are shifted in on the left.")
CHECK_NUMBER
(
value
,
0
);
CHECK_NUMBER
(
count
,
1
);
if
(
XINT
(
count
)
>
0
)
if
(
XINT
(
count
)
>=
BITS_PER_EMACS_INT
)
XSETINT
(
val
,
0
);
else
if
(
XINT
(
count
)
>
0
)
XSETINT
(
val
,
(
EMACS_UINT
)
XUINT
(
value
)
<<
XFASTINT
(
count
));
else
if
(
XINT
(
count
)
<=
-
BITS_PER_EMACS_INT
)
XSETINT
(
val
,
0
);
else
XSETINT
(
val
,
(
EMACS_UINT
)
XUINT
(
value
)
>>
-
XINT
(
count
));
return
val
;
...
...
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