Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit c9432ec2 authored by deuce's avatar deuce

Add more control sequences:

CSI Pn Y - Cursor Line Tabulation
CSI Pn SP c - Tab Stop Remove
CSI Pn k - Line Position Backward
parent 5734e721
...@@ -2255,6 +2255,12 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int * ...@@ -2255,6 +2255,12 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
break; break;
} }
} }
// Font Select
else if (strcmp(seq->ctrl_func, " c") == 0) {
if (seq->param_count > 0) {
delete_tabstop(cterm, seq->param_int[0]);
}
}
/* /*
* END OF STANDARD CONTROL FUNCTIONS * END OF STANDARD CONTROL FUNCTIONS
* AFTER THIS IS ALL PRIVATE EXTENSIONS * AFTER THIS IS ALL PRIVATE EXTENSIONS
...@@ -2357,6 +2363,7 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int * ...@@ -2357,6 +2363,7 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
PUTCH(' '); PUTCH(' ');
GOTOXY(i,j); GOTOXY(i,j);
break; break;
case 'k': /* Line Position Backward */
case 'A': /* Cursor Up */ case 'A': /* Cursor Up */
seq_default(seq, 0, 1); seq_default(seq, 0, 1);
i=WHEREY()-seq->param_int[0]; i=WHEREY()-seq->param_int[0];
...@@ -2573,7 +2580,24 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int * ...@@ -2573,7 +2580,24 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
vmem_puttext(cterm->x+WHEREX()-1,cterm->y+WHEREY()-1,cterm->x+WHEREX()-1+i-1,cterm->y+WHEREY()-1,vc); vmem_puttext(cterm->x+WHEREX()-1,cterm->y+WHEREY()-1,cterm->x+WHEREX()-1+i-1,cterm->y+WHEREY()-1,vc);
free(vc); free(vc);
break; break;
case 'Y': /* TODO? Cursor Line Tabulation */ case 'Y': /* Cursor Line Tabulation */
seq_default(seq, 0, 1);
if (seq->param_int[0] < 1)
break;
col = WHEREX();
for(i = 0; i < cterm->tab_count; i++) {
if(cterm->tabs[i] > col)
break;
}
if (i == cterm->tab_count)
break;
for (k = 1; k < seq->param_int[0]; k++) {
if (cterm->tabs[k] <= cterm->width)
col = cterm->tabs[k];
else
break;
}
GOTOXY(col,WHEREY());
break; break;
case 'Z': /* Cursor Backward Tabulation */ case 'Z': /* Cursor Backward Tabulation */
seq_default(seq, 0, 1); seq_default(seq, 0, 1);
...@@ -2657,8 +2681,7 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int * ...@@ -2657,8 +2681,7 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
break; break;
case 'j': /* TODO? Character Position Backward */ case 'j': /* TODO? Character Position Backward */
break; break;
case 'k': /* TODO? Line Position Backward */ // for case 'k': see case 'A':
break;
case 'l': /* TODO? Reset Mode */ case 'l': /* TODO? Reset Mode */
break; break;
case 'm': /* Select Graphic Rendition */ case 'm': /* Select Graphic Rendition */
...@@ -3409,7 +3432,7 @@ ctputs(struct cterminal *cterm, char *buf) ...@@ -3409,7 +3432,7 @@ ctputs(struct cterminal *cterm, char *buf)
*p=0; *p=0;
CPUTS(outp); CPUTS(outp);
outp=p+1; outp=p+1;
for(i=0;cterm->tab_count;i++) { for(i=0;i<cterm->tab_count;i++) {
if(cterm->tabs[i]>cx) { if(cterm->tabs[i]>cx) {
cx=cterm->tabs[i]; cx=cterm->tabs[i];
break; break;
......
...@@ -405,6 +405,7 @@ CSI Ps J ...@@ -405,6 +405,7 @@ CSI Ps J
this behaviour. this behaviour.
Erased characters are set to the current attribute. Erased characters are set to the current attribute.
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
SOURCE BANSI.TXT SOURCE BANSI.TXT
CSI Ps K CSI Ps K
...@@ -510,6 +511,14 @@ CSI Pn X ...@@ -510,6 +511,14 @@ CSI Pn X
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn Y
Cursor Line Tabulation
Defaults: Pn = 1
Move the cursor to the Pn-th next tab stop.
Basically the same as sending TAB Pn times.
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn Z CSI Pn Z
Cursor Backward Tabulation Cursor Backward Tabulation
Defaults: Pn = 1 Defaults: Pn = 1
...@@ -557,6 +566,13 @@ CSI Ps c ...@@ -557,6 +566,13 @@ CSI Ps c
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI Pn SP c
Tab Stop Remove
Defaults: None
Removes a tab stop at postion Pn.
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI < Ps c CSI < Ps c
CTerm Device Attributes CTerm Device Attributes
...@@ -654,6 +670,15 @@ CSI ? Ps... h ...@@ -654,6 +670,15 @@ CSI ? Ps... h
Defaults to set. Defaults to set.
SOURCE: VT330/VT340 Programmer Reference Manual SOURCE: VT330/VT340 Programmer Reference Manual
CSI Pn k
Line Position Backward
Defaults: Pn = 1
Moves the cursor position up Pn lines from the current position.
Attempting to move past the screen boundaries stops the cursor
at the screen boundary.
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI = 255 l CSI = 255 l
NON-STANDARD EXTENSION NON-STANDARD EXTENSION
Disable DoorWay Mode Disable DoorWay Mode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment