int b, e;
if (NILP (end))
- e = XSTRING (string)->size;
+ e = SCHARS (string);
else
{
CHECK_NUMBER (end);
}
/* Make a pointer for decrementing through the chars before point. */
- ptr = XSTRING (string)->data + e;
+ ptr = SDATA (string) + e;
/* Make a pointer to where consecutive chars leave off,
going backwards from point. */
- stop = XSTRING (string)->data + b;
+ stop = SDATA (string) + b;
if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
SET_TEXT_POS (pt, PT, PT_BYTE);
start_display (&it, w, pt);
- /* Move to the start of the line containing PT. If we don't do
- this, we start moving with IT->current_x == 0, while PT is really
- at some x > 0. The effect is, in continuation lines, that we end
- up with the iterator placed at where it thinks X is 0, while the
- end position is really at some X > 0, the same X that PT had. */
+ /* Move to the start of the display line containing PT. If we don't
+ do this, we start moving with IT->current_x == 0, while PT is
+ really at some x > 0. The effect is, in continuation lines, that
+ we end up with the iterator placed at where it thinks X is 0,
+ while the end position is really at some X > 0, the same X that
+ PT had. */
move_it_by_lines (&it, 0, 0);
if (XINT (lines) != 0)