Home
last modified time | relevance | path

Searched refs:bits (Results 1 – 25 of 286) sorted by relevance

12345678910>>...12

/plan9/sys/src/games/blabs/
H A Dmkfile8 andrew.bits\
9 bart.bits\
10 bwk.bits\
11 dmr.bits\
12 doug.bits\
13 gerard.bits\
14 howard.bits\
15 ken.bits\
16 philw.bits\
17 pjw.bits\
[all …]
/plan9/sys/src/cmd/gs/src/
H A Dshc.h69 uint bits; /* most recent bits of input or */\
80 ((ss)->bits = 0, (ss)->bits_left = hc_bits_size)
82 ((ss)->bits = 0, (ss)->bits_left = 0)
122 register uint bits;\
128 bits = ss->bits, bits_left = ss->bits_left
133 ss->bits = bits, ss->bits_left = bits_left
141 (bits += (code) << bits_left) :\
144 (bits + ((code) >> -bits_left))),\
145 bits = (code) << (bits_left += hc_bits_size))))
156 hc_put_last_bits_proc(ss, q, bits, bits_left)
[all …]
H A Dgdevpe.c257 #define write_byte_masked(ptr, bits, mask)\ in pe_copy_mono() argument
258 *ptr = ((bits | ~mask | zmask) & *ptr | (bits & mask & omask)) in pe_copy_mono()
260 #define write_byte(ptr, bits)\ in pe_copy_mono() argument
261 *ptr = ((bits | zmask) & *ptr | (bits & omask)) in pe_copy_mono()
283 register int bits = *bptr ^ invert; /* first partial byte */ in pe_copy_mono() local
285 write_byte_masked(optr, bits, mask); in pe_copy_mono()
291 bits = *++bptr ^ invert; in pe_copy_mono()
293 write_byte(optr, bits); in pe_copy_mono()
300 bits = *++bptr ^ invert; in pe_copy_mono()
302 write_byte_masked(optr, bits, rmask); in pe_copy_mono()
[all …]
H A Dgsgdata.c30 case 0: return ENUM_CONST_BYTESTRING(&pgd->bits);
35 RELOC_CONST_BYTESTRING_VAR(pgd->bits); in RELOC_PTRS_WITH()
47 if (offset > pgd->bits.size || size > pgd->bits.size - offset) in gs_glyph_data_substring()
70 pgd->bits.data += offset; in glyph_data_substring_permanent()
71 pgd->bits.size = size; in glyph_data_substring_permanent()
80 &pgd->bits, cname); in glyph_data_free_by_font()
86 byte *data = (byte *)pgd->bits.data; /* break const */ in glyph_data_substring_by_font()
88 if (pgd->bits.bytes) /* object, not string */ in glyph_data_substring_by_font()
92 pgd->bits.data = in glyph_data_substring_by_font()
93 gs_resize_string(font->memory, data, pgd->bits.size, size, in glyph_data_substring_by_font()
[all …]
H A Dgdevherc.c234 #define write_byte_masked(ptr, bits, mask)\ in herc_copy_mono() argument
235 *ptr = ((bits | ~mask | zmask) & (*ptr | (bits & mask & omask))) in herc_copy_mono()
237 #define write_byte(ptr, bits)\ in herc_copy_mono() argument
238 *ptr = ((bits | zmask) & (*ptr | (bits & omask))) in herc_copy_mono()
267 register int bits = *bptr ^ invert; /* first partial byte */ in herc_copy_mono() local
271 write_byte_masked(optr, bits, mask); in herc_copy_mono()
277 bits = *++bptr ^ invert; in herc_copy_mono()
280 write_byte(optr, bits); in herc_copy_mono()
286 bits = *++bptr ^ invert; in herc_copy_mono()
289 write_byte_masked(optr, bits, rmask); in herc_copy_mono()
[all …]
H A Dgdevm1.c237 #define CINVERT(bits) ((bits) ^ invert) in mem_mono_copy_mono() argument
238 #define WRITE_OR_MASKED(bits, mask, off)\ in mem_mono_copy_mono() argument
239 optr[off] |= (CINVERT(bits) & mask) in mem_mono_copy_mono()
240 #define WRITE_STORE_MASKED(bits, mask, off)\ in mem_mono_copy_mono() argument
241 optr[off] = ((optr[off] & ~mask) | (CINVERT(bits) & mask)) in mem_mono_copy_mono()
242 #define WRITE_AND_MASKED(bits, mask, off)\ in mem_mono_copy_mono() argument
243 optr[off] &= (CINVERT(bits) | ~mask) in mem_mono_copy_mono()
245 #define WRITE_OR(bits) *optr |= CINVERT(bits) in mem_mono_copy_mono() argument
246 #define WRITE_STORE(bits) *optr = CINVERT(bits) in mem_mono_copy_mono() argument
247 #define WRITE_AND(bits) *optr &= CINVERT(bits) in mem_mono_copy_mono() argument
[all …]
H A Dslzwd.c108 byte bits = ss->bits; in s_LZWD_process() local
183 code = bits >> (8 - bits_left); in s_LZWD_process()
185 code = (uint) bits << (code_size - bits_left); in s_LZWD_process()
198 bits = p[1]; in s_LZWD_process()
203 bits = p[1]; in s_LZWD_process()
206 code += (uint) bits << bits_left; in s_LZWD_process()
208 code += (uint) bits << (code_size - 8 - bits_left); in s_LZWD_process()
210 bits = p[2]; in s_LZWD_process()
216 bits = *++p; in s_LZWD_process()
220 code += (uint) bits << bits_left, in s_LZWD_process()
[all …]
H A Dgdev3b1.c291 ulong bits, mask, *p; in att3b1_copy_mono() local
335 bits = *src_q++; in att3b1_copy_mono()
337 bits = *((ulong *)src_q) >> src_b; in att3b1_copy_mono()
338 bits &= 0xffff; in att3b1_copy_mono()
342 bits = reverse_bits[bits>>8]; in att3b1_copy_mono()
344 bits = (reverse_bits[bits&0xff] << 8) | reverse_bits[bits>>8]; in att3b1_copy_mono()
354 bits = ~(bits & mask); in att3b1_copy_mono()
355 rotate(bits,dst_b); in att3b1_copy_mono()
356 *p &= bits; in att3b1_copy_mono()
359 bits = bits & mask; in att3b1_copy_mono()
[all …]
H A Dshc.c52 hc_put_last_bits_proc(stream_hc_state * ss, byte * q, uint bits, int bits_left) in hc_put_last_bits_proc() argument
55 byte c = (byte) (bits >> (hc_bits_size - 8)); in hc_put_last_bits_proc()
60 bits <<= 8; in hc_put_last_bits_proc()
63 ss->bits = bits; in hc_put_last_bits_proc()
/plan9/sys/src/cmd/gs/zlib/
H A Dinffast.c82 unsigned bits; /* local strm->bits */ local
106 bits = state->bits;
115 if (bits < 15) {
116 hold += (unsigned long)(PUP(in)) << bits;
117 bits += 8;
118 hold += (unsigned long)(PUP(in)) << bits;
119 bits += 8;
123 op = (unsigned)(this.bits);
125 bits -= op;
137 if (bits < op) {
[all …]
H A Dinfback.c82 unsigned sym, bits; local
93 bits = 9;
94 inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
100 bits = 5;
101 inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
125 bits = state->bits; \
136 state->bits = bits; \
143 bits = 0; \
166 hold += (unsigned long)(*next++) << bits; \
167 bits += 8; \
[all …]
H A Dinflate.c119 state->bits = 0;
196 unsigned sym, bits; local
207 bits = 9;
208 inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
214 bits = 5;
215 inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
270 printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits, in makefixed()
281 printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, in makefixed()
391 bits = state->bits; \
402 state->bits = bits; \
[all …]
H A Dalgorithm.txt67 inflate() sets up a first level table that covers some number of bits of
68 input less than the length of longest code. It gets that many bits from the
70 code is that many bits or less and how many, and if it is, it will tell
72 grabs more bits and tries to decode a longer code.
74 How many bits to make the first lookup is a tradeoff between the time it
78 building the table ends up taking a lot longer for more bits since short
80 simply to make the number of bits in the first table a variable, and then
84 of the first table is nine bits. Also the distance trees have 30 possible
85 values, and the size of the first table is six bits. Note that for each of
88 little more than eight bits for 286 symbols and a little less than five bits
[all …]
/plan9/sys/src/cmd/venti/srv/
H A Dwhack.c35 short bits; /* length of the code */ member
143 int toff, lithist, h, len, bits, use, wnbits, lits, matches, offbits, lenbits; in whack() local
236 bits = lentab[len].bits; in whack()
237 wbits = (wbits << bits) | lentab[len].encode; in whack()
238 wnbits += bits; in whack()
239 lenbits += bits; in whack()
242 bits = BigLenBits; in whack()
248 use <<= (bits & 1) ^ 1; in whack()
249 bits++; in whack()
252 wbits = (wbits << bits) | (code + len); in whack()
[all …]
H A Dunwhack.c58 int i, off, len, bits, use, code, uwnbits, overbits; in unwhack() local
120 bits = (DBigLenBits & 1) ^ 1; in unwhack()
131 use <<= bits; in unwhack()
132 bits ^= 1; in unwhack()
150 bits = (uwbits >> uwnbits) & 0xf; in unwhack()
151 off = offbase[bits]; in unwhack()
152 bits = offbits[bits]; in unwhack()
154 uwnbits -= bits; in unwhack()
155 off |= (uwbits >> uwnbits) & ((1 << bits) - 1); in unwhack()
/plan9/sys/src/9/port/
H A Dthwack.c36 short bits; /* length of the code */ member
167 int now, toff, lithist, h, len, slot, bits, use, twnbits, lits, matches, offbits, lenbits, nhist; in thwack() local
299 bits = lentab[len].bits; in thwack()
300 twbits = (twbits << bits) | lentab[len].encode; in thwack()
301 twnbits += bits; in thwack()
302 lenbits += bits; in thwack()
305 bits = BigLenBits; in thwack()
311 use <<= (bits & 1) ^ 1; in thwack()
312 bits++; in thwack()
314 twbits = (twbits << bits) | (code + len); in thwack()
[all …]
/plan9/sys/src/cmd/ip/ppp/
H A Dthwack.c35 short bits; /* length of the code */ member
188 …int n, now, toff, lithist, h, len, slot, bits, use, twnbits, lits, matches, offbits, lenbits, nhis… in thwack() local
328 bits = lentab[len].bits; in thwack()
329 twbits = (twbits << bits) | lentab[len].encode; in thwack()
330 twnbits += bits; in thwack()
331 lenbits += bits; in thwack()
334 bits = BigLenBits; in thwack()
340 use <<= (bits & 1) ^ 1; in thwack()
341 bits++; in thwack()
343 twbits = (twbits << bits) | (code + len); in thwack()
[all …]
H A Dmppc.c31 int bits; /* number of bits in sreg */ member
197 s->bits = 0; in comp()
204 if(s->bits) in comp()
205 *s->b->wptr++ = s->sreg<<(8-s->bits); in comp()
434 compout(Cstate *s, ulong data, int bits) in compout() argument
439 sreg <<= bits; in compout()
441 bits += s->bits; in compout()
442 while(bits >= 8) { in compout()
443 *s->b->wptr++ = sreg>>(bits-8); in compout()
444 bits -= 8; in compout()
[all …]
/plan9/sys/src/libc/port/
H A Dfrexp.c38 int e, bits; in ldexp() local
70 bits = deltae; in ldexp()
71 if(bits > SHIFT) in ldexp()
72 bits = SHIFT; in ldexp()
73 x.lo >>= bits; in ldexp()
74 x.lo |= (x.hi&((1<<bits)-1)) << (32-bits); in ldexp()
77 x.hi |= z>>bits; in ldexp()
78 deltae -= bits; in ldexp()
/plan9/sys/src/cmd/auth/
H A Drsagen.c17 int bits; in main() local
21 bits = 1024; in main()
28 bits = atoi(EARGF(usage())); in main()
29 if(bits == 0) in main()
45 key = rsagen(bits, 6, 0); in main()
46 }while(mpsignif(key->pub.n) != bits); in main()
/plan9/sys/src/libflate/
H A Ddeflate.c107 ulong bits; /* bit shift register */ member
135 short bits; /* length of the code */ member
159 static void lzput(LZstate*, ulong bits, int nbits);
231 litlentab[i].bits = 8; in deflateinit()
233 litlentab[i].bits = 9; in deflateinit()
235 litlentab[i].bits = 7; in deflateinit()
237 litlentab[i].bits = 8; in deflateinit()
250 offtab[i].bits = 5; in deflateinit()
308 lz->bits = 0; in deflatereset()
503 lzput(lz, dlitlentab[DeflateEob].encode, dlitlentab[DeflateEob].bits); in deflateb()
[all …]
/plan9/sys/src/cmd/jpg/
H A Dtoico.c23 ushort bits; /* bits per pixel */ member
105 Bputs(b, icon->bits); in main()
119 Bputs(b, icon->bits); in main()
168 icon->bits = 1<<icon->img->depth; in readicon()
185 icon->bits = 8; in readicon()
228 int bits; in mkxorand() local
269 bits = 1; in mkxorand()
272 bits = 2; in mkxorand()
275 bits = 4; in mkxorand()
278 bits = 8; in mkxorand()
[all …]
/plan9/sys/src/games/mp3dec/
H A Dfixed.c46 unsigned int bits; in mad_f_div() local
66 for (bits = MAD_F_FRACBITS; bits && r; --bits) { in mad_f_div()
80 return q << bits; in mad_f_div()
/plan9/sys/src/cmd/unix/drawterm/libmp/
H A Dmprand.c7 mprand(int bits, void (*gen)(uchar*, int), mpint *b) in mprand() argument
13 n = DIGITS(bits); in mprand()
15 b = mpnew(bits); in mprand()
17 mpbits(b, bits); in mprand()
27 m = bits%Dbits; in mprand()
/plan9/sys/src/libmp/port/
H A Dmprand.c7 mprand(int bits, void (*gen)(uchar*, int), mpint *b) in mprand() argument
13 n = DIGITS(bits); in mprand()
15 b = mpnew(bits); in mprand()
17 mpbits(b, bits); in mprand()
27 m = bits%Dbits; in mprand()

12345678910>>...12