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

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

?? tclglob.c

?? tcl源碼詳細資料
?? C
?? 第 1 頁 / 共 2 頁
字號:
#ifndef EXCLUDE_TCL/*  * tclGlob.c -- * *	This file provides procedures and commands for file name *	manipulation, such as tilde expansion and globbing. * * Copyright 1990-1991 Regents of the University of California * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without * fee is hereby granted, provided that the above copyright * notice appear in all copies.  The University of California * makes no representations about the suitability of this * software for any purpose.  It is provided "as is" without * express or implied warranty. */#include "tclInt.h"#include "tclUnix.h"/* * The structure below is used to keep track of a globbing result * being built up (i.e. a partial list of file names).  The list * grows dynamically to be as big as needed. */typedef struct {    char *result;		/* Pointer to result area. */    int totalSpace;		/* Total number of characters allocated				 * for result. */    int spaceUsed;		/* Number of characters currently in use				 * to hold the partial result (not including				 * the terminating NULL). */    int dynamic;		/* 0 means result is static space, 1 means				 * it's dynamic. */} GlobResult;/* * Declarations for procedures local to this file: */static void		AppendResult _ANSI_ARGS_((Tcl_Interp *interp,			    char *dir, char *separator, char *name,			    int nameLength));static int		DoGlob _ANSI_ARGS_((Tcl_Interp *interp, char *dir,			    char *rem));/* *---------------------------------------------------------------------- * * AppendResult -- * *	Given two parts of a file name (directory and element within *	directory), concatenate the two together and append them to *	the result building up in interp. * * Results: *	There is no return value. * * Side effects: *	Interp->result gets extended. * *---------------------------------------------------------------------- */static voidAppendResult(interp, dir, separator, name, nameLength)    Tcl_Interp *interp;		/* Interpreter whose result should be				 * appended to. */    char *dir;			/* Name of directory, without trailing				 * slash except for root directory. */    char *separator;		/* Separator string so use between dir and				 * name:  either "/" or "" depending on dir. */    char *name;			/* Name of file withing directory (NOT				 * necessarily null-terminated!). */    int nameLength;		/* Number of characters in name. */{    int dirFlags, nameFlags;    char *p, saved;    /*     * Next, see if we can put together a valid list element from dir     * and name by calling Tcl_AppendResult.     */    if (*dir == 0) {	dirFlags = 0;    } else {	Tcl_ScanElement(dir, &dirFlags);    }    saved = name[nameLength];    name[nameLength] = 0;    Tcl_ScanElement(name, &nameFlags);    if ((dirFlags == 0) && (nameFlags == 0)) {	if (*interp->result != 0) {	    Tcl_AppendResult(interp, " ", dir, separator, name, (char *) NULL);	} else {	    Tcl_AppendResult(interp, dir, separator, name, (char *) NULL);	}	name[nameLength] = saved;	return;    }    /*     * This name has weird characters in it, so we have to convert it to     * a list element.  To do that, we have to merge the characters     * into a single name.  To do that, malloc a buffer to hold everything.     */    p = (char *) ckalloc((unsigned) (strlen(dir) + strlen(separator)	    + nameLength + 1));    sprintf(p, "%s%s%s", dir, separator, name);    name[nameLength] = saved;    Tcl_AppendElement(interp, p, 0);    ckfree(p);}/* *---------------------------------------------------------------------- * * DoGlob -- * *	This recursive procedure forms the heart of the globbing *	code.  It performs a depth-first traversal of the tree *	given by the path name to be globbed. * * Results: *	The return value is a standard Tcl result indicating whether *	an error occurred in globbing.  After a normal return the *	result in interp will be set to hold all of the file names *	given by the dir and rem arguments.  After an error the *	result in interp will hold an error message. * * Side effects: *	None. * *---------------------------------------------------------------------- */static intDoGlob(interp, dir, rem)    Tcl_Interp *interp;			/* Interpreter to use for error					 * reporting (e.g. unmatched brace). */    char *dir;				/* Name of a directory at which to					 * start glob expansion.  This name					 * is fixed: it doesn't contain any					 * globbing chars. */    char *rem;				/* Path to glob-expand. */{    /*     * When this procedure is entered, the name to be globbed may     * already have been partly expanded by ancestor invocations of     * DoGlob.  The part that's already been expanded is in "dir"     * (this may initially be empty), and the part still to expand     * is in "rem".  This procedure expands "rem" one level, making     * recursive calls to itself if there's still more stuff left     * in the remainder.     */    register char *p;    register char c;    char *openBrace, *closeBrace;    int gotSpecial, result;    char *separator;    /*     * Figure out whether we'll need to add a slash between the directory     * name and file names within the directory when concatenating them     * together.     */    if ((dir[0] == 0) || ((dir[0] == '/') && (dir[1] == 0))) {	separator = "";    } else {	separator = "/";    }    /*     * When generating information for the next lower call,     * use static areas if the name is short, and malloc if the name     * is longer.     */#define STATIC_SIZE 200    /*     * First, find the end of the next element in rem, checking     * along the way for special globbing characters.     */    gotSpecial = 0;    openBrace = closeBrace = NULL;    for (p = rem; ; p++) {	c = *p;	if ((c == '\0') || (c == '/')) {	    break;	}	if ((c == '{') && (openBrace == NULL)) {	    openBrace = p;	}	if ((c == '}') && (closeBrace == NULL)) {	    closeBrace = p;	}	if ((c == '*') || (c == '[') || (c == '\\') || (c == '?')) {	    gotSpecial = 1;	}    }    /*     * If there is an open brace in the argument, then make a recursive     * call for each element between the braces.  In this case, the     * recursive call to DoGlob uses the same "dir" that we got.     * If there are several brace-pairs in a single name, we just handle     * one here, and the others will be handled in recursive calls.     */    if (openBrace != NULL) {	int remLength, l1, l2;	char static1[STATIC_SIZE];	char *element, *newRem;	if (closeBrace == NULL) {	    Tcl_ResetResult(interp);	    interp->result = "unmatched open-brace in file name";	    return TCL_ERROR;	}	remLength = strlen(rem) + 1;	if (remLength <= STATIC_SIZE) {	    newRem = static1;	} else {	    newRem = (char *) ckalloc((unsigned) remLength);	}	l1 = openBrace-rem;	strncpy(newRem, rem, l1);	p = openBrace;	for (p = openBrace; *p != '}'; ) {	    element = p+1;	    for (p = element; ((*p != '}') && (*p != ',')); p++) {		/* Empty loop body:  just find end of this element. */	    }	    l2 = p - element;	    strncpy(newRem+l1, element, l2);	    strcpy(newRem+l1+l2, closeBrace+1);	    if (DoGlob(interp, dir, newRem) != TCL_OK) {		return TCL_ERROR;	    }	}	if (remLength > STATIC_SIZE) {	    ckfree(newRem);	}	return TCL_OK;    }    /*     * If there were any pattern-matching characters, then scan through     * the directory to find all the matching names.     */    if (gotSpecial) {	yaffs_DIR *d;	yaffs_dirent *entryPtr;	int l1, l2;	char *pattern, *newDir, *dirName, *path;	char static1[STATIC_SIZE], static2[STATIC_SIZE];	struct yaffs_stat statBuf;	/*	 * Be careful not to do any actual file system operations on a	 * directory named "";  instead, use ".".  This is needed because	 * some versions of UNIX don't treat "" like "." automatically.	 */	if (*dir == '\0') {	    dirName = ".";	} else {	    dirName = dir;	}	if (strcmp(".", dirName) == 0) {	    path = "./";	}	else if (strcmp("..", dirName) == 0) {	    path = "../";	}	else {	    path = dirName;	}	if ((yaffs_stat(path, &statBuf) != 0) || !S_ISDIR(statBuf.st_mode)) {	    return TCL_OK;	}	d = yaffs_opendir(path);	if (d == NULL) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91天堂素人约啪| 欧美大白屁股肥臀xxxxxx| 欧美成人性战久久| 美女久久久精品| 日韩欧美中文一区二区| 免费观看在线综合| 欧美一区二区三区免费观看视频| 中文字幕在线一区免费| av电影在线不卡| 亚洲伊人伊色伊影伊综合网| 一本色道综合亚洲| 国产精品国产馆在线真实露脸| 九九**精品视频免费播放| 欧美大片顶级少妇| 岛国精品在线播放| 亚洲卡通动漫在线| 欧美一卡二卡三卡| 国产激情91久久精品导航| 欧美激情一区二区三区全黄 | 亚洲人成影院在线观看| 欧美日韩一区高清| 国产成人丝袜美腿| 亚洲免费伊人电影| 色激情天天射综合网| 日韩国产在线一| 亚洲人成网站在线| 日韩欧美国产一区二区在线播放| 国产91在线|亚洲| 午夜精品一区二区三区免费视频 | 成人伦理片在线| 日韩高清在线电影| 亚洲欧美色一区| 国产人成亚洲第一网站在线播放| 欧美亚洲另类激情小说| 麻豆视频一区二区| 伊人夜夜躁av伊人久久| 2023国产一二三区日本精品2022| 高清国产午夜精品久久久久久| 午夜日韩在线观看| 风流少妇一区二区| 国产精品国产馆在线真实露脸 | 亚洲电影中文字幕在线观看| 久久久久综合网| 一本色道久久综合亚洲91| 国产精品中文有码| 久久精品国产精品亚洲红杏| 午夜影院久久久| 亚洲自拍都市欧美小说| 亚洲女子a中天字幕| 国产精品日韩成人| 中文字幕亚洲区| 色综合久久88色综合天天6| 美腿丝袜一区二区三区| 亚洲成av人综合在线观看| 日韩一区中文字幕| 久久理论电影网| 亚洲精品一区二区在线观看| 3751色影院一区二区三区| 欧美肥妇毛茸茸| 91精品国产免费| 精品国产91乱码一区二区三区 | 亚洲成人精品一区| 午夜精品福利一区二区三区蜜桃| 性久久久久久久久| 国产mv日韩mv欧美| 久久精品噜噜噜成人88aⅴ| 蜜臀av性久久久久蜜臀aⅴ四虎| 另类的小说在线视频另类成人小视频在线| 日本在线不卡一区| 国产精品538一区二区在线| 99国产精品视频免费观看| 色婷婷激情一区二区三区| 欧美肥妇bbw| 日本一区二区免费在线观看视频| 国产日产欧美一区二区视频| 国产精品高潮久久久久无| 亚洲va欧美va天堂v国产综合| 乱一区二区av| 一本色道久久加勒比精品| 欧美一区二区三区白人| 久久天堂av综合合色蜜桃网| 国产精品传媒入口麻豆| 久久超碰97中文字幕| 一本到一区二区三区| 国产欧美一区在线| 久久99精品视频| 欧美欧美欧美欧美首页| 亚洲免费观看高清| 成人免费高清在线观看| 在线电影一区二区三区| 国产精品乱人伦| 国产成人精品网址| 2022国产精品视频| 亚洲一区二区精品3399| 成人激情动漫在线观看| 久久―日本道色综合久久 | 久久女同精品一区二区| 蜜桃久久久久久久| 日韩精品一区二区三区视频| 三级一区在线视频先锋| 欧美精品乱码久久久久久按摩| 国产精品人妖ts系列视频| 丁香天五香天堂综合| 日韩免费看的电影| 蜜臀va亚洲va欧美va天堂| 日韩视频中午一区| 久久成人免费电影| 国产丝袜在线精品| 91网站视频在线观看| 国产精品久久久久久久浪潮网站| 91亚洲精品乱码久久久久久蜜桃| 亚洲欧美中日韩| 欧美精品一卡两卡| 免费av网站大全久久| 国产亚洲一区二区三区四区| 粉嫩蜜臀av国产精品网站| 亚洲美女屁股眼交3| 欧美色区777第一页| 国产在线一区二区综合免费视频| 国产亚洲一本大道中文在线| 国产女人aaa级久久久级| 亚洲aaa精品| 久久久久久一级片| 欧美日韩成人高清| 国产成人综合亚洲网站| 亚洲成人自拍网| 亚洲欧美在线视频| 26uuu精品一区二区三区四区在线| 99re热这里只有精品免费视频| 国产精品一区二区三区网站| 亚洲免费观看在线视频| 精品国产自在久精品国产| 91在线视频免费91| 国产成人精品1024| 国产乱子伦视频一区二区三区 | 国产精品一区一区三区| 91极品视觉盛宴| 国产乱淫av一区二区三区| 亚洲成人av在线电影| 亚洲精品免费在线观看| 国产精品久久久久影院色老大| 日韩午夜三级在线| 日韩一区二区视频在线观看| 欧美日韩一区二区在线观看 | 日韩激情在线观看| 亚洲福利视频导航| 亚洲二区在线观看| 亚洲国产日韩a在线播放性色| 国产丝袜欧美中文另类| 久久麻豆一区二区| 国产精品丝袜久久久久久app| 久久精品亚洲精品国产欧美| 久久久精品中文字幕麻豆发布| 久久婷婷综合激情| 国产视频一区二区在线观看| 国产日韩高清在线| 亚洲美女淫视频| 日韩黄色在线观看| 极品瑜伽女神91| 粉嫩av一区二区三区粉嫩| 99久久免费精品| 制服丝袜在线91| 久久精品欧美日韩| 亚洲亚洲精品在线观看| 美女视频黄 久久| 高清国产一区二区三区| av一二三不卡影片| 欧美一区二区三区视频免费播放| 国产欧美一区二区精品忘忧草| 日本一区二区电影| 五月婷婷激情综合| aaa国产一区| 精品久久人人做人人爰| 亚洲精品高清在线观看| 精品一区二区三区免费观看| 日本久久一区二区三区| 欧美成人精精品一区二区频| ...av二区三区久久精品| 久久99精品国产91久久来源| 国产精品女人毛片| 亚洲一区二区高清| 国产成人夜色高潮福利影视| 欧美精三区欧美精三区| 亚洲精品视频在线| 成人在线视频一区| 日韩女优制服丝袜电影| 亚洲成va人在线观看| 色婷婷av一区| 亚洲免费观看高清完整版在线观看熊 | 久久99久久久久久久久久久| 欧美影视一区二区三区| 国产精品久久久久久久蜜臀| 国产suv精品一区二区三区| 久久夜色精品国产噜噜av| 亚洲国产精品嫩草影院| 欧美三级中文字| 亚洲成a天堂v人片| 欧美一区国产二区| 另类小说一区二区三区| 日韩久久久精品|