library/src/blockclass/BP-BlockClass.cc
// Gets a thread number from the list by comparing strings to
// the list of thread descriptions.
Gets a thread number from the list by comparing strings to
the list of thread descriptions.
Gets a thread number from the list by comparing strings to the list of thread descriptions .
int Block::GetThreadByDescription(char *desc, int cmpLen)
{
	int i = 0;
	if (threads == NULL)
		return -1;
	P_THREAD_LIST threadFirst = threads->first;
	for
	(
		threads = threads->first;
		threads != NULL;
		threads = threads->next
	)
	{
		if (threads->threadDescription != NULL)
		{
			if (memcmp(threads->threadDescription, desc, cmpLen) == 0)
			{
				threads = threadFirst;
				return i;
			}
		}
		i++;
	}
	threads = threadFirst;
	return -1;
}
int Block :: GetThreadByDescription ( char * desc , int cmpLen ) { int i = 0 ; if ( threads == NULL ) return -1 ; P_THREAD_LIST threadFirst = threads -> first ; for ( threads = threads -> first ; threads != NULL ; threads = threads -> next ) { if ( threads -> threadDescription != NULL ) { if ( memcmp ( threads -> threadDescription , desc , cmpLen ) == 0 ) { threads = threadFirst ; return i ; } } i ++ ; } threads = threadFirst ; return -1 ; }
Gets a thread number from the list by comparing strings to
the list of thread descriptions.
Gets a thread number from the list by comparing strings to the list of thread descriptions .
// return the thread number // could not locate a suitable match