aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-09-02 04:51:42 +0000
committerKenichi Handa1998-09-02 04:51:42 +0000
commit23017390a5f4677fe1b40350d2dfdd70a25238d7 (patch)
tree6271add74e9bb0d41fef831e5df55171428606a7 /src
parentdff1aa2484bf6b3c7bfb43ebafc9c7f189d75b49 (diff)
downloademacs-23017390a5f4677fe1b40350d2dfdd70a25238d7.tar.gz
emacs-23017390a5f4677fe1b40350d2dfdd70a25238d7.zip
(Ftranspose_regions): Use BYTE_POS_ADDR to get an
address in buffer from byte-position.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 0be7c4a702f..f31c7f66e15 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2985,8 +2985,8 @@ Transposing beyond buffer boundaries is an error.")
2985 /* Don't precompute these addresses. We have to compute them 2985 /* Don't precompute these addresses. We have to compute them
2986 at the last minute, because the relocating allocator might 2986 at the last minute, because the relocating allocator might
2987 have moved the buffer around during the xmalloc. */ 2987 have moved the buffer around during the xmalloc. */
2988 start1_addr = BUF_CHAR_ADDRESS (current_buffer, start1_byte); 2988 start1_addr = BYTE_POS_ADDR (start1_byte);
2989 start2_addr = BUF_CHAR_ADDRESS (current_buffer, start2_byte); 2989 start2_addr = BYTE_POS_ADDR (start2_byte);
2990 2990
2991 bcopy (start2_addr, temp, len2_byte); 2991 bcopy (start2_addr, temp, len2_byte);
2992 bcopy (start1_addr, start1_addr + len2_byte, len1_byte); 2992 bcopy (start1_addr, start1_addr + len2_byte, len1_byte);
@@ -3001,8 +3001,8 @@ Transposing beyond buffer boundaries is an error.")
3001 temp = (unsigned char *) xmalloc (len1_byte); 3001 temp = (unsigned char *) xmalloc (len1_byte);
3002 else 3002 else
3003 temp = (unsigned char *) alloca (len1_byte); 3003 temp = (unsigned char *) alloca (len1_byte);
3004 start1_addr = BUF_CHAR_ADDRESS (current_buffer, start1_byte); 3004 start1_addr = BYTE_POS_ADDR (start1_byte);
3005 start2_addr = BUF_CHAR_ADDRESS (current_buffer, start2_byte); 3005 start2_addr = BYTE_POS_ADDR (start2_byte);
3006 bcopy (start1_addr, temp, len1_byte); 3006 bcopy (start1_addr, temp, len1_byte);
3007 bcopy (start2_addr, start1_addr, len2_byte); 3007 bcopy (start2_addr, start1_addr, len2_byte);
3008 bcopy (temp, start1_addr + len2_byte, len1_byte); 3008 bcopy (temp, start1_addr + len2_byte, len1_byte);
@@ -3041,8 +3041,8 @@ Transposing beyond buffer boundaries is an error.")
3041 temp = (unsigned char *) xmalloc (len1_byte); 3041 temp = (unsigned char *) xmalloc (len1_byte);
3042 else 3042 else
3043 temp = (unsigned char *) alloca (len1_byte); 3043 temp = (unsigned char *) alloca (len1_byte);
3044 start1_addr = BUF_CHAR_ADDRESS (current_buffer, start1_byte); 3044 start1_addr = BYTE_POS_ADDR (start1_byte);
3045 start2_addr = BUF_CHAR_ADDRESS (current_buffer, start2_byte); 3045 start2_addr = BYTE_POS_ADDR (start2_byte);
3046 bcopy (start1_addr, temp, len1_byte); 3046 bcopy (start1_addr, temp, len1_byte);
3047 bcopy (start2_addr, start1_addr, len2_byte); 3047 bcopy (start2_addr, start1_addr, len2_byte);
3048 bcopy (temp, start2_addr, len1_byte); 3048 bcopy (temp, start2_addr, len1_byte);
@@ -3074,8 +3074,8 @@ Transposing beyond buffer boundaries is an error.")
3074 temp = (unsigned char *) xmalloc (len2_byte); 3074 temp = (unsigned char *) xmalloc (len2_byte);
3075 else 3075 else
3076 temp = (unsigned char *) alloca (len2_byte); 3076 temp = (unsigned char *) alloca (len2_byte);
3077 start1_addr = BUF_CHAR_ADDRESS (current_buffer, start1_byte); 3077 start1_addr = BYTE_POS_ADDR (start1_byte);
3078 start2_addr = BUF_CHAR_ADDRESS (current_buffer, start2_byte); 3078 start2_addr = BYTE_POS_ADDR (start2_byte);
3079 bcopy (start2_addr, temp, len2_byte); 3079 bcopy (start2_addr, temp, len2_byte);
3080 bcopy (start1_addr, start1_addr + len_mid + len2_byte, len1_byte); 3080 bcopy (start1_addr, start1_addr + len_mid + len2_byte, len1_byte);
3081 safe_bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid); 3081 safe_bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid);
@@ -3110,8 +3110,8 @@ Transposing beyond buffer boundaries is an error.")
3110 temp = (unsigned char *) xmalloc (len1_byte); 3110 temp = (unsigned char *) xmalloc (len1_byte);
3111 else 3111 else
3112 temp = (unsigned char *) alloca (len1_byte); 3112 temp = (unsigned char *) alloca (len1_byte);
3113 start1_addr = BUF_CHAR_ADDRESS (current_buffer, start1_byte); 3113 start1_addr = BYTE_POS_ADDR (start1_byte);
3114 start2_addr = BUF_CHAR_ADDRESS (current_buffer, start2_byte); 3114 start2_addr = BYTE_POS_ADDR (start2_byte);
3115 bcopy (start1_addr, temp, len1_byte); 3115 bcopy (start1_addr, temp, len1_byte);
3116 bcopy (start2_addr, start1_addr, len2_byte); 3116 bcopy (start2_addr, start1_addr, len2_byte);
3117 bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid); 3117 bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid);