Lines Matching refs:s1
26 solv_vercmp_deb(const char *s1, const char *q1, const char *s2, const char *q2) in solv_vercmp_deb() argument
31 c1 = s1 < q1 ? *(const unsigned char *)s1++ : 0; in solv_vercmp_deb()
36 c1 = s1 < q1 ? *(const unsigned char *)s1++ : 0; in solv_vercmp_deb()
44 c1 = s1 < q1 ? *(const unsigned char *)s1++ : 0; in solv_vercmp_deb()
72 solv_vercmp_rpm(const char *s1, const char *q1, const char *s2, const char *q2) in solv_vercmp_rpm() argument
79 while (s1 < q1 && !(*s1 >= '0' && *s1 <= '9') && in solv_vercmp_rpm()
80 !(*s1 >= 'a' && *s1 <= 'z') && !(*s1 >= 'A' && *s1 <= 'Z') && *s1 != '~') in solv_vercmp_rpm()
81 s1++; in solv_vercmp_rpm()
85 if (s1 < q1 && *s1 == '~') in solv_vercmp_rpm()
89 s1++; in solv_vercmp_rpm()
97 if (s1 >= q1 || s2 >= q2) in solv_vercmp_rpm()
99 if ((*s1 >= '0' && *s1 <= '9') || (*s2 >= '0' && *s2 <= '9')) in solv_vercmp_rpm()
101 while (*s1 == '0' && s1[1] >= '0' && s1[1] <= '9') in solv_vercmp_rpm()
102 s1++; in solv_vercmp_rpm()
105 for (e1 = s1; *e1 >= '0' && *e1 <= '9'; ) in solv_vercmp_rpm()
109 r = (e1 - s1) - (e2 - s2); in solv_vercmp_rpm()
111 r = strncmp(s1, s2, e1 - s1); in solv_vercmp_rpm()
117 for (e1 = s1; (*e1 >= 'a' && *e1 <= 'z') || (*e1 >= 'A' && *e1 <= 'Z'); ) in solv_vercmp_rpm()
121 r = (e1 - s1) - (e2 - s2); in solv_vercmp_rpm()
124 r = strncmp(s1, s2, e2 - s2); in solv_vercmp_rpm()
129 r = strncmp(s1, s2, e1 - s1); in solv_vercmp_rpm()
132 r = strncmp(s1, s2, e1 - s1); in solv_vercmp_rpm()
136 s1 = e1; in solv_vercmp_rpm()
139 return s1 < q1 ? 1 : s2 < q2 ? -1 : 0; in solv_vercmp_rpm()
143 solv_vercmp_rpm_notilde(const char *s1, const char *q1, const char *s2, const char *q2) in solv_vercmp_rpm_notilde() argument
148 while (s1 < q1 && s2 < q2) in solv_vercmp_rpm_notilde()
150 while (s1 < q1 && !(*s1 >= '0' && *s1 <= '9') && in solv_vercmp_rpm_notilde()
151 !(*s1 >= 'a' && *s1 <= 'z') && !(*s1 >= 'A' && *s1 <= 'Z')) in solv_vercmp_rpm_notilde()
152 s1++; in solv_vercmp_rpm_notilde()
156 if ((*s1 >= '0' && *s1 <= '9') || (*s2 >= '0' && *s2 <= '9')) in solv_vercmp_rpm_notilde()
158 while (*s1 == '0' && s1[1] >= '0' && s1[1] <= '9') in solv_vercmp_rpm_notilde()
159 s1++; in solv_vercmp_rpm_notilde()
162 for (e1 = s1; *e1 >= '0' && *e1 <= '9'; ) in solv_vercmp_rpm_notilde()
166 r = (e1 - s1) - (e2 - s2); in solv_vercmp_rpm_notilde()
168 r = strncmp(s1, s2, e1 - s1); in solv_vercmp_rpm_notilde()
174 for (e1 = s1; (*e1 >= 'a' && *e1 <= 'z') || (*e1 >= 'A' && *e1 <= 'Z'); ) in solv_vercmp_rpm_notilde()
178 r = (e1 - s1) - (e2 - s2); in solv_vercmp_rpm_notilde()
181 r = strncmp(s1, s2, e2 - s2); in solv_vercmp_rpm_notilde()
186 r = strncmp(s1, s2, e1 - s1); in solv_vercmp_rpm_notilde()
189 r = strncmp(s1, s2, e1 - s1); in solv_vercmp_rpm_notilde()
193 s1 = e1; in solv_vercmp_rpm_notilde()
196 return s1 < q1 ? 1 : s2 < q2 ? -1 : 0; in solv_vercmp_rpm_notilde()
204 solv_cmp_version_part_haiku(const char *s1, const char *q1, const char *s2, in solv_cmp_version_part_haiku() argument
207 while (s1 < q1 && s2 < q2) in solv_cmp_version_part_haiku()
210 const char *part1 = s1, *part2 = s2; in solv_cmp_version_part_haiku()
213 while (s1 < q1 && !isdigit(*s1)) in solv_cmp_version_part_haiku()
214 s1++; in solv_cmp_version_part_haiku()
218 if (part1 != s1) in solv_cmp_version_part_haiku()
223 len1 = s1 - part1; in solv_cmp_version_part_haiku()
235 part1 = s1; in solv_cmp_version_part_haiku()
238 while (s1 < q1 && isdigit(*s1)) in solv_cmp_version_part_haiku()
239 s1++; in solv_cmp_version_part_haiku()
243 while (part1 + 1 < s1 && *part1 == '0') in solv_cmp_version_part_haiku()
248 len1 = s1 - part1; in solv_cmp_version_part_haiku()
260 return s1 < q1 ? 1 : s2 < q2 ? -1 : 0; in solv_cmp_version_part_haiku()
264 solv_vercmp_haiku(const char *s1, const char *q1, const char *s2, const char *q2) in solv_vercmp_haiku() argument
266 const char *pre1 = s1; in solv_vercmp_haiku()
277 cmp = solv_cmp_version_part_haiku(s1, pre1, s2, pre2); in solv_vercmp_haiku()
298 solv_vercmp(const char *s1, const char *q1, const char *s2, const char *q2) in solv_vercmp() argument
301 return solv_vercmp_deb(s1, q1, s2, q2); in solv_vercmp()
303 return solv_vercmp_rpm_notilde(s1, q1, s2, q2); in solv_vercmp()
305 return solv_vercmp_haiku(s1, q1, s2, q2); in solv_vercmp()
307 return solv_vercmp_rpm(s1, q1, s2, q2); in solv_vercmp()
330 const char *s1, *s2; in pool_evrcmp_str() local
339 for (s1 = evr1; *s1 >= '0' && *s1 <= '9'; s1++) in pool_evrcmp_str()
346 if (*s1 == ':') in pool_evrcmp_str()
347 evr1 = s1 + 1; in pool_evrcmp_str()
350 s1 = evr1; in pool_evrcmp_str()
355 if (s1 == evr1 || *s1 != ':') in pool_evrcmp_str()
356 s1 = 0; in pool_evrcmp_str()
359 if (s1 && s2) in pool_evrcmp_str()
361 r = solv_vercmp(evr1, s1, evr2, s2); in pool_evrcmp_str()
364 evr1 = s1 + 1; in pool_evrcmp_str()
367 else if (s1) in pool_evrcmp_str()
376 evr1 = s1 + 1; in pool_evrcmp_str()
388 for (s1 = evr1, r1 = 0; *s1; s1++) in pool_evrcmp_str()
389 if (*s1 == '-') in pool_evrcmp_str()
390 r1 = s1; in pool_evrcmp_str()
395 if (mode != EVRCMP_MATCH || (evr1 != (r1 ? r1 : s1) && evr2 != (r2 ? r2 : s2))) in pool_evrcmp_str()
396 r = solv_vercmp(evr1, r1 ? r1 : s1, evr2, r2 ? r2 : s2); in pool_evrcmp_str()
412 if (r1 && r1 + 1 == s1) in pool_evrcmp_str()
421 if (mode != EVRCMP_MATCH || (s1 != r1 && s2 != r2)) in pool_evrcmp_str()
426 for (d1 = r1; d1 < s1; d1++) in pool_evrcmp_str()
433 r = solv_vercmp(r1, d1 ? d1 : s1, r2, d2 ? d2 : s2); in pool_evrcmp_str()
434 if (r == 0 && d1 < s1 && d2 < s2) in pool_evrcmp_str()
435 r = solv_vercmp(d1 + 1, s1, d2 + 1, s2); in pool_evrcmp_str()
438 r = solv_vercmp(r1, s1, r2, s2); in pool_evrcmp_str()
466 const char *s1; in pool_evrmatch() local
471 for (s1 = evr1; *s1 >= '0' && *s1 <= '9'; s1++) in pool_evrmatch()
473 if (s1 != evr1 && *s1 == ':') in pool_evrmatch()
477 r = solv_vercmp(evr1, s1, epoch, epoch + strlen(epoch)); in pool_evrmatch()
481 evr1 = s1 + 1; in pool_evrmatch()
490 for (s1 = evr1, r1 = 0; *s1; s1++) in pool_evrmatch()
491 if (*s1 == '-') in pool_evrmatch()
492 r1 = s1; in pool_evrmatch()
495 r = solv_vercmp(evr1, r1 ? r1 : s1, version, version + strlen(version)); in pool_evrmatch()
503 r = solv_vercmp(r1 + 1, s1, release, release + strlen(release)); in pool_evrmatch()