library/src/utility/BP-StringUtilities.cc
// Attempts to create a tab buffer at tab_depth length.  If store_in_linkl is used, the buffer
// will be created via the linkl.  If not, it will be created using bpcalloc, and will thus need
// to be free'd.
Attempts to create a tab buffer at tab_depth length.  If store_in_linkl is used, the buffer
will be created via the linkl.  If not, it will be created using bpcalloc, and will thus need
to be free'd.
Attempts to create a tab buffer at tab_depth length . If store_in_linkl is used the buffer will be created via the linkl . If not it will be created using bpcalloc and will thus need to be free ' d .
char * BP_CreateTabBuffer(size_t tab_depth, P_BP_LINKL store_in_linkl)
{
	if(tab_depth == 0)
		return NULL;
	char * ret_buff = (char *) NULL;
	char tab_buff[tab_depth+1];
	BP_ZERO_STACK(tab_buff);
	memset((char *) &tab_buff, '\t', tab_depth);
	if(store_in_linkl)
	{
		ret_buff = tq_strdup(store_in_linkl, (char *) &tab_buff, BPLN);
		return ret_buff;
	}
	ret_buff = (char *) bpstrdup((char *) &tab_buff);
	return ret_buff;
}
char * BP_CreateTabBuffer ( size_t tab_depth , P_BP_LINKL store_in_linkl ) { if ( tab_depth == 0 ) return NULL ; char * ret_buff = ( char * ) NULL ; char tab_buff [ tab_depth + 1 ] ; BP_ZERO_STACK ( tab_buff ) ; memset ( ( char * ) & tab_buff , ' \t ' , tab_depth ) ; if ( store_in_linkl ) { ret_buff = tq_strdup ( store_in_linkl , ( char * ) & tab_buff , BPLN ) ; return ret_buff ; } ret_buff = ( char * ) bpstrdup ( ( char * ) & tab_buff ) ; return ret_buff ; }
Attempts to create a tab buffer at tab_depth length.
Attempts to create a tab buffer at tab_depth length .
// tab depth must be non-zero // set return buff // create tab buff // fill in tabs // store in the linked list // duplicate in linkl if set // set the return buffer