comparison src/dispnew.c @ 28708:4e2497e6757e

(increment_matrix_positions): Renamed from increment_glyph_matrix_buffer_positions. (increment_row_positions): Renamed from increment_glyph_row_buffer_positions.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 25 Apr 2000 19:39:59 +0000
parents f05d48759416
children 5ccfe8a1638f
comparison
equal deleted inserted replaced
28707:ed910be216eb 28708:4e2497e6757e
779 /* Increment buffer positions in glyph rows of MATRIX. Do it for rows 779 /* Increment buffer positions in glyph rows of MATRIX. Do it for rows
780 with indices START <= index < END. Increment positions by DELTA/ 780 with indices START <= index < END. Increment positions by DELTA/
781 DELTA_BYTES. */ 781 DELTA_BYTES. */
782 782
783 void 783 void
784 increment_glyph_matrix_buffer_positions (matrix, start, end, delta, 784 increment_matrix_positions (matrix, start, end, delta, delta_bytes)
785 delta_bytes)
786 struct glyph_matrix *matrix; 785 struct glyph_matrix *matrix;
787 int start, end, delta, delta_bytes; 786 int start, end, delta, delta_bytes;
788 { 787 {
789 /* Check that START and END are reasonable values. */ 788 /* Check that START and END are reasonable values. */
790 xassert (start >= 0 && start <= matrix->nrows); 789 xassert (start >= 0 && start <= matrix->nrows);
791 xassert (end >= 0 && end <= matrix->nrows); 790 xassert (end >= 0 && end <= matrix->nrows);
792 xassert (start <= end); 791 xassert (start <= end);
793 792
794 for (; start < end; ++start) 793 for (; start < end; ++start)
795 increment_glyph_row_buffer_positions (matrix->rows + start, 794 increment_row_positions (matrix->rows + start, delta, delta_bytes);
796 delta, delta_bytes);
797 } 795 }
798 796
799 797
800 /* Enable a range of rows in glyph matrix MATRIX. START and END are 798 /* Enable a range of rows in glyph matrix MATRIX. START and END are
801 the row indices of the first and last + 1 row to enable. If 799 the row indices of the first and last + 1 row to enable. If
1028 glyph of the text area of a row can have a buffer position even if 1026 glyph of the text area of a row can have a buffer position even if
1029 the used count of the text area is zero. Such rows display line 1027 the used count of the text area is zero. Such rows display line
1030 ends. */ 1028 ends. */
1031 1029
1032 void 1030 void
1033 increment_glyph_row_buffer_positions (row, delta, delta_bytes) 1031 increment_row_positions (row, delta, delta_bytes)
1034 struct glyph_row *row; 1032 struct glyph_row *row;
1035 int delta, delta_bytes; 1033 int delta, delta_bytes;
1036 { 1034 {
1037 int area, i; 1035 int area, i;
1038 1036
1152 if (from->used[area]) 1150 if (from->used[area])
1153 bcopy (from->glyphs[area], to->glyphs[area], 1151 bcopy (from->glyphs[area], to->glyphs[area],
1154 from->used[area] * sizeof (struct glyph)); 1152 from->used[area] * sizeof (struct glyph));
1155 1153
1156 /* Increment buffer positions in TO by DELTA. */ 1154 /* Increment buffer positions in TO by DELTA. */
1157 increment_glyph_row_buffer_positions (to, delta, delta_bytes); 1155 increment_row_positions (to, delta, delta_bytes);
1158 } 1156 }
1159 1157
1160 1158
1161 /* Assign glyph row FROM to glyph row TO. This works like a structure 1159 /* Assign glyph row FROM to glyph row TO. This works like a structure
1162 assignment TO = FROM, except that glyph pointers are not copied but 1160 assignment TO = FROM, except that glyph pointers are not copied but
3276 MATRIX_ROW_END_CHARPOS (glyph_row) += delta; 3274 MATRIX_ROW_END_CHARPOS (glyph_row) += delta;
3277 MATRIX_ROW_END_BYTEPOS (glyph_row) += delta_bytes; 3275 MATRIX_ROW_END_BYTEPOS (glyph_row) += delta_bytes;
3278 } 3276 }
3279 3277
3280 /* Adjust positions in lines following the one we are in. */ 3278 /* Adjust positions in lines following the one we are in. */
3281 increment_glyph_matrix_buffer_positions (w->current_matrix, 3279 increment_matrix_positions (w->current_matrix,
3282 w->cursor.vpos + 1, 3280 w->cursor.vpos + 1,
3283 w->current_matrix->nrows, 3281 w->current_matrix->nrows,
3284 delta, delta_bytes); 3282 delta, delta_bytes);
3285 3283
3286 glyph_row->contains_overlapping_glyphs_p 3284 glyph_row->contains_overlapping_glyphs_p
3287 |= it.glyph_row->contains_overlapping_glyphs_p; 3285 |= it.glyph_row->contains_overlapping_glyphs_p;
3288 3286
3289 glyph_row->displays_text_p = 1; 3287 glyph_row->displays_text_p = 1;