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

C++ ListNext函数代码示例

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

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



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

示例1: ListElement

WHndlInfo *WFindHndlInfoR( WStringEditInfo *info )
{
    WHndlInfo   *hinfo;
    LIST        *l;

    for( l = WHndlList; l != NULL; l = ListNext( l ) ) {
        hinfo = ListElement( l );
        if( hinfo->info == info ) {
            return( hinfo );
        }
    }

    return( NULL );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:14,代码来源:whndl.c


示例2: WdeIsDialogInList

OBJPTR WdeIsDialogInList( LIST *l )
{
    OBJ_ID  oid;
    OBJPTR  obj;

    for( ; l != NULL; l = ListNext( l ) ) {
        obj = ListElement( l );
        if( Forward( obj, IDENTIFY, &oid, NULL ) && oid == DIALOG_OBJ ) {
            return( obj );
        }
    }

    return( NULL );
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:14,代码来源:wderes.c


示例3: CloseSkins

void CloseSkins( void )
{
    DmOpenRef dbRef;

    if ( NULL == resourceDBList )
        return;

    dbRef = ListFirst( resourceDBList );
    while ( dbRef != NULL ) {
        DmCloseDatabase( dbRef );
        dbRef = ListNext( resourceDBList, dbRef );
    }

    ListDelete( resourceDBList );
}
开发者ID:TimofonicJunkRoom,项目名称:plucker,代码行数:15,代码来源:skins.c


示例4: s_Delete_Object

static void s_Delete_Object(t_FAKE_OBJ *fake_hnd)
{
	ListNode *node = ListHead(&s_object_list);
	
	while( node )
	{
		if( node->item == (void*)fake_hnd )
		{
			free(fake_hnd);
			ListDelNode(&s_object_list, node, 0);
			break;
		}
		node = ListNext(&s_object_list, node);
	}
}
开发者ID:cvsuser-chromium,项目名称:librhino,代码行数:15,代码来源:ipc_yuxing_fake.c


示例5: GetDacChannel

////////////////////////////////////////////////////
// 功能: 检查当前有几个声音通道
// 输入: 
// 输出:
// 返回: 
// 说明: 
////////////////////////////////////////////////////
int GetDacChannel(void)
{
	PLIST head, n;
	int chs;
	// 获取采样数据到临时缓冲区
	kMutexWait(hDacMutex);
	head = &DacList;
	chs = 0;
	for(n=ListFirst(head); n!=head; n=ListNext(n))
	{
		if(++chs == 4)
			break;		// 最多合成4通道
	}
	kMutexRelease(hDacMutex);
	return chs;
}
开发者ID:DanielGit,项目名称:Intrisit201202,代码行数:23,代码来源:DacMux.c


示例6: ChtblLookup

int ChtblLookup(const CHTbl *htbl, void **data)
{
	ListElmt *element = NULL;
	int nBucket = 0;

	nBucket = htbl->hash(*data) % htbl->nBuckets;
	for (element = ListHead(&htbl->table[nBucket]); element != NULL; element = ListNext(element))
	{
		if (htbl->match(*data, ListData(element)))
		{
			*data = ListData(element);
			return 0;
		}
	}
	return -1;
}
开发者ID:developerTUNA,项目名称:Algorithm,代码行数:16,代码来源:chtbl.c


示例7: calculateParentRcv

uint16_t calculateParentRcv(Node_t *node, Tree_t *tree)
{
    List listChildren; memset(&listChildren, 0, sizeof(List)); ListInit(&listChildren);

    Tree_t *subTree = getSubTree(tree, node);
    getListNodesInTree(subTree, &listChildren);

    uint16_t res = 0;
    for (ListElem *elem = ListFirst(&listChildren); elem != NULL; elem = ListNext(&listChildren, elem))
    {
        Node_t *node = (Node_t *)elem->obj;
        res += node->q;
    }

    return (res);
}
开发者ID:pedrohenriquegomes,项目名称:tsch_scheduling_algorithms,代码行数:16,代码来源:modesa.c


示例8: DacGetOwners

////////////////////////////////////////////////////
// 功能: 
// 输入: 
// 输出:
// 返回: 
// 说明: 
////////////////////////////////////////////////////
int DacGetOwners(void)
{
	PLIST head;
	PLIST n;
	int owners;

	// 获取打开设备数量
	kMutexWait(hDacMutex);
	head = &DacList;
	owners = 0;
	for(n=ListFirst(head); n!=head; n=ListNext(n))
		owners++;
	kMutexRelease(hDacMutex);

	return owners;
}
开发者ID:DanielGit,项目名称:Intrisit201202,代码行数:23,代码来源:DacMux.c


示例9: ExtraHTTPHeaders

static int ExtraHTTPHeaders(
	/*! [in] HTTP Request message. */
	http_message_t *Req,
	struct Extra_Headers **ExtraHeaders)
{
	http_header_t *header;
	ListNode *node;
	int index, nb_extra = 0;
	struct Extra_Headers *extra_headers;

	node = ListHead(&Req->headers);
	extra_headers = *ExtraHeaders =
		(struct Extra_Headers*) malloc(MAX_EXTRA_HEADERS * sizeof(struct Extra_Headers));
	if (!extra_headers) {
		return HTTP_INTERNAL_SERVER_ERROR;
	}
	while (node != NULL) {
		header = (http_header_t *) node->item;
		/* find header type. */
		index = map_str_to_int((const char *)header->name.buf,
				header->name.length, Http_Header_Names,
				NUM_HTTP_HEADER_NAMES, FALSE);
		if (index < 0) {
			extra_headers->name = (char *)malloc(header->name.length + 1);
			extra_headers->value = (char *)malloc(header->value.length + 1);
			if (!extra_headers->name || !extra_headers->value) {
				/* cleanup will be made by caller */
				return HTTP_INTERNAL_SERVER_ERROR;
			}
			memcpy(extra_headers->name, header->name.buf, header->name.length);
			memcpy(extra_headers->value, header->value.buf, header->value.length);
			extra_headers->name[header->name.length] = '\0';
			extra_headers->value[header->value.length] = '\0';
			extra_headers->resp = NULL;

			extra_headers++;
			nb_extra++;

			if (nb_extra == MAX_EXTRA_HEADERS - 1) {
				break;
			}
		}
		node = ListNext(&Req->headers, node);
	}
	extra_headers->name = extra_headers->value = extra_headers->resp = NULL;
	return HTTP_OK;
}
开发者ID:philippe44,项目名称:LMS-to-Cast,代码行数:47,代码来源:webserver.c


示例10: MediaSrvDestroyNotify

////////////////////////////////////////////////////
// 功能:
// 输入:
// 输出:
// 返回:
// 说明:
////////////////////////////////////////////////////
int MediaSrvDestroyNotify(void *media)
{
	PLIST head;
	PLIST n;
	PMEDIA_OBJECT obj;
	
//	kMutexWait(hMediaMutex);
	head = &MediaObjList;
	
	// 搜索指定音频任务
	for(n = ListFirst(head); n != head; n = ListNext(n))
	{
		obj = ListEntry(n, MEDIA_OBJECT, Link);
		if(obj->Media == media)
		{
			// 释放当前节点
			kdebug(mod_media, PRINT_INFO, "CLOSE Notify: 0x%x\n", obj->Header.Handle);
			ListRemove(&obj->Link);
			HandleDestroy(obj->Header.Handle, MEDIA_MAGIC);			
			if(obj->MediaInfo)
				kfree(obj->MediaInfo);
			kfree(obj);
			
			// 启动下一个等待任务
			n = ListFirst(head);
			if(n != head)
			{
				obj = ListEntry(n, MEDIA_OBJECT, Link);
				if(obj->Mode == MEDIA_MODE_WAIT)
				{
					if(obj->Cb.MediaOpen(obj->Media) < 0)
					{
						ListRemove(&obj->Link);
						HandleDestroy(obj->Header.Handle, MEDIA_MAGIC);
						if(obj->MediaInfo)
							kfree(obj->MediaInfo);
						kfree(obj);
					}
				}
			}
//			kMutexRelease(hMediaMutex);
			return 0;
		}
	}
//	kMutexRelease(hMediaMutex);
	return -1;	
}
开发者ID:DanielGit,项目名称:Intrisit201202,代码行数:54,代码来源:MediaSrv.c


示例11: ListGetCount

PLISTLINK *ListGetPointers(HSLIST &hList, int &iListCount)
{
	iListCount = ListGetCount(hList);

	PLISTLINK *pPointers = (PLISTLINK *) SysAlloc((iListCount + 1) * sizeof(PLISTLINK));

	if (pPointers != NULL) {
		int i;
		PLISTLINK lpCurr = ListFirst(hList);

		for (i = 0; lpCurr != INVALID_SLIST_PTR; lpCurr = ListNext(hList, lpCurr), i++)
			pPointers[i] = lpCurr;
		pPointers[i] = INVALID_SLIST_PTR;
	}

	return pPointers;
}
开发者ID:linkclau,项目名称:XMail,代码行数:17,代码来源:SList.cpp


示例12: fhssCentralizedBlacklistChan

uint8_t fhssCentralizedBlacklistChan(Node_t *parent, List *blacklist, uint64_t asn)
{
    uint8_t freq = 0;

    for (ListElem *elem = ListFirst(&parent->channels); elem != NULL; elem = ListNext(&parent->channels, elem))
    {
        uint8_t freq_offset = (uint8_t)elem->obj;

        freq = fhssOpenwsnChan(freq_offset, asn);
        if (!ListFind(blacklist, (void *)freq))
        {
            break;
        }
    }

    return (freq);
}
开发者ID:pedrohenriquegomes,项目名称:tsch_scheduling_algorithms,代码行数:17,代码来源:fhss.c


示例13: ListFreeAllButHead

void
ListFreeAllButHead(List *l)
{
	List *p, *next;

	p = ListFirst(l);

	while (p)
	{
	    next = ListNext (p);
	    XtFree((char *) p);
	    p = next;
	}

	l->next = l;
	l->prev = l;
}
开发者ID:Bluerise,项目名称:bitrig-xenocara,代码行数:17,代码来源:list.c


示例14: searchExpired

/*!
 * \brief
 */
static void searchExpired(
	/* [in] . */
	void *arg)
{

	int *id = (int *)arg;
	int handle = -1;
	struct Handle_Info *ctrlpt_info = NULL;

	/* remove search Target from list and call client back */
	ListNode *node = NULL;
	SsdpSearchArg *item;
	Upnp_FunPtr ctrlpt_callback;
	void *cookie = NULL;
	int found = 0;

	HandleLock();

	/* remove search target from search list */
	if (GetClientHandleInfo(&handle, &ctrlpt_info) != HND_CLIENT) {
		free(id);
		HandleUnlock();
		return;
	}
	ctrlpt_callback = ctrlpt_info->Callback;
	node = ListHead(&ctrlpt_info->SsdpSearchList);
	while (node != NULL) {
		item = (SsdpSearchArg *) node->item;
		if (item->timeoutEventId == (*id)) {
			free(item->searchTarget);
			cookie = item->cookie;
			found = 1;
			item->searchTarget = NULL;
			free(item);
			ListDelNode(&ctrlpt_info->SsdpSearchList, node, 0);
			break;
		}
		node = ListNext(&ctrlpt_info->SsdpSearchList, node);
	}
	HandleUnlock();

	if (found)
		ctrlpt_callback(UPNP_DISCOVERY_SEARCH_TIMEOUT, NULL, cookie);

	free(id);
}
开发者ID:Tieske,项目名称:pupnp,代码行数:49,代码来源:ssdp_ctrlpt.c


示例15: WREIsResInfoWinMsg

Bool WREIsResInfoWinMsg( LPMSG pmsg )
{
    WREResInfo *info;
    LIST       *rlist;

    info = NULL;
    for( rlist = WREResList; rlist != NULL; rlist = ListNext( rlist ) ) {
        info = (WREResInfo *)ListElement( rlist );
        if( info->info_win != (HWND)NULL ) {
            if( IsDialogMessage( info->info_win, pmsg ) ) {
                return( TRUE );
            }
        }
    }

    return( FALSE );
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:17,代码来源:wreres.c


示例16: _XtProcessIceMsgProc

static void
_XtProcessIceMsgProc(XtPointer client_data, int *source, XtInputId *id)
{
    IceConn			ice_conn = (IceConn) client_data;
    IceProcessMessagesStatus	status;

    status = IceProcessMessages (ice_conn, NULL, NULL);

    if (status == IceProcessMessagesIOError)
    {
	List *cl;
	int found = 0;

	if (verbose)
	{
	    printf ("IO error on connection (fd = %d)\n",
	        IceConnectionNumber (ice_conn));
	    printf ("\n");
	}

	for (cl = ListFirst (RunningList); cl; cl = ListNext (cl))
	{
	    ClientRec *client = (ClientRec *) cl->thing;

	    if (client->ice_conn == ice_conn)
	    {
		CloseDownClient (client);
		found = 1;
		break;
	    }
	}
	 
	if (!found)
	{
	    /*
	     * The client must have disconnected before it was added
	     * to the session manager's running list (i.e. before the
	     * NewClientProc callback was invoked).
	     */

	    IceSetShutdownNegotiation (ice_conn, False);
	    IceCloseConnection (ice_conn);
	}
    }
}
开发者ID:Bluerise,项目名称:bitrig-xenocara,代码行数:45,代码来源:xtwatch.c


示例17: WREFreeResList

void WREFreeResList( void )
{
    LIST        *rlist;
    WREResInfo  *info;
    HWND        frame;

    if( WREResList != NULL ) {
        frame = WREGetMDIWindowHandle();
        for( rlist = WREResList; rlist != NULL; rlist = ListNext( rlist ) ) {
            info = (WREResInfo *)ListElement( rlist );
            SendMessage( frame, WM_MDIACTIVATE, (WPARAM)info->res_win, 0 );
            WREFreeResInfo( info );
        }
        ListFree( WREResList );
        WREResList = NULL;
        WRENumRes = 0;
    }
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:18,代码来源:wreres.c


示例18: WdeFindObjectsInRect

bool WdeFindObjectsInRect( RECT *r, LIST **obj_list, LIST *olist )
{
    OBJPTR   child;
    RECT     child_rect;
    RECT     irect;

    *obj_list = NULL;

    for( ; olist != NULL; olist = ListNext( olist ) ) {
        child = ListElement( olist );
        Location( child, &child_rect );
        if( IntersectRect( &irect, &child_rect, r ) ) {
            WdeInsertObject( obj_list, child );
        }
    }

    return( *obj_list != NULL );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:18,代码来源:wdezordr.c


示例19: fhssDistributedBlacklistOptimalChan

uint8_t fhssDistributedBlacklistOptimalChan(Node_t *parent, Node_t *child, uint8_t prrMatrix[][MAX_NODES][NUM_CHANNELS], uint64_t asn)
{
    uint8_t best_freq = 0, best_prr = 0;

    for (ListElem *elem = ListFirst(&parent->channels); elem != NULL; elem = ListNext(&parent->channels, elem))
    {
        uint8_t freq_off = (uint8_t)elem->obj;

        uint8_t freq = fhssOpenwsnChan(freq_off, asn);
        if (prrMatrix[child->id][parent->id][freq] > best_prr)
        {
            best_freq = freq;
            best_prr = prrMatrix[child->id][parent->id][freq];
        }
    }

    return (best_freq);
}
开发者ID:pedrohenriquegomes,项目名称:tsch_scheduling_algorithms,代码行数:18,代码来源:fhss.c


示例20: MediaSrvGetCallback

////////////////////////////////////////////////////
// 功能: 根据媒体类型,获取媒体回调函数
// 输入:
// 输出:
// 返回:
// 说明:
////////////////////////////////////////////////////
static int MediaSrvGetCallback(int type, PMEDIA_CALLBACK callback)
{
	PLIST n;
	PLIST head;
	PCALLBACK_LINK link;

	// 检查设备是否已经注册
	head = &MediaCallbackList;
	for(n=ListFirst(head); n!=head; n=ListNext(n))
	{
		link = ListEntry(n, CALLBACK_LINK, Link);
		if((link->Type & type) == type)
		{
			kmemcpy(callback, &link->Callback, sizeof(MEDIA_CALLBACK));
			return 0;
		}
	}
	return -1;
}
开发者ID:DanielGit,项目名称:Intrisit201202,代码行数:26,代码来源:MediaSrv.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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