Lines Matching refs:delta
77 * As the draft states, it is possible that `delta' may overflow during
78 * the encoding. The upper bound of 'delta' is:
102 unsigned long delta, int bias);
103 static int punycode_update_bias(unsigned long delta,
158 unsigned long delta;
161 len = punycode_getwc(from + fidx, fromlen - fidx, bias, &delta);
168 bias = punycode_update_bias(delta, ucslen + 1, first);
170 idx += delta;
209 unsigned long cur_code, next_code, delta;
289 delta = 0;
308 delta += (next_code - cur_code) * (ucsdone + 1);
318 delta++;
321 int sz = punycode_putwc(to, tolen, delta, bias);
329 bias = punycode_update_bias(delta, ucsdone,
331 delta = 0;
335 delta += rest + 1;
397 punycode_putwc(char *s, size_t len, unsigned long delta, int bias) {
406 if (delta < t)
410 *s++ = punycode_base36[t + ((delta - t) % (PUNYCODE_BASE - t))];
412 delta = (delta - t) / (PUNYCODE_BASE - t);
416 *s++ = punycode_base36[delta];
421 punycode_update_bias(unsigned long delta, size_t npoints, int first) {
424 delta /= first ? PUNYCODE_DAMP : 2;
425 delta += delta / npoints;
427 while (delta > ((PUNYCODE_BASE - PUNYCODE_TMIN) * PUNYCODE_TMAX) / 2) {
428 delta /= PUNYCODE_BASE - PUNYCODE_TMIN;
432 (((PUNYCODE_BASE - PUNYCODE_TMIN + 1) * delta) /
433 (delta + PUNYCODE_SKEW)));