Lines Matching refs:decode_state
675 state->decode_state.indefinite_length_array = indefinite_length_array;
693 if (ret && !state->decode_state.indefinite_length_array) {
709 const bool indefinite_length_array = state->decode_state.indefinite_length_array;
730 state->decode_state.map_search_elem_state
731 += zcbor_flags_to_bytes(state->decode_state.map_elem_count);
733 state->decode_state.map_elems_processed = 0;
735 state->decode_state.map_elem_count = 0;
736 state->decode_state.counting_map_elems = state->decode_state.indefinite_length_array;
738 if (!state->decode_state.counting_map_elems) {
756 return (state->decode_state.indefinite_length_array ? \
757 ZCBOR_LARGE_ELEM_COUNT : state->decode_state.map_elem_count * 2);
789 const size_t last_index = (state->decode_state.map_elem_count - 1);
792 ZCBOR_ERR_IF((index >= state->decode_state.map_elem_count),
794 uint8_t *flag_byte = &state->decode_state.map_search_elem_state[index >> 3];
825 size_t new_bytes = zcbor_flags_to_bytes(state->decode_state.map_elem_count);
831 if ((state->decode_state.map_search_elem_state + new_bytes) > flags_end) {
832 state->decode_state.map_elem_count
833 = 8 * (size_t)(flags_end - state->decode_state.map_search_elem_state);
837 memset(&state->decode_state.map_search_elem_state[new_bytes - extra_bytes], 0xFF, extra_bytes);
845 return (state->decode_state.map_elems_processed < state->decode_state.map_elem_count);
852 state->decode_state.map_elems_processed++;
861 size_t old_map_elem_count = state->decode_state.map_elem_count;
863 state->decode_state.map_elem_count = MAX(old_map_elem_count, elem_count / 2);
870 state->decode_state.counting_map_elems = false;
912 if (state->decode_state.counting_map_elems) {
985 if (state->decode_state.indefinite_length_array) {
990 state->decode_state.indefinite_length_array = false;
1021 ZCBOR_ERR_IF(!zcbor_array_at_end(state) && state->decode_state.counting_map_elems,
1024 if (state->decode_state.map_elem_count > 0) {
1028 for (size_t i = 0; i < zcbor_flags_to_bytes(state->decode_state.map_elem_count); i++) {
1029 if (state->decode_state.map_search_elem_state[i] != 0) {
1031 i, state->decode_state.map_search_elem_state[i]);
1464 state_copy.decode_state.indefinite_length_array = indefinite_length_array;