Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 2633) sorted by relevance

12345678910>>...106

/netbsd/src/external/bsd/lutok/dist/
Dstate_test.cpp69 is_available(lutok::state& state, const char* symbol) in is_available() argument
71 luaL_loadstring(raw(state), (std::string("return ") + symbol).c_str()); in is_available()
72 const bool ok = (lua_pcall(raw(state), 0, 1, 0) == 0 && in is_available()
73 !lua_isnil(raw(state), -1)); in is_available()
74 lua_pop(raw(state), 1); in is_available()
88 check_modules(lutok::state& state, const std::string& expected) in check_modules() argument
92 ATF_REQUIRE(!((expected == "base") ^ (is_available(state, "assert")))); in check_modules()
94 (is_available(state, "string.byte")))); in check_modules()
96 (is_available(state, "table.concat")))); in check_modules()
111 lutok::state state = lutok::state_c_gate::connect(raw_state); in c_get_upvalues() local
[all …]
Doperations_test.cpp53 hook_add(lutok::state& state) in hook_add() argument
55 state.push_integer(state.to_integer(-1) + state.to_integer(-2)); in hook_add()
70 hook_multiply(lutok::state& state) in hook_multiply() argument
72 state.push_integer(state.to_integer(-1) * state.to_integer(-2)); in hook_multiply()
83 lutok::state state; in ATF_TEST_CASE_BODY() local
85 lutok::create_module(state, "my_math", members); in ATF_TEST_CASE_BODY()
87 state.open_base(); in ATF_TEST_CASE_BODY()
88 lutok::do_string(state, "return next(my_math) == nil", 1); in ATF_TEST_CASE_BODY()
89 ATF_REQUIRE(state.to_boolean()); in ATF_TEST_CASE_BODY()
90 state.pop(1); in ATF_TEST_CASE_BODY()
[all …]
/netbsd/src/external/ibm-public/postfix/dist/src/cleanup/
Dcleanup_state.c72 CLEANUP_STATE *state = (CLEANUP_STATE *) mymalloc(sizeof(*state)); in cleanup_state_alloc() local
74 state->attr_buf = vstring_alloc(10); in cleanup_state_alloc()
75 state->temp1 = vstring_alloc(10); in cleanup_state_alloc()
76 state->temp2 = vstring_alloc(10); in cleanup_state_alloc()
77 state->temp3 = vstring_alloc(10); in cleanup_state_alloc()
79 state->stripped_buf = vstring_alloc(10); in cleanup_state_alloc()
80 state->src = src; in cleanup_state_alloc()
81 state->dst = 0; in cleanup_state_alloc()
82 state->handle = 0; in cleanup_state_alloc()
83 state->queue_name = 0; in cleanup_state_alloc()
[all …]
Dcleanup_envelope.c94 void cleanup_envelope(CLEANUP_STATE *state, int type, in cleanup_envelope() argument
104 cleanup_out_format(state, REC_TYPE_SIZE, REC_TYPE_SIZE_FORMAT, in cleanup_envelope()
115 state->action = cleanup_envelope_process; in cleanup_envelope()
116 cleanup_envelope_process(state, type, str, len); in cleanup_envelope()
121 static void cleanup_envelope_process(CLEANUP_STATE *state, int type, in cleanup_envelope_process() argument
147 state->queue_id, extra_opts); in cleanup_envelope_process()
149 state->flags |= extra_opts; in cleanup_envelope_process()
157 msg_warn("%s: ignoring bad delay time: %s", state->queue_id, buf); in cleanup_envelope_process()
159 state->defer_delay = defer_delay; in cleanup_envelope_process()
174 cleanup_milter_receive(state, milter_count); in cleanup_envelope_process()
[all …]
Dcleanup_extracted.c85 void cleanup_extracted(CLEANUP_STATE *state, int type, in cleanup_extracted() argument
92 cleanup_out_string(state, REC_TYPE_XTRA, ""); in cleanup_extracted()
97 state->action = cleanup_extracted_process; in cleanup_extracted()
98 cleanup_extracted_process(state, type, buf, len); in cleanup_extracted()
103 void cleanup_extracted_process(CLEANUP_STATE *state, int type, in cleanup_extracted_process() argument
127 state->queue_id, extra_opts); in cleanup_extracted_process()
129 state->flags |= extra_opts; in cleanup_extracted_process()
137 msg_warn("%s: ignoring bad delay time: %s", state->queue_id, buf); in cleanup_extracted_process()
139 state->defer_delay = defer_delay; in cleanup_extracted_process()
147 state->queue_id, type); in cleanup_extracted_process()
[all …]
/netbsd/src/external/ibm-public/postfix/dist/src/smtpd/
Dsmtpd.c1715 static int sasl_client_exception(SMTPD_STATE *state) in sasl_client_exception() argument
1728 state->name, state->addr)) == 0) in sasl_client_exception()
1733 state->namaddr, match); in sasl_client_exception()
1742 static const char *smtpd_whatsup(SMTPD_STATE *state) in smtpd_whatsup() argument
1750 if (state->sender) in smtpd_whatsup()
1752 info_log_addr_form_sender(state->sender)); in smtpd_whatsup()
1753 if (state->recipient) in smtpd_whatsup()
1755 info_log_addr_form_recipient(state->recipient)); in smtpd_whatsup()
1756 if (state->protocol) in smtpd_whatsup()
1757 vstring_sprintf_append(buf, " proto=%s", state->protocol); in smtpd_whatsup()
[all …]
Dsmtpd_state.c80 void smtpd_state_init(SMTPD_STATE *state, VSTREAM *stream, in smtpd_state_init() argument
88 state->flags = 0; in smtpd_state_init()
89 state->err = CLEANUP_STAT_OK; in smtpd_state_init()
90 state->client = stream; in smtpd_state_init()
91 state->service = mystrdup(service); in smtpd_state_init()
92 state->buffer = vstring_alloc(100); in smtpd_state_init()
93 state->addr_buf = vstring_alloc(100); in smtpd_state_init()
94 state->conn_count = state->conn_rate = 0; in smtpd_state_init()
95 state->error_count = 0; in smtpd_state_init()
96 state->error_mask = 0; in smtpd_state_init()
[all …]
Dsmtpd_peer.c171 static int smtpd_peer_sockaddr_to_hostaddr(SMTPD_STATE *state) in smtpd_peer_sockaddr_to_hostaddr() argument
174 struct sockaddr *sa = (struct sockaddr *) &(state->sockaddr); in smtpd_peer_sockaddr_to_hostaddr()
175 SOCKADDR_SIZE sa_length = state->sockaddr_len; in smtpd_peer_sockaddr_to_hostaddr()
224 state->port = mystrdup(client_port.buf); in smtpd_peer_sockaddr_to_hostaddr()
253 state->addr = mystrdup(colonp + 1); in smtpd_peer_sockaddr_to_hostaddr()
254 state->rfc_addr = mystrdup(colonp + 1); in smtpd_peer_sockaddr_to_hostaddr()
255 state->addr_family = AF_INET; in smtpd_peer_sockaddr_to_hostaddr()
257 hostaddr_to_sockaddr(state->addr, state->port, 0, &res0); in smtpd_peer_sockaddr_to_hostaddr()
260 myname, state->addr, state->port, in smtpd_peer_sockaddr_to_hostaddr()
263 if (sa_length > sizeof(state->sockaddr)) in smtpd_peer_sockaddr_to_hostaddr()
[all …]
/netbsd/src/external/cddl/osnet/dist/uts/common/zmod/
Dinflate.c102 local void fixedtables OF((struct inflate_state FAR *state));
113 struct inflate_state FAR *state; local
115 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
116 state = (struct inflate_state FAR *)strm->state;
117 strm->total_in = strm->total_out = state->total = 0;
120 state->mode = HEAD;
121 state->last = 0;
122 state->havedict = 0;
123 state->dmax = 32768U;
124 state->head = Z_NULL;
[all …]
/netbsd/src/common/dist/zlib/
Dinflate.c97 struct inflate_state FAR *state; in inflateStateCheck() local
101 state = (struct inflate_state FAR *)strm->state; in inflateStateCheck()
102 if (state == Z_NULL || state->strm != strm || in inflateStateCheck()
103 state->mode < HEAD || state->mode > SYNC) in inflateStateCheck()
109 struct inflate_state FAR *state; in inflateResetKeep() local
112 state = (struct inflate_state FAR *)strm->state; in inflateResetKeep()
113 strm->total_in = strm->total_out = state->total = 0; in inflateResetKeep()
115 if (state->wrap) /* to support ill-conceived Java test suite */ in inflateResetKeep()
116 strm->adler = state->wrap & 1; in inflateResetKeep()
117 state->mode = HEAD; in inflateResetKeep()
[all …]
Dgzread.c12 local int gz_load(gz_statep state, unsigned char *buf, unsigned len, in gz_load() argument
22 ret = read(state->fd, buf + *have, get); in gz_load()
28 gz_error(state, Z_ERRNO, zstrerror()); in gz_load()
32 state->eof = 1; in gz_load()
43 local int gz_avail(gz_statep state) { in gz_avail() argument
45 z_streamp strm = &(state->strm); in gz_avail()
47 if (state->err != Z_OK && state->err != Z_BUF_ERROR) in gz_avail()
49 if (state->eof == 0) { in gz_avail()
51 unsigned char *p = state->in; in gz_avail()
58 if (gz_load(state, state->in + strm->avail_in, in gz_avail()
[all …]
Dgzwrite.c11 local int gz_init(gz_statep state) { in gz_init() argument
13 z_streamp strm = &(state->strm); in gz_init()
16 state->in = (unsigned char *)malloc(state->want << 1); in gz_init()
17 if (state->in == NULL) { in gz_init()
18 gz_error(state, Z_MEM_ERROR, "out of memory"); in gz_init()
23 if (!state->direct) { in gz_init()
25 state->out = (unsigned char *)malloc(state->want); in gz_init()
26 if (state->out == NULL) { in gz_init()
27 free(state->in); in gz_init()
28 gz_error(state, Z_MEM_ERROR, "out of memory"); in gz_init()
[all …]
Dgzlib.c69 local void gz_reset(gz_statep state) { in gz_reset() argument
70 state->x.have = 0; /* no output data available */ in gz_reset()
71 if (state->mode == GZ_READ) { /* for reading ... */ in gz_reset()
72 state->eof = 0; /* not at end of file */ in gz_reset()
73 state->past = 0; /* have not read past end yet */ in gz_reset()
74 state->how = LOOK; /* look for gzip header */ in gz_reset()
77 state->reset = 0; /* no deflateReset pending */ in gz_reset()
78 state->seek = 0; /* no seek request pending */ in gz_reset()
79 gz_error(state, Z_OK, NULL); /* clear error */ in gz_reset()
80 state->x.pos = 0; /* no uncompressed data yet */ in gz_reset()
[all …]
Dinfback.c30 struct inflate_state FAR *state; in inflateBackInit_() local
53 state = (struct inflate_state FAR *)ZALLOC(strm, 1, in inflateBackInit_()
55 if (state == Z_NULL) return Z_MEM_ERROR; in inflateBackInit_()
57 strm->state = (struct internal_state FAR *)state; in inflateBackInit_()
58 state->dmax = 32768U; in inflateBackInit_()
59 state->wbits = (uInt)windowBits; in inflateBackInit_()
60 state->wsize = 1U << windowBits; in inflateBackInit_()
61 state->window = window; in inflateBackInit_()
62 state->wnext = 0; in inflateBackInit_()
63 state->whave = 0; in inflateBackInit_()
[all …]
/netbsd/src/external/ibm-public/postfix/dist/src/qmqpd/
Dqmqpd.c266 static void qmqpd_open_file(QMQPD_STATE *state) in qmqpd_open_file() argument
277 state->dest = mail_stream_service(MAIL_CLASS_PUBLIC, var_cleanup_service); in qmqpd_open_file()
278 if (state->dest == 0 in qmqpd_open_file()
279 || attr_print(state->dest->stream, ATTR_FLAG_NONE, in qmqpd_open_file()
284 state->cleanup = state->dest->stream; in qmqpd_open_file()
285 state->queue_id = mystrdup(state->dest->id); in qmqpd_open_file()
286 msg_info("%s: client=%s", state->queue_id, state->namaddr); in qmqpd_open_file()
293 rec_fprintf(state->cleanup, REC_TYPE_TIME, REC_TYPE_TIME_FORMAT, in qmqpd_open_file()
294 REC_TYPE_TIME_ARG(state->arrival_time)); in qmqpd_open_file()
296 rec_fprintf(state->cleanup, REC_TYPE_FILT, "%s", var_filter_xport); in qmqpd_open_file()
[all …]
/netbsd/src/sys/external/bsd/drm2/dist/drm/
Ddrm_atomic_state_helper.c100 crtc->state = crtc_state; in __drm_atomic_helper_crtc_reset()
114 kzalloc(sizeof(*crtc->state), GFP_KERNEL); in drm_atomic_helper_crtc_reset()
116 if (crtc->state) in drm_atomic_helper_crtc_reset()
117 crtc->funcs->atomic_destroy_state(crtc, crtc->state); in drm_atomic_helper_crtc_reset()
132 struct drm_crtc_state *state) in __drm_atomic_helper_crtc_duplicate_state() argument
134 memcpy(state, crtc->state, sizeof(*state)); in __drm_atomic_helper_crtc_duplicate_state()
136 if (state->mode_blob) in __drm_atomic_helper_crtc_duplicate_state()
137 drm_property_blob_get(state->mode_blob); in __drm_atomic_helper_crtc_duplicate_state()
138 if (state->degamma_lut) in __drm_atomic_helper_crtc_duplicate_state()
139 drm_property_blob_get(state->degamma_lut); in __drm_atomic_helper_crtc_duplicate_state()
[all …]
/netbsd/src/external/gpl3/gdb/dist/sim/arm/
Darminit.c32 void ARMul_Reset (ARMul_State * state);
33 ARMword ARMul_DoCycle (ARMul_State * state);
34 unsigned ARMul_DoCoPro (ARMul_State * state);
35 ARMword ARMul_DoProg (ARMul_State * state);
36 ARMword ARMul_DoInstr (ARMul_State * state);
37 void ARMul_Abort (ARMul_State * state, ARMword address);
82 ARMul_State *state; in ARMul_NewState() local
85 state = (ARMul_State *) malloc (sizeof (ARMul_State)); in ARMul_NewState()
86 memset (state, 0, sizeof (ARMul_State)); in ARMul_NewState()
88 state->Emulate = RUN; in ARMul_NewState()
[all …]
Darmemu.c61 if (StoreHalfWord (state, instr, lhs)) \
62 LSBase = lhs - GetLS7RHS (state, instr);
67 if (StoreHalfWord (state, instr, lhs)) \
68 LSBase = lhs + GetLS7RHS (state, instr);
72 (void)StoreHalfWord (state, instr, LHS - GetLS7RHS (state, instr));
76 temp = LHS - GetLS7RHS (state, instr); \
77 if (StoreHalfWord (state, instr, temp)) \
82 (void)StoreHalfWord (state, instr, LHS + GetLS7RHS (state, instr));
86 temp = LHS + GetLS7RHS (state, instr); \
87 if (StoreHalfWord (state, instr, temp)) \
[all …]
/netbsd/src/external/ibm-public/postfix/dist/src/smtpstone/
Dsmtp-sink.c330 void (*delayed_response) (struct SINK_STATE *state, const char *);
341 #define PUSH_BACK_PEEK(state) (*(state)->push_back_ptr != 0) argument
342 #define PUSH_BACK_GET(state) (*(state)->push_back_ptr++) argument
343 #define PUSH_BACK_SET(state, text) ((state)->push_back_ptr = (text)) argument
412 static void hard_err_resp(SINK_STATE *state) in hard_err_resp() argument
414 smtp_printf(state->stream, "%s", hard_error_resp); in hard_err_resp()
415 SMTP_FLUSH(state->stream); in hard_err_resp()
420 static void soft_err_resp(SINK_STATE *state) in soft_err_resp() argument
422 smtp_printf(state->stream, "%s", soft_error_resp); in soft_err_resp()
423 SMTP_FLUSH(state->stream); in soft_err_resp()
[all …]
/netbsd/src/external/bsd/kyua-cli/dist/utils/config/
Dlua_module.cpp52 get_global_tree(lutok::state& state) in get_global_tree() argument
54 lutok::stack_cleaner cleaner(state); in get_global_tree()
56 state.push_value(lutok::registry_index); in get_global_tree()
57 state.push_string("tree"); in get_global_tree()
58 state.get_table(-2); in get_global_tree()
59 if (state.is_nil()) in get_global_tree()
62 config::tree& tree = **state.to_userdata< config::tree* >(); in get_global_tree()
63 state.pop(1); in get_global_tree()
81 get_tree_key(lutok::state& state, const int table_index, const int field_index) in get_tree_key() argument
83 PRE(state.is_string(field_index)); in get_tree_key()
[all …]
/netbsd/src/external/ibm-public/postfix/dist/src/global/
Dmime_state.c350 #define SET_MIME_STATE(ptr, state, ctype, stype, encoding, domain) do { \ argument
351 (ptr)->curr_state = (state); \
356 if ((state) == MIME_STATE_BODY) \
362 #define SET_CURR_STATE(ptr, state) do { \ argument
363 (ptr)->curr_state = (state); \
364 if ((state) == MIME_STATE_BODY) \
408 #define REPORT_ERROR_LEN(state, err_type, text, len) do { \ argument
409 if ((state->err_flags & err_type) == 0) { \
410 if (state->err_print != 0) \
411 state->err_print(state->app_context, err_type, text, len); \
[all …]
/netbsd/src/external/ibm-public/postfix/dist/src/postscreen/
Dpostscreen_early.c63 static void psc_allowlist_non_dnsbl(PSC_STATE *state) in psc_allowlist_non_dnsbl() argument
78 if ((state->flags & PSC_STATE_MASK_ANY_FAIL) == 0 in psc_allowlist_non_dnsbl()
79 && state->dnsbl_score < var_psc_dnsbl_thresh in psc_allowlist_non_dnsbl()
81 && state->dnsbl_score <= var_psc_dnsbl_althresh) { in psc_allowlist_non_dnsbl()
86 if ((state->flags & PSC_STATE_FLAG_BYTINDX_TODO(tindx)) in psc_allowlist_non_dnsbl()
87 && !(state->flags & PSC_STATE_FLAG_BYTINDX_PASS(tindx))) { in psc_allowlist_non_dnsbl()
90 psc_test_name(tindx), PSC_CLIENT_ADDR_PORT(state)); in psc_allowlist_non_dnsbl()
92 state->flags |= PSC_STATE_FLAG_BYTINDX_DONE(tindx); in psc_allowlist_non_dnsbl()
94 state->flags |= PSC_STATE_FLAG_BYTINDX_PASS(tindx); in psc_allowlist_non_dnsbl()
97 if (state->client_info->expire_time[tindx] < now + state->dnsbl_ttl) in psc_allowlist_non_dnsbl()
[all …]
Dpostscreen_smtpd.c184 #define PSC_SMTPD_HAVE_PUSH_BACK(state) (0) argument
185 #define PSC_SMTPD_PUSH_BACK_CHAR(state, ch) \ argument
186 vstream_ungetc((state)->smtp_client_stream, (ch))
187 #define PSC_SMTPD_NEXT_CHAR(state) \ argument
188 VSTREAM_GETC((state)->smtp_client_stream)
190 #define PSC_SMTPD_BUFFER_EMPTY(state) \ argument
191 (!PSC_SMTPD_HAVE_PUSH_BACK(state) \
192 && vstream_peek((state)->smtp_client_stream) <= 0)
194 #define PSC_SMTPD_PEEK_DATA(state) \ argument
195 vstream_peek_data((state)->smtp_client_stream)
[all …]
/netbsd/src/external/bsd/libarchive/dist/libarchive/
Darchive_write_add_filter_compress.c147 struct private_data *state; in archive_compressor_compress_open() local
153 state = calloc(1, sizeof(*state)); in archive_compressor_compress_open()
154 if (state == NULL) { in archive_compressor_compress_open()
169 state->compressed_buffer_size = bs; in archive_compressor_compress_open()
170 state->compressed = malloc(state->compressed_buffer_size); in archive_compressor_compress_open()
172 if (state->compressed == NULL) { in archive_compressor_compress_open()
175 free(state); in archive_compressor_compress_open()
183 state->max_maxcode = 0x10000; /* Should NEVER generate this code. */ in archive_compressor_compress_open()
184 state->in_count = 0; /* Length of input. */ in archive_compressor_compress_open()
185 state->bit_buf = 0; in archive_compressor_compress_open()
[all …]
/netbsd/src/external/bsd/kyua-cli/dist/utils/fs/
Dlua_module_test.cpp45 lutok::state state; in ATF_TEST_CASE_BODY() local
46 stack_balance_checker checker(state); in ATF_TEST_CASE_BODY()
47 fs::open_fs(state); in ATF_TEST_CASE_BODY()
48 lutok::do_string(state, "return fs.basename", 1); in ATF_TEST_CASE_BODY()
49 ATF_REQUIRE(state.is_function()); in ATF_TEST_CASE_BODY()
50 lutok::do_string(state, "return fs.dirname", 1); in ATF_TEST_CASE_BODY()
51 ATF_REQUIRE(state.is_function()); in ATF_TEST_CASE_BODY()
52 lutok::do_string(state, "return fs.join", 1); in ATF_TEST_CASE_BODY()
53 ATF_REQUIRE(state.is_function()); in ATF_TEST_CASE_BODY()
54 state.pop(3); in ATF_TEST_CASE_BODY()
[all …]

12345678910>>...106