Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 42) 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.c27 static bool seq_buf_can_fit(struct seq_buf *s, size_t len) in seq_buf_can_fit() argument
29 return s->len + len <= s->size; in seq_buf_can_fit()
39 int seq_buf_print_seq(struct seq_file *m, struct seq_buf *s) in seq_buf_print_seq() argument
41 unsigned int len = seq_buf_used(s); in seq_buf_print_seq()
43 return seq_write(m, s->buffer, len); in seq_buf_print_seq()
56 int seq_buf_vprintf(struct seq_buf *s, const char *fmt, va_list args) in seq_buf_vprintf() argument
60 WARN_ON(s->size == 0); in seq_buf_vprintf()
62 if (s->len < s->size) { in seq_buf_vprintf()
63 len = vsnprintf(s->buffer + s->len, s->size - s->len, fmt, args); in seq_buf_vprintf()
64 if (s->len + len < s->size) { in seq_buf_vprintf()
[all …]
Dkstrtox.c23 const char *_parse_integer_fixup_radix(const char *s, unsigned int *base) in _parse_integer_fixup_radix() argument
26 if (s[0] == '0') { in _parse_integer_fixup_radix()
27 if (_tolower(s[1]) == 'x' && isxdigit(s[2])) in _parse_integer_fixup_radix()
34 if (*base == 16 && s[0] == '0' && _tolower(s[1]) == 'x') in _parse_integer_fixup_radix()
35 s += 2; in _parse_integer_fixup_radix()
36 return s; in _parse_integer_fixup_radix()
47 unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *p) in _parse_integer() argument
54 while (*s) { in _parse_integer()
57 if ('0' <= *s && *s <= '9') in _parse_integer()
58 val = *s - '0'; in _parse_integer()
[all …]
Dwin_minmax.c31 u32 dt = val->t - m->s[0].t; in minmax_subwin_update()
41 m->s[0] = m->s[1]; in minmax_subwin_update()
42 m->s[1] = m->s[2]; in minmax_subwin_update()
43 m->s[2] = *val; in minmax_subwin_update()
44 if (unlikely(val->t - m->s[0].t > win)) { in minmax_subwin_update()
45 m->s[0] = m->s[1]; in minmax_subwin_update()
46 m->s[1] = m->s[2]; in minmax_subwin_update()
47 m->s[2] = *val; in minmax_subwin_update()
49 } else if (unlikely(m->s[1].t == m->s[0].t) && dt > win/4) { in minmax_subwin_update()
54 m->s[2] = m->s[1] = *val; in minmax_subwin_update()
[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.c369 char *strchr(const char *s, int c) in strchr() argument
371 for (; *s != (char)c; ++s) in strchr()
372 if (*s == '\0') in strchr()
374 return (char *)s; in strchr()
388 char *strchrnul(const char *s, int c) in strchrnul() argument
390 while (*s && *s != (char)c) in strchrnul()
391 s++; in strchrnul()
392 return (char *)s; in strchrnul()
403 char *strrchr(const char *s, int c) in strrchr() argument
407 if (*s == (char)c) in strrchr()
[all …]
Dnet_utils.c6 bool mac_pton(const char *s, u8 *mac) in mac_pton() argument
11 if (strlen(s) < 3 * ETH_ALEN - 1) in mac_pton()
16 if (!isxdigit(s[i * 3]) || !isxdigit(s[i * 3 + 1])) in mac_pton()
18 if (i != ETH_ALEN - 1 && s[i * 3 + 2] != ':') in mac_pton()
22 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.c6 ucs2_strnlen(const ucs2_char_t *s, size_t maxlength) in ucs2_strnlen() argument
10 while (*s++ != 0 && length < maxlength) in ucs2_strnlen()
17 ucs2_strlen(const ucs2_char_t *s) in ucs2_strlen() argument
19 return ucs2_strnlen(s, ~0UL); in ucs2_strlen()
Dkstrtox.h5 const char *_parse_integer_fixup_radix(const char *s, unsigned int *base);
6 unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *res);
Ddma-debug.c1396 struct scatterlist *s; in debug_dma_map_sg() local
1402 for_each_sg(sg, s, mapped_ents, i) { in debug_dma_map_sg()
1409 entry->pfn = page_to_pfn(sg_page(s)); in debug_dma_map_sg()
1410 entry->offset = s->offset, in debug_dma_map_sg()
1411 entry->size = sg_dma_len(s); in debug_dma_map_sg()
1412 entry->dev_addr = sg_dma_address(s); in debug_dma_map_sg()
1417 check_for_stack(dev, sg_page(s), s->offset); in debug_dma_map_sg()
1419 if (!PageHighMem(sg_page(s))) { in debug_dma_map_sg()
1420 check_for_illegal_area(dev, sg_virt(s), sg_dma_len(s)); in debug_dma_map_sg()
1450 struct scatterlist *s; in debug_dma_unmap_sg() local
[all …]
Dvsprintf.c122 int skip_atoi(const char **s) in skip_atoi() argument
127 i = i*10 + *((*s)++) - '0'; in skip_atoi()
128 } while (isdigit(**s)); in skip_atoi()
583 char *string(char *buf, char *end, const char *s, struct printf_spec spec) in string() argument
588 if ((unsigned long)s < PAGE_SIZE) in string()
589 s = "(null)"; in string()
592 char c = *s++; in string()
607 const char *array[4], *s; in dentry_name() local
631 s = array[--i]; in dentry_name()
633 char c = *s++; in dentry_name()
[all …]
Drandom32.c61 #define TAUSWORTHE(s, a, b, c, d) ((s & c) << d) ^ (((s << a) ^ s) >> b) in prandom_u32_state() argument
/lib/lz4/
Dlz4defs.h33 #define PUT4(s, d) (A32(d) = A32(s)) argument
34 #define PUT8(s, d) (A64(d) = A64(s)) argument
36 #define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ argument
37 (d = s - A16(p))
50 #define PUT4(s, d) \ argument
51 put_unaligned(get_unaligned((const u32 *) s), (u32 *) d)
52 #define PUT8(s, d) \ argument
53 put_unaligned(get_unaligned((const u64 *) s), (u64 *) d)
55 #define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ argument
56 (d = s - get_unaligned_le16(p))
[all …]
Dlz4_decompress.c195 int s = 255; in lz4_uncompress_unknownoutputsize() local
196 while ((ip < iend) && (s == 255)) { in lz4_uncompress_unknownoutputsize()
197 s = *ip++; in lz4_uncompress_unknownoutputsize()
198 if (unlikely(length > (size_t)(length + s))) in lz4_uncompress_unknownoutputsize()
200 length += s; in lz4_uncompress_unknownoutputsize()
239 int s = *ip++; in lz4_uncompress_unknownoutputsize() local
240 if (unlikely(length > (size_t)(length + s))) in lz4_uncompress_unknownoutputsize()
242 length += s; in lz4_uncompress_unknownoutputsize()
243 if (s == 255) in lz4_uncompress_unknownoutputsize()
/lib/reed_solomon/
Ddecode_rs.c45 if (s != NULL)
78 s = syn;
83 syn_error |= s[i];
84 s[i] = index_of[s[i]];
128 if ((lambda[i] != 0) && (s[r - i - 1] != nn)) {
132 s[r - i - 1])];
216 if ((s[i - j] != nn) && (lambda[j] != nn))
218 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]; \

12