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 5bf12c0d authored by rswindell's avatar rswindell
Browse files

New Ctrl-A codes:

'J' - Clear to End-of-Screen, for ANSI users sends <ESC>[J, nothing otherwise
'`' - Home Cursor, for ANSI users sends <ESC>[H, form feed otherwise
parent 40f55f61
...@@ -377,6 +377,12 @@ void sbbs_t::cleartoeol(void) ...@@ -377,6 +377,12 @@ void sbbs_t::cleartoeol(void)
} }
} }
void sbbs_t::cleartoeos(void)
{
if(term_supports(ANSI))
rputs("\x1b[J");
}
/****************************************************************************/ /****************************************************************************/
/* performs the correct attribute modifications for the Ctrl-A code */ /* performs the correct attribute modifications for the Ctrl-A code */
/****************************************************************************/ /****************************************************************************/
...@@ -483,9 +489,15 @@ void sbbs_t::ctrl_a(char x) ...@@ -483,9 +489,15 @@ void sbbs_t::ctrl_a(char x)
case 'S': /* Synchronize */ case 'S': /* Synchronize */
ASYNC; ASYNC;
break; break;
case 'J': /* clear to end-of-screen */
cleartoeos();
break;
case 'L': /* CLS (form feed) */ case 'L': /* CLS (form feed) */
CLS; CLS;
break; break;
case '`': /* Home cursor */
cursor_home();
break;
case '>': /* CLREOL */ case '>': /* CLREOL */
cleartoeol(); cleartoeol();
break; break;
......
...@@ -667,6 +667,7 @@ public: ...@@ -667,6 +667,7 @@ public:
void center(char *str); void center(char *str);
void clearline(void); void clearline(void);
void cleartoeol(void); void cleartoeol(void);
void cleartoeos(void);
void cursor_home(void); void cursor_home(void);
void cursor_up(int count=1); void cursor_up(int count=1);
void cursor_down(int count=1); void cursor_down(int count=1);
......
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