library/src/buffer_analysis/ASCII/BP-BufferAnalysisASCII.cc
// Return the number of flags which are set (BP_TRUE) within a P_BP_BUFFER_ANALYSIS_ASCII_STRING_FLAGS structure.  Primarily used for
// matching flags.
Return the number of flags which are set (BP_TRUE) within a P_BP_BUFFER_ANALYSIS_ASCII_STRING_FLAGS structure.  Primarily used for
matching flags.
Return the number of flags which are set ( BP_TRUE ) within a P_BP_BUFFER_ANALYSIS_ASCII_STRING_FLAGS structure . Primarily used for matching flags .
size_t BP_CountNumberASCIIStringFlagsSet(P_BP_BUFFER_ANALYSIS_ASCII_STRING_FLAGS flags)
{
	if(!flags)
		return ERR_FAILURE;
	size_t flag_count = 0;
	if(flags->is_unix_file_path)
		flag_count++;
	if(flags->is_url)
		flag_count++;
	if(flags->is_host_url)
		flag_count++;
	if(flags->is_base_url)
		flag_count++;
	if(flags->is_path_url)
		flag_count++;
	if(flags->is_dynamic_so)
		flag_count++;
	if(flags->exists_as_file_on_filesystem)
		flag_count++;
	if(flags->exists_as_file_on_filesystem_and_is_readable)
		flag_count++;
	if(flags->exists_as_file_on_filesystem_and_is_writable)
		flag_count++;
	return flag_count;
}
size_t BP_CountNumberASCIIStringFlagsSet ( P_BP_BUFFER_ANALYSIS_ASCII_STRING_FLAGS flags ) { if ( ! flags ) return ERR_FAILURE ; size_t flag_count = 0 ; if ( flags -> is_unix_file_path ) flag_count ++ ; if ( flags -> is_url ) flag_count ++ ; if ( flags -> is_host_url ) flag_count ++ ; if ( flags -> is_base_url ) flag_count ++ ; if ( flags -> is_path_url ) flag_count ++ ; if ( flags -> is_dynamic_so ) flag_count ++ ; if ( flags -> exists_as_file_on_filesystem ) flag_count ++ ; if ( flags -> exists_as_file_on_filesystem_and_is_readable ) flag_count ++ ; if ( flags -> exists_as_file_on_filesystem_and_is_writable ) flag_count ++ ; return flag_count ; }
Return the number of flags which are set (BP_TRUE) within a P_BP_BUFFER_ANALYSIS_ASCII_STRING_FLAGS structure.
Return the number of flags which are set ( BP_TRUE ) within a P_BP_BUFFER_ANALYSIS_ASCII_STRING_FLAGS structure .
// ensure we have a valid pointer // flag counts // set flags as appropriate // return the total flag count