• Eli Zaretskii's avatar
    Fix regex.c, syntax.c and friends for buffers > 2GB. · d1dfb56c
    Eli Zaretskii authored
     src/syntax.h (struct gl_state_s): Declare character position members
     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
     src/intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
     src/indent.c (Fvertical_motion): Local variable it_start is now
     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
     (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.
syntax.h 10.7 KB