aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-01-25 00:43:38 +0000
committerKaroly Lorentey2004-01-25 00:43:38 +0000
commitda8e11156a5a22f6e4cdab41b4b797aaee10bd6e (patch)
tree7ad1f34e2cbfaa55e45d1ccf27f1849cda728e30 /src/term.c
parent3bbdbec9f2dd03d81d700941e5dd40da0ec3e632 (diff)
downloademacs-da8e11156a5a22f6e4cdab41b4b797aaee10bd6e.tar.gz
emacs-da8e11156a5a22f6e4cdab41b4b797aaee10bd6e.zip
Removed %T in mode-line-format. Trivial documentation changes.
lisp/bindings.el (mode-line-buffer-identification): Use the conditional formatting feature instead of builtin support. src/buffer.c (Vmode_line_format): Removed %T documentation. src/xdisp.c (decode_mode_spec): Removed %T processing. lib-src/emacsclient.c (pass_signal_to_emacs, init_signals): Added comment. src/cm.c: Cosmetic changes. src/termchar.h: Ditto. src/keyboard.c (interrupt_signal, handle_interrupt): Updated documentation. src/process.c (add_keyboard_wait_descriptor): Added docs. src/sysdep.c (init_all_sys_modes, init_sys_modes) (reset_all_sys_modes): Added docs. src/term.c (tty_ring_bell, tty_set_terminal_modes) (tty_reset_terminal_modes, tty_update_end, set_terminal_window) (tty_set_terminal_window, clear_to_end, tty_clear_to_end) (tty_clear_frame, tty_clear_end_of_line, write_glyphs) (tty_write_glyphs, insert_glyphs, tty_insert_glyphs, delete_glyphs) (tty_delete_glyphs, tty_ins_del_lines, get_named_tty_display) (init_initial_display, delete_tty): Added docs. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-65
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c69
1 files changed, 62 insertions, 7 deletions
diff --git a/src/term.c b/src/term.c
index f63c6c68774..65b6c158c33 100644
--- a/src/term.c
+++ b/src/term.c
@@ -201,6 +201,8 @@ ring_bell ()
201 (*FRAME_DISPLAY (f)->ring_bell_hook) (); 201 (*FRAME_DISPLAY (f)->ring_bell_hook) ();
202} 202}
203 203
204/* Ring the bell on a tty. */
205
204void 206void
205tty_ring_bell () 207tty_ring_bell ()
206{ 208{
@@ -212,7 +214,10 @@ tty_ring_bell ()
212 : tty->TS_bell)); 214 : tty->TS_bell));
213} 215}
214 216
215void tty_set_terminal_modes (struct display *display) 217/* Set up termcap modes for Emacs. */
218
219void
220tty_set_terminal_modes (struct display *display)
216{ 221{
217 struct tty_display_info *tty = display->display_info.tty; 222 struct tty_display_info *tty = display->display_info.tty;
218 223
@@ -222,7 +227,10 @@ void tty_set_terminal_modes (struct display *display)
222 losecursor (tty); 227 losecursor (tty);
223} 228}
224 229
225void tty_reset_terminal_modes (struct display *display) 230/* Reset termcap modes before exiting Emacs. */
231
232void
233tty_reset_terminal_modes (struct display *display)
226{ 234{
227 struct tty_display_info *tty = display->display_info.tty; 235 struct tty_display_info *tty = display->display_info.tty;
228 236
@@ -255,6 +263,8 @@ update_end (f)
255 updating_frame = NULL; 263 updating_frame = NULL;
256} 264}
257 265
266/* Flag the end of a display update on a termcap display. */
267
258void 268void
259tty_update_end (struct frame *f) 269tty_update_end (struct frame *f)
260{ 270{
@@ -266,6 +276,11 @@ tty_update_end (struct frame *f)
266 background_highlight (tty); 276 background_highlight (tty);
267} 277}
268 278
279/* Specify how many text lines, from the top of the window,
280 should be affected by insert-lines and delete-lines operations.
281 This, and those operations, are used only within an update
282 that is bounded by calls to update_begin and update_end. */
283
269void 284void
270set_terminal_window (size) 285set_terminal_window (size)
271 int size; 286 int size;
@@ -278,6 +293,8 @@ set_terminal_window (size)
278 (*FRAME_DISPLAY (f)->set_terminal_window_hook) (size); 293 (*FRAME_DISPLAY (f)->set_terminal_window_hook) (size);
279} 294}
280 295
296/* The implementation of set_terminal_window for termcap frames. */
297
281void 298void
282tty_set_terminal_window (int size) 299tty_set_terminal_window (int size)
283{ 300{
@@ -489,7 +506,7 @@ tty_raw_cursor_to (int row, int col)
489 506
490/* Erase operations */ 507/* Erase operations */
491 508
492/* clear from cursor to end of frame */ 509/* Clear from cursor to end of frame. */
493void 510void
494clear_to_end () 511clear_to_end ()
495{ 512{
@@ -501,6 +518,8 @@ clear_to_end ()
501 (*FRAME_DISPLAY (f)->clear_to_end_hook) (); 518 (*FRAME_DISPLAY (f)->clear_to_end_hook) ();
502} 519}
503 520
521/* Clear from cursor to end of frame on a termcap device. */
522
504void 523void
505tty_clear_to_end (void) 524tty_clear_to_end (void)
506{ 525{
@@ -536,6 +555,8 @@ clear_frame ()
536 (*FRAME_DISPLAY (f)->clear_frame_hook) (); 555 (*FRAME_DISPLAY (f)->clear_frame_hook) ();
537} 556}
538 557
558/* Clear an entire termcap frame. */
559
539void 560void
540tty_clear_frame () 561tty_clear_frame ()
541{ 562{
@@ -575,6 +596,10 @@ clear_end_of_line (first_unused_hpos)
575 (*FRAME_DISPLAY (f)->clear_end_of_line_hook) (first_unused_hpos); 596 (*FRAME_DISPLAY (f)->clear_end_of_line_hook) (first_unused_hpos);
576} 597}
577 598
599/* An implementation of clear_end_of_line for termcap frames.
600
601 Note that the cursor may be moved, on terminals lacking a `ce' string. */
602
578void 603void
579tty_clear_end_of_line (int first_unused_hpos) 604tty_clear_end_of_line (int first_unused_hpos)
580{ 605{
@@ -725,6 +750,9 @@ encode_terminal_code (src, dst, src_len, dst_len, consumed)
725} 750}
726 751
727 752
753/* Output LEN glyphs starting at STRING at the nominal cursor position.
754 Advance the nominal cursor over the text. */
755
728void 756void
729write_glyphs (string, len) 757write_glyphs (string, len)
730 register struct glyph *string; 758 register struct glyph *string;
@@ -738,6 +766,8 @@ write_glyphs (string, len)
738 (*FRAME_DISPLAY (f)->write_glyphs_hook) (string, len); 766 (*FRAME_DISPLAY (f)->write_glyphs_hook) (string, len);
739} 767}
740 768
769/* An implementation of write_glyphs for termcap frames. */
770
741void 771void
742tty_write_glyphs (struct glyph *string, int len) 772tty_write_glyphs (struct glyph *string, int len)
743{ 773{
@@ -833,7 +863,9 @@ tty_write_glyphs (struct glyph *string, int len)
833 cmcheckmagic (tty); 863 cmcheckmagic (tty);
834} 864}
835 865
836/* If start is zero, insert blanks instead of a string at start */ 866/* Insert LEN glyphs from START at the nominal cursor position.
867
868 If start is zero, insert blanks instead of a string at start */
837 869
838void 870void
839insert_glyphs (start, len) 871insert_glyphs (start, len)
@@ -851,6 +883,8 @@ insert_glyphs (start, len)
851 (*FRAME_DISPLAY (f)->insert_glyphs_hook) (start, len); 883 (*FRAME_DISPLAY (f)->insert_glyphs_hook) (start, len);
852} 884}
853 885
886/* An implementation of insert_glyphs for termcap frames. */
887
854void 888void
855tty_insert_glyphs (struct glyph *start, int len) 889tty_insert_glyphs (struct glyph *start, int len)
856{ 890{
@@ -934,6 +968,8 @@ tty_insert_glyphs (struct glyph *start, int len)
934 cmcheckmagic (tty); 968 cmcheckmagic (tty);
935} 969}
936 970
971/* Delete N glyphs at the nominal cursor position. */
972
937void 973void
938delete_glyphs (n) 974delete_glyphs (n)
939 register int n; 975 register int n;
@@ -946,6 +982,8 @@ delete_glyphs (n)
946 (*FRAME_DISPLAY (f)->delete_glyphs_hook) (n); 982 (*FRAME_DISPLAY (f)->delete_glyphs_hook) (n);
947} 983}
948 984
985/* An implementation of delete_glyphs for termcap frames. */
986
949void 987void
950tty_delete_glyphs (int n) 988tty_delete_glyphs (int n)
951{ 989{
@@ -994,6 +1032,8 @@ ins_del_lines (vpos, n)
994 (*FRAME_DISPLAY (f)->ins_del_lines_hook) (vpos, n); 1032 (*FRAME_DISPLAY (f)->ins_del_lines_hook) (vpos, n);
995} 1033}
996 1034
1035/* An implementation of ins_del_lines for termcap frames. */
1036
997void 1037void
998tty_ins_del_lines (int vpos, int n) 1038tty_ins_del_lines (int vpos, int n)
999{ 1039{
@@ -2082,6 +2122,11 @@ set_tty_color_mode (f, val)
2082 2122
2083 2123
2084 2124
2125/* Return the termcap display with the given name. If NAME is null,
2126 return the display corresponding to our controlling terminal.
2127
2128 Returns NULL if the named terminal device is not opened. */
2129
2085struct display * 2130struct display *
2086get_named_tty_display (name) 2131get_named_tty_display (name)
2087 char *name; 2132 char *name;
@@ -2159,8 +2204,8 @@ DEFUN ("frame-tty-type", Fframe_tty_type, Sframe_tty_type, 0, 1, 0,
2159 ***********************************************************************/ 2204 ***********************************************************************/
2160 2205
2161/* Create the bootstrap display device for the initial frame. 2206/* Create the bootstrap display device for the initial frame.
2207 Returns a display of type output_initial. */
2162 2208
2163Returns a display of type output_initial. */
2164struct display * 2209struct display *
2165init_initial_display (void) 2210init_initial_display (void)
2166{ 2211{
@@ -2180,6 +2225,7 @@ init_initial_display (void)
2180 2225
2181/* Deletes the bootstrap display device. 2226/* Deletes the bootstrap display device.
2182 Called through delete_display_hook. */ 2227 Called through delete_display_hook. */
2228
2183void 2229void
2184delete_initial_display (struct display *display) 2230delete_initial_display (struct display *display)
2185{ 2231{
@@ -2200,6 +2246,7 @@ delete_initial_display (struct display *display)
2200 TERMINAL_TYPE is the termcap type of the device, e.g. "vt100". 2246 TERMINAL_TYPE is the termcap type of the device, e.g. "vt100".
2201 2247
2202 If MUST_SUCCEED is true, then all errors are fatal. */ 2248 If MUST_SUCCEED is true, then all errors are fatal. */
2249
2203struct display * 2250struct display *
2204term_init (char *name, char *terminal_type, int must_succeed) 2251term_init (char *name, char *terminal_type, int must_succeed)
2205{ 2252{
@@ -2734,8 +2781,8 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
2734 2781
2735/* Auxiliary error-handling function for term_init. 2782/* Auxiliary error-handling function for term_init.
2736 Free BUFFER and delete DISPLAY, then call error or fatal 2783 Free BUFFER and delete DISPLAY, then call error or fatal
2737 with str1 or str2, respectively, according to MUST_SUCCEED. 2784 with str1 or str2, respectively, according to MUST_SUCCEED. */
2738*/ 2785
2739static void 2786static void
2740maybe_fatal (must_succeed, buffer, display, str1, str2, arg1, arg2) 2787maybe_fatal (must_succeed, buffer, display, str1, str2, arg1, arg2)
2741 int must_succeed; 2788 int must_succeed;
@@ -2802,6 +2849,9 @@ tty. The functions are run with one arg, the frame to be deleted. */)
2802 2849
2803static int deleting_tty = 0; 2850static int deleting_tty = 0;
2804 2851
2852
2853/* Delete the given terminal device, closing all frames on it. */
2854
2805void 2855void
2806delete_tty (struct display *display) 2856delete_tty (struct display *display)
2807{ 2857{
@@ -2904,6 +2954,7 @@ delete_tty (struct display *display)
2904 2954
2905/* Initialize the tty-dependent part of frame F. The frame must 2955/* Initialize the tty-dependent part of frame F. The frame must
2906 already have its display initialized. */ 2956 already have its display initialized. */
2957
2907void 2958void
2908create_tty_output (struct frame *f) 2959create_tty_output (struct frame *f)
2909{ 2960{
@@ -2921,6 +2972,7 @@ create_tty_output (struct frame *f)
2921} 2972}
2922 2973
2923/* Delete the tty-dependent part of frame F. */ 2974/* Delete the tty-dependent part of frame F. */
2975
2924void 2976void
2925delete_tty_output (struct frame *f) 2977delete_tty_output (struct frame *f)
2926{ 2978{
@@ -2935,6 +2987,7 @@ delete_tty_output (struct frame *f)
2935 2987
2936/* Mark the pointers in the tty_display_info objects. 2988/* Mark the pointers in the tty_display_info objects.
2937 Called by the Fgarbage_collector. */ 2989 Called by the Fgarbage_collector. */
2990
2938void 2991void
2939mark_ttys () 2992mark_ttys ()
2940{ 2993{
@@ -2950,6 +3003,7 @@ mark_ttys ()
2950 3003
2951 3004
2952/* Create a new display object and add it to the display list. */ 3005/* Create a new display object and add it to the display list. */
3006
2953struct display * 3007struct display *
2954create_display (void) 3008create_display (void)
2955{ 3009{
@@ -2963,6 +3017,7 @@ create_display (void)
2963} 3017}
2964 3018
2965/* Remove a display from the display list and free its memory. */ 3019/* Remove a display from the display list and free its memory. */
3020
2966void 3021void
2967delete_display (struct display *dev) 3022delete_display (struct display *dev)
2968{ 3023{