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 0e7118fa authored by rswindell's avatar rswindell

Improvements in auto-screen pausing:

- If the first lines sent after a key-press are blank lines, don't count them
  in the line-counter (lncntr) - maximize the viewable data before pause.
- Assume tabs chars are expanded to 8-space tab-stops when detecting auto
  line-wrapped output (e.g. when ;LISTing text files with tabs)
parent 03c70692
...@@ -239,17 +239,26 @@ void sbbs_t::outchar(char ch) ...@@ -239,17 +239,26 @@ void sbbs_t::outchar(char ch)
if(!outchar_esc) { if(!outchar_esc) {
if((uchar)ch>=' ') if((uchar)ch>=' ')
column++; column++;
else if(ch=='\r') else if(ch=='\r') {
lastlinelen = column;
column=0; column=0;
}
else if(ch=='\b') { else if(ch=='\b') {
if(column) if(column)
column--; column--;
} }
else if(ch=='\t') {
column++;
while(column%8)
column++;
}
} }
if(ch==LF || column>=cols) { if(ch==LF || column>=cols) {
lncntr++; if(lncntr || lastlinelen)
lncntr++;
lbuflen=0; lbuflen=0;
tos=0; tos=0;
lastlinelen = column;
column=0; column=0;
} else if(ch==FF) { } else if(ch==FF) {
lncntr=0; lncntr=0;
......
...@@ -3155,6 +3155,7 @@ sbbs_t::sbbs_t(ushort node_num, union xp_sockaddr *addr, size_t addr_len, const ...@@ -3155,6 +3155,7 @@ sbbs_t::sbbs_t(ushort node_num, union xp_sockaddr *addr, size_t addr_len, const
sys_status=lncntr=tos=criterrs=slcnt=0L; sys_status=lncntr=tos=criterrs=slcnt=0L;
column=0; column=0;
lastlinelen=0;
curatr=LIGHTGRAY; curatr=LIGHTGRAY;
attr_sp=0; /* attribute stack pointer */ attr_sp=0; /* attribute stack pointer */
errorlevel=0; errorlevel=0;
......
...@@ -451,6 +451,7 @@ public: ...@@ -451,6 +451,7 @@ public:
long rows; /* Current number of Rows for User */ long rows; /* Current number of Rows for User */
long cols; /* Current number of Columns for User */ long cols; /* Current number of Columns for User */
long column; /* Current column counter (for line counter) */ long column; /* Current column counter (for line counter) */
long lastlinelen; /* The previously displayed line length */
long autoterm; /* Autodetected terminal type */ long autoterm; /* Autodetected terminal type */
char slbuf[SAVE_LINES][LINE_BUFSIZE+1]; /* Saved for redisplay */ char slbuf[SAVE_LINES][LINE_BUFSIZE+1]; /* Saved for redisplay */
char slatr[SAVE_LINES]; /* Starting attribute of each line */ char slatr[SAVE_LINES]; /* Starting attribute of each line */
......
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