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

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

?? ascmagic.c

?? sleuthit-2.09 一個磁盤的工具集
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; * maintained 1995-present by Christos Zoulas and others. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice immediately at the beginning of the file, without modification, *    this list of conditions, and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. *   * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *//* * ASCII magic -- file types that we know based on keywords * that can appear anywhere in the file. * * Extensively modified by Eric Fischer <enf@pobox.com> in July, 2000, * to handle character codes other than ASCII on a unified basis. * * Joerg Wunsch <joerg@freebsd.org> wrote the original support for 8-bit * international characters, now subsumed into this file. */#include "file.h"#include "magic.h"#include <stdio.h>#include <string.h>#include <memory.h>#include <ctype.h>#include <stdlib.h>#ifdef HAVE_UNISTD_H#include <unistd.h>#endif#include "names.h"#ifndef	lintFILE_RCSID("@(#)$File: ascmagic.c,v 1.50 2007/03/15 14:51:00 christos Exp $")#endif	/* lint */typedef unsigned long unichar;#define MAXLINELEN 300	/* longest sane line length */#define ISSPC(x) ((x) == ' ' || (x) == '\t' || (x) == '\r' || (x) == '\n' \		  || (x) == 0x85 || (x) == '\f')private int looks_ascii(const unsigned char *, size_t, unichar *, size_t *);private int looks_utf8(const unsigned char *, size_t, unichar *, size_t *);private int looks_unicode(const unsigned char *, size_t, unichar *, size_t *);private int looks_latin1(const unsigned char *, size_t, unichar *, size_t *);private int looks_extended(const unsigned char *, size_t, unichar *, size_t *);private void from_ebcdic(const unsigned char *, size_t, unsigned char *);private int ascmatch(const unsigned char *, const unichar *, size_t);protected intfile_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes){	size_t i;	unsigned char *nbuf = NULL;	unichar *ubuf = NULL;		size_t ulen;	struct names *p;	int rv = -1;	const char *code = NULL;	const char *code_mime = NULL;	const char *type = NULL;	const char *subtype = NULL;	const char *subtype_mime = NULL;	int has_escapes = 0;	int has_backspace = 0;	int seen_cr = 0;	int n_crlf = 0;	int n_lf = 0;	int n_cr = 0;	int n_nel = 0;	size_t last_line_end = (size_t)-1;	int has_long_lines = 0;	/*	 * Undo the NUL-termination kindly provided by process()	 * but leave at least one byte to look at	 */	while (nbytes > 1 && buf[nbytes - 1] == '\0')		nbytes--;	if ((nbuf = calloc(1, (nbytes + 1) * sizeof(nbuf[0]))) == NULL)		goto done;	if ((ubuf = calloc(1, (nbytes + 1) * sizeof(ubuf[0]))) == NULL)		goto done;	/*	 * Then try to determine whether it's any character code we can	 * identify.  Each of these tests, if it succeeds, will leave	 * the text converted into one-unichar-per-character Unicode in	 * ubuf, and the number of characters converted in ulen.	 */	if (looks_ascii(buf, nbytes, ubuf, &ulen)) {		code = "ASCII";		code_mime = "us-ascii";		type = "text";	} else if (looks_utf8(buf, nbytes, ubuf, &ulen)) {		code = "UTF-8 Unicode";		code_mime = "utf-8";		type = "text";	} else if ((i = looks_unicode(buf, nbytes, ubuf, &ulen)) != 0) {		if (i == 1)			code = "Little-endian UTF-16 Unicode";		else			code = "Big-endian UTF-16 Unicode";		type = "character data";		code_mime = "utf-16";    /* is this defined? */	} else if (looks_latin1(buf, nbytes, ubuf, &ulen)) {		code = "ISO-8859";		type = "text";		code_mime = "iso-8859-1"; 	} else if (looks_extended(buf, nbytes, ubuf, &ulen)) {		code = "Non-ISO extended-ASCII";		type = "text";		code_mime = "unknown";	} else {		from_ebcdic(buf, nbytes, nbuf);		if (looks_ascii(nbuf, nbytes, ubuf, &ulen)) {			code = "EBCDIC";			type = "character data";			code_mime = "ebcdic";		} else if (looks_latin1(nbuf, nbytes, ubuf, &ulen)) {			code = "International EBCDIC";			type = "character data";			code_mime = "ebcdic";		} else {			rv = 0;			goto done;  /* doesn't look like text at all */		}	}	if (nbytes <= 1) {		rv = 0;		goto done;	}	/*	 * for troff, look for . + letter + letter or .\";	 * this must be done to disambiguate tar archives' ./file	 * and other trash from real troff input.	 *	 * I believe Plan 9 troff allows non-ASCII characters in the names	 * of macros, so this test might possibly fail on such a file.	 */	if ((ms->flags & MAGIC_NO_CHECK_TROFF) == 0 && *ubuf == '.') {		unichar *tp = ubuf + 1;		while (ISSPC(*tp))			++tp;	/* skip leading whitespace */		if ((tp[0] == '\\' && tp[1] == '\"') ||		    (isascii((unsigned char)tp[0]) &&		     isalnum((unsigned char)tp[0]) &&		     isascii((unsigned char)tp[1]) &&		     isalnum((unsigned char)tp[1]) &&		     ISSPC(tp[2]))) {			subtype_mime = "text/troff";			subtype = "troff or preprocessor input";			goto subtype_identified;		}	}	if ((ms->flags & MAGIC_NO_CHECK_FORTRAN) == 0 &&	    (*buf == 'c' || *buf == 'C') && ISSPC(buf[1])) {		subtype_mime = "text/fortran";		subtype = "fortran program";		goto subtype_identified;	}	/* look for tokens from names.h - this is expensive! */	if ((ms->flags & MAGIC_NO_CHECK_TOKENS) != 0)		goto subtype_identified;	i = 0;	while (i < ulen) {		size_t end;		/*		 * skip past any leading space		 */		while (i < ulen && ISSPC(ubuf[i]))			i++;		if (i >= ulen)			break;		/*		 * find the next whitespace		 */		for (end = i + 1; end < nbytes; end++)			if (ISSPC(ubuf[end]))				break;		/*		 * compare the word thus isolated against the token list		 */		for (p = names; p < names + NNAMES; p++) {			if (ascmatch((const unsigned char *)p->name, ubuf + i,			    end - i)) {				subtype = types[p->type].human;				subtype_mime = types[p->type].mime;				goto subtype_identified;			}		}		i = end;	}subtype_identified:	/*	 * Now try to discover other details about the file.	 */	for (i = 0; i < ulen; i++) {		if (ubuf[i] == '\n') {			if (seen_cr)				n_crlf++;			else				n_lf++;			last_line_end = i;		} else if (seen_cr)			n_cr++;		seen_cr = (ubuf[i] == '\r');		if (seen_cr)			last_line_end = i;		if (ubuf[i] == 0x85) { /* X3.64/ECMA-43 "next line" character */			n_nel++;			last_line_end = i;		}		/* If this line is _longer_ than MAXLINELEN, remember it. */		if (i > last_line_end + MAXLINELEN)			has_long_lines = 1;		if (ubuf[i] == '\033')			has_escapes = 1;		if (ubuf[i] == '\b')			has_backspace = 1;	}	/* Beware, if the data has been truncated, the final CR could have	   been followed by a LF.  If we have HOWMANY bytes, it indicates	   that the data might have been truncated, probably even before	   this function was called. */	if (seen_cr && nbytes < HOWMANY)		n_cr++;	if ((ms->flags & MAGIC_MIME)) {		if (subtype_mime) {			if (file_printf(ms, subtype_mime) == -1)				goto done;		} else {			if (file_printf(ms, "text/plain") == -1)				goto done;		}		if (code_mime) {			if (file_printf(ms, "; charset=") == -1)				goto done;			if (file_printf(ms, code_mime) == -1)				goto done;		}	} else {		if (file_printf(ms, code) == -1)			goto done;		if (subtype) {			if (file_printf(ms, " ") == -1)				goto done;			if (file_printf(ms, subtype) == -1)				goto done;		}		if (file_printf(ms, " ") == -1)			goto done;		if (file_printf(ms, type) == -1)			goto done;		if (has_long_lines)			if (file_printf(ms, ", with very long lines") == -1)				goto done;		/*		 * Only report line terminators if we find one other than LF,		 * or if we find none at all.		 */		if ((n_crlf == 0 && n_cr == 0 && n_nel == 0 && n_lf == 0) ||		    (n_crlf != 0 || n_cr != 0 || n_nel != 0)) {			if (file_printf(ms, ", with") == -1)				goto done;			if (n_crlf == 0 && n_cr == 0 && n_nel == 0 && n_lf == 0)			{				if (file_printf(ms, " no") == -1)					goto done;			} else {				if (n_crlf) {					if (file_printf(ms, " CRLF") == -1)						goto done;					if (n_cr || n_lf || n_nel)						if (file_printf(ms, ",") == -1)							goto done;				}				if (n_cr) {					if (file_printf(ms, " CR") == -1)						goto done;					if (n_lf || n_nel)						if (file_printf(ms, ",") == -1)							goto done;				}				if (n_lf) {					if (file_printf(ms, " LF") == -1)						goto done;					if (n_nel)						if (file_printf(ms, ",") == -1)							goto done;				}				if (n_nel)					if (file_printf(ms, " NEL") == -1)						goto done;			}			if (file_printf(ms, " line terminators") == -1)				goto done;		}		if (has_escapes)			if (file_printf(ms, ", with escape sequences") == -1)				goto done;		if (has_backspace)			if (file_printf(ms, ", with overstriking") == -1)				goto done;	}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人激情免费电影网址| 国产一区二区伦理片| 国产精品久久久久三级| 久久久久88色偷偷免费| 亚洲精品在线电影| 精品国内二区三区| 国产女人水真多18毛片18精品视频 | 欧美变态tickle挠乳网站| 91麻豆精品国产91久久久更新时间| 日本高清不卡一区| 欧日韩精品视频| 制服丝袜中文字幕亚洲| 精品噜噜噜噜久久久久久久久试看 | 国产精品高潮久久久久无| 国产精品理论在线观看| 亚洲日本丝袜连裤袜办公室| 亚洲狼人国产精品| 亚洲午夜电影在线| 蜜臀久久99精品久久久久久9 | 亚洲不卡在线观看| 久久精品国产久精国产| 国产传媒日韩欧美成人| 色香蕉久久蜜桃| 8x8x8国产精品| 久久久国产一区二区三区四区小说 | 国产成人午夜精品影院观看视频| 成人激情动漫在线观看| 欧美调教femdomvk| 久久色在线观看| 最新成人av在线| 日本特黄久久久高潮| 成人小视频免费在线观看| 在线中文字幕一区| 久久婷婷色综合| 亚洲成va人在线观看| 国产精品资源网| 欧美高清dvd| 亚洲综合精品自拍| 久久精品99国产精品日本| av一区二区不卡| 亚洲精品一区在线观看| 亚洲综合在线第一页| 国产精一品亚洲二区在线视频| 色综合 综合色| 国产夜色精品一区二区av| 香蕉成人伊视频在线观看| 成人18视频在线播放| 精品sm在线观看| 视频在线观看一区| 欧美综合天天夜夜久久| 国产精品对白交换视频| 精品无人码麻豆乱码1区2区| 日本精品一级二级| 中文字幕亚洲精品在线观看| 国产精品一区在线观看你懂的| 4438x亚洲最大成人网| 亚洲免费伊人电影| 99在线视频精品| 国产精品久久久久久久久免费樱桃| 久久av老司机精品网站导航| 欧美精品123区| 亚洲久本草在线中文字幕| 成人精品国产免费网站| 久久综合给合久久狠狠狠97色69| 日本不卡在线视频| 91精品婷婷国产综合久久 | 亚洲精品一区二区三区香蕉| 亚洲第一搞黄网站| 欧美日韩精品高清| 亚洲成av人影院| 欧美日韩精品欧美日韩精品一| 亚洲欧美二区三区| 色狠狠色噜噜噜综合网| 亚洲人精品午夜| 一本久道久久综合中文字幕| 亚洲精品国产无天堂网2021| 日本韩国一区二区| 亚洲成a人v欧美综合天堂下载 | 激情综合网激情| 日韩视频在线一区二区| 免费观看日韩av| 日韩欧美不卡一区| 国产麻豆91精品| 国产精品视频免费看| 成人爽a毛片一区二区免费| 国产精品亲子乱子伦xxxx裸| 91亚洲资源网| 亚洲sss视频在线视频| 日韩天堂在线观看| 国产剧情一区二区三区| 国产精品电影一区二区| 欧美中文字幕一区二区三区亚洲| 午夜精品久久久久久不卡8050| 欧美一级一级性生活免费录像| 极品尤物av久久免费看| 国产精品嫩草99a| 欧美日本在线视频| 国产精品538一区二区在线| 亚洲欧美成aⅴ人在线观看| 欧美日韩视频专区在线播放| 国产原创一区二区| 亚洲欧洲综合另类在线| 日韩欧美一区二区视频| 国产精品99久久久久久久vr| 亚洲男人天堂av| 日韩精品中午字幕| 97久久精品人人做人人爽| 日本不卡视频在线| 亚洲欧美日韩久久| 欧美不卡在线视频| 色婷婷久久久久swag精品| 韩国v欧美v日本v亚洲v| 亚洲国产视频a| 国产精品嫩草99a| 日韩欧美卡一卡二| 欧美色图一区二区三区| 国产一二精品视频| 日本欧美一区二区三区| 亚洲视频在线观看一区| 精品福利一区二区三区免费视频| 91成人免费网站| 成人精品鲁一区一区二区| 久久精品国产精品亚洲红杏| 亚洲免费色视频| 中文字幕免费不卡在线| 日韩欧美色电影| 欧美精品tushy高清| 91精彩视频在线| 成人毛片在线观看| 国产精品夜夜嗨| 狠狠色丁香久久婷婷综| 亚洲国产精品一区二区www在线| 国产蜜臀97一区二区三区| 精品国产乱子伦一区| 欧美一区二区三区视频免费 | 欧美日韩久久久一区| 91美女福利视频| www.欧美精品一二区| 懂色av一区二区在线播放| 狠狠久久亚洲欧美| 精品影视av免费| 蜜桃视频在线观看一区| 日韩精品一二区| 奇米影视7777精品一区二区| 亚洲国产精品精华液网站| 亚洲六月丁香色婷婷综合久久 | 久久精品国产免费| 秋霞电影网一区二区| 天天做天天摸天天爽国产一区| 亚洲精品亚洲人成人网| 亚洲手机成人高清视频| 亚洲女厕所小便bbb| 亚洲精品国产精华液| 亚洲欧美国产三级| 一级日本不卡的影视| 亚洲一区二区三区精品在线| 亚洲图片欧美色图| 奇米影视一区二区三区| 精品亚洲porn| 国产xxx精品视频大全| 成人免费视频免费观看| 99久久免费国产| 欧美亚洲动漫另类| 91精品国产综合久久香蕉的特点| 欧美一区二区二区| 精品欧美乱码久久久久久1区2区| 精品乱人伦小说| 国产精品久久久久桃色tv| 亚洲精品成a人| 日本视频一区二区| 国产盗摄视频一区二区三区| 不卡电影免费在线播放一区| 一本大道久久a久久精品综合| 91麻豆蜜桃一区二区三区| 欧美精品一二三区| 久久这里都是精品| 亚洲精品水蜜桃| 久久99国产精品免费网站| 成人高清视频在线观看| 欧美色图天堂网| 国产亚洲欧美日韩日本| 亚洲男同1069视频| 久久www免费人成看片高清| 不卡的av电影| 69堂成人精品免费视频| 中文在线资源观看网站视频免费不卡| 一区二区三区中文字幕在线观看| 日韩成人dvd| 91亚洲精品乱码久久久久久蜜桃| 欧美剧情电影在线观看完整版免费励志电影 | 亚洲第一福利一区| 国产成+人+日韩+欧美+亚洲| 欧美日韩一区二区三区四区五区 | 亚洲视频综合在线| 国内成人精品2018免费看| 99精品国产91久久久久久| 精品欧美一区二区久久| 亚洲第一主播视频| 91在线精品一区二区三区| 精品国产乱码久久|