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

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

?? quick.c

?? harvest是一個下載html網頁得機器人
?? C
字號:
/* Copyright (c) 1994 Burra Gopal, Udi Manber.  All Rights Reserved. *//* * quick.c:	Used to search for a pattern in a compressed file. * * Algorithm: if the file (or stdin) is a compressed file, then: * +  a. Read in the hash-table-index file. * +  b. For each page in which the words of the pattern can be found: *	 build the hash-table using the words in exactly those pages. * +  c. Now, call compress with the given pattern. * * +  d. Call the normal search routines with the compressed pattern on *	 the input file. * +  e. If the option is to count number of matches, just exit. *	 Otherwise we have to modify the r_output/output routines: * * +  f. Read in the string-table-index file. * +  g. For each page in which the word numbers of the input file can *	 be found: build the string-table using the words in exactly *	 those pages. * +  h. Call uncompress with the input file line to be output and *	 output THIS line instead of the original matched line. * * Part of this will be in agrep and part of this here. */#include "defs.h"#include <sys/types.h>#include <sys/stat.h>/* * The quick-functions can be called multiple number of times -- * they however open the hash, string and freq files only once. */hash_entry *compress_hash_table[HASH_TABLE_SIZE];	/* used for compress: assume it is zeroed by C */char	loaded_hash_table[HASH_FILE_BLOCKS];		/* bit mask of loaded pages in hash-table: store chars since just 4K: speed is most imp. */char	*hashindexbuf;int	hashindexsize;/* returns length of compressed pattern after filling up the compressed pattern in the user-supplied newpattern buffer */intquick_tcompress(freq_file, hash_file, pattern, len, newpattern, maxnewlen, flags)	char	*freq_file;	char	*hash_file;	CHAR	*pattern;	int	len;	void	*newpattern;	/* can be FILE* or CHAR* */	int	*maxnewlen;	int	flags;{	static FILE	*hashfp = NULL, *hashindexfp = NULL;	static char	old_freq_file[MAX_LINE_LEN] = "", old_hash_file[MAX_LINE_LEN] = "";	static int	blocksize;	int		newlen;	if ((hashfp == NULL) || (strcmp(freq_file, old_freq_file)) || (strcmp(hash_file, old_hash_file)))	{	/* Have to do some initializations */		char	s[256];		struct stat statbuf;		if (hashfp != NULL) {			uninitialize_tcompress();			fclose(hashfp);			hashfp = NULL;		}		else memset(loaded_hash_table, '\0', HASH_FILE_BLOCKS);		if (!initialize_common(freq_file, flags)) return 0;	/* don't call initialize_tcompress since that will load the FULL hash table */		if ((hashfp = fopen(hash_file, "r")) == NULL) {			if (flags & TC_ERRORMSGS) {				fprintf(stderr, "cannot open cast-dictionary file: %s\n", hash_file);				fprintf(stderr, "(use -H to give a dictionary-dir or run 'buildcast' to make a dictionary)\n");			}			return 0;		}		sprintf(s, "%s.index", hash_file);		if ((hashindexfp = fopen(s, "r")) == NULL) {			if (flags & TC_ERRORMSGS)				fprintf(stderr, "cannot open for reading: %s\n", s);			fclose(hashfp);			hashfp = NULL;			return 0;		}		blocksize = 0;		fscanf(hashindexfp, "%d\n", &blocksize);		if (blocksize == 0) blocksize = DEF_BLOCKSIZE;		if (fstat(fileno(hashindexfp), &statbuf) == -1) {			fprintf(stderr, "error in quick_tcompress/fstat on '%s.index'\n", hash_file);			fclose(hashfp);			hashfp = NULL;			fclose(hashindexfp);			hashindexfp = NULL;			return 0;		}		if ((hashindexbuf = (char *)malloc(statbuf.st_size + 1)) == NULL) {			if (flags & TC_ERRORMSGS)				fprintf(stderr, "quick_tcompress: malloc failure!\n");			fclose(hashfp);			hashfp = NULL;			fclose(hashindexfp);			hashindexfp = NULL;			return 0;		}		if ((hashindexsize = fread(hashindexbuf, 1, statbuf.st_size, hashindexfp)) == -1) {			fprintf(stderr, "error in quick_tcompress/fread on '%s.index'\n", hash_file);			fclose(hashfp);			hashfp = NULL;			fclose(hashindexfp);			hashindexfp = NULL;			return 0;		}		hashindexsize ++;	/* st_size - bytes used up for blocksize in file + 1 <= st_size */		hashindexbuf[hashindexsize] = '\0';		fclose(hashindexfp);		strcpy(old_freq_file, freq_file);		strcpy(old_hash_file, hash_file);	}	else rewind(hashfp);	/* Don't do it first time */	if (pattern[len-1] == '\0') len--;	build_partial_hash(compress_hash_table, hashfp, hashindexbuf, hashindexsize, pattern, len, blocksize, loaded_hash_table);	newlen = tcompress(pattern, len, newpattern, maxnewlen, flags);#if	0	printf("quick_tcompress: pat=%s len=%d newlen=%d newpat=", pattern, len, newlen);	for (i=0; i<newlen; i++) printf("%d ", newpattern[i]);	printf("\n");#endif	/*0*/	return newlen;}char	*compress_string_table[DEF_MAX_WORDS]; /*[MAX_WORD_LEN+2]; */char	loaded_string_table[STRING_FILE_BLOCKS];		/* bit mask of loaded pages in string-table: store chars since just 4K: speed is most imp. */char	*stringindexbuf;int	stringindexsize;/* returns length of uncompressed pattern after filling up the uncompressed pattern in the user-supplied newpattern buffer */intquick_tuncompress(freq_file, string_file, pattern, len, newpattern, maxnewlen, flags)	char	*string_file;	char	*freq_file;	CHAR	*pattern;	int	len;	void	*newpattern;	/* can be FILE* or CHAR* */	int	*maxnewlen;	int	flags;{	static FILE	*stringfp = NULL, *stringindexfp = NULL;	static char	old_freq_file[MAX_LINE_LEN] = "", old_string_file[MAX_LINE_LEN] = "";	static int	blocksize;	int		newlen;	int		dummy;	if ((stringfp == NULL) || (strcmp(freq_file, old_freq_file)) || (strcmp(string_file, old_string_file)))	{	/* Have to do some initializations */		char	s[256];		struct stat statbuf;		if (stringfp != NULL) {			uninitialize_tuncompress();			fclose(stringfp);			stringfp = NULL;		}		else memset(loaded_string_table, '\0', STRING_FILE_BLOCKS);		if (!initialize_common(freq_file, flags)) return 0;	/* don't call initialize_tuncompress since that will load the FULL string table */		if ((stringfp = fopen(string_file, "r")) == NULL) {			if (flags & TC_ERRORMSGS) {				fprintf(stderr, "cannot open cast-dictionary file: %s\n", string_file);				fprintf(stderr, "(use -H to give a dictionary-dir or run 'buildcast' to make a dictionary)\n");			}			return 0;		}		sprintf(s, "%s.index", string_file);		if ((stringindexfp = fopen(s, "r")) == NULL) {			if (flags & TC_ERRORMSGS)				fprintf(stderr, "cannot open for reading: %s\n", s);			fclose(stringfp);			stringfp = NULL;			return 0;		}		blocksize = 0;		fscanf(stringindexfp, "%d\n", &blocksize);		if (blocksize == 0) blocksize = DEF_BLOCKSIZE;		if (fstat(fileno(stringindexfp), &statbuf) == -1) {			fprintf(stderr, "error in quick_tuncompress/fstat on '%s.index'\n", string_file);			fclose(stringfp);			stringfp = NULL;			fclose(stringindexfp);			stringindexfp = NULL;			return 0;		}		if ((stringindexbuf = (char *)malloc(statbuf.st_size + 1)) == NULL) {			if (flags & TC_ERRORMSGS)				fprintf(stderr, "quick_tuncompress: malloc failure!\n");			fclose(stringfp);			stringfp = NULL;			fclose(stringindexfp);			stringindexfp = NULL;			return 0;		}		stringindexsize = 0;		while(fscanf(stringindexfp, "%d\n", &dummy) == 1) {			*((unsigned short *)(stringindexbuf+stringindexsize)) = (unsigned short)dummy;			stringindexsize+=sizeof(unsigned short);		}		fclose(stringindexfp);		strcpy(old_freq_file, freq_file);		strcpy(old_string_file, string_file);	}	else rewind(stringfp);	build_partial_string(compress_string_table, stringfp, stringindexbuf, stringindexsize, pattern, len, blocksize, loaded_string_table);	newlen = tuncompress(pattern, len, newpattern, maxnewlen, flags);#if	0	printf("quick_tuncompress: len=%d newlen=%d newpat=%s pat=", len, newlen, newpattern);	for (i=0; i<len; i++) printf("%d ", pattern[i]);	printf("\n");#endif	/*0*/	return newlen;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
男女性色大片免费观看一区二区| 波多野结衣亚洲一区| 日韩欧美亚洲另类制服综合在线| 秋霞影院一区二区| 久久亚洲综合av| 成人一级黄色片| 中文字幕在线不卡| 一本色道久久综合亚洲aⅴ蜜桃| 国产亚洲女人久久久久毛片| 国产成人精品免费网站| 久久久99免费| 在线观看日韩精品| 亚洲三级电影网站| 色婷婷亚洲精品| 亚洲乱码精品一二三四区日韩在线| 欧美三级日韩在线| 久久狠狠亚洲综合| 日韩一二三四区| 国产成人亚洲综合色影视| 国产肉丝袜一区二区| 欧美成人三级在线| 91麻豆高清视频| 亚洲一区二区视频在线观看| 一区二区三区蜜桃| 欧美视频中文字幕| 成人午夜视频在线| 亚洲综合男人的天堂| 国产激情精品久久久第一区二区| 欧美午夜不卡视频| 亚洲午夜一区二区| 一区二区三区不卡视频在线观看 | 国产裸体歌舞团一区二区| 国产成人综合网| 欧美日韩午夜影院| 国产精品麻豆一区二区| 全部av―极品视觉盛宴亚洲| 欧美天堂亚洲电影院在线播放| 日韩视频一区在线观看| 奇米888四色在线精品| 亚洲一区二区三区三| 欧美日韩高清一区二区| 国产成人精品午夜视频免费| 三级不卡在线观看| 911精品国产一区二区在线| 久草中文综合在线| 日韩成人免费电影| 亚洲国产日韩精品| 亚洲男同性视频| 久久精品人人做人人爽人人| 欧美性色综合网| 久久亚洲精华国产精华液 | 成人激情视频网站| www.日韩精品| 国内外成人在线| 日本一区二区三区dvd视频在线| 国产精品18久久久久久久久久久久 | 成人欧美一区二区三区在线播放| 欧美激情一区不卡| 亚洲欧美日韩中文播放| 日韩 欧美一区二区三区| 亚洲精品视频免费观看| 99精品在线免费| 成人欧美一区二区三区视频网页| 国产成人精品亚洲777人妖| 欧美怡红院视频| 亚洲影院在线观看| 91久久精品网| 日本中文字幕不卡| 99久久久精品| 福利一区二区在线| 制服视频三区第一页精品| 欧美日本高清视频在线观看| 精品精品国产高清a毛片牛牛 | 国产精品自产自拍| 国产毛片精品视频| 精品裸体舞一区二区三区| 一区二区三区国产精品| 亚洲品质自拍视频| 亚洲资源在线观看| 久久久久久亚洲综合影院红桃 | 亚洲综合在线观看视频| 日韩vs国产vs欧美| 欧美日韩不卡视频| 日韩精品一区二区三区在线 | 99久免费精品视频在线观看| 久久se精品一区二区| 美女精品自拍一二三四| 在线精品视频小说1| 亚洲视频一二三区| 欧美久久久久久久久中文字幕| 久久尤物电影视频在线观看| 粉嫩绯色av一区二区在线观看 | 国产suv精品一区二区三区| 亚洲狠狠丁香婷婷综合久久久| 欧美精品精品一区| 99久久精品免费看| 精品亚洲porn| 婷婷中文字幕综合| 精品国产免费一区二区三区四区| 黑人巨大精品欧美一区| 91亚洲永久精品| 日韩国产成人精品| 欧美韩国日本不卡| 欧美一二三在线| 国产一区二区在线观看免费| 亚洲人一二三区| 精品欧美乱码久久久久久1区2区| av电影一区二区| 一区二区三区国产| 风间由美一区二区三区在线观看| 欧美r级电影在线观看| 欧美三级视频在线观看| av在线一区二区三区| 久久久久久久网| 国产宾馆实践打屁股91| 日韩成人精品在线| 国产精品久久久久久久久动漫| 成人国产精品视频| 性欧美大战久久久久久久久| 26uuu国产电影一区二区| 亚洲国产精品黑人久久久| 国产在线视频不卡二| 国产精品美女久久久久久久网站| 欧美色倩网站大全免费| 成人动漫一区二区三区| 亚洲一区视频在线观看视频| 欧美人动与zoxxxx乱| 天堂成人国产精品一区| 欧美一区二区三区爱爱| 成人小视频在线观看| 一区二区三区四区在线| 制服丝袜亚洲色图| 亚洲一级不卡视频| 欧美色综合久久| 夜夜嗨av一区二区三区四季av| 日韩欧美国产午夜精品| 欧美大片顶级少妇| 国产亚洲精品bt天堂精选| 亚洲男人都懂的| 国产精品美女久久久久久久久| 午夜精品久久久久久久久久久| aaa亚洲精品一二三区| 久久人人爽人人爽| 蜜臀久久久久久久| 欧美日韩电影在线播放| 国产精品不卡在线观看| 99久久精品免费精品国产| 久久久国产精华| 国产麻豆精品theporn| 成人app软件下载大全免费| av在线综合网| 欧美亚洲综合久久| 2023国产精华国产精品| 日韩你懂的在线播放| 日韩欧美国产小视频| 亚洲欧美色一区| 国产不卡在线播放| 91在线观看免费视频| 欧美亚洲日本国产| 国产午夜亚洲精品理论片色戒| 亚洲在线免费播放| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 中文字幕一区二区三区精华液| 欧美日韩二区三区| 精品国产制服丝袜高跟| 精品99一区二区| 久久亚洲二区三区| 最新国产の精品合集bt伙计| 国产精品一区二区黑丝| 亚洲欧美在线另类| 91香蕉视频污| 亚洲一区二区三区视频在线播放| 国产一区二区网址| 成人美女视频在线观看18| 欧美亚洲免费在线一区| 国产喷白浆一区二区三区| av中文字幕不卡| 一区二区免费看| 精品乱人伦一区二区三区| 成人一级黄色片| 亚洲欧洲精品一区二区三区不卡| 在线电影欧美成精品| 欧美私人免费视频| 欧美日本一区二区在线观看| 欧美性色综合网| 欧美va天堂va视频va在线| 日韩欧美在线一区二区三区| 久久久久国产一区二区三区四区| 26uuu亚洲婷婷狠狠天堂| 日韩女优电影在线观看| 精品精品国产高清一毛片一天堂| 欧美日本在线观看| 91一区一区三区| 成人午夜激情在线| 亚洲国产一区在线观看| 国产拍揄自揄精品视频麻豆| 日韩亚洲欧美成人一区| 99精品偷自拍| 国产精品一卡二| 久久99国产精品免费网站|