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

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

?? menubox.c

?? linux的常用系統(tǒng)工具:busybox源碼
?? C
字號:
/* *  menubox.c -- implements the menu box * *  ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) *  MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) * *  This program is free software; you can redistribute it and/or *  modify it under the terms of the GNU General Public License *  as published by the Free Software Foundation; either version 2 *  of the License, or (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *//* *  Changes by Clifford Wolf (god@clifford.at) * *  [ 1998-06-13 ] * *    *)  A bugfix for the Page-Down problem * *    *)  Formerly when I used Page Down and Page Up, the cursor would be set *        to the first position in the menu box.  Now lxdialog is a bit *        smarter and works more like other menu systems (just have a look at *        it). * *    *)  Formerly if I selected something my scrolling would be broken because *        lxdialog is re-invoked by the Menuconfig shell script, can't *        remember the last scrolling position, and just sets it so that the *        cursor is at the bottom of the box.  Now it writes the temporary file *        lxdialog.scrltmp which contains this information. The file is *        deleted by lxdialog if the user leaves a submenu or enters a new *        one, but it would be nice if Menuconfig could make another "rm -f" *        just to be sure.  Just try it out - you will recognise a difference! * *  [ 1998-06-14 ] * *    *)  Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files *        and menus change their size on the fly. * *    *)  If for some reason the last scrolling position is not saved by *        lxdialog, it sets the scrolling so that the selected item is in the *        middle of the menu box, not at the bottom. * * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net) * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus. * This fixes a bug in Menuconfig where using ' ' to descend into menus * would leave mis-synchronized lxdialog.scrltmp files lying around, * fscanf would read in 'scroll', and eventually that value would get used. */#include "dialog.h"static int menu_width, item_x;/* * Print menu item */static voidprint_item (WINDOW * win, const char *item, int choice, int selected, int hotkey){    int j;    char menu_item[menu_width+1];    strncpy(menu_item, item, menu_width);    menu_item[menu_width] = 0;    j = first_alpha(menu_item, "YyNnMmHh");    /* Clear 'residue' of last item */    wattrset (win, menubox_attr);    wmove (win, choice, 0);#if OLD_NCURSES    {	int i;	for (i = 0; i < menu_width; i++)	    waddch (win, ' ');    }#else    wclrtoeol(win);#endif    wattrset (win, selected ? item_selected_attr : item_attr);    mvwaddstr (win, choice, item_x, menu_item);    if (hotkey) {	wattrset (win, selected ? tag_key_selected_attr : tag_key_attr);	mvwaddch(win, choice, item_x+j, menu_item[j]);    }    if (selected) {	wmove (win, choice, item_x+1);	wrefresh (win);    }}/* * Print the scroll indicators. */static voidprint_arrows (WINDOW * win, int item_no, int scroll,		int y, int x, int height){    int cur_y, cur_x;    getyx(win, cur_y, cur_x);    wmove(win, y, x);    if (scroll > 0) {	wattrset (win, uarrow_attr);	waddch (win, ACS_UARROW);	waddstr (win, "(-)");    }    else {	wattrset (win, menubox_attr);	waddch (win, ACS_HLINE);	waddch (win, ACS_HLINE);	waddch (win, ACS_HLINE);	waddch (win, ACS_HLINE);    }   y = y + height + 1;   wmove(win, y, x);   if ((height < item_no) && (scroll + height < item_no)) {	wattrset (win, darrow_attr);	waddch (win, ACS_DARROW);	waddstr (win, "(+)");    }    else {	wattrset (win, menubox_border_attr);	waddch (win, ACS_HLINE);	waddch (win, ACS_HLINE);	waddch (win, ACS_HLINE);	waddch (win, ACS_HLINE);   }   wmove(win, cur_y, cur_x);}/* * Display the termination buttons. */static voidprint_buttons (WINDOW *win, int height, int width, int selected){    int x = width / 2 - 16;    int y = height - 2;    print_button (win, "Select", y, x, selected == 0);    print_button (win, " Exit ", y, x + 12, selected == 1);    print_button (win, " Help ", y, x + 24, selected == 2);    wmove(win, y, x+1+12*selected);    wrefresh (win);}/* * Display a menu for choosing among a number of options */intdialog_menu (const char *title, const char *prompt, int height, int width,		int menu_height, const char *current, int item_no,		struct dialog_list_item ** items){    int i, j, x, y, box_x, box_y;    int key = 0, button = 0, scroll = 0, choice = 0, first_item = 0, max_choice;    WINDOW *dialog, *menu;    FILE *f;    max_choice = MIN (menu_height, item_no);    /* center dialog box on screen */    x = (COLS - width) / 2;    y = (LINES - height) / 2;    draw_shadow (stdscr, y, x, height, width);    dialog = newwin (height, width, y, x);    keypad (dialog, TRUE);    draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);    wattrset (dialog, border_attr);    mvwaddch (dialog, height - 3, 0, ACS_LTEE);    for (i = 0; i < width - 2; i++)	waddch (dialog, ACS_HLINE);    wattrset (dialog, dialog_attr);    wbkgdset (dialog, dialog_attr & A_COLOR);    waddch (dialog, ACS_RTEE);    if (title != NULL && strlen(title) >= width-2 ) {	/* truncate long title -- mec */	char * title2 = malloc(width-2+1);	memcpy( title2, title, width-2 );	title2[width-2] = '\0';	title = title2;    }    if (title != NULL) {	wattrset (dialog, title_attr);	mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');	waddstr (dialog, (char *)title);	waddch (dialog, ' ');    }    wattrset (dialog, dialog_attr);    print_autowrap (dialog, prompt, width - 2, 1, 3);    menu_width = width - 6;    box_y = height - menu_height - 5;    box_x = (width - menu_width) / 2 - 1;    /* create new window for the menu */    menu = subwin (dialog, menu_height, menu_width,		y + box_y + 1, x + box_x + 1);    keypad (menu, TRUE);    /* draw a box around the menu items */    draw_box (dialog, box_y, box_x, menu_height + 2, menu_width + 2,	      menubox_border_attr, menubox_attr);    /*     * Find length of longest item in order to center menu.     * Set 'choice' to default item.     */    item_x = 0;    for (i = 0; i < item_no; i++) {	item_x = MAX (item_x, MIN(menu_width, strlen (items[i]->name) + 2));	if (strcmp(current, items[i]->tag) == 0) choice = i;    }    item_x = (menu_width - item_x) / 2;    /* get the scroll info from the temp file */    if ( (f=fopen("lxdialog.scrltmp","r")) != NULL ) {	if ( (fscanf(f,"%d\n",&scroll) == 1) && (scroll <= choice) &&	     (scroll+max_choice > choice) && (scroll >= 0) &&	     (scroll+max_choice <= item_no) ) {	    first_item = scroll;	    choice = choice - scroll;	    fclose(f);	} else {	    scroll=0;	    remove("lxdialog.scrltmp");	    fclose(f);	    f=NULL;	}    }    if ( (choice >= max_choice) || (f==NULL && choice >= max_choice/2) ) {	if (choice >= item_no-max_choice/2)	    scroll = first_item = item_no-max_choice;	else	    scroll = first_item = choice - max_choice/2;	choice = choice - scroll;    }    /* Print the menu */    for (i=0; i < max_choice; i++) {	print_item (menu, items[first_item + i]->name, i, i == choice,		    (items[first_item + i]->tag[0] != ':'));    }    wnoutrefresh (menu);    print_arrows(dialog, item_no, scroll,		 box_y, box_x+item_x+1, menu_height);    print_buttons (dialog, height, width, 0);    wmove (menu, choice, item_x+1);    wrefresh (menu);    while (key != ESC) {	key = wgetch(menu);	if (key < 256 && isalpha(key)) key = tolower(key);	if (strchr("ynmh", key))		i = max_choice;	else {	for (i = choice+1; i < max_choice; i++) {		j = first_alpha(items[scroll + i]->name, "YyNnMmHh");		if (key == tolower(items[scroll + i]->name[j]))			break;	}	if (i == max_choice)		for (i = 0; i < max_choice; i++) {			j = first_alpha(items[scroll + i]->name, "YyNnMmHh");			if (key == tolower(items[scroll + i]->name[j]))				break;		}	}	if (i < max_choice ||	    key == KEY_UP || key == KEY_DOWN ||	    key == '-' || key == '+' ||	    key == KEY_PPAGE || key == KEY_NPAGE) {	    print_item (menu, items[scroll + choice]->name, choice, FALSE,		       (items[scroll + choice]->tag[0] != ':'));	    if (key == KEY_UP || key == '-') {		if (choice < 2 && scroll) {	            /* Scroll menu down */		    scrollok (menu, TRUE);		    wscrl (menu, -1);		    scrollok (menu, FALSE);		    scroll--;		    print_item (menu, items[scroll]->name, 0, FALSE,			       (items[scroll]->tag[0] != ':'));		} else		    choice = MAX(choice - 1, 0);	    } else if (key == KEY_DOWN || key == '+')  {		print_item (menu, items[scroll + choice]->name, choice, FALSE,				(items[scroll + choice]->tag[0] != ':'));		if ((choice > max_choice-3) &&		    (scroll + max_choice < item_no)		   ) {		    /* Scroll menu up */		    scrollok (menu, TRUE);		    scroll (menu);		    scrollok (menu, FALSE);		    scroll++;		    print_item (menu, items[scroll + max_choice - 1]->name,			       max_choice-1, FALSE,			       (items[scroll + max_choice - 1]->tag[0] != ':'));		} else		    choice = MIN(choice+1, max_choice-1);	    } else if (key == KEY_PPAGE) {	        scrollok (menu, TRUE);		for (i=0; (i < max_choice); i++) {		    if (scroll > 0) {			wscrl (menu, -1);			scroll--;			print_item (menu, items[scroll]->name, 0, FALSE,			(items[scroll]->tag[0] != ':'));		    } else {			if (choice > 0)			    choice--;		    }		}		scrollok (menu, FALSE);	    } else if (key == KEY_NPAGE) {		for (i=0; (i < max_choice); i++) {		    if (scroll+max_choice < item_no) {			scrollok (menu, TRUE);			scroll(menu);			scrollok (menu, FALSE);			scroll++;			print_item (menu, items[scroll + max_choice - 1]->name,			            max_choice-1, FALSE,			            (items[scroll + max_choice - 1]->tag[0] != ':'));		    } else {			if (choice+1 < max_choice)			    choice++;		    }		}	    } else		choice = i;	    print_item (menu, items[scroll + choice]->name, choice, TRUE,		       (items[scroll + choice]->tag[0] != ':'));	    print_arrows(dialog, item_no, scroll,			 box_y, box_x+item_x+1, menu_height);	    wnoutrefresh (dialog);	    wrefresh (menu);	    continue;		/* wait for another key press */	}	switch (key) {	case KEY_LEFT:	case TAB:	case KEY_RIGHT:	    button = ((key == KEY_LEFT ? --button : ++button) < 0)			? 2 : (button > 2 ? 0 : button);	    print_buttons(dialog, height, width, button);	    wrefresh (menu);	    break;	case ' ':	case 's':	case 'y':	case 'n':	case 'm':	case '/':	    /* save scroll info */	    if ( (f=fopen("lxdialog.scrltmp","w")) != NULL ) {		fprintf(f,"%d\n",scroll);		fclose(f);	    }	    delwin (dialog);	    items[scroll + choice]->selected = 1;	    switch (key) {	    case 's': return 3;	    case 'y': return 3;	    case 'n': return 4;	    case 'm': return 5;	    case ' ': return 6;	    case '/': return 7;	    }	    return 0;	case 'h':	case '?':	    button = 2;	case '\n':	    delwin (dialog);	    items[scroll + choice]->selected = 1;	    remove("lxdialog.scrltmp");	    return button;	case 'e':	case 'x':	    key = ESC;	case ESC:	    break;	}    }    delwin (dialog);    remove("lxdialog.scrltmp");    return -1;			/* ESC pressed */}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本色道久久综合亚洲aⅴ蜜桃 | 日韩午夜在线观看| 亚洲成人av电影在线| 欧美色综合天天久久综合精品| 亚洲综合另类小说| 欧美日韩视频专区在线播放| 五月激情综合网| 日韩午夜激情视频| 国产精品中文字幕日韩精品| 精品久久人人做人人爰| 国产伦精品一区二区三区免费迷| 国产婷婷色一区二区三区| 成人自拍视频在线观看| 综合网在线视频| 欧美三日本三级三级在线播放| 亚洲高清中文字幕| 日韩精品中文字幕一区| 国产成人精品免费网站| 亚洲在线中文字幕| 日韩一区二区免费视频| 国产a久久麻豆| 亚洲欧美区自拍先锋| 在线不卡a资源高清| 国产乱理伦片在线观看夜一区| 亚洲欧美在线高清| 欧美美女直播网站| 国产麻豆日韩欧美久久| 亚洲女子a中天字幕| 日韩美女天天操| 成人ar影院免费观看视频| 视频一区中文字幕国产| 中文无字幕一区二区三区| 欧美性猛交xxxx黑人交| 狠狠色丁香久久婷婷综合丁香| 日韩一区日韩二区| 91精品国产综合久久精品性色| 丰满岳乱妇一区二区三区| 午夜私人影院久久久久| 中国色在线观看另类| 欧美理论电影在线| 福利一区在线观看| 日韩精品乱码av一区二区| 国产精品网站在线| 欧美午夜一区二区| 国产成人8x视频一区二区| 婷婷久久综合九色综合绿巨人| 国产欧美一区二区在线观看| 欧美一区二区视频在线观看2022| 成人av在线播放网站| 丰满少妇久久久久久久| 奇米色777欧美一区二区| 亚洲天天做日日做天天谢日日欢| 精品噜噜噜噜久久久久久久久试看| 色婷婷综合久久久久中文| 国产经典欧美精品| 秋霞午夜av一区二区三区| 亚洲专区一二三| 国产精品久99| 久久精品欧美一区二区三区麻豆| 欧美一级二级在线观看| 欧美在线免费观看亚洲| 一本大道综合伊人精品热热| 成人手机电影网| 国产精品亚洲成人| 蜜臀av性久久久久蜜臀av麻豆| 亚洲一区二区视频在线| 亚洲bdsm女犯bdsm网站| 国产精品美女www爽爽爽| 日韩精品最新网址| 91久久久免费一区二区| 91丨九色丨蝌蚪富婆spa| 国产成人一区在线| 激情深爱一区二区| 免费观看一级欧美片| 日韩专区欧美专区| 亚洲成人综合网站| 亚洲国产精品一区二区久久恐怖片 | 2022国产精品视频| 精品国产乱码久久久久久免费 | 亚洲乱码一区二区三区在线观看| 中文一区一区三区高中清不卡| 久久久久久久久99精品| 欧美精品一区二区久久久| 日韩一区二区三免费高清| 日韩久久精品一区| 欧美精品一区二区蜜臀亚洲| 久久综合久久鬼色| 久久亚洲精品国产精品紫薇| 精品国产乱码久久久久久久| 欧美精品一区二区久久久| 国产精品久久精品日日| 欧美性生活大片视频| 色婷婷亚洲精品| 欧美这里有精品| 911国产精品| 精品福利二区三区| 国产免费成人在线视频| 国产精品伦理在线| 亚洲日本一区二区三区| 亚洲国产精品久久艾草纯爱| 亚洲观看高清完整版在线观看| 奇米亚洲午夜久久精品| 国产成人免费在线视频| 一本色道久久综合狠狠躁的推荐| 欧美v日韩v国产v| 久久久久久电影| 中文字幕日本不卡| 亚洲高清不卡在线| 精品一区二区免费视频| 国产91清纯白嫩初高中在线观看| 色偷偷一区二区三区| 91麻豆精品91久久久久久清纯| 欧美va亚洲va在线观看蝴蝶网| 欧美高清在线一区二区| 亚洲午夜久久久久久久久电影院| 日韩国产精品久久久久久亚洲| 狠狠v欧美v日韩v亚洲ⅴ| av不卡在线播放| 欧美精品v日韩精品v韩国精品v| 久久久国产精华| 亚洲最大成人综合| 国产尤物一区二区| 欧美主播一区二区三区美女| 久久女同性恋中文字幕| 一区二区日韩电影| 国内久久精品视频| 在线亚洲精品福利网址导航| 精品乱码亚洲一区二区不卡| 亚洲三级电影网站| 激情亚洲综合在线| 欧美亚洲一区二区在线| 国产色爱av资源综合区| 亚洲福利电影网| av欧美精品.com| 精品免费国产一区二区三区四区| 亚洲免费毛片网站| 国产精品一区二区视频| 欧美日韩国产小视频在线观看| 国产区在线观看成人精品 | 国产精品一区久久久久| 欧美精品久久一区| 国产精品久久久久精k8| 国产中文字幕一区| 欧美日韩国产三级| 亚洲人成网站精品片在线观看| 久久9热精品视频| 欧美日韩成人在线| 亚洲伦理在线免费看| 成人一级片网址| 欧美成人一区二区三区在线观看| 国产婷婷色一区二区三区四区 | 国内精品国产成人| 欧美日韩视频在线一区二区 | 欧美这里有精品| 国产精品国产三级国产有无不卡 | 国产乱色国产精品免费视频| 欧美一区二区三区影视| 一区二区三区久久| jiyouzz国产精品久久| 久久久久九九视频| 青娱乐精品视频| 欧美精品精品一区| 一区二区欧美在线观看| 日本韩国视频一区二区| 中文字幕佐山爱一区二区免费| 国产.精品.日韩.另类.中文.在线.播放| 日韩欧美成人午夜| 麻豆精品视频在线| 欧美一区三区二区| 奇米影视一区二区三区小说| 欧美一区二区三区男人的天堂 | 色综合久久综合网| 国产精品免费视频网站| 成人激情电影免费在线观看| 国产精品人妖ts系列视频| 成人白浆超碰人人人人| 中文字幕制服丝袜一区二区三区 | 亚洲一区二区三区在线看| 91久久精品日日躁夜夜躁欧美| 亚洲欧美日韩一区二区| 色狠狠色噜噜噜综合网| 亚洲综合另类小说| 666欧美在线视频| 美美哒免费高清在线观看视频一区二区 | 久久黄色级2电影| 欧美白人最猛性xxxxx69交| 国内精品免费在线观看| 中文字幕 久热精品 视频在线 | 欧美乱妇15p| 日韩av午夜在线观看| 欧美成人精品3d动漫h| 精品一区二区三区视频在线观看| 久久久久成人黄色影片| 99精品国产91久久久久久| 亚洲永久免费视频| 91精品国产色综合久久ai换脸 | 亚洲最快最全在线视频| 91.麻豆视频| 国产成人免费在线视频| 亚洲精品国产a|