library/src/datastructures/BP-LinkedList.cc
// unique version of strndup (only will dupe a string if it doesn't already
// exist in the linkl.
unique version of strndup (only will dupe a string if it doesn't already
exist in the linkl.
unique version of strndup ( only will dupe a string if it doesn ' t already exist in the linkl .
char * tq_strndup_unique(P_BP_LINKL head, char *dup, size_t n, BPLN_PARMS)
{
	if(!head)
		return NULL;
	if(!dup)
		return NULL;
	if(!n)
		return NULL;
	char * search_str = BP_LinkLSearchForString(head, dup, n);
	if(search_str)
		return NULL;
	return tq_strndup(head, dup, n, BPLN);
}
char * tq_strndup_unique ( P_BP_LINKL head , char * dup , size_t n , BPLN_PARMS ) { if ( ! head ) return NULL ; if ( ! dup ) return NULL ; if ( ! n ) return NULL ; char * search_str = BP_LinkLSearchForString ( head , dup , n ) ; if ( search_str ) return NULL ; return tq_strndup ( head , dup , n , BPLN ) ; }
unique version of strndup (only will dupe a string if it doesn't already
exist in the linkl.
unique version of strndup ( only will dupe a string if it doesn ' t already exist in the linkl .
// ensure we have a head and a dup // ensure we have a string to duplicate // ensure we have a length for the string we're duplicating // attempt to lookup the string // if we found the string in the list, return null // run actual strndup now