Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 53) sorted by relevance

123

/lib/zlib_deflate/
Ddeflate.c66 typedef block_state (*compress_func) (deflate_state *s, int flush);
69 static void fill_window (deflate_state *s);
70 static block_state deflate_stored (deflate_state *s, int flush);
71 static block_state deflate_fast (deflate_state *s, int flush);
72 static block_state deflate_slow (deflate_state *s, int flush);
73 static void lm_init (deflate_state *s);
74 static void putShortMSB (deflate_state *s, uInt b);
77 static uInt longest_match (deflate_state *s, IPos cur_match);
80 static void check_match (deflate_state *s, IPos start, IPos match,
142 #define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask) argument
[all …]
Ddeftree.c137 static void init_block (deflate_state *s);
138 static void pqdownheap (deflate_state *s, ct_data *tree, int k);
139 static void gen_bitlen (deflate_state *s, tree_desc *desc);
141 static void build_tree (deflate_state *s, tree_desc *desc);
142 static void scan_tree (deflate_state *s, ct_data *tree, int max_code);
143 static void send_tree (deflate_state *s, ct_data *tree, int max_code);
144 static int build_bl_tree (deflate_state *s);
145 static void send_all_trees (deflate_state *s, int lcodes, int dcodes,
147 static void compress_block (deflate_state *s, ct_data *ltree,
149 static void set_data_type (deflate_state *s);
[all …]
Ddefutil.h262 #define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} argument
270 #define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) argument
276 void zlib_tr_init (deflate_state *s);
277 int zlib_tr_tally (deflate_state *s, unsigned dist, unsigned lc);
278 ulg zlib_tr_flush_block (deflate_state *s, char *buf, ulg stored_len,
280 void zlib_tr_align (deflate_state *s);
281 void zlib_tr_stored_block (deflate_state *s, char *buf, ulg stored_len,
290 #define put_short(s, w) { \ argument
291 put_byte(s, (uch)((w) & 0xff)); \
292 put_byte(s, (uch)((ush)(w) >> 8)); \
[all …]
/lib/xz/
Dxz_dec_stream.c157 static bool fill_temp(struct xz_dec *s, struct xz_buf *b) in fill_temp() argument
160 b->in_size - b->in_pos, s->temp.size - s->temp.pos); in fill_temp()
162 memcpy(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size); in fill_temp()
164 s->temp.pos += copy_size; in fill_temp()
166 if (s->temp.pos == s->temp.size) { in fill_temp()
167 s->temp.pos = 0; in fill_temp()
175 static enum xz_ret dec_vli(struct xz_dec *s, const uint8_t *in, in dec_vli() argument
180 if (s->pos == 0) in dec_vli()
181 s->vli = 0; in dec_vli()
187 s->vli |= (vli_type)(byte & 0x7F) << s->pos; in dec_vli()
[all …]
Dxz_dec_lzma2.c572 static uint16_t *lzma_literal_probs(struct xz_dec_lzma2 *s) in lzma_literal_probs() argument
574 uint32_t prev_byte = dict_get(&s->dict, 0); in lzma_literal_probs()
575 uint32_t low = prev_byte >> (8 - s->lzma.lc); in lzma_literal_probs()
576 uint32_t high = (s->dict.pos & s->lzma.literal_pos_mask) << s->lzma.lc; in lzma_literal_probs()
577 return s->lzma.literal[low + high]; in lzma_literal_probs()
581 static void lzma_literal(struct xz_dec_lzma2 *s) in lzma_literal() argument
590 probs = lzma_literal_probs(s); in lzma_literal()
592 if (lzma_state_is_literal(s->lzma.state)) { in lzma_literal()
593 symbol = rc_bittree(&s->rc, probs, 0x100); in lzma_literal()
596 match_byte = dict_get(&s->dict, s->lzma.rep0) << 1; in lzma_literal()
[all …]
Dxz_dec_bcj.c88 static size_t bcj_x86(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_x86() argument
97 uint32_t prev_mask = s->x86_prev_mask; in bcj_x86()
132 dest = src - (s->pos + (uint32_t)i + 5); in bcj_x86()
154 s->x86_prev_mask = prev_pos > 3 ? 0 : prev_mask << (prev_pos - 1); in bcj_x86()
160 static size_t bcj_powerpc(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_powerpc() argument
169 instr -= s->pos + (uint32_t)i; in bcj_powerpc()
181 static size_t bcj_ia64(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_ia64() argument
242 addr -= s->pos + (uint32_t)i; in bcj_ia64()
265 static size_t bcj_arm(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_arm() argument
275 addr -= s->pos + (uint32_t)i + 8; in bcj_arm()
[all …]
Dxz_private.h122 XZ_EXTERN enum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s,
126 XZ_EXTERN enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,
130 XZ_EXTERN void xz_dec_lzma2_end(struct xz_dec_lzma2 *s);
145 XZ_EXTERN enum xz_ret xz_dec_bcj_reset(struct xz_dec_bcj *s, uint8_t id);
152 XZ_EXTERN enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s,
157 #define xz_dec_bcj_end(s) kfree(s) argument
/lib/
Dseq_buf.c28 static bool seq_buf_can_fit(struct seq_buf *s, size_t len) in seq_buf_can_fit() argument
30 return s->len + len <= s->size; in seq_buf_can_fit()
40 int seq_buf_print_seq(struct seq_file *m, struct seq_buf *s) in seq_buf_print_seq() argument
42 unsigned int len = seq_buf_used(s); in seq_buf_print_seq()
44 return seq_write(m, s->buffer, len); in seq_buf_print_seq()
57 int seq_buf_vprintf(struct seq_buf *s, const char *fmt, va_list args) in seq_buf_vprintf() argument
61 WARN_ON(s->size == 0); in seq_buf_vprintf()
63 if (s->len < s->size) { in seq_buf_vprintf()
64 len = vsnprintf(s->buffer + s->len, s->size - s->len, fmt, args); in seq_buf_vprintf()
65 if (s->len + len < s->size) { in seq_buf_vprintf()
[all …]
Dwin_minmax.c32 u32 dt = val->t - m->s[0].t; in minmax_subwin_update()
42 m->s[0] = m->s[1]; in minmax_subwin_update()
43 m->s[1] = m->s[2]; in minmax_subwin_update()
44 m->s[2] = *val; in minmax_subwin_update()
45 if (unlikely(val->t - m->s[0].t > win)) { in minmax_subwin_update()
46 m->s[0] = m->s[1]; in minmax_subwin_update()
47 m->s[1] = m->s[2]; in minmax_subwin_update()
48 m->s[2] = *val; in minmax_subwin_update()
50 } else if (unlikely(m->s[1].t == m->s[0].t) && dt > win/4) { in minmax_subwin_update()
55 m->s[2] = m->s[1] = *val; in minmax_subwin_update()
[all …]
Dkstrtox.c24 const char *_parse_integer_fixup_radix(const char *s, unsigned int *base) in _parse_integer_fixup_radix() argument
27 if (s[0] == '0') { in _parse_integer_fixup_radix()
28 if (_tolower(s[1]) == 'x' && isxdigit(s[2])) in _parse_integer_fixup_radix()
35 if (*base == 16 && s[0] == '0' && _tolower(s[1]) == 'x') in _parse_integer_fixup_radix()
36 s += 2; in _parse_integer_fixup_radix()
37 return s; in _parse_integer_fixup_radix()
48 unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *p) in _parse_integer() argument
56 unsigned int c = *s; in _parse_integer()
79 s++; in _parse_integer()
85 static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res) in _kstrtoull() argument
[all …]
Dparser.c24 static int match_one(char *s, const char *p, substring_t args[]) in match_one() argument
36 return strcmp(p, s) == 0; in match_one()
38 if (strncmp(p, s, meta-p)) in match_one()
41 s += meta - p; in match_one()
47 if (*s++ != '%') in match_one()
56 args[argc].from = s; in match_one()
59 size_t str_len = strlen(s); in match_one()
65 args[argc].to = s + len; in match_one()
69 simple_strtol(s, &args[argc].to, 0); in match_one()
72 simple_strtoul(s, &args[argc].to, 0); in match_one()
[all …]
Dstring.c409 char *strchr(const char *s, int c) in strchr() argument
411 for (; *s != (char)c; ++s) in strchr()
412 if (*s == '\0') in strchr()
414 return (char *)s; in strchr()
428 char *strchrnul(const char *s, int c) in strchrnul() argument
430 while (*s && *s != (char)c) in strchrnul()
431 s++; in strchrnul()
432 return (char *)s; in strchrnul()
443 char *strrchr(const char *s, int c) in strrchr() argument
447 if (*s == (char)c) in strrchr()
[all …]
Dashrdi3.c22 w.s.high = in __ashrdi3()
23 uu.s.high >> 31; in __ashrdi3()
24 w.s.low = uu.s.high >> -bm; in __ashrdi3()
26 const unsigned int carries = (unsigned int) uu.s.high << bm; in __ashrdi3()
28 w.s.high = uu.s.high >> b; in __ashrdi3()
29 w.s.low = ((unsigned int) uu.s.low >> b) | carries; in __ashrdi3()
Dcmpdi2.c18 if (au.s.high < bu.s.high) in __cmpdi2()
20 else if (au.s.high > bu.s.high) in __cmpdi2()
23 if ((unsigned int) au.s.low < (unsigned int) bu.s.low) in __cmpdi2()
25 else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) in __cmpdi2()
Ducmpdi2.c13 if ((unsigned int) au.s.high < (unsigned int) bu.s.high) in __ucmpdi2()
15 else if ((unsigned int) au.s.high > (unsigned int) bu.s.high) in __ucmpdi2()
17 if ((unsigned int) au.s.low < (unsigned int) bu.s.low) in __ucmpdi2()
19 else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) in __ucmpdi2()
Dashldi3.c21 w.s.low = 0; in __ashldi3()
22 w.s.high = (unsigned int) uu.s.low << -bm; in __ashldi3()
24 const unsigned int carries = (unsigned int) uu.s.low >> bm; in __ashldi3()
26 w.s.low = (unsigned int) uu.s.low << b; in __ashldi3()
27 w.s.high = ((unsigned int) uu.s.high << b) | carries; in __ashldi3()
Dlshrdi3.c21 w.s.high = 0; in __lshrdi3()
22 w.s.low = (unsigned int) uu.s.high >> -bm; in __lshrdi3()
24 const unsigned int carries = (unsigned int) uu.s.high << bm; in __lshrdi3()
26 w.s.high = (unsigned int) uu.s.high >> b; in __lshrdi3()
27 w.s.low = ((unsigned int) uu.s.low >> b) | carries; in __lshrdi3()
Dnet_utils.c7 bool mac_pton(const char *s, u8 *mac) in mac_pton() argument
12 if (strlen(s) < 3 * ETH_ALEN - 1) in mac_pton()
17 if (!isxdigit(s[i * 3]) || !isxdigit(s[i * 3 + 1])) in mac_pton()
19 if (i != ETH_ALEN - 1 && s[i * 3 + 2] != ':') in mac_pton()
23 mac[i] = (hex_to_bin(s[i * 3]) << 4) | hex_to_bin(s[i * 3 + 1]); in mac_pton()
Dmuldi3.c44 umul_ppmm(__w.s.high, __w.s.low, u, v); \
53 DWunion w = {.ll = __umulsidi3(uu.s.low, vv.s.low)}; in __muldi3()
55 w.s.high += ((unsigned long) uu.s.low * (unsigned long) vv.s.high in __muldi3()
56 + (unsigned long) uu.s.high * (unsigned long) vv.s.low); in __muldi3()
Ddecompress_unxz.c207 const uint8_t *s = src; in memmove() local
210 if (d < s) { in memmove()
212 d[i] = s[i]; in memmove()
213 } else if (d > s) { in memmove()
216 d[i] = s[i]; in memmove()
258 struct xz_dec *s; in unxz() local
270 s = xz_dec_init(XZ_SINGLE, 0); in unxz()
272 s = xz_dec_init(XZ_DYNALLOC, (uint32_t)-1); in unxz()
274 if (s == NULL) in unxz()
300 ret = xz_dec_run(s, &b); in unxz()
[all …]
Dchecksum.c192 unsigned long long s = (__force u32)sum; in csum_tcpudp_nofold() local
194 s += (__force u32)saddr; in csum_tcpudp_nofold()
195 s += (__force u32)daddr; in csum_tcpudp_nofold()
197 s += proto + len; in csum_tcpudp_nofold()
199 s += (proto + len) << 8; in csum_tcpudp_nofold()
201 return (__force __wsum)from64to32(s); in csum_tcpudp_nofold()
Ducs2_string.c7 ucs2_strnlen(const ucs2_char_t *s, size_t maxlength) in ucs2_strnlen() argument
11 while (*s++ != 0 && length < maxlength) in ucs2_strnlen()
18 ucs2_strlen(const ucs2_char_t *s) in ucs2_strlen() argument
20 return ucs2_strnlen(s, ~0UL); in ucs2_strlen()
/lib/zstd/
Dfse_compress.c161 …FSE_FUNCTION_TYPE s = tableSymbol[u]; /* note : static analyzer may not understand tableSymbol is … in FSE_buildCTable_wksp() local
162 …tableU16[cumul[s]++] = (U16)(tableSize + u); /* TableU16 : sorted by symbol order; gives next stat… in FSE_buildCTable_wksp()
169 unsigned s; in FSE_buildCTable_wksp() local
170 for (s = 0; s <= maxSymbolValue; s++) { in FSE_buildCTable_wksp()
171 switch (normalizedCounter[s]) { in FSE_buildCTable_wksp()
176 symbolTT[s].deltaNbBits = (tableLog << 16) - (1 << tableLog); in FSE_buildCTable_wksp()
177 symbolTT[s].deltaFindState = total - 1; in FSE_buildCTable_wksp()
181 U32 const maxBitsOut = tableLog - BIT_highbit32(normalizedCounter[s] - 1); in FSE_buildCTable_wksp()
182 U32 const minStatePlus = normalizedCounter[s] << maxBitsOut; in FSE_buildCTable_wksp()
183 symbolTT[s].deltaNbBits = (maxBitsOut << 16) - minStatePlus; in FSE_buildCTable_wksp()
[all …]
Dfse_decompress.c120 U32 s; in FSE_buildDTable_wksp() local
121 for (s = 0; s < maxSV1; s++) { in FSE_buildDTable_wksp()
122 if (normalizedCounter[s] == -1) { in FSE_buildDTable_wksp()
123 tableDecode[highThreshold--].symbol = (FSE_FUNCTION_TYPE)s; in FSE_buildDTable_wksp()
124 symbolNext[s] = 1; in FSE_buildDTable_wksp()
126 if (normalizedCounter[s] >= largeLimit) in FSE_buildDTable_wksp()
128 symbolNext[s] = normalizedCounter[s]; in FSE_buildDTable_wksp()
139 U32 s, position = 0; in FSE_buildDTable_wksp() local
140 for (s = 0; s < maxSV1; s++) { in FSE_buildDTable_wksp()
142 for (i = 0; i < normalizedCounter[s]; i++) { in FSE_buildDTable_wksp()
[all …]
/lib/reed_solomon/
Ddecode_rs.c46 if (s != NULL) {
51 if (s[i] != nn)
89 s = syn;
94 syn_error |= s[i];
95 s[i] = index_of[s[i]];
138 if ((lambda[i] != 0) && (s[r - i - 1] != nn)) {
142 s[r - i - 1])];
240 if ((s[i - j] != nn) && (lambda[j] != nn))
242 alpha_to[rs_modnn(rs, s[i - j] + lambda[j])];
299 if (tmp != alpha_to[s[i]])

123