ext.h:extern int	linemode;	/* linemode on/off */
ext.h:extern int	uselinemode;	/* what linemode to use (on/off) */
ext.h:extern int	alwayslinemode;	/* command line option */
ext.h:extern int	lmodetype;	/* Client support for linemode */
ext.h:extern char	*line;
ext.h:	tty_linemode P((void));
ext.h:	tty_setlinemode P((int)),
ext.h:	baseline,		/* time started to do timed action */
state.c:			 * printable line, and \n is the standard
state.c:				 * If we are operating in linemode,
state.c:				 * convert to local end-of-line.
state.c:				if (linemode && (ncc > 0) && (('\n' == nc) ||
state.c:			 * Handle RFC 10xx Telnet linemode option additions
state.c:	if (!linemode) {
state.c:			 * support the kludge linemode stuff.  If we
state.c:			 * determine kludge linemode support, process
state.c:			 * Handle the linemode kludge stuff.
state.c:			 * linemode at all, then we assume that this
state.c:			 * linemode in response to our query.  Set the
state.c:			 * linemode type that is to be supported, note
state.c:			 * that the client wishes to use linemode, and
state.c:			 * Note client's desire to use linemode.
state.c:			 * check for kludge linemode.  When the WONT TM
state.c:			 * arrives, linemode will be turned off and a
state.c:			 * linemode is off and send a WILL ECHO
state.c:			 * Note client's desire to use linemode.
state.c:			 * If real linemode is supported, then client is
state.c:			 * asking to turn linemode off.
state.c:			 * If kludge linemode is in use, then we must
state.c:			 * process an incoming do SGA for linemode
state.c:				 * linemode is the peer asking us to
state.c:				 * turn off linemode.  Make note of
state.c:				 * If linemode did not get turned off
state.c:				if (linemode)
state.c:			 * If kludge linemode is in use, then we
state.c:			 * linemode purposes.
state.c:				 * linemode on.
state.c:				 * If we did not turn line mode on,
state.c:	 * Process linemode suboptions.
sys_term.c: * array "line" contains the name of the slave side.
sys_term.c:static char Xline[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
sys_term.c:char *line = Xline;
sys_term.c:char *line = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
sys_term.c:char *myline = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
sys_term.c:		strcpy(line,ttydev);
sys_term.c:		strcpy(line, ptsname(p));
sys_term.c:	strcpy(line, ttyname(p));
sys_term.c:	    line = Xline;
sys_term.c:	    strcpy (line, tty_name);
sys_term.c:	(void) sprintf(line, "/dev/ptyXX");
sys_term.c:	p1 = &line[8];
sys_term.c:	p2 = &line[9];
sys_term.c:	(void) sprintf(line, "/dev/ptym/ptyXX");
sys_term.c:	p1 = &line[13];
sys_term.c:	p2 = &line[14];
sys_term.c:		if (stat(line, &stb) < 0)
sys_term.c:			p = open(line, 2);
sys_term.c:				line[5] = 't';
sys_term.c:				for (p1 = &line[8]; *p1; p1++)
sys_term.c:				line[9] = 't';
sys_term.c:				chown(line, 0, 0);
sys_term.c:				chmod(line, 0600);
sys_term.c:					chmod(line, 0666);
sys_term.c:					line[5] = 'p';
sys_term.c:					for (p1 = &line[8]; b; p1++) {
sys_term.c:					line[10] = 't';
sys_term.c:		(void) sprintf(myline, "/dev/pty/%03d", *ptynum);
sys_term.c:		p = open(myline, 2);
sys_term.c:		(void) sprintf(line, "/dev/ttyp%03d", *ptynum);
sys_term.c:		 * are no listeners lurking on the line.
sys_term.c:		if(stat(line, &sb) < 0) {
sys_term.c:			chown(line, 0, 0);
sys_term.c:			chmod(line, 0600);
sys_term.c:			p = open(myline, 2);
sys_term.c:		if (access(line, 6) == 0)
sys_term.c: * tty_linemode()	Find out if linemode (external processing) is enabled.
sys_term.c: * tty_setlinemod(on)	Turn on/off linemode.
sys_term.c: * tty_isediting()	Find out if line editing is enabled.
sys_term.c: * tty_setedit(on)	Turn on/off line editing.
sys_term.c:static int linestate;
sys_term.c:tty_linemode()
sys_term.c:	return(linestate);
sys_term.c:tty_setlinemode(on)
sys_term.c:	linestate = on;
sys_term.c:cleanopen(char *line);
sys_term.c:	 * 	if linemode was turned on
sys_term.c:	waslm = tty_linemode();
sys_term.c:	t = cleanopen(line);
sys_term.c:		fatalperror(net, line);
sys_term.c:		tty_setlinemode(1);
sys_term.c:cleanopen(line)
sys_term.c:	char *line;
sys_term.c:	(void) chown(line, 0, 0);
sys_term.c:	(void) chmod(line, 0600);
sys_term.c:	(void) revoke(line);
sys_term.c:		if (secstat(line, &secbuf) < 0)
sys_term.c:	t = open(line, O_RDWR|O_NOCTTY);
sys_term.c:	t = open(line, O_RDWR|O_NOCTTY);
sys_term.c:			if (secstat(line, &secbuf) < 0)
sys_term.c:		i = open(line, O_RDWR);
sys_term.c:	close(open(line, O_RDWR));
sys_term.c:		SCPYN(wtmp.ut_line, line + sizeof("/dev/") - 1);
sys_term.c:		SCPYN(wtmp.ut_id, wtmp.ut_line+3);
sys_term.c:		SCPYN(wtmp.ut_id, wtmp.ut_line+7);
sys_term.c:		pututline(&wtmp);
sys_term.c:	SCPYN(request.tty_id, &line[8]);
sys_term.c:		sprintf(tbuf, "telnetd: waiting for /etc/init to start login process on %s\r\n", line);
sys_term.c:	SCPYN(utmpx.ut_line, line + sizeof("/dev/") - 1);
sys_term.c:					 * Write a newline to ensure
sys_term.c:					 * read the line...
sys_term.c:rmut (char *line);
sys_term.c:	p = line + sizeof("/dev/") - 1;
sys_term.c:	(void)chmod(line, 0666);
sys_term.c:	(void)chown(line, 0, 0);
sys_term.c:	(void)chmod(line, 0666);
sys_term.c:	(void)chown(line, 0, 0);
sys_term.c:        rmut(line);
sys_term.c:	SCPYN(utmpx.ut_line, line + sizeof("/dev/") - 1);
sys_term.c:	utxp = getutxline(&utmpx);
sys_term.c:				if (SCMPN(u->ut_line, line+5) ||
sys_term.c:			SCPYN(wtmp.ut_line, line+5);
sys_term.c:	(void) chmod(line, 0666);
sys_term.c:	(void) chown(line, 0, 0);
sys_term.c:	line[strlen("/dev/")] = 'p';
sys_term.c:	(void) chmod(line, 0666);
sys_term.c:	(void) chown(line, 0, 0);
sys_term.c:rmut (line)
sys_term.c:char *line;
sys_term.c:	(void) strncpy(utmp.ut_id, line+12, sizeof(utmp.ut_id));
sys_term.c:		(void) pututline(utptr);
sys_term.c:	(void) chmod(line, 0666);
sys_term.c:	(void) chown(line, 0, 0);
sys_term.c:	line[14] = line[13];
sys_term.c:	line[13] = line[12];
sys_term.c:	line[8] = 'm';
sys_term.c:	line[9] = '/';
sys_term.c:	line[10] = 'p';
sys_term.c:	line[11] = 't';
sys_term.c:	line[12] = 'y';
sys_term.c:	(void) chmod(line, 0666);
sys_term.c:	(void) chown(line, 0, 0);
telnetd.c:			alwayslinemode = 1;
telnetd.c:			/* ignore -k option if built without kludge linemode */
telnetd.c:    settimer(baseline);
telnetd.c:	while (sequenceIs(tspeedsubopt, baseline))
telnetd.c:	while (sequenceIs(xdisplocsubopt, baseline))
telnetd.c:	while (sequenceIs(environsubopt, baseline))
telnetd.c:	while (sequenceIs(oenvironsubopt, baseline))
telnetd.c:	while (sequenceIs(ttypesubopt, baseline))
telnetd.c:    settimer(baseline);
telnetd.c:    while (sequenceIs(ttypesubopt, baseline))
telnetd.c: * Get a pty, scan input lines.
telnetd.c:		extern char *line, *getpty();
telnetd.c:			strcpy(line,lp);
telnetd.c:			line[5] = 't';
telnetd.c:	 *	set ttyp line security label 
telnetd.c:		/* Query the peer for linemode support by trying to negotiate
telnetd.c:		 * the linemode option.
telnetd.c:		linemode = 0;
telnetd.c:		send_do(TELOPT_LINEMODE, 1);  /* send do linemode */
telnetd.c:	 * Continuing line mode support.  If client does not support
telnetd.c:	 * real linemode, attempt to negotiate kludge linemode by sending
telnetd.c:	 * linemode negotiation.
telnetd.c:				if (!uselinemode) {
telnetd.c:		if (!uselinemode && unpcc) {
termstat.c: * This function handles all management of linemode.
termstat.c: * and send only complete lines to the server.  Linemode state is
termstat.c: * external processing, then we can use linemode.  Further, if we
termstat.c: * can use real linemode, then we can look at the edit control bits
termstat.c: * current and desired linemode state.
termstat.c: *	alwayslinemode : true if -l was specified on the telnetd
termstat.c: * 	command line.  It means to have linemode on as much as
termstat.c: *	handle real linemode, or if use of kludgeomatic linemode
termstat.c: *		REAL_LINEMODE : use linemode option
termstat.c: *		NO_KLUDGE : don't initiate kludge linemode.
termstat.c: *		KLUDGE_LINEMODE : use kludge linemode
termstat.c: *		NO_LINEMODE : client is ignorant of linemode
termstat.c: *	linemode, uselinemode : linemode is true if linemode
termstat.c: *	is currently on, uselinemode is the state that we wish
termstat.c: *	to be in.  If another function wishes to turn linemode
termstat.c: *	on or off, it sets or clears uselinemode.
termstat.c: *	editmode, useeditmode : like linemode/uselinemode, but
termstat.c: *	linemode:
termstat.c: *		In real linemode, this corresponds to whether the pty
termstat.c: *		In kludge linemode, this more closely corresponds to the
termstat.c: *		If the -l option was specified (alwayslinemode), then
termstat.c: * The following heuristics are applied to determine linemode
termstat.c: *	   to negotiate the linemode option.  If this succeeds
termstat.c: *	   then lmodetype is set to REAL_LINEMODE and all linemode
termstat.c: *	   processing occurs in the context of the linemode option.
termstat.c: *	2) If the attempt to negotiate the linemode option failed,
termstat.c: *	   and the "-k" (don't initiate kludge linemode) isn't set,
termstat.c: *	   then we try to use kludge linemode.  We test for this
termstat.c: *	   understands kludge linemode (ech!) and the
termstat.c: *	3) Otherwise, linemode is not supported at all and
termstat.c: *	   state of linemode support in the client, we move to that
termstat.c: *	   linemode support.
termstat.c: * A short explanation of kludge linemode is in order here.
termstat.c: *	1) The heuristic to determine support for kludge linemode
termstat.c: *	   that supports timing marks also supports kludge linemode.
termstat.c: *	2) Further negotiation of linemode is done by changing the
termstat.c: *	   then linemode is off, if server won't SGA, then linemode
termstat.c:	 * Check linemode on/off state
termstat.c:	uselinemode = tty_linemode();
termstat.c:	 * If alwayslinemode is on, and pty is changing to turn it off, then
termstat.c:	 * force linemode back on.
termstat.c:	if (alwayslinemode && linemode && !uselinemode) {
termstat.c:		uselinemode = 1;
termstat.c:		tty_setlinemode(uselinemode);
termstat.c:		if (uselinemode && !tty_isecho() && tty_isediting()
termstat.c:	 * linemode is going to be.
termstat.c:	 * will echo if in character mode, but in linemode the
termstat.c:	if (uselinemode) {
termstat.c:	 * If linemode is being turned off, send appropriate
termstat.c:	 if (!uselinemode && linemode) {
termstat.c:		linemode = uselinemode;
termstat.c:	 * If using real linemode check edit modes for possible later use.
termstat.c:	 * If we are in kludge linemode, do the SGA negotiation.
termstat.c:		if (tty_isediting() && uselinemode)
termstat.c:	 * Negotiate linemode on if pty state has changed to turn it on.
termstat.c:	if (uselinemode && !linemode) {
termstat.c:		linemode = uselinemode;
termstat.c:	 * real linemode.
termstat.c:	if (linemode && his_state_is_will(TELOPT_LINEMODE)) {
termstat.c: * Process linemode related requests from the client.
termstat.c: * Client can request a change to only one of linemode, editmode or slc's
termstat.c: * at a time, and if using kludge linemode, then only linemode may be
termstat.c:		uselinemode = (parm1 == WILL);
termstat.c:		if (uselinemode != linemode) {
termstat.c:			 * If using kludge linemode, make sure that
termstat.c:			 * We can not turn off linemode if alwayslinemode
termstat.c:				if (alwayslinemode && tty_isediting()) {
termstat.c:					uselinemode = 1;
termstat.c:			if (uselinemode == linemode)
termstat.c:			 * If using real linemode and linemode is being
termstat.c:			if (lmodetype == REAL_LINEMODE && uselinemode)
termstat.c:			if (uselinemode)
termstat.c:			tty_setlinemode(uselinemode);
termstat.c:			linemode = uselinemode;
termstat.c:			if (!linemode)
utility.c: * This is split on two lines so that SCCS will not see the M
utility.c:			slash = index(line+1, '/');
utility.c:			slash = rindex(line, '/');
utility.c:				putstr(line);
utility.c:		/* add a line of output */
