Mercurial > emacs
comparison src/insdel.c @ 21244:50929073a0ba
Use STRING_BYTES and SET_STRING_BYTES.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 Mar 1998 07:06:14 +0000 |
parents | 81154898ac20 |
children | 6c16216d0e69 |
comparison
equal
deleted
inserted
replaced
21243:e82a4a4fa12a | 21244:50929073a0ba |
---|---|
1187 offset_intervals (current_buffer, PT, nchars); | 1187 offset_intervals (current_buffer, PT, nchars); |
1188 | 1188 |
1189 intervals = XSTRING (string)->intervals; | 1189 intervals = XSTRING (string)->intervals; |
1190 /* Get the intervals for the part of the string we are inserting-- | 1190 /* Get the intervals for the part of the string we are inserting-- |
1191 not including the combined-before bytes. */ | 1191 not including the combined-before bytes. */ |
1192 if (nbytes < XSTRING (string)->size_byte) | 1192 if (nbytes < STRING_BYTES (XSTRING (string))) |
1193 intervals = copy_intervals (intervals, pos, nchars); | 1193 intervals = copy_intervals (intervals, pos, nchars); |
1194 | 1194 |
1195 /* Insert those intervals. */ | 1195 /* Insert those intervals. */ |
1196 graft_intervals_into_buffer (intervals, PT, nchars, | 1196 graft_intervals_into_buffer (intervals, PT, nchars, |
1197 current_buffer, inherit); | 1197 current_buffer, inherit); |
1495 replace_range (from, to, new, prepare, inherit, nomarkers) | 1495 replace_range (from, to, new, prepare, inherit, nomarkers) |
1496 Lisp_Object new; | 1496 Lisp_Object new; |
1497 int from, to, prepare, inherit, nomarkers; | 1497 int from, to, prepare, inherit, nomarkers; |
1498 { | 1498 { |
1499 int inschars = XSTRING (new)->size; | 1499 int inschars = XSTRING (new)->size; |
1500 int insbytes = XSTRING (new)->size_byte; | 1500 int insbytes = STRING_BYTES (XSTRING (new)); |
1501 int from_byte, to_byte; | 1501 int from_byte, to_byte; |
1502 int nbytes_del, nchars_del; | 1502 int nbytes_del, nchars_del; |
1503 register Lisp_Object temp; | 1503 register Lisp_Object temp; |
1504 struct gcpro gcpro1; | 1504 struct gcpro gcpro1; |
1505 int combined_before_bytes, combined_after_bytes; | 1505 int combined_before_bytes, combined_after_bytes; |