Mercurial > hg > xemacs-beta
comparison src/insdel.c @ 274:ca9a9ec9c1c1 r21-0b35
Import from CVS: tag r21-0b35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:29:42 +0200 |
parents | c5d627a313b1 |
children | 57709be46d1b |
comparison
equal
deleted
inserted
replaced
273:411aac7253ef | 274:ca9a9ec9c1c1 |
---|---|
1872 /* Don't allow a buffer size that won't fit in an int | 1872 /* Don't allow a buffer size that won't fit in an int |
1873 even if it will fit in a Lisp integer. | 1873 even if it will fit in a Lisp integer. |
1874 That won't work because so many places use `int'. */ | 1874 That won't work because so many places use `int'. */ |
1875 | 1875 |
1876 if (BUF_Z (buf) - BUF_BEG (buf) + BUF_GAP_SIZE (buf) + increment | 1876 if (BUF_Z (buf) - BUF_BEG (buf) + BUF_GAP_SIZE (buf) + increment |
1877 > (int) EMACS_INT_MAX) | 1877 > EMACS_INT_MAX) |
1878 error ("Maximum buffer size exceeded"); | 1878 error ("Maximum buffer size exceeded"); |
1879 | 1879 |
1880 result = BUFFER_REALLOC (buf->text->beg, | 1880 result = BUFFER_REALLOC (buf->text->beg, |
1881 BI_BUF_Z (buf) - BI_BUF_BEG (buf) + | 1881 BI_BUF_Z (buf) - BI_BUF_BEG (buf) + |
1882 BUF_GAP_SIZE (buf) + increment + | 1882 BUF_GAP_SIZE (buf) + increment + |
2386 as translatable, then Fgettext() should be called on obj if it | 2386 as translatable, then Fgettext() should be called on obj if it |
2387 is a string. */ | 2387 is a string. */ |
2388 #endif | 2388 #endif |
2389 | 2389 |
2390 /* Make sure that point-max won't exceed the size of an emacs int. */ | 2390 /* Make sure that point-max won't exceed the size of an emacs int. */ |
2391 if ((length + BUF_Z (buf)) > (int) EMACS_INT_MAX) | 2391 if ((length + BUF_Z (buf)) > EMACS_INT_MAX) |
2392 error ("Maximum buffer size exceeded"); | 2392 error ("Maximum buffer size exceeded"); |
2393 | 2393 |
2394 /* theoretically not necessary -- caller should GCPRO */ | 2394 /* theoretically not necessary -- caller should GCPRO */ |
2395 GCPRO1 (reloc); | 2395 GCPRO1 (reloc); |
2396 | 2396 |