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

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

?? tclregexp.c

?? tcl是工具命令語言
?? C
?? 第 1 頁 / 共 2 頁
字號:
 * Side effects: *	None. * *---------------------------------------------------------------------- */voidTcl_RegExpGetInfo(regexp, infoPtr)    Tcl_RegExp regexp;		/* Pattern from which to get subexpressions. */    Tcl_RegExpInfo *infoPtr;	/* Match information is stored here.  */{    TclRegexp *regexpPtr = (TclRegexp *) regexp;    infoPtr->nsubs = regexpPtr->re.re_nsub;    infoPtr->matches = (Tcl_RegExpIndices *) regexpPtr->matches;    infoPtr->extendStart = regexpPtr->details.rm_extend.rm_so;}/* *---------------------------------------------------------------------- * * Tcl_GetRegExpFromObj -- * *	Compile a regular expression into a form suitable for fast *	matching.  This procedure caches the result in a Tcl_Obj. * * Results: *	The return value is a pointer to the compiled form of string, *	suitable for passing to Tcl_RegExpExec.  If an error occurred *	while compiling the pattern, then NULL is returned and an error *	message is left in the interp's result. * * Side effects: *	Updates the native rep of the Tcl_Obj. * *---------------------------------------------------------------------- */Tcl_RegExpTcl_GetRegExpFromObj(interp, objPtr, flags)    Tcl_Interp *interp;		/* For use in error reporting, and to access				 * the interp regexp cache. */    Tcl_Obj *objPtr;		/* Object whose string rep contains regular				 * expression pattern.  Internal rep will be				 * changed to compiled form of this regular				 * expression. */    int flags;			/* Regular expression compilation flags. */{    int length;    Tcl_ObjType *typePtr;    TclRegexp *regexpPtr;    char *pattern;    typePtr = objPtr->typePtr;    regexpPtr = (TclRegexp *) objPtr->internalRep.otherValuePtr;    if ((typePtr != &tclRegexpType) || (regexpPtr->flags != flags)) {	pattern = Tcl_GetStringFromObj(objPtr, &length);	regexpPtr = CompileRegexp(interp, pattern, length, flags);	if (regexpPtr == NULL) {	    return NULL;	}	/*	 * Add a reference to the regexp so it will persist even if it is	 * pushed out of the current thread's regexp cache.  This reference	 * will be removed when the object's internal rep is freed.	 */	regexpPtr->refCount++;	/*	 * Free the old representation and set our type.	 */	if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) {	    (*typePtr->freeIntRepProc)(objPtr);	}	objPtr->internalRep.otherValuePtr = (VOID *) regexpPtr;	objPtr->typePtr = &tclRegexpType;    }    return (Tcl_RegExp) regexpPtr;}/* *---------------------------------------------------------------------- * * TclRegAbout -- * *	Return information about a compiled regular expression. * * Results: *	The return value is -1 for failure, 0 for success, although at *	the moment there's nothing that could fail.  On success, a list *	is left in the interp's result:  first element is the subexpression *	count, second is a list of re_info bit names. * * Side effects: *	None. * *---------------------------------------------------------------------- */intTclRegAbout(interp, re)    Tcl_Interp *interp;		/* For use in variable assignment. */    Tcl_RegExp re;		/* The compiled regular expression. */{    TclRegexp *regexpPtr = (TclRegexp *)re;    char buf[TCL_INTEGER_SPACE];    static struct infoname {	int bit;	char *text;    } infonames[] = {	{REG_UBACKREF,		"REG_UBACKREF"},	{REG_ULOOKAHEAD,	"REG_ULOOKAHEAD"},	{REG_UBOUNDS,		"REG_UBOUNDS"},	{REG_UBRACES,		"REG_UBRACES"},	{REG_UBSALNUM,		"REG_UBSALNUM"},	{REG_UPBOTCH,		"REG_UPBOTCH"},	{REG_UBBS,		"REG_UBBS"},	{REG_UNONPOSIX,		"REG_UNONPOSIX"},	{REG_UUNSPEC,		"REG_UUNSPEC"},	{REG_UUNPORT,		"REG_UUNPORT"},	{REG_ULOCALE,		"REG_ULOCALE"},	{REG_UEMPTYMATCH,	"REG_UEMPTYMATCH"},	{REG_UIMPOSSIBLE,	"REG_UIMPOSSIBLE"},	{REG_USHORTEST,		"REG_USHORTEST"},	{0,			""}    };    struct infoname *inf;    int n;    Tcl_ResetResult(interp);    sprintf(buf, "%u", (unsigned)(regexpPtr->re.re_nsub));    Tcl_AppendElement(interp, buf);    /*     * Must count bits before generating list, because we must know     * whether {} are needed before we start appending names.     */    n = 0;    for (inf = infonames; inf->bit != 0; inf++) {	if (regexpPtr->re.re_info&inf->bit) {	    n++;	}    }    if (n != 1) {	Tcl_AppendResult(interp, " {", NULL);    }    for (inf = infonames; inf->bit != 0; inf++) {	if (regexpPtr->re.re_info&inf->bit) {	    Tcl_AppendElement(interp, inf->text);	}    }    if (n != 1) {	Tcl_AppendResult(interp, "}", NULL);    }    return 0;}/* *---------------------------------------------------------------------- * * TclRegError -- * *	Generate an error message based on the regexp status code. * * Results: *	Places an error in the interpreter. * * Side effects: *	Sets errorCode as well. * *---------------------------------------------------------------------- */voidTclRegError(interp, msg, status)    Tcl_Interp *interp;		/* Interpreter for error reporting. */    CONST char *msg;		/* Message to prepend to error. */    int status;			/* Status code to report. */{    char buf[100];		/* ample in practice */    char cbuf[100];		/* lots in practice */    size_t n;    char *p;    Tcl_ResetResult(interp);    n = TclReError(status, (regex_t *)NULL, buf, sizeof(buf));    p = (n > sizeof(buf)) ? "..." : "";    Tcl_AppendResult(interp, msg, buf, p, NULL);    sprintf(cbuf, "%d", status);    (VOID) TclReError(REG_ITOA, (regex_t *)NULL, cbuf, sizeof(cbuf));    Tcl_SetErrorCode(interp, "REGEXP", cbuf, buf, NULL);}/* *---------------------------------------------------------------------- * * FreeRegexpInternalRep -- * *	Deallocate the storage associated with a regexp object's internal *	representation. * * Results: *	None. * * Side effects: *	Frees the compiled regular expression. * *---------------------------------------------------------------------- */static voidFreeRegexpInternalRep(objPtr)    Tcl_Obj *objPtr;		/* Regexp object with internal rep to free. */{    TclRegexp *regexpRepPtr = (TclRegexp *) objPtr->internalRep.otherValuePtr;    /*     * If this is the last reference to the regexp, free it.     */    if (--(regexpRepPtr->refCount) <= 0) {	FreeRegexp(regexpRepPtr);    }}/* *---------------------------------------------------------------------- * * DupRegexpInternalRep -- * *	We copy the reference to the compiled regexp and bump its *	reference count. * * Results: *	None. * * Side effects: *	Increments the reference count of the regexp. * *---------------------------------------------------------------------- */static voidDupRegexpInternalRep(srcPtr, copyPtr)    Tcl_Obj *srcPtr;		/* Object with internal rep to copy. */    Tcl_Obj *copyPtr;		/* Object with internal rep to set. */{    TclRegexp *regexpPtr = (TclRegexp *) srcPtr->internalRep.otherValuePtr;    regexpPtr->refCount++;    copyPtr->internalRep.otherValuePtr = srcPtr->internalRep.otherValuePtr;    copyPtr->typePtr = &tclRegexpType;}/* *---------------------------------------------------------------------- * * SetRegexpFromAny -- * *	Attempt to generate a compiled regular expression for the Tcl object *	"objPtr". * * Results: *	The return value is TCL_OK or TCL_ERROR. If an error occurs during *	conversion, an error message is left in the interpreter's result *	unless "interp" is NULL. * * Side effects: *	If no error occurs, a regular expression is stored as "objPtr"s *	internal representation. * *---------------------------------------------------------------------- */static intSetRegexpFromAny(interp, objPtr)    Tcl_Interp *interp;		/* Used for error reporting if not NULL. */    Tcl_Obj *objPtr;		/* The object to convert. */{    if (Tcl_GetRegExpFromObj(interp, objPtr, REG_ADVANCED) == NULL) {	return TCL_ERROR;    }    return TCL_OK;}/* *--------------------------------------------------------------------------- * * CompileRegexp -- * *	Attempt to compile the given regexp pattern.  If the compiled *	regular expression can be found in the per-thread cache, it *	will be used instead of compiling a new copy. * * Results: *	The return value is a pointer to a newly allocated TclRegexp *	that represents the compiled pattern, or NULL if the pattern *	could not be compiled.  If NULL is returned, an error message is *	left in the interp's result. * * Side effects: *	The thread-local regexp cache is updated and a new TclRegexp may *	be allocated. * *---------------------------------------------------------------------- */static TclRegexp *CompileRegexp(interp, string, length, flags)    Tcl_Interp *interp;		/* Used for error reporting if not NULL. */    CONST char *string;		/* The regexp to compile (UTF-8). */    int length;			/* The length of the string in bytes. */    int flags;			/* Compilation flags. */{    TclRegexp *regexpPtr;    CONST Tcl_UniChar *uniString;    int numChars;    Tcl_DString stringBuf;    int status, i;    ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);     if (!tsdPtr->initialized) {	tsdPtr->initialized = 1;	Tcl_CreateThreadExitHandler(FinalizeRegexp, NULL);    }    /*     * This routine maintains a second-level regular expression cache in     * addition to the per-object regexp cache.  The per-thread cache is needed     * to handle the case where for various reasons the object is lost between     * invocations of the regexp command, but the literal pattern is the same.     */    /*     * Check the per-thread compiled regexp cache.  We can only reuse     * a regexp if it has the same pattern and the same flags.     */    for (i = 0; (i < NUM_REGEXPS) && (tsdPtr->patterns[i] != NULL); i++) {	if ((length == tsdPtr->patLengths[i])		&& (tsdPtr->regexps[i]->flags == flags)		&& (strcmp(string, tsdPtr->patterns[i]) == 0)) {	    /*	     * Move the matched pattern to the first slot in the	     * cache and shift the other patterns down one position.	     */	    if (i != 0) {		int j;		char *cachedString;		cachedString = tsdPtr->patterns[i];		regexpPtr = tsdPtr->regexps[i];		for (j = i-1; j >= 0; j--) {		    tsdPtr->patterns[j+1] = tsdPtr->patterns[j];		    tsdPtr->patLengths[j+1] = tsdPtr->patLengths[j];		    tsdPtr->regexps[j+1] = tsdPtr->regexps[j];		}		tsdPtr->patterns[0] = cachedString;		tsdPtr->patLengths[0] = length;		tsdPtr->regexps[0] = regexpPtr;	    }	    return tsdPtr->regexps[0];	}    }    /*     * This is a new expression, so compile it and add it to the cache.     */        regexpPtr = (TclRegexp *) ckalloc(sizeof(TclRegexp));    regexpPtr->objPtr = NULL;    regexpPtr->string = NULL;    regexpPtr->details.rm_extend.rm_so = -1;    regexpPtr->details.rm_extend.rm_eo = -1;    /*     * Get the up-to-date string representation and map to unicode.     */    Tcl_DStringInit(&stringBuf);    uniString = Tcl_UtfToUniCharDString(string, length, &stringBuf);    numChars = Tcl_DStringLength(&stringBuf) / sizeof(Tcl_UniChar);    /*     * Compile the string and check for errors.     */    regexpPtr->flags = flags;    status = TclReComp(&regexpPtr->re, uniString, (size_t) numChars, flags);    Tcl_DStringFree(&stringBuf);    if (status != REG_OKAY) {	/*	 * Clean up and report errors in the interpreter, if possible.	 */	ckfree((char *)regexpPtr);	if (interp) {	    TclRegError(interp,		    "couldn't compile regular expression pattern: ",		    status);	}	return NULL;    }    /*     * Allocate enough space for all of the subexpressions, plus one     * extra for the entire pattern.     */    regexpPtr->matches = (regmatch_t *) ckalloc(	    sizeof(regmatch_t) * (regexpPtr->re.re_nsub + 1));    /*     * Initialize the refcount to one initially, since it is in the cache.     */    regexpPtr->refCount = 1;    /*     * Free the last regexp, if necessary, and make room at the head of the     * list for the new regexp.     */    if (tsdPtr->patterns[NUM_REGEXPS-1] != NULL) {	TclRegexp *oldRegexpPtr = tsdPtr->regexps[NUM_REGEXPS-1];	if (--(oldRegexpPtr->refCount) <= 0) {	    FreeRegexp(oldRegexpPtr);	}	ckfree(tsdPtr->patterns[NUM_REGEXPS-1]);    }    for (i = NUM_REGEXPS - 2; i >= 0; i--) {	tsdPtr->patterns[i+1] = tsdPtr->patterns[i];	tsdPtr->patLengths[i+1] = tsdPtr->patLengths[i];	tsdPtr->regexps[i+1] = tsdPtr->regexps[i];    }    tsdPtr->patterns[0] = (char *) ckalloc((unsigned) (length+1));    strcpy(tsdPtr->patterns[0], string);    tsdPtr->patLengths[0] = length;    tsdPtr->regexps[0] = regexpPtr;    return regexpPtr;}/* *---------------------------------------------------------------------- * * FreeRegexp -- * *	Release the storage associated with a TclRegexp. * * Results: *	None. * * Side effects: *	None. * *---------------------------------------------------------------------- */static voidFreeRegexp(regexpPtr)    TclRegexp *regexpPtr;	/* Compiled regular expression to free. */{    TclReFree(&regexpPtr->re);    if (regexpPtr->matches) {	ckfree((char *) regexpPtr->matches);    }    ckfree((char *) regexpPtr);}/* *---------------------------------------------------------------------- * * FinalizeRegexp -- * *	Release the storage associated with the per-thread regexp *	cache. * * Results: *	None. * * Side effects: *	None. * *---------------------------------------------------------------------- */static voidFinalizeRegexp(clientData)    ClientData clientData;	/* Not used. */{    int i;    TclRegexp *regexpPtr;    ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);    for (i = 0; (i < NUM_REGEXPS) && (tsdPtr->patterns[i] != NULL); i++) {	regexpPtr = tsdPtr->regexps[i];	if (--(regexpPtr->refCount) <= 0) {	    FreeRegexp(regexpPtr);	}	ckfree(tsdPtr->patterns[i]);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91香蕉视频mp4| 最新日韩av在线| 欧美精品v国产精品v日韩精品| 成人免费毛片片v| 东方aⅴ免费观看久久av| 国产高清久久久| 成人一区二区三区视频| 狠狠色狠狠色合久久伊人| 极品销魂美女一区二区三区| 久久99热这里只有精品| 日本美女一区二区三区| 老鸭窝一区二区久久精品| 五月天网站亚洲| 亚洲成人免费电影| 日韩成人一区二区| 韩国av一区二区三区| 大胆亚洲人体视频| 欧美中文字幕不卡| 欧美一级片免费看| 久久免费午夜影院| 亚洲欧美日韩国产成人精品影院 | 午夜视频一区在线观看| 日韩成人一级片| 国产乱码字幕精品高清av| 成人美女视频在线观看18| 欧美做爰猛烈大尺度电影无法无天| 欧美日韩极品在线观看一区| 精品理论电影在线观看| 亚洲少妇30p| 日本网站在线观看一区二区三区| 国产成人小视频| 欧美在线free| 国产欧美一区二区三区网站| 亚洲小少妇裸体bbw| 国产精品伊人色| 欧美在线观看一二区| www国产成人免费观看视频 深夜成人网| 中文字幕精品一区| 午夜精品一区二区三区电影天堂 | 一区二区三区精品视频在线| 久久精品久久精品| 在线日韩一区二区| 国产亚洲精品免费| 日本系列欧美系列| 色呦呦一区二区三区| 久久先锋影音av鲁色资源网| 亚洲激情图片一区| 国产不卡视频一区| 日韩你懂的在线播放| 一区二区久久久久久| 成人自拍视频在线观看| 日韩欧美另类在线| 亚洲成人一二三| 91视频观看视频| 国产精品色一区二区三区| 蜜臀国产一区二区三区在线播放| 色欧美乱欧美15图片| 欧美国产精品一区二区三区| 裸体一区二区三区| 欧美另类变人与禽xxxxx| 1000部国产精品成人观看| 懂色av一区二区夜夜嗨| 久久日一线二线三线suv| 全国精品久久少妇| 555夜色666亚洲国产免| 亚洲黄色性网站| 一本到不卡免费一区二区| 国产拍揄自揄精品视频麻豆| 久久国产尿小便嘘嘘尿| 9191精品国产综合久久久久久| 国产精品护士白丝一区av| 国产一区二区视频在线| 欧美www视频| 蜜桃av一区二区| 欧美变态tickle挠乳网站| 精品一区二区在线视频| 26uuu国产在线精品一区二区| 免费欧美日韩国产三级电影| 日韩一级黄色片| 琪琪一区二区三区| 2017欧美狠狠色| 风间由美性色一区二区三区| 日本一区二区不卡视频| caoporn国产精品| 悠悠色在线精品| 欧美日韩一区不卡| 日韩av在线播放中文字幕| 日韩欧美在线一区二区三区| 久久电影网电视剧免费观看| 亚洲精品在线电影| 粗大黑人巨茎大战欧美成人| 亚洲欧美视频一区| 欧美性xxxxx极品少妇| 日本特黄久久久高潮| 久久久综合激的五月天| 99久久99久久久精品齐齐| 亚洲狠狠爱一区二区三区| 日韩午夜av电影| 成人三级伦理片| 亚洲综合男人的天堂| 337p亚洲精品色噜噜狠狠| 狠狠色伊人亚洲综合成人| 国产精品素人视频| 欧美视频在线不卡| 国内精品写真在线观看| 中文字幕五月欧美| 91精品欧美福利在线观看| 国产传媒久久文化传媒| 亚洲一区二区三区四区在线观看| 日韩女优电影在线观看| 9色porny自拍视频一区二区| 久久精品视频一区二区三区| 在线观看国产一区二区| 国产最新精品精品你懂的| 亚洲日本丝袜连裤袜办公室| 日韩欧美123| 在线亚洲+欧美+日本专区| 国产一区二区三区最好精华液| 亚洲黄色性网站| 久久久国产午夜精品 | 国产在线精品一区二区三区不卡| 国产精品久线在线观看| 日韩一区二区三区观看| 色av一区二区| 岛国av在线一区| 经典三级视频一区| 国产亚洲精久久久久久| 欧美日韩精品三区| 97精品久久久午夜一区二区三区| 美女精品一区二区| 午夜视频久久久久久| 国产女主播一区| 精品久久国产字幕高潮| 欧美日韩亚洲综合| 91视频免费观看| 成人黄色小视频| 国产乱对白刺激视频不卡| 天堂成人国产精品一区| 日韩理论片一区二区| 久久久久久久综合日本| 日韩欧美在线网站| 欧美精品在线一区二区| 在线观看成人小视频| 国产精华液一区二区三区| 久久国产精品99久久久久久老狼 | 亚洲精品国产a久久久久久| 欧美精品一区二区在线观看| 欧美一区二区三区色| 欧美色大人视频| 欧美在线免费观看视频| 91久久一区二区| 日本久久一区二区| 色欧美片视频在线观看在线视频| 成人黄色片在线观看| 成人动漫一区二区在线| aaa亚洲精品| 91在线国产福利| 91亚洲精品久久久蜜桃网站| 91小视频免费看| 在线观看日韩一区| 97国产一区二区| 欧美亚洲国产一区二区三区| 91久久国产最好的精华液| 色系网站成人免费| 在线国产电影不卡| 欧美日韩电影一区| 日韩限制级电影在线观看| 日韩欧美综合一区| 国产色产综合产在线视频| 国产精品入口麻豆九色| 中文字幕亚洲电影| 亚洲午夜免费福利视频| 热久久国产精品| 国产美女视频一区| youjizz国产精品| 色综合亚洲欧洲| 欧美日韩国产免费一区二区 | 国产精品一区二区三区乱码| 国产成a人亚洲| 91丝袜美女网| 欧美另类videos死尸| 久久精品无码一区二区三区| 亚洲日本在线天堂| 人人精品人人爱| 成人网页在线观看| 欧美三级乱人伦电影| 欧美电视剧免费全集观看| 国产精品拍天天在线| 亚洲一区二区成人在线观看| 久久99精品一区二区三区三区| 成人av在线电影| 欧美裸体一区二区三区| 国产欧美日韩在线观看| 亚洲第一电影网| 国产盗摄视频一区二区三区| 色偷偷一区二区三区| 精品国产精品一区二区夜夜嗨| 亚洲丝袜制服诱惑| 精品一区二区三区在线视频| 色婷婷精品久久二区二区蜜臀av|