Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
14f6194b
Commit
14f6194b
authored
May 05, 1995
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(make_gap): Make this new error check also check exceeding VALBITS.
(insert_1): Delete old error test. (min): New macro.
parent
8f4f023f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
src/insdel.c
src/insdel.c
+5
-8
No files found.
src/insdel.c
View file @
14f6194b
...
...
@@ -25,6 +25,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "window.h"
#include "blockinput.h"
#define min(x, y) ((x) < (y) ? (x) : (y))
static
void
insert_from_string_1
();
static
void
insert_from_buffer_1
();
static
void
gap_left
();
...
...
@@ -275,9 +277,9 @@ make_gap (increment)
even if it will fit in a Lisp integer.
That won't work because so many places use `int'. */
if
(
VALBITS
>
INTBITS
&&
(
Z
-
BEG
+
GAP_SIZE
+
increment
)
>=
((
unsigned
)
1
<<
(
INTBITS
-
1
)))
error
(
"Buffer
too big
"
);
if
(
Z
-
BEG
+
GAP_SIZE
+
increment
>=
((
unsigned
)
1
<<
(
min
(
INTBITS
,
VALBITS
)
-
1
)))
error
(
"Buffer
exceeds maximum size
"
);
BLOCK_INPUT
;
result
=
BUFFER_REALLOC
(
BEG_ADDR
,
(
Z
-
BEG
+
GAP_SIZE
+
increment
));
...
...
@@ -350,11 +352,6 @@ insert_1 (string, length, inherit, prepare)
{
register
Lisp_Object
temp
;
/* Make sure point-max won't overflow after this insertion. */
XSETINT
(
temp
,
length
+
Z
);
if
(
length
+
Z
!=
XINT
(
temp
))
error
(
"maximum buffer size exceeded"
);
if
(
prepare
)
prepare_to_modify_buffer
(
PT
,
PT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment