add vertical-tab and form-feed to the list of control sequences. add. add.
authorNalin Dahyabhai <nalin@src.gnome.org>
Mon, 16 Jun 2003 23:20:22 +0000 (23:20 +0000)
committerNalin Dahyabhai <nalin@src.gnome.org>
Mon, 16 Jun 2003 23:20:22 +0000 (23:20 +0000)
* src/caps.c: add vertical-tab and form-feed to the list of control sequences.
* src/vte.c(vte_controL_sequence_handler_form_feed): add.
* src/vte.c(vte_controL_sequence_handler_vertical_tab): add.

ChangeLog
doc/vttest.tar.gz
src/caps.c
src/vte.c

index 4632889..5f5259f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-16 nalin
+       * src/caps.c: add vertical-tab and form-feed to the list of control
+       sequences.
+       * src/vte.c(vte_controL_sequence_handler_form_feed): add.
+       * src/vte.c(vte_controL_sequence_handler_vertical_tab): add.
+
 2003-06-16 nalin
        * src/vteaccess.c(xy_from_offset): fix a compiler warning.
 
index f017bf9..c173c96 100644 (file)
Binary files a/doc/vttest.tar.gz and b/doc/vttest.tar.gz differ
index 35eba21..54a41a7 100644 (file)
 #define PM  _VTE_CAP_PM
 #define APC _VTE_CAP_APC
 
-#define ENQ "\ 5"
-#define BEL "\a"
-#define BS  "\b"
-#define TAB "  "
-#define LF  "\n"
-#define VT  "\v"
-#define FF  "\f"
-#define CR  "\r"
-#define SO  "\ e"
-#define SI  "\ f"
+#define ENQ "\005"
+#define BEL "\007"
+#define BS  "\010"
+#define TAB "\011"
+#define LF  "\012"
+#define VT  "\013"
+#define FF  "\014"
+#define CR  "\015"
+#define SO  "\016"
+#define SI  "\017"
 
 /* This list combined from the Linux termcap(5) man page, and
  * termcap_&_terminfo by Strang, Mui, and O'Reilly. */
@@ -364,6 +364,8 @@ struct _vte_capability_quark _vte_terminal_capability_strings[] = {
  * version at Moy, Gildea, and Dickey. */
 struct _vte_capability_string _vte_xterm_capability_strings[] = {
        {ENQ, "return-terminal-status", 0},
+       {VT,  "vertical-tab", 0},
+       {FF,  "form-feed", 0},
 
        {ESC " F", "7-bit-controls", 0},
        {ESC " G", "8-bit-controls", 0},
index 1913400..7c3cd50 100644 (file)
--- a/src/vte.c
+++ b/src/vte.c
@@ -397,6 +397,10 @@ static void vte_sequence_handler_ho(VteTerminal *terminal,
                                    const char *match,
                                    GQuark match_quark,
                                    GValueArray *params);
+static void vte_sequence_handler_index(VteTerminal *terminal,
+                                      const char *match,
+                                      GQuark match_quark,
+                                      GValueArray *params);
 static void vte_sequence_handler_le(VteTerminal *terminal,
                                    const char *match,
                                    GQuark match_quark,
@@ -2996,6 +3000,16 @@ vte_sequence_handler_ei(VteTerminal *terminal,
        terminal->pvt->screen->insert_mode = FALSE;
 }
 
+/* Form-feed / next-page. */
+static void
+vte_sequence_handler_form_feed(VteTerminal *terminal,
+                              const char *match,
+                              GQuark match_quark,
+                              GValueArray *params)
+{
+       vte_sequence_handler_index(terminal, match, match_quark, params);
+}
+
 /* Move from status line. */
 static void
 vte_sequence_handler_fs(VteTerminal *terminal,
@@ -3840,6 +3854,16 @@ vte_sequence_handler_ve(VteTerminal *terminal,
        terminal->pvt->cursor_visible = TRUE;
 }
 
+/* Vertical tab. */
+static void
+vte_sequence_handler_vertical_tab(VteTerminal *terminal,
+                                 const char *match,
+                                 GQuark match_quark,
+                                 GValueArray *params)
+{
+       vte_sequence_handler_index(terminal, match, match_quark, params);
+}
+
 /* Cursor invisible. */
 static void
 vte_sequence_handler_vi(VteTerminal *terminal,
@@ -6004,6 +6028,7 @@ static struct {
        {"erase-characters", vte_sequence_handler_erase_characters},
        {"erase-in-display", vte_sequence_handler_erase_in_display},
        {"erase-in-line", vte_sequence_handler_erase_in_line},
+       {"form-feed", vte_sequence_handler_form_feed},
        {"full-reset", vte_sequence_handler_full_reset},
        {"horizontal-and-vertical-position", vte_sequence_handler_horizontal_and_vertical_position},
        {"index", vte_sequence_handler_index},
@@ -6058,6 +6083,7 @@ static struct {
        {"tab-clear", vte_sequence_handler_tab_clear},
        {"tab-set", vte_sequence_handler_st},
        {"utf-8-character-set", vte_sequence_handler_utf_8_charset},
+       {"vertical-tab", vte_sequence_handler_vertical_tab},
        {"window-manipulation", vte_sequence_handler_window_manipulation},
 };