library/src/decoders/HTML/BP-HTMLDecoder.cc
// Gets a anchor var by name
Gets a anchor var by name
Gets a anchor var by name
P_BP_HTML_ANCHOR_VAR_LIST HTMLGetAnchorVarByNameI(P_BP_HTML_ANCHOR_VAR_LIST vars, char *name)
{
	if(!vars || !name)
		return NULL;
	size_t name_len = bpstrlen(name);
	if(!name_len)
		return NULL;
	size_t current_var_name_len = 0;
	for(vars = vars->first; vars; vars = vars->next)
	{
		if(!vars->name)
			continue;
		current_var_name_len = bpstrlen(vars->name);
		if(current_var_name_len != name_len)
			continue;
		if(BP_strncasecmp(name, vars->name, current_var_name_len) == 0)
			return vars;
	}
	return NULL;
}
P_BP_HTML_ANCHOR_VAR_LIST HTMLGetAnchorVarByNameI ( P_BP_HTML_ANCHOR_VAR_LIST vars , char * name ) { if ( ! vars || ! name ) return NULL ; size_t name_len = bpstrlen ( name ) ; if ( ! name_len ) return NULL ; size_t current_var_name_len = 0 ; for ( vars = vars -> first ; vars ; vars = vars -> next ) { if ( ! vars -> name ) continue ; current_var_name_len = bpstrlen ( vars -> name ) ; if ( current_var_name_len != name_len ) continue ; if ( BP_strncasecmp ( name , vars -> name , current_var_name_len ) == 0 ) return vars ; } return NULL ; }
Gets a anchor var by name
Gets a anchor var by name
// null checks // set ensure we nave a name length // set to the current variable names length // walk properties list // we need a name // set name length // ensure lengths match // return the list if we have a match // if property was not found, return null