Branch Coverage

third_party/modest/source/myhtml/data_process.c
Criterion Covered Total %
branch 22 120 18.3


line true false branch
47 0 256 MyCORE_STRING_REALLOC_IF_NEED(str, 2, 0);
59 5383 852 while(offset < size)
61 128 5255 if(data[offset] == '&')
65 0 128 if(offset != tmp_offset) {
66 0 0 if(proc_entry->encoding == MyENCODING_UTF_8)
91 852 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
843 9 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
98 0 128 if(data[offset] == '#')
105 0 0 if(offset >= size) {
110 0 0 if(data[offset] == 'x' || data[offset] == 'X') {
0 0 if(data[offset] == 'x' || data[offset] == 'X') {
123 0 128 if(proc_entry->charef_res.curr_entry->ch == '\0')
142 128 0 if(proc_entry->charef_res.is_done) {
145 128 0 if(data[offset] == ';')
149 0 0 if(proc_entry->is_attributes &&
0 0 if(proc_entry->is_attributes &&
150 0 0 (data[offset] == '=' || mycore_string_alphanumeric_character[ (unsigned char)data[offset] ] != 0xff))
152 0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
158 128 0 if(current_entry->codepoints_len) {
159 128 128 for (size_t i = 0; i < current_entry->codepoints_len; i++) {
160 0 128 MyCORE_STRING_REALLOC_IF_NEED(str, 5, 0);
169 0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
175 0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
183 0 0 if(data[offset] == 'x' || data[offset] == 'X') {
0 0 if(data[offset] == 'x' || data[offset] == 'X') {
200 0 0 while(offset < size)
202 0 0 if(mycore_string_chars_num_map[ u_data[offset] ] == 0xff)
206 0 0 if((offset - tmp_offset) == 0) {
207 0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
212 0 0 if(data[offset] == ';')
219 0 0 if(proc_entry->tmp_num <= 0x10FFFF) {
226 0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
236 0 0 while(offset < size)
238 0 0 if(mycore_string_chars_hex_map[ u_data[offset] ] == 0xff)
242 0 0 if((offset - tmp_offset) == 0) {
243 0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
248 0 0 if(data[offset] == ';')
255 0 0 if(proc_entry->tmp_num <= 0x10FFFF) {
263 0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
0 0 MyHTML_DATA_PROCESS_APPEND_WITH_PREPROCESSING()
271 0 0 MyCORE_STRING_REALLOC_IF_NEED(str, 5, 0);
273 0 0 if(proc_entry->tmp_num <= 0x9F)
275 0 0 else if(proc_entry->tmp_num >= 0xD800 && proc_entry->tmp_num <= 0xDFFF)
0 0 else if(proc_entry->tmp_num >= 0xD800 && proc_entry->tmp_num <= 0xDFFF)
277 0 0 else if(proc_entry->tmp_num > 0x10FFFF)
290 1236 885 while (offset < size) {
297 0 884 if(proc_entry->state == myhtml_data_process_state_ampersand_data && proc_entry->charef_res.last_entry)
0 0 if(proc_entry->state == myhtml_data_process_state_ampersand_data && proc_entry->charef_res.last_entry)
301 0 0 for (size_t i = 0; i < entry->codepoints_len; i++) {
302 0 0 MyCORE_STRING_REALLOC_IF_NEED(str, 5, 0);
310 0 884 else if(proc_entry->state == myhtml_data_process_state_ampersand_hash_data) {
311 0 0 if((str->length - (proc_entry->tmp_str_pos + 2)))
314 0 884 else if(proc_entry->state == myhtml_data_process_state_ampersand_hash_x_data) {
315 0 0 if((str->length - (proc_entry->tmp_str_pos + 3)))