Mercurial > emacs
comparison src/dispnew.c @ 1407:0f214040f708
* dispnew.c (scroll_frame_lines): All references to frame elements
`nruns' and 'face_list' removed. Handle new element `max_ascent'.
(free_frame_glyphs): Don't free nonexistent elements `nruns' and
`face_list'; do free `max_ascent' element.
(make_frame_glyphs): Don't allocate nonexistent elements `nruns'
and `face_list'; do allocate `max_ascent' element.
(update_frame): Replaced use of macro LINE_HEIGHT with element
frame element `pix_height'.
author | Joseph Arceneaux <jla@gnu.org> |
---|---|
date | Wed, 14 Oct 1992 21:30:21 +0000 |
parents | 5c380ec3cfc6 |
children | f17665e7347e |
comparison
equal
deleted
inserted
replaced
1406:62dae4a3c7fb | 1407:0f214040f708 |
---|---|
1 /* Updating of data structures for redisplay. | 1 /* Updating of data structures for redisplay. |
2 Copyright (C) 1985, 1986, 1987, 1988, 1990, 1992 Free Software Foundation, Inc. | 2 Copyright (C) 1985, 1986, 1987, 1988, 1990, |
3 1992 Free Software Foundation, Inc. | |
3 | 4 |
4 This file is part of GNU Emacs. | 5 This file is part of GNU Emacs. |
5 | 6 |
6 GNU Emacs is free software; you can redistribute it and/or modify | 7 GNU Emacs is free software; you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
229 new->bufp = (int *) xmalloc (height * sizeof (int)); | 230 new->bufp = (int *) xmalloc (height * sizeof (int)); |
230 | 231 |
231 #ifdef HAVE_X_WINDOWS | 232 #ifdef HAVE_X_WINDOWS |
232 if (FRAME_X_P (frame)) | 233 if (FRAME_X_P (frame)) |
233 { | 234 { |
234 new->nruns = (int *) xmalloc (height * sizeof (int)); | |
235 new->face_list | |
236 = (struct run **) xmalloc (height * sizeof (struct run *)); | |
237 new->top_left_x = (short *) xmalloc (height * sizeof (short)); | 235 new->top_left_x = (short *) xmalloc (height * sizeof (short)); |
238 new->top_left_y = (short *) xmalloc (height * sizeof (short)); | 236 new->top_left_y = (short *) xmalloc (height * sizeof (short)); |
239 new->pix_width = (short *) xmalloc (height * sizeof (short)); | 237 new->pix_width = (short *) xmalloc (height * sizeof (short)); |
240 new->pix_height = (short *) xmalloc (height * sizeof (short)); | 238 new->pix_height = (short *) xmalloc (height * sizeof (short)); |
239 new->max_ascent = (short *) xmalloc (height * sizeof (short)); | |
241 } | 240 } |
242 #endif | 241 #endif |
243 | 242 |
244 if (empty) | 243 if (empty) |
245 { | 244 { |
278 free (glyphs->bufp); | 277 free (glyphs->bufp); |
279 | 278 |
280 #ifdef HAVE_X_WINDOWS | 279 #ifdef HAVE_X_WINDOWS |
281 if (FRAME_X_P (frame)) | 280 if (FRAME_X_P (frame)) |
282 { | 281 { |
283 free (glyphs->nruns); | |
284 free (glyphs->face_list); | |
285 free (glyphs->top_left_x); | 282 free (glyphs->top_left_x); |
286 free (glyphs->top_left_y); | 283 free (glyphs->top_left_y); |
287 free (glyphs->pix_width); | 284 free (glyphs->pix_width); |
288 free (glyphs->pix_height); | 285 free (glyphs->pix_height); |
286 free (glyphs->max_ascent); | |
289 } | 287 } |
290 #endif | 288 #endif |
291 | 289 |
292 free (glyphs); | 290 free (glyphs); |
293 } | 291 } |
628 (end - from) * sizeof current_frame->bufp[0]); | 626 (end - from) * sizeof current_frame->bufp[0]); |
629 | 627 |
630 #ifdef HAVE_X_WINDOWS | 628 #ifdef HAVE_X_WINDOWS |
631 if (FRAME_X_P (frame)) | 629 if (FRAME_X_P (frame)) |
632 { | 630 { |
633 safe_bcopy (current_frame->nruns + from, | |
634 current_frame->nruns + from + amount, | |
635 (end - from) * sizeof current_frame->nruns[0]); | |
636 | |
637 safe_bcopy (current_frame->face_list + from, | |
638 current_frame->face_list + from + amount, | |
639 (end - from) * sizeof current_frame->face_list[0]); | |
640 | |
641 safe_bcopy (current_frame->top_left_x + from, | 631 safe_bcopy (current_frame->top_left_x + from, |
642 current_frame->top_left_x + from + amount, | 632 current_frame->top_left_x + from + amount, |
643 (end - from) * sizeof current_frame->top_left_x[0]); | 633 (end - from) * sizeof current_frame->top_left_x[0]); |
644 | 634 |
645 safe_bcopy (current_frame->top_left_y + from, | 635 safe_bcopy (current_frame->top_left_y + from, |
651 (end - from) * sizeof current_frame->pix_width[0]); | 641 (end - from) * sizeof current_frame->pix_width[0]); |
652 | 642 |
653 safe_bcopy (current_frame->pix_height + from, | 643 safe_bcopy (current_frame->pix_height + from, |
654 current_frame->pix_height + from + amount, | 644 current_frame->pix_height + from + amount, |
655 (end - from) * sizeof current_frame->pix_height[0]); | 645 (end - from) * sizeof current_frame->pix_height[0]); |
646 | |
647 safe_bcopy (current_frame->max_ascent + from, | |
648 current_frame->max_ascent + from + amount, | |
649 (end - from) * sizeof current_frame->max_ascent[0]); | |
656 } | 650 } |
657 #endif /* HAVE_X_WINDOWS */ | 651 #endif /* HAVE_X_WINDOWS */ |
658 | 652 |
659 update_end (frame); | 653 update_end (frame); |
660 } | 654 } |
700 (end - from) * sizeof current_frame->bufp[0]); | 694 (end - from) * sizeof current_frame->bufp[0]); |
701 | 695 |
702 #ifdef HAVE_X_WINDOWS | 696 #ifdef HAVE_X_WINDOWS |
703 if (FRAME_X_P (frame)) | 697 if (FRAME_X_P (frame)) |
704 { | 698 { |
705 safe_bcopy (current_frame->nruns + from, | |
706 current_frame->nruns + from + amount, | |
707 (end - from) * sizeof current_frame->nruns[0]); | |
708 | |
709 safe_bcopy (current_frame->face_list + from, | |
710 current_frame->face_list + from + amount, | |
711 (end - from) * sizeof current_frame->face_list[0]); | |
712 | |
713 safe_bcopy (current_frame->top_left_x + from, | 699 safe_bcopy (current_frame->top_left_x + from, |
714 current_frame->top_left_x + from + amount, | 700 current_frame->top_left_x + from + amount, |
715 (end - from) * sizeof current_frame->top_left_x[0]); | 701 (end - from) * sizeof current_frame->top_left_x[0]); |
716 | 702 |
717 safe_bcopy (current_frame->top_left_y + from, | 703 safe_bcopy (current_frame->top_left_y + from, |
723 (end - from) * sizeof current_frame->pix_width[0]); | 709 (end - from) * sizeof current_frame->pix_width[0]); |
724 | 710 |
725 safe_bcopy (current_frame->pix_height + from, | 711 safe_bcopy (current_frame->pix_height + from, |
726 current_frame->pix_height + from + amount, | 712 current_frame->pix_height + from + amount, |
727 (end - from) * sizeof current_frame->pix_height[0]); | 713 (end - from) * sizeof current_frame->pix_height[0]); |
714 | |
715 safe_bcopy (current_frame->max_ascent + from, | |
716 current_frame->max_ascent + from + amount, | |
717 (end - from) * sizeof current_frame->max_ascent[0]); | |
728 } | 718 } |
729 #endif /* HAVE_X_WINDOWS */ | 719 #endif /* HAVE_X_WINDOWS */ |
730 | 720 |
731 update_end (frame); | 721 update_end (frame); |
732 } | 722 } |
993 if (desired_frame->enable[0]) | 983 if (desired_frame->enable[0]) |
994 { | 984 { |
995 current_frame->top_left_x[FRAME_HEIGHT (f) - 1] = leftmost; | 985 current_frame->top_left_x[FRAME_HEIGHT (f) - 1] = leftmost; |
996 current_frame->top_left_y[FRAME_HEIGHT (f) - 1] | 986 current_frame->top_left_y[FRAME_HEIGHT (f) - 1] |
997 = PIXEL_HEIGHT (f) - f->display.x->internal_border_width | 987 = PIXEL_HEIGHT (f) - f->display.x->internal_border_width |
998 - LINE_HEIGHT(f, FRAME_HEIGHT (f) - 1); | 988 - current_frame->pix_height[FRAME_HEIGHT (f) - 1]; |
999 current_frame->top_left_x[0] = leftmost; | 989 current_frame->top_left_x[0] = leftmost; |
1000 current_frame->top_left_y[0] = downto; | 990 current_frame->top_left_y[0] = downto; |
1001 } | 991 } |
1002 } | 992 } |
1003 #endif /* HAVE_X_WINDOWS */ | 993 #endif /* HAVE_X_WINDOWS */ |
1044 #endif /* HAVE_X_WINDOWS */ | 1034 #endif /* HAVE_X_WINDOWS */ |
1045 } | 1035 } |
1046 | 1036 |
1047 #ifdef HAVE_X_WINDOWS | 1037 #ifdef HAVE_X_WINDOWS |
1048 if (FRAME_X_P (f)) | 1038 if (FRAME_X_P (f)) |
1049 downto += LINE_HEIGHT(f, i); | 1039 downto += current_frame->pix_height[i]; |
1050 #endif | 1040 #endif |
1051 } | 1041 } |
1052 pause = (i < FRAME_HEIGHT (f) - 1) ? i : 0; | 1042 pause = (i < FRAME_HEIGHT (f) - 1) ? i : 0; |
1053 | 1043 |
1054 /* Now just clean up termcap drivers and set cursor, etc. */ | 1044 /* Now just clean up termcap drivers and set cursor, etc. */ |