Home | History | Annotate | Download | only in import

Lines Matching refs:period

83    *PERIOD to the global period of the right half.
85 The global period of a string is the smallest index (possibly its
89 When NEEDLE is factored into two halves, a local period is the
92 non-empty NEEDLE have a local period of at least 1 and no greater
95 A critical factorization has the property that the local period
96 equals the global period. All strings have at least one critical
97 factorization with the left half smaller than the global period.
109 size_t *period)
114 size_t k; /* Offset into current period. */
115 size_t p; /* Intermediate period. */
122 *period = 1;
129 min(max_suffix, max_suffix_rev) < global period of NEEDLE
130 1 <= p <= global period of NEEDLE
131 p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
145 /* Suffix is smaller, period is entire prefix so far. */
152 /* Advance through repetition of the current period. */
168 *period = p;
180 /* Suffix is smaller, period is entire prefix so far. */
187 /* Advance through repetition of the current period. */
209 'nana', where both suffixes have a period of 2. On the other
211 factorization of the last byte, with the suffix having a period
220 *period = p;
240 size_t period; /* The period of the right half of needle. */
244 smaller than the global period, and the right half is
245 periodic (with a period as large as NEEDLE_LEN - suffix). */
246 suffix = critical_factorization (needle, needle_len, &period);
250 if (CMP_FUNC (needle, needle + period, suffix) == 0)
253 only advance by the period, so use memory to avoid rescanning
254 known occurrences of the period in the right half. */
273 /* No match, so remember how many repetitions of period
275 j += period;
276 memory = needle_len - period;
289 period = MAX (suffix, needle_len - suffix) + 1;
307 j += period;
334 size_t period; /* The period of the right half of needle. */
339 smaller than the global period, and the right half is
340 periodic (with a period as large as NEEDLE_LEN - suffix). */
341 suffix = critical_factorization (needle, needle_len, &period);
354 if (CMP_FUNC (needle, needle + period, suffix) == 0)
357 only advance by the period, so use memory to avoid rescanning
358 known occurrences of the period in the right half. */
369 if (memory && shift < period)
371 /* Since needle is periodic, but the last period has
374 shift = needle_len - period;
395 /* No match, so remember how many repetitions of period
397 j += period;
398 memory = needle_len - period;
412 period = MAX (suffix, needle_len - suffix) + 1;
439 j += period;