Home
last modified time | relevance | path

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

12

/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.h118 XZ_EXTERN enum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s,
122 XZ_EXTERN enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,
126 XZ_EXTERN void xz_dec_lzma2_end(struct xz_dec_lzma2 *s);
141 XZ_EXTERN enum xz_ret xz_dec_bcj_reset(struct xz_dec_bcj *s, uint8_t id);
148 XZ_EXTERN enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s,
153 #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.c26 static int match_one(char *s, const char *p, substring_t args[]) in match_one() argument
38 return strcmp(p, s) == 0; in match_one()
40 if (strncmp(p, s, meta-p)) in match_one()
43 s += meta - p; in match_one()
49 if (*s++ != '%') in match_one()
58 args[argc].from = s; in match_one()
61 size_t str_len = strlen(s); in match_one()
67 args[argc].to = s + len; in match_one()
71 simple_strtol(s, &args[argc].to, 0); in match_one()
74 simple_strtoul(s, &args[argc].to, 0); in match_one()
[all …]
Dstring.c370 char *strchr(const char *s, int c) in strchr() argument
372 for (; *s != (char)c; ++s) in strchr()
373 if (*s == '\0') in strchr()
375 return (char *)s; in strchr()
389 char *strchrnul(const char *s, int c) in strchrnul() argument
391 while (*s && *s != (char)c) in strchrnul()
392 s++; in strchrnul()
393 return (char *)s; in strchrnul()
404 char *strrchr(const char *s, int c) in strrchr() argument
408 if (*s == (char)c) in strrchr()
[all …]
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()
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.c196 unsigned long long s = (__force u32)sum; in csum_tcpudp_nofold() local
198 s += (__force u32)saddr; in csum_tcpudp_nofold()
199 s += (__force u32)daddr; in csum_tcpudp_nofold()
201 s += proto + len; in csum_tcpudp_nofold()
203 s += (proto + len) << 8; in csum_tcpudp_nofold()
205 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()
Ddma-debug.c1400 struct scatterlist *s; in debug_dma_map_sg() local
1406 for_each_sg(sg, s, mapped_ents, i) { in debug_dma_map_sg()
1413 entry->pfn = page_to_pfn(sg_page(s)); in debug_dma_map_sg()
1414 entry->offset = s->offset, in debug_dma_map_sg()
1415 entry->size = sg_dma_len(s); in debug_dma_map_sg()
1416 entry->dev_addr = sg_dma_address(s); in debug_dma_map_sg()
1421 check_for_stack(dev, sg_page(s), s->offset); in debug_dma_map_sg()
1423 if (!PageHighMem(sg_page(s))) { in debug_dma_map_sg()
1424 check_for_illegal_area(dev, sg_virt(s), sg_dma_len(s)); in debug_dma_map_sg()
1454 struct scatterlist *s; in debug_dma_unmap_sg() local
[all …]
Dkstrtox.h6 const char *_parse_integer_fixup_radix(const char *s, unsigned int *base);
7 unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *res);
/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 …]
Dhuf_compress.c504 int s; in HUF_estimateCompressedSize() local
505 for (s = 0; s <= (int)maxSymbolValue; ++s) { in HUF_estimateCompressedSize()
506 nbBits += CTable[s].nbBits * count[s]; in HUF_estimateCompressedSize()
514 int s; in HUF_validateCTable() local
515 for (s = 0; s <= (int)maxSymbolValue; ++s) { in HUF_validateCTable()
516 bad |= (count[s] != 0) & (CTable[s].nbBits == 0); in HUF_validateCTable()
528 #define HUF_FLUSHBITS(s) BIT_flushBits(s) argument
/lib/reed_solomon/
Ddecode_rs.c45 if (s != NULL) {
50 if (s[i] != nn)
88 s = syn;
93 syn_error |= s[i];
94 s[i] = index_of[s[i]];
138 if ((lambda[i] != 0) && (s[r - i - 1] != nn)) {
142 s[r - i - 1])];
226 if ((s[i - j] != nn) && (lambda[j] != nn))
228 alpha_to[rs_modnn(rs, s[i - j] + lambda[j])];
/lib/842/
D842_decompress.c68 #define beN_to_cpu(d, s) \ argument
69 ((s) == 2 ? be16_to_cpu(get_unaligned((__be16 *)d)) : \
70 (s) == 4 ? be32_to_cpu(get_unaligned((__be32 *)d)) : \
71 (s) == 8 ? be64_to_cpu(get_unaligned((__be64 *)d)) : \
76 static int __split_next_bits(struct sw842_param *p, u64 *d, u8 n, u8 s) in __split_next_bits() argument
81 if (n <= s) { in __split_next_bits()
82 pr_debug("split_next_bits invalid n %u s %u\n", n, s); in __split_next_bits()
86 ret = next_bits(p, &tmp, n - s); in __split_next_bits()
89 ret = next_bits(p, d, s); in __split_next_bits()
92 *d |= tmp << s; in __split_next_bits()
/lib/mpi/
Dmpi-internal.h76 #define MPN_COPY(d, s, n) \ argument
80 (d)[_i] = (s)[_i]; \
83 #define MPN_COPY_INCR(d, s, n) \ argument
87 (d)[_i] = (s)[_i]; \
90 #define MPN_COPY_DECR(d, s, n) \ argument
94 (d)[_i] = (s)[_i]; \
/lib/lz4/
Dlz4_decompress.c118 unsigned int s; in LZ4_decompress_generic() local
121 s = *ip++; in LZ4_decompress_generic()
122 length += s; in LZ4_decompress_generic()
125 : 1) & (s == 255)); in LZ4_decompress_generic()
211 unsigned int s; in LZ4_decompress_generic() local
214 s = *ip++; in LZ4_decompress_generic()
219 length += s; in LZ4_decompress_generic()
220 } while (s == 255); in LZ4_decompress_generic()

12