Home
last modified time | relevance | path

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

/nanopb-3.4.0/tests/fuzztest/
Dflakystream.c6 flakystream_t *state = stream->state; in flakystream_callback() local
8 if (state->position + count > state->msglen) in flakystream_callback()
13 else if (state->position + count > state->fail_after) in flakystream_callback()
18 memcpy(buf, state->buffer + state->position, count); in flakystream_callback()
19 state->position += count; in flakystream_callback()
28 stream->stream.state = stream; in flakystream_init()
/nanopb-3.4.0/tests/io_errors/
Dio_errors.c19 faulty_stream_t *state = stream->state; in read_callback() local
23 if (state->fail_after == 0) in read_callback()
25 state->fail_after--; in read_callback()
26 *buf++ = *state->buffer++; in read_callback()
33 faulty_stream_t *state = stream->state; in write_callback() local
37 if (state->fail_after == 0) in write_callback()
39 state->fail_after--; in write_callback()
40 *state->buffer++ = *buf++; in write_callback()
66 stream.state = &fs; in main()
84 stream.state = &fs; in main()
[all …]
/nanopb-3.4.0/tests/basic_stream/
Dencode_stream.c12 FILE *file = (FILE*) stream->state; in streamcallback()
27 stream.state = stdout; in main()
Ddecode_stream.c60 FILE *file = (FILE*)stream->state; in callback()
77 stream.state = stdin; in main()
/nanopb-3.4.0/tests/regression/GHSA-gcx3-7m76-287p/
Dtest.c10 FILE *file = (FILE*)stream->state; in stream_callback()
29 stream.state = stdin; in main()
/nanopb-3.4.0/examples/network_server/
Dcommon.c13 int fd = (intptr_t)stream->state; in write_callback()
19 int fd = (intptr_t)stream->state; in read_callback()
/nanopb-3.4.0/tests/site_scons/platforms/avr/
Drun_test.c157 g_avr->state = cpu_Stopped; in main()
176 int state = avr_run(g_avr); in main() local
177 if (state == cpu_Done) in main()
180 if (state == cpu_Crashed) in main()
/nanopb-3.4.0/tests/raw_decode/
Draw_decode.c19 FILE *file = (FILE*)stream->state; in callback()
185 stream.state = stdin; in main()
/nanopb-3.4.0/tests/encode_unittests/
Dencode_unittests.c32 uint32_t *state = (uint32_t*)arg; in crazyfieldcallback() local
33 *state <<= 8; in crazyfieldcallback()
36 return pb_encode_varint(stream, *state); in crazyfieldcallback()
374 uint32_t state = 1; in main() local
386 msg.submsg.data.arg = &state; in main()
388 msg2.submsg.submsg.data.arg = &state; in main()
391 state = 1; in main()
/nanopb-3.4.0/
Dpb_decode.c70 const pb_byte_t *source = (const pb_byte_t*)stream->state; in buf_read()
71 stream->state = (pb_byte_t*)stream->state + count; in buf_read()
133 *buf = *(const pb_byte_t*)stream->state; in pb_readbyte()
134 stream->state = (pb_byte_t*)stream->state + 1; in pb_readbyte()
149 void *state; in pb_istream_from_buffer() member
151 } state; in pb_istream_from_buffer() local
157 state.c_state = buf; in pb_istream_from_buffer()
158 stream.state = state.state; in pb_istream_from_buffer()
383 stream->state = substream->state; in pb_close_string_substream()
Dpb_encode.h40 void *state; /* Free field for use by callback implementation. */ member
Dpb_encode.c54 pb_byte_t *dest = (pb_byte_t*)stream->state; in buf_write()
55 stream->state = dest + count; in buf_write()
74 stream.state = buf; in pb_ostream_from_buffer()
752 substream.state = stream->state; in pb_encode_submessage()
762 stream->state = substream.state; in pb_encode_submessage()
Dpb_decode.h40 void *state; /* Free field for use by callback implementation */ member
/nanopb-3.4.0/spm_headers/nanopb/
Dpb_encode.h40 void *state; /* Free field for use by callback implementation. */ member
Dpb_decode.h40 void *state; /* Free field for use by callback implementation */ member
/nanopb-3.4.0/tests/decode_unittests/
Ddecode_unittests.c15 if (stream->state != NULL) in stream_callback()
69 stream.state = (void*)1; /* Simulated error return from callback */ in main()
71 stream.state = NULL; in main()
/nanopb-3.4.0/docs/
Dconcepts.md58 2) Use state to store your own data, such as a file descriptor.
74 void *state;
103 FILE *file = (FILE*) stream->state;
123 void *state;
137 FILE *file = (FILE*)stream->state;
Dmigration.md271 libraries allow explicit null state for submessages.
371 parent stream would be put into an incorrect state.
Dreference.md468 stores the pointer in stream `state` field. :
967 length, and its callback function and state the same as the parent stream.
981 This function copies back the state from the substream to the parent stream,