aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.h
diff options
context:
space:
mode:
authorEli Zaretskii2011-04-16 21:26:30 +0300
committerEli Zaretskii2011-04-16 21:26:30 +0300
commitd1dfb56cc84a6d70262d979face230a71e98d479 (patch)
tree8204edb64962a875b368dd248c00e127f9584b73 /src/syntax.h
parent10472dd0d62d986e048c01a3d37627b843a321d2 (diff)
downloademacs-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/syntax.h')
-rw-r--r--src/syntax.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/syntax.h b/src/syntax.h
index 2b052715dac..9f328f568c7 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 21
22extern void update_syntax_table (EMACS_INT, int, int, Lisp_Object); 22extern void update_syntax_table (EMACS_INT, EMACS_INT, int, Lisp_Object);
23 23
24/* The standard syntax table is stored where it will automatically 24/* The standard syntax table is stored where it will automatically
25 be used in all new buffers. */ 25 be used in all new buffers. */
@@ -276,15 +276,15 @@ while (0)
276struct gl_state_s 276struct gl_state_s
277{ 277{
278 Lisp_Object object; /* The object we are scanning. */ 278 Lisp_Object object; /* The object we are scanning. */
279 int start; /* Where to stop. */ 279 EMACS_INT start; /* Where to stop. */
280 int stop; /* Where to stop. */ 280 EMACS_INT stop; /* Where to stop. */
281 int use_global; /* Whether to use global_code 281 int use_global; /* Whether to use global_code
282 or c_s_t. */ 282 or c_s_t. */
283 Lisp_Object global_code; /* Syntax code of current char. */ 283 Lisp_Object global_code; /* Syntax code of current char. */
284 Lisp_Object current_syntax_table; /* Syntax table for current pos. */ 284 Lisp_Object current_syntax_table; /* Syntax table for current pos. */
285 Lisp_Object old_prop; /* Syntax-table prop at prev pos. */ 285 Lisp_Object old_prop; /* Syntax-table prop at prev pos. */
286 int b_property; /* First index where c_s_t is valid. */ 286 EMACS_INT b_property; /* First index where c_s_t is valid. */
287 int e_property; /* First index where c_s_t is 287 EMACS_INT e_property; /* First index where c_s_t is
288 not valid. */ 288 not valid. */
289 INTERVAL forward_i; /* Where to start lookup on forward */ 289 INTERVAL forward_i; /* Where to start lookup on forward */
290 INTERVAL backward_i; /* or backward movement. The 290 INTERVAL backward_i; /* or backward movement. The
@@ -294,7 +294,7 @@ struct gl_state_s
294 intervals too, depending 294 intervals too, depending
295 on: */ 295 on: */
296 /* Offset for positions specified to UPDATE_SYNTAX_TABLE. */ 296 /* Offset for positions specified to UPDATE_SYNTAX_TABLE. */
297 int offset; 297 EMACS_INT offset;
298}; 298};
299 299
300extern struct gl_state_s gl_state; 300extern struct gl_state_s gl_state;