TMXR: Fix logic to use single character output buffer for serial ports

This commit is contained in:
Mark Pizzolato 2016-07-14 08:01:03 -07:00
parent 236dbb253a
commit 553bc357b9

View file

@ -439,7 +439,7 @@ static u_char mantra[] = { /* Telnet Option Negotiation Mantra
TN_IAC, TN_DO, TN_BIN
};
#define TMXR_GUARD ((int32)(lp->serport ? 0 : sizeof(mantra)))/* buffer guard */
#define TMXR_GUARD ((int32)(lp->serport ? 1 : sizeof(mantra)))/* buffer guard */
/* Local routines */
@ -2029,7 +2029,7 @@ if ((lp->conn == FALSE) && /* no conn & not buffere
return SCPE_LOST;
}
tmxr_debug_trace_line (lp, "tmxr_putc_ln()");
#define TXBUF_AVAIL(lp) ((lp->serport ? 1: lp->txbsz) - tmxr_tqln (lp))
#define TXBUF_AVAIL(lp) ((lp->serport ? 2: lp->txbsz) - tmxr_tqln (lp))
#define TXBUF_CHAR(lp, c) { \
lp->txb[lp->txbpi++] = (char)(c); \
lp->txbpi %= lp->txbsz; \