| 1 |
|
| /* |
| 2 |
|
| Copyright (C) 2016-2017 Alexander Borisov |
| 3 |
|
| |
| 4 |
|
| This library is free software; you can redistribute it and/or |
| 5 |
|
| modify it under the terms of the GNU Lesser General Public |
| 6 |
|
| License as published by the Free Software Foundation; either |
| 7 |
|
| version 2.1 of the License, or (at your option) any later version. |
| 8 |
|
| |
| 9 |
|
| This library is distributed in the hope that it will be useful, |
| 10 |
|
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
|
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
|
| Lesser General Public License for more details. |
| 13 |
|
| |
| 14 |
|
| You should have received a copy of the GNU Lesser General Public |
| 15 |
|
| License along with this library; if not, write to the Free Software |
| 16 |
|
| Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 |
|
| |
| 18 |
|
| Author: lex.borisov@gmail.com (Alexander Borisov) |
| 19 |
|
| */ |
| 20 |
|
| |
| 21 |
|
| #include "modest/finder/match.h" |
| 22 |
|
| |
| 23 |
0 |
| bool modest_finder_match_attribute_only_key(myhtml_token_attr_t* attr, const char* key, size_t key_len) |
| 24 |
|
| { |
| 25 |
0 |
▶ | if(key == NULL) |
Branch: 1 branch
| Branch | True | False | Total |
| if(key == NULL) |
0 |
0 |
0 |
|
| 26 |
0 |
| return false; |
| 27 |
|
| |
| 28 |
0 |
▶ | while (attr) |
Branch: 1 branch
| Branch | True | False | Total |
| while (attr) |
0 |
0 |
0 |
|
| 29 |
|
| { |
| 30 |
0 |
▶ | if(attr->key.length == key_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->key.length == key_len) { |
0 |
0 |
0 |
|
| 31 |
0 |
▶ | if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
0 |
0 |
0 |
|
| 32 |
0 |
| return true; |
| 33 |
|
| } |
| 34 |
|
| |
| 35 |
0 |
| attr = attr->next; |
| 36 |
|
| } |
| 37 |
|
| |
| 38 |
0 |
| return false; |
| 39 |
|
| } |
| 40 |
|
| |
| 41 |
173 |
| bool modest_finder_match_attribute_eq(myhtml_token_attr_t* attr, const char* key, size_t key_len, const char* value, size_t value_len, bool case_sensitive) |
| 42 |
|
| { |
| 43 |
173 |
▶ | if(key == NULL || value == NULL) |
Branch: 2 branches
| Branch | True | False | Total |
| if(key == NULL || value == NULL) |
173 |
0 |
173 |
| if(key == NULL || value == NULL) |
0 |
173 |
173 |
|
| 44 |
0 |
| return false; |
| 45 |
|
| |
| 46 |
191 |
▶ | while (attr) |
Branch: 1 branch
| Branch | True | False | Total |
| while (attr) |
56 |
135 |
191 |
|
| 47 |
|
| { |
| 48 |
56 |
▶ | if(attr->key.length == key_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->key.length == key_len) { |
38 |
18 |
56 |
|
| 49 |
38 |
▶ | if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
38 |
0 |
38 |
|
| 50 |
|
| { |
| 51 |
38 |
▶ | if(attr->value.length == value_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->value.length == value_len) { |
38 |
0 |
38 |
|
| 52 |
38 |
▶ | if(case_sensitive) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(case_sensitive) { |
0 |
38 |
38 |
|
| 53 |
0 |
▶ | if(strncmp(value, attr->value.data, value_len) == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(strncmp(value, attr->value.data, value_len) == 0) { |
0 |
0 |
0 |
|
| 54 |
0 |
| return true; |
| 55 |
|
| } |
| 56 |
|
| } |
| 57 |
|
| else { |
| 58 |
38 |
▶ | if(mycore_strncasecmp(value, attr->value.data, value_len) == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(value, attr->value.data, value_len) == 0) { |
38 |
0 |
38 |
|
| 59 |
38 |
| return true; |
| 60 |
|
| } |
| 61 |
|
| } |
| 62 |
|
| } |
| 63 |
|
| |
| 64 |
0 |
| break; |
| 65 |
|
| } |
| 66 |
|
| } |
| 67 |
|
| |
| 68 |
18 |
| attr = attr->next; |
| 69 |
|
| } |
| 70 |
|
| |
| 71 |
135 |
| return false; |
| 72 |
|
| } |
| 73 |
|
| |
| 74 |
325 |
| bool modest_finder_match_attribute_ws(myhtml_token_attr_t* attr, const char* key, size_t key_len, const char* value, size_t value_len, bool case_sensitive) |
| 75 |
|
| { |
| 76 |
325 |
▶ | if(key == NULL || value == NULL) |
Branch: 2 branches
| Branch | True | False | Total |
| if(key == NULL || value == NULL) |
325 |
0 |
325 |
| if(key == NULL || value == NULL) |
0 |
325 |
325 |
|
| 77 |
0 |
| return false; |
| 78 |
|
| |
| 79 |
649 |
▶ | while (attr) |
Branch: 1 branch
| Branch | True | False | Total |
| while (attr) |
421 |
228 |
649 |
|
| 80 |
|
| { |
| 81 |
421 |
▶ | if(attr->key.length == key_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->key.length == key_len) { |
97 |
324 |
421 |
|
| 82 |
97 |
▶ | if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
97 |
0 |
97 |
|
| 83 |
|
| { |
| 84 |
97 |
| size_t i = 0; |
| 85 |
|
| size_t begin; |
| 86 |
|
| |
| 87 |
97 |
▶ | if(attr->value.length >= value_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->value.length >= value_len) { |
65 |
32 |
97 |
|
| 88 |
65 |
▶ | if(case_sensitive) |
Branch: 1 branch
| Branch | True | False | Total |
| if(case_sensitive) |
64 |
1 |
65 |
|
| 89 |
|
| { |
| 90 |
120 |
▶ | while(i < attr->value.length) |
Branch: 1 branch
| Branch | True | False | Total |
| while(i < attr->value.length) |
80 |
40 |
120 |
|
| 91 |
|
| { |
| 92 |
80 |
| begin = i; |
| 93 |
448 |
▶ | while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
Branch: 6 branches
| Branch | True | False | Total |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
384 |
64 |
448 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
368 |
16 |
384 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
368 |
0 |
368 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
368 |
0 |
368 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
368 |
0 |
368 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
368 |
0 |
368 |
|
| 94 |
|
| |
| 95 |
80 |
▶ | if((i - begin) == value_len && (mycore_strncmp(value, &attr->value.data[begin], value_len) == 0)) { |
Branch: 2 branches
| Branch | True | False | Total |
| if((i - begin) == value_len && (mycore_strncmp(value, &attr->value.data[begin], value_len) == 0)) { |
32 |
48 |
80 |
| if((i - begin) == value_len && (mycore_strncmp(value, &attr->value.data[begin], value_len) == 0)) { |
24 |
8 |
32 |
|
| 96 |
24 |
| return true; |
| 97 |
|
| } |
| 98 |
|
| /* skip all ws */ |
| 99 |
72 |
▶ | while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
Branch: 6 branches
| Branch | True | False | Total |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
32 |
40 |
72 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
16 |
16 |
32 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
16 |
16 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
16 |
16 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
16 |
16 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
16 |
16 |
|
| 100 |
|
| } |
| 101 |
|
| } |
| 102 |
|
| else { |
| 103 |
1 |
▶ | while(i < attr->value.length) |
Branch: 1 branch
| Branch | True | False | Total |
| while(i < attr->value.length) |
1 |
0 |
1 |
|
| 104 |
|
| { |
| 105 |
1 |
| begin = i; |
| 106 |
4 |
▶ | while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
Branch: 6 branches
| Branch | True | False | Total |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
4 |
0 |
4 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
3 |
1 |
4 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
3 |
0 |
3 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
3 |
0 |
3 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
3 |
0 |
3 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], !=, &&)) {i++;} |
3 |
0 |
3 |
|
| 107 |
|
| |
| 108 |
1 |
▶ | if((i - begin) == value_len && (mycore_strncasecmp(value, &attr->value.data[begin], value_len) == 0)) { |
Branch: 2 branches
| Branch | True | False | Total |
| if((i - begin) == value_len && (mycore_strncasecmp(value, &attr->value.data[begin], value_len) == 0)) { |
1 |
0 |
1 |
| if((i - begin) == value_len && (mycore_strncasecmp(value, &attr->value.data[begin], value_len) == 0)) { |
1 |
0 |
1 |
|
| 109 |
1 |
| return true; |
| 110 |
|
| } |
| 111 |
|
| /* skip all ws */ |
| 112 |
0 |
▶ | while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
Branch: 6 branches
| Branch | True | False | Total |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
0 |
0 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
0 |
0 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
0 |
0 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
0 |
0 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
0 |
0 |
| while(i < attr->value.length && mycore_utils_whithspace(attr->value.data[i], ==, ||)) {i++;} |
0 |
0 |
0 |
|
| 113 |
|
| } |
| 114 |
|
| } |
| 115 |
|
| } |
| 116 |
|
| |
| 117 |
72 |
| break; |
| 118 |
|
| } |
| 119 |
|
| } |
| 120 |
|
| |
| 121 |
324 |
| attr = attr->next; |
| 122 |
|
| } |
| 123 |
|
| |
| 124 |
300 |
| return false; |
| 125 |
|
| } |
| 126 |
|
| |
| 127 |
0 |
| bool modest_finder_match_attribute_begin(myhtml_token_attr_t* attr, const char* key, size_t key_len, const char* value, size_t value_len, bool case_sensitive) |
| 128 |
|
| { |
| 129 |
0 |
▶ | if(key == NULL || value == NULL) |
Branch: 2 branches
| Branch | True | False | Total |
| if(key == NULL || value == NULL) |
0 |
0 |
0 |
| if(key == NULL || value == NULL) |
0 |
0 |
0 |
|
| 130 |
0 |
| return false; |
| 131 |
|
| |
| 132 |
0 |
▶ | while (attr) |
Branch: 1 branch
| Branch | True | False | Total |
| while (attr) |
0 |
0 |
0 |
|
| 133 |
|
| { |
| 134 |
0 |
▶ | if(attr->key.length == key_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->key.length == key_len) { |
0 |
0 |
0 |
|
| 135 |
0 |
▶ | if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
0 |
0 |
0 |
|
| 136 |
|
| { |
| 137 |
0 |
▶ | if(attr->value.length >= value_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->value.length >= value_len) { |
0 |
0 |
0 |
|
| 138 |
0 |
▶ | if(case_sensitive) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(case_sensitive) { |
0 |
0 |
0 |
|
| 139 |
0 |
▶ | if(mycore_strncmp(value, attr->value.data, value_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncmp(value, attr->value.data, value_len) == 0) |
0 |
0 |
0 |
|
| 140 |
0 |
| return true; |
| 141 |
|
| } |
| 142 |
|
| else { |
| 143 |
0 |
▶ | if(mycore_strncasecmp(value, attr->value.data, value_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(value, attr->value.data, value_len) == 0) |
0 |
0 |
0 |
|
| 144 |
0 |
| return true; |
| 145 |
|
| } |
| 146 |
|
| } |
| 147 |
|
| |
| 148 |
0 |
| break; |
| 149 |
|
| } |
| 150 |
|
| } |
| 151 |
|
| |
| 152 |
0 |
| attr = attr->next; |
| 153 |
|
| } |
| 154 |
|
| |
| 155 |
0 |
| return false; |
| 156 |
|
| } |
| 157 |
|
| |
| 158 |
0 |
| bool modest_finder_match_attribute_end(myhtml_token_attr_t* attr, const char* key, size_t key_len, const char* value, size_t value_len, bool case_sensitive) |
| 159 |
|
| { |
| 160 |
0 |
▶ | if(key == NULL || value == NULL) |
Branch: 2 branches
| Branch | True | False | Total |
| if(key == NULL || value == NULL) |
0 |
0 |
0 |
| if(key == NULL || value == NULL) |
0 |
0 |
0 |
|
| 161 |
0 |
| return false; |
| 162 |
|
| |
| 163 |
0 |
▶ | while (attr) |
Branch: 1 branch
| Branch | True | False | Total |
| while (attr) |
0 |
0 |
0 |
|
| 164 |
|
| { |
| 165 |
0 |
▶ | if(attr->key.length == key_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->key.length == key_len) { |
0 |
0 |
0 |
|
| 166 |
0 |
▶ | if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
0 |
0 |
0 |
|
| 167 |
|
| { |
| 168 |
0 |
▶ | if(attr->value.length >= value_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->value.length >= value_len) { |
0 |
0 |
0 |
|
| 169 |
0 |
▶ | if(case_sensitive) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(case_sensitive) { |
0 |
0 |
0 |
|
| 170 |
0 |
▶ | if(mycore_strncmp(value, &attr->value.data[ (attr->value.length - value_len) ], value_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncmp(value, &attr->value.data[ (attr->value.length - value_len) ], value_len) == 0) |
0 |
0 |
0 |
|
| 171 |
0 |
| return true; |
| 172 |
|
| } |
| 173 |
|
| else { |
| 174 |
0 |
▶ | if(mycore_strncasecmp(value, &attr->value.data[ (attr->value.length - value_len) ], value_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(value, &attr->value.data[ (attr->value.length - value_len) ], value_len) == 0) |
0 |
0 |
0 |
|
| 175 |
0 |
| return true; |
| 176 |
|
| } |
| 177 |
|
| } |
| 178 |
|
| |
| 179 |
0 |
| break; |
| 180 |
|
| } |
| 181 |
|
| } |
| 182 |
|
| |
| 183 |
0 |
| attr = attr->next; |
| 184 |
|
| } |
| 185 |
|
| |
| 186 |
0 |
| return false; |
| 187 |
|
| } |
| 188 |
|
| |
| 189 |
0 |
| bool modest_finder_match_attribute_sub(myhtml_token_attr_t* attr, const char* key, size_t key_len, const char* value, size_t value_len, bool case_sensitive) |
| 190 |
|
| { |
| 191 |
0 |
▶ | if(key == NULL || value == NULL) |
Branch: 2 branches
| Branch | True | False | Total |
| if(key == NULL || value == NULL) |
0 |
0 |
0 |
| if(key == NULL || value == NULL) |
0 |
0 |
0 |
|
| 192 |
0 |
| return false; |
| 193 |
|
| |
| 194 |
0 |
▶ | while (attr) |
Branch: 1 branch
| Branch | True | False | Total |
| while (attr) |
0 |
0 |
0 |
|
| 195 |
|
| { |
| 196 |
0 |
▶ | if(attr->key.length == key_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->key.length == key_len) { |
0 |
0 |
0 |
|
| 197 |
0 |
▶ | if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
0 |
0 |
0 |
|
| 198 |
|
| { |
| 199 |
0 |
▶ | if(attr->value.length >= value_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->value.length >= value_len) { |
0 |
0 |
0 |
|
| 200 |
0 |
| size_t i = 0; |
| 201 |
|
| |
| 202 |
0 |
▶ | if(case_sensitive) |
Branch: 1 branch
| Branch | True | False | Total |
| if(case_sensitive) |
0 |
0 |
0 |
|
| 203 |
|
| { |
| 204 |
0 |
▶ | while ((i + value_len) <= attr->value.length) |
Branch: 1 branch
| Branch | True | False | Total |
| while ((i + value_len) <= attr->value.length) |
0 |
0 |
0 |
|
| 205 |
|
| { |
| 206 |
0 |
▶ | if(mycore_strncmp(value, &attr->value.data[i], value_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncmp(value, &attr->value.data[i], value_len) == 0) |
0 |
0 |
0 |
|
| 207 |
0 |
| return true; |
| 208 |
|
| |
| 209 |
0 |
| i++; |
| 210 |
|
| } |
| 211 |
|
| } |
| 212 |
|
| else { |
| 213 |
0 |
▶ | while ((i + value_len) <= attr->value.length) |
Branch: 1 branch
| Branch | True | False | Total |
| while ((i + value_len) <= attr->value.length) |
0 |
0 |
0 |
|
| 214 |
|
| { |
| 215 |
0 |
▶ | if(mycore_strncasecmp(value, &attr->value.data[i], value_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(value, &attr->value.data[i], value_len) == 0) |
0 |
0 |
0 |
|
| 216 |
0 |
| return true; |
| 217 |
|
| |
| 218 |
0 |
| i++; |
| 219 |
|
| } |
| 220 |
|
| } |
| 221 |
|
| } |
| 222 |
|
| |
| 223 |
0 |
| break; |
| 224 |
|
| } |
| 225 |
|
| } |
| 226 |
|
| |
| 227 |
0 |
| attr = attr->next; |
| 228 |
|
| } |
| 229 |
|
| |
| 230 |
0 |
| return false; |
| 231 |
|
| } |
| 232 |
|
| |
| 233 |
0 |
| bool modest_finder_match_attribute_hsp(myhtml_token_attr_t* attr, const char* key, size_t key_len, const char* value, size_t value_len, bool case_sensitive) |
| 234 |
|
| { |
| 235 |
0 |
▶ | if(key == NULL || value == NULL) |
Branch: 2 branches
| Branch | True | False | Total |
| if(key == NULL || value == NULL) |
0 |
0 |
0 |
| if(key == NULL || value == NULL) |
0 |
0 |
0 |
|
| 236 |
0 |
| return false; |
| 237 |
|
| |
| 238 |
0 |
▶ | while (attr) |
Branch: 1 branch
| Branch | True | False | Total |
| while (attr) |
0 |
0 |
0 |
|
| 239 |
|
| { |
| 240 |
0 |
▶ | if(attr->key.length == key_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->key.length == key_len) { |
0 |
0 |
0 |
|
| 241 |
0 |
▶ | if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(key, attr->key.data, key_len) == 0) |
0 |
0 |
0 |
|
| 242 |
|
| { |
| 243 |
0 |
▶ | if(attr->value.length == value_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->value.length == value_len) { |
0 |
0 |
0 |
|
| 244 |
0 |
▶ | if(case_sensitive) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(case_sensitive) { |
0 |
0 |
0 |
|
| 245 |
0 |
▶ | if(mycore_strncmp(value, attr->value.data, value_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncmp(value, attr->value.data, value_len) == 0) |
0 |
0 |
0 |
|
| 246 |
0 |
| return true; |
| 247 |
|
| } |
| 248 |
|
| else { |
| 249 |
0 |
▶ | if(mycore_strncasecmp(value, attr->value.data, value_len) == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(value, attr->value.data, value_len) == 0) |
0 |
0 |
0 |
|
| 250 |
0 |
| return true; |
| 251 |
|
| } |
| 252 |
|
| } |
| 253 |
0 |
▶ | else if(attr->value.length > value_len) { |
Branch: 1 branch
| Branch | True | False | Total |
| else if(attr->value.length > value_len) { |
0 |
0 |
0 |
|
| 254 |
0 |
▶ | if(case_sensitive) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(case_sensitive) { |
0 |
0 |
0 |
|
| 255 |
0 |
▶ | if(mycore_strncmp(value, attr->value.data, value_len) == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncmp(value, attr->value.data, value_len) == 0) { |
0 |
0 |
0 |
|
| 256 |
0 |
▶ | if(attr->value.data[value_len] == '-') |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->value.data[value_len] == '-') |
0 |
0 |
0 |
|
| 257 |
0 |
| return true; |
| 258 |
|
| } |
| 259 |
|
| } |
| 260 |
|
| else { |
| 261 |
0 |
▶ | if(mycore_strncasecmp(value, attr->value.data, value_len) == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if(mycore_strncasecmp(value, attr->value.data, value_len) == 0) { |
0 |
0 |
0 |
|
| 262 |
0 |
▶ | if(attr->value.data[value_len] == '-') |
Branch: 1 branch
| Branch | True | False | Total |
| if(attr->value.data[value_len] == '-') |
0 |
0 |
0 |
|
| 263 |
0 |
| return true; |
| 264 |
|
| } |
| 265 |
|
| } |
| 266 |
|
| } |
| 267 |
|
| |
| 268 |
0 |
| break; |
| 269 |
|
| } |
| 270 |
|
| } |
| 271 |
|
| |
| 272 |
0 |
| attr = attr->next; |
| 273 |
|
| } |
| 274 |
|
| |
| 275 |
0 |
| return false; |
| 276 |
|
| } |
| 277 |
|
| |
| 278 |
|
| |