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

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

?? mfile.cc

?? 功能較全面的反匯編器:反匯編器ht-2.0.15.tar.gz
?? CC
?? 第 1 頁 / 共 2 頁
字號:
/* *	HT Editor *	mfile.cc * *	Copyright (C) 1999-2003 Stefan Weyergraf (stefan@weyergraf.de) * *	This program is free software; you can redistribute it and/or modify *	it under the terms of the GNU General Public License version 2 as *	published by the Free Software Foundation. * *	This program is distributed in the hope that it will be useful, *	but WITHOUT ANY WARRANTY; without even the implied warranty of *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *	GNU General Public License for more details. * *	You should have received a copy of the GNU General Public License *	along with this program; if not, write to the Free Software *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */#include <cerrno>#include <cstdlib>#include <cstring>// <debug>#include "htdebug.h"#include "snprintf.h"// </debug>#include "except.h"#include "mfile.h"#define OBJID_MFA MAGIC32("FAr\0")#define OBJID_CFA MAGIC32("FAr\1")// "min condition" value, see makeAreaModified(...)#define MIN_COND_MFA_SIZE	(16)// absolute maximum size of a MFA#define MAX_MFA_SIZE		(128)/* *	File area (FA) */FileArea::FileArea(FileOfs Start, FileOfs Size){	start = Start;	size = Size;}int FileArea::compareTo(const Object *obj) const{	const FileArea *l, *r;	int sign = 1;	l = (FileArea*)obj;	r = this;	if (r->start < l->start) {		const FileArea *t = l;		l = r;		r = t;		sign = -sign;	}	if (r->start < l->start + l->size) return 0;	return sign;}/* *	Modified file area (MFA) */ModifiedFileArea::ModifiedFileArea(FileOfs start, FileOfs size): FileArea(start, size){	buf = ht_malloc(size);}ModifiedFileArea::~ModifiedFileArea(){	free(buf);}ObjectID ModifiedFileArea::getObjectID() const{	return OBJID_MFA;}/* *	Copied file area (CFA) */CopiedFileArea::CopiedFileArea(FileOfs start, FileOfs size, FileOfs Src_start): FileArea(start, size){	src_start = Src_start;}ObjectID CopiedFileArea::getObjectID() const{	return OBJID_CFA;}/* *	File modification layer (FML) * *	FML is a FileLayer, which adds efficient in-memory file modification *	abilities. *	To achieve this, FML uses a tree containing FileArea (FA) objects, that *	describe the differences between the modified and the original file. * *	'mods' (tree which contains FAs) rules: *	(1) all FAs together must exactly cover the area [0, getSize()-1] *	(2) no two FAs may overlap *	(3) MFAs size may not be less than 1 (but not necessarily less than *	    MIN_COND_MFA_SIZE, as the name might suggest !) *	(4) MFAs size may not be greater than MAX_MFA_SIZE *	(5) two adjacent MFAs must have the sum of their sizes > MAX_MFA_SIZE * *	(general) minimize both the number of FAs in 'mods' and the space wasted *	          by each FA (ie. make MFAs at least 48 bytes in 'size', *	          because malloc will always alloc this many bytes for *	          MFA->buf (~16 bytes), the MFA itself (~16 bytes) and it's *	          entry in AVLTree (~16 bytes) on most architectures) */FileModificator::FileModificator(File *file, bool own_file): FileLayer(file, own_file), mods(true){	mcount = 0;	inv_mcount = 0;	invalidateMods();}void FileModificator::checkSanity(){	FileOfs s = 0;	FileArea *prevx = NULL;	foreach(FileArea, x, mods,//		bool iscopy = dynamic_cast<CopiedFileArea*>(x) != NULL;		bool ismod = dynamic_cast<ModifiedFileArea*>(x) != NULL;		// rule (1) part 1 and rule (2)		if (x->start != s)			throw MsgfException("mfile-sanity: area starts at 0x%qx, should be 0x%qx", x->start, s);		// rule (3)		if (x->size < 1)			throw MsgfException("mfile-sanity: area at 0x%qx, has size %qd (must be >= %d)", x->start, x->size, 1);		// rule (4)		if (x->size > MAX_MFA_SIZE && ismod)			throw MsgfException("mfile-sanity: area at 0x%qx, has size %qd (must be <= %d)", x->start, x->size, MAX_MFA_SIZE);		// rule (5)/*		if (prevx && (dynamic_cast<ModifiedFileArea*>(prevx) != NULL)		&& ismod && (((ModifiedFileArea*)prevx)->size + 		((ModifiedFileArea*)x)->size <= MAX_MFA_SIZE))			throw MsgException("mfile-sanity: two adjacent MFAs with sum of sizes <= MAX_MFA_SIZE = %d", MAX_MFA_SIZE);*/		s += x->size;		prevx = x;	);	// rule (1) part 2	if (newsize != s)		throw MsgfException("mfile-sanity: newsize = %qx != %qx = calculated_size", &newsize, &s);}void FileModificator::debug(){	FILE *f = stderr;	fprintf(f, "<areas>\n");	foreach(FileArea, x, mods,		if (dynamic_cast<ModifiedFileArea*>(x)) {			ModifiedFileArea *m = (ModifiedFileArea *)x;			ht_fprintf(f, "\tmodify %08qx, %qd bytes", &x->start, &x->size);			for (uint i=0; i < x->size; i++) {				ht_fprintf(f, " %02x", m->buf[i]);			}			ht_fprintf(f, " '");			for (uint i=0; i<x->size; i++) {				byte c = m->buf[i];				if ((c<32) || (c>0x80)) c = 32;				ht_fprintf(f, "%c", c);			}			ht_fprintf(f, "'\n");		} else {			CopiedFileArea *c = (CopiedFileArea *)x;			ht_fprintf(f, "\tcopy   %08qx, %qd bytes, orig start %08qx\n", &x->start, &x->size, &c->src_start);		}	);	fprintf(f, "</areas>\n");	fprintf(f, "sanity:\n");	checkSanity();}bool FileModificator::cut1(ObjHandle h, FileOfs rstart, FileOfs size){	FileArea *a = (FileArea*)mods.get(h);	bool have_head_gap = rstart != 0;	bool have_tail_gap = a->size > rstart+size;	if (!have_head_gap && !have_tail_gap) {		mods -= h;		return true;	}	if (a->getObjectID() == OBJID_CFA) {		CopiedFileArea *c = (CopiedFileArea*)a;		if (have_head_gap) {			FileOfs csize = c->size;			c->size = rstart;			if (have_tail_gap) {				mods += new CopiedFileArea(c->start + rstart, csize - rstart - size, c->src_start +rstart+size);			}		} else {			c->size -= size;			c->src_start += size;		}	} else {		assert(a->getObjectID() == OBJID_MFA);		ModifiedFileArea *m = (ModifiedFileArea*)a;		memmove(m->buf + rstart, m->buf + rstart+size, m->size-rstart-size);		m->size -= size;		m->buf = (byte*)realloc(m->buf, m->size);/*		if (have_head_gap) {			byte *newbuf = ht_malloc(m->size);			memcpy(newbuf, m->buf, rstart);			memcpy(newbuf+rstart, m->buf+rstart+size, m->size-rstart);			free(m->buf);			m->buf = newbuf;		} else {			memmove(m->buf, m->buf + size, m->size);			m->buf = (byte*)realloc(m->buf, m->size);		}*/	}	return false;}/* *	NOTE 1 (aka changing keys of already-inserted Tree-elements, see below) *	====== *	this is bad code because we change the key *	of an already-inserted Tree-element, but here it is both *	fast and functional... */#define STREAM_COPYBUF_SIZE	(64*1024)FileOfs FileModificator::copyAllTo(Stream *stream){	byte *buf = new byte[STREAM_COPYBUF_SIZE];	FileOfs result = 0;	uint r, t;	do {		uint k = STREAM_COPYBUF_SIZE;		r = read(buf, k);		assert(r <= k);		t = stream->write(buf, r);		assert(t <= r);		result += t;		if (t != k) break;	} while (t);	delete[] buf;	return result;}FileOfs FileModificator::copyTo(Stream *stream, FileOfs count){	byte *buf = new byte[STREAM_COPYBUF_SIZE];	FileOfs result = 0;	while (count) {		FileOfs k = STREAM_COPYBUF_SIZE;		if (k > count) k = count;		uint r = read(buf, k);		assert(r <= k);		uint t = stream->write(buf, r);		assert(t <= r);		count -= t;		result += t;		if (t != k) break;	}	delete[] buf;	return result;}void FileModificator::cut(FileOfs size){	if (!(getAccessMode() & IOAM_WRITE)) throw IOException(EACCES);	FileOfs o = tell();	if (o + size > newsize) throw IOException(EINVAL);	ObjHandle h = findArea(o);	FileOfs ssize = size;//	int i = 1;	while (size) {//		printf("it %d\n", i++);		assert(h != invObjHandle)		FileArea *a = (FileArea*)mods.get(h);		FileOfs s = o - a->start;		FileOfs z = a->size - s;		if (z > size) z = size;		ObjHandle hnext = mods.findNext(h);		bool deleted = cut1(h, s, z);		if (!deleted && o == a->start)			a->start -= ssize-size;// see NOTE 1 above		o += z;		size -= z;		newsize -= z;		if (deleted) {			h = findArea(o);		} else {			h = hnext;		}				}	while (h != invObjHandle) {		FileArea *a = (FileArea*)mods.get(h);		h = mods.findNext(h);		a->start -= ssize;	// see NOTE 1 above	}	mcount++;}void FileModificator::extend(FileOfs Newsize){	if (Newsize == newsize) return;	if (Newsize < newsize) throw IOException(EINVAL);	if (!(getAccessMode() & IOAM_WRITE)) throw IOException(EACCES);	seek(0);	// find last area	ObjHandle h = (newsize!=0) ? findArea(newsize-1) : invObjHandle;	FileOfs c = Newsize-newsize;	if (h != invObjHandle) {		FileArea *a = (FileArea*)mods.get(h);		ModifiedFileArea *m = dynamic_cast<ModifiedFileArea*>(a);		if (m) {			// if its a modification, merge with the following modifications			if (m->size < MAX_MFA_SIZE) {				FileOfs s = m->size + c;				if (s > MAX_MFA_SIZE) s = MAX_MFA_SIZE;				m->buf = (byte*)realloc(m->buf, s);				FileOfs d = s - m->size;				memset(m->buf+m->size, 0, d);				newsize += d;				c -= d;				m->size = s;			}		}	}	while (c != 0) {		FileOfs s = c;		if (s > MAX_MFA_SIZE) s = MAX_MFA_SIZE;		ModifiedFileArea *a = new ModifiedFileArea(newsize, s);		memset(a->buf, 0, s);		mods += a;		newsize += s;		c -= s;	}	mcount++;}ObjHandle FileModificator::findArea(FileOfs o){	ObjHandle h;//	if (o != 0) {		FileArea a(o, 1);		h = mods.find(&a);/*	} else {		h = mods.findFirst();	}*/	return h;}String &FileModificator::getDesc(String &result) const{	mFile->getDesc(result);	if (isModified()) result.prepend("in-memory modified ");	return result;}FileOfs FileModificator::getSize() const{	return newsize;}void FileModificator::insert(const void *buf, FileOfs size){	if (!(getAccessMode() & IOAM_WRITE)) throw IOException(EACCES);	ObjHandle h;	if (!size) return;	FileOfs ssize = size;	// (1) insert/merge or append MFAs	FileOfs t = tell();//	ht_printf("tell %qx\n", t);	ObjHandle h_a = findArea(t);	FileArea *a = (FileArea*)mods.get(h_a);	// really insert or append ?	if (a) {		// yes, insert.		// relocate all FAs after 'a'		h = mods.findLast();		while (h != h_a) {			FileArea *a = (FileArea*)mods.get(h);			h = mods.findPrev(h);			a->start += ssize;	// see NOTE 1 above		}		if (a->start == t) {			a->start += ssize;			FileOfs start = t;			while (ssize != 0) {				FileOfs k = MAX_MFA_SIZE;				if (k > ssize) k = ssize;				mods += new ModifiedFileArea(start, k);				ssize -= k;				start += k;			}		} else if (a->getObjectID() == OBJID_CFA) {			// split CFA at offset t, and relocate high (offset) part			CopiedFileArea *c = (CopiedFileArea*)a;			FileOfs d = t - a->start;			// b becomes 'high' (offset) a			FileArea *b = new CopiedFileArea(c->start + d + ssize, c->size -d, c->src_start+d);			// a becomes 'low' (offset) a			a->size = d;			mods += b;			// create new MFAs between 'a' and 'b'			FileOfs start = t;			while (ssize != 0) {				FileOfs k = MAX_MFA_SIZE;				if (k > ssize) k = ssize;				mods += new ModifiedFileArea(start, k);				ssize -= k;				start += k;			}		} else {			ModifiedFileArea *m = (ModifiedFileArea*)a;			// FIXME: should merge existing MFA with new one(s)			// split MFA at offset t and relocate high (offset) part			FileOfs d = t - a->start;			ModifiedFileArea *b = new ModifiedFileArea(m->start + d + ssize, m->size -d);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区免费视频| 久久久亚洲午夜电影| 日本高清视频一区二区| 欧美亚洲愉拍一区二区| 欧美另类变人与禽xxxxx| 欧美一区二区三区成人| 26uuu精品一区二区在线观看| 久久久久久影视| 亚洲最色的网站| 成人a级免费电影| 久久久亚洲精品一区二区三区| ...xxx性欧美| 九色综合国产一区二区三区| 成人av在线资源| 精品久久久久久最新网址| 亚洲综合免费观看高清完整版| 另类的小说在线视频另类成人小视频在线| 国产精品一区二区你懂的| 91精品国产色综合久久不卡电影 | av一区二区不卡| 9191国产精品| 久久久精品蜜桃| 国产成人免费视频| 欧美日韩另类一区| 日韩电影在线观看网站| 欧美裸体一区二区三区| 亚洲欧美日韩国产综合| 成人毛片老司机大片| 国产欧美日韩精品在线| 国产精品影视天天线| 久久婷婷久久一区二区三区| 久久精品国产亚洲一区二区三区| 在线成人高清不卡| 免费人成在线不卡| 久久久久久久久久久久久女国产乱| 久久av中文字幕片| 中文一区二区在线观看| 91久久精品国产91性色tv| 亚洲一二三区在线观看| 欧美成人三级在线| 成人免费高清视频在线观看| 亚洲综合在线五月| 91麻豆精品国产91久久久使用方法| 日韩激情av在线| 国产女主播一区| 欧美性受xxxx黑人xyx| 日韩不卡免费视频| 亚洲欧洲国产日韩| 日韩精品影音先锋| 成人99免费视频| 国产精品影视在线观看| 日本欧美大码aⅴ在线播放| 国产精品不卡在线| 欧美精品丝袜中出| 在线观看亚洲a| 91在线精品一区二区| 国模冰冰炮一区二区| 日本成人在线看| 亚洲成人自拍网| 亚洲成a人片在线观看中文| 国产欧美精品一区二区三区四区| 色婷婷国产精品| 成人黄色免费短视频| 国产成人精品三级| 国产乱码精品一区二区三| 日本不卡视频一二三区| 日本sm残虐另类| 美国十次综合导航| 国产在线精品一区在线观看麻豆| 欧美日韩在线一区二区| 91精品麻豆日日躁夜夜躁| 欧美性一二三区| 国产精品沙发午睡系列990531| 人禽交欧美网站| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 亚洲国产精品99久久久久久久久| 精品伦理精品一区| 日韩一区二区视频| 欧美一个色资源| 在线播放一区二区三区| 欧美乱熟臀69xxxxxx| 91超碰这里只有精品国产| 精品久久久久av影院| 免费成人深夜小野草| 国产精品正在播放| 精品久久久久久亚洲综合网| 亚洲福利视频三区| 91玉足脚交白嫩脚丫在线播放| 日韩一区二区精品在线观看| 国产精品免费免费| 视频一区欧美精品| 99国产精品99久久久久久| 欧美一级国产精品| 亚洲三级在线免费观看| 麻豆freexxxx性91精品| 欧美性猛片xxxx免费看久爱| 久久久美女毛片| 国产精品1024| 精品国产乱码久久| 国内成人自拍视频| 欧美经典三级视频一区二区三区| 99在线精品免费| 久久国产精品99精品国产| 日韩精品中文字幕在线不卡尤物 | 久久综合九色综合久久久精品综合| 国产中文字幕精品| √…a在线天堂一区| 欧美高清精品3d| 丝袜脚交一区二区| 日韩免费高清av| 国产成人免费视频网站高清观看视频| 精品剧情在线观看| 91色乱码一区二区三区| 一区二区三区国产豹纹内裤在线 | 国产成人精品www牛牛影视| 国产人久久人人人人爽| 在线国产亚洲欧美| 久久av资源网| 尤物在线观看一区| 精品国产露脸精彩对白| 91麻豆国产在线观看| 五月天激情综合| 中文字幕一区二区三区视频| 欧美日高清视频| 一本到不卡精品视频在线观看| 日韩在线卡一卡二| 国产精品萝li| 国产精品私人影院| 日韩精品中文字幕在线不卡尤物| 91捆绑美女网站| 成人免费毛片app| 国产一区 二区| 麻豆91小视频| 看国产成人h片视频| 亚洲国产成人av好男人在线观看| 欧美激情一区在线| 中文子幕无线码一区tr| 日韩美女一区二区三区| 欧美日韩精品欧美日韩精品一综合| 高清视频一区二区| 国产在线麻豆精品观看| 久久精品噜噜噜成人av农村| 天天色天天操综合| 天天色 色综合| 日本亚洲视频在线| 久久精工是国产品牌吗| 懂色一区二区三区免费观看| 青草国产精品久久久久久| 麻豆一区二区三区| 久久99国产精品成人| 顶级嫩模精品视频在线看| 成人免费看的视频| 欧美日韩视频在线观看一区二区三区| 色成人在线视频| 日韩欧美卡一卡二| 欧美韩国日本综合| 婷婷开心激情综合| 久久狠狠亚洲综合| 一本色道久久加勒比精品| 777奇米四色成人影色区| 国产亚洲精品精华液| 一区二区三区在线视频播放| 免费一级片91| 91久久人澡人人添人人爽欧美| 欧美日本乱大交xxxxx| 综合在线观看色| 激情综合色综合久久| 9191精品国产综合久久久久久| 久久精品人人做人人爽97 | 91精品国产综合久久香蕉的特点| 国产视频一区在线观看| 日韩中文字幕1| 欧美剧在线免费观看网站| 亚洲乱码中文字幕综合| 成人av免费在线观看| 久久久国产精华| 国产精品主播直播| 精品国内片67194| 精品伊人久久久久7777人| 欧美一级日韩一级| 婷婷国产v国产偷v亚洲高清| 欧美色区777第一页| 亚洲午夜日本在线观看| 欧美日韩国产美| 日韩精品每日更新| 制服丝袜中文字幕一区| 日韩制服丝袜av| 精品国产免费人成在线观看| 日本欧美加勒比视频| 精品国产1区二区| 粉嫩av一区二区三区在线播放 | 性做久久久久久久久| 欧美日韩一本到| 精品一区二区在线免费观看| 91网站最新网址| 久久夜色精品一区| 国产精品久久久一本精品| 欧美日韩在线播放| 在线免费观看一区| 欧美男女性生活在线直播观看|