Mercurial > emacs
comparison src/dispnew.c @ 31932:081edde76197
(adjust_glyph_matrix, enable_glyph_matrix_rows):
Add assertions.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 27 Sep 2000 11:43:51 +0000 |
parents | 799ee0223550 |
children | 20788c8274cd |
comparison
equal
deleted
inserted
replaced
31931:85c245edb7d7 | 31932:081edde76197 |
---|---|
665 matrix->right_margin_glyphs = right; | 665 matrix->right_margin_glyphs = right; |
666 } | 666 } |
667 | 667 |
668 /* Number of rows to be used by MATRIX. */ | 668 /* Number of rows to be used by MATRIX. */ |
669 matrix->nrows = dim.height; | 669 matrix->nrows = dim.height; |
670 xassert (matrix->nrows >= 0); | |
670 | 671 |
671 /* Mark rows in a current matrix of a window as not having valid | 672 /* Mark rows in a current matrix of a window as not having valid |
672 contents. It's important to not do this for desired matrices. | 673 contents. It's important to not do this for desired matrices. |
673 When Emacs starts, it may already be building desired matrices | 674 When Emacs starts, it may already be building desired matrices |
674 when this function runs. */ | 675 when this function runs. */ |
807 enable_glyph_matrix_rows (matrix, start, end, enabled_p) | 808 enable_glyph_matrix_rows (matrix, start, end, enabled_p) |
808 struct glyph_matrix *matrix; | 809 struct glyph_matrix *matrix; |
809 int start, end; | 810 int start, end; |
810 int enabled_p; | 811 int enabled_p; |
811 { | 812 { |
813 xassert (start <= end); | |
814 xassert (start >= 0 && start < matrix->nrows); | |
815 xassert (end >= 0 && end <= matrix->nrows); | |
816 | |
812 for (; start < end; ++start) | 817 for (; start < end; ++start) |
813 matrix->rows[start].enabled_p = enabled_p != 0; | 818 matrix->rows[start].enabled_p = enabled_p != 0; |
814 } | 819 } |
815 | 820 |
816 | 821 |