comparison src/redisplay.c @ 4418:9bcdf9a3a783

Use Dynarr_increment instead of Dynarr_add when building a line in place. 2008-02-03 Jerry James <james@xemacs.org> * redisplay.c (generate_displayable_area): If a line has been generated in place in the dynarray, use Dynarr_increment instead of Dynarr_add. * redisplay.c (regenerate_window): Ditto.
author Jerry James <james@xemacs.org>
date Mon, 04 Feb 2008 21:41:27 -0700
parents 62d532188a28
children e34711681f30
comparison
equal deleted inserted replaced
4417:0cee1ff42db4 4418:9bcdf9a3a783
5393 } 5393 }
5394 } 5394 }
5395 else 5395 else
5396 dlp->clip = 0; 5396 dlp->clip = 0;
5397 5397
5398 assert (pos_of_dlp < 0 || pos_of_dlp == Dynarr_length (dla)); 5398 if (pos_of_dlp < 0)
5399 Dynarr_add (dla, *dlp); 5399 Dynarr_add (dla, *dlp);
5400 else if (pos_of_dlp == Dynarr_length (dla))
5401 Dynarr_increment (dla);
5402 else
5403 ABORT ();
5400 5404
5401 /* #### This type of check needs to be done down in the 5405 /* #### This type of check needs to be done down in the
5402 generate_display_line call. */ 5406 generate_display_line call. */
5403 if (start_pos >= s_zv) 5407 if (start_pos >= s_zv)
5404 break; 5408 break;
5600 } 5604 }
5601 5605
5602 if (dlp->num_chars > w->max_line_len) 5606 if (dlp->num_chars > w->max_line_len)
5603 w->max_line_len = dlp->num_chars; 5607 w->max_line_len = dlp->num_chars;
5604 5608
5605 assert (pos_of_dlp < 0 || pos_of_dlp == Dynarr_length (dla)); 5609 if (pos_of_dlp < 0)
5606 Dynarr_add (dla, *dlp); 5610 Dynarr_add (dla, *dlp);
5611 else if (pos_of_dlp == Dynarr_length (dla))
5612 Dynarr_increment (dla);
5613 else
5614 ABORT ();
5607 5615
5608 /* #### This isn't right, but it is close enough for now. */ 5616 /* #### This isn't right, but it is close enough for now. */
5609 w->window_end_pos[type] = start_pos; 5617 w->window_end_pos[type] = start_pos;
5610 5618
5611 /* #### This type of check needs to be done down in the 5619 /* #### This type of check needs to be done down in the