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

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

?? menubox.c

?? 本軟件件包是EM8624高清解碼軟件的LINUX文件系統以及驅動程序和根文件系統。軟件包里包含原碼
?? 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, "YyNnMm");    /* 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]);    }}/* * 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,		const char * const * 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 * 2 + 1]) + 2));	if (strcmp(current, items[i*2]) == 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) * 2 + 1], i, i == choice,                    (items[(first_item + i)*2][0] != ':'));    }    wnoutrefresh (menu);    print_arrows(dialog, item_no, scroll,		 box_y, box_x+item_x+1, menu_height);    print_buttons (dialog, height, width, 0);    while (key != ESC) {	key = wgetch(dialog);	if (key < 256 && isalpha(key)) key = tolower(key);	if (strchr("ynm", key))		i = max_choice;	else {        for (i = choice+1; i < max_choice; i++) {		j = first_alpha(items[(scroll+i)*2+1], "YyNnMm");		if (key == tolower(items[(scroll+i)*2+1][j]))                	break;	}	if (i == max_choice)       		for (i = 0; i < max_choice; i++) {			j = first_alpha(items[(scroll+i)*2+1], "YyNnMm");			if (key == tolower(items[(scroll+i)*2+1][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)*2+1], choice, FALSE,                       (items[(scroll+choice)*2][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 * 2 + 1], 0, FALSE,                               (items[scroll*2][0] != ':'));		} else		    choice = MAX(choice - 1, 0);	    } else if (key == KEY_DOWN || key == '+')  {		print_item (menu, items[(scroll+choice)*2+1], choice, FALSE,                                (items[(scroll+choice)*2][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)*2+1],                               max_choice-1, FALSE,                               (items[(scroll+max_choice-1)*2][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 * 2 + 1], 0, FALSE,                	(items[scroll*2][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)*2+1],			            max_choice-1, FALSE,			            (items[(scroll+max_choice-1)*2][0] != ':'));		    } else {			if (choice+1 < max_choice)			    choice++;		    }                }            } else                choice = i;            print_item (menu, items[(scroll+choice)*2+1], choice, TRUE,                       (items[(scroll+choice)*2][0] != ':'));            print_arrows(dialog, item_no, scroll,                         box_y, box_x+item_x+1, menu_height);            wnoutrefresh (menu);            wrefresh (dialog);	    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 (dialog);	    break;	case ' ':	case 's':	case 'y':	case 'n':	case 'm':	    /* save scroll info */	    if ( (f=fopen("lxdialog.scrltmp","w")) != NULL ) {		fprintf(f,"%d\n",scroll);		fclose(f);	    }	    delwin (dialog);            fprintf(stderr, "%s\n", items[(scroll + choice) * 2]);            switch (key) {            case 's': return 3;            case 'y': return 3;            case 'n': return 4;            case 'm': return 5;            case ' ': return 6;            }	    return 0;	case 'h':	case '?':	    button = 2;	case '\n':	    delwin (dialog);	    if (button == 2)             	fprintf(stderr, "%s \"%s\"\n", 			items[(scroll + choice) * 2],			items[(scroll + choice) * 2 + 1] +			first_alpha(items[(scroll + choice) * 2 + 1],""));	    else            	fprintf(stderr, "%s\n", items[(scroll + choice) * 2]);	    remove("lxdialog.scrltmp");	    return button;	case 'e':	case 'x':	    key = ESC;	case ESC:	    break;	}    }    delwin (dialog);    remove("lxdialog.scrltmp");    return -1;			/* ESC pressed */}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品网久久| 成a人片国产精品| 丰满亚洲少妇av| 欧美日精品一区视频| 久久网站最新地址| 亚洲一区二区三区在线| 久久99深爱久久99精品| 色综合天天综合网国产成人综合天| 91麻豆精品国产自产在线| 久久精品视频免费观看| 日产精品久久久久久久性色| 不卡视频一二三| 精品福利在线导航| 亚洲一二三区视频在线观看| 成人免费观看男女羞羞视频| 日韩午夜精品电影| 亚洲成av人片在www色猫咪| 国产69精品久久777的优势| 日韩视频在线永久播放| 亚洲一区二区三区在线播放| 91伊人久久大香线蕉| 日本一区二区三区电影| 美女视频一区在线观看| 欧美日韩视频在线一区二区 | 在线看国产日韩| 亚洲国产成人一区二区三区| 久99久精品视频免费观看| 欧美丰满嫩嫩电影| 亚洲图片欧美综合| 在线观看视频欧美| 亚洲综合免费观看高清完整版| 成人免费视频一区二区| 日本一区二区综合亚洲| 国产一区二区三区四| 亚洲精品在线一区二区| 欧美aⅴ一区二区三区视频| 欧美日韩不卡视频| 日韩国产欧美三级| 欧美一区二区三区喷汁尤物| 午夜精品福利一区二区三区蜜桃| 91在线播放网址| 亚洲女同ⅹxx女同tv| 欧美日韩大陆一区二区| 中日韩av电影| av电影天堂一区二区在线观看| 欧美国产一区在线| 97久久人人超碰| 亚洲毛片av在线| 在线观看国产精品网站| 亚洲成人av在线电影| 欧美精品免费视频| 精品一区二区精品| 欧美国产日产图区| 日本久久电影网| 亚洲成人免费看| 91麻豆精品国产自产在线| 久久精品国产免费| 国产三区在线成人av| 91在线无精精品入口| 亚洲国产一区二区在线播放| 在线成人高清不卡| 国产在线精品免费| 亚洲色图欧洲色图| 欧美另类一区二区三区| 国产一区二区导航在线播放| 中文字幕一区二区三中文字幕| 色婷婷av一区二区三区之一色屋| 亚洲成人av免费| 久久久噜噜噜久久人人看| 色综合天天综合| 麻豆精品一区二区三区| 国产精品久久网站| 51午夜精品国产| 成人激情电影免费在线观看| 洋洋成人永久网站入口| 欧美r级电影在线观看| 成人爱爱电影网址| 蜜桃av噜噜一区| 国产精品福利一区| 日韩亚洲欧美高清| 色婷婷久久久久swag精品 | 成人性生交大片| 天天综合色天天综合色h| 国产欧美一区二区精品忘忧草| 在线看一区二区| 成人性生交大片| 美腿丝袜亚洲综合| 热久久一区二区| 国产精品乱码一区二区三区软件| 精品视频免费看| 成人18视频在线播放| 久久国产精品色婷婷| 一区二区三区四区中文字幕| 久久免费午夜影院| 欧美一级爆毛片| 欧美在线观看一区二区| 成人国产在线观看| 国产一区二区三区四| 日韩成人精品在线观看| 亚洲欧美在线另类| 久久久三级国产网站| 欧美一区二区三区小说| 在线中文字幕不卡| 99r精品视频| 国产91精品在线观看| 捆绑调教一区二区三区| 亚洲va欧美va人人爽| 日韩一区欧美小说| 国产精品久久久久一区| 日本一区二区免费在线观看视频| 欧美一级片免费看| 69久久夜色精品国产69蝌蚪网| 色综合天天综合色综合av| 成人av网站免费观看| 国产激情一区二区三区四区| 性欧美疯狂xxxxbbbb| 一区二区三区免费网站| 国产精品国产三级国产有无不卡| 国产午夜精品一区二区三区嫩草| 日韩精品一区二区在线观看| 欧美一级国产精品| 日韩视频免费观看高清完整版 | 亚洲伦理在线免费看| 久久久不卡网国产精品二区 | 91蝌蚪porny九色| av一二三不卡影片| 一本色道久久综合精品竹菊| 99re免费视频精品全部| www.性欧美| 色欧美日韩亚洲| 欧美怡红院视频| 69堂成人精品免费视频| 精品日韩av一区二区| 久久久久久亚洲综合| 国产人妖乱国产精品人妖| 国产欧美日韩在线| 国产欧美精品一区| 中文字幕日本乱码精品影院| 亚洲综合一区在线| 首页国产欧美日韩丝袜| 久久福利视频一区二区| 国产精品一区二区在线播放| fc2成人免费人成在线观看播放| 91在线云播放| 51精品国自产在线| 久久久久久久综合日本| 亚洲欧美日本在线| 免费成人av在线播放| 国产成人av电影在线| 色国产综合视频| 日韩一区国产二区欧美三区| 久久久91精品国产一区二区三区| 中文字幕日韩欧美一区二区三区| 亚洲福利视频导航| 国产乱人伦精品一区二区在线观看| aaa亚洲精品| 欧美一级高清片| 亚洲区小说区图片区qvod| 午夜精品福利一区二区三区av| 国产精品123| 欧美日韩一区二区三区四区五区| 精品国产伦理网| 国产精品久久免费看| 免费久久精品视频| 99久久精品国产麻豆演员表| 日韩一区二区三区av| 成人欧美一区二区三区黑人麻豆| 五月婷婷久久综合| 高清国产一区二区三区| 欧美一区中文字幕| 国产精品电影一区二区| 久久精品国产一区二区| 91蜜桃传媒精品久久久一区二区| 精品污污网站免费看| 国产人成一区二区三区影院| 日韩中文字幕91| 色婷婷久久一区二区三区麻豆| 国产亚洲一区字幕| av一本久道久久综合久久鬼色| av成人动漫在线观看| 成人av免费在线| 国产一区二区三区综合| 欧美日韩成人在线一区| 综合久久久久久久| 国产精品自拍毛片| 7777精品伊人久久久大香线蕉经典版下载| 中文字幕av资源一区| 捆绑调教美女网站视频一区| 欧美日本高清视频在线观看| 国产精品久久久久久久久久免费看| 久久99久久99精品免视看婷婷 | 日本不卡的三区四区五区| 色欧美乱欧美15图片| 欧美极品xxx| 久久不见久久见免费视频7| 欧美一区在线视频| 日本欧美一区二区三区乱码| 欧美日韩国产高清一区| 亚洲综合av网| 欧美影院精品一区|