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

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

?? htparse.c

?? firtext搜索引擎源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*								      HTParse.c**	URI MANAGEMENT****	(c) COPYRIGHT MIT 1995.**	Please first read the full copyright statement in the file COPYRIGH.**	@(#) $Id: HTParse.c,v 2.80 1999/02/22 22:10:11 frystyk Exp $**** history:**	May 12 94	TAB added as legal char in HTCleanTelnetString***//* Library include files */#include "wwwsys.h"#include "WWWUtil.h"#include "HTParse.h"					 /* Implemented here */typedef struct _HTURI {    char * access;		/* Now known as "scheme" */    char * host;    char * absolute;    char * relative;    char * fragment;} HTURI;/*	Scan a filename for its consituents**	-----------------------------------**** On entry,**	name	points to a document name which may be incomplete.** On exit,**      absolute or relative may be nonzero (but not both).**	host, fragment and access may be nonzero if they were specified.**	Any which are nonzero point to zero terminated strings.*/PRIVATE void scan (char * name, HTURI * parts){    char * p;    char * after_access = name;    memset(parts, '\0', sizeof(HTURI));    /* Look for fragment identifier */    if ((p = strchr(name, '#')) != NULL) {	*p++ = '\0';	parts->fragment = p;    }            if ((p = strchr(name, ' ')) != NULL) *p++ = '\0';            for(p=name; *p; p++) {	/* 	** Look for any whitespace. This is very bad for pipelining as it	** makes the request invalid	*/	if (isspace((int) *p)) {	    char *orig=p, *dest=p+1;	    while ((*orig++ = *dest++));	    p = p-1;	}	if (*p=='/' || *p=='#' || *p=='?')	    break;	if (*p==':') {		*p = 0;		parts->access = after_access; /* Scheme has been specified *//* The combination of gcc, the "-O" flag and the HP platform is   unhealthy. The following three lines is a quick & dirty fix, but is   not recommended. Rather, turn off "-O". *//*		after_access = p;*//*		while (*after_access == 0)*//*		    after_access++;*/		after_access = p+1;		if (0==strcasecomp("URL", parts->access)) {		    parts->access = NULL;  /* Ignore IETF's URL: pre-prefix */		} else break;	}    }        p = after_access;    if (*p=='/'){	if (p[1]=='/') {	    parts->host = p+2;		/* host has been specified 	*/	    *p=0;			/* Terminate access 		*/	    p=strchr(parts->host,'/');	/* look for end of host name if any */	    if(p) {	        *p=0;			/* Terminate host */	        parts->absolute = p+1;		/* Root has been found */	    }	} else {	    parts->absolute = p+1;		/* Root found but no host */	}	        } else {        parts->relative = (*after_access) ? after_access : 0; /* zero for "" */    }}/*	Parse a Name relative to another name**	-------------------------------------****	This returns those parts of a name which are given (and requested)**	substituting bits from the related name where necessary.**** On entry,**	aName		A filename given**      relatedName     A name relative to which aName is to be parsed. Give**                      it an empty string if aName is absolute.**      wanted          A mask for the bits which are wanted.**** On exit,**	returns		A pointer to a malloc'd string which MUST BE FREED*/PUBLIC char * HTParse (const char *aName, const char *relatedName, int wanted){    char * result = 0;    char * return_value = 0;    int len;    char * name = 0;    char * rel = 0;    char * p;    char * access;    HTURI given, related;        if (!aName) return NULL;    if (!relatedName)        /* HWL 23/8/94: dont dump due to NULL */        relatedName = "";        /* Make working copies of input strings to cut up: */    len = strlen(aName)+strlen(relatedName)+10;    if ((result=(char *) HT_MALLOC(len)) == NULL) /* Lots of space: more than enough */	HT_OUTOFMEM("parse space");    StrAllocCopy(name, aName);    StrAllocCopy(rel, relatedName);        scan(name, &given);    scan(rel,  &related);     result[0]=0;		/* Clear string  */    access = given.access ? given.access : related.access;    if (wanted & PARSE_ACCESS)        if (access) {	    strcat(result, access);	    if(wanted & PARSE_PUNCTUATION) strcat(result, ":");	}	    if (given.access && related.access)	/* If different, inherit nothing. */        if (strcmp(given.access, related.access)!=0) {	    related.host=0;	    related.absolute=0;	    related.relative=0;	    related.fragment=0;	}	    if (wanted & PARSE_HOST)        if(given.host || related.host) {	    if(wanted & PARSE_PUNCTUATION) strcat(result, "//");	    strcat(result, given.host ? given.host : related.host);	}	    if (given.host && related.host)  /* If different hosts, inherit no path. */        if (strcmp(given.host, related.host)!=0) {	    related.absolute=0;	    related.relative=0;	    related.fragment=0;	}	    if (wanted & PARSE_PATH) {        if(given.absolute) {				/* All is given */	    if(wanted & PARSE_PUNCTUATION) strcat(result, "/");	    strcat(result, given.absolute);	} else if(related.absolute) {	/* Adopt path not name */	    strcat(result, "/");	    strcat(result, related.absolute);	    if (given.relative) {		p = strchr(result, '?');	/* Search part? */		if (!p) p=result+strlen(result)-1;		for (; *p!='/'; p--);	/* last / */		p[1]=0;					/* Remove filename */		strcat(result, given.relative);		/* Add given one */#if 0		result = HTSimplify (&result);#endif	    }	} else if(given.relative) {	    strcat(result, given.relative);		/* what we've got */	} else if(related.relative) {	    strcat(result, related.relative);	} else {  /* No inheritance */	    strcat(result, "/");	}    }		    if (wanted & PARSE_VIEW)	if(given.fragment || related.fragment) {	    if(given.absolute && given.fragment) {   /*Fixes for relURLs...*/		if(wanted & PARSE_PUNCTUATION) strcat(result, "#");		strcat(result, given.fragment); 	    } else if (!(given.absolute) && !(given.fragment)) {		strcat(result, "");	    } else {		if(wanted & PARSE_PUNCTUATION) strcat(result, "#");		strcat(result, given.fragment ? given.fragment : related.fragment); 	    }	}    HT_FREE(rel);    HT_FREE(name);        StrAllocCopy(return_value, result);    HT_FREE(result);    return return_value;		/* exactly the right length */}/***	Canonicalizes the URL in the following manner starting from the host**	pointer:****	1) The host name is converted to lowercase**	2) Chop off port if `:80' (http), `:70' (gopher), or `:21' (ftp)****	Return: OK	The position of the current path part of the URL**			which might be the old one or a new one.*/PRIVATE char * HTCanon (char ** filename, char * host){    char *newname = NULL;    char *port;    char *strptr;    char *path;    char *access = host-3;    while (access>*filename && *(access-1)!='/')       /* Find access method */	access--;    if ((path = strchr(host, '/')) == NULL)			/* Find path */	path = host + strlen(host);    if ((strptr = strchr(host, '@')) != NULL && strptr<path)	   /* UserId */	host = strptr;    if ((port = strchr(host, ':')) != NULL && port>path)      /* Port number */	port = NULL;    strptr = host;				    /* Convert to lower-case */    while (strptr<path) {	*strptr = TOLOWER(*strptr);	strptr++;    }        /* Does the URL contain a full domain name? This also works for a       numerical host name. The domain name is already made lower-case       and without a trailing dot. */#if 0    if (((strptr = strchr(host, '.')) == NULL || strptr >= path) &&	strncasecomp(host, "localhost", 9)) {	const char *domain = HTGetDomainName();	if (domain && *domain) {	    if ((newname = (char *) HT_CALLOC(1, strlen(*filename) + strlen(domain)+2)) == NULL)		HT_OUTOFMEM("HTCanon");	    if (port)		strncpy(newname, *filename, (int) (port-*filename));	    else		strncpy(newname, *filename, (int) (path-*filename));	    strcat(newname, ".");	    strcat(newname, domain);	}    } else 					  /* Look for a trailing dot */#endif    {	char *dot = port ? port : path;	if (dot > *filename && *--dot=='.') {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品乱码一区二区三区软件 | 欧美日韩在线免费视频| 欧美国产精品久久| 成人性色生活片| 中文字幕在线一区二区三区| 成人h动漫精品一区二区| 国产精品久久久爽爽爽麻豆色哟哟| 成人动漫精品一区二区| 亚洲卡通欧美制服中文| 欧美美女一区二区三区| 麻豆视频一区二区| 日本一区二区三区dvd视频在线| 大白屁股一区二区视频| 亚洲一级片在线观看| 欧美一区二区在线播放| 成人一区二区三区| 一区二区三区四区在线| 日韩一区二区三区电影| 成人免费不卡视频| 亚洲va韩国va欧美va| 2欧美一区二区三区在线观看视频| 成人网页在线观看| 亚洲一区二区欧美| 久久综合五月天婷婷伊人| 精品少妇一区二区三区日产乱码| 国产盗摄一区二区| 午夜亚洲国产au精品一区二区| 精品国产精品一区二区夜夜嗨| 丰满少妇在线播放bd日韩电影| 亚洲一二三级电影| 久久综合狠狠综合久久激情| 91蜜桃网址入口| 久久99精品久久久久久国产越南 | 亚洲精品自拍动漫在线| 日韩视频免费观看高清完整版在线观看 | 欧美色网站导航| 国产精选一区二区三区| 亚洲va中文字幕| 成人免费视频在线观看| 日韩欧美国产一二三区| 色乱码一区二区三区88| 国产精品伊人色| 日本视频免费一区| 有码一区二区三区| 国产精品视频看| 日韩免费电影网站| 欧美精品久久一区| 在线精品观看国产| 99精品在线免费| 国产电影精品久久禁18| 久久99精品视频| 日本视频一区二区| 午夜精品一区二区三区三上悠亚| 国产精品伦一区| 国产日韩欧美精品电影三级在线| 91精品国产乱| 欧美久久久久久久久| 色悠久久久久综合欧美99| 国产成人啪免费观看软件| 美腿丝袜亚洲一区| 丝袜国产日韩另类美女| 亚洲影视在线播放| 亚洲免费av在线| 最新欧美精品一区二区三区| 国产日韩欧美不卡| 久久久久一区二区三区四区| 欧美成人精精品一区二区频| 欧美一区二区三区视频免费| 欧美吞精做爰啪啪高潮| 91国偷自产一区二区三区成为亚洲经典 | 精品一区二区av| 日本vs亚洲vs韩国一区三区二区| 亚洲国产视频a| 夜夜嗨av一区二区三区四季av| 国产精品久久久久久久岛一牛影视| 日韩国产欧美一区二区三区| 亚洲sss视频在线视频| 亚洲一线二线三线久久久| 亚洲乱码国产乱码精品精的特点 | 欧美日精品一区视频| 欧美在线色视频| 欧美日韩国产免费一区二区| 欧洲色大大久久| 欧洲中文字幕精品| 欧美精品日日鲁夜夜添| 制服丝袜国产精品| 日韩欧美一区二区久久婷婷| 欧美videos大乳护士334| 精品国产乱码久久久久久夜甘婷婷 | 伊人开心综合网| 亚洲bt欧美bt精品| 美女国产一区二区三区| 经典三级视频一区| 国产成人aaa| 一本久久综合亚洲鲁鲁五月天| 在线亚洲免费视频| 欧美一区二区三区免费大片| 337p粉嫩大胆色噜噜噜噜亚洲 | 亚洲欧美成人一区二区三区| 亚洲成人免费在线| 久久99精品久久久久久| 成人免费高清视频在线观看| 欧美自拍偷拍午夜视频| 日韩精品中文字幕一区二区三区| 日本一区二区在线不卡| 亚洲自拍偷拍av| 精品在线免费观看| 91美女在线观看| 91麻豆精品国产91| 国产免费成人在线视频| 亚洲国产日韩a在线播放性色| 日本大胆欧美人术艺术动态| 成人av资源网站| 6080日韩午夜伦伦午夜伦| 国产日韩成人精品| 偷偷要91色婷婷| 懂色av一区二区三区免费观看| 在线免费观看视频一区| 精品裸体舞一区二区三区| 亚洲少妇屁股交4| 六月丁香综合在线视频| 99国内精品久久| 欧美电影免费提供在线观看| 最新国产成人在线观看| 久久国内精品自在自线400部| 久久久久国产免费免费| 亚洲第一主播视频| 不卡的电影网站| 日韩精品一区二区在线| 一区二区三区中文字幕| 国产乱人伦精品一区二区在线观看| 91啪九色porn原创视频在线观看| 欧美xfplay| 婷婷成人激情在线网| 成人av网址在线| 久久影院午夜论| 日韩影视精彩在线| 欧美主播一区二区三区| 国产精品乱人伦一区二区| 国内精品免费在线观看| 欧美高清视频不卡网| 亚洲乱码国产乱码精品精可以看 | 毛片一区二区三区| 欧美综合欧美视频| 亚洲男同性恋视频| 成人精品小蝌蚪| 国产日韩综合av| 国产精品一区久久久久| 欧美一区二区黄| 日韩综合小视频| 欧美午夜片在线观看| 亚洲精品国产成人久久av盗摄| 国产成人在线视频网站| www国产成人| 狠狠色丁香婷综合久久| 91精品国产综合久久久久久久| 亚洲综合色网站| 在线看国产日韩| 亚洲一线二线三线久久久| 在线一区二区观看| 亚洲精品精品亚洲| 91国产成人在线| 粉嫩aⅴ一区二区三区四区五区| 欧美成人伊人久久综合网| 日本欧美大码aⅴ在线播放| 6080日韩午夜伦伦午夜伦| 性久久久久久久久久久久| 欧美浪妇xxxx高跟鞋交| 日韩电影一二三区| 欧美大片在线观看| 国产精品一级在线| 日本一区二区久久| av日韩在线网站| 亚洲狠狠丁香婷婷综合久久久| 在线精品国精品国产尤物884a| 一区2区3区在线看| 欧美日韩高清一区| 奇米精品一区二区三区四区 | 日本一区二区三区国色天香| 成人午夜电影网站| 一区二区三区四区国产精品| 91麻豆精品秘密| 天堂va蜜桃一区二区三区 | 国产亚洲精品bt天堂精选| 国产精品一级片在线观看| 国产精品久久久久久久岛一牛影视 | 国产精品情趣视频| 色嗨嗨av一区二区三区| 首页综合国产亚洲丝袜| 精品国一区二区三区| 成人的网站免费观看| 亚洲福利一区二区| 精品国产乱码久久久久久久久| 福利电影一区二区三区| 一区二区成人在线视频| 精品久久久久久久久久久久包黑料| 高清不卡一区二区在线| 成人成人成人在线视频| 天堂一区二区在线| 日本一区二区三区四区在线视频 |