diff options
| author | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-01-31 22:25:51 +0100 |
|---|---|---|
| committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-03-06 07:51:58 +0100 |
| commit | 6166a1afc8c7875ce9ba62e5001040014269a26d (patch) | |
| tree | bc336a9c8b1c7ac4cbc5ee68749d9aca808e702a | |
| parent | cf332a325dafe7e9ed6d87df9dcec29149c5042c (diff) | |
| download | st-6166a1afc8c7875ce9ba62e5001040014269a26d.tar.gz st-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.c | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -358,6 +358,7 @@ static void strreset(void); | |||
| 358 | static int tattrset(int); | 358 | static int tattrset(int); |
| 359 | static void tprinter(char *s, size_t len); | 359 | static void tprinter(char *s, size_t len); |
| 360 | static void tdumpline(int); | 360 | static void tdumpline(int); |
| 361 | static void tdump(void); | ||
| 361 | static void tclearregion(int, int, int, int); | 362 | static void tclearregion(int, int, int, int); |
| 362 | static void tcursor(int); | 363 | static void tcursor(int); |
| 363 | static void tdeletechar(int); | 364 | static 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 | ||
| 2297 | void | 2300 | void |
| 2301 | tdump(void) { | ||
| 2302 | int i; | ||
| 2303 | |||
| 2304 | for(i = 0; i < term.row; ++i) | ||
| 2305 | tdumpline(i); | ||
| 2306 | } | ||
| 2307 | |||
| 2308 | void | ||
| 2298 | tputtab(bool forward) { | 2309 | tputtab(bool forward) { |
| 2299 | uint x = term.c.x; | 2310 | uint x = term.c.x; |
| 2300 | 2311 | ||
