aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto E. Vargas Caballero <k0ga@shike2.com>2014-01-31 22:25:51 +0100
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2014-03-06 07:51:58 +0100
commit6166a1afc8c7875ce9ba62e5001040014269a26d (patch)
treebc336a9c8b1c7ac4cbc5ee68749d9aca808e702a
parentcf332a325dafe7e9ed6d87df9dcec29149c5042c (diff)
downloadst-patched-6166a1afc8c7875ce9ba62e5001040014269a26d.tar.bz2
st-patched-6166a1afc8c7875ce9ba62e5001040014269a26d.tar.xz
st-patched-6166a1afc8c7875ce9ba62e5001040014269a26d.zip
Add MC for the full screen
This sequence is very useful because allows comunicate the content of the terminal to another program.
-rw-r--r--st.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/st.c b/st.c
index e60643c..1711842 100644
--- a/st.c
+++ b/st.c
@@ -358,6 +358,7 @@ static void strreset(void);
358static int tattrset(int); 358static int tattrset(int);
359static void tprinter(char *s, size_t len); 359static void tprinter(char *s, size_t len);
360static void tdumpline(int); 360static void tdumpline(int);
361static void tdump(void);
361static void tclearregion(int, int, int, int); 362static void tclearregion(int, int, int, int);
362static void tcursor(int); 363static void tcursor(int);
363static void tdeletechar(int); 364static void tdeletechar(int);
@@ -1986,6 +1987,8 @@ csihandle(void) {
1986 case 'i': /* MC -- Media Copy */ 1987 case 'i': /* MC -- Media Copy */
1987 switch(csiescseq.arg[0]) { 1988 switch(csiescseq.arg[0]) {
1988 case 0: 1989 case 0:
1990 tdump();
1991 break;
1989 case 1: 1992 case 1:
1990 tdumpline(term.c.y); 1993 tdumpline(term.c.y);
1991 break; 1994 break;
@@ -2295,6 +2298,14 @@ tdumpline(int n) {
2295} 2298}
2296 2299
2297void 2300void
2301tdump(void) {
2302 int i;
2303
2304 for(i = 0; i < term.row; ++i)
2305 tdumpline(i);
2306}
2307
2308void
2298tputtab(bool forward) { 2309tputtab(bool forward) {
2299 uint x = term.c.x; 2310 uint x = term.c.x;
2300 2311