当前位置: 首页>>代码示例>>C++>>正文


C++ DEB函数代码示例

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


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

示例1: MyNPN_SetValue

static
NPError MyNPN_SetValue(NPP instance, NPPVariable variable,
               void *value)
{
	NPError ret;
	DEB(ef, "-> NPN_SetValue( %x, %d, 0x%x)\n", instance, variable, value);	

	ret = gNetscapeFuncs.setvalue( instance, variable, value );		
	DEB(ef, "<- NPN_SetValue = %d\n", ret);
	return ret;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例2: NP_GetValue

NPError NP_GetValue(void *future, NPPVariable variable, void *value)
{
	NPError err;
	LoadPlugin();	
	if ( !gLib ) return NPERR_GENERIC_ERROR;
	DEB(ef, "-> NP_GetValue( %x, %d, %x )\n", future, variable, value );

	err = gNP_GetValue( future, variable, value );
	DEB(ef, "<- NP_GetValue = %d\n", err );
	return err;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例3: MyNPN_Write

static
int32 MyNPN_Write(NPP instance, NPStream* stream, int32 len,
              void* buffer)
{
	int32 ret;	
	DEB(ef, "-> NPN_Write( %x, 0x%x, %d, 0x%x )\n", instance, stream, len, buffer);	
	
	ret = gNetscapeFuncs.write( instance, stream, len, buffer );		
	DEB(ef, "<- NPN_Write = %d\n", ret);
	return ret;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例4: MyNPN_DestroyStream

static
NPError MyNPN_DestroyStream(NPP instance, NPStream* stream,
                  NPReason reason)
{
	NPError err;	
	DEB(ef, "-> NPN_DestroyStream( %x, 0x%x, %d )\n", instance, stream, reason);	
	
	err = gNetscapeFuncs.destroystream( instance, stream, reason );		
	DEB(ef, "<- NPN_DestroyStream = %d\n", err);
	return err;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例5: MyNPP_Write

static
int32 MyNPP_Write(NPP instance, NPStream* stream, int32 offset,
                  int32 len, void* buffer)
{
	int32 ret;	
	DEB(ef, "-> NPP_Write( %x, 0x%x, %d, %d, 0x%x )\n", instance, stream, offset, len, buffer);	
	
	ret = gPluginFuncs.write( instance, stream, offset, len, buffer );		
	DEB(ef, "<- NPP_Write = %d\n", ret);
	return ret;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例6: MyNPN_NewStream

static
NPError MyNPN_NewStream(NPP instance, NPMIMEType type,
                const char* target, NPStream** stream)
{
	NPError err;	
	DEB(ef, "-> NPN_NewStream( %x, %s, %s, 0x%x )\n", instance, type, target, stream);
	
	err = gNetscapeFuncs.newstream( instance, type, target, stream );		
	DEB(ef, "<- NPN_NewStream = %d\n", err);
	return err;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例7: MyNPN_GetURL

static
NPError MyNPN_GetURL(NPP instance, const char* url,
               const char* target)
{
	NPError err;	
	DEB(ef, "-> NPN_GetURL( %x, %s, %s )\n", instance, url, target );	
	
	err = gNetscapeFuncs.geturl( instance, url, target );		
	DEB(ef, "<- NPN_GetURL = %d\n", err);
	return err;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例8: MyNPN_GetURLNotify

static
NPError MyNPN_GetURLNotify(NPP instance, const char* url,
                 const char* target, void* notifyData)
{
	NPError err;	
	DEB(ef, "-> NPN_GetURLNotify( %x, %s, %s, 0x%x )\n", instance, url, target, notifyData);	
	
	err = gNetscapeFuncs.geturlnotify( instance, url, target, notifyData );		
	DEB(ef, "<- NPN_GetURLNotify = %d\n", err);
	return err;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例9: NP_Shutdown

NPError NP_Shutdown(void)
{
	NPError err;
	LoadPlugin();	
	if ( !gLib ) return NPERR_GENERIC_ERROR;	
	DEB(ef, "-> NP_Shutdown()\n" );
	
	err = gNP_Shutdown( );
	DEB(ef, "<- NP_Shutdown = %d\n", err );
	return err;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例10: MyNPN_PostURL

static
NPError MyNPN_PostURL(NPP instance, const char* url,
              const char* target, uint32 len,
              const char* buf, NPBool file)
{
	NPError err;	
	DEB(ef, "-> NPN_PostURL( %x, %s, %s, %d, 0x%x, %d )\n", instance, url, target, len, buf, file );	
	
	err = gNetscapeFuncs.posturl( instance, url, target, len, buf, file  );		
	DEB(ef, "<- NPN_PostURL = %d\n", err);
	return err;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:12,代码来源:wrapper.c

示例11: virt_readlink

asmlinkage int virt_readlink(const char *filename, char *buf, int bufsiz)
{
	int ret;
	mm_segment_t old_fs;
	char *newfilename;
	char *locbuf;
	int len;
	
	if(!cwd_virtual()) {
		ret = (*orig_readlink)(filename, buf, bufsiz);
		if(ret != -ENOENT) 
			return ret;
	}
	else 
		ret = 0;

	newfilename = resolve_name(filename, 1, 0);
	if(!newfilename) {
		if(ret)
			return ret;
		else
			return (*orig_readlink)(filename, buf, bufsiz);
	}
	if(IS_ERR(newfilename))
		return PTR_ERR(newfilename);

	DEB((KERN_INFO "READLINK: trying '%s'\n", newfilename));

	/* bufsiz is legal (already checked by sys_readlink) */
	len = bufsiz;
	if(bufsiz > PAGE_SIZE)
		len = PAGE_SIZE;
			
	locbuf = (char *) __get_free_page(GFP_USER);
			
	ret = -ENOMEM;
	if(locbuf) {
		old_fs = get_fs();
		set_fs(get_ds());
		ret =  (*orig_readlink)(newfilename, locbuf, len);
		set_fs(old_fs);

		if(ret >= 0)
			if(copy_to_user(buf, locbuf, len))
				ret = -EFAULT;
		free_page((unsigned long) locbuf);
	}
	kfree(newfilename);

	DEB((KERN_INFO "READLINK: result %i\n", ret));
	
	return ret;
}
开发者ID:lb1a,项目名称:avfs,代码行数:53,代码来源:redir.c

示例12: LoadPlugin

char *NP_GetMIMEDescription(void)
{
	char * ret;
	
	LoadPlugin();
	if ( !gLib ) return NULL;	
	DEB(ef, "-> NP_GetMIMEDescription()\n" );
	
	ret = gNP_GetMIMEDescription();
	DEB(ef, "<- NP_GetMIMEDescription = %s\n", ret );
	return ret;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:12,代码来源:wrapper.c

示例13: event_handler

void *
/*ARGSUSED*/
event_handler(void *par)
{
	iscsi_wait_event_parameters_t evtp;
	int rc;

	DEB(99, ("Event handler starts\n"));
	(void) memset(&evtp, 0x0, sizeof(evtp));

	evtp.event_id = event_reg.event_id;

	do {
		if (nothreads)
			rc = ioctl(driver, ISCSI_POLL_EVENT, &evtp);
		else
			rc = ioctl(driver, ISCSI_WAIT_EVENT, &evtp);

		if (rc != 0) {
			perror("ioctl");
			break;
		}

		DEB(1, ("Got Event: kind %d, status %d, sid %d, cid %d, reason %d\n",
				evtp.event_kind, evtp.status, evtp.session_id,
				evtp.connection_id, evtp.reason));

		if (evtp.status)
			break;

		switch (evtp.event_kind) {
		case ISCSI_SESSION_TERMINATED:
			event_kill_session(evtp.session_id);
			break;

		case ISCSI_CONNECTION_TERMINATED:
			event_kill_connection(evtp.session_id, evtp.connection_id);
			break;

		case ISCSI_RECOVER_CONNECTION:
			event_recover_connection(evtp.session_id, evtp.connection_id);
			break;

		default:
			break;
		}
	} while (evtp.event_kind != ISCSI_DRIVER_TERMINATING);

	if (nothreads && evtp.event_kind == ISCSI_DRIVER_TERMINATING)
		exit_daemon();

	return NULL;
}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:53,代码来源:iscsid_driverif.c

示例14: out_scan_aso

static int out_scan_aso(s_outbound_callback_data *callback,
		const s_falist *mailfor, const char *path)
{
	DIR *dir;
	struct dirent *dirent;
	const s_falist *alst;
	s_faddr addr = { FALSE, 0, 0, 0, 0, "" };
#ifdef DEBUG
	char abuf[BF_MAXADDRSTR+1];
#endif
		
	ASSERT(callback);
	ASSERT(callback->dest);
	ASSERT(path);

	DEB((D_OUTBOUND, "out_scandir_aso: scan dir \"%s\"", path));
	
	if( (dir = opendir(path)) == NULL )
	{
		logerr("can't open outbound directory \"%s\"", path);
		return -1;
	}
	
	while( (dirent = readdir(dir)) )
	{
		memset(&addr, '\0', sizeof(s_faddr));
		
		if( out_parse_name_aso(&addr, dirent->d_name) == 0 )
		{
			DEB((D_OUTBOUND, "out_scandir_aso: file \"%s\" for address %s",
				dirent->d_name, ftn_addrstr(abuf, addr)));

			for( alst = mailfor; alst && ftn_addrcomp(addr, alst->addr);
			     alst = alst->next );
			
			if( alst || !mailfor )
			{
				callback->path = string_concat(path, dirent->d_name, NULL);
				callback->addr = addr;
				callback->type = OUTB_TYPE_ASO;
				callback->flavor = -1;
				callback->callback(callback);
				if( callback->path )
					free(callback->path);
			}
		}
	}
	
	closedir(dir);
	
	return 0;
}
开发者ID:askovpen,项目名称:binkleyforce,代码行数:52,代码来源:outb_scan.c

示例15: DEB

void Heap::expandNew() {
  DEB("Expanding new from");
  DEB(newSize);
  std::pair<Instance*,int> * newEden = new std::pair<Instance*,int>[2*newSize];
  std::pair<Instance*,int> * newSurvivor = new std::pair<Instance*,int>[2*newSize];
  for(int i = 0; i < newSize; ++i) newEden[i] = eden[i];
  for(int i = newSize; i < 2*newSize; ++i) newEden[i].first = NULL;
  newSize *= 2;
  delete [] eden;
  delete [] survivor;
  eden = newEden;
  survivor = newSurvivor;
}
开发者ID:polivmi1,项目名称:MI-RUN,代码行数:13,代码来源:Heap.C


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