• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pe函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中pe函数的典型用法代码示例。如果您正苦于以下问题:C++ pe函数的具体用法?C++ pe怎么用?C++ pe使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pe函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: voina

void voina(int p1[],int p2[],int *b1,int *b2,int *p12,int *p22,int i)
{
printf("\n                   VOINA!!!\n\n");
i++;
getchar();
himikal(p1,p2,p12,p22,i);
i++;
getchar();
himikal(p1,p2,p12,p22,i);
i++;
getchar();
himikal(p1,p2,p12,p22,i);
if(p1[i]-*p12>p2[i]-*p22)
{
pe(p1,p2,b1,b2);
pe(p1,p2,b1,b2);
pe(p1,p2,b1,b2);
pe(p1,p2,b1,b2);
getchar();
}else
if(p1[i]-*p12<p2[i]-*p22)
{
pd(p1,p2,b1,b2);
pd(p1,p2,b1,b2);
pd(p1,p2,b1,b2);
pd(p1,p2,b1,b2);
getchar();
}else voina(p1,p2,b1,b2,p12,p22,i);
}
开发者ID:anton4o123,项目名称:school_work,代码行数:29,代码来源:karti.c


示例2: pe

void TSharedArray<T>::scatter(TGridIndex i0, const TGridIndexVector& iv, TGridIndex mult,
							  const T* source, TGridIndex source_stride)
{
	smallnat v;
	const int n = iv.length();
	if (sizeof(T) == 4) {
		static short indexbuff[VECLEN];
		static T sourcebuff[VECLEN];
#		pragma _CRI cache_align indexbuff,sourcebuff
		unroll4;
		for (v=0; v<n; v++) indexbuff[v] = iv(v)*mult;
		// check that all map to same PE
		const int pe_i0 = pe(i0+indexbuff[0]);
		for (v=0; v<n; v++) if (pe(i0+indexbuff[v]) != pe_i0) {cerr << "*** TSharedArray::scatter32 error\n"; exit(1);}
		// localize indexbuff
		for (v=0; v<n; v++) indexbuff[v] = iL(i0+indexbuff[v]) - iL(i0);
		unroll4;
		for (v=0; v<n; v++) sourcebuff[v] = source[v*source_stride];
		shmem_ixput32(ptr+iL(i0),sourcebuff,indexbuff,n,pe_i0);
	} else {
		static long indexbuff[VECLEN];
		static T sourcebuff[VECLEN];
#		pragma _CRI cache_align indexbuff,sourcebuff
		unroll4;
		for (v=0; v<n; v++) indexbuff[v] = iv(v)*mult;
		// check that all map to same PE
		const int pe_i0 = pe(i0+indexbuff[0]);
		for (v=0; v<n; v++) if (pe(i0+indexbuff[v]) != pe_i0) {cerr << "*** TSharedArray::scatter64 error\n"; exit(1);}
		// localize indexbuff
		for (v=0; v<n; v++) indexbuff[v] = iL(i0+indexbuff[v]) - iL(i0);
		unroll4;
		for (v=0; v<n; v++) sourcebuff[v] = source[v*source_stride];
		shmem_ixput64(ptr+iL(i0),sourcebuff,indexbuff,n,pe_i0);
	}
}
开发者ID:alhom,项目名称:hyb,代码行数:35,代码来源:sharr.C


示例3: BLOreloBase

static int BLOreloBase()
{
 char *path, *file, err[1000];
 int r;

 if(!game) game = new gameC(0,0,0,0);

 path = dataFindPath("everborn.game");
 if(path == NULL)
    {
	pe("can't find game\n");
	return -1;
    }

 file = txtLoad(path);
 free(path);
 if(file == NULL)
    {
	pe("can't load game\n");
	return -1;
    }

 r = game->Read(file, err);
 free(file);
 if(r)
    {
	pe("error: %s\n", err);
	return -1;;
    }

 return 0;
}
开发者ID:xarvh,项目名称:everborn,代码行数:32,代码来源:subBLO.cpp


示例4: BLOrelo

static int BLOrelo()
{
 char *fn, *path, *file, err[1000];
 raceC* r;

 fn = envGet("BLOrace");

 path = dataFindPath(fn);
 if(path == NULL)
    {
	pe("can't find race file %s\n", fn);
	return -1;
    }

 file = txtLoad(path);
 free(path);
 if(file == NULL)
    {
	pe("can't load race file %s\n", fn);
	return -1;
    }

 r = raceLoad(file, err);
 free(file);
 if(r == NULL)
    {
	pe("error: %s\n", err);
	return -1;
    }

 BLOrace(r);

 return 0;
}
开发者ID:xarvh,项目名称:everborn,代码行数:34,代码来源:subBLO.cpp


