diff --git a/src/sbbs3/con_out.cpp b/src/sbbs3/con_out.cpp index 186aedcaca4f47ae9511c68304585088395a7503..00bc8d127d56ffda74eb06c347a87593f511fd90 100644 --- a/src/sbbs3/con_out.cpp +++ b/src/sbbs3/con_out.cpp @@ -218,22 +218,7 @@ void sbbs_t::outchar(char ch) else { if(ch==(char)TELNET_IAC && !(telnet_mode&TELNET_MODE_OFF)) outcom(TELNET_IAC); /* Must escape Telnet IAC char (255) */ - i=0; - while(outcom(ch)&TXBOF && i<1440) { /* 3 minute pause delay */ - if(!online) - break; - i++; - if(sys_status&SS_SYSPAGE) - sbbs_beep(i,80); - else - mswait(80); - } - if(i==1440) { /* timeout - beep flush outbuf */ - i=rioctl(TXBC); - lprintf(LOG_NOTICE,"timeout(outchar) %04X %04X\r\n",i,rioctl(IOFO)); - outcom(BEL); - rioctl(IOCS|PAUSE); - } + outcom(ch); } } if(!outchar_esc) { @@ -547,6 +532,12 @@ void sbbs_t::ctrl_a(char x) atr|=BLINK; attr(atr); break; + case 'F': /* Blink, only if alt Blink Font is loaded */ + if(((atr&HIGH) && (console&CON_HBLINK_FONT)) || (!(atr&HIGH) && (console&CON_BLINK_FONT))) + attr(atr|BLINK); + else if(x == 'F' && !(atr&HIGH)) /* otherwise, set HIGH attribute (only if capital 'F') */ + attr(atr|HIGH); + break; case 'N': /* Normal */ attr(LIGHTGRAY); break; diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 8066c1f3dce01ec1c8e2c12d4e947825d7b6984b..01206fb54891b978b9e87200ea08e02f95a43e14 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -3909,7 +3909,9 @@ int sbbs_t::incom(unsigned long timeout) return(ch); } -int sbbs_t::outcom(uchar ch) +// Steve's original implementation (in RCIOL) did not incorporate a retry +// ... so this function does not either. :-P +int sbbs_t::_outcom(uchar ch) { if(!RingBufFree(&outbuf)) return(TXBOF); @@ -3918,6 +3920,28 @@ int sbbs_t::outcom(uchar ch) return(0); } +// This outcom version retries - copied loop from sbbs_t::outchar() +int sbbs_t::outcom(uchar ch, int max_attempts) +{ + int i = 0; + while(_outcom(ch) != 0) { + if(!online) + break; + i++; + if(i >= max_attempts) { /* timeout - beep flush outbuf */ + lprintf(LOG_NOTICE, "timeout(outcom) %04X %04X", rioctl(TXBC), rioctl(IOFO)); + _outcom(BEL); + rioctl(IOCS|PAUSE); + return TXBOF; + } + if(sys_status&SS_SYSPAGE) + sbbs_beep(i, OUTCOM_RETRY_DELAY); + else + mswait(OUTCOM_RETRY_DELAY); + } + return 0; // Success +} + int sbbs_t::putcom(const char *str, size_t len) { size_t i; diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h index ff2dff0b180f511b05b286be607906890a19adfa..00d080c3b0672a7cc62eebc09080c2bc0fcb748b 100644 --- a/src/sbbs3/sbbs.h +++ b/src/sbbs3/sbbs.h @@ -347,7 +347,10 @@ public: pthread_mutex_t ssh_mutex; bool ssh_mutex_created; - int outcom(uchar ch); // send character + #define OUTCOM_RETRY_DELAY 80 // milliseconds + #define OUTCOM_RETRY_ATTEMPTS 1000 // 80 seconds + int _outcom(uchar ch); // send character, without retry (on buffer flow condition) + int outcom(uchar ch, int max_attempts = OUTCOM_RETRY_ATTEMPTS); // send character, with retry int incom(unsigned long timeout=0); // receive character void spymsg(const char *msg); // send message to active spies