Mercurial > hg > xemacs-beta
comparison src/redisplay.c @ 2286:04bc9d2f42c7
[xemacs-hg @ 2004-09-20 19:18:55 by james]
Mark all unused parameters as unused. Also eliminate some unneeded local
variables.
author | james |
---|---|
date | Mon, 20 Sep 2004 19:20:08 +0000 |
parents | a8d8f419b459 |
children | ecf1ebac70d8 |
comparison
equal
deleted
inserted
replaced
2285:914c5afaac33 | 2286:04bc9d2f42c7 |
---|---|
3158 } | 3158 } |
3159 | 3159 |
3160 /* Add a blank to a margin display block. */ | 3160 /* Add a blank to a margin display block. */ |
3161 | 3161 |
3162 static void | 3162 static void |
3163 add_margin_blank (struct display_line *dl, struct display_block *db, | 3163 add_margin_blank (struct display_line *UNUSED (dl), struct display_block *db, |
3164 struct window *w, int xpos, int width, int side) | 3164 struct window *w, int xpos, int width, int side) |
3165 { | 3165 { |
3166 struct rune rb; | 3166 struct rune rb; |
3167 | 3167 |
3168 rb.findex = (side == LEFT_GLYPHS | 3168 rb.findex = (side == LEFT_GLYPHS |
4069 | 4069 |
4070 /* #### Urk! Should also handle begin-glyphs and end-glyphs in | 4070 /* #### Urk! Should also handle begin-glyphs and end-glyphs in |
4071 modeline extents. */ | 4071 modeline extents. */ |
4072 static Charcount | 4072 static Charcount |
4073 add_glyph_to_fstring_db_runes (pos_data *data, Lisp_Object glyph, | 4073 add_glyph_to_fstring_db_runes (pos_data *data, Lisp_Object glyph, |
4074 Charcount pos, Charcount min_pos, | 4074 Charcount pos, Charcount UNUSED (min_pos), |
4075 Charcount max_pos, Lisp_Object extent) | 4075 Charcount max_pos, Lisp_Object extent) |
4076 { | 4076 { |
4077 /* This function has been Mule-ized. */ | 4077 /* This function has been Mule-ized. */ |
4078 Charcount end; | 4078 Charcount end; |
4079 struct display_block *db = data->db; | 4079 struct display_block *db = data->db; |
5895 Fset_marker (w->last_point[DESIRED_DISP], make_int (pointm), w->buffer); | 5895 Fset_marker (w->last_point[DESIRED_DISP], make_int (pointm), w->buffer); |
5896 | 5896 |
5897 first_line = last_line = line; | 5897 first_line = last_line = line; |
5898 while (line <= dla_end) | 5898 while (line <= dla_end) |
5899 { | 5899 { |
5900 Charbpos old_start, old_end, new_start; | 5900 Charbpos old_start, old_end; |
5901 struct display_line *cdl = Dynarr_atp (cdla, line); | 5901 struct display_line *cdl = Dynarr_atp (cdla, line); |
5902 struct display_line *ddl = Dynarr_atp (ddla, line); | 5902 struct display_line *ddl = Dynarr_atp (ddla, line); |
5903 struct display_block *db; | 5903 struct display_block *db; |
5904 int initial_size; | 5904 int initial_size; |
5905 | 5905 |
5916 propagation data, fail. Otherwise we'll be okay because | 5916 propagation data, fail. Otherwise we'll be okay because |
5917 we'll have the necessary propagation data. */ | 5917 we'll have the necessary propagation data. */ |
5918 if (line == first_line && ddl->used_prop_data) | 5918 if (line == first_line && ddl->used_prop_data) |
5919 return 0; | 5919 return 0; |
5920 | 5920 |
5921 new_start = generate_display_line (w, ddl, 0, ddl->charpos + ddl->offset, | 5921 generate_display_line (w, ddl, 0, ddl->charpos + ddl->offset, |
5922 &prop, DESIRED_DISP); | 5922 &prop, DESIRED_DISP); |
5923 ddl->offset = 0; | 5923 ddl->offset = 0; |
5924 | 5924 |
5925 /* #### If there is propagated stuff the fail. We could | 5925 /* #### If there is propagated stuff the fail. We could |
5926 probably actually deal with this if the line had propagated | 5926 probably actually deal with this if the line had propagated |
5927 information when originally created by a full | 5927 information when originally created by a full |
6051 Otherwise we fail. If we fail we will have altered the desired | 6051 Otherwise we fail. If we fail we will have altered the desired |
6052 structs which could lead to an assertion failure. However, if | 6052 structs which could lead to an assertion failure. However, if |
6053 we fail the next thing that is going to happen is a full regen | 6053 we fail the next thing that is going to happen is a full regen |
6054 so we will actually end up being safe. */ | 6054 so we will actually end up being safe. */ |
6055 { | 6055 { |
6056 Charbpos new_start; | |
6057 prop_block_dynarr *prop = NULL; | 6056 prop_block_dynarr *prop = NULL; |
6058 struct display_line *cdl = Dynarr_atp (cdla, line); | 6057 struct display_line *cdl = Dynarr_atp (cdla, line); |
6059 struct display_line *ddl = Dynarr_atp (ddla, line); | 6058 struct display_line *ddl = Dynarr_atp (ddla, line); |
6060 | 6059 |
6061 assert (cdl->charpos == ddl->charpos); | 6060 assert (cdl->charpos == ddl->charpos); |
6068 | 6067 |
6069 /* If the line was generated using propagation data, fail. */ | 6068 /* If the line was generated using propagation data, fail. */ |
6070 if (ddl->used_prop_data) | 6069 if (ddl->used_prop_data) |
6071 return 0; | 6070 return 0; |
6072 | 6071 |
6073 new_start = generate_display_line (w, ddl, 0, ddl->charpos + ddl->offset, | 6072 generate_display_line (w, ddl, 0, ddl->charpos + ddl->offset, |
6074 &prop, DESIRED_DISP); | 6073 &prop, DESIRED_DISP); |
6075 ddl->offset = 0; | 6074 ddl->offset = 0; |
6076 | 6075 |
6077 /* If there is propagated stuff then it is pretty much a | 6076 /* If there is propagated stuff then it is pretty much a |
6078 guarantee that more than just the one line is affected. */ | 6077 guarantee that more than just the one line is affected. */ |
6079 if (prop) | 6078 if (prop) |
6664 /* Call buffer_reset_changes for all buffers present in any window | 6663 /* Call buffer_reset_changes for all buffers present in any window |
6665 currently visible in all frames on all devices. #### There has to | 6664 currently visible in all frames on all devices. #### There has to |
6666 be a better way to do this. */ | 6665 be a better way to do this. */ |
6667 | 6666 |
6668 static int | 6667 static int |
6669 reset_buffer_changes_mapfun (struct window *w, void *ignored_closure) | 6668 reset_buffer_changes_mapfun (struct window *w, void *UNUSED (closure)) |
6670 { | 6669 { |
6671 buffer_reset_changes (XBUFFER (w->buffer)); | 6670 buffer_reset_changes (XBUFFER (w->buffer)); |
6672 return 0; | 6671 return 0; |
6673 } | 6672 } |
6674 | 6673 |
6743 } | 6742 } |
6744 | 6743 |
6745 #ifdef ERROR_CHECK_TRAPPING_PROBLEMS | 6744 #ifdef ERROR_CHECK_TRAPPING_PROBLEMS |
6746 | 6745 |
6747 static Lisp_Object | 6746 static Lisp_Object |
6748 commit_ritual_suicide (Lisp_Object ceci_nest_pas_une_pipe) | 6747 commit_ritual_suicide (Lisp_Object UNUSED (ceci_nest_pas_une_pipe)) |
6749 { | 6748 { |
6750 assert (!in_display); | 6749 assert (!in_display); |
6751 return Qnil; | 6750 return Qnil; |
6752 } | 6751 } |
6753 | 6752 |
6803 to know in the *maybe() version whether to exit the section when we're | 6802 to know in the *maybe() version whether to exit the section when we're |
6804 done. */ | 6803 done. */ |
6805 static int in_display_nesting; | 6804 static int in_display_nesting; |
6806 | 6805 |
6807 static Lisp_Object | 6806 static Lisp_Object |
6808 end_hold_frame_size_changes (Lisp_Object obj) | 6807 end_hold_frame_size_changes (Lisp_Object UNUSED (obj)) |
6809 { | 6808 { |
6810 if (!hold_frame_size_changes) | 6809 if (!hold_frame_size_changes) |
6811 { | 6810 { |
6812 /* we used to have a function to do this for only one frame, and | 6811 /* we used to have a function to do this for only one frame, and |
6813 it was typical to call it at the end of a critical section | 6812 it was typical to call it at the end of a critical section |
9597 solely for backwards compatibility. */ | 9596 solely for backwards compatibility. */ |
9598 DEFUN ("redraw-modeline", Fredraw_modeline, 0, 1, 0, /* | 9597 DEFUN ("redraw-modeline", Fredraw_modeline, 0, 1, 0, /* |
9599 Force the modeline of the current buffer to be redisplayed. | 9598 Force the modeline of the current buffer to be redisplayed. |
9600 With optional non-nil ALL, force redisplay of all modelines. | 9599 With optional non-nil ALL, force redisplay of all modelines. |
9601 */ | 9600 */ |
9602 (all)) | 9601 (UNUSED (all))) |
9603 { | 9602 { |
9604 MARK_MODELINE_CHANGED; | 9603 MARK_MODELINE_CHANGED; |
9605 return Qnil; | 9604 return Qnil; |
9606 } | 9605 } |
9607 | 9606 |
9624 /* Change flags */ | 9623 /* Change flags */ |
9625 /* */ | 9624 /* */ |
9626 /***************************************************************************/ | 9625 /***************************************************************************/ |
9627 | 9626 |
9628 static void | 9627 static void |
9629 margin_width_changed_in_frame (Lisp_Object specifier, struct frame *f, | 9628 margin_width_changed_in_frame (Lisp_Object UNUSED (specifier), |
9630 Lisp_Object oldval) | 9629 struct frame *UNUSED (f), |
9630 Lisp_Object UNUSED (oldval)) | |
9631 { | 9631 { |
9632 /* Nothing to be done? */ | 9632 /* Nothing to be done? */ |
9633 } | 9633 } |
9634 | 9634 |
9635 int | 9635 int |
9636 redisplay_variable_changed (Lisp_Object sym, Lisp_Object *val, | 9636 redisplay_variable_changed (Lisp_Object UNUSED (sym), |
9637 Lisp_Object in_object, int flags) | 9637 Lisp_Object *UNUSED (val), |
9638 Lisp_Object UNUSED (in_object), | |
9639 int UNUSED (flags)) | |
9638 { | 9640 { |
9639 /* #### clip_changed should really be renamed something like | 9641 /* #### clip_changed should really be renamed something like |
9640 global_redisplay_change. */ | 9642 global_redisplay_change. */ |
9641 MARK_CLIP_CHANGED; | 9643 MARK_CLIP_CHANGED; |
9642 return 0; | 9644 return 0; |
9643 } | 9645 } |
9644 | 9646 |
9645 /* This is called if the built-in glyphs have their properties | 9647 /* This is called if the built-in glyphs have their properties |
9646 changed. */ | 9648 changed. */ |
9647 void | 9649 void |
9648 redisplay_glyph_changed (Lisp_Object glyph, Lisp_Object property, | 9650 redisplay_glyph_changed (Lisp_Object UNUSED (glyph), |
9649 Lisp_Object locale) | 9651 Lisp_Object UNUSED (property), Lisp_Object locale) |
9650 { | 9652 { |
9651 if (WINDOWP (locale)) | 9653 if (WINDOWP (locale)) |
9652 { | 9654 { |
9653 MARK_FRAME_GLYPHS_CHANGED (XFRAME (WINDOW_FRAME (XWINDOW (locale)))); | 9655 MARK_FRAME_GLYPHS_CHANGED (XFRAME (WINDOW_FRAME (XWINDOW (locale)))); |
9654 } | 9656 } |
9675 MARK_FRAME_GLYPHS_CHANGED (XFRAME (XCAR (frmcons))); | 9677 MARK_FRAME_GLYPHS_CHANGED (XFRAME (XCAR (frmcons))); |
9676 } | 9678 } |
9677 } | 9679 } |
9678 | 9680 |
9679 static void | 9681 static void |
9680 text_cursor_visible_p_changed (Lisp_Object specifier, struct window *w, | 9682 text_cursor_visible_p_changed (Lisp_Object UNUSED (specifier), |
9681 Lisp_Object oldval) | 9683 struct window *w, Lisp_Object UNUSED (oldval)) |
9682 { | 9684 { |
9683 if (XFRAME (w->frame)->init_finished) | 9685 if (XFRAME (w->frame)->init_finished) |
9684 Fforce_cursor_redisplay (w->frame); | 9686 Fforce_cursor_redisplay (w->frame); |
9685 } | 9687 } |
9686 | 9688 |
9825 #endif /* MEMORY_USAGE_STATS */ | 9827 #endif /* MEMORY_USAGE_STATS */ |
9826 | 9828 |
9827 #ifdef ERROR_CHECK_DISPLAY | 9829 #ifdef ERROR_CHECK_DISPLAY |
9828 | 9830 |
9829 static int | 9831 static int |
9830 sledgehammer_check_redisplay_structs_1 (struct window *w, void *closure) | 9832 sledgehammer_check_redisplay_structs_1 (struct window *w, |
9833 void *UNUSED (closure)) | |
9831 { | 9834 { |
9832 int i, j; | 9835 int i, j; |
9833 display_line_dynarr *dl; | 9836 display_line_dynarr *dl; |
9834 | 9837 |
9835 dl = window_display_lines (w, CURRENT_DISP); | 9838 dl = window_display_lines (w, CURRENT_DISP); |