Mercurial > hg > xemacs-beta
comparison src/insdel.c @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | d883f39b8495 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
1884 Lisp_Object tem; | 1884 Lisp_Object tem; |
1885 Bytind real_gap_loc; | 1885 Bytind real_gap_loc; |
1886 Bytecount old_gap_size; | 1886 Bytecount old_gap_size; |
1887 | 1887 |
1888 /* If we have to get more space, get enough to last a while. We use | 1888 /* If we have to get more space, get enough to last a while. We use |
1889 a geometric progession that saves on realloc space. */ | 1889 a geometric progression that saves on realloc space. */ |
1890 increment += 2000 + ((BI_BUF_Z (buf) - BI_BUF_BEG (buf)) / 8); | 1890 increment += 2000 + ((BI_BUF_Z (buf) - BI_BUF_BEG (buf)) / 8); |
1891 | 1891 |
1892 if (increment > BUF_END_GAP_SIZE (buf)) | 1892 if (increment > BUF_END_GAP_SIZE (buf)) |
1893 { | 1893 { |
1894 /* Don't allow a buffer size that won't fit in an int | 1894 /* Don't allow a buffer size that won't fit in an int |
3165 Dynarr_add (dyn, ch); | 3165 Dynarr_add (dyn, ch); |
3166 INC_CHARPTR (str); | 3166 INC_CHARPTR (str); |
3167 } | 3167 } |
3168 } | 3168 } |
3169 | 3169 |
3170 int | 3170 Charcount |
3171 convert_bufbyte_string_into_emchar_string (CONST Bufbyte *str, Bytecount len, | 3171 convert_bufbyte_string_into_emchar_string (CONST Bufbyte *str, Bytecount len, |
3172 Emchar *arr) | 3172 Emchar *arr) |
3173 { | 3173 { |
3174 CONST Bufbyte *strend = str + len; | 3174 CONST Bufbyte *strend = str + len; |
3175 Charcount newlen = 0; | 3175 Charcount newlen = 0; |