summaryrefslogtreecommitdiffstats
path: root/usr.bin/telnet/terminal.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-11-30 22:09:10 +0000
committermarkm <markm@FreeBSD.org>2001-11-30 22:09:10 +0000
commit57acab063b3ef9760ddafee33cca79b6f179421a (patch)
tree872c39a50cab6fcadd1ac8e8806bfb0b5f2c9bd9 /usr.bin/telnet/terminal.c
parentb72e252a0180e401fa4d5bd71ab4374f6f6e2735 (diff)
downloadFreeBSD-src-57acab063b3ef9760ddafee33cca79b6f179421a.zip
FreeBSD-src-57acab063b3ef9760ddafee33cca79b6f179421a.tar.gz
After running "make unifdef", commit the result. This code is now
a complete subset of the crypto (master) code.
Diffstat (limited to 'usr.bin/telnet/terminal.c')
-rw-r--r--usr.bin/telnet/terminal.c42
1 files changed, 17 insertions, 25 deletions
diff --git a/usr.bin/telnet/terminal.c b/usr.bin/telnet/terminal.c
index 4464681..14eb0ff 100644
--- a/usr.bin/telnet/terminal.c
+++ b/usr.bin/telnet/terminal.c
@@ -31,14 +31,13 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+
+__FBSDID("$FreeBSD$");
+
#ifndef lint
-#if 0
static const char sccsid[] = "@(#)terminal.c 8.2 (Berkeley) 2/16/95";
-#else
-static const char rcsid[] =
- "$FreeBSD$";
#endif
-#endif /* not lint */
#include <arpa/telnet.h>
#include <sys/types.h>
@@ -48,6 +47,7 @@ static const char rcsid[] =
#include "externs.h"
#include "types.h"
+
Ring ttyoring, ttyiring;
unsigned char ttyobuf[2*BUFSIZ], ttyibuf[BUFSIZ];
@@ -93,8 +93,8 @@ cc_t termAytChar;
* initialize the terminal data structures.
*/
- void
-init_terminal()
+void
+init_terminal(void)
{
if (ring_init(&ttyoring, ttyobuf, sizeof ttyobuf) != 1) {
exit(1);
@@ -105,7 +105,6 @@ init_terminal()
autoflush = TerminalAutoFlush();
}
-
/*
* Send as much data as possible to the terminal.
*
@@ -116,12 +115,10 @@ init_terminal()
* n: All data - n was written out.
*/
-
- int
-ttyflush(drop)
- int drop;
+int
+ttyflush(int drop)
{
- register int n, n0, n1;
+ int n, n0, n1;
n0 = ring_full_count(&ttyoring);
if ((n1 = n = ring_full_consecutive(&ttyoring)) > 0) {
@@ -167,8 +164,8 @@ ttyflush(drop)
*/
- int
-getconnmode()
+int
+getconnmode(void)
{
extern int linemode;
int mode = 0;
@@ -176,9 +173,6 @@ getconnmode()
extern int kludgelinemode;
#endif
- if (In3270)
- return(MODE_FLOW);
-
if (my_want_state_is_dont(TELOPT_ECHO))
mode |= MODE_ECHO;
@@ -207,11 +201,10 @@ getconnmode()
return(mode);
}
- void
-setconnmode(force)
- int force;
+void
+setconnmode(int force)
{
- register int newmode;
+ int newmode;
newmode = getconnmode()|(force?MODE_FORCE:0);
@@ -220,9 +213,8 @@ setconnmode(force)
}
-
- void
-setcommandmode()
+void
+setcommandmode(void)
{
TerminalNewMode(-1);
}
OpenPOWER on IntegriCloud