| /dragonfly/contrib/zlib-1.2/ |
| HD | 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 …]
|
| HD | gzread.c | 21 local int gz_load(state, buf, len, have) in gz_load() argument 22 gz_statep state; in gz_load() 35 ret = read(state->fd, buf + *have, get); 41 gz_error(state, Z_ERRNO, zstrerror()); 45 state->eof = 1; 56 local int gz_avail(state) in gz_avail() argument 57 gz_statep state; in gz_avail() 60 z_streamp strm = &(state->strm); 62 if (state->err != Z_OK && state->err != Z_BUF_ERROR) 64 if (state->eof == 0) { [all …]
|
| HD | gzwrite.c | 17 local int gz_init(state) in gz_init() argument 18 gz_statep state; in gz_init() 21 z_streamp strm = &(state->strm); 24 state->in = (unsigned char *)malloc(state->want << 1); 25 if (state->in == NULL) { 26 gz_error(state, Z_MEM_ERROR, "out of memory"); 31 if (!state->direct) { 33 state->out = (unsigned char *)malloc(state->want); 34 if (state->out == NULL) { 35 free(state->in); [all …]
|
| HD | 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 …]
|
| HD | gzlib.c | 75 local void gz_reset(state) in gz_reset() argument 76 gz_statep state; in gz_reset() 78 state->x.have = 0; /* no output data available */ 79 if (state->mode == GZ_READ) { /* for reading ... */ 80 state->eof = 0; /* not at end of file */ 81 state->past = 0; /* have not read past end yet */ 82 state->how = LOOK; /* look for gzip header */ 84 state->seek = 0; /* no seek request pending */ 85 gz_error(state, Z_OK, NULL); /* clear error */ 86 state->x.pos = 0; /* no uncompressed data yet */ [all …]
|
| /dragonfly/sbin/hammer2/zlib/ |
| HD | hammer2_zlib_inflate.c | 102 local void fixedtables(struct inflate_state FAR *state); 112 struct inflate_state FAR *state; in inflateResetKeep() local 114 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; in inflateResetKeep() 115 state = (struct inflate_state FAR *)strm->state; in inflateResetKeep() 116 strm->total_in = strm->total_out = state->total = 0; in inflateResetKeep() 118 if (state->wrap) /* to support ill-conceived Java test suite */ in inflateResetKeep() 119 strm->adler = state->wrap & 1; in inflateResetKeep() 120 state->mode = HEAD; in inflateResetKeep() 121 state->last = 0; in inflateResetKeep() 122 state->havedict = 0; in inflateResetKeep() [all …]
|
| /dragonfly/usr.sbin/makefs/hammer2/zlib/ |
| HD | hammer2_zlib_inflate.c | 107 local void fixedtables(struct inflate_state FAR *state); 117 struct inflate_state FAR *state; in inflateResetKeep() local 119 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; in inflateResetKeep() 120 state = (struct inflate_state FAR *)strm->state; in inflateResetKeep() 121 strm->total_in = strm->total_out = state->total = 0; in inflateResetKeep() 123 if (state->wrap) /* to support ill-conceived Java test suite */ in inflateResetKeep() 124 strm->adler = state->wrap & 1; in inflateResetKeep() 125 state->mode = HEAD; in inflateResetKeep() 126 state->last = 0; in inflateResetKeep() 127 state->havedict = 0; in inflateResetKeep() [all …]
|
| /dragonfly/sys/vfs/hammer2/zlib/ |
| HD | hammer2_zlib_inflate.c | 107 local void fixedtables(struct inflate_state FAR *state); 117 struct inflate_state FAR *state; in inflateResetKeep() local 119 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; in inflateResetKeep() 120 state = (struct inflate_state FAR *)strm->state; in inflateResetKeep() 121 strm->total_in = strm->total_out = state->total = 0; in inflateResetKeep() 123 if (state->wrap) /* to support ill-conceived Java test suite */ in inflateResetKeep() 124 strm->adler = state->wrap & 1; in inflateResetKeep() 125 state->mode = HEAD; in inflateResetKeep() 126 state->last = 0; in inflateResetKeep() 127 state->havedict = 0; in inflateResetKeep() [all …]
|
| /dragonfly/contrib/libarchive/libarchive/ |
| HD | 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 …]
|
| HD | 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 …]
|
| HD | 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 …]
|
| HD | archive_read_support_filter_lz4.c | 223 struct private_data *state; in lz4_reader_init() local 228 state = (struct private_data *)calloc(sizeof(*state), 1); in lz4_reader_init() 229 if (state == NULL) { in lz4_reader_init() 235 self->data = state; in lz4_reader_init() 236 state->stage = SELECT_STREAM; in lz4_reader_init() 245 struct private_data *state = (struct private_data *)self->data; in lz4_allocate_out_block() local 246 size_t out_block_size = state->flags.block_maximum_size; in lz4_allocate_out_block() 249 if (!state->flags.block_independence) in lz4_allocate_out_block() 251 if (state->out_block_size < out_block_size) { in lz4_allocate_out_block() 252 free(state->out_block); in lz4_allocate_out_block() [all …]
|
| /dragonfly/sys/dev/drm/ |
| HD | drm_atomic.c | 54 void drm_atomic_state_default_release(struct drm_atomic_state *state) in drm_atomic_state_default_release() argument 56 kfree(state->connectors); in drm_atomic_state_default_release() 57 kfree(state->crtcs); in drm_atomic_state_default_release() 58 kfree(state->planes); in drm_atomic_state_default_release() 59 kfree(state->private_objs); in drm_atomic_state_default_release() 72 drm_atomic_state_init(struct drm_device *dev, struct drm_atomic_state *state) in drm_atomic_state_init() argument 74 kref_init(&state->ref); in drm_atomic_state_init() 79 state->allow_modeset = true; in drm_atomic_state_init() 81 state->crtcs = kcalloc(dev->mode_config.num_crtc, in drm_atomic_state_init() 82 sizeof(*state->crtcs), GFP_KERNEL); in drm_atomic_state_init() [all …]
|
| HD | drm_atomic_helper.c | 66 drm_atomic_helper_plane_changed(struct drm_atomic_state *state, in drm_atomic_helper_plane_changed() argument 74 crtc_state = drm_atomic_get_new_crtc_state(state, in drm_atomic_helper_plane_changed() 84 crtc_state = drm_atomic_get_new_crtc_state(state, plane_state->crtc); in drm_atomic_helper_plane_changed() 93 static int handle_conflicting_encoders(struct drm_atomic_state *state, in handle_conflicting_encoders() argument 108 for_each_new_connector_in_state(state, connector, new_conn_state, i) { in handle_conflicting_encoders() 149 drm_connector_list_iter_begin(state->dev, &conn_iter); in handle_conflicting_encoders() 153 if (drm_atomic_get_new_connector_state(state, connector)) in handle_conflicting_encoders() 156 encoder = connector->state->best_encoder; in handle_conflicting_encoders() 163 connector->state->crtc->base.id, in handle_conflicting_encoders() 164 connector->state->crtc->name, in handle_conflicting_encoders() [all …]
|
| /dragonfly/sys/kern/ |
| HD | kern_dmsg.c | 78 static void kdmsg_subq_delete(kdmsg_state_t *state); 79 static void kdmsg_simulate_failure(kdmsg_state_t *state, int meto, int error); 80 static void kdmsg_state_abort(kdmsg_state_t *state); 81 static void kdmsg_state_dying(kdmsg_state_t *state); 82 static void kdmsg_state_free(kdmsg_state_t *state); 87 #define kdmsg_state_hold(state) _kdmsg_state_hold(state, __FILE__, __LINE__) argument 88 #define kdmsg_state_drop(state) _kdmsg_state_drop(state, __FILE__, __LINE__) argument 92 #define kdmsg_state_hold(state) _kdmsg_state_hold(state) argument 93 #define kdmsg_state_drop(state) _kdmsg_state_drop(state) argument 95 static void _kdmsg_state_hold(kdmsg_state_t *state KDMSG_DEBUG_ARGS); [all …]
|
| HD | subr_csprng.c | 62 static int csprng_reseed(struct csprng_state *state); 80 csprng_init(struct csprng_state *state) in csprng_init() argument 84 bzero(state->key, sizeof(state->key)); in csprng_init() 85 bzero(&state->cipher_ctx, sizeof(state->cipher_ctx)); in csprng_init() 86 bzero(state->src_pool_idx, sizeof(state->src_pool_idx)); in csprng_init() 87 bzero(&state->last_reseed, sizeof(state->last_reseed)); in csprng_init() 89 state->reseed_cnt = 0; in csprng_init() 90 state->failed_reseeds = 0; in csprng_init() 91 state->callout_based_reseed = 0; in csprng_init() 94 r = csprng_pool_init(&state->pool[i], NULL, 0); in csprng_init() [all …]
|
| /dragonfly/crypto/openssh/ |
| HD | packet.c | 233 struct session_state *state = NULL; in ssh_alloc_session_state() local 236 (state = calloc(1, sizeof(*state))) == NULL || in ssh_alloc_session_state() 238 (state->input = sshbuf_new()) == NULL || in ssh_alloc_session_state() 239 (state->output = sshbuf_new()) == NULL || in ssh_alloc_session_state() 240 (state->outgoing_packet = sshbuf_new()) == NULL || in ssh_alloc_session_state() 241 (state->incoming_packet = sshbuf_new()) == NULL) in ssh_alloc_session_state() 243 TAILQ_INIT(&state->outgoing); in ssh_alloc_session_state() 246 state->connection_in = -1; in ssh_alloc_session_state() 247 state->connection_out = -1; in ssh_alloc_session_state() 248 state->max_packet_size = 32768; in ssh_alloc_session_state() [all …]
|
| HD | 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 …]
|
| /dragonfly/contrib/expat/lib/ |
| HD | 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 …]
|
| /dragonfly/usr.sbin/ppp/ |
| HD | deflate.c | 59 struct deflate_state *state = (struct deflate_state *)v; in DeflateResetOutput() local 61 state->seqno = 0; in DeflateResetOutput() 62 state->uncomp_rec = 0; in DeflateResetOutput() 63 deflateReset(&state->cx); in DeflateResetOutput() 73 struct deflate_state *state = (struct deflate_state *)v; in DeflateOutput() local 99 *wp++ = state->seqno >> 8; in DeflateOutput() 100 *wp++ = state->seqno & 0377; in DeflateOutput() 101 log_Printf(LogDEBUG, "DeflateOutput: Seq %d\n", state->seqno); in DeflateOutput() 102 state->seqno++; in DeflateOutput() 105 state->cx.next_out = wp; in DeflateOutput() [all …]
|
| /dragonfly/usr.bin/window/ |
| HD | scanner.c | 97 int state = 0; in s_gettok() local 101 switch (state) { in s_gettok() 110 state = -1; in s_gettok() 113 state = 1; in s_gettok() 117 state = -1; in s_gettok() 133 state = 2; in s_gettok() 136 state = 3; in s_gettok() 139 state = 4; in s_gettok() 146 state = 0; in s_gettok() 150 state = 2; in s_gettok() [all …]
|
| /dragonfly/contrib/dhcpcd/src/ |
| HD | dhcp6.c | 422 struct dhcp6_state *state; in dhcp6_updateelapsed() local 435 state = D6_STATE(ifp); in dhcp6_updateelapsed() 437 if (state->RTC == 0) { in dhcp6_updateelapsed() 440 state->started = tv; in dhcp6_updateelapsed() 446 secs = eloop_timespec_diff(&tv, &state->started, &nsecs); in dhcp6_updateelapsed() 532 struct dhcp6_state *state; in dhcp6_delegateaddr() local 537 state = D6_STATE(ifp); in dhcp6_delegateaddr() 538 if (state == NULL) { in dhcp6_delegateaddr() 539 ifp->if_data[IF_DATA_DHCP6] = calloc(1, sizeof(*state)); in dhcp6_delegateaddr() 540 state = D6_STATE(ifp); in dhcp6_delegateaddr() [all …]
|
| /dragonfly/contrib/gdb-7/gdb/ |
| HD | ser-unix.c | 88 struct hardwire_ttystate * state); 90 struct hardwire_ttystate * state); 92 static int hardwire_set_tty_state (struct serial *scb, serial_ttystate state); 118 get_tty_state (struct serial *scb, struct hardwire_ttystate *state) in get_tty_state() argument 121 if (tcgetattr (scb->fd, &state->termios) < 0) in get_tty_state() 128 if (ioctl (scb->fd, TCGETA, &state->termio) < 0) in get_tty_state() 134 if (ioctl (scb->fd, TIOCGETP, &state->sgttyb) < 0) in get_tty_state() 136 if (ioctl (scb->fd, TIOCGETC, &state->tc) < 0) in get_tty_state() 138 if (ioctl (scb->fd, TIOCGLTC, &state->ltc) < 0) in get_tty_state() 140 if (ioctl (scb->fd, TIOCLGET, &state->lmode) < 0) in get_tty_state() [all …]
|
| /dragonfly/sys/dev/drm/amd/display/modules/freesync/ |
| HD | freesync.c | 123 struct freesync_state state; member 287 core_freesync->map[core_freesync->num_entities].state. in mod_freesync_add_stream() 289 core_freesync->map[core_freesync->num_entities].state. in mod_freesync_add_stream() 291 core_freesync->map[core_freesync->num_entities].state. in mod_freesync_add_stream() 293 core_freesync->map[core_freesync->num_entities].state.time. in mod_freesync_add_stream() 295 core_freesync->map[core_freesync->num_entities].state. in mod_freesync_add_stream() 376 core_freesync->map[map_index].state.vmin = v_total_min; in adjust_vmin_vmax() 377 core_freesync->map[map_index].state.vmax = v_total_max; in adjust_vmin_vmax() 399 ctx->active = (core_freesync->map[index].state.fullscreen || in update_stream_freesync_context() 400 core_freesync->map[index].state.video || in update_stream_freesync_context() [all …]
|
| /dragonfly/sys/dev/misc/kbdmux/ |
| HD | kbdmux.c | 125 kbdmux_kbd_putc(kbdmux_state_t *state, char c) in kbdmux_kbd_putc() argument 129 if (state->ks_inq_length == KBDMUX_Q_SIZE) in kbdmux_kbd_putc() 132 p = (state->ks_inq_start + state->ks_inq_length) % KBDMUX_Q_SIZE; in kbdmux_kbd_putc() 133 state->ks_inq[p] = c; in kbdmux_kbd_putc() 134 state->ks_inq_length++; in kbdmux_kbd_putc() 138 kbdmux_kbd_getc(kbdmux_state_t *state) in kbdmux_kbd_getc() argument 142 if (state->ks_inq_length == 0) in kbdmux_kbd_getc() 145 c = state->ks_inq[state->ks_inq_start]; in kbdmux_kbd_getc() 146 state->ks_inq_start = (state->ks_inq_start + 1) % KBDMUX_Q_SIZE; in kbdmux_kbd_getc() 147 state->ks_inq_length--; in kbdmux_kbd_getc() [all …]
|