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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? like_match.c

?? postgresql8.3.4源碼,開源數(shù)據(jù)庫
?? C
字號(hào):
/*------------------------------------------------------------------------- * * like_match.c *	  like expression handling internal code. * * This file is included by like.c four times, to provide natching code for * single-byte encodings, UTF8, and for other multi-byte encodings, * and case insensitive matches for single byte encodings. * UTF8 is a special case because we can use a much more efficient version * of NextChar than can be used for other multi-byte encodings. * * Before the inclusion, we need to define following macros: * * NextChar * MatchText - to name of function wanted * do_like_escape - name of function if wanted - needs CHAREQ and CopyAdvChar * MATCH_LOWER - define iff using to_lower on text chars * * Copyright (c) 1996-2008, PostgreSQL Global Development Group * * IDENTIFICATION *	$PostgreSQL: pgsql/src/backend/utils/adt/like_match.c,v 1.20.2.1 2008/03/01 03:26:44 tgl Exp $ * *------------------------------------------------------------------------- *//***	Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.**	Rich $alz is now <rsalz@bbn.com>.**	Special thanks to Lars Mathiesen <thorinn@diku.dk> for the LABORT code.****	This code was shamelessly stolen from the "pql" code by myself and**	slightly modified :)****	All references to the word "star" were replaced by "percent"**	All references to the word "wild" were replaced by "like"****	All the nice shell RE matching stuff was replaced by just "_" and "%"****	As I don't have a copy of the SQL standard handy I wasn't sure whether**	to leave in the '\' escape character handling.****	Keith Parks. <keith@mtcc.demon.co.uk>****	SQL92 lets you specify the escape character by saying**	LIKE <pattern> ESCAPE <escape character>. We are a small operation**	so we force you to use '\'. - ay 7/95****	Now we have the like_escape() function that converts patterns with**	any specified escape character (or none at all) to the internal**	default escape character, which is still '\'. - tgl 9/2000**** The code is rewritten to avoid requiring null-terminated strings,** which in turn allows us to leave out some memcpy() operations.** This code should be faster and take less memory, but no promises...** - thomas 2000-08-06***//*-------------------- *	Match text and p, return LIKE_TRUE, LIKE_FALSE, or LIKE_ABORT. * *	LIKE_TRUE: they match *	LIKE_FALSE: they don't match *	LIKE_ABORT: not only don't they match, but the text is too short. * * If LIKE_ABORT is returned, then no suffix of the text can match the * pattern either, so an upper-level % scan can stop scanning now. *-------------------- */#ifdef MATCH_LOWER#define TCHAR(t) ((char) tolower((unsigned char) (t)))#else#define TCHAR(t) (t)#endifstatic intMatchText(char *t, int tlen, char *p, int plen){	/* Fast path for match-everything pattern */	if ((plen == 1) && (*p == '%'))		return LIKE_TRUE;	/*	 * In this loop, we advance by char when matching wildcards (and thus on	 * recursive entry to this function we are properly char-synced). On other	 * occasions it is safe to advance by byte, as the text and pattern will	 * be in lockstep. This allows us to perform all comparisons  between the	 * text and pattern on a byte by byte basis, even for multi-byte	 * encodings.	 */	while ((tlen > 0) && (plen > 0))	{		if (*p == '\\')		{			/* Next byte must match literally, whatever it is */			NextByte(p, plen);			if ((plen <= 0) || *p != *t)				return LIKE_FALSE;		}		else if (*p == '%')		{			/*			 * % processing is essentially a search for a match for what			 * follows the %, plus a recursive match of the remainder. We			 * succeed if and only if both conditions are met.			 */			/* %% is the same as % according to the SQL standard */			/* Advance past all %'s */			while ((plen > 0) && (*p == '%'))				NextByte(p, plen);			/* Trailing percent matches everything. */			if (plen <= 0)				return LIKE_TRUE;			/*			 * Otherwise, scan for a text position at which we can match the			 * rest of the pattern.			 */			if (*p == '_')			{				/* %_ is the same as _% - avoid matching _ repeatedly */				NextChar(t, tlen);				NextByte(p, plen);				if (tlen <= 0)				{					return (plen <= 0) ? LIKE_TRUE : LIKE_ABORT;				}				else if (plen <= 0)				{					return LIKE_FALSE;				}				while (tlen > 0)				{					int			matched = MatchText(t, tlen, p, plen);					if (matched != LIKE_FALSE)						return matched; /* TRUE or ABORT */					NextChar(t, tlen);				}			}			else			{				char		firstpat = TCHAR(*p);				if (*p == '\\')				{					if (plen < 2)						return LIKE_FALSE;					firstpat = TCHAR(p[1]);				}				while (tlen > 0)				{					/*					 * Optimization to prevent most recursion: don't recurse					 * unless first pattern byte matches first text byte.					 */					if (TCHAR(*t) == firstpat)					{						int			matched = MatchText(t, tlen, p, plen);						if (matched != LIKE_FALSE)							return matched;		/* TRUE or ABORT */					}					NextChar(t, tlen);				}			}			/*			 * End of text with no match, so no point in trying later places			 * to start matching this pattern.			 */			return LIKE_ABORT;		}		else if (*p == '_')		{			NextChar(t, tlen);			NextByte(p, plen);			continue;		}		else if (TCHAR(*t) != TCHAR(*p))		{			/*			 * Not the single-character wildcard and no explicit match? Then			 * time to quit...			 */			return LIKE_FALSE;		}		/*		 * It is safe to use NextByte instead of NextChar here, even for		 * multi-byte character sets, because we are not following immediately		 * after a wildcard character. If we are in the middle of a multibyte		 * character, we must already have matched at least one byte of the		 * character from both text and pattern; so we cannot get out-of-sync		 * on character boundaries.  And we know that no backend-legal		 * encoding allows ASCII characters such as '%' to appear as non-first		 * bytes of characters, so we won't mistakenly detect a new wildcard.		 */		NextByte(t, tlen);		NextByte(p, plen);	}	if (tlen > 0)		return LIKE_FALSE;		/* end of pattern, but not of text */	/* End of input string.  Do we have matching pattern remaining? */	while ((plen > 0) && (*p == '%'))	/* allow multiple %'s at end of										 * pattern */		NextByte(p, plen);	if (plen <= 0)		return LIKE_TRUE;	/*	 * End of text with no match, so no point in trying later places to start	 * matching this pattern.	 */	return LIKE_ABORT;}	/* MatchText() *//* * like_escape() --- given a pattern and an ESCAPE string, * convert the pattern to use Postgres' standard backslash escape convention. */#ifdef do_like_escapestatic text *do_like_escape(text *pat, text *esc){	text	   *result;	char	   *p,			   *e,			   *r;	int			plen,				elen;	bool		afterescape;	p = VARDATA_ANY(pat);	plen = VARSIZE_ANY_EXHDR(pat);	e = VARDATA_ANY(esc);	elen = VARSIZE_ANY_EXHDR(esc);	/*	 * Worst-case pattern growth is 2x --- unlikely, but it's hardly worth	 * trying to calculate the size more accurately than that.	 */	result = (text *) palloc(plen * 2 + VARHDRSZ);	r = VARDATA(result);	if (elen == 0)	{		/*		 * No escape character is wanted.  Double any backslashes in the		 * pattern to make them act like ordinary characters.		 */		while (plen > 0)		{			if (*p == '\\')				*r++ = '\\';			CopyAdvChar(r, p, plen);		}	}	else	{		/*		 * The specified escape must be only a single character.		 */		NextChar(e, elen);		if (elen != 0)			ereport(ERROR,					(errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE),					 errmsg("invalid escape string"),				  errhint("Escape string must be empty or one character.")));		e = VARDATA_ANY(esc);		/*		 * If specified escape is '\', just copy the pattern as-is.		 */		if (*e == '\\')		{			memcpy(result, pat, VARSIZE_ANY(pat));			return result;		}		/*		 * Otherwise, convert occurrences of the specified escape character to		 * '\', and double occurrences of '\' --- unless they immediately		 * follow an escape character!		 */		afterescape = false;		while (plen > 0)		{			if (CHAREQ(p, e) && !afterescape)			{				*r++ = '\\';				NextChar(p, plen);				afterescape = true;			}			else if (*p == '\\')			{				*r++ = '\\';				if (!afterescape)					*r++ = '\\';				NextChar(p, plen);				afterescape = false;			}			else			{				CopyAdvChar(r, p, plen);				afterescape = false;			}		}	}	SET_VARSIZE(result, r - ((char *) result));	return result;}#endif   /* do_like_escape */#ifdef CHAREQ#undef CHAREQ#endif#undef NextChar#undef CopyAdvChar#undef MatchText#ifdef do_like_escape#undef do_like_escape#endif#undef TCHAR#ifdef MATCH_LOWER#undef MATCH_LOWER#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲最大的成人av| 国产成人免费视频一区| 欧美一级在线免费| 极品少妇xxxx精品少妇偷拍| 亚洲精品在线免费观看视频| 国内精品国产三级国产a久久| 久久亚洲私人国产精品va媚药| 国产一区不卡精品| 国产精品亲子伦对白| 色偷偷88欧美精品久久久| 亚洲一区二区精品久久av| 91精品久久久久久久99蜜桃| 久久99精品久久久久久动态图 | 色综合 综合色| 亚洲综合激情另类小说区| 欧美日本在线一区| 日日夜夜精品视频免费| 欧美v国产在线一区二区三区| 国产在线视频精品一区| 国产精品久久久久久久岛一牛影视| 一本色道久久加勒比精品| 同产精品九九九| 精品嫩草影院久久| jvid福利写真一区二区三区| 夜夜精品视频一区二区| 日韩午夜av一区| 国产精品99久久久久久有的能看 | 日韩一级免费观看| 国产成人免费视频一区| 亚洲一区二区四区蜜桃| 精品毛片乱码1区2区3区| 亚洲一区二区在线观看视频| 亚洲一二三四在线| 日韩欧美一级精品久久| 高清日韩电视剧大全免费| 曰韩精品一区二区| 欧美电影免费提供在线观看| 成人a区在线观看| 视频一区视频二区中文字幕| 欧美韩国日本一区| 欧美巨大另类极品videosbest| 国内偷窥港台综合视频在线播放| 1区2区3区国产精品| 91精品国产品国语在线不卡| av一区二区三区四区| 日韩在线观看一区二区| 欧美高清在线视频| 欧美久久久影院| 国产v综合v亚洲欧| 偷拍一区二区三区四区| 国产精品五月天| 日韩一级高清毛片| 色先锋aa成人| 国产精品亚洲综合一区在线观看| 亚洲国产你懂的| 国产亚洲欧美日韩日本| 欧美日韩国产免费一区二区 | 亚洲电影一区二区三区| 国产香蕉久久精品综合网| 精品污污网站免费看| 懂色av一区二区三区免费看| 亚洲国产精品精华液ab| 欧美性感一类影片在线播放| 国产一区二三区好的| 亚洲妇女屁股眼交7| 国产精品美女久久福利网站| 日韩欧美中文字幕制服| 日本韩国一区二区| 国产成人在线视频网址| 日韩av网站免费在线| 亚洲欧美日韩系列| 国产亚洲精品福利| 欧美一区二区三区不卡| 日本高清不卡在线观看| 成人综合在线观看| 国产综合色在线视频区| 奇米精品一区二区三区四区| 亚洲国产精品一区二区www在线| 亚洲国产精品成人综合| 日韩精品一区二区三区三区免费| 欧美在线不卡一区| 99久久99久久精品免费观看| 国产老肥熟一区二区三区| 日产精品久久久久久久性色| 亚洲永久精品大片| 亚洲色图都市小说| 亚洲国产精华液网站w| www激情久久| 日韩一区二区免费视频| 欧美精品粉嫩高潮一区二区| 色网站国产精品| 91亚洲精品久久久蜜桃| 成人看片黄a免费看在线| 国产精品一级黄| 经典一区二区三区| 久久不见久久见免费视频7| 婷婷久久综合九色国产成人 | 中文字幕日韩av资源站| 欧美国产欧美综合| 国产拍欧美日韩视频二区| 久久精品男人天堂av| 久久久久久久久久久久久久久99| 日韩免费成人网| 欧美成人国产一区二区| 欧美大尺度电影在线| 欧美成人一级视频| 精品人伦一区二区色婷婷| 日韩欧美国产麻豆| 日韩欧美亚洲一区二区| 欧美不卡123| 2020国产精品| 国产午夜精品福利| 国产精品三级视频| 中文字幕亚洲区| 亚洲人成精品久久久久| 亚洲美女视频在线| 一二三四区精品视频| 亚洲制服丝袜在线| 亚洲愉拍自拍另类高清精品| 亚洲黄色小说网站| 中文字幕免费在线观看视频一区| 中文字幕不卡三区| 欧美高清在线视频| 国产精品三级av在线播放| 国产欧美综合色| 1000部国产精品成人观看| 国产精品久久二区二区| 国产精品免费aⅴ片在线观看| 国产亚洲精品bt天堂精选| 久久久久青草大香线综合精品| 国产欧美精品国产国产专区| 国产人成亚洲第一网站在线播放| 久久久一区二区三区| 久久久精品2019中文字幕之3| 精品999久久久| 亚洲欧洲色图综合| 亚洲另类一区二区| 一区二区三区在线看| 一区二区三区不卡在线观看| 一区二区三区四区在线播放| 天堂va蜜桃一区二区三区漫画版| 视频一区二区三区中文字幕| 日本在线观看不卡视频| 青青草97国产精品免费观看无弹窗版| 日韩电影在线免费| 日本视频中文字幕一区二区三区| 免费看精品久久片| 国产成人av影院| 成人爱爱电影网址| 在线免费观看成人短视频| 欧美三级在线视频| 欧美日韩国产美女| 久久综合久久久久88| 国产精品欧美经典| 尤物在线观看一区| 日韩电影一区二区三区四区| 国产成人在线视频免费播放| 99久久99久久精品国产片果冻| 色美美综合视频| 欧美精品久久久久久久多人混战| 国产嫩草影院久久久久| 中文字幕一区二区三区乱码在线| 亚洲精品videosex极品| 日韩精品欧美精品| 久久精品国产精品亚洲精品| 成人黄色免费短视频| 欧美视频完全免费看| 欧美一级黄色大片| 国产欧美日产一区| 日本中文字幕一区二区视频| 国产精品66部| 在线亚洲+欧美+日本专区| 日韩一区二区三区在线视频| 国产区在线观看成人精品| 亚洲一区二区三区四区五区黄 | 欧美日韩精品二区第二页| 久久九九全国免费| 亚洲欧美一区二区不卡| 视频一区中文字幕| 成人天堂资源www在线| 91麻豆精品久久久久蜜臀| 日本一区二区免费在线观看视频 | 97久久超碰精品国产| 欧美日韩一级视频| 久久久综合视频| 亚洲精品国产精华液| 国产成都精品91一区二区三 | 成人黄色综合网站| 在线电影欧美成精品| 国产拍揄自揄精品视频麻豆| 日韩电影在线一区| 成av人片一区二区| 欧美精品久久99| 国产精品区一区二区三| 久久精工是国产品牌吗| 91最新地址在线播放| 日韩精品专区在线影院观看| 亚洲人精品午夜| 国产成人综合在线| 91精选在线观看|