Introduction
Introduction Statistics Contact Development Disclaimer Help
tCreate a function for DEC test - st - [fork] customized build of st, the simpl…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit 43d74ef362b7dc5da3232cdc9412981ea6386df6
parent 3764f38fc805a8846bd18f1d555a10227fd14e29
Author: Roberto E. Vargas Caballero <[email protected]>
Date: Sat, 26 Apr 2014 09:24:04 +0200
Create a function for DEC test
Almost of the sequences execute their action in a separate function,
which is good because helps to read the full set of sequences
faster.
Diffstat:
M st.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -394,6 +394,7 @@ static void tsetmode(bool, bool, int *, int);
static void tfulldirt(void);
static void techo(char *, int);
static bool tcontrolcode(uchar );
+static void tdectest(char );
static int32_t tdefcolor(int *, int *, int);
static void tselcs(void);
static void tdeftran(char);
t@@ -2426,6 +2427,19 @@ tcontrolcode(uchar ascii) {
}
void
+tdectest(char c) {
+ static char E[UTF_SIZ] = "E";
+ int x, y;
+
+ if(c == '8') { /* DEC screen alignment test. */
+ for(x = 0; x < term.col; ++x) {
+ for(y = 0; y < term.row; ++y)
+ tsetchar(E, &term.c.attr, x, y);
+ }
+ }
+}
+
+void
tputc(char *c, int len) {
uchar ascii;
bool control;
t@@ -2504,15 +2518,7 @@ tputc(char *c, int len) {
tdeftran(ascii);
tselcs();
} else if(term.esc & ESC_TEST) {
- if(ascii == '8') { /* DEC screen alignment test. */
- char E[UTF_SIZ] = "E";
- int x, y;
-
- for(x = 0; x < term.col; ++x) {
- for(y = 0; y < term.row; ++y)
- tsetchar(E, &term.c.attr, x, y…
- }
- }
+ tdectest(ascii);
} else {
switch(ascii) {
case '[':
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.