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

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

?? sgml.c

?? www工具包. 這是W3C官方支持的www支撐庫. 其中提供通用目的的客戶端的WebAPI: complete HTTP/1.1 (with caching, pipelining, PUT, POS
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*									 SGML.c**	GENERAL SGML PARSER CODE****	(c) COPYRIGHT MIT 1995.**	Please first read the full copyright statement in the file COPYRIGH.**	@(#) $Id: SGML.c,v 1.53 1999/05/18 21:38:57 frystyk Exp $****	This module implements an HTStream object. To parse an**	SGML file, create this object which is a parser. The object**	is (currently) created by being passed a DTD structure,**	and a target HTStructured oject at which to throw the parsed stuff.**	**	 6 Feb 93  	Binary seraches used. Intreface modified.**	 8 Jul 94  FM	Insulate free() from _free structure element.**	Nov 1996   msa	Strip down the parser to minimal HTML tokenizer,**			Stop allocating space for the attribute values,**			use pointers to the string chunk instead.*/#include <assert.h>/* Library include files */#include "wwwsys.h"#include "HTUtils.h"#include "HTString.h"#include "HTChunk.h"#include "SGML.h"#define INVALID (-1)/*	The State (context) of the parser****	This is passed with each call to make the parser reentrant***/typedef enum _sgml_state    {	S_text, S_literal, S_tag, S_tag_gap, 	S_attr, S_attr_gap, S_equals, S_value, S_after_open,	S_nl, S_nl_tago,	S_ero, S_cro,#ifdef ISO_2022_JP	S_esc, S_dollar, S_paren, S_nonascii_text,#endif	S_squoted, S_dquoted, S_end, S_entity, S_junk_tag,	S_md, S_md_sqs, S_md_dqs, S_com_1, S_com, S_com_2, S_com_2a    } sgml_state;/*	Internal Context Data Structure**	-------------------------------*/struct _HTStream    {	const HTStreamClass *isa;	/* inherited from HTStream */	const SGML_dtd *dtd;	HTStructuredClass *actions;	/* target class  */	HTStructured *target;		/* target object */	HTTag *current_tag;	int current_attribute_number;	SGMLContent contents;		/* current content mode */	HTChunk *string;	int token;			/* ptr into string buffer */	sgml_state state;	BOOL present[MAX_ATTRIBUTES];	/* Flags: attribute is present? */	int value[MAX_ATTRIBUTES];	/* Offset pointers to the string */    };#define PUTC(ch) ((*context->actions->put_character)(context->target, ch))#define PUTB(b,l) ((*context->actions->put_block)(context->target, b, l))/*	Find Attribute Number**	---------------------*/PRIVATE int SGMLFindAttribute  (HTTag* tag, const char * s)    {	HTAttr* attributes = tag->attributes;	int high, low, i, diff;		/* Binary search for attribute name */	assert(tag->number_of_attributes <= MAX_ATTRIBUTES);	for(low=0, high=tag->number_of_attributes;	    high > low ;	    diff < 0 ? (low = i+1) : (high = i) )	    {		i = (low + (high-low)/2);		diff = strcasecomp(attributes[i].name, s);		if (diff==0)			return i;	/* success: found it */	    }	return -1;    }/*	Handle Attribute**	----------------*//* PUBLIC const char * SGML_default = "";   ?? */PRIVATE void handle_attribute_name (HTStream * context, const char * s)    {	HTTag * tag = context->current_tag;	/* Note: if tag==NULL, we are skipping unknown tag... */	if (tag)	    {		int i = SGMLFindAttribute(tag, s);		if (i >= 0)		    {			context->current_attribute_number = i;			context->present[i] = YES;			return;		    }		HTTRACE(SGML_TRACE, "Unknown attribute %s for tag %s\n" _			s _ context->current_tag->name);	    }	context->current_attribute_number = INVALID;	/* Invalid */    }/*	Handle attribute value**	----------------------*/PRIVATE void handle_attribute_value (HTStream * context)    {	/* Deal with attributes only if tag is known,	   ignore silently otherwise */	if (context->current_tag)	    {		if (context->current_attribute_number != INVALID)			context->value[context->current_attribute_number] =				context->token;		else {		    char * data = HTChunk_data(context->string);		    HTTRACE(SGML_TRACE, "Attribute value %s ignored\n" _			   data ? data+context->token : "<null>");		}	    }	context->current_attribute_number = INVALID; /* can't have two assignments! */    }/*	Handle entity**	-------------**** On entry,**	s	contains the entity name zero terminated*/PRIVATE void handle_entity (HTStream * context)    {	const char ** entities = context->dtd->entity_names;	const char *s = HTChunk_data(context->string);	int high, low, i, diff;	for(low=0, high = context->dtd->number_of_entities;	    high > low ;	    diff < 0 ? (low = i+1) : (high = i))	    {		i = (low + (high-low)/2);		diff = strcmp(entities[i], s);	/* Case sensitive! */		if (diff==0)		    {	/* success: found it */			(*context->actions->put_entity)(context->target, i);			return;		    }	    }	/* If entity string not found */	HTTRACE(SGML_TRACE, "Unknown entity %s\n" _ s);	(*context->actions->unparsed_entity)	    (context->target, HTChunk_data(context->string), HTChunk_size(context->string));    }/*	End element**	-----------*/PRIVATE void end_element (HTStream * context, HTTag *tag)    {	HTTRACE(SGML_TRACE, "End   </%s>\n" _ tag->name);	(*context->actions->end_element)		(context->target, tag - context->dtd->tags);    }/*	Start an element**	----------------*/PRIVATE void start_element (HTStream * context)    {	int i;	char *value[MAX_ATTRIBUTES];	HTTag *tag = context->current_tag;	HTTRACE(SGML_TRACE, "Start <%s>\n" _ tag->name);	context->contents = tag->contents;	/*	** Build the actual pointers to the value strings stored in the	** chunk buffer. (Must use offsets while collecting the values,	** because the string chunk may get resized during the collection	** and potentially relocated).	*/	for (i = 0; i < MAX_ATTRIBUTES; ++i)		value[i] = context->value[i] < 0 ? NULL :			HTChunk_data(context->string) + context->value[i];	(*context->actions->start_element)		(context->target,		 tag - context->dtd->tags,		 context->present,		 (const char**)value);  /* coerce type for think c */    }/*		Find Tag in DTD tag list**		------------------------**** On entry,**	dtd	points to dtd structire including valid tag list**	string	points to name of tag in question**** On exit,**	returns:**		NULL		tag not found**		else		address of tag structure in dtd*/PRIVATE HTTag * SGMLFindTag (const SGML_dtd* dtd, const char * string)    {	int high, low, i, diff;	for(low=0, high=dtd->number_of_tags;	    high > low ;	    diff < 0 ? (low = i+1) : (high = i))	    {  /* Binary serach */		i = (low + (high-low)/2);		diff = strcasecomp(dtd->tags[i].name, string);	/* Case insensitive */		if (diff==0)			/* success: found it */			return &dtd->tags[i];	    }	return NULL;    }/*________________________________________________________________________**			Public Methods*//*	Could check that we are back to bottom of stack! @@  */PRIVATE int SGML_flush  (HTStream * context)    {	return (*context->actions->flush)(context->target);    }PRIVATE int SGML_free  (HTStream * context)    {	int status;	if ((status = (*context->actions->_free)(context->target)) != HT_OK)		return status;	HTChunk_delete(context->string);	HT_FREE(context);	return HT_OK;    }PRIVATE int SGML_abort  (HTStream * context, HTList * e)    {	(*context->actions->abort)(context->target, e);	HTChunk_delete(context->string);	HT_FREE(context);	return HT_ERROR;    }PRIVATE int SGML_write (HTStream * context, const char * b, int l)    {	const SGML_dtd	*dtd = context->dtd;	HTChunk	*string = context->string;	const char *text = b;	int count = 0;		while (l-- > 0)	    {		char c = *b++;		switch(context->state)		    {		    got_element_open:			/*			** The label is jumped when the '>' of a the element			** start tag has been detected. This DOES NOT FALL TO			** THE CODE S_after_open, only processes the tag and			** sets the state (c should still contain the			** terminating character of the tag ('>'))			*/			if (context->current_tag && context->current_tag->name)				start_element(context);			context->state = S_after_open;			break;		    case S_after_open:			/*			** State S_after_open is entered only for single			** character after the element opening tag to test			** against newline. Strip one trainling newline only			** after opening nonempty element.  - SGML: Ugh!			*/			text = b;			count = 0;			if (c == '\n' && (context->contents != SGML_EMPTY))			    {				context->state = S_text;				break;			    }			--text;			goto S_text;		    S_text:			context->state = S_text;		    case S_text:#ifdef ISO_2022_JP			if (c == '\033')			    {				context->state = S_esc;				++count;				break;			    }#endif /* ISO_2022_JP */			if (c == '&')			    {				if (count > 0)					PUTB(text, count);				count = 0;				HTChunk_clear(string);				context->state = S_ero;			    }			else if (c == '<')			    {				if (count > 0)					PUTB(text, count);				count = 0;				HTChunk_clear(string);				/* should scrap LITERAL, and use CDATA and				   RCDATA -- msa */				context->state =					(context->contents == SGML_LITERAL) ?						S_literal : S_tag;			    }			else if (c == '\n')			    	/* Newline - ignore if before end tag! */				context->state = S_nl;			else				++count;			break;		    case S_nl:			if (c == '<')			    {				if (count > 0)					PUTB(text, count);				count = 0;				HTChunk_clear(string);				context->state =					(context->contents == SGML_LITERAL) ?						S_literal : S_nl_tago;			    }			else			    {				++count;				goto S_text;			    }			break;		    case S_nl_tago:	/* Had newline and tag opener */			if (c != '/')				PUTC('\n'); /* Only ignore newline before </ */			context->state = S_tag;			goto handle_S_tag;#ifdef ISO_2022_JP		    case S_esc:			if (c=='$')				context->state = S_dollar;			else if (c=='(')				context->state = S_paren;			else				context->state = S_text;			++count;			break;		    case S_dollar:			if (c=='@' || c=='B')				context->state = S_nonascii_text;			else				context->state = S_text;			++count;			break;		    case S_paren:			if (c=='B' || c=='J')				context->state = S_text;			else				context->state = S_text;			++count;			break;		    case S_nonascii_text:			if (c == '\033')				context->state = S_esc;			++count;			break;#endif /* ISO_2022_JP */			/* In literal mode, waits only for specific end tag!			** Only foir compatibility with old servers.			*/		    case S_literal:			HTChunk_putc(string, c);			if ( TOUPPER(c) !=			    ((HTChunk_size(string) == 1) ? '/'			     : context->current_tag->name[HTChunk_size(string)-2]))			    {				/* If complete match, end literal */				if ((c == '>') &&				    (!context->current_tag->name[HTChunk_size(string)-2]))				    {					end_element						(context,context->current_tag);					/*					  ...setting SGML_MIXED below is a					  bit of kludge, but a good guess that					  currently works, anything other than					  SGML_LITERAL would work... -- msa */					context->contents = SGML_MIXED;				    }				else				    {					/* If Mismatch: recover string. */					PUTC( '<');					PUTB(HTChunk_data(string), HTChunk_size(string));				    }				context->state = S_text;				text = b;				count = 0;			    }			break;			/*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99九九99精品| 91毛片在线观看| 91最新地址在线播放| 91麻豆精品国产| 国产精品久久久久9999吃药| 蜜臀久久99精品久久久画质超高清 | 国产伦精一区二区三区| 一本大道久久a久久精品综合| 精品少妇一区二区三区| 亚洲午夜成aⅴ人片| 国产剧情av麻豆香蕉精品| 欧美老女人在线| 亚洲精品视频免费观看| 国产成人高清视频| 日韩精品一区在线| 首页综合国产亚洲丝袜| 色婷婷精品久久二区二区蜜臀av| 久久久欧美精品sm网站| 美女网站色91| 欧美一区二区在线观看| 午夜婷婷国产麻豆精品| 色噜噜狠狠色综合欧洲selulu| 国产精品高潮呻吟| 成人高清视频在线观看| 日本一区二区三区四区在线视频| 另类小说视频一区二区| 日韩欧美国产1| 久久精品免费看| 日韩精品影音先锋| 国精品**一区二区三区在线蜜桃| 日韩欧美国产系列| 麻豆91在线观看| 2023国产精品| 国产一区二三区好的| 国产婷婷色一区二区三区在线| 美女视频黄 久久| 精品国产乱码久久| 国产一区二区主播在线| 国产免费观看久久| aaa欧美大片| 亚洲欧美日韩中文播放| 欧美视频三区在线播放| 蜜臀av性久久久久蜜臀av麻豆| 欧美sm极限捆绑bd| 国产成人免费9x9x人网站视频| 国产欧美日韩不卡| 91丨九色丨黑人外教| 一区二区激情小说| 91麻豆精品国产91久久久久久久久| 日本欧美久久久久免费播放网| 日韩欧美在线一区二区三区| 国产一区二区三区免费观看| 欧美激情一区二区三区全黄| av电影天堂一区二区在线观看| 亚洲精品视频一区| 欧美va亚洲va在线观看蝴蝶网| 欧美日韩国产一区二区三区地区| 亚洲成人免费视频| 亚洲精品一区二区三区99| 成人国产精品免费网站| 亚洲国产另类av| 久久色在线视频| 91久久免费观看| 久久福利资源站| 日韩毛片视频在线看| 欧美日韩一区二区在线观看视频 | 亚洲美女偷拍久久| 777亚洲妇女| 国产福利91精品一区二区三区| 亚洲黄色免费电影| 欧美精品一区二| 在线亚洲+欧美+日本专区| 日本美女一区二区| 亚洲免费观看高清完整版在线| 欧美老肥妇做.爰bbww视频| 国产精一品亚洲二区在线视频| 亚洲综合一二三区| 国产日韩欧美一区二区三区综合| 日本韩国欧美一区二区三区| 国产在线精品一区二区夜色| 一区二区高清视频在线观看| 久久久99精品免费观看| 这里只有精品视频在线观看| 96av麻豆蜜桃一区二区| 国内精品在线播放| 日韩精品成人一区二区在线| 亚洲视频在线观看一区| 久久青草欧美一区二区三区| 3751色影院一区二区三区| av一区二区三区| 国产麻豆一精品一av一免费| 日韩高清在线电影| 亚洲电影第三页| 亚洲久草在线视频| 中文字幕亚洲欧美在线不卡| 26uuu精品一区二区| 欧美一区二区三区喷汁尤物| 欧美性受极品xxxx喷水| 97国产一区二区| 成人午夜视频在线观看| 久久99日本精品| 蜜桃av一区二区| 日本一道高清亚洲日美韩| 亚洲国产你懂的| 亚洲va在线va天堂| 亚洲一区二区黄色| 亚洲美女淫视频| 一区二区三区电影在线播| 亚洲色图第一区| 亚洲色图欧美偷拍| 亚洲综合色噜噜狠狠| 亚洲男人天堂av网| 一区二区视频在线看| 亚洲精品免费电影| 亚洲电影欧美电影有声小说| 亚洲无线码一区二区三区| 亚洲一区二区综合| 午夜成人免费视频| 青青草国产成人av片免费| 日本欧美一区二区| 久久99热狠狠色一区二区| 国产一区二区不卡老阿姨| 国产乱码精品一区二区三区忘忧草| 色香色香欲天天天影视综合网| 91热门视频在线观看| 欧美视频在线一区| 欧美一卡二卡在线观看| 亚洲精品在线电影| 亚洲国产高清在线| 亚洲色图制服诱惑| 亚洲成人av电影在线| 日本免费新一区视频| 国产一区福利在线| 99久久精品情趣| 欧美日韩在线亚洲一区蜜芽| 91精品久久久久久久91蜜桃| 久久综合色一综合色88| 中文字幕一区二区三区不卡在线| 亚洲精品日日夜夜| 久久66热偷产精品| 成人h精品动漫一区二区三区| 欧美性一区二区| 久久这里只有精品首页| 亚洲欧洲日产国产综合网| 亚洲成人动漫在线观看| 国内精品视频666| 91久久精品一区二区三| 欧美成人三级在线| 中文字幕一区二区三区不卡在线| 日日噜噜夜夜狠狠视频欧美人| 国产一区亚洲一区| 欧美色男人天堂| 国产女人水真多18毛片18精品视频 | 国模无码大尺度一区二区三区| 91美女精品福利| 日韩午夜中文字幕| 椎名由奈av一区二区三区| 九九国产精品视频| 91豆麻精品91久久久久久| 精品电影一区二区| 亚洲一区二区欧美| 成人毛片视频在线观看| 91精品国产91综合久久蜜臀| 亚洲欧洲国产日本综合| 精品一二三四在线| 欧美日韩一区不卡| 国产精品免费丝袜| 久久国产精品区| 欧美猛男gaygay网站| 亚洲欧美福利一区二区| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美大片在线观看一区| 亚洲最大的成人av| 成人黄色电影在线 | 香港成人在线视频| 色综合天天天天做夜夜夜夜做| 欧美激情自拍偷拍| 天天做天天摸天天爽国产一区 | 国产乱人伦偷精品视频免下载| 欧美三级一区二区| 亚洲色图一区二区| 成人国产亚洲欧美成人综合网| 精品国产凹凸成av人网站| 午夜久久久久久久久| 欧美中文字幕亚洲一区二区va在线| 国产欧美一区二区精品久导航 | 免费成人在线播放| 欧美日韩极品在线观看一区| 中文字幕日韩一区| 91在线观看视频| 国产精品动漫网站| 高清不卡一区二区| 久久精品综合网| 国产999精品久久久久久 | 日韩午夜在线播放| 一区二区视频在线看| 在线亚洲一区观看| 亚洲小少妇裸体bbw| 精品视频1区2区3区| 午夜精品久久久久|