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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? curses.c

?? 通訊程序源碼
?? C
字號:
/* * Miscellaneous curses(3) routines. */#define STR_WIDTH	256#define NUM_WIDTH	16#include <stdio.h>#include <curses.h>#include <signal.h>#include "config.h"#include "misc.h"#include "status.h"#ifdef BSD#include <setjmp.h>jmp_buf wk_buf;#endif /* BSD */#ifndef OLDCURSES#include <term.h>#else /* OLDCURSES */#ifdef UNIXPC#include <sgtty.h>#endif /* UNIXPC */#endif /* OLDCURSES *//* * Get a string from a window.  Similar to wgetstr(), except we limit * the length, return a NULL (not pointer to NULL) on <ESC> key, beep * at any character in "disallow" string, and beep at any character not * in "allow". (It doesn't make sense to use both "allow" and "disallow" * at the same time).  Returns a pointer to a static area. */char *get_str(win, num, allow, disallow)WINDOW *win;int num;char *allow, *disallow;{	int count, x, y;	char ans, *strchr();	static char buf[STR_WIDTH];	count = 0;	while ((ans = wgetch(win)) != '\r') {					/* do our own backspace */		if (ans == BS || ans == DEL) {			if (!count) {				beep();				continue;			}			count--;			buf[count] = '\0';			getyx(win, y, x);			x--;			wmove(win, y, x);			waddch(win, (chtype) ' ');			wmove(win, y, x);			wrefresh(win);			continue;		}					/* an <ESC> anywhere in the string */		if (ans == ESC)			return(NULL);					/* illegal character? */		if (*disallow != '\0' && strchr(disallow, ans)) {			beep();			continue;		}		if (*allow != '\0' && !strchr(allow, ans)) {			beep();			continue;		}					/* exceeded the max? */		if (count >= num || count >= STR_WIDTH) {			beep();			continue;		}		buf[count] = ans;		waddch(win, (chtype) ans);		wrefresh(win);		count++;	}	buf[count] = '\0';	return(buf);}/* * Get a number from a window.  We limit the length and return a -1 * on <ESC> key. */intget_num(win, num)WINDOW *win;int num;{	int count, x, y, number;	char ans, buf[NUM_WIDTH];	count = 0;	while ((ans = wgetch(win)) != '\r') {					/* do our own backspace */		if (ans == BS || ans == DEL) {			if (!count) {				beep();				continue;			}			count--;			buf[count] = '\0';			getyx(win, y, x);			x--;			wmove(win, y, x);			waddch(win, (chtype) ' ');			wmove(win, y, x);			wrefresh(win);			continue;		}					/* an <ESC> anywhere in the string */		if (ans == ESC)			return(-1);					/* only digits are allowed */		if (ans < '0' || ans > '9') {			beep();			continue;		}					/* exceeded the max? */		if (count >= num || count >= NUM_WIDTH) {			beep();			continue;		}		buf[count] = ans;		waddch(win, (chtype) ans);		wrefresh(win);		count++;	}	buf[count] = '\0';	number = atoi(buf);	return(number);}/* * Change video attributes while printing a string.  The use of the * pre-processor definition NOPROMOTE (located in config.h) means that * strings will be printed without any special video attribute if the * requested capability doesn't exist. */wattrstr(win, attr, str)WINDOW *win;chtype attr;char *str;{	int do_it;					/* if nothing, do nothing */	if (str == NULL || *str == '\0')		return(0);#ifdef OLDCURSES	if (attr)		wstandout(win);	waddstr(win, str);	if (attr)		wstandend(win);#else /* OLDCURSES */#ifdef NOPROMOTE					/* does the capability exist? */	do_it = 0;	if ((attr & A_STANDOUT) && enter_standout_mode)		do_it++;	if ((attr & A_UNDERLINE) && enter_underline_mode)		do_it++;	if ((attr & A_REVERSE) && (enter_reverse_mode || enter_standout_mode))		do_it++;	if ((attr & A_BLINK) && enter_blink_mode)		do_it++;	if ((attr & A_BOLD) && enter_bold_mode)		do_it++;	if ((attr & A_DIM) && enter_dim_mode)		do_it++;#else /* NOPROMOTE */	do_it = 1;#endif /* NOPROMOTE */	if (do_it)		wattron(win, attr);					/* print the string */	waddstr(win, str);	if (do_it)		wattroff(win, attr);#endif /* OLDCURSES */	return(0);}/* * Change video attributes while printing a character. */wattrch(win, attr, c)WINDOW *win;chtype attr;char c;{	int do_it;	if (c == '\0')		return(0);#ifdef OLDCURSES	if (attr)		wstandout(win);	waddch(win, (chtype) c);	if (attr)		wstandend(win);#else /* OLDCURSES */#ifdef NOPROMOTE					/* does the capability exist? */	do_it = 0;	if ((attr & A_STANDOUT) && enter_standout_mode)		do_it++;	if ((attr & A_UNDERLINE) && enter_underline_mode)		do_it++;	if ((attr & A_REVERSE) && (enter_reverse_mode || enter_standout_mode))		do_it++;	if ((attr & A_BLINK) && enter_blink_mode)		do_it++;	if ((attr & A_BOLD) && enter_bold_mode)		do_it++;	if ((attr & A_DIM) && enter_dim_mode)		do_it++;#else /* NOPROMOTE */	do_it = 1;#endif /* NOPROMOTE */	if (do_it)		wattron(win, attr);					/* print the character */	waddch(win, (chtype) c);	if (do_it)		wattroff(win, attr);#endif /* OLDCURSES */	return(0);}/* * Change video attributes while printing a number. */wattrnum(win, attr, num)WINDOW *win;chtype attr;int num;{	int do_it;	char buf[40];	sprintf(buf, "%d", num);#ifdef OLDCURSES	if (attr)		wstandout(win);	waddstr(win, buf);	if (attr)		wstandend(win);#else /* OLDCURSES */#ifdef NOPROMOTE					/* does the capability exist? */	do_it = 0;	if ((attr & A_STANDOUT) && enter_standout_mode)		do_it++;	if ((attr & A_UNDERLINE) && enter_underline_mode)		do_it++;	if ((attr & A_REVERSE) && (enter_reverse_mode || enter_standout_mode))		do_it++;	if ((attr & A_BLINK) && enter_blink_mode)		do_it++;	if ((attr & A_BOLD) && enter_bold_mode)		do_it++;	if ((attr & A_DIM) && enter_dim_mode)		do_it++;#else /* NOPROMOTE */	do_it = 1;#endif /* NOPROMOTE */	if (do_it)		wattron(win, attr);					/* print the character */	waddstr(win, buf);	if (do_it)		wattroff(win, attr);#endif /* OLDCURSES */	return(0);}/* * Prompt for a Yes or No answer.  Echo the single key input as words. * Handle the funny cursor movement problems with magic cookie terminals. * Returns a 1 on yes. */intyes_prompt(win, y, x, attr, str)WINDOW *win;int y, x;chtype attr;char *str;{	int ret_code, ans;	char new_str[80], *strcpy(), *strcat();					/* sanity checking */	if (strlen(str) > 71)		*(str+71) = '\0';					/* build and display the prompt */	strcpy(new_str, str);	strcat(new_str, "? (y/n):");	mvwattrstr(win, y, x, attr, new_str);	wmove(win, y, strlen(new_str)+x+2);	wrefresh(win);			ret_code = -1;	while (ret_code == -1) {					/* if inside a script */		if (status->dup_fd != -1)			ans = wait_key(win, 5);		else			ans = wgetch(win);		switch (ans) {			case -1:			case 'y':			case 'Y':				waddstr(win, "Yes");				ret_code = 1;				break;			case 'n':			case 'N':			case ESC:				waddstr(win, "No");				ret_code = 0;				break;			default:				beep();		}	}	wrefresh(win);	return(ret_code);}/* * Handy routine for clear-to-end-of-line.  Fixes up the box if requested. */intclear_line(win, y, x, re_box)WINDOW *win;int y, x, re_box;{	if (wmove(win, y, x) == ERR)		return(ERR);	wclrtoeol(win);	if (re_box) {		mvwaddch(win, y, win->_maxx-1, (chtype) ACS_VLINE);		wmove(win, y, x);	}	return(0);}/* * Routine to make a horizontal line.  Does NOT do a wrefresh(). */inthorizontal(win, x, y, len)WINDOW *win;int x, y, len;{	wmove(win, x, y);	while (len--)		waddch(win, ACS_HLINE);	return(0);}/* * Wait for a key or time out.  Returns a -1 on timeout.  This is similar * to the half-delay mode in the newer versions of curses(3). */#ifdef __NCURSES_Hint wait_key(WINDOW *win, unsigned int sec){int key;	wtimeout(win, sec*1000);	key = wgetch(win);	wtimeout(win, -1);	return key;}#elsestatic int wk_flag;static int wk_force();/* ARGSUSED */intwait_key(win, sec)WINDOW *win;unsigned int sec;{	int key;	unsigned int alarm();#ifdef WGETCH_BROKE	char c;#endif /* WGETCH_BROKE */	signal(SIGALRM, (SIG_TYPE(*) ()) wk_force);	wk_flag = 0;	alarm(sec);#ifdef BSD	if (setjmp(wk_buf))		return(-1);#endif /* BSD */#ifdef WGETCH_BROKE	read(0, &c, 1);	key = c & 0x7f;#else /* WGETCH_BROKE */	key = wgetch(win);#endif /* WGETCH_BROKE */	if (wk_flag)		return(-1);	alarm(0);	return(key);}/* ARGSUSED */static intwk_force(dummy)int dummy;{#ifdef BSD	longjmp(wk_buf, 1);#else /* BSD */	signal(SIGALRM, (SIG_TYPE(*) ()) wk_force);	wk_flag = 1;	return(0);#endif /* BSD */}#endif /* __NCURSES_H *//* * Here are some routines that are probably missing from the older * flavors of curses(3). */#ifdef OLDCURSES/* * Make the terminal bell go off */intbeep(){	fputc(BEL, stderr);	return(0);}/* * Take the terminal out of the "curses mode".  The t_mode structure was  * captured before we initialized the curses mode. */intresetterm(){	extern char _putchar();	extern struct sgttyb t_mode;	ioctl(0, TIOCSETP, &t_mode);	tputs(TE, 1, _putchar);	tputs(VE, 1, _putchar);	return(0);}/* * Put the terminal back into the "curses mode".  The c_mode structure was * captured after we initialized the curses mode. */intfixterm(){	extern char _putchar();	extern struct sgttyb c_mode;	ioctl(0, TIOCSETP, &c_mode);	tputs(TI, 1, _putchar);	tputs(VS, 1, _putchar);	return(0);}#endif /* OLDCURSES */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久久| 日韩一区二区三区电影| 国产精品理论片在线观看| 国产成人亚洲精品青草天美| 国产亚洲婷婷免费| 成人激情视频网站| 亚洲精品写真福利| 欧美日本国产一区| 久久精品99国产精品| 久久夜色精品一区| 9l国产精品久久久久麻豆| 一区二区三区四区国产精品| 欧美视频日韩视频在线观看| 日韩国产欧美三级| 国产午夜精品一区二区三区四区| 白白色 亚洲乱淫| 亚洲五月六月丁香激情| 日韩视频中午一区| 成人午夜精品在线| 婷婷夜色潮精品综合在线| 日韩美女一区二区三区四区| 丁香婷婷综合五月| 亚洲国产精品影院| 久久久www成人免费毛片麻豆 | 欧美日韩大陆一区二区| 久久精品国产一区二区| 久久久久久9999| 欧美综合在线视频| 国产成人鲁色资源国产91色综 | 亚洲成人综合视频| 久久久不卡网国产精品二区| 在线观看日韩电影| 国产一区二区在线免费观看| 亚洲色图制服诱惑| 日韩精品一区二区三区老鸭窝| 成人app网站| 免费视频一区二区| 亚洲精品高清视频在线观看| 日韩一级免费观看| 欧美最新大片在线看| 国产成人在线视频免费播放| 亚洲第四色夜色| 亚洲国产精品激情在线观看| 欧美日本韩国一区| 91在线云播放| 国产精品18久久久久久久久| 亚洲国产日日夜夜| 国产拍揄自揄精品视频麻豆| 欧美精品欧美精品系列| av毛片久久久久**hd| 激情综合色丁香一区二区| 一区二区三区在线高清| 欧美激情一区三区| 欧美成人vr18sexvr| 欧美视频在线播放| 91丝袜美腿高跟国产极品老师 | 欧美一区二区三区小说| 91一区二区在线观看| 国产精一品亚洲二区在线视频| 免费人成精品欧美精品 | 欧美精品精品一区| 色婷婷av一区二区三区大白胸| 成熟亚洲日本毛茸茸凸凹| 精品一区免费av| 男男gaygay亚洲| 五月天中文字幕一区二区| 亚洲精品伦理在线| 亚洲色图视频免费播放| 国产精品人人做人人爽人人添| 欧美精品一区在线观看| 欧美白人最猛性xxxxx69交| 欧美精品在欧美一区二区少妇| 欧美中文字幕一区二区三区| 91麻豆国产福利在线观看| 成人av小说网| 91在线视频播放地址| 成人黄色综合网站| 不卡的电视剧免费网站有什么| av动漫一区二区| 日韩一区二区三区高清免费看看| 日本久久电影网| 久久综合九色综合97婷婷 | 亚洲天堂a在线| 不卡的av网站| 中文字幕一区日韩精品欧美| 91在线码无精品| 亚洲国产视频a| 欧美欧美欧美欧美| 久久er精品视频| 中文字幕欧美激情一区| 99久久精品国产导航| 亚洲激情中文1区| 欧美猛男男办公室激情| 奇米精品一区二区三区在线观看一| 欧美一区二区三区免费在线看| 免费av网站大全久久| 欧美mv日韩mv国产网站| 国产成人在线观看| 石原莉奈在线亚洲二区| 97久久精品人人爽人人爽蜜臀| 欧美日韩国产中文| 免费精品视频在线| 国产精品久久久爽爽爽麻豆色哟哟 | 久久精品99国产精品| 久久久久久久久伊人| 91亚洲精品久久久蜜桃网站 | 欧美va在线播放| 成人妖精视频yjsp地址| 一区二区三区电影在线播| 5858s免费视频成人| 国产乱一区二区| 亚洲午夜久久久久中文字幕久| 欧美一区二区福利在线| aaa欧美色吧激情视频| 亚洲综合色网站| 国产欧美一区二区三区鸳鸯浴 | 欧美一区二区网站| 91极品视觉盛宴| 亚洲欧美综合色| 7777女厕盗摄久久久| 国产盗摄一区二区三区| 天天综合天天综合色| 国产精品美女久久久久久久久 | 粉嫩av亚洲一区二区图片| 亚洲综合网站在线观看| 国产喷白浆一区二区三区| 欧美日韩国产色站一区二区三区| 国产精品1024久久| 老司机精品视频在线| 一区二区三区四区乱视频| 国产日韩成人精品| 欧美一区二区三区白人| 欧美亚洲愉拍一区二区| 成人免费视频一区二区| 日韩av一区二| 婷婷综合五月天| 一二三区精品福利视频| 亚洲欧洲av色图| 国产精品久久久久一区二区三区共| 欧美一区二区三区视频| 在线亚洲高清视频| 色综合激情五月| 91色porny蝌蚪| 成人av资源网站| eeuss鲁一区二区三区| 国产精品一区二区在线播放| 九色porny丨国产精品| 免费在线观看一区二区三区| 亚洲成人免费视| 午夜一区二区三区视频| 亚洲国产一区二区三区青草影视 | 日精品一区二区| 亚洲午夜一区二区| 亚洲妇熟xx妇色黄| 亚洲h在线观看| 日本午夜一区二区| 日韩成人av影视| 九九视频精品免费| 国精产品一区一区三区mba桃花| 老司机午夜精品| 国产高清在线精品| 99re成人在线| 欧美日韩三级一区| 欧美麻豆精品久久久久久| 欧美男男青年gay1069videost| 欧美福利视频一区| 欧美mv日韩mv| 国产精品美女一区二区| 综合欧美一区二区三区| 亚洲高清视频的网址| 麻豆精品国产传媒mv男同| 国产精品一区三区| 色婷婷av一区二区三区大白胸| 欧美日韩精品一区二区三区蜜桃| 91麻豆精品国产综合久久久久久| 日韩免费观看高清完整版| 久久久久久黄色| 一区二区不卡在线播放 | 国产精品一区二区黑丝| 成人av电影免费在线播放| 91国偷自产一区二区三区观看 | 欧洲中文字幕精品| 欧美成人精品3d动漫h| 国产精品高潮呻吟| 午夜精品久久久久久久99樱桃| 国产一区二区三区四区五区入口| 高清在线不卡av| 欧美色综合网站| 国产午夜三级一区二区三| 亚洲网友自拍偷拍| 粉嫩av亚洲一区二区图片| 精品视频123区在线观看| 国产亚洲一区二区在线观看| 一区二区三区蜜桃网| 国产在线精品一区二区夜色 | 国产综合色在线视频区| 91成人免费在线| 国产偷国产偷亚洲高清人白洁| 亚洲福利视频一区二区| 成人黄色大片在线观看|