亚洲欧美第一页_禁久久精品乱码_粉嫩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色九色蝌蚪| 精品一区二区免费在线观看| 亚洲视频每日更新| 中文字幕av一区 二区| 欧美极品另类videosde| 久久精品水蜜桃av综合天堂| 久久久久综合网| 国产无一区二区| 中文字幕精品三区| 亚洲欧洲av在线| 最新国产成人在线观看| 一区二区三区在线视频播放| 亚洲一区二区在线免费观看视频| 一区二区三区国产| 亚洲高清一区二区三区| 日韩中文字幕不卡| 久久av资源站| 国产美女一区二区三区| 成人三级伦理片| 97精品久久久久中文字幕| 在线日韩一区二区| 91精品国产福利| 精品国产一区二区三区av性色 | 国产日产欧美一区| 日本一区免费视频| 亚洲视频中文字幕| 五月天网站亚洲| 国模少妇一区二区三区| 成人丝袜18视频在线观看| 91麻豆高清视频| 欧美精品v日韩精品v韩国精品v| 日韩欧美久久一区| 欧美激情在线观看视频免费| 一区二区三区不卡视频 | 欧美午夜电影一区| 欧美一区二区高清| 欧美极品另类videosde| 亚洲自拍与偷拍| 久久精品av麻豆的观看方式| 成人美女视频在线观看18| 欧美在线色视频| 精品福利二区三区| 一区二区三区四区乱视频| 看片的网站亚洲| 91一区二区三区在线播放| 欧美日韩国产123区| 日本一区二区三区dvd视频在线| 亚洲激情综合网| 六月丁香婷婷色狠狠久久| gogo大胆日本视频一区| 欧美精品在线观看播放| 国产欧美一区二区三区沐欲 | 99国产精品国产精品久久| 91精品国产欧美一区二区成人| 亚洲国产精品t66y| 丝袜美腿亚洲一区二区图片| 成人自拍视频在线观看| 欧美人妖巨大在线| 国产精品的网站| 久久精品国产一区二区三| 色av成人天堂桃色av| 精品理论电影在线观看| 亚洲一级二级三级在线免费观看| 国产老女人精品毛片久久| 欧美日韩国产另类一区| 欧美国产一区二区在线观看| 日韩精品欧美精品| 91久久奴性调教| 欧美国产一区视频在线观看| 久久国产视频网| 欧美午夜一区二区三区免费大片| 亚洲国产成人一区二区三区| 青青草原综合久久大伊人精品优势| 91免费版在线| 国产农村妇女精品| 久久 天天综合| 欧美日产国产精品| 亚洲欧美日韩系列| 成人免费毛片aaaaa**| 欧美精品一区男女天堂| 日韩和欧美一区二区三区| 色综合久久88色综合天天免费| 国产日韩欧美电影| 偷拍自拍另类欧美| 欧美在线一区二区| 亚洲欧洲无码一区二区三区| 国产成人精品影院| 精品国产第一区二区三区观看体验| 日韩av在线发布| 色吧成人激情小说| 亚洲女人****多毛耸耸8| 成人午夜av影视| 亚洲第一成年网| 91国偷自产一区二区使用方法| 最近日韩中文字幕| 成人av资源站| 国产精品久久国产精麻豆99网站| 国产不卡视频在线播放| 久久嫩草精品久久久精品| 韩国av一区二区三区四区| 日韩精品一区二区三区三区免费 | 男男gaygay亚洲| 欧美一区二区在线观看| 性感美女极品91精品| 欧美色图天堂网| 亚洲成人久久影院| 欧美日韩国产首页在线观看| 午夜电影一区二区| 欧美精品国产精品| 日韩精品一卡二卡三卡四卡无卡| 7777精品久久久大香线蕉| 日韩激情一二三区| 日韩一区二区三区观看| 蜜臀av一区二区| 久久亚区不卡日本| 福利一区在线观看| 中文字幕日韩一区| 91老师片黄在线观看| 一卡二卡欧美日韩| 欧美日韩国产综合视频在线观看| 五月天亚洲婷婷| 精品欧美一区二区久久| 国内精品免费在线观看| 亚洲国产精品激情在线观看| 99久久久免费精品国产一区二区| 亚洲免费在线视频一区 二区| 欧美日免费三级在线| 奇米影视在线99精品| 国产欧美日韩综合| 91理论电影在线观看| 性感美女极品91精品| 亚洲精品一区二区三区影院| 不卡欧美aaaaa| 亚洲夂夂婷婷色拍ww47| 日韩一区二区影院| 国产一区不卡在线| 亚洲欧美偷拍卡通变态| 欧洲一区二区三区免费视频| 青青国产91久久久久久| 国产精品人人做人人爽人人添| 91精品欧美综合在线观看最新| 男人的天堂亚洲一区| 国产视频一区二区三区在线观看| 99久久精品国产毛片| 爽好久久久欧美精品| 日韩影院免费视频| 精品精品国产高清a毛片牛牛| 成人蜜臀av电影| 亚洲chinese男男1069| 久久精品视频在线免费观看| 日本道色综合久久| 国内精品伊人久久久久av一坑 | 国产福利精品导航| 亚洲乱码中文字幕| 精品国产三级a在线观看| 91在线丨porny丨国产| 久久国产精品一区二区| 亚洲欧美色综合| 久久久久久日产精品| 欧美视频一区在线| 成人黄色一级视频| 麻豆91在线播放免费| 一区二区三区在线视频播放| 国产午夜精品一区二区三区嫩草| 欧美性猛片xxxx免费看久爱| 国产成人精品三级麻豆| 三级不卡在线观看| 国产精品大尺度| 欧美va在线播放| 欧美视频在线播放| 99re这里都是精品| 狠狠色丁香九九婷婷综合五月| 亚洲综合一区二区三区| 国产欧美久久久精品影院| 6080午夜不卡| 在线观看91视频| 99riav久久精品riav| 国产精品一区二区久久不卡| 日日夜夜精品视频免费| 亚洲欧美电影院| 国产精品色噜噜| 久久中文娱乐网| 日韩欧美不卡一区| 欧美福利一区二区| 91极品美女在线| 91小视频免费观看| 东方aⅴ免费观看久久av| 国产主播一区二区| 美女网站视频久久| 日日噜噜夜夜狠狠视频欧美人| 亚洲黄色性网站| 成人欧美一区二区三区黑人麻豆 | 亚洲在线观看免费| 国产精品美女www爽爽爽| 久久影院午夜片一区| 日韩一区二区中文字幕| 91麻豆精品国产91| 欧美日韩成人激情| 欧美日韩成人在线| 在线播放/欧美激情|