diff options
| author | Paul Eggert | 2011-02-26 16:48:14 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-02-26 16:48:14 -0800 |
| commit | 27786b2f70a1af14ad68bc8b5df2792ae340c3e0 (patch) | |
| tree | 86f1df27bfe6d78f242d71b604cf8199abc0d2d1 /src | |
| parent | d2d37ddc91e271f18c563056feddb096d750a906 (diff) | |
| download | emacs-27786b2f70a1af14ad68bc8b5df2792ae340c3e0.tar.gz emacs-27786b2f70a1af14ad68bc8b5df2792ae340c3e0.zip | |
* dispnew.c: Rename locals to avoid shadowing.
(update_text_area, scrolling_window, update_frame_1): Rename locals.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/dispnew.c | 56 |
2 files changed, 33 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ed603dd2934..05681aa75b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-02-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * dispnew.c: Rename locals to avoid shadowing. | ||
| 4 | (update_text_area, scrolling_window, update_frame_1): Rename locals. | ||
| 5 | |||
| 1 | 2011-02-26 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2011-02-26 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * dispnew.c: Fix problems uncovered by gcc -Wstrict-prototypes. | 8 | * dispnew.c: Fix problems uncovered by gcc -Wstrict-prototypes. |
diff --git a/src/dispnew.c b/src/dispnew.c index 2afd855929a..1408bea2fc6 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -3990,7 +3990,7 @@ update_text_area (struct window *w, int vpos) | |||
| 3990 | { | 3990 | { |
| 3991 | /* Otherwise clear to the end of the old row. Everything | 3991 | /* Otherwise clear to the end of the old row. Everything |
| 3992 | after that position should be clear already. */ | 3992 | after that position should be clear already. */ |
| 3993 | int x; | 3993 | int xlim; |
| 3994 | 3994 | ||
| 3995 | if (i >= desired_row->used[TEXT_AREA]) | 3995 | if (i >= desired_row->used[TEXT_AREA]) |
| 3996 | rif->cursor_to (vpos, i, desired_row->y, | 3996 | rif->cursor_to (vpos, i, desired_row->y, |
| @@ -4007,11 +4007,11 @@ update_text_area (struct window *w, int vpos) | |||
| 4007 | : (w->phys_cursor.hpos >= desired_row->used[TEXT_AREA]))) | 4007 | : (w->phys_cursor.hpos >= desired_row->used[TEXT_AREA]))) |
| 4008 | { | 4008 | { |
| 4009 | w->phys_cursor_on_p = 0; | 4009 | w->phys_cursor_on_p = 0; |
| 4010 | x = -1; | 4010 | xlim = -1; |
| 4011 | } | 4011 | } |
| 4012 | else | 4012 | else |
| 4013 | x = current_row->pixel_width; | 4013 | xlim = current_row->pixel_width; |
| 4014 | rif->clear_end_of_line (x); | 4014 | rif->clear_end_of_line (xlim); |
| 4015 | changed_p = 1; | 4015 | changed_p = 1; |
| 4016 | } | 4016 | } |
| 4017 | } | 4017 | } |
| @@ -4467,7 +4467,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4467 | && old_lines[i]->old_uses == 1 | 4467 | && old_lines[i]->old_uses == 1 |
| 4468 | && old_lines[i]->new_uses == 1) | 4468 | && old_lines[i]->new_uses == 1) |
| 4469 | { | 4469 | { |
| 4470 | int j, k; | 4470 | int p, q; |
| 4471 | int new_line = old_lines[i]->new_line_number; | 4471 | int new_line = old_lines[i]->new_line_number; |
| 4472 | struct run *run = run_pool + run_idx++; | 4472 | struct run *run = run_pool + run_idx++; |
| 4473 | 4473 | ||
| @@ -4480,33 +4480,33 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4480 | run->height = MATRIX_ROW (current_matrix, i)->height; | 4480 | run->height = MATRIX_ROW (current_matrix, i)->height; |
| 4481 | 4481 | ||
| 4482 | /* Extend backward. */ | 4482 | /* Extend backward. */ |
| 4483 | j = i - 1; | 4483 | p = i - 1; |
| 4484 | k = new_line - 1; | 4484 | q = new_line - 1; |
| 4485 | while (j > first_old | 4485 | while (p > first_old |
| 4486 | && k > first_new | 4486 | && q > first_new |
| 4487 | && old_lines[j] == new_lines[k]) | 4487 | && old_lines[p] == new_lines[q]) |
| 4488 | { | 4488 | { |
| 4489 | int h = MATRIX_ROW (current_matrix, j)->height; | 4489 | int h = MATRIX_ROW (current_matrix, p)->height; |
| 4490 | --run->current_vpos; | 4490 | --run->current_vpos; |
| 4491 | --run->desired_vpos; | 4491 | --run->desired_vpos; |
| 4492 | ++run->nrows; | 4492 | ++run->nrows; |
| 4493 | run->height += h; | 4493 | run->height += h; |
| 4494 | run->desired_y -= h; | 4494 | run->desired_y -= h; |
| 4495 | run->current_y -= h; | 4495 | run->current_y -= h; |
| 4496 | --j, --k; | 4496 | --p, --q; |
| 4497 | } | 4497 | } |
| 4498 | 4498 | ||
| 4499 | /* Extend forward. */ | 4499 | /* Extend forward. */ |
| 4500 | j = i + 1; | 4500 | p = i + 1; |
| 4501 | k = new_line + 1; | 4501 | q = new_line + 1; |
| 4502 | while (j < last_old | 4502 | while (p < last_old |
| 4503 | && k < last_new | 4503 | && q < last_new |
| 4504 | && old_lines[j] == new_lines[k]) | 4504 | && old_lines[p] == new_lines[q]) |
| 4505 | { | 4505 | { |
| 4506 | int h = MATRIX_ROW (current_matrix, j)->height; | 4506 | int h = MATRIX_ROW (current_matrix, p)->height; |
| 4507 | ++run->nrows; | 4507 | ++run->nrows; |
| 4508 | run->height += h; | 4508 | run->height += h; |
| 4509 | ++j, ++k; | 4509 | ++p, ++q; |
| 4510 | } | 4510 | } |
| 4511 | 4511 | ||
| 4512 | /* Insert run into list of all runs. Order runs by copied | 4512 | /* Insert run into list of all runs. Order runs by copied |
| @@ -4514,11 +4514,11 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4514 | be copied because they are already in place. This is done | 4514 | be copied because they are already in place. This is done |
| 4515 | because we can avoid calling update_window_line in this | 4515 | because we can avoid calling update_window_line in this |
| 4516 | case. */ | 4516 | case. */ |
| 4517 | for (j = 0; j < nruns && runs[j]->height > run->height; ++j) | 4517 | for (p = 0; p < nruns && runs[p]->height > run->height; ++p) |
| 4518 | ; | 4518 | ; |
| 4519 | for (k = nruns; k > j; --k) | 4519 | for (q = nruns; q > p; --q) |
| 4520 | runs[k] = runs[k - 1]; | 4520 | runs[q] = runs[q - 1]; |
| 4521 | runs[j] = run; | 4521 | runs[p] = run; |
| 4522 | ++nruns; | 4522 | ++nruns; |
| 4523 | 4523 | ||
| 4524 | i += run->nrows; | 4524 | i += run->nrows; |
| @@ -4615,7 +4615,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4615 | struct glyph_matrix *current_matrix = f->current_matrix; | 4615 | struct glyph_matrix *current_matrix = f->current_matrix; |
| 4616 | struct glyph_matrix *desired_matrix = f->desired_matrix; | 4616 | struct glyph_matrix *desired_matrix = f->desired_matrix; |
| 4617 | int i; | 4617 | int i; |
| 4618 | int pause; | 4618 | int pause_p; |
| 4619 | int preempt_count = baud_rate / 2400 + 1; | 4619 | int preempt_count = baud_rate / 2400 + 1; |
| 4620 | 4620 | ||
| 4621 | xassert (current_matrix && desired_matrix); | 4621 | xassert (current_matrix && desired_matrix); |
| @@ -4629,7 +4629,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4629 | #if !PERIODIC_PREEMPTION_CHECKING | 4629 | #if !PERIODIC_PREEMPTION_CHECKING |
| 4630 | if (!force_p && detect_input_pending_ignore_squeezables ()) | 4630 | if (!force_p && detect_input_pending_ignore_squeezables ()) |
| 4631 | { | 4631 | { |
| 4632 | pause = 1; | 4632 | pause_p = 1; |
| 4633 | goto do_pause; | 4633 | goto do_pause; |
| 4634 | } | 4634 | } |
| 4635 | #endif | 4635 | #endif |
| @@ -4709,10 +4709,10 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4709 | } | 4709 | } |
| 4710 | } | 4710 | } |
| 4711 | 4711 | ||
| 4712 | pause = (i < FRAME_LINES (f) - 1) ? i : 0; | 4712 | pause_p = (i < FRAME_LINES (f) - 1) ? i : 0; |
| 4713 | 4713 | ||
| 4714 | /* Now just clean up termcap drivers and set cursor, etc. */ | 4714 | /* Now just clean up termcap drivers and set cursor, etc. */ |
| 4715 | if (!pause) | 4715 | if (!pause_p) |
| 4716 | { | 4716 | { |
| 4717 | if ((cursor_in_echo_area | 4717 | if ((cursor_in_echo_area |
| 4718 | /* If we are showing a message instead of the mini-buffer, | 4718 | /* If we are showing a message instead of the mini-buffer, |
| @@ -4813,7 +4813,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4813 | #endif | 4813 | #endif |
| 4814 | 4814 | ||
| 4815 | clear_desired_matrices (f); | 4815 | clear_desired_matrices (f); |
| 4816 | return pause; | 4816 | return pause_p; |
| 4817 | } | 4817 | } |
| 4818 | 4818 | ||
| 4819 | 4819 | ||