示例5: racePackRead

/*=============================================================================
 * PACK IO
 */
static int racePackRead(connectionC* sv, netReqC* req)
{
 char fe[] = "racePackRead: ";
 char ebf[200];
 char *c;
 raceC *r;

 c = (char*)req->data;


 // check string termination
 if(c[req->size -1] != '\0')
 {
    pe("%sunterminated string from server.\n", fe);
    return -1;
 }


 // load
 txtStrip(c);
 r = raceLoad(c, ebf);
 if(r == NULL)
 {
    pe("bad race '%s' from server: %s.\n", req->item, ebf);
    return -1;
 }


 // done
 pf("from server: race %s\n", r->Name);
 dataLoadMissing();
 return 0;
}
开发者ID:xarvh,项目名称:everborn,代码行数:36,代码来源:race.cpp


示例6: cmdCQueue

static int cmdCQueue()
{
 cellC* c = cmdGetBrain()->Focus;
 if(!c) return pe("NOFOCUS\n"), -1;
 if(!c->City) return pe("NOCITY in %d %d %d\n", c->X, c->Y, c->Z), -1;	// no city present
 if(c->City->Owner != cmdGetBrain()) return pe("NOTOWNER\n"), -1;	// owner only!!
 return 0;
}
开发者ID:xarvh,项目名称:everborn,代码行数:8,代码来源:city_cmd.cpp


示例7: _set_empty

	void _set_empty() {
		ps().x() = 0.0;
		pe().x() = 0.0;
		ps().y() = 0.0;
		pe().y() = 0.0;
		if (Dim == 3) {
			ps().z() = 0.0;
			pe().z() = 0.0;
		}
	}
开发者ID:hyperpower,项目名称:carpio,代码行数:10,代码来源:_segment.hpp


示例8: nomatch

