X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Finsdel.c;h=d34103c2c3d090de49ab0a03e87078d7e0e914ec;hp=b3e4574c9e8b070f956741fb591f36c4ce93a35e;hb=716cfba952c1dc0d2cf5c968971f3780ba728a89;hpb=d74da9234cc42e8018b1500105c3892a5c46d5e3 diff --git a/src/insdel.c b/src/insdel.c index b3e4574..d34103c 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1605,7 +1605,7 @@ static void adjust_markers (struct buffer *buf, Memind from, Memind to, Bytecount amount) { - struct Lisp_Marker *m; + Lisp_Marker *m; for (m = BUF_MARKERS (buf); m; m = marker_next (m)) m->memind = do_marker_adjustment (m->memind, from, to, amount); @@ -1617,7 +1617,7 @@ adjust_markers (struct buffer *buf, Memind from, Memind to, static void adjust_markers_for_insert (struct buffer *buf, Memind ind, Bytecount amount) { - struct Lisp_Marker *m; + Lisp_Marker *m; for (m = BUF_MARKERS (buf); m; m = marker_next (m)) { @@ -1631,18 +1631,6 @@ adjust_markers_for_insert (struct buffer *buf, Memind ind, Bytecount amount) /* Routines for dealing with the gap */ /************************************************************************/ -/* XEmacs requires an ANSI C compiler, and it damn well better have a - working memmove() */ -#define GAP_USE_BCOPY -#ifdef BCOPY_UPWARD_SAFE -# undef BCOPY_UPWARD_SAFE -#endif -#ifdef BCOPY_DOWNWARD_SAFE -# undef BCOPY_DOWNWARD_SAFE -#endif -#define BCOPY_UPWARD_SAFE 1 -#define BCOPY_DOWNWARD_SAFE 1 - /* maximum amount of memory moved in a single chunk. Increasing this value improves gap-motion efficiency but decreases QUIT responsiveness time. Was 32000 but today's processors are faster and files are @@ -1683,23 +1671,15 @@ gap_left (struct buffer *buf, Bytind pos) /* Move at most GAP_MOVE_CHUNK chars before checking again for a quit. */ if (i > GAP_MOVE_CHUNK) i = GAP_MOVE_CHUNK; -#ifdef GAP_USE_BCOPY - if (i >= 128 - /* bcopy is safe if the two areas of memory do not overlap - or on systems where bcopy is always safe for moving upward. */ - && (BCOPY_UPWARD_SAFE - || to - from >= 128)) + + if (i >= 128) { - /* If overlap is not safe, avoid it by not moving too many - characters at once. */ - if (!BCOPY_UPWARD_SAFE && i > to - from) - i = to - from; new_s1 -= i; - from -= i, to -= i; + from -= i; + to -= i; memmove (to, from, i); } else -#endif { new_s1 -= i; while (--i >= 0) @@ -1762,23 +1742,15 @@ gap_right (struct buffer *buf, Bytind pos) /* Move at most GAP_MOVE_CHUNK chars before checking again for a quit. */ if (i > GAP_MOVE_CHUNK) i = GAP_MOVE_CHUNK; -#ifdef GAP_USE_BCOPY - if (i >= 128 - /* bcopy is safe if the two areas of memory do not overlap - or on systems where bcopy is always safe for moving downward. */ - && (BCOPY_DOWNWARD_SAFE - || from - to >= 128)) + + if (i >= 128) { - /* If overlap is not safe, avoid it by not moving too many - characters at once. */ - if (!BCOPY_DOWNWARD_SAFE && i > from - to) - i = from - to; new_s1 += i; memmove (to, from, i); - from += i, to += i; + from += i; + to += i; } else -#endif { new_s1 += i; while (--i >= 0)