library/src/datastructures/BP-LinkedList.cc
// unique version of strdup (only will dupe a string if it doesn't already
// exist in the linkl.
unique version of strdup (only will dupe a string if it doesn't already
exist in the linkl.
unique version of strdup ( only will dupe a string if it doesn ' t already exist in the linkl .
char * tq_strdup_unique (P_BP_LINKL head, char *dup, BPLN_PARMS)
{
	if(!head)
		return NULL;
	if(!dup)
		return NULL;
	size_t dup_len = bpstrlen(dup);
	char * search_str = BP_LinkLSearchForString(head, dup, dup_len);
	if(search_str)
		return NULL;
	return tq_strdup(head, dup, BPLN);
}
char * tq_strdup_unique ( P_BP_LINKL head , char * dup , BPLN_PARMS ) { if ( ! head ) return NULL ; if ( ! dup ) return NULL ; size_t dup_len = bpstrlen ( dup ) ; char * search_str = BP_LinkLSearchForString ( head , dup , dup_len ) ; if ( search_str ) return NULL ; return tq_strdup ( head , dup , BPLN ) ; }
unique version of strdup (only will dupe a string if it doesn't already
exist in the linkl.
unique version of strdup ( 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 // calculate duplicate length // attempt to lookup the string // if we found the string in the list, return null // run actual strdup now