static void
nomatch(const char *mac)
{
	int i, j;

	/*
	 * Look for a match further down on stack
	 * If we find one, it suggests that the stuff in
	 * between is supposed to match itself.
	 */
	for (j = stktop; j >= 0; j--) {
		if (eq(mac, br[stk[j].opno].clbr)) {
			/* Found.  Make a good diagnostic. */
			if (j == stktop - 2) {
				/*
				 * Check for special case \fx..\fR and don't
				 * complain.
				 */
				if (stk[j + 1].opno == FT &&
				    stk[j + 1].parm != 'R' &&
				    stk[j + 2].opno == FT &&
				    stk[j + 2].parm == 'R') {
					stktop = j - 1;
					return;
				}
				/*
				 * We have two unmatched frobs.  Chances are
				 * they were intended to match, so we mention
				 * them together.
				 */
				pe(stk[j + 1].lno);
				prop(j + 1);
				printf(" does not match %d: ", stk[j + 2].lno);
				prop(j + 2);
				printf("\n");
			} else {
				for (i = j + 1; i <= stktop; i++) {
					complain(i);
				}
			}
			stktop = j - 1;
			return;
		}
	}
	/* Didn't find one.  Throw this away. */
	pe(lineno);
	printf("Unmatched .%s\n", mac);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:48,代码来源:checknr.c


示例9: main

void main()
{
int i,b1=26,b2=26,k[52],p1[52],p2[52],p12,p22;
srand((unsigned)time(NULL));

kart(k);
for(i=0;i<26;i++)
{
p1[i]=k[i];
p2[i]=k[i+26];
}
getchar();
do
{
i=0;
system("clear");
rez(b1,b2);
himikal(p1,p2,&p12,&p22,i);
printf("\n");
getchar();
if(p1[i]-p12>p2[i]-p22)
pe(p1,p2,&b1,&b2);
else
if(p1[i]-p12<p2[i]-p22)
pd(p1,p2,&b1,&b2);
else voina(p1,p2,&b1,&b2,&p12,&p22,i);
}
while((b1!=0)&&(b2!=0));
system("clear");
rez(b1,b2);
if(b1==0)
printf("\n\n                         POBEDITEL E PLAYER2!!!\n");
else printf("\n\n                         POBEDITEL E PLAYER1\n");
}
开发者ID:anton4o123,项目名称:school_work,代码行数:34,代码来源:karti.c


示例10: pa

    CObject *Evaluate(const CObject_Vector &jj)
    {
      if (p_v->V()->id.back()==0) {
	const CVec4Type &a(*jj[0]->template Get<CVec4Type>());
	const CVec4Type &b(*jj[1]->template Get<CVec4Type>());
	const CVec4Type &c(*jj[2]->template Get<CVec4Type>()); 
	Vec4D pa(p_v->J(0)->P()), pb(p_v->J(1)->P()), pc(p_v->J(2)->P());
	CScalarType *j(CScalarType::New
		       ((a*b)*(c*(pa-pb))+
			(b*c)*(a*(pb-pc))+
			(c*a)*(b*(pc-pa))));
	j->SetS(a.S()|b.S()|c.S());
	return j;
      }
      const CVec4Type &a(*jj[m_n[1]]->template Get<CVec4Type>());
      const CVec4Type &b(*jj[m_n[2]]->template Get<CVec4Type>());
      const CScalarType &e(*jj[m_n[0]]->template Get<CScalarType>()); 
      Vec4D pa(p_v->J(m_n[1])->P()), pb(p_v->J(m_n[2])->P());
      Vec4D pe(p_v->J(m_n[0])->P());
      CVec4Type *j(CVec4Type::New
		   (e[0]*((a*b)*CVec4Type(pa-pb)
			  +(a*ATOOLS::Vec4<SType>(pb+pb+pa+pe))*b
			  -(b*ATOOLS::Vec4<SType>(pa+pa+pb+pe))*a)));
      j->SetS(a.S()|b.S()|e.S());
      return j;
    }
开发者ID:alisw,项目名称:SHERPA,代码行数:26,代码来源:SVVV_LC.C


示例11: main

int main() {
  std::string solution[100], team[100];
  for(int cas = 1;; ++cas) {
    unsigned int n = readUInt();
    if(n == 0)
      return 0;
    std::stack<char> solutionStack, teamStack;
    for(unsigned int i = 0; i < n; ++i)
      solution[i] = readLine(solutionStack);
    unsigned int m = readUInt();
    for(unsigned int i = 0; i < m; ++i)
      team[i] = readLine(teamStack);
    
    std::cout << "Run #" << cas << ": ";
    if(accept(solution, n, team, m)) {
      std::cout << "Accepted" << std::endl;
    }
    else if(pe(solutionStack, teamStack)) {
      std::cout << "Presentation Error" << std::endl;
    }
    else {
      std::cout << "Wrong Answer" << std::endl;
    }
  }
}
开发者ID:LasseD,项目名称:uva,代码行数:25,代码来源:P10188.cpp


示例12: Pdb

	void Pdb(const po::variables_map& variables, int& retcode)
	{
		retcode = 1;

		if (!variables.count("input"))
		{
			std::wcerr << L"Error parsing options: must have some input files." << std::endl;
			return;
		}

		auto out = OpenOutput<wchar_t>(variables);
		if (!out) 
			return;

		auto inputs = variables["input"].as<std::vector<std::wstring>>();
		for (auto& input : inputs)
		{
			PEParser pe(input);
			pe.Open();

			if (!pe.IsValidPE() || pe.PDBPath().empty())
				continue;

			*out << pe.PDBGUID() << " " << pe.PDBPath() << L'\n';
		}

		*out << std::flush;
		retcode = 0;
	}
开发者ID:smarttechnologies,项目名称:peparser,代码行数:29,代码来源:actions.cpp


示例13: Info

	void Info(const po::variables_map& variables, int& retcode)
	{
		retcode = 1;

		if (!variables.count("input"))
		{
			std::wcerr << L"Error parsing options: must have some input files." << std::endl;
			return;
		}

		auto out = OpenOutput<wchar_t>(variables);
		if (!out) 
			return;

		retcode = 0;

		auto inputs = variables["input"].as<std::vector<std::wstring>>();
		for (auto& input : inputs)
		{
			*out << input << L":\n\n";

			PEParser pe(input);

			pe.Open();
			pe.PrintInfo(*out, true);

			if (!pe.IsValidPE())
				retcode = 1;

			*out << L"\n\n";
		}
	}
开发者ID:smarttechnologies,项目名称:peparser,代码行数:32,代码来源:actions.cpp


示例14: DumpSection

	void DumpSection(const po::variables_map& variables, int& retcode)
	{
		retcode = 1;

		if (!variables.count("input"))
		{
			std::wcerr << L"Error parsing options: must have one input file." << std::endl;
			return;
		}

		auto out = OpenOutput<char>(variables);
		if (!out) 
			return;

		retcode = 0;

		auto inputs = variables["input"].as<std::vector<std::wstring>>();

		PEParser pe(inputs[0]);
		pe.Open();

		if (!pe.IsValidPE())
		{
			retcode = 1;
			std::wcerr << L"Invalid PE format." << std::endl;
			return;
		}

		auto sectionName = variables["dump-section"].as<std::wstring>();

		*out << pe.SectionData(sectionName) << std::flush;
	}
开发者ID:smarttechnologies,项目名称:peparser,代码行数:32,代码来源:actions.cpp


示例15: Signature

	void Signature(const po::variables_map& variables, int& retcode)
	{
		auto foo = { 1, 2, 3 };
		foo.size();

		retcode = 1;
		if (!variables.count("input"))
		{
			std::wcerr << L"Error parsing options: must have some input files." << std::endl;
			return;
		}

		auto out = OpenOutput<wchar_t>(variables);
		if (!out) 
			return;

		retcode = 0;

		auto inputs = variables["input"].as<std::vector<std::wstring>>();
		for (auto& input : inputs)
		{
			PEParser pe(input);
			pe.Open();

			if (!pe.IsSigned()) retcode = 1;

			*out << ((pe.IsSigned()) ? L"signed" : L"unsigned") << L" : " << input << std::endl;
		}
	}
开发者ID:smarttechnologies,项目名称:peparser,代码行数:29,代码来源:actions.cpp


示例16: Imports

	void Imports(const po::variables_map& variables, int& retcode)
	{
		retcode = 1;

		if (variables.count("input") != 1)
		{
			std::wcerr << L"Error parsing options: must have one input file." << std::endl;
			return;
		}

		auto out = OpenOutput<wchar_t>(variables);
		if (!out) 
			return;

		retcode = 0;

		auto inputs = variables["input"].as<std::vector<std::wstring>>();

		PEParser pe(inputs[0]);
		pe.Open();

		if (!pe.IsValidPE())
		{
			retcode = 1;
			return;
		}

		auto imports = pe.AllDllImports();

		for (auto& import : imports)
			*out << MultiByteToWideString(import) << L'\n';
	}
开发者ID:smarttechnologies,项目名称:peparser,代码行数:32,代码来源:actions.cpp


示例17: main

int main(int argc, char** argv)
{
	if (argc < 2)
	{
		printf("%s\n", "path to file not define");
		return 1;
	}
	else
		printf("%s\n", argv[1]);

	PEprinter pe(argv[1]);
	if(pe.getState() == 0)
	{
		pe.setFormat(16);

		pe.printAddressOfEntryPoint();
		pe.printImageBase();
		pe.printSections();
		pe.printImportTable();
	}
	else
		pe.printError();

	return 0;
}
开发者ID:devbutch,项目名称:PE-Viewer,代码行数:25,代码来源:main.cpp


示例18: addFile

bool QPixmapIconEngine::read(QDataStream &in)
{
    int num_entries;
    QPixmap pm;
    QString fileName;
    QSize sz;
    uint mode;
    uint state;

    in >> num_entries;
    for (int i=0; i < num_entries; ++i) {
        if (in.atEnd()) {
            pixmaps.clear();
            return false;
        }
        in >> pm;
        in >> fileName;
        in >> sz;
        in >> mode;
        in >> state;
        if (pm.isNull()) {
            addFile(fileName, sz, QIcon::Mode(mode), QIcon::State(state));
        } else {
            QPixmapIconEngineEntry pe(fileName, sz, QIcon::Mode(mode), QIcon::State(state));
            pe.pixmap = pm;
            pixmaps += pe;
        }
    }
    return true;
}
开发者ID:fluxer,项目名称:katie,代码行数:30,代码来源:qicon.cpp


示例19: pes

void pes (Edges &edges)
{
  cerr << "(";
  for (int i = 0; i < edges.size(); ++i)
    pe(edges[i]);
  cerr << ")" << endl;
}
开发者ID:gnishida,项目名称:Geometry3,代码行数:7,代码来源:hull3.C


示例20: throw

Demarc::Port Demarc::pick(const InetAddress &to) const
	throw()
{
	Mutex::Lock _l(_ports_m);
	try {
		std::vector< std::map< Port,DemarcPortObj >::const_iterator > possibilities;
		for(std::map< Port,DemarcPortObj >::const_iterator pe(_ports.begin());pe!=_ports.end();++pe) {
			switch (pe->second.type) {
				case PORT_TYPE_UDP_SOCKET_V4:
					if (to.isV4())
						possibilities.push_back(pe);
					break;
				case PORT_TYPE_UDP_SOCKET_V6:
					if (to.isV6())
						possibilities.push_back(pe);
					break;
				default:
					break;
			}
		}
		if (possibilities.size())
			return possibilities[_r->prng->next32() % possibilities.size()]->first;
		else return NULL_PORT;
	} catch ( ... ) {
		return NULL_PORT;
	}
}
开发者ID:Tania188,项目名称:ZeroTierOne,代码行数:27,代码来源:Demarc.cpp



注:本文中的pe函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ped_exception_throw函数代码示例发布时间:2022-05-30
下一篇:
C++ pdmUnlock函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap