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

C++ eFatal函数代码示例

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

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



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

示例1: eDebug

eString eHelpWindow::loadHelpText(int helpIDtoLoad)
{
	FILE *in=fopen(TUXBOXDATADIR "/enigma/resources/help.xml", "rt");
	if (!in)
	{
		eDebug("cannot open help.xml");
		return "";
	}

	XMLTreeParser *parser=new XMLTreeParser("ISO-8859-1");
	char buf[2048];
	
	int done;
	do
	{
		unsigned int len=fread(buf, 1, sizeof(buf), in);
		done=len<sizeof(buf);
		if (!parser->Parse(buf, len, done))
		{
			eFatal("parse error: %s at line %d", parser->ErrorString(parser->GetErrorCode()), parser->GetCurrentLineNumber());
			fclose(in);
			delete parser;
			return "";
		}
	} while (!done);
	fclose(in);

	XMLTreeNode *root=parser->RootNode();
	if (!root)
		return "";
	if (strcmp(root->GetType(), "enigmahelp"))
	{
		eFatal("not a enigma help file.");
		return "";
	}
	
	XMLTreeNode *node=parser->RootNode();
	
	for (node=node->GetChild(); node; node=node->GetNext())
		if (!strcmp(node->GetType(), "help"))
		{
			for (XMLTreeNode *xam=node->GetChild(); xam; xam=xam->GetNext())
				if (!strcmp(xam->GetType(), "helptext"))
				{
					if (helpIDtoLoad==atoi(xam->GetAttributeValue("id")))
					{
						const char *helptext=xam->GetAttributeValue("text");
						eString ht(helptext);
						delete parser;
						return ht;
					}
				}
		}

	delete parser;
	return "";
}
开发者ID:ChakaZulu,项目名称:tuxbox_apps,代码行数:57,代码来源:helpwindow.cpp


示例2: eFilePushThreadRecorder

eDVBRecordFileThread::eDVBRecordFileThread(int packetsize, int bufferCount):
	eFilePushThreadRecorder(
		/* buffer */ (unsigned char*) ::mmap(NULL, bufferCount * packetsize * 1024, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, /*ignored*/-1, 0),
		/*buffersize*/ packetsize * 1024),
	 m_ts_parser(packetsize),
	 m_current_offset(0),
	 m_fd_dest(-1),
	 m_aio(bufferCount),
	 m_current_buffer(m_aio.begin()),
	 m_buffer_use_histogram(bufferCount+1, 0)
{
	if (m_buffer == MAP_FAILED)
		eFatal("Failed to allocate filepush buffer, contact MiLo\n");
	// m_buffer actually points to a data block large enough to hold ALL buffers. m_buffer will
	// move around during writes, so we must remember where the "head" is.
	m_allocated_buffer = m_buffer;
	// m_buffersize is thus the size of a single buffer in the queue
	// Initialize the buffer pointers
	int index = 0;
	for (AsyncIOvector::iterator it = m_aio.begin(); it != m_aio.end(); ++it)
	{
		it->buffer = m_allocated_buffer + (index * m_buffersize);
		++index;
	}
}
开发者ID:pizzelnet,项目名称:enigma2-1,代码行数:25,代码来源:demux.cpp


示例3: rp

gRC::gRC(): rp(0), wp(0)
#ifdef SYNC_PAINT
,m_notify_pump(eApp, 0)
#else
,m_notify_pump(eApp, 1)
#endif
,m_spinner_enabled(0), m_spinneronoff(1), m_prev_idle_count(0)
{
	ASSERT(!instance);
	instance=this;
	CONNECT(m_notify_pump.recv_msg, gRC::recv_notify);
#ifndef SYNC_PAINT
	pthread_mutex_init(&mutex, 0);
	pthread_cond_init(&cond, 0);
	pthread_attr_t attr;
	pthread_attr_init(&attr);
	if (pthread_attr_setstacksize(&attr, 2048*1024) != 0)
		eDebug("[gRC] pthread_attr_setstacksize failed");
	int res = pthread_create(&the_thread, &attr, thread_wrapper, this);
	pthread_attr_destroy(&attr);
	if (res)
		eFatal("RC thread couldn't be created");
	else
		eDebug("RC thread created successfully");
#endif
}
开发者ID:Adga52,项目名称:enigma2,代码行数:26,代码来源:grc.cpp


示例4: eDebugNoNewLine

std::string fontRenderClass::AddFont(const std::string &filename, const std::string &name, int scale, int renderflags)
{
	eDebugNoNewLine("[FONT] adding font %s...", filename.c_str());
	fflush(stdout);
	int error;
	fontListEntry *n=new fontListEntry;

	n->scale=scale;
	FT_Face face;
	singleLock s(ftlock);

	if ((error=FT_New_Face(library, filename.c_str(), 0, &face)))
		eFatal(" failed: %s", strerror(error));

	n->filename=filename;
	n->face=name;
	n->renderflags=renderflags;
	FT_Done_Face(face);

	n->next=font;
	eDebug("OK (%s)", n->face.c_str());
	font=n;

	return n->face;
}
开发者ID:Anubisko,项目名称:enigma2,代码行数:25,代码来源:font.cpp


示例5: eFatal

gFBDC::gFBDC()
{
	fb=new fbClass;

	if (!fb->Available())
		eFatal("[gFBDC] no framebuffer available");

	int xres;
	int yres;
	int bpp;
	fb->getMode(xres, yres, bpp);

	/* we can only use one of these three modes: */
	if (!((xres == 720 && yres == 576)
		|| (xres == 1280 && yres == 720)
		|| (xres == 1920 && yres == 1080)))
	{
		/* fallback to a decent default */
		xres = 720;
		yres = 576;
	}

	surface.clut.data = 0;
	setResolution(xres, yres); // default res

	reloadSettings();
}
开发者ID:kingvuplus,项目名称:ME,代码行数:27,代码来源:gfbdc.cpp


示例6: eFatal

void gFBDC::init_gFBDC()
{
	instance=this;
	fb=new fbClass;

	if (!fb->Available())
		eFatal("no framebuffer available");

	fb->SetMode(720, 576, 8);

	for (int y=0; y<576; y++)																		 // make whole screen transparent
		memset(fb->lfb+y*fb->Stride(), 0x00, fb->Stride());

	pixmap=new gPixmap();
	pixmap->x=720;
	pixmap->y=576;
	pixmap->bpp=8;
	pixmap->bypp=1;
	pixmap->stride=fb->Stride();
	pixmap->data=fb->lfb;
	
	pixmap->clut.colors=256;
	pixmap->clut.data=new gRGB[pixmap->clut.colors];
	memset(pixmap->clut.data, 0, sizeof(*pixmap->clut.data)*pixmap->clut.colors);
	reloadSettings();
}
开发者ID:ChakaZulu,项目名称:my_tuxbox_apps,代码行数:26,代码来源:gfbdc.cpp


示例7: eServiceHandler

eServicePlaylistHandler::eServicePlaylistHandler(): eServiceHandler(ID)
{
        //eDebug("[eServicePLaylistHandler] registering serviceInterface %d", id);
	if (eServiceInterface::getInstance()->registerHandler(id, this)<0)
		eFatal("couldn't register serviceHandler %d", id);
	CONNECT(eServiceFileHandler::getInstance()->fileHandlers, eServicePlaylistHandler::addFile);
	instance=this;
}
开发者ID:GWARDAR,项目名称:OpenPLi-1,代码行数:8,代码来源:serviceplaylist.cpp


示例8: eFatal

void enigmaVCR::init_enigmaVCR()
{
	if ( !instance )
		instance = this;
	else
		eFatal("create more than one enigmaVCR instances");
	addActionMap(&i_enigmaVCRActions->map);
}
开发者ID:ChakaZulu,项目名称:my_tuxbox_apps,代码行数:8,代码来源:enigma_vcr.cpp


示例9: eProgress

void eEventDisplay::init_eEventDisplay(const ePtrList<EITEvent>* e)
{
	eventlist=0;
	events=0;

	scrollbar = new eProgress(this);
	scrollbar->setName("scrollbar");
	scrollbar->setStart(0);
	scrollbar->setPerc(100);

	descr = new eWidget(this);
	descr->setName("epg_description");

	eventTime = new eLabel(this);
	eventTime->setName("time");

	eventDate = new eLabel(this);
	eventDate->setName("date");

	channel = new eLabel(this);
	channel->setName("channel");

	timer_icon = new eLabel(this);
	timer_icon->setName("timer_icon");

	eSkin *skin=eSkin::getActive();
	if (skin->build(this, "eventview"))
		eFatal("skin load of \"eventview\" failed");

	long_description=new eLabel(descr);
	long_description->setFlags(RS_WRAP);

	// try to recalc long description label... ( no broken text lines.. )
	float lineheight=fontRenderClass::getInstance()->getLineHeight( long_description->getFont() );
	int lines = (int)(descr->getSize().height() / lineheight);
	pageHeight = (int)(lines * lineheight);
	descr->resize( eSize( descr->getSize().width(), pageHeight+(int)(lineheight/6)));
	long_description->resize(eSize(descr->getSize().width(), pageHeight*16));

#ifndef DISABLE_FILE
	addActionToHelpList( &i_epgSelectorActions->addDVRTimerEvent );
#endif
#ifndef DISABLE_NETWORK
	addActionToHelpList( &i_epgSelectorActions->addNGRABTimerEvent );
#endif
	addActionToHelpList( &i_epgSelectorActions->addSwitchTimerEvent );
	addActionToHelpList( &i_epgSelectorActions->removeTimerEvent );
	addActionToHelpList( &i_enigmaEventViewActions->close );

	if (e)
		setList(*e);
	else if (evt)
		setEvent(evt);
	addActionMap( &i_enigmaEventViewActions->map );
	addActionMap( &i_epgSelectorActions->map );
	
	setHelpID(11);
}
开发者ID:ChakaZulu,项目名称:my_tuxbox_apps,代码行数:58,代码来源:enigma_event.cpp


示例10: eFatal

eServiceHandlerDVB::~eServiceHandlerDVB()
{
#ifndef DISABLE_FILE
	if (recording)
		eDVB::getInstance()->recEnd();
#endif
	if (eServiceInterface::getInstance()->unregisterHandler(id)<0)
		eFatal("couldn't unregister serviceHandler %d", id);
}
开发者ID:UkCvs,项目名称:commando,代码行数:9,代码来源:servicedvb.cpp


示例11: gRGB

gRGB gDC::getRGB(gColor col)
{
	if ((!m_pixmap) || (!m_pixmap->surface->clut.data))
		return gRGB(col, col, col);
	if (col<0)
	{
		eFatal("bla transp");
		return gRGB(0, 0, 0, 0xFF);
	}
	return m_pixmap->surface->clut.data[col];
}
开发者ID:Adga52,项目名称:enigma2,代码行数:11,代码来源:grc.cpp


示例12: eServiceHandler

eServiceHandlerExternal::eServiceHandlerExternal(): eServiceHandler(0x0fff)
{
	if (eServiceInterface::getInstance()->registerHandler(id, this) < 0)
	{
		eFatal("couldn't register eServiceHandlerExternal %d", id);
	}
	instance = this;
	CONNECT(eServiceFileHandler::getInstance()->fileHandlers, eServiceHandlerExternal::addFile);
	CONNECT(eServiceFileHandler::getInstance()->directoryHandlers, eServiceHandlerExternal::addDirectory);
	eDebug("eServiceHandlerExternal registered");
}
开发者ID:ChakaZulu,项目名称:my_tuxbox_apps,代码行数:11,代码来源:serviceexternal.cpp


示例13: eFatal

gFBDC::gFBDC()
{
	fb=new fbClass;

	if (!fb->Available())
		eFatal("no framebuffer available");

	surface.clut.data = 0;
	setResolution(1280, 720); // default res
	reloadSettings();
}
开发者ID:st7TEAM,项目名称:bh-gui,代码行数:11,代码来源:gfbdc.cpp


示例14: while

void eHTTPStream::haveData(void *vdata, int len)
{
	__u8 *data=(__u8*)vdata;
	
	while (len)
	{
		int valid=len;
		if (!metadataleft)
		{
				// not in metadata mode.. process mp3 data (stream to input buffer)

				// are we just at the beginning of metadata? (pointer)
			if (metadatainterval && (metadatainterval == bytes))
			{
						// enable metadata mode
				metadataleft=*data++*16;
				metadatapointer=0;
				len--;
				bytes=0;
				continue;
			} else if (metadatainterval && (metadatainterval < bytes))
				eFatal("metadatainterval < bytes");

				// otherwise there's really data.
			if (metadatainterval)
			{
					// is metadata in our buffer?
				if ((valid + bytes) > metadatainterval)
					valid=metadatainterval-bytes;
			}
			buffer.write(data, valid);
			data+=valid;
			len-=valid;
			bytes+=valid;
		} else
		{
				// metadata ... process it.
			int meta=len;
			if (meta > metadataleft)
				meta=metadataleft;

			memcpy(metadata+metadatapointer, data, meta);

			metadatapointer+=meta;
			data+=meta;
			len-=meta;
			metadataleft-=meta;
			
			if (!metadataleft)
				processMetaData();
		}
	}
	dataAvailable();
}
开发者ID:TitanNit,项目名称:tdt,代码行数:54,代码来源:servicemp3.cpp


示例15: eFatal

void gFBDC::init_gFBDC()
{
	instance=this;
	fb=new fbClass;

	if (!fb->Available())
		eFatal("no framebuffer available");

	colorDepth = 8;
	pixmap = NULL;
	setMode();
}
开发者ID:GWARDAR,项目名称:OpenPLi-1,代码行数:12,代码来源:gfbdc.cpp


示例16: Py_DECREF

