亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? termstat.c

?? 早期freebsd實現
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright (c) 1989, 1993 *	The Regents of the University of California.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */#ifndef lintstatic char sccsid[] = "@(#)termstat.c	8.1 (Berkeley) 6/4/93";#endif /* not lint */#include "telnetd.h"/* * local variables */int def_tspeed = -1, def_rspeed = -1;#ifdef	TIOCSWINSZint def_row = 0, def_col = 0;#endif#ifdef	LINEMODEstatic int _terminit = 0;#endif	/* LINEMODE */#if	defined(CRAY2) && defined(UNICOS5)int	newmap = 1;	/* nonzero if \n maps to ^M^J */#endif#ifdef	LINEMODE/* * localstat * * This function handles all management of linemode. * * Linemode allows the client to do the local editing of data * and send only complete lines to the server.  Linemode state is * based on the state of the pty driver.  If the pty is set for * external processing, then we can use linemode.  Further, if we * can use real linemode, then we can look at the edit control bits * in the pty to determine what editing the client should do. * * Linemode support uses the following state flags to keep track of * current and desired linemode state. *	alwayslinemode : true if -l was specified on the telnetd * 	command line.  It means to have linemode on as much as *	possible. * * 	lmodetype: signifies whether the client can *	handle real linemode, or if use of kludgeomatic linemode *	is preferred.  It will be set to one of the following: *		REAL_LINEMODE : use linemode option *		NO_KLUDGE : don't initiate kludge linemode. *		KLUDGE_LINEMODE : use kludge linemode *		NO_LINEMODE : client is ignorant of linemode * *	linemode, uselinemode : linemode is true if linemode *	is currently on, uselinemode is the state that we wish *	to be in.  If another function wishes to turn linemode *	on or off, it sets or clears uselinemode. * *	editmode, useeditmode : like linemode/uselinemode, but *	these contain the edit mode states (edit and trapsig). * * The state variables correspond to some of the state information * in the pty. *	linemode: *		In real linemode, this corresponds to whether the pty *		expects external processing of incoming data. *		In kludge linemode, this more closely corresponds to the *		whether normal processing is on or not.  (ICANON in *		system V, or COOKED mode in BSD.) *		If the -l option was specified (alwayslinemode), then *		an attempt is made to force external processing on at *		all times. * * The following heuristics are applied to determine linemode * handling within the server. *	1) Early on in starting up the server, an attempt is made *	   to negotiate the linemode option.  If this succeeds *	   then lmodetype is set to REAL_LINEMODE and all linemode *	   processing occurs in the context of the linemode option. *	2) If the attempt to negotiate the linemode option failed, *	   and the "-k" (don't initiate kludge linemode) isn't set, *	   then we try to use kludge linemode.  We test for this *	   capability by sending "do Timing Mark".  If a positive *	   response comes back, then we assume that the client *	   understands kludge linemode (ech!) and the *	   lmodetype flag is set to KLUDGE_LINEMODE. *	3) Otherwise, linemode is not supported at all and *	   lmodetype remains set to NO_LINEMODE (which happens *	   to be 0 for convenience). *	4) At any time a command arrives that implies a higher *	   state of linemode support in the client, we move to that *	   linemode support. * * A short explanation of kludge linemode is in order here. *	1) The heuristic to determine support for kludge linemode *	   is to send a do timing mark.  We assume that a client *	   that supports timing marks also supports kludge linemode. *	   A risky proposition at best. *	2) Further negotiation of linemode is done by changing the *	   the server's state regarding SGA.  If server will SGA, *	   then linemode is off, if server won't SGA, then linemode *	   is on. */	voidlocalstat(){	void netflush();	int need_will_echo = 0;#if	defined(CRAY2) && defined(UNICOS5)	/*	 * Keep track of that ol' CR/NL mapping while we're in the	 * neighborhood.	 */	newmap = tty_isnewmap();#endif	/* defined(CRAY2) && defined(UNICOS5) */	/*	 * Check for state of BINARY options.	 */	if (tty_isbinaryin()) {		if (his_want_state_is_wont(TELOPT_BINARY))			send_do(TELOPT_BINARY, 1);	} else {		if (his_want_state_is_will(TELOPT_BINARY))			send_dont(TELOPT_BINARY, 1);	}	if (tty_isbinaryout()) {		if (my_want_state_is_wont(TELOPT_BINARY))			send_will(TELOPT_BINARY, 1);	} else {		if (my_want_state_is_will(TELOPT_BINARY))			send_wont(TELOPT_BINARY, 1);	}	/*	 * Check for changes to flow control if client supports it.	 */	flowstat();	/*	 * Check linemode on/off state	 */	uselinemode = tty_linemode();	/*	 * If alwayslinemode is on, and pty is changing to turn it off, then	 * force linemode back on.	 */	if (alwayslinemode && linemode && !uselinemode) {		uselinemode = 1;		tty_setlinemode(uselinemode);	}#ifdef	ENCRYPTION	/*	 * If the terminal is not echoing, but editing is enabled,	 * something like password input is going to happen, so	 * if we the other side is not currently sending encrypted	 * data, ask the other side to start encrypting.	 */	if (his_state_is_will(TELOPT_ENCRYPT)) {		static int enc_passwd = 0;		if (uselinemode && !tty_isecho() && tty_isediting()		    && (enc_passwd == 0) && !decrypt_input) {			encrypt_send_request_start();			enc_passwd = 1;		} else if (enc_passwd) {			encrypt_send_request_end();			enc_passwd = 0;		}	}#endif	/* ENCRYPTION */	/*	 * Do echo mode handling as soon as we know what the	 * linemode is going to be.	 * If the pty has echo turned off, then tell the client that	 * the server will echo.  If echo is on, then the server	 * will echo if in character mode, but in linemode the	 * client should do local echoing.  The state machine will	 * not send anything if it is unnecessary, so don't worry	 * about that here.	 *	 * If we need to send the WILL ECHO (because echo is off),	 * then delay that until after we have changed the MODE.	 * This way, when the user is turning off both editing	 * and echo, the client will get editing turned off first.	 * This keeps the client from going into encryption mode	 * and then right back out if it is doing auto-encryption	 * when passwords are being typed.	 */	if (uselinemode) {		if (tty_isecho())			send_wont(TELOPT_ECHO, 1);		else			need_will_echo = 1;#ifdef	KLUDGELINEMODE		if (lmodetype == KLUDGE_OK)			lmodetype = KLUDGE_LINEMODE;#endif	}	/*	 * If linemode is being turned off, send appropriate	 * command and then we're all done.	 */	 if (!uselinemode && linemode) {# ifdef	KLUDGELINEMODE		if (lmodetype == REAL_LINEMODE) {# endif	/* KLUDGELINEMODE */			send_dont(TELOPT_LINEMODE, 1);# ifdef	KLUDGELINEMODE		} else if (lmodetype == KLUDGE_LINEMODE)			send_will(TELOPT_SGA, 1);# endif	/* KLUDGELINEMODE */		send_will(TELOPT_ECHO, 1);		linemode = uselinemode;		goto done;	}# ifdef	KLUDGELINEMODE	/*	 * If using real linemode check edit modes for possible later use.	 * If we are in kludge linemode, do the SGA negotiation.	 */	if (lmodetype == REAL_LINEMODE) {# endif	/* KLUDGELINEMODE */		useeditmode = 0;		if (tty_isediting())			useeditmode |= MODE_EDIT;		if (tty_istrapsig())			useeditmode |= MODE_TRAPSIG;		if (tty_issofttab())			useeditmode |= MODE_SOFT_TAB;		if (tty_islitecho())			useeditmode |= MODE_LIT_ECHO;# ifdef	KLUDGELINEMODE	} else if (lmodetype == KLUDGE_LINEMODE) {		if (tty_isediting() && uselinemode)			send_wont(TELOPT_SGA, 1);		else			send_will(TELOPT_SGA, 1);	}# endif	/* KLUDGELINEMODE */	/*	 * Negotiate linemode on if pty state has changed to turn it on.	 * Send appropriate command and send along edit mode, then all done.	 */	if (uselinemode && !linemode) {# ifdef	KLUDGELINEMODE		if (lmodetype == KLUDGE_LINEMODE) {			send_wont(TELOPT_SGA, 1);		} else if (lmodetype == REAL_LINEMODE) {# endif	/* KLUDGELINEMODE */			send_do(TELOPT_LINEMODE, 1);			/* send along edit modes */			(void) sprintf(nfrontp, "%c%c%c%c%c%c%c", IAC, SB,				TELOPT_LINEMODE, LM_MODE, useeditmode,				IAC, SE);			nfrontp += 7;			editmode = useeditmode;# ifdef	KLUDGELINEMODE		}# endif	/* KLUDGELINEMODE */		linemode = uselinemode;		goto done;	}# ifdef	KLUDGELINEMODE	/*	 * None of what follows is of any value if not using	 * real linemode.	 */	if (lmodetype < REAL_LINEMODE)		goto done;# endif	/* KLUDGELINEMODE */	if (linemode && his_state_is_will(TELOPT_LINEMODE)) {		/*		 * If edit mode changed, send edit mode.		 */		 if (useeditmode != editmode) {			/*			 * Send along appropriate edit mode mask.			 */			(void) sprintf(nfrontp, "%c%c%c%c%c%c%c", IAC, SB,				TELOPT_LINEMODE, LM_MODE, useeditmode,				IAC, SE);			nfrontp += 7;			editmode = useeditmode;		}									/*		 * Check for changes to special characters in use.		 */		start_slc(0);		check_slc();		(void) end_slc(0);	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美xxx久久| 欧美一区二区三区视频在线观看 | 国内精品久久久久影院薰衣草 | 视频一区在线视频| 亚洲国产精品久久一线不卡| 成人欧美一区二区三区小说| 国产精品视频第一区| 国产精品免费av| 国产精品久久久久久久久久免费看| 久久精品亚洲精品国产欧美kt∨| 91精品国产91热久久久做人人| 欧美精品乱码久久久久久按摩| 欧美日韩电影在线播放| 91精品国产欧美一区二区| 日韩一级精品视频在线观看| 精品欧美乱码久久久久久| 亚洲精品一区二区三区影院 | 综合在线观看色| 一区二区三区国产精品| 亚洲第一在线综合网站| 免费观看一级特黄欧美大片| 国产精品996| 99久久综合国产精品| 精品视频在线免费观看| 日韩亚洲欧美综合| 国产精品麻豆一区二区| 亚洲综合av网| aaa亚洲精品一二三区| 99视频国产精品| 欧美另类高清zo欧美| 国产午夜精品美女毛片视频| 综合精品久久久| 久久疯狂做爰流白浆xx| av欧美精品.com| 7799精品视频| 国产精品三级电影| 日本亚洲欧美天堂免费| 成人黄色小视频在线观看| 欧美日韩和欧美的一区二区| 久久综合久色欧美综合狠狠| 一区二区三区电影在线播| 久久精品国产一区二区三区免费看| 成人午夜在线免费| 欧美一区二区不卡视频| 中文字幕视频一区| 久久精品久久99精品久久| 欧美在线播放高清精品| 欧美激情在线一区二区| 奇米色一区二区| 91国偷自产一区二区使用方法| 欧美精品一区男女天堂| 亚洲综合在线第一页| 国产成人综合亚洲91猫咪| 欧美高清www午色夜在线视频| 国产精品天干天干在观线| 久久精品99国产精品| 在线观看www91| 亚洲欧洲av另类| 风间由美一区二区三区在线观看| 欧美一区二区网站| 亚洲第一成人在线| 色偷偷久久人人79超碰人人澡| 久久九九久久九九| 麻豆成人久久精品二区三区红 | 欧美蜜桃一区二区三区| 中文字幕亚洲区| 成人av网站在线观看免费| 久久这里只有精品6| 激情综合网天天干| 国产精品国产馆在线真实露脸| 免费日本视频一区| 欧美日韩不卡一区二区| 亚洲高清视频中文字幕| 欧美午夜不卡在线观看免费| 中文字幕一区二区三区蜜月| 成人精品免费看| 国产精品色呦呦| 99久久99久久精品国产片果冻| 久久一区二区视频| 国产99久久精品| 久久久亚洲欧洲日产国码αv| 精品一区二区在线看| 精品久久久久久综合日本欧美| 美女爽到高潮91| 欧美精品一区二区三| 国产精品亚洲专一区二区三区 | 成人的网站免费观看| www激情久久| 国产v综合v亚洲欧| 欧美激情一区二区三区蜜桃视频| 高清久久久久久| 国产精品国产三级国产aⅴ无密码| 白白色 亚洲乱淫| 亚洲激情图片一区| 欧美福利一区二区| 国产精一区二区三区| 中文av字幕一区| 欧美专区亚洲专区| 麻豆精品视频在线观看免费| 国产无一区二区| 欧美伊人久久久久久久久影院 | 久久精品国产一区二区| 亚洲成人精品一区| 日韩一区二区免费在线观看| 国产乱妇无码大片在线观看| 国产精品成人在线观看| 欧美日韩一区二区在线观看| 久久国产精品无码网站| 国产精品久久久久影视| 欧美日韩不卡一区| 国产成人精品一区二区三区网站观看 | 91农村精品一区二区在线| 亚洲综合男人的天堂| 日韩天堂在线观看| 不卡免费追剧大全电视剧网站| 亚洲国产精品精华液网站| 精品av久久707| 日本黄色一区二区| 国内精品久久久久影院色| 亚洲精品日韩综合观看成人91| 日韩欧美激情四射| 一本一道波多野结衣一区二区| 裸体健美xxxx欧美裸体表演| 亚洲天堂成人在线观看| 久久人人97超碰com| 精品视频资源站| 91天堂素人约啪| 国产精华液一区二区三区| 天天综合网天天综合色| 国产精品久久久久影院| 2020国产精品自拍| 欧美日韩国产小视频| 99re8在线精品视频免费播放| 国内久久精品视频| 日韩成人免费在线| 亚洲成av人**亚洲成av**| 中文字幕第一区第二区| 欧美精品一区二区三区视频| 精品视频在线免费看| 91老司机福利 在线| 不卡一区二区三区四区| 国产精品99久久久久久宅男| 免费观看成人av| 日本不卡高清视频| 午夜精品久久久久久不卡8050| 亚洲精品欧美专区| 亚洲色图在线看| 亚洲精品视频一区二区| 中文字幕一区二区三区乱码在线| 国产精品久久久久久户外露出| 国产午夜精品久久久久久久| 精品sm在线观看| 国产欧美日韩在线| 国产午夜三级一区二区三| 国产午夜一区二区三区| 欧美精品一区二区高清在线观看| 欧美xxxx老人做受| 久久久精品国产99久久精品芒果| 亚洲精品一线二线三线无人区| 欧美大片顶级少妇| 欧美成人精品1314www| 亚洲精品一区在线观看| 久久久99精品免费观看不卡| 久久一二三国产| 国产亚洲欧洲997久久综合| 欧美激情综合五月色丁香小说| 欧美高清在线精品一区| 亚洲日本乱码在线观看| 亚洲一区二区三区四区在线 | 久久久久久久久99精品| 国产欧美一区二区精品性色 | 色先锋久久av资源部| 欧美性一区二区| 欧美一二三区精品| 久久久不卡网国产精品一区| 国产精品久久久久影院亚瑟 | 成人自拍视频在线| 91视频国产资源| 日韩一区二区三区四区| 国产色91在线| 一级女性全黄久久生活片免费| 视频在线观看一区| 国产精一品亚洲二区在线视频| 99国产精品一区| 91精品国产综合久久国产大片| 久久精品一区二区三区不卡| 亚洲欧美在线观看| 国产成人精品三级| 色先锋资源久久综合| 日韩女优av电影| 亚洲天堂成人网| 精品一区二区三区的国产在线播放| 成人毛片在线观看| 欧美xingq一区二区| 亚洲欧洲综合另类| 精品一区在线看| 欧美日韩亚洲另类| 成人免费在线视频观看| 久久成人精品无人区| 欧美亚洲另类激情小说|