Mercurial > emacs
diff src/character.c @ 91807:507bcfb4342c
* coding.c (coding_set_destination): Use BEG_BYTE rather than hardcoding 1.
(detect_coding_system):
* lisp.h (detect_coding_system, chars_in_text, multibyte_chars_in_text)
(string_char_to_byte, string_byte_to_char, insert_from_gap):
* insdel.c (insert_from_gap):
* fns.c (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
(string_char_to_byte, string_byte_to_char, string_make_multibyte)
(string_to_multibyte):
* character.c (chars_in_text, multibyte_chars_in_text):
* fileio.c (Finsert_file_contents): Use EMACS_INT for buffer positions.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Tue, 12 Feb 2008 21:35:15 +0000 |
| parents | 541da5d81b14 |
| children | 95fab6416567 |
line wrap: on
line diff
--- a/src/character.c Tue Feb 12 21:29:33 2008 +0000 +++ b/src/character.c Tue Feb 12 21:35:15 2008 +0000 @@ -568,10 +568,10 @@ However, if the current buffer has enable-multibyte-characters = nil, we treat each byte as a character. */ -int +EMACS_INT chars_in_text (ptr, nbytes) const unsigned char *ptr; - int nbytes; + EMACS_INT nbytes; { /* current_buffer is null at early stages of Emacs initialization. */ if (current_buffer == 0 @@ -586,10 +586,10 @@ sequences while assuming that there's no invalid sequence. It ignores enable-multibyte-characters. */ -int +EMACS_INT multibyte_chars_in_text (ptr, nbytes) const unsigned char *ptr; - int nbytes; + EMACS_INT nbytes; { const unsigned char *endp = ptr + nbytes; int chars = 0;
