aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Janík2002-01-19 13:54:57 +0000
committerPavel Janík2002-01-19 13:54:57 +0000
commit153a073cc633c19e9de3d2f81b975d4131394262 (patch)
tree78aad456fa30dd9e3ed0cf11864dcedf3bf38d9c /src
parent815d969e79b58a7afd0ae78fe1ecc28b49129d6b (diff)
downloademacs-153a073cc633c19e9de3d2f81b975d4131394262.tar.gz
emacs-153a073cc633c19e9de3d2f81b975d4131394262.zip
(update_frame): Move the variable `tem' to the block where it is used.
Fix typos in comments.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c59
1 files changed, 28 insertions, 31 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index c5ce42ef381..84cab92eaf5 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -238,7 +238,7 @@ Lisp_Object Vglyph_table;
238Lisp_Object Vstandard_display_table; 238Lisp_Object Vstandard_display_table;
239 239
240/* Nonzero means reading single-character input with prompt so put 240/* Nonzero means reading single-character input with prompt so put
241 cursor on mini-buffer after the prompt. positive means at end of 241 cursor on mini-buffer after the prompt. Positive means at end of
242 text in echo area; negative means at beginning of line. */ 242 text in echo area; negative means at beginning of line. */
243 243
244int cursor_in_echo_area; 244int cursor_in_echo_area;
@@ -358,7 +358,7 @@ static void add_window_display_history P_ ((struct window *, char *, int));
358 358
359/* Add to the redisplay history how window W has been displayed. 359/* Add to the redisplay history how window W has been displayed.
360 MSG is a trace containing the information how W's glyph matrix 360 MSG is a trace containing the information how W's glyph matrix
361 has been contructed. PAUSED_P non-zero means that the update 361 has been constructed. PAUSED_P non-zero means that the update
362 has been interrupted for pending input. */ 362 has been interrupted for pending input. */
363 363
364static void 364static void
@@ -624,7 +624,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
624 int left = -1, right = -1; 624 int left = -1, right = -1;
625 int window_x, window_y, window_width = -1, window_height; 625 int window_x, window_y, window_width = -1, window_height;
626 626
627 /* See if W had a top line that has disappeared now, or vice versa. */ 627 /* See if W had a header line that has disappeared now, or vice versa. */
628 if (w) 628 if (w)
629 { 629 {
630 header_line_p = WINDOW_WANTS_HEADER_LINE_P (w); 630 header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
@@ -1124,7 +1124,7 @@ clear_glyph_row (row)
1124 Redisplay outputs such glyphs, and flickering effects were 1124 Redisplay outputs such glyphs, and flickering effects were
1125 the result. This also depended on the contents of memory 1125 the result. This also depended on the contents of memory
1126 returned by xmalloc. If flickering happens again, activate 1126 returned by xmalloc. If flickering happens again, activate
1127 the code below If the flickering is gone with that, chances 1127 the code below. If the flickering is gone with that, chances
1128 are that the flickering has the same reason as here. */ 1128 are that the flickering has the same reason as here. */
1129 bzero (p[0], (char *) p[LAST_AREA] - (char *) p[0]); 1129 bzero (p[0], (char *) p[LAST_AREA] - (char *) p[0]);
1130#endif 1130#endif
@@ -1407,7 +1407,7 @@ line_hash_code (row)
1407} 1407}
1408 1408
1409 1409
1410/* Return the cost of drawing line VPOS In MATRIX. The cost equals 1410/* Return the cost of drawing line VPOS in MATRIX. The cost equals
1411 the number of characters in the line. If must_write_spaces is 1411 the number of characters in the line. If must_write_spaces is
1412 zero, leading and trailing spaces are ignored. */ 1412 zero, leading and trailing spaces are ignored. */
1413 1413
@@ -1571,7 +1571,7 @@ free_glyph_pool (pool)
1571{ 1571{
1572 if (pool) 1572 if (pool)
1573 { 1573 {
1574 /* More freed than allocated? */ 1574 /* More freed than allocated? */
1575 --glyph_pool_count; 1575 --glyph_pool_count;
1576 xassert (glyph_pool_count >= 0); 1576 xassert (glyph_pool_count >= 0);
1577 1577
@@ -1619,7 +1619,7 @@ realloc_glyph_pool (pool, matrix_dim)
1619 pool->nglyphs = needed; 1619 pool->nglyphs = needed;
1620 } 1620 }
1621 1621
1622 /* Remember the number of rows and columns because (a) we use then 1622 /* Remember the number of rows and columns because (a) we use them
1623 to do sanity checks, and (b) the number of columns determines 1623 to do sanity checks, and (b) the number of columns determines
1624 where rows in the frame matrix start---this must be available to 1624 where rows in the frame matrix start---this must be available to
1625 determine pointers to rows of window sub-matrices. */ 1625 determine pointers to rows of window sub-matrices. */
@@ -1782,7 +1782,7 @@ check_matrix_invariants (w)
1782 1782
1783 CHANGED_LEAF_MATRIX set if the dimension or location of a matrix of 1783 CHANGED_LEAF_MATRIX set if the dimension or location of a matrix of
1784 any window in the tree will be changed or have been changed (see 1784 any window in the tree will be changed or have been changed (see
1785 DIM_ONLY_P). 1785 DIM_ONLY_P)
1786 1786
1787 *WINDOW_CHANGE_FLAGS must be initialized by the caller of this 1787 *WINDOW_CHANGE_FLAGS must be initialized by the caller of this
1788 function. 1788 function.
@@ -1874,7 +1874,7 @@ allocate_matrices_for_frame_redisplay (window, x, y, dim_only_p,
1874 w = XWINDOW (window); 1874 w = XWINDOW (window);
1875 1875
1876 /* Get the dimension of the window sub-matrix for W, depending 1876 /* Get the dimension of the window sub-matrix for W, depending
1877 on whether this a combination or a leaf window. */ 1877 on whether this is a combination or a leaf window. */
1878 if (!NILP (w->hchild)) 1878 if (!NILP (w->hchild))
1879 dim = allocate_matrices_for_frame_redisplay (w->hchild, x, y, 1879 dim = allocate_matrices_for_frame_redisplay (w->hchild, x, y,
1880 dim_only_p, 1880 dim_only_p,
@@ -1979,7 +1979,7 @@ required_matrix_height (w)
1979 /* One partially visible line at the top and 1979 /* One partially visible line at the top and
1980 bottom of the window. */ 1980 bottom of the window. */
1981 + 2 1981 + 2
1982 /* 2 for top and mode line. */ 1982 /* 2 for header and mode line. */
1983 + 2); 1983 + 2);
1984 } 1984 }
1985#endif /* HAVE_WINDOW_SYSTEM */ 1985#endif /* HAVE_WINDOW_SYSTEM */
@@ -2188,7 +2188,7 @@ fake_current_matrices (window)
2188 2188
2189 2189
2190/* Save away the contents of frame F's current frame matrix. Value is 2190/* Save away the contents of frame F's current frame matrix. Value is
2191 a glyph matrix holding the contents of F's current frame matrix. '*/ 2191 a glyph matrix holding the contents of F's current frame matrix. */
2192 2192
2193static struct glyph_matrix * 2193static struct glyph_matrix *
2194save_current_matrix (f) 2194save_current_matrix (f)
@@ -2997,7 +2997,7 @@ mirrored_line_dance (matrix, unchanged_at_top, nlines, copy_from,
2997 new_rows[i].enabled_p = 0; 2997 new_rows[i].enabled_p = 0;
2998 } 2998 }
2999 2999
3000 /* Do the same for window matrices, if MATRIX Is a frame matrix. */ 3000 /* Do the same for window matrices, if MATRIX is a frame matrix. */
3001 if (frame_matrix_frame) 3001 if (frame_matrix_frame)
3002 mirror_line_dance (XWINDOW (frame_matrix_frame->root_window), 3002 mirror_line_dance (XWINDOW (frame_matrix_frame->root_window),
3003 unchanged_at_top, nlines, copy_from, retained_p); 3003 unchanged_at_top, nlines, copy_from, retained_p);
@@ -3271,7 +3271,7 @@ window_to_frame_vpos (w, vpos)
3271 3271
3272 3272
3273/* Translate horizontal position HPOS which is relative to window W to 3273/* Translate horizontal position HPOS which is relative to window W to
3274 a vertical position relative to W's frame. */ 3274 a horizontal position relative to W's frame. */
3275 3275
3276static int 3276static int
3277window_to_frame_hpos (w, hpos) 3277window_to_frame_hpos (w, hpos)
@@ -3397,7 +3397,7 @@ direct_output_for_insert (g)
3397 struct glyph_row *glyph_row; 3397 struct glyph_row *glyph_row;
3398 struct glyph *glyphs, *glyph, *end; 3398 struct glyph *glyphs, *glyph, *end;
3399 int n; 3399 int n;
3400 /* Non-null means that Redisplay of W is based on window matrices. */ 3400 /* Non-null means that redisplay of W is based on window matrices. */
3401 int window_redisplay_p = FRAME_WINDOW_P (f); 3401 int window_redisplay_p = FRAME_WINDOW_P (f);
3402 /* Non-null means we are in overwrite mode. */ 3402 /* Non-null means we are in overwrite mode. */
3403 int overwrite_p = !NILP (current_buffer->overwrite_mode); 3403 int overwrite_p = !NILP (current_buffer->overwrite_mode);
@@ -3799,12 +3799,13 @@ update_frame (f, force_p, inhibit_hairy_id_p)
3799 /* Update the tool-bar window, if present. */ 3799 /* Update the tool-bar window, if present. */
3800 if (WINDOWP (f->tool_bar_window)) 3800 if (WINDOWP (f->tool_bar_window))
3801 { 3801 {
3802 Lisp_Object tem;
3803 struct window *w = XWINDOW (f->tool_bar_window); 3802 struct window *w = XWINDOW (f->tool_bar_window);
3804 3803
3805 /* Update tool-bar window. */ 3804 /* Update tool-bar window. */
3806 if (w->must_be_updated_p) 3805 if (w->must_be_updated_p)
3807 { 3806 {
3807 Lisp_Object tem;
3808
3808 update_window (w, 1); 3809 update_window (w, 1);
3809 w->must_be_updated_p = 0; 3810 w->must_be_updated_p = 0;
3810 3811
@@ -3996,7 +3997,7 @@ redraw_overlapping_rows (w, yb)
3996 if (row->used[RIGHT_MARGIN_AREA]) 3997 if (row->used[RIGHT_MARGIN_AREA])
3997 rif->fix_overlapping_area (w, row, RIGHT_MARGIN_AREA); 3998 rif->fix_overlapping_area (w, row, RIGHT_MARGIN_AREA);
3998 3999
3999 /* Record in neighbor rows that ROW overwrites part of their 4000 /* Record in neighbour rows that ROW overwrites part of their
4000 display. */ 4001 display. */
4001 if (row->phys_ascent > row->ascent && i > 0) 4002 if (row->phys_ascent > row->ascent && i > 0)
4002 MATRIX_ROW (w->current_matrix, i - 1)->overlapped_p = 1; 4003 MATRIX_ROW (w->current_matrix, i - 1)->overlapped_p = 1;
@@ -4077,8 +4078,8 @@ update_window (w, force_p)
4077 rif->update_window_begin_hook (w); 4078 rif->update_window_begin_hook (w);
4078 yb = window_text_bottom_y (w); 4079 yb = window_text_bottom_y (w);
4079 4080
4080 /* If window has a top line, update it before everything else. 4081 /* If window has a header line, update it before everything else.
4081 Adjust y-positions of other rows by the top line height. */ 4082 Adjust y-positions of other rows by the header line height. */
4082 row = desired_matrix->rows; 4083 row = desired_matrix->rows;
4083 end = row + desired_matrix->nrows - 1; 4084 end = row + desired_matrix->nrows - 1;
4084 4085
@@ -4123,7 +4124,7 @@ update_window (w, force_p)
4123 changed_p = 1; 4124 changed_p = 1;
4124 } 4125 }
4125 4126
4126 /* Update the top mode line after scrolling because a new top 4127 /* Update the header line after scrolling because a new header
4127 line would otherwise overwrite lines at the top of the window 4128 line would otherwise overwrite lines at the top of the window
4128 that can be scrolled. */ 4129 that can be scrolled. */
4129 if (header_line_row && header_line_row->enabled_p) 4130 if (header_line_row && header_line_row->enabled_p)
@@ -4140,7 +4141,7 @@ update_window (w, force_p)
4140 int vpos = MATRIX_ROW_VPOS (row, desired_matrix); 4141 int vpos = MATRIX_ROW_VPOS (row, desired_matrix);
4141 int i; 4142 int i;
4142 4143
4143 /* We'll Have to play a little bit with when to 4144 /* We'll have to play a little bit with when to
4144 detect_input_pending. If it's done too often, 4145 detect_input_pending. If it's done too often,
4145 scrolling large windows with repeated scroll-up 4146 scrolling large windows with repeated scroll-up
4146 commands will too quickly pause redisplay. */ 4147 commands will too quickly pause redisplay. */
@@ -4169,7 +4170,7 @@ update_window (w, force_p)
4169 4170
4170 set_cursor: 4171 set_cursor:
4171 4172
4172 /* Fix the appearance of overlapping(overlapped rows. */ 4173 /* Fix the appearance of overlapping/overlapped rows. */
4173 if (!paused_p && !w->pseudo_window_p) 4174 if (!paused_p && !w->pseudo_window_p)
4174 { 4175 {
4175 if (changed_p && rif->fix_overlapping_area) 4176 if (changed_p && rif->fix_overlapping_area)
@@ -4683,10 +4684,6 @@ static int runs_size;
4683 4684
4684static struct run **runs; 4685static struct run **runs;
4685 4686
4686static struct row_entry *add_row_entry P_ ((struct window *,
4687 struct glyph_row *));
4688
4689
4690/* Add glyph row ROW to the scrolling hash table during the scrolling 4687/* Add glyph row ROW to the scrolling hash table during the scrolling
4691 of window W. */ 4688 of window W. */
4692 4689
@@ -4718,7 +4715,7 @@ add_row_entry (w, row)
4718 4715
4719 4716
4720/* Try to reuse part of the current display of W by scrolling lines. 4717/* Try to reuse part of the current display of W by scrolling lines.
4721 HEADER_LINE_P non-zero means W has a top mode line. 4718 HEADER_LINE_P non-zero means W has a header line.
4722 4719
4723 The algorithm is taken from Communications of the ACM, Apr78 "A 4720 The algorithm is taken from Communications of the ACM, Apr78 "A
4724 Technique for Isolating Differences Between Files." It should take 4721 Technique for Isolating Differences Between Files." It should take
@@ -5107,7 +5104,7 @@ update_frame_1 (f, force_p, inhibit_id_p)
5107#ifdef EMACS_OUTQSIZE 5104#ifdef EMACS_OUTQSIZE
5108 if (EMACS_OUTQSIZE (0, &outq) < 0) 5105 if (EMACS_OUTQSIZE (0, &outq) < 0)
5109 /* Probably not a tty. Ignore the error and reset 5106 /* Probably not a tty. Ignore the error and reset
5110 * the outq count. */ 5107 the outq count. */
5111 outq = PENDING_OUTPUT_COUNT (stdout); 5108 outq = PENDING_OUTPUT_COUNT (stdout);
5112#endif 5109#endif
5113 outq *= 10; 5110 outq *= 10;
@@ -5717,7 +5714,7 @@ buffer_posn_from_coords (w, x, y, object, pos)
5717 5714
5718 5715
5719/* Value is the string under window-relative coordinates X/Y in the 5716/* Value is the string under window-relative coordinates X/Y in the
5720 mode or top line of window W, or nil if none. MODE_LINE_P non-zero 5717 mode or header line of window W, or nil if none. MODE_LINE_P non-zero
5721 means look at the mode line. *CHARPOS is set to the position in 5718 means look at the mode line. *CHARPOS is set to the position in
5722 the string returned. */ 5719 the string returned. */
5723 5720
@@ -6107,7 +6104,7 @@ Emacs was built without floating point support.
6107 /* Assure that 0 <= usec < 1000000. */ 6104 /* Assure that 0 <= usec < 1000000. */
6108 if (usec < 0) 6105 if (usec < 0)
6109 { 6106 {
6110 /* We can't rely on the rounding being correct if user is negative. */ 6107 /* We can't rely on the rounding being correct if usec is negative. */
6111 if (-1000000 < usec) 6108 if (-1000000 < usec)
6112 sec--, usec += 1000000; 6109 sec--, usec += 1000000;
6113 else 6110 else
@@ -6138,7 +6135,7 @@ Emacs was built without floating point support.
6138#else /* not VMS */ 6135#else /* not VMS */
6139/* The reason this is done this way 6136/* The reason this is done this way
6140 (rather than defined (H_S) && defined (H_T)) 6137 (rather than defined (H_S) && defined (H_T))
6141 is because the VMS preprocessor doesn't grok `defined' */ 6138 is because the VMS preprocessor doesn't grok `defined'. */
6142#ifdef HAVE_SELECT 6139#ifdef HAVE_SELECT
6143 EMACS_GET_TIME (end_time); 6140 EMACS_GET_TIME (end_time);
6144 EMACS_SET_SECS_USECS (timeout, sec, usec); 6141 EMACS_SET_SECS_USECS (timeout, sec, usec);
@@ -6435,7 +6432,7 @@ init_display ()
6435 exit (1); 6432 exit (1);
6436 } 6433 }
6437 6434
6438 /* Look at the TERM variable */ 6435 /* Look at the TERM variable. */
6439 terminal_type = (char *) getenv ("TERM"); 6436 terminal_type = (char *) getenv ("TERM");
6440 if (!terminal_type) 6437 if (!terminal_type)
6441 { 6438 {