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


C++ ListNext函数代码示例

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


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


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