| /plan9/sys/src/cmd/gs/zlib/ |
| H A D | inflate.c | 95 local void fixedtables OF((struct inflate_state FAR *state)); 106 struct inflate_state FAR *state; local 108 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; 109 state = (struct inflate_state FAR *)strm->state; 110 strm->total_in = strm->total_out = state->total = 0; 113 state->mode = HEAD; 114 state->last = 0; 115 state->havedict = 0; 116 state->wsize = 0; 117 state->whave = 0; [all …]
|
| H A D | infback.c | 19 local void fixedtables OF((struct inflate_state FAR *state)); 35 struct inflate_state FAR *state; local 49 state = (struct inflate_state FAR *)ZALLOC(strm, 1, 51 if (state == Z_NULL) return Z_MEM_ERROR; 53 strm->state = (voidpf)state; 54 state->wbits = windowBits; 55 state->wsize = 1U << windowBits; 56 state->window = window; 57 state->write = 0; 58 state->whave = 0; [all …]
|
| /plan9/sys/src/cmd/unix/drawterm/libsec/ |
| H A D | rc4.c | 9 uchar *state; in setupRC4state() local 12 state = key->state; in setupRC4state() 13 se = &state[256]; in setupRC4state() 14 for(sp = state; sp < se; sp++) in setupRC4state() 15 *sp = sp - state; in setupRC4state() 22 for(sp = state; sp < se; sp++) in setupRC4state() 26 *sp = state[index2]; in setupRC4state() 27 state[index2] = t; in setupRC4state() 38 uchar *state; in rc4() local 43 state = &key->state[0]; in rc4() [all …]
|
| H A D | sha1pickle.c | 15 s->state[0], s->state[1], s->state[2], in sha1pickle() 16 s->state[3], s->state[4]); in sha1pickle() 29 s->state[0] = strtoul(p, &p, 16); in sha1unpickle() 30 s->state[1] = strtoul(p, &p, 16); in sha1unpickle() 31 s->state[2] = strtoul(p, &p, 16); in sha1unpickle() 32 s->state[3] = strtoul(p, &p, 16); in sha1unpickle() 33 s->state[4] = strtoul(p, &p, 16); in sha1unpickle()
|
| /plan9/sys/src/libsec/port/ |
| H A D | rc4.c | 9 uchar *state; in setupRC4state() local 12 state = key->state; in setupRC4state() 13 se = &state[256]; in setupRC4state() 14 for(sp = state; sp < se; sp++) in setupRC4state() 15 *sp = sp - state; in setupRC4state() 22 for(sp = state; sp < se; sp++) in setupRC4state() 26 *sp = state[index2]; in setupRC4state() 27 state[index2] = t; in setupRC4state() 38 uchar *state; in rc4() local 43 state = &key->state[0]; in rc4() [all …]
|
| H A D | sha2_64.c | 36 s->state[0] = 0xc1059ed8; in sha2_224() 37 s->state[1] = 0x367cd507; in sha2_224() 38 s->state[2] = 0x3070dd17; in sha2_224() 39 s->state[3] = 0xf70e5939; in sha2_224() 40 s->state[4] = 0xffc00b31; in sha2_224() 41 s->state[5] = 0x68581511; in sha2_224() 42 s->state[6] = 0x64f98fa7; in sha2_224() 43 s->state[7] = 0xbefa4fa4; in sha2_224() 63 s->state[0] = 0x6a09e667; in sha2_256() 64 s->state[1] = 0xbb67ae85; in sha2_256() [all …]
|
| H A D | sha1pickle.c | 15 s->state[0], s->state[1], s->state[2], in sha1pickle() 16 s->state[3], s->state[4]); in sha1pickle() 29 s->state[0] = strtoul(p, &p, 16); in sha1unpickle() 30 s->state[1] = strtoul(p, &p, 16); in sha1unpickle() 31 s->state[2] = strtoul(p, &p, 16); in sha1unpickle() 32 s->state[3] = strtoul(p, &p, 16); in sha1unpickle() 33 s->state[4] = strtoul(p, &p, 16); in sha1unpickle()
|
| /plan9/sys/src/cmd/gs/src/ |
| H A D | sjbig2.c | 48 stream_jbig2decode_state *const state = in s_jbig2decode_error() local 73 if (state != NULL) state->error = code; in s_jbig2decode_error() 135 stream_jbig2decode_state *state = (stream_jbig2decode_state*)ss; in s_jbig2decode_set_global_ctx() local 136 state->global_ctx = global_ctx; in s_jbig2decode_set_global_ctx() 147 stream_jbig2decode_state *const state = (stream_jbig2decode_state *) ss; in s_jbig2decode_init() local 148 Jbig2GlobalCtx *global_ctx = state->global_ctx; /* may be NULL */ in s_jbig2decode_init() 151 state->decode_ctx = jbig2_ctx_new(NULL, JBIG2_OPTIONS_EMBEDDED, in s_jbig2decode_init() 153 state->image = 0; in s_jbig2decode_init() 154 state->error = 0; in s_jbig2decode_init() 165 stream_jbig2decode_state *const state = (stream_jbig2decode_state *) ss; in s_jbig2decode_process() local [all …]
|
| H A D | sjpx.c | 49 stream_jpxd_state *const state = (stream_jpxd_state *) ss; in s_jpxd_init() local 52 state->buffer = NULL; in s_jpxd_init() 53 state->bufsize = 0; in s_jpxd_init() 54 state->buffill = 0; in s_jpxd_init() 55 state->stream = NULL; in s_jpxd_init() 56 state->image = NULL; in s_jpxd_init() 57 state->offset = 0; in s_jpxd_init() 58 state->jpx_memory = ss->memory ? ss->memory->non_gc_memory : gs_lib_ctx_get_non_gc_memory_t(); in s_jpxd_init() 63 state->buffer = gs_malloc(state->jpx_memory, 4096, 1, "JPXDecode temp buffer"); in s_jpxd_init() 64 status = (state->buffer == NULL); in s_jpxd_init() [all …]
|
| H A D | gscrypt1.h | 35 #define encrypt_next(ch, state, chvar)\ argument 36 (chvar = ((ch) ^ (state >> 8)),\ 37 state = (chvar + state) * crypt_c1 + crypt_c2) 38 #define decrypt_this(ch, state)\ argument 39 ((ch) ^ (state >> 8)) 40 #define decrypt_next(ch, state, chvar)\ argument 41 (chvar = decrypt_this(ch, state),\ 42 decrypt_skip_next(ch, state)) 43 #define decrypt_skip_next(ch, state)\ argument 44 (state = ((ch) + state) * crypt_c1 + crypt_c2) [all …]
|
| H A D | zmisc1.c | 49 crypt_state state; in type1crypt() local 53 state = op[-2].value.intval; in type1crypt() 54 if (op[-2].value.intval != state) in type1crypt() 62 &state)); /* can't fail */ in type1crypt() 63 op[-2].value.intval = state; in type1crypt() 92 stream_exE_state state; in zexE() local 93 int code = eexec_param(op, &state.cstate); in zexE() 97 return filter_write(i_ctx_p, code, &s_exE_template, (stream_state *)&state, 0); in zexE() 106 stream_exD_state state; in zexD() local 109 (*s_exD_template.set_defaults)((stream_state *)&state); in zexD() [all …]
|
| H A D | scfparam.c | 73 stream_CF_state state; in s_CF_put_params() local 76 state = *ss; in s_CF_put_params() 77 code = gs_param_read_items(plist, (void *)&state, s_CF_param_items); in s_CF_put_params() 79 (state.K < -cf_max_height || state.K > cf_max_height || in s_CF_put_params() 80 state.Columns < 0 || state.Columns > cfe_max_width || in s_CF_put_params() 81 state.Rows < 0 || state.Rows > cf_max_height || in s_CF_put_params() 82 state.DamagedRowsBeforeError < 0 || in s_CF_put_params() 83 state.DamagedRowsBeforeError > cf_max_height || in s_CF_put_params() 84 state.DecodedByteAlign < 1 || state.DecodedByteAlign > 16 || in s_CF_put_params() 85 (state.DecodedByteAlign & (state.DecodedByteAlign - 1)) != 0) in s_CF_put_params() [all …]
|
| H A D | gdevjpeg.c | 237 stream_DCT_state state; in jpeg_print_page() local 246 state.template = &jcdp->template; in jpeg_print_page() 247 state.memory = 0; in jpeg_print_page() 248 if (state.template->set_defaults) in jpeg_print_page() 249 (*state.template->set_defaults) ((stream_state *) & state); in jpeg_print_page() 250 state.QFactor = 1.0; /* disable quality adjustment in zfdcte.c */ in jpeg_print_page() 251 state.ColorTransform = 1; /* default for RGB */ in jpeg_print_page() 254 state.NoMarker = true; /* do not insert our own Adobe marker */ in jpeg_print_page() 255 state.Markers.data = 0; in jpeg_print_page() 256 state.Markers.size = 0; in jpeg_print_page() [all …]
|
| H A D | zfdcte.c | 47 stream_DCT_state state; in zDCTE() local 60 (*s_DCTE_template.set_defaults) ((stream_state *) & state); in zDCTE() 61 state.data.compress = jcdp; in zDCTE() 62 jcdp->memory = state.jpeg_memory = mem; /* set now for allocation */ in zDCTE() 63 state.report_error = filter_report_error; /* in case create fails */ in zDCTE() 64 if ((code = gs_jpeg_create_compress(&state)) < 0) in zDCTE() 73 if ((code = s_DCTE_put_params((gs_param_list *) & list, &state)) < 0) in zDCTE() 78 state.scan_line_size = jcdp->cinfo.input_components * in zDCTE() 81 max(s_DCTE_template.min_in_size, state.scan_line_size); in zDCTE() 84 max(s_DCTE_template.min_out_size, state.Markers.size); in zDCTE() [all …]
|
| H A D | gdevtfax.c | 261 stream_CFE_state state; in tiffcrle_print_page() local 264 gdev_fax_init_fax_state(&state, (gx_device_fax *)dev); in tiffcrle_print_page() 265 state.EndOfLine = false; in tiffcrle_print_page() 266 state.EncodedByteAlign = true; in tiffcrle_print_page() 271 return tifff_print_page(dev, prn_stream, &state, &dir); in tiffcrle_print_page() 276 stream_CFE_state state; in tiffg3_print_page() local 279 gdev_fax_init_fax_state(&state, (gx_device_fax *)dev); in tiffg3_print_page() 280 state.EndOfLine = true; in tiffg3_print_page() 281 state.EncodedByteAlign = true; in tiffg3_print_page() 286 return tifff_print_page(dev, prn_stream, &state, &dir); in tiffg3_print_page() [all …]
|
| H A D | gp_macio.c | 892 fontenum_t *state = gs_alloc_bytes(mem, sizeof(fontenum_t), in gp_enumerate_fonts_init() local 894 FMFontIterator *Iterator = &state->Iterator; in gp_enumerate_fonts_init() 897 if (state != NULL) { in gp_enumerate_fonts_init() 898 state->count = 0; in gp_enumerate_fonts_init() 899 state->name = NULL; in gp_enumerate_fonts_init() 900 state->path = NULL; in gp_enumerate_fonts_init() 904 memset(&state->last_container, 0, sizeof(FSSpec)); in gp_enumerate_fonts_init() 905 state->last_container_path = NULL; in gp_enumerate_fonts_init() 906 state->last_table = NULL; in gp_enumerate_fonts_init() 909 return (void *)state; in gp_enumerate_fonts_init() [all …]
|
| H A D | gxp1fill.c | 251 tile_fill_state_t state; in gx_dc_pattern_fill_rectangle() local 259 code = tile_fill_init(&state, pdevc, dev, false); in gx_dc_pattern_fill_rectangle() 264 imod(-(int)(ptile->step_matrix.tx - state.phase.x + 0.5), in gx_dc_pattern_fill_rectangle() 267 imod(-(int)(ptile->step_matrix.ty - state.phase.y + 0.5), in gx_dc_pattern_fill_rectangle() 270 if (state.pcdev != dev) in gx_dc_pattern_fill_rectangle() 271 tile_clip_set_phase(&state.cdev, px, py); in gx_dc_pattern_fill_rectangle() 273 code = (*dev_proc(state.pcdev, strip_tile_rectangle)) in gx_dc_pattern_fill_rectangle() 274 (state.pcdev, bits, x, y, w, h, in gx_dc_pattern_fill_rectangle() 277 code = (*dev_proc(state.pcdev, strip_copy_rop)) in gx_dc_pattern_fill_rectangle() 278 (state.pcdev, in gx_dc_pattern_fill_rectangle() [all …]
|
| H A D | zfbcp.c | 54 stream_BCPD_state state; in zBCPD() local 56 state.signal_interrupt = no_bcp_signal_interrupt; in zBCPD() 57 state.request_status = no_bcp_request_status; in zBCPD() 58 return filter_read(i_ctx_p, 0, &s_BCPD_template, (stream_state *)&state, 0); in zBCPD() 74 stream_BCPD_state state; in zTBCPD() local 76 state.signal_interrupt = no_bcp_signal_interrupt; in zTBCPD() 77 state.request_status = no_bcp_request_status; in zTBCPD() 78 return filter_read(i_ctx_p, 0, &s_TBCPD_template, (stream_state *)&state, 0); in zTBCPD()
|
| /plan9/sys/src/cmd/tcs/ |
| H A D | conv_jis.c | 21 static enum { state0, state1, state2, state3, state4 } state = state0; in alljis() local 29 switch(state) in alljis() 32 if(c == ESC){ state = state1; return; } in alljis() 53 lastc = c; state = state4; return; in alljis() 56 if(c == '$'){ state = state2; return; } in alljis() 57 if(c == '('){ state = state3; return; } in alljis() 58 emit(ESC); state = state0; goto again; in alljis() 62 set8 = 1; state = state0; return; in alljis() 64 emit(ESC); emit('$'); state = state0; goto again; in alljis() 69 set8 = 0; state = state0; return; in alljis() [all …]
|
| H A D | tune.c | 183 static int state = 0; in tune_out() local 193 switch(state){ in tune_out() 198 state = 1; in tune_out() 201 state = 3; in tune_out() 213 state = 5; in tune_out() 215 state = 4; in tune_out() 217 state = 2; in tune_out() 219 state = 6; in tune_out() 223 state = 0; in tune_out() 233 state = 0; in tune_out() [all …]
|
| /plan9/sys/src/cmd/gs/jpeg/ |
| H A D | jchuff.c | 270 #define emit_byte(state,val,action) \ argument 271 { *(state)->next_output_byte++ = (JOCTET) (val); \ 272 if (--(state)->free_in_buffer == 0) \ 273 if (! dump_buffer(state)) \ 278 dump_buffer (working_state * state) in dump_buffer() argument 281 struct jpeg_destination_mgr * dest = state->cinfo->dest; in dump_buffer() 283 if (! (*dest->empty_output_buffer) (state->cinfo)) in dump_buffer() 286 state->next_output_byte = dest->next_output_byte; in dump_buffer() 287 state->free_in_buffer = dest->free_in_buffer; in dump_buffer() 302 emit_bits (working_state * state, unsigned int code, int size) in LOCAL() [all …]
|
| H A D | jdhuff.h | 138 #define CHECK_BIT_BUFFER(state,nbits,action) \ argument 140 if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \ 142 get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } 155 JPP((bitread_working_state * state, register bit_buf_type get_buffer, 176 #define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \ argument 179 if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \ 180 get_buffer = state.get_buffer; bits_left = state.bits_left; \ 192 if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ 194 get_buffer = state.get_buffer; bits_left = state.bits_left; \ 200 JPP((bitread_working_state * state, register bit_buf_type get_buffer,
|
| /plan9/sys/src/cmd/dict/ |
| H A D | ahd.c | 33 int c, state = Run; in ahdprintentry() local 46 switch(state){ in ahdprintentry() 50 state = Openper; in ahdprintentry() 64 state = Openat; in ahdprintentry() 67 state = Run; in ahdprintentry() 74 state = Closeat; in ahdprintentry() 91 state = Run; in ahdprintentry() 97 state = Openat; in ahdprintentry() 111 int c, k = 0, state = 0; in ahdnextoff() local 119 if(c != pat[state]){ in ahdnextoff() [all …]
|
| H A D | world.c | 65 int nh, state[3]; in worldprintentry() local 74 state[0] = Utf; in worldprintentry() 75 state[1] = 0; in worldprintentry() 76 state[2] = 0; in worldprintentry() 81 putchar(*p++, state); in worldprintentry() 103 putchar(int c, int *state) in putchar() argument 109 switch(state[0]){ in putchar() 113 state[0]++; in putchar() 114 state[1] = c; in putchar() 120 state[0] = Kanahi; in putchar() [all …]
|
| /plan9/sys/src/cmd/aux/ |
| H A D | conswdir.c | 80 int start, state; in process() local 83 state = None; in process() 85 switch(state){ in process() 89 state++; in process() 94 state++; in process() 96 state = None; in process() 100 state++; in process() 102 state = None; in process() 106 state++; in process() 108 state = None; in process() [all …]
|