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

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

?? read_termcap.c

?? ncurses-5.4 需要的就來下把 一定會有用的哦
?? C
?? 第 1 頁 / 共 3 頁
字號:
    char **fname;    char *home;    int i;    char pathbuf[PBUFSIZ];	/* holds raw path of filenames */    char *pathvec[PVECSIZ];	/* to point to names in pathbuf */    char **pvec;		/* holds usable tail of path vector */    char *termpath;    string_desc desc;    fname = pathvec;    pvec = pathvec;    tbuf = bp;    p = pathbuf;    cp = use_terminfo_vars()? getenv("TERMCAP") : NULL;    /*     * TERMCAP can have one of two things in it.  It can be the name of a file     * to use instead of /etc/termcap.  In this case it better start with a     * "/".  Or it can be an entry to use so we don't have to read the file.      * In this case it has to already have the newlines crunched out.  If     * TERMCAP does not hold a file name then a path of names is searched     * instead.  The path is found in the TERMPATH variable, or becomes     * "$HOME/.termcap /etc/termcap" if no TERMPATH exists.     */    _nc_str_init(&desc, pathbuf, sizeof(pathbuf));    if (cp == NULL) {	_nc_safe_strcpy(&desc, get_termpath());    } else if (!is_pathname(cp)) {	/* TERMCAP holds an entry */	if ((termpath = get_termpath()) != 0) {	    _nc_safe_strcat(&desc, termpath);	} else {	    char temp[PBUFSIZ];	    temp[0] = 0;	    if ((home = getenv("HOME")) != 0 && *home != '\0'		&& strchr(home, ' ') == 0		&& strlen(home) < sizeof(temp) - 10) {	/* setup path */		sprintf(temp, "%s/", home);	/* $HOME first */	    }	    /* if no $HOME look in current directory */	    strcat(temp, ".termcap");	    _nc_safe_strcat(&desc, temp);	    _nc_safe_strcat(&desc, " ");	    _nc_safe_strcat(&desc, get_termpath());	}    } else {			/* user-defined name in TERMCAP */	_nc_safe_strcat(&desc, cp);	/* still can be tokenized */    }    *fname++ = pathbuf;		/* tokenize path into vector of names */    while (*++p) {	if (*p == ' ' || *p == NCURSES_PATHSEP) {	    *p = '\0';	    while (*++p)		if (*p != ' ' && *p != NCURSES_PATHSEP)		    break;	    if (*p == '\0')		break;	    *fname++ = p;	    if (fname >= pathvec + PVECSIZ) {		fname--;		break;	    }	}    }    *fname = 0;			/* mark end of vector */    if (is_pathname(cp)) {	if (_nc_cgetset(cp) < 0) {	    return (TC_SYS_ERR);	}    }    i = _nc_cgetent(&dummy, lineno, pathvec, name);    /* ncurses' termcap-parsing routines cannot handle multiple adjacent     * empty fields, and mistakenly use the last valid cap entry instead of     * the first (breaks tc= includes)     */    if (i >= 0) {	char *pd, *ps, *tok;	int endflag = FALSE;	char *list[1023];	size_t n, count = 0;	pd = bp;	ps = dummy;	while (!endflag && (tok = get_tc_token(&ps, &endflag)) != 0) {	    bool ignore = FALSE;	    for (n = 1; n < count; n++) {		char *s = list[n];		if (s[0] == tok[0]		    && s[1] == tok[1]) {		    ignore = TRUE;		    break;		}	    }	    if (ignore != TRUE) {		list[count++] = tok;		pd = copy_tc_token(pd, tok, TBUFSIZ - (2 + pd - bp));		if (pd == 0) {		    i = -1;		    break;		}		*pd++ = ':';		*pd = '\0';	    }	}    }    FreeIfNeeded(dummy);    FreeIfNeeded(the_source);    the_source = 0;    /* This is not related to the BSD cgetent(), but to fake up a suitable     * filename for ncurses' error reporting.  (If we are not using BSD     * cgetent, then it is the actual filename).     */    if (i >= 0) {	if ((the_source = strdup(pathvec[i])) != 0)	    *sourcename = the_source;    }    return (i);}#endif /* USE_BSD_TGETENT */#endif /* USE_GETCAP */#define MAXPATHS	32/* * Add a filename to the list in 'termpaths[]', checking that we really have * a right to open the file. */#if !USE_GETCAPstatic intadd_tc(char *termpaths[], char *path, int count){    char *save = strchr(path, NCURSES_PATHSEP);    if (save != 0)	*save = '\0';    if (count < MAXPATHS	&& _nc_access(path, R_OK) == 0) {	termpaths[count++] = path;	T(("Adding termpath %s", path));    }    termpaths[count] = 0;    if (save != 0)	*save = NCURSES_PATHSEP;    return count;}#define ADD_TC(path, count) filecount = add_tc(termpaths, path, count)#endif /* !USE_GETCAP */NCURSES_EXPORT(int)_nc_read_termcap_entry(const char *const tn, TERMTYPE * const tp){    int found = FALSE;    ENTRY *ep;#if USE_GETCAP_CACHE    char cwd_buf[PATH_MAX];#endif#if USE_GETCAP    char *p, tc[TBUFSIZ];    static char *source;    static int lineno;    T(("read termcap entry for %s", tn));    if (strlen(tn) == 0	|| strcmp(tn, ".") == 0	|| strcmp(tn, "..") == 0	|| _nc_pathlast(tn) != 0) {	T(("illegal or missing entry name '%s'", tn));	return 0;    }    if (use_terminfo_vars() && (p = getenv("TERMCAP")) != 0	&& !is_pathname(p) && _nc_name_match(p, tn, "|:")) {	/* TERMCAP holds a termcap entry */	strncpy(tc, p, sizeof(tc) - 1);	tc[sizeof(tc) - 1] = '\0';	_nc_set_source("TERMCAP");    } else {	/* we're using getcap(3) */	if (_nc_tgetent(tc, &source, &lineno, tn) < 0)	    return (ERR);	_nc_curr_line = lineno;	_nc_set_source(source);    }    _nc_read_entry_source((FILE *) 0, tc, FALSE, FALSE, NULLHOOK);#else    /*     * Here is what the 4.4BSD termcap(3) page prescribes:     *     * It will look in the environment for a TERMCAP variable.  If found, and     * the value does not begin with a slash, and the terminal type name is the     * same as the environment string TERM, the TERMCAP string is used instead     * of reading a termcap file.  If it does begin with a slash, the string is     * used as a path name of the termcap file to search.  If TERMCAP does not     * begin with a slash and name is different from TERM, tgetent() searches     * the files $HOME/.termcap and /usr/share/misc/termcap, in that order,     * unless the environment variable TERMPATH exists, in which case it     * specifies a list of file pathnames (separated by spaces or colons) to be     * searched instead.     *     * It goes on to state:     *     * Whenever multiple files are searched and a tc field occurs in the     * requested entry, the entry it names must be found in the same file or     * one of the succeeding files.     *     * However, this restriction is relaxed in ncurses; tc references to     * previous files are permitted.     *     * This routine returns 1 if an entry is found, 0 if not found, and -1 if     * the database is not accessible.     */    FILE *fp;    char *tc, *termpaths[MAXPATHS];    int filecount = 0;    int j, k;    bool use_buffer = FALSE;    bool normal = TRUE;    char tc_buf[1024];    char pathbuf[PATH_MAX];    char *copied = 0;    char *cp;    struct stat test_stat[MAXPATHS];    termpaths[filecount] = 0;    if (use_terminfo_vars() && (tc = getenv("TERMCAP")) != 0) {	if (is_pathname(tc)) {	/* interpret as a filename */	    ADD_TC(tc, 0);	    normal = FALSE;	} else if (_nc_name_match(tc, tn, "|:")) {	/* treat as a capability file */	    use_buffer = TRUE;	    (void) sprintf(tc_buf, "%.*s\n", (int) sizeof(tc_buf) - 2, tc);	    normal = FALSE;	}    }    if (normal) {		/* normal case */	char envhome[PATH_MAX], *h;	copied = strdup(get_termpath());	for (cp = copied; *cp; cp++) {	    if (*cp == NCURSES_PATHSEP)		*cp = '\0';	    else if (cp == copied || cp[-1] == '\0') {		ADD_TC(cp, filecount);	    }	}#define PRIVATE_CAP "%s/.termcap"	if (use_terminfo_vars() && (h = getenv("HOME")) != NULL && *h != '\0'	    && (strlen(h) + sizeof(PRIVATE_CAP)) < PATH_MAX) {	    /* user's .termcap, if any, should override it */	    (void) strcpy(envhome, h);	    (void) sprintf(pathbuf, PRIVATE_CAP, envhome);	    ADD_TC(pathbuf, filecount);	}    }    /*     * Probably /etc/termcap is a symlink to /usr/share/misc/termcap.     * Avoid reading the same file twice.     */#ifdef HAVE_LINK    for (j = 0; j < filecount; j++) {	bool omit = FALSE;	if (stat(termpaths[j], &test_stat[j]) != 0	    || (test_stat[j].st_mode & S_IFMT) != S_IFREG) {	    omit = TRUE;	} else {	    for (k = 0; k < j; k++) {		if (test_stat[k].st_dev == test_stat[j].st_dev		    && test_stat[k].st_ino == test_stat[j].st_ino) {		    omit = TRUE;		    break;		}	    }	}	if (omit) {	    T(("Path %s is a duplicate", termpaths[j]));	    for (k = j + 1; k < filecount; k++) {		termpaths[k - 1] = termpaths[k];		test_stat[k - 1] = test_stat[k];	    }	    --filecount;	    --j;	}    }#endif    /* parse the sources */    if (use_buffer) {	_nc_set_source("TERMCAP");	/*	 * We don't suppress warning messages here.  The presumption is	 * that since it's just a single entry, they won't be a pain.	 */	_nc_read_entry_source((FILE *) 0, tc_buf, FALSE, FALSE, NULLHOOK);    } else {	int i;	for (i = 0; i < filecount; i++) {	    T(("Looking for %s in %s", tn, termpaths[i]));	    if (_nc_access(termpaths[i], R_OK) == 0		&& (fp = fopen(termpaths[i], "r")) != (FILE *) 0) {		_nc_set_source(termpaths[i]);		/*		 * Suppress warning messages.  Otherwise you get 400 lines of		 * crap from archaic termcap files as ncurses complains about		 * all the obsolete capabilities.		 */		_nc_read_entry_source(fp, (char *) 0, FALSE, TRUE, NULLHOOK);		(void) fclose(fp);	    }	}    }    if (copied != 0)	free(copied);#endif /* USE_GETCAP */    if (_nc_head == 0)	return (ERR);    /* resolve all use references */    _nc_resolve_uses(TRUE);    /* find a terminal matching tn, if we can */#if USE_GETCAP_CACHE    if (getcwd(cwd_buf, sizeof(cwd_buf)) != 0) {	_nc_set_writedir((char *) 0);	/* note: this does a chdir */#endif	for_entry_list(ep) {	    if (_nc_name_match(ep->tterm.term_names, tn, "|:")) {		/*		 * Make a local copy of the terminal capabilities.  Free all		 * entry storage except the string table for the loaded type		 * (which we disconnected from the list by NULLing out		 * ep->tterm.str_table above).		 */		*tp = ep->tterm;		ep->tterm.str_table = (char *) 0;		/*		 * OK, now try to write the type to user's terminfo directory. 		 * Next time he loads this, it will come through terminfo.		 *		 * Advantage:  Second and subsequent fetches of this entry will		 * be very fast.		 *		 * Disadvantage:  After the first time a termcap type is loaded		 * by its user, editing it in the /etc/termcap file, or in		 * TERMCAP, or in a local ~/.termcap, will be ineffective		 * unless the terminfo entry is explicitly removed.		 */#if USE_GETCAP_CACHE		(void) _nc_write_entry(tp);#endif		found = TRUE;		break;	    }	}#if USE_GETCAP_CACHE	chdir(cwd_buf);    }#endif    _nc_free_entries(_nc_head);    return (found);}#elseexternNCURSES_EXPORT(void)_nc_read_termcap(void);NCURSES_EXPORT(void)_nc_read_termcap(void){}#endif /* PURE_TERMINFO */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合给合久久狠狠狠97色69| 成人av动漫在线| 欧美精品乱人伦久久久久久| 亚洲图片欧美一区| 欧美日韩高清一区二区三区| 日本欧美久久久久免费播放网| 777色狠狠一区二区三区| 美腿丝袜亚洲综合| 国产性天天综合网| 99国产精品视频免费观看| 亚洲欧美日韩小说| 欧美人伦禁忌dvd放荡欲情| 久久精品99久久久| 久久精品视频在线看| 91丝袜美腿高跟国产极品老师 | 99re6这里只有精品视频在线观看| 中文字幕一区二区不卡| 欧美亚洲国产一区二区三区| 日韩高清在线一区| 中文字幕免费观看一区| 欧美三级韩国三级日本一级| 日本中文字幕一区二区视频| 精品成人在线观看| 99re热视频精品| 久久精品噜噜噜成人av农村| 亚洲国产精品传媒在线观看| 欧美视频三区在线播放| 国产精品自拍网站| 亚洲成精国产精品女| www精品美女久久久tv| 色综合网站在线| 久久成人综合网| 亚洲精品一二三区| xvideos.蜜桃一区二区| 91福利国产成人精品照片| 麻豆freexxxx性91精品| 亚洲欧美日韩久久| 精品国产自在久精品国产| 91电影在线观看| 高清免费成人av| 看电影不卡的网站| 一区二区久久久久久| 精品99一区二区三区| 欧美日韩国产中文| 色综合色狠狠综合色| 国产资源精品在线观看| 舔着乳尖日韩一区| 一二三四区精品视频| 亚洲国产高清aⅴ视频| 日韩午夜中文字幕| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 激情综合网av| 日本亚洲一区二区| 亚洲成人免费在线观看| 亚洲美女一区二区三区| 国产欧美精品区一区二区三区| 日韩一区国产二区欧美三区| 欧洲av在线精品| 91一区二区三区在线观看| 国产精品77777| 奇米色777欧美一区二区| 亚洲综合在线视频| 综合亚洲深深色噜噜狠狠网站| 国产清纯白嫩初高生在线观看91 | 欧美一区二区三区视频在线观看 | 国产不卡视频一区二区三区| 久久精品国产久精国产爱| 亚洲欧美一区二区三区久本道91| 国产欧美日韩综合| 亚洲欧洲三级电影| 国产精品激情偷乱一区二区∴| 久久中文娱乐网| 久久蜜桃一区二区| 精品国产1区二区| 久久一二三国产| 久久―日本道色综合久久| 欧美成人午夜电影| 久久亚洲欧美国产精品乐播| 欧美成人官网二区| 久久这里都是精品| 欧美激情一二三区| 中文字幕日韩欧美一区二区三区| 中文字幕一区二区三区四区不卡| 国产人妖乱国产精品人妖| 欧美激情在线观看视频免费| 中文字幕制服丝袜成人av| 中文字幕亚洲区| 一区二区三区日韩精品视频| 亚洲综合一区二区三区| 日韩中文字幕一区二区三区| 日韩中文字幕1| 激情文学综合网| 国产成人在线看| 91丨九色porny丨蝌蚪| 91丨porny丨户外露出| 日本道色综合久久| 制服丝袜中文字幕亚洲| www亚洲一区| 亚洲色图欧美在线| 日本中文字幕一区| 国产福利一区二区| 在线区一区二视频| 欧美mv和日韩mv的网站| 国产日产欧美一区| 亚洲国产wwwccc36天堂| 极品少妇xxxx精品少妇偷拍 | 中文字幕在线免费不卡| 亚洲精品综合在线| 麻豆91精品91久久久的内涵| 国产成人啪免费观看软件| 色视频成人在线观看免| 欧美一区二区三区在线| 国产精品另类一区| 麻豆91在线看| 91欧美一区二区| 欧美大片在线观看| 亚洲日本电影在线| 久久精品二区亚洲w码| av在线播放不卡| 日韩精品专区在线影院重磅| 亚洲欧洲国产日本综合| 麻豆精品视频在线观看免费| 99久久精品免费看| 欧美sm极限捆绑bd| 一区二区三区蜜桃网| 另类的小说在线视频另类成人小视频在线| 国产99精品国产| 欧美精品tushy高清| 国产精品久久午夜夜伦鲁鲁| 日本欧美一区二区在线观看| 成人一道本在线| 在线观看91av| 一区二区在线免费观看| 国产精品一级黄| 日韩一级在线观看| 亚洲精品美国一| 国产mv日韩mv欧美| 欧美一区二区私人影院日本| 亚洲欧美在线视频| 国产伦理精品不卡| 日韩亚洲国产中文字幕欧美| 一区二区理论电影在线观看| 高清不卡在线观看av| 日韩精品一区二区三区中文精品 | 欧美精品电影在线播放| 国产精品美女久久久久久久| 美女www一区二区| 欧美日韩综合色| 亚洲美女免费视频| 丁香亚洲综合激情啪啪综合| 欧美一二三四区在线| 一级精品视频在线观看宜春院| 床上的激情91.| 国产午夜精品久久| 国内外精品视频| 精品国产自在久精品国产| 日韩va欧美va亚洲va久久| 在线观看成人免费视频| 亚洲另类在线一区| eeuss国产一区二区三区| 一区二区三区鲁丝不卡| av亚洲产国偷v产偷v自拍| 国产午夜精品一区二区三区四区| 看片网站欧美日韩| 精品国产污网站| 久久99精品国产.久久久久久| 欧美精品一二三区| 日韩精品乱码av一区二区| 91福利精品视频| 亚洲成a人片综合在线| 欧美日韩高清一区| 日韩成人精品在线| 欧美一区二区成人6969| 久久精品国产99国产精品| 精品999久久久| 国产aⅴ综合色| 亚洲欧洲在线观看av| 色香蕉成人二区免费| 一区二区在线免费观看| 欧美日韩在线播放一区| 五月激情综合色| 精品蜜桃在线看| 成人性视频网站| 亚洲精品久久久蜜桃| 精品视频在线看| 麻豆国产精品一区二区三区| 久久一区二区视频| eeuss影院一区二区三区| 一区二区三区在线不卡| 欧美日韩不卡一区| 加勒比av一区二区| 中文字幕一区二区三区不卡 | 亚洲宅男天堂在线观看无病毒| 精品视频一区 二区 三区| 美腿丝袜亚洲综合| 中文字幕av资源一区| 在线影视一区二区三区| 蜜桃免费网站一区二区三区| 国产三级久久久| 欧美日韩在线一区二区|