aboutsummaryrefslogtreecommitdiffstats
path: root/src/termchar.h
diff options
context:
space:
mode:
authorPaul Eggert2011-03-08 18:12:00 -0800
committerPaul Eggert2011-03-08 18:12:00 -0800
commitfbceeba21b3b5aeb2a0f98d4ca937cabbe07fab0 (patch)
tree8b6d211a9e0ed7b1ac2a07bcc515d3e357a4f79d /src/termchar.h
parent50938595880fd87c7dcd39a607cba1b0a7598baf (diff)
downloademacs-fbceeba21b3b5aeb2a0f98d4ca937cabbe07fab0.tar.gz
emacs-fbceeba21b3b5aeb2a0f98d4ca937cabbe07fab0.zip
* cm.c (calccost, cmgoto): Use const pointers where appropriate.
* cm.h (struct cm): Likewise. * dispextern.h (do_line_insertion_deletion_costs): Likewise. * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise. * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table): (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph): (turn_on_face, init_tty): Likewise. * termchar.h (struct tty_display_info): Likewise. * term.c (tgetflag, tgetnum, tgetstr): Redefine to use const pointers.
Diffstat (limited to 'src/termchar.h')
-rw-r--r--src/termchar.h93
1 files changed, 46 insertions, 47 deletions
diff --git a/src/termchar.h b/src/termchar.h
index 277a96932b4..035974a8ce6 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -84,58 +84,58 @@ struct tty_display_info
84 84
85 /* Strings, numbers and flags taken from the termcap entry. */ 85 /* Strings, numbers and flags taken from the termcap entry. */
86 86
87 char *TS_ins_line; /* "al" */ 87 const char *TS_ins_line; /* "al" */
88 char *TS_ins_multi_lines; /* "AL" (one parameter, # lines to insert) */ 88 const char *TS_ins_multi_lines; /* "AL" (one parameter, # lines to insert) */
89 char *TS_bell; /* "bl" */ 89 const char *TS_bell; /* "bl" */
90 char *TS_clr_to_bottom; /* "cd" */ 90 const char *TS_clr_to_bottom; /* "cd" */
91 char *TS_clr_line; /* "ce", clear to end of line */ 91 const char *TS_clr_line; /* "ce", clear to end of line */
92 char *TS_clr_frame; /* "cl" */ 92 const char *TS_clr_frame; /* "cl" */
93 char *TS_set_scroll_region; /* "cs" (2 params, first line and last line) */ 93 const char *TS_set_scroll_region; /* "cs" (2 params, first line and last line) */
94 char *TS_set_scroll_region_1; /* "cS" (4 params: total lines, 94 const char *TS_set_scroll_region_1; /* "cS" (4 params: total lines,
95 lines above scroll region, lines below it, 95 lines above scroll region, lines below it,
96 total lines again) */ 96 total lines again) */
97 char *TS_del_char; /* "dc" */ 97 const char *TS_del_char; /* "dc" */
98 char *TS_del_multi_chars; /* "DC" (one parameter, # chars to delete) */ 98 const char *TS_del_multi_chars; /* "DC" (one parameter, # chars to delete) */
99 char *TS_del_line; /* "dl" */ 99 const char *TS_del_line; /* "dl" */
100 char *TS_del_multi_lines; /* "DL" (one parameter, # lines to delete) */ 100 const char *TS_del_multi_lines; /* "DL" (one parameter, # lines to delete) */
101 char *TS_delete_mode; /* "dm", enter character-delete mode */ 101 const char *TS_delete_mode; /* "dm", enter character-delete mode */
102 char *TS_end_delete_mode; /* "ed", leave character-delete mode */ 102 const char *TS_end_delete_mode; /* "ed", leave character-delete mode */
103 char *TS_end_insert_mode; /* "ei", leave character-insert mode */ 103 const char *TS_end_insert_mode; /* "ei", leave character-insert mode */
104 char *TS_ins_char; /* "ic" */ 104 const char *TS_ins_char; /* "ic" */
105 char *TS_ins_multi_chars; /* "IC" (one parameter, # chars to insert) */ 105 const char *TS_ins_multi_chars; /* "IC" (one parameter, # chars to insert) */
106 char *TS_insert_mode; /* "im", enter character-insert mode */ 106 const char *TS_insert_mode; /* "im", enter character-insert mode */
107 char *TS_pad_inserted_char; /* "ip". Just padding, no commands. */ 107 const char *TS_pad_inserted_char; /* "ip". Just padding, no commands. */
108 char *TS_end_keypad_mode; /* "ke" */ 108 const char *TS_end_keypad_mode; /* "ke" */
109 char *TS_keypad_mode; /* "ks" */ 109 const char *TS_keypad_mode; /* "ks" */
110 char *TS_pad_char; /* "pc", char to use as padding */ 110 const char *TS_pad_char; /* "pc", char to use as padding */
111 char *TS_repeat; /* "rp" (2 params, # times to repeat 111 const char *TS_repeat; /* "rp" (2 params, # times to repeat
112 and character to be repeated) */ 112 and character to be repeated) */
113 char *TS_end_standout_mode; /* "se" */ 113 const char *TS_end_standout_mode; /* "se" */
114 char *TS_fwd_scroll; /* "sf" */ 114 const char *TS_fwd_scroll; /* "sf" */
115 char *TS_standout_mode; /* "so" */ 115 const char *TS_standout_mode; /* "so" */
116 char *TS_rev_scroll; /* "sr" */ 116 const char *TS_rev_scroll; /* "sr" */
117 char *TS_end_termcap_modes; /* "te" */ 117 const char *TS_end_termcap_modes; /* "te" */
118 char *TS_termcap_modes; /* "ti" */ 118 const char *TS_termcap_modes; /* "ti" */
119 char *TS_visible_bell; /* "vb" */ 119 const char *TS_visible_bell; /* "vb" */
120 char *TS_cursor_normal; /* "ve" */ 120 const char *TS_cursor_normal; /* "ve" */
121 char *TS_cursor_visible; /* "vs" */ 121 const char *TS_cursor_visible; /* "vs" */
122 char *TS_cursor_invisible; /* "vi" */ 122 const char *TS_cursor_invisible; /* "vi" */
123 char *TS_set_window; /* "wi" (4 params, start and end of window, 123 const char *TS_set_window; /* "wi" (4 params, start and end of window,
124 each as vpos and hpos) */ 124 each as vpos and hpos) */
125 125
126 char *TS_enter_bold_mode; /* "md" -- turn on bold (extra bright mode). */ 126 const char *TS_enter_bold_mode; /* "md" -- turn on bold (extra bright mode). */
127 char *TS_enter_dim_mode; /* "mh" -- turn on half-bright mode. */ 127 const char *TS_enter_dim_mode; /* "mh" -- turn on half-bright mode. */
128 char *TS_enter_blink_mode; /* "mb" -- enter blinking mode. */ 128 const char *TS_enter_blink_mode; /* "mb" -- enter blinking mode. */
129 char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */ 129 const char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */
130 char *TS_exit_underline_mode; /* "us" -- start underlining. */ 130 const char *TS_exit_underline_mode; /* "us" -- start underlining. */
131 char *TS_enter_underline_mode; /* "ue" -- end underlining. */ 131 const char *TS_enter_underline_mode; /* "ue" -- end underlining. */
132 132
133 /* "as"/"ae" -- start/end alternate character set. Not really 133 /* "as"/"ae" -- start/end alternate character set. Not really
134 supported, yet. */ 134 supported, yet. */
135 char *TS_enter_alt_charset_mode; 135 const char *TS_enter_alt_charset_mode;
136 char *TS_exit_alt_charset_mode; 136 const char *TS_exit_alt_charset_mode;
137 137
138 char *TS_exit_attribute_mode; /* "me" -- switch appearances off. */ 138 const char *TS_exit_attribute_mode; /* "me" -- switch appearances off. */
139 139
140 /* Value of the "NC" (no_color_video) capability, or 0 if not present. */ 140 /* Value of the "NC" (no_color_video) capability, or 0 if not present. */
141 int TN_no_color_video; 141 int TN_no_color_video;
@@ -147,12 +147,12 @@ struct tty_display_info
147 int TN_max_pairs; 147 int TN_max_pairs;
148 148
149 /* "op" -- SVr4 set default pair to its original value. */ 149 /* "op" -- SVr4 set default pair to its original value. */
150 char *TS_orig_pair; 150 const char *TS_orig_pair;
151 151
152 /* "AF"/"AB" or "Sf"/"Sb"-- set ANSI or SVr4 foreground/background color. 152 /* "AF"/"AB" or "Sf"/"Sb"-- set ANSI or SVr4 foreground/background color.
153 1 param, the color index. */ 153 1 param, the color index. */
154 char *TS_set_foreground; 154 const char *TS_set_foreground;
155 char *TS_set_background; 155 const char *TS_set_background;
156 156
157 int TF_hazeltine; /* termcap hz flag. */ 157 int TF_hazeltine; /* termcap hz flag. */
158 int TF_insmode_motion; /* termcap mi flag: can move while in insert mode. */ 158 int TF_insmode_motion; /* termcap mi flag: can move while in insert mode. */
@@ -210,4 +210,3 @@ extern struct tty_display_info *tty_list;
210 : (abort(), (struct tty_display_info *) 0)) 210 : (abort(), (struct tty_display_info *) 0))
211 211
212#define CURTTY() FRAME_TTY (SELECTED_FRAME()) 212#define CURTTY() FRAME_TTY (SELECTED_FRAME())
213