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

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

?? uri.c

?? xml開源解析代碼.版本為libxml2-2.6.29,可支持GB3212.網絡消息發送XML時很有用.
?? C
?? 第 1 頁 / 共 5 頁
字號:
	    }	}    }    if (uri->fragment != NULL) {	if (len + 3 >= max) {	    max *= 2;	    ret = (xmlChar *) xmlRealloc(ret,		    (max + 1) * sizeof(xmlChar));	    if (ret == NULL) {		xmlGenericError(xmlGenericErrorContext,			"xmlSaveUri: out of memory\n");		return(NULL);	    }	}	ret[len++] = '#';	p = uri->fragment;	while (*p != 0) {	    if (len + 3 >= max) {		max *= 2;		ret = (xmlChar *) xmlRealloc(ret,			(max + 1) * sizeof(xmlChar));		if (ret == NULL) {		    xmlGenericError(xmlGenericErrorContext,			    "xmlSaveUri: out of memory\n");		    return(NULL);		}	    }	    if ((IS_UNRESERVED(*(p))) || (IS_RESERVED(*(p)))) 		ret[len++] = *p++;	    else {		int val = *(unsigned char *)p++;		int hi = val / 0x10, lo = val % 0x10;		ret[len++] = '%';		ret[len++] = hi + (hi > 9? 'A'-10 : '0');		ret[len++] = lo + (lo > 9? 'A'-10 : '0');	    }	}    }    if (len >= max) {	max *= 2;	ret = (xmlChar *) xmlRealloc(ret, (max + 1) * sizeof(xmlChar));	if (ret == NULL) {	    xmlGenericError(xmlGenericErrorContext,		    "xmlSaveUri: out of memory\n");	    return(NULL);	}    }    ret[len++] = 0;    return(ret);}/** * xmlPrintURI: * @stream:  a FILE* for the output * @uri:  pointer to an xmlURI * * Prints the URI in the stream @stream. */voidxmlPrintURI(FILE *stream, xmlURIPtr uri) {    xmlChar *out;    out = xmlSaveUri(uri);    if (out != NULL) {	fprintf(stream, "%s", (char *) out);	xmlFree(out);    }}/** * xmlCleanURI: * @uri:  pointer to an xmlURI * * Make sure the xmlURI struct is free of content */static voidxmlCleanURI(xmlURIPtr uri) {    if (uri == NULL) return;    if (uri->scheme != NULL) xmlFree(uri->scheme);    uri->scheme = NULL;    if (uri->server != NULL) xmlFree(uri->server);    uri->server = NULL;    if (uri->user != NULL) xmlFree(uri->user);    uri->user = NULL;    if (uri->path != NULL) xmlFree(uri->path);    uri->path = NULL;    if (uri->fragment != NULL) xmlFree(uri->fragment);    uri->fragment = NULL;    if (uri->opaque != NULL) xmlFree(uri->opaque);    uri->opaque = NULL;    if (uri->authority != NULL) xmlFree(uri->authority);    uri->authority = NULL;    if (uri->query != NULL) xmlFree(uri->query);    uri->query = NULL;    if (uri->query_raw != NULL) xmlFree(uri->query_raw);    uri->query_raw = NULL;}/** * xmlFreeURI: * @uri:  pointer to an xmlURI * * Free up the xmlURI struct */voidxmlFreeURI(xmlURIPtr uri) {    if (uri == NULL) return;    if (uri->scheme != NULL) xmlFree(uri->scheme);    if (uri->server != NULL) xmlFree(uri->server);    if (uri->user != NULL) xmlFree(uri->user);    if (uri->path != NULL) xmlFree(uri->path);    if (uri->fragment != NULL) xmlFree(uri->fragment);    if (uri->opaque != NULL) xmlFree(uri->opaque);    if (uri->authority != NULL) xmlFree(uri->authority);    if (uri->query != NULL) xmlFree(uri->query);    if (uri->query_raw != NULL) xmlFree(uri->query_raw);    xmlFree(uri);}/************************************************************************ *									* *			Helper functions				* *									* ************************************************************************//** * xmlNormalizeURIPath: * @path:  pointer to the path string * * Applies the 5 normalization steps to a path string--that is, RFC 2396 * Section 5.2, steps 6.c through 6.g. * * Normalization occurs directly on the string, no new allocation is done * * Returns 0 or an error code */intxmlNormalizeURIPath(char *path) {    char *cur, *out;    if (path == NULL)	return(-1);    /* Skip all initial "/" chars.  We want to get to the beginning of the     * first non-empty segment.     */    cur = path;    while (cur[0] == '/')      ++cur;    if (cur[0] == '\0')      return(0);    /* Keep everything we've seen so far.  */    out = cur;    /*     * Analyze each segment in sequence for cases (c) and (d).     */    while (cur[0] != '\0') {	/*	 * c) All occurrences of "./", where "." is a complete path segment,	 *    are removed from the buffer string.	 */	if ((cur[0] == '.') && (cur[1] == '/')) {	    cur += 2;	    /* '//' normalization should be done at this point too */	    while (cur[0] == '/')		cur++;	    continue;	}	/*	 * d) If the buffer string ends with "." as a complete path segment,	 *    that "." is removed.	 */	if ((cur[0] == '.') && (cur[1] == '\0'))	    break;	/* Otherwise keep the segment.  */	while (cur[0] != '/') {            if (cur[0] == '\0')              goto done_cd;	    (out++)[0] = (cur++)[0];	}	/* nomalize // */	while ((cur[0] == '/') && (cur[1] == '/'))	    cur++;        (out++)[0] = (cur++)[0];    } done_cd:    out[0] = '\0';    /* Reset to the beginning of the first segment for the next sequence.  */    cur = path;    while (cur[0] == '/')      ++cur;    if (cur[0] == '\0')	return(0);    /*     * Analyze each segment in sequence for cases (e) and (f).     *     * e) All occurrences of "<segment>/../", where <segment> is a     *    complete path segment not equal to "..", are removed from the     *    buffer string.  Removal of these path segments is performed     *    iteratively, removing the leftmost matching pattern on each     *    iteration, until no matching pattern remains.     *     * f) If the buffer string ends with "<segment>/..", where <segment>     *    is a complete path segment not equal to "..", that     *    "<segment>/.." is removed.     *     * To satisfy the "iterative" clause in (e), we need to collapse the     * string every time we find something that needs to be removed.  Thus,     * we don't need to keep two pointers into the string: we only need a     * "current position" pointer.     */    while (1) {        char *segp, *tmp;        /* At the beginning of each iteration of this loop, "cur" points to         * the first character of the segment we want to examine.         */        /* Find the end of the current segment.  */        segp = cur;        while ((segp[0] != '/') && (segp[0] != '\0'))          ++segp;        /* If this is the last segment, we're done (we need at least two         * segments to meet the criteria for the (e) and (f) cases).         */        if (segp[0] == '\0')          break;        /* If the first segment is "..", or if the next segment _isn't_ "..",         * keep this segment and try the next one.         */        ++segp;        if (((cur[0] == '.') && (cur[1] == '.') && (segp == cur+3))            || ((segp[0] != '.') || (segp[1] != '.')                || ((segp[2] != '/') && (segp[2] != '\0')))) {          cur = segp;          continue;        }        /* If we get here, remove this segment and the next one and back up         * to the previous segment (if there is one), to implement the         * "iteratively" clause.  It's pretty much impossible to back up         * while maintaining two pointers into the buffer, so just compact         * the whole buffer now.         */        /* If this is the end of the buffer, we're done.  */        if (segp[2] == '\0') {          cur[0] = '\0';          break;        }        /* Valgrind complained, strcpy(cur, segp + 3); */	/* string will overlap, do not use strcpy */	tmp = cur;	segp += 3;	while ((*tmp++ = *segp++) != 0);        /* If there are no previous segments, then keep going from here.  */        segp = cur;        while ((segp > path) && ((--segp)[0] == '/'))          ;        if (segp == path)          continue;        /* "segp" is pointing to the end of a previous segment; find it's         * start.  We need to back up to the previous segment and start         * over with that to handle things like "foo/bar/../..".  If we         * don't do this, then on the first pass we'll remove the "bar/..",         * but be pointing at the second ".." so we won't realize we can also         * remove the "foo/..".         */        cur = segp;        while ((cur > path) && (cur[-1] != '/'))          --cur;    }    out[0] = '\0';    /*     * g) If the resulting buffer string still begins with one or more     *    complete path segments of "..", then the reference is     *    considered to be in error. Implementations may handle this     *    error by retaining these components in the resolved path (i.e.,     *    treating them as part of the final URI), by removing them from     *    the resolved path (i.e., discarding relative levels above the     *    root), or by avoiding traversal of the reference.     *     * We discard them from the final path.     */    if (path[0] == '/') {      cur = path;      while ((cur[0] == '/') && (cur[1] == '.') && (cur[2] == '.')             && ((cur[3] == '/') || (cur[3] == '\0')))	cur += 3;      if (cur != path) {	out = path;	while (cur[0] != '\0')          (out++)[0] = (cur++)[0];	out[0] = 0;      }    }    return(0);}static int is_hex(char c) {    if (((c >= '0') && (c <= '9')) ||        ((c >= 'a') && (c <= 'f')) ||        ((c >= 'A') && (c <= 'F')))	return(1);    return(0);}/** * xmlURIUnescapeString: * @str:  the string to unescape * @len:   the length in bytes to unescape (or <= 0 to indicate full string) * @target:  optional destination buffer * * Unescaping routine, but does not check that the string is an URI. The * output is a direct unsigned char translation of %XX values (no encoding) * Note that the length of the result can only be smaller or same size as * the input string. * * Returns a copy of the string, but unescaped, will return NULL only in case * of error */char *xmlURIUnescapeString(const char *str, int len, char *target) {    char *ret, *out;    const char *in;    if (str == NULL)	return(NULL);    if (len <= 0) len = strlen(str);    if (len < 0) return(NULL);    if (target == NULL) {	ret = (char *) xmlMallocAtomic(len + 1);	if (ret == NULL) {	    xmlGenericError(xmlGenericErrorContext,		    "xmlURIUnescapeString: out of memory\n");	    return(NULL);	}    } else	ret = target;    in = str;    out = ret;    while(len > 0) {	if ((len > 2) && (*in == '%') && (is_hex(in[1])) && (is_hex(in[2]))) {	    in++;	    if ((*in >= '0') && (*in <= '9')) 	        *out = (*in - '0');	    else if ((*in >= 'a') && (*in <= 'f'))	        *out = (*in - 'a') + 10;	    else if ((*in >= 'A') && (*in <= 'F'))	        *out = (*in - 'A') + 10;	    in++;	    if ((*in >= '0') && (*in <= '9')) 	        *out = *out * 16 + (*in - '0');	    else if ((*in >= 'a') && (*in <= 'f'))	        *out = *out * 16 + (*in - 'a') + 10;	    else if ((*in >= 'A') && (*in <= 'F'))	        *out = *out * 16 + (*in - 'A') + 10;	    in++;	    len -= 3;	    out++;	} else {	    *out++ = *in++;	    len--;	}    }    *out = 0;    return(ret);}/** * xmlURIEscapeStr: * @str:  string to escape * @list: exception list string of chars not to escape * * This routine escapes a string to hex, ignoring reserved characters (a-z) * and the characters in the exception list. * * Returns a new escaped string or NULL in case of error. */xmlChar *xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) {    xmlChar *ret, ch;    const xmlChar *in;    unsigned int len, out;    if (str == NULL)	return(NULL);    if (str[0] == 0)	return(xmlStrdup(str));    len = xmlStrlen(str);    if (!(len > 0)) return(NULL);    len += 20;    ret = (xmlChar *) xmlMallocAtomic(len);    if (ret == NULL) {	xmlGenericError(xmlGenericErrorContext,		"xmlURIEscapeStr: out of memory\n");	return(NULL);    }    in = (const xmlChar *) str;    out = 0;    while(*in != 0) {	if (len - out <= 3) {	    len += 20;	    ret = (xmlChar *) xmlRealloc(ret, len);	    if (ret == NULL) {		xmlGenericError(xmlGenericErrorContext,			"xmlURIEscapeStr: out of memory\n");		return(NULL);	    }	}	ch = *in;	if ((ch != '@') && (!IS_UNRESERVED(ch)) && (!xmlStrchr(list, ch))) {	    unsigned char val;	    ret[out++] = '%';	    val = ch >> 4;	    if (val <= 9)		ret[out++] = '0' + val;	    else		ret[out++] = 'A' + val - 0xA;	    val = ch & 0xF;	    if (val <= 9)		ret[out++] = '0' + val;	    else		ret[out++] = 'A' + val - 0xA;	    in++;	} else {	    ret[out++] = *in++;	}    }    ret[out] = 0;    return(ret);}/** * xmlURIEscape: * @str:  the string of the URI to escape * * Escaping routine, does not do validity checks ! * It will try to escape the chars needing this, but this is heuristic * based it's impossible to be sure. * * Returns an copy of the string, but escaped * * 25 May 2001 * Uses xmlParseURI and xmlURIEscapeStr to try to escape correctly * according to RFC2396. *   - Carl Douglas */xmlChar *xmlURIEscape(const xmlChar * str){    xmlChar *ret, *segment = NULL;    xmlURIPtr uri;    int ret2;#define NULLCHK(p) if(!p) { \                   xmlGenericError(xmlGenericErrorContext, \                        "xmlURIEscape: out of memory\n"); \                   return NULL; }    if (str == NULL)        return (NULL);    uri = xmlCreateURI();    if (uri != NULL) {	/*	 * Allow escaping errors in the unescaped form	 */        uri->cleanup = 1;        ret2 = xmlParseURIReference(uri, (const char *)str);        if (ret2) {            xmlFreeURI(uri);            return (NULL);        }    }    if (!uri)        return NULL;    ret = NULL;    if (uri->scheme) {        segment = xmlURIEscapeStr(BAD_CAST uri->scheme, BAD_CAST "+-.");        NULLCHK(segment)        ret = xmlStrcat(ret, segment);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜电影久久影院| 日韩亚洲欧美在线| 波多野洁衣一区| 国产乱国产乱300精品| 麻豆精品新av中文字幕| 日本欧美加勒比视频| 亚洲aⅴ怡春院| 亚洲电影在线免费观看| 亚洲国产乱码最新视频| 亚洲18色成人| 日日骚欧美日韩| 婷婷成人综合网| 日本美女一区二区| 蜜臀av一区二区在线免费观看| 日本午夜一区二区| 美女视频黄频大全不卡视频在线播放| 蜜桃一区二区三区在线观看| 免费国产亚洲视频| 国内精品视频一区二区三区八戒| 久久国产精品99精品国产| 国产乱码精品一区二区三区五月婷| 精品一区二区免费看| 久久99精品久久久久久| 激情文学综合插| 国产大陆a不卡| 成人性生交大片免费看在线播放| 白白色亚洲国产精品| 91视频在线观看免费| 欧美性做爰猛烈叫床潮| 欧美精品一卡二卡| 欧美不卡激情三级在线观看| 国产亚洲精品精华液| 亚洲欧美综合色| 亚洲午夜av在线| 另类小说欧美激情| 国产成人久久精品77777最新版本| 成人性生交大合| 在线免费观看日韩欧美| 欧美一区二区三区人| 国产丝袜美腿一区二区三区| 亚洲欧美区自拍先锋| 奇米影视7777精品一区二区| 国产精品主播直播| 欧亚一区二区三区| 欧美变态凌虐bdsm| 亚洲免费观看高清完整| 麻豆一区二区三区| 国产成+人+日韩+欧美+亚洲| 欧美亚洲国产一卡| 欧美tickling挠脚心丨vk| 中文字幕精品一区二区精品绿巨人| 伊人夜夜躁av伊人久久| 久久99国产精品久久99| 91香蕉视频黄| 日韩免费观看高清完整版| 中文一区二区在线观看| 婷婷综合另类小说色区| 国产成人一级电影| 在线观看精品一区| 久久免费美女视频| 性久久久久久久久| jlzzjlzz欧美大全| 欧美一区二区精品在线| 成人欧美一区二区三区小说| 蜜桃久久精品一区二区| 91在线播放网址| 久久嫩草精品久久久久| 亚洲超碰精品一区二区| www.在线欧美| 精品国产亚洲一区二区三区在线观看| 中文字幕亚洲区| 久久精品久久99精品久久| 在线区一区二视频| 欧美激情一区二区三区在线| 奇米色一区二区三区四区| 91理论电影在线观看| 国产亚洲美州欧州综合国| 免费成人av资源网| 欧美影院精品一区| 国产精品久久久久一区二区三区 | 国产mv日韩mv欧美| 欧美人xxxx| 亚洲精品v日韩精品| 国产福利91精品一区二区三区| 欧美一级片免费看| 亚洲综合色婷婷| 91一区在线观看| 国产精品视频看| 国产一区视频在线看| 6080午夜不卡| 亚洲国产日韩一级| 欧美丝袜自拍制服另类| 亚洲青青青在线视频| 不卡一区二区中文字幕| 久久―日本道色综合久久| 美女网站视频久久| 欧美大白屁股肥臀xxxxxx| 亚洲电影一级片| 欧美日韩在线播放一区| 一区二区三区小说| 一本久久精品一区二区| √…a在线天堂一区| 成人黄色大片在线观看| 欧美国产在线观看| 国产99久久久精品| 国产农村妇女毛片精品久久麻豆| 精品综合免费视频观看| 日韩免费看网站| 久久99精品久久久| 久久久一区二区三区| 喷水一区二区三区| 91精品国产一区二区| 日韩成人免费看| 欧美精品黑人性xxxx| 爽好多水快深点欧美视频| 欧美日免费三级在线| 亚洲风情在线资源站| 91精品国产综合久久精品图片| 亚洲bt欧美bt精品| 日韩欧美一区二区在线视频| 久久精品理论片| 国产色综合久久| 99久久综合狠狠综合久久| 亚洲日本青草视频在线怡红院 | 久久品道一品道久久精品| 国精产品一区一区三区mba视频| 2014亚洲片线观看视频免费| 国产精品一区免费视频| 中文字幕制服丝袜成人av| 91网址在线看| 午夜一区二区三区在线观看| 555www色欧美视频| 精品伊人久久久久7777人| 国产人成亚洲第一网站在线播放| av一区二区三区黑人| 一区二区三区在线观看视频| 欧美精选在线播放| 国产一区二区三区高清播放| 国产精品久久久久久久第一福利| 色综合久久88色综合天天免费| 一级女性全黄久久生活片免费| 91精品国产一区二区人妖| 国产精品一卡二卡在线观看| 日韩毛片高清在线播放| 欧美视频一区二区在线观看| 日本欧美在线观看| 欧美国产精品中文字幕| 欧美影视一区在线| 国产一区视频导航| 亚洲免费观看高清完整版在线| 日韩亚洲国产中文字幕欧美| 成人在线综合网站| 亚洲国产精品自拍| 久久久美女毛片| 欧美色爱综合网| 国内久久精品视频| 亚洲高清不卡在线观看| 久久久噜噜噜久久中文字幕色伊伊| 99re热这里只有精品视频| 亚洲国产日韩在线一区模特| 久久久一区二区三区捆绑**| 欧美天堂一区二区三区| 国产剧情一区二区三区| 亚洲卡通欧美制服中文| 日韩精品一区二区三区老鸭窝| 95精品视频在线| 精品一区二区在线免费观看| 亚洲色图20p| 久久久噜噜噜久噜久久综合| 欧美性生活一区| 成人高清免费观看| 日韩国产一区二| 亚洲欧美一区二区在线观看| 日韩视频一区二区在线观看| 色哦色哦哦色天天综合| 国产成人精品免费视频网站| 三级不卡在线观看| 亚洲欧美日韩系列| 久久久午夜电影| 337p亚洲精品色噜噜| 91免费版pro下载短视频| 国模一区二区三区白浆| 亚洲风情在线资源站| 最新高清无码专区| www国产精品av| 欧美顶级少妇做爰| 91麻豆国产福利在线观看| 国产精品一区二区x88av| 日韩精品高清不卡| 亚洲一区二区三区三| 18成人在线观看| 中文字幕不卡的av| 久久一夜天堂av一区二区三区| 欧美精品1区2区| 在线中文字幕一区| 91免费国产在线| 99精品1区2区| 99国产精品久| 99久久久国产精品| bt7086福利一区国产|