| /freebsd-12-stable/sys/contrib/zstd/zlibWrapper/ |
| D | gzread.c | 24 local int gz_load(state, buf, len, have) in gz_load() argument 25 gz_statep state; in gz_load() 38 ret = read(state.state->fd, buf + *have, get); 44 gz_error(state, Z_ERRNO, zstrerror()); 48 state.state->eof = 1; 59 local int gz_avail(state) in gz_avail() argument 60 gz_statep state; in gz_avail() 63 z_streamp strm = &(state.state->strm); 65 if (state.state->err != Z_OK && state.state->err != Z_BUF_ERROR) 67 if (state.state->eof == 0) { [all …]
|
| D | gzwrite.c | 20 local int gz_init(state) in gz_init() argument 21 gz_statep state; in gz_init() 24 z_streamp strm = &(state.state->strm); 27 state.state->in = (unsigned char *)malloc(state.state->want << 1); 28 if (state.state->in == NULL) { 29 gz_error(state, Z_MEM_ERROR, "out of memory"); 34 if (!state.state->direct) { 36 state.state->out = (unsigned char *)malloc(state.state->want); 37 if (state.state->out == NULL) { 38 free(state.state->in); [all …]
|
| D | gzlib.c | 78 local void gz_reset(state) in gz_reset() argument 79 gz_statep state; in gz_reset() 81 state.state->x.have = 0; /* no output data available */ 82 if (state.state->mode == GZ_READ) { /* for reading ... */ 83 state.state->eof = 0; /* not at end of file */ 84 state.state->past = 0; /* have not read past end yet */ 85 state.state->how = LOOK; /* look for gzip header */ 87 state.state->seek = 0; /* no seek request pending */ 88 gz_error(state, Z_OK, NULL); /* clear error */ 89 state.state->x.pos = 0; /* no uncompressed data yet */ [all …]
|
| /freebsd-12-stable/sys/contrib/zlib/ |
| D | inflate.c | 96 local void fixedtables OF((struct inflate_state FAR *state)); 108 struct inflate_state FAR *state; local 112 state = (struct inflate_state FAR *)strm->state; 113 if (state == Z_NULL || state->strm != strm || 114 state->mode < HEAD || state->mode > SYNC) 122 struct inflate_state FAR *state; local 125 state = (struct inflate_state FAR *)strm->state; 126 strm->total_in = strm->total_out = state->total = 0; 128 if (state->wrap) /* to support ill-conceived Java test suite */ 129 strm->adler = state->wrap & 1; [all …]
|
| D | gzread.c | 24 local int gz_load(state, buf, len, have) in gz_load() argument 25 gz_statep state; in gz_load() 38 ret = read(state->fd, buf + *have, get); 44 gz_error(state, Z_ERRNO, zstrerror()); 48 state->eof = 1; 59 local int gz_avail(state) in gz_avail() argument 60 gz_statep state; in gz_avail() 63 z_streamp strm = &(state->strm); 65 if (state->err != Z_OK && state->err != Z_BUF_ERROR) 67 if (state->eof == 0) { [all …]
|
| D | gzwrite.c | 20 local int gz_init(state) in gz_init() argument 21 gz_statep state; in gz_init() 24 z_streamp strm = &(state->strm); 27 state->in = (unsigned char *)malloc(state->want << 1); 28 if (state->in == NULL) { 29 gz_error(state, Z_MEM_ERROR, "out of memory"); 34 if (!state->direct) { 36 state->out = (unsigned char *)malloc(state->want); 37 if (state->out == NULL) { 38 free(state->in); [all …]
|
| D | infback.c | 19 local void fixedtables OF((struct inflate_state FAR *state)); 35 struct inflate_state FAR *state; local 58 state = (struct inflate_state FAR *)ZALLOC(strm, 1, 60 if (state == Z_NULL) return Z_MEM_ERROR; 62 strm->state = (struct internal_state FAR *)state; 63 state->dmax = 32768U; 64 state->wbits = (uInt)windowBits; 65 state->wsize = 1U << windowBits; 66 state->window = window; 67 state->wnext = 0; [all …]
|
| D | gzlib.c | 78 local void gz_reset(state) in gz_reset() argument 79 gz_statep state; in gz_reset() 81 state->x.have = 0; /* no output data available */ 82 if (state->mode == GZ_READ) { /* for reading ... */ 83 state->eof = 0; /* not at end of file */ 84 state->past = 0; /* have not read past end yet */ 85 state->how = LOOK; /* look for gzip header */ 88 state->reset = 0; /* no deflateReset pending */ 89 state->seek = 0; /* no seek request pending */ 90 gz_error(state, Z_OK, NULL); /* clear error */ [all …]
|
| /freebsd-12-stable/sys/dev/bhnd/nvram/ |
| D | bhnd_nvram_data_sprom_subr.c | 53 static int bhnd_sprom_opcode_reset(bhnd_sprom_opcode_state *state); 55 static int bhnd_sprom_opcode_set_type(bhnd_sprom_opcode_state *state, 58 static int bhnd_sprom_opcode_set_var(bhnd_sprom_opcode_state *state, 60 static int bhnd_sprom_opcode_clear_var(bhnd_sprom_opcode_state *state); 62 static int bhnd_sprom_opcode_flush_bind(bhnd_sprom_opcode_state *state); 64 static int bhnd_sprom_opcode_read_opval32(bhnd_sprom_opcode_state *state, 67 static int bhnd_sprom_opcode_step(bhnd_sprom_opcode_state *state, 86 bhnd_sprom_opcode_init(bhnd_sprom_opcode_state *state, in bhnd_sprom_opcode_init() argument 95 state->layout = layout; in bhnd_sprom_opcode_init() 96 state->idx = NULL; in bhnd_sprom_opcode_init() [all …]
|
| /freebsd-12-stable/contrib/libarchive/libarchive/ |
| D | archive_write_add_filter_compress.c | 149 struct private_data *state; in archive_compressor_compress_open() local 155 state = (struct private_data *)calloc(1, sizeof(*state)); in archive_compressor_compress_open() 156 if (state == NULL) { in archive_compressor_compress_open() 171 state->compressed_buffer_size = bs; in archive_compressor_compress_open() 172 state->compressed = malloc(state->compressed_buffer_size); in archive_compressor_compress_open() 174 if (state->compressed == NULL) { in archive_compressor_compress_open() 177 free(state); in archive_compressor_compress_open() 185 state->max_maxcode = 0x10000; /* Should NEVER generate this code. */ in archive_compressor_compress_open() 186 state->in_count = 0; /* Length of input. */ in archive_compressor_compress_open() 187 state->bit_buf = 0; in archive_compressor_compress_open() [all …]
|
| D | archive_read_support_filter_compress.c | 213 struct private_data *state; in compress_bidder_init() local 221 state = (struct private_data *)calloc(sizeof(*state), 1); in compress_bidder_init() 223 if (state == NULL || out_block == NULL) { in compress_bidder_init() 225 free(state); in compress_bidder_init() 232 self->data = state; in compress_bidder_init() 233 state->out_block_size = out_block_size; in compress_bidder_init() 234 state->out_block = out_block; in compress_bidder_init() 249 state->maxcode_bits = code & 0x1f; in compress_bidder_init() 250 state->maxcode = (1 << state->maxcode_bits); in compress_bidder_init() 251 state->use_reset_code = code & 0x80; in compress_bidder_init() [all …]
|
| D | archive_read_support_filter_program.c | 138 struct program_bidder *state; in archive_read_support_filter_program_signature() local 143 state = (struct program_bidder *)calloc(1, sizeof (*state)); in archive_read_support_filter_program_signature() 144 if (state == NULL) in archive_read_support_filter_program_signature() 146 state->cmd = strdup(cmd); in archive_read_support_filter_program_signature() 147 if (state->cmd == NULL) in archive_read_support_filter_program_signature() 151 state->signature_len = signature_len; in archive_read_support_filter_program_signature() 152 state->signature = malloc(signature_len); in archive_read_support_filter_program_signature() 153 memcpy(state->signature, signature, signature_len); in archive_read_support_filter_program_signature() 156 if (__archive_read_register_bidder(a, state, NULL, in archive_read_support_filter_program_signature() 158 free_state(state); in archive_read_support_filter_program_signature() [all …]
|
| /freebsd-12-stable/contrib/tcpdump/missing/ |
| D | snprintf.c | 59 struct state { struct 65 int (*append_char)(struct state *, unsigned char); argument 66 int (*reserve)(struct state *, size_t); argument 72 sn_reserve (struct state *state, size_t n) in sn_reserve() argument 74 return state->s + n > state->theend; in sn_reserve() 78 sn_append_char (struct state *state, unsigned char c) in sn_append_char() argument 80 if (sn_reserve (state, 1)) { in sn_append_char() 83 *state->s++ = c; in sn_append_char() 91 as_reserve (struct state *state, size_t n) 93 if (state->s + n > state->theend) { [all …]
|
| /freebsd-12-stable/contrib/libpcap/missing/ |
| D | snprintf.c | 63 struct state { struct 69 int (*append_char)(struct state *, unsigned char); argument 70 int (*reserve)(struct state *, size_t); argument 76 sn_reserve (struct state *state, size_t n) in sn_reserve() argument 78 return state->s + n > state->theend; in sn_reserve() 82 sn_append_char (struct state *state, unsigned char c) in sn_append_char() argument 84 if (sn_reserve (state, 1)) { in sn_append_char() 87 *state->s++ = c; in sn_append_char() 95 as_reserve (struct state *state, size_t n) 97 if (state->s + n > state->theend) { [all …]
|
| /freebsd-12-stable/sys/dev/evdev/ |
| D | uinput.c | 52 #define debugf(state, fmt, args...) printf("uinput: " fmt "\n", ##args) argument 54 #define debugf(state, fmt, args...) argument 59 #define UINPUT_LOCK(state) sx_xlock(&(state)->ucs_lock) argument 60 #define UINPUT_UNLOCK(state) sx_unlock(&(state)->ucs_lock) argument 61 #define UINPUT_LOCK_ASSERT(state) sx_assert(&(state)->ucs_lock, SA_LOCKED) argument 62 #define UINPUT_EMPTYQ(state) \ argument 63 ((state)->ucs_buffer_head == (state)->ucs_buffer_tail) 165 struct uinput_cdev_state *state = evdev_get_softc(evdev); in uinput_ev_event() local 170 UINPUT_LOCK(state); in uinput_ev_event() 171 if (state->ucs_state == UINPUT_RUNNING) { in uinput_ev_event() [all …]
|
| /freebsd-12-stable/contrib/bearssl/src/symcipher/ |
| D | aes_small_enc.c | 30 add_round_key(unsigned *state, const uint32_t *skeys) in add_round_key() argument 38 state[i + 0] ^= (unsigned)(k >> 24); in add_round_key() 39 state[i + 1] ^= (unsigned)(k >> 16) & 0xFF; in add_round_key() 40 state[i + 2] ^= (unsigned)(k >> 8) & 0xFF; in add_round_key() 41 state[i + 3] ^= (unsigned)k & 0xFF; in add_round_key() 46 sub_bytes(unsigned *state) in sub_bytes() argument 51 state[i] = S[state[i]]; in sub_bytes() 56 shift_rows(unsigned *state) in shift_rows() argument 60 tmp = state[1]; in shift_rows() 61 state[1] = state[5]; in shift_rows() [all …]
|
| D | aes_small_dec.c | 56 add_round_key(unsigned *state, const uint32_t *skeys) in add_round_key() argument 64 state[i + 0] ^= (unsigned)(k >> 24); in add_round_key() 65 state[i + 1] ^= (unsigned)(k >> 16) & 0xFF; in add_round_key() 66 state[i + 2] ^= (unsigned)(k >> 8) & 0xFF; in add_round_key() 67 state[i + 3] ^= (unsigned)k & 0xFF; in add_round_key() 72 inv_sub_bytes(unsigned *state) in inv_sub_bytes() argument 77 state[i] = iS[state[i]]; in inv_sub_bytes() 82 inv_shift_rows(unsigned *state) in inv_shift_rows() argument 86 tmp = state[13]; in inv_shift_rows() 87 state[13] = state[9]; in inv_shift_rows() [all …]
|
| /freebsd-12-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ |
| D | zcp.c | 137 zcp_error_handler(lua_State *state) in zcp_error_handler() argument 141 zcp_cleanup(state); in zcp_error_handler() 143 VERIFY3U(1, ==, lua_gettop(state)); in zcp_error_handler() 144 msg = lua_tostring(state, 1); in zcp_error_handler() 145 luaL_traceback(state, state, msg, 1); in zcp_error_handler() 150 zcp_argerror(lua_State *state, int narg, const char *msg, ...) in zcp_argerror() argument 155 const char *buf = lua_pushvfstring(state, msg, alist); in zcp_argerror() 158 return (luaL_argerror(state, narg, buf)); in zcp_argerror() 173 zcp_register_cleanup(lua_State *state, zcp_cleanup_t cleanfunc, void *cleanarg) in zcp_register_cleanup() argument 175 zcp_run_info_t *ri = zcp_run_info(state); in zcp_register_cleanup() [all …]
|
| /freebsd-12-stable/contrib/expat/lib/ |
| D | xmlrole.c | 115 # define setTopLevel(state) \ argument 116 ((state)->handler \ 117 = ((state)->documentEntity ? internalSubset : externalSubset1)) 119 # define setTopLevel(state) ((state)->handler = internalSubset) argument 122 typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok, 138 static int FASTCALL common(PROLOG_STATE *state, int tok); 141 prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog0() argument 145 state->handler = prolog1; in prolog0() 148 state->handler = prolog1; in prolog0() 151 state->handler = prolog1; in prolog0() [all …]
|
| /freebsd-12-stable/contrib/binutils/opcodes/ |
| D | arc-dis.c | 75 mwerror (state, _("Illegal limm reference in last instruction!\n")); \ 76 a = state->words[1]; \ 85 flag = BIT (state->words[0], 8); \ 86 state->nullifyMode = BITS (state->words[0], 5, 6); \ 87 cond = BITS (state->words[0], 0, 4); \ 96 cond = BITS (state->words[0], 0, 4); \ 115 field = FIELDD (state->words[0]); \ 123 fieldA = FIELDA (state->words[0]); \ 135 fieldB = FIELDB (state->words[0]); \ 143 fieldC = FIELDC (state->words[0]); \ [all …]
|
| /freebsd-12-stable/crypto/openssh/ |
| D | packet.c | 235 struct session_state *state = NULL; in ssh_alloc_session_state() local 238 (state = calloc(1, sizeof(*state))) == NULL || in ssh_alloc_session_state() 240 (state->input = sshbuf_new()) == NULL || in ssh_alloc_session_state() 241 (state->output = sshbuf_new()) == NULL || in ssh_alloc_session_state() 242 (state->outgoing_packet = sshbuf_new()) == NULL || in ssh_alloc_session_state() 243 (state->incoming_packet = sshbuf_new()) == NULL) in ssh_alloc_session_state() 245 TAILQ_INIT(&state->outgoing); in ssh_alloc_session_state() 248 state->connection_in = -1; in ssh_alloc_session_state() 249 state->connection_out = -1; in ssh_alloc_session_state() 250 state->max_packet_size = 32768; in ssh_alloc_session_state() [all …]
|
| D | sshkey-xmss.c | 97 struct ssh_xmss_state *state; in sshkey_xmss_init() local 103 state = calloc(sizeof(struct ssh_xmss_state), 1); in sshkey_xmss_init() 104 if (state == NULL) in sshkey_xmss_init() 107 state->n = 32; in sshkey_xmss_init() 108 state->w = 16; in sshkey_xmss_init() 109 state->h = 10; in sshkey_xmss_init() 111 state->n = 32; in sshkey_xmss_init() 112 state->w = 16; in sshkey_xmss_init() 113 state->h = 16; in sshkey_xmss_init() 115 state->n = 32; in sshkey_xmss_init() [all …]
|
| /freebsd-12-stable/sys/dev/vkbd/ |
| D | vkbd.c | 203 vkbd_state_t *state = (vkbd_state_t *) dev->si_drv1; in vkbd_dev_open() local 206 if (state == NULL) { in vkbd_dev_open() 214 state = (vkbd_state_t *) kbd->kb_data; in vkbd_dev_open() 232 VKBD_LOCK(state); in vkbd_dev_open() 234 if (state->ks_flags & OPEN) { in vkbd_dev_open() 235 VKBD_UNLOCK(state); in vkbd_dev_open() 239 state->ks_flags |= OPEN; in vkbd_dev_open() 240 state->ks_dev = dev; in vkbd_dev_open() 242 VKBD_UNLOCK(state); in vkbd_dev_open() 252 vkbd_state_t *state = NULL; in vkbd_dev_close() local [all …]
|
| /freebsd-12-stable/sys/dev/kbdmux/ |
| D | kbdmux.c | 179 kbdmux_kbd_putc(kbdmux_state_t *state, char c) in kbdmux_kbd_putc() argument 183 if (state->ks_inq_length == KBDMUX_Q_SIZE) in kbdmux_kbd_putc() 186 p = (state->ks_inq_start + state->ks_inq_length) % KBDMUX_Q_SIZE; in kbdmux_kbd_putc() 187 state->ks_inq[p] = c; in kbdmux_kbd_putc() 188 state->ks_inq_length++; in kbdmux_kbd_putc() 192 kbdmux_kbd_getc(kbdmux_state_t *state) in kbdmux_kbd_getc() argument 196 if (state->ks_inq_length == 0) in kbdmux_kbd_getc() 199 c = state->ks_inq[state->ks_inq_start]; in kbdmux_kbd_getc() 200 state->ks_inq_start = (state->ks_inq_start + 1) % KBDMUX_Q_SIZE; in kbdmux_kbd_getc() 201 state->ks_inq_length--; in kbdmux_kbd_getc() [all …]
|
| /freebsd-12-stable/usr.sbin/ppp/ |
| D | deflate.c | 60 struct deflate_state *state = (struct deflate_state *)v; in DeflateResetOutput() local 62 state->seqno = 0; in DeflateResetOutput() 63 state->uncomp_rec = 0; in DeflateResetOutput() 64 deflateReset(&state->cx); in DeflateResetOutput() 74 struct deflate_state *state = (struct deflate_state *)v; in DeflateOutput() local 100 *wp++ = state->seqno >> 8; in DeflateOutput() 101 *wp++ = state->seqno & 0377; in DeflateOutput() 102 log_Printf(LogDEBUG, "DeflateOutput: Seq %d\n", state->seqno); in DeflateOutput() 103 state->seqno++; in DeflateOutput() 106 state->cx.next_out = wp; in DeflateOutput() [all …]
|