diff options
| author | Eli Zaretskii | 2011-04-16 21:26:30 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-04-16 21:26:30 +0300 |
| commit | d1dfb56cc84a6d70262d979face230a71e98d479 (patch) | |
| tree | 8204edb64962a875b368dd248c00e127f9584b73 /src/intervals.h | |
| parent | 10472dd0d62d986e048c01a3d37627b843a321d2 (diff) | |
| download | emacs-d1dfb56cc84a6d70262d979face230a71e98d479.tar.gz emacs-d1dfb56cc84a6d70262d979face230a71e98d479.zip | |
Fix regex.c, syntax.c and friends for buffers > 2GB.
src/syntax.h (struct gl_state_s): Declare character position members
EMACS_INT.
src/syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
src/textprop.c (verify_interval_modification, interval_of): Declare
arguments EMACS_INT.
src/intervals.c (adjust_intervals_for_insertion): Declare arguments
EMACS_INT.
src/intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
src/indent.c (Fvertical_motion): Local variable it_start is now
EMACS_INT.
src/regex.c (re_match, re_match_2, re_match_2_internal)
(bcmp_translate, regcomp, regexec, print_double_string)
(group_in_compile_stack, re_search, re_search_2, regex_compile)
(re_compile_pattern, re_exec): Declare arguments and local
variables `size_t' and `ssize_t' and return values `regoff_t', as
appropriate.
(POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
(CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
<compile_stack_type>: `size' and `avail' are now `size_t'.
src/regex.h <regoff_t>: Use ssize_t, not int.
(re_search, re_search_2, re_match, re_match_2): Arguments that
specify buffer/string position and length are now ssize_t and
size_t. Return type is regoff_t.
Diffstat (limited to 'src/intervals.h')
| -rw-r--r-- | src/intervals.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/intervals.h b/src/intervals.h index f1679eb8b40..6cf5c89374b 100644 --- a/src/intervals.h +++ b/src/intervals.h | |||
| @@ -161,12 +161,12 @@ struct interval | |||
| 161 | (INTERVAL_HAS_PARENT (i) ? INTERVAL_PARENT (i) : 0) | 161 | (INTERVAL_HAS_PARENT (i) ? INTERVAL_PARENT (i) : 0) |
| 162 | 162 | ||
| 163 | /* Abort if interval I's size is negative. */ | 163 | /* Abort if interval I's size is negative. */ |
| 164 | #define CHECK_TOTAL_LENGTH(i) \ | 164 | #define CHECK_TOTAL_LENGTH(i) \ |
| 165 | do \ | 165 | do \ |
| 166 | { \ | 166 | { \ |
| 167 | if ((int) (i)->total_length < 0) \ | 167 | if ((EMACS_INT) (i)->total_length < 0) \ |
| 168 | abort (); \ | 168 | abort (); \ |
| 169 | } \ | 169 | } \ |
| 170 | while (0) | 170 | while (0) |
| 171 | 171 | ||
| 172 | /* Reset this interval to its vanilla, or no-property state. */ | 172 | /* Reset this interval to its vanilla, or no-property state. */ |
| @@ -269,7 +269,8 @@ extern INTERVAL merge_interval_left (INTERVAL); | |||
| 269 | extern void offset_intervals (struct buffer *, EMACS_INT, EMACS_INT); | 269 | extern void offset_intervals (struct buffer *, EMACS_INT, EMACS_INT); |
| 270 | extern void graft_intervals_into_buffer (INTERVAL, EMACS_INT, EMACS_INT, | 270 | extern void graft_intervals_into_buffer (INTERVAL, EMACS_INT, EMACS_INT, |
| 271 | struct buffer *, int); | 271 | struct buffer *, int); |
| 272 | extern void verify_interval_modification (struct buffer *, int, int); | 272 | extern void verify_interval_modification (struct buffer *, |
| 273 | EMACS_INT, EMACS_INT); | ||
| 273 | extern INTERVAL balance_intervals (INTERVAL); | 274 | extern INTERVAL balance_intervals (INTERVAL); |
| 274 | extern void copy_intervals_to_string (Lisp_Object, struct buffer *, | 275 | extern void copy_intervals_to_string (Lisp_Object, struct buffer *, |
| 275 | EMACS_INT, EMACS_INT); | 276 | EMACS_INT, EMACS_INT); |
| @@ -285,7 +286,7 @@ extern INTERVAL update_interval (INTERVAL, EMACS_INT); | |||
| 285 | extern void set_intervals_multibyte (int); | 286 | extern void set_intervals_multibyte (int); |
| 286 | extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *, | 287 | extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *, |
| 287 | Lisp_Object *, int); | 288 | Lisp_Object *, int); |
| 288 | extern INTERVAL interval_of (int, Lisp_Object); | 289 | extern INTERVAL interval_of (EMACS_INT, Lisp_Object); |
| 289 | 290 | ||
| 290 | /* Defined in xdisp.c */ | 291 | /* Defined in xdisp.c */ |
| 291 | extern int invisible_p (Lisp_Object, Lisp_Object); | 292 | extern int invisible_p (Lisp_Object, Lisp_Object); |