void eActionMap::unbindAction(const std::string &context, ePyObject function)
{
	//eDebug("[eActionMap] unbind function from %s", context.c_str());
	for (std::multimap<long long int, eActionBinding>::iterator i(m_bindings.begin()); i != m_bindings.end(); ++i)
		if (i->second.m_fnc && (PyObject_Compare(i->second.m_fnc, function) == 0))
		{
			Py_DECREF(i->second.m_fnc);
			m_bindings.erase(i);
			return;
		}
	eFatal("[eActionMap] unbindAction with illegal python reference");
}
开发者ID:mrnamingo,项目名称:vix4-34-enigma2-arm,代码行数:12,代码来源:action.cpp


示例17: eFatal

int eThread::sync(void)
{
	int res;
	int debug_val_before = m_state.value();
	m_state.down(); /* this might block */
	res = m_alive;
	if (m_state.value() != 0)
		eFatal("eThread::sync: m_state.value() == %d - was %d before", m_state.value(), debug_val_before);
	ASSERT(m_state.value() == 0);
	m_state.up();
	return res; /* 0: thread is guaranteed not to run. 1: state unknown. */
}
开发者ID:1198s,项目名称:enigma2,代码行数:12,代码来源:thread.cpp


示例18: eFatal

gFBDC::gFBDC()
{
	instance=this;
	fb=new fbClass;

	if (!fb->Available())
		eFatal("no framebuffer available");

	surface.clut.data = 0;
	setResolution(720, 576); // default res

	reloadSettings();
}
开发者ID:FFTEAM,项目名称:evolux-spark-sh4,代码行数:13,代码来源:gfbdc.cpp


示例19: i

void eMainloop::removeSocketNotifier(eSocketNotifier *sn)
{
	int fd = sn->getFD();
	std::map<int,eSocketNotifier*>::iterator i(notifiers.find(fd));
	if (i != notifiers.end())
	{
		notifiers.erase(i);
		return;
	}
	for (i = notifiers.begin(); i != notifiers.end(); ++i)
		eDebug("[eMainloop::removeSocketNotifier] fd=%d, sn=%p", i->second->getFD(), (void*)i->second);
	eFatal("[eMainloop::removeSocketNotifier] removed socket notifier which is not present, fd=%d", fd);
}
开发者ID:MCelliotG,项目名称:enigma2-2,代码行数:13,代码来源:ebase.cpp


示例20: addActionMap

void eTransponderEditWindow::init_eTransponderEditWindow()
{
    addActionMap(&i_TransponderEditWindowActions->map);
    sat = new eButton(this);
    sat->setName("sat");
    CONNECT(sat->selected, eTransponderEditWindow::satPressed);
    add = new eButton(this);
    add->setName("add");
    CONNECT(add->selected, eTransponderEditWindow::addPressed);
    edit = new eButton(this);
    edit->setName("edit");
    CONNECT(edit->selected, eTransponderEditWindow::editPressed);
    remove = new eButton(this);
    remove->setName("remove");
    CONNECT(remove->selected, eTransponderEditWindow::removePressed);
    satellites = new eListBox<eListBoxEntryText>( this, 0, 0 );
    satellites->setName("satlist");
    transponders = new eListBox<eListBoxEntryTransponder>( this, 0, 0 );
    transponders->setName("transponderlist");
    transponders->FakeFocus( 0 );
    satellites->FakeFocus( 1 );
    if ( eSkin::getActive()->build( this, "TransponderWindow") )
        eFatal("eTransponderEditWindow build failed");

    eDVBServiceController *sapi=eDVB::getInstance()->getServiceAPI();
    eTransponder *tp=0;

    if (sapi && sapi->transponder)
        tp = sapi->transponder;

    eListBoxEntryText *sel=0;

    if( !eTransponderList::getInstance()->reloadNetworks() )
    {
        for ( std::list<tpPacket>::iterator i(eTransponderList::getInstance()->getNetworks().begin()); i != eTransponderList::getInstance()->getNetworks().end(); ++i)
            if ( tp && i->orbital_position == tp->satellite.orbital_position )
                sel = new eListBoxEntryText(satellites, i->name, (void*) &(*i));
            else
                new eListBoxEntryText(satellites, i->name, (void*) &(*i));
    }
    CONNECT(satellites->selchanged, eTransponderEditWindow::satSelChanged );

    if ( sel )
        satellites->setCurrent(sel);
    else
        satellites->setCurrent(0);

    CONNECT( eWidget::focusChanged, eTransponderEditWindow::focusChanged );
    satSelChanged( satellites->getCurrent() );
    setHelpID(64);
}
开发者ID:backtrack2016,项目名称:tdt,代码行数:51,代码来源:tpeditwindow.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ eSize函数代码示例发布时间:2022-05-30
下一篇:
C++ eDebug函数代码示例发布时间: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