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
b1c46f02
Commit
b1c46f02
authored
Jun 15, 2011
by
Paul Eggert
Browse files
* ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
(GET_CCL_RANGE, IN_INT_RANGE): Use it.
parent
096a9774
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
src/ChangeLog
src/ChangeLog
+3
-0
src/ccl.c
src/ccl.c
+6
-2
No files found.
src/ChangeLog
View file @
b1c46f02
...
...
@@ -2,6 +2,9 @@
Integer overflow and signedness fixes.
* ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
(GET_CCL_RANGE, IN_INT_RANGE): Use it.
* fileio.c: Don't assume EMACS_INT fits in off_t.
(emacs_lseek): New static function.
(Finsert_file_contents, Fwrite_region): Use it.
...
...
src/ccl.c
View file @
b1c46f02
...
...
@@ -745,11 +745,15 @@ while(0)
#endif
/* Use "&" rather than "&&" to suppress a bogus GCC warning; see
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772>. */
#define ASCENDING_ORDER(lo, med, hi) (((lo) <= (med)) & ((med) <= (hi)))
#define GET_CCL_RANGE(var, ccl_prog, ic, lo, hi) \
do \
{ \
EMACS_INT prog_word = XINT ((ccl_prog)[ic]); \
if (!
((lo) <= prog_word && prog_word <= (
hi))
)
\
if (!
ASCENDING_ORDER (lo, prog_word,
hi)) \
CCL_INVALID_CMD; \
(var) = prog_word; \
} \
...
...
@@ -761,7 +765,7 @@ while(0)
#define GET_CCL_INT(var, ccl_prog, ic) \
GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX)
#define IN_INT_RANGE(val)
(INT_MIN <= (val) && (val) <=
INT_MAX)
#define IN_INT_RANGE(val)
ASCENDING_ORDER (INT_MIN, val,
INT_MAX)
/* Encode one character CH to multibyte form and write to the current
output buffer. If CH is less than 256, CH is written as is. */
...
...
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