MCPcopy Create free account
hub / github.com/RsyncProject/rsync / doliteral

Function doliteral

lib/wildmatch.c:238–255  ·  view source on GitHub ↗

Match literal string "s" against the a virtually-joined string consisting * of "text" and any strings in array "a". */

Source from the content-addressed store, hash-verified

236/* Match literal string "s" against the a virtually-joined string consisting
237 * of "text" and any strings in array "a". */
238static int doliteral(const uchar *s, const uchar *text, const uchar*const *a)
239{
240 for ( ; *s != '\0'; text++, s++) {
241 while (*text == '\0') {
242 if ((text = *a++) == NULL)
243 return FALSE;
244 }
245 if (*text != *s)
246 return FALSE;
247 }
248
249 do {
250 if (*text)
251 return FALSE;
252 } while ((text = *a++) != NULL);
253
254 return TRUE;
255}
256
257/* Return the last "count" path elements from the concatenated string.
258 * We return a string pointer to the start of the string, and update the

Callers 1

litmatch_arrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected