date and time created 87/10/06 00:36:06 by edward
[unix-history] / usr / src / usr.bin / telnet / defines.h
#define settimer(x) clocks.x = clocks.system++
#if !defined(TN3270)
#define ExitString(f,s,r) { fprintf(f, s); exit(r); }
#define Exit(x) exit(x)
#define SetIn3270()
#endif /* !defined(TN3270) */
#define NETADD(c) { *nfrontp++ = c; }
#define NET2ADD(c1,c2) { NETADD(c1); NETADD(c2); }
#define NETLOC() (nfrontp)
#define NETMAX() (netobuf+sizeof netobuf-1)
#define NETBYTES() (nfrontp-nbackp)
#define NETROOM() (NETMAX()-NETLOC()+1)
#define TTYADD(c) { if (!(SYNCHing||flushout)) { *tfrontp++ = c; } }
#define TTYLOC() (tfrontp)
#define TTYMAX() (ttyobuf+sizeof ttyobuf-1)
#define TTYMIN() (netobuf)
#define TTYBYTES() (tfrontp-tbackp)
#define TTYROOM() (TTYMAX()-TTYLOC()+1)
/* Various modes */
#define MODE_LINE(m) (modelist[m].modetype & LINE)
#define MODE_LOCAL_CHARS(m) (modelist[m].modetype & LOCAL_CHARS)
#define MODE_LOCAL_ECHO(m) (modelist[m].modetype & LOCAL_ECHO)
#define MODE_COMMAND_LINE(m) (modelist[m].modetype & COMMAND_LINE)
#define LOCAL_CHARS 0x01 /* Characters processed locally */
#define LINE 0x02 /* Line-by-line mode of operation */
#define LOCAL_ECHO 0x04 /* Echoing locally */
#define COMMAND_LINE 0x08 /* Command line mode */