diff options
| author | Joseph Arceneaux | 1992-10-14 21:30:21 +0000 |
|---|---|---|
| committer | Joseph Arceneaux | 1992-10-14 21:30:21 +0000 |
| commit | 448fd7c056bc4b1a272174a3485e80f960800724 (patch) | |
| tree | 75d100ee56aae921592598f71e7fcda8335c7c36 /src | |
| parent | 6d1df4b2a426e6b846b44aa200c5d7deecc6219e (diff) | |
| download | emacs-448fd7c056bc4b1a272174a3485e80f960800724.tar.gz emacs-448fd7c056bc4b1a272174a3485e80f960800724.zip | |
* 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'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index e3ce700d83d..594592f589c 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1,5 +1,6 @@ | |||
| 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 | ||
| @@ -231,13 +232,11 @@ make_frame_glyphs (frame, empty) | |||
| 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 | ||
| @@ -280,12 +279,11 @@ free_frame_glyphs (frame, glyphs) | |||
| 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 | ||
| @@ -630,14 +628,6 @@ scroll_frame_lines (frame, from, end, amount) | |||
| 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]); |
| @@ -653,6 +643,10 @@ scroll_frame_lines (frame, from, end, amount) | |||
| 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 | ||
| @@ -702,14 +696,6 @@ scroll_frame_lines (frame, from, end, amount) | |||
| 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]); |
| @@ -725,6 +711,10 @@ scroll_frame_lines (frame, from, end, amount) | |||
| 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 | ||
| @@ -995,7 +985,7 @@ update_frame (f, force, inhibit_hairy_id) | |||
| 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 | } |
| @@ -1046,7 +1036,7 @@ update_frame (f, force, inhibit_hairy_id) | |||
| 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; |