Lines Matching +full:- +full:a

9  * SPDX-License-Identifier: Apache-2.0
51 /** Type representing a string fragment.
58 size_t total_len; ///! The total length of the string this fragment is a part of.
66 #define MIN(a, b) (((a) < (b)) ? (a) : (b)) argument
70 #define MAX(a, b) (((a) < (b)) ? (b) : (a)) argument
77 /* Endian-dependent offset of smaller integer in a bigger one. */
79 #define ZCBOR_ECPY_OFFS(dst_len, src_len) ((dst_len) - (src_len))
104 size_t elem_count; /**< The current element is part of a LIST or a MAP,
112 bool payload_moved; /**< Is set to true while the state is stored as a backup
114 updates the payload_end of all backed-up states. */
119 decoding the contents of an indefinite-
126 is non-zero, this consists of one flag per element
127 in the current map. The n-th bit can be set to 0
128 to indicate that the n-th element in the
190 /** Convenience macro for failing out of a decoding/encoding function.
223 ZCBOR_ERR_IF(state->payload >= state->payload_end, ZCBOR_ERR_NO_PAYLOAD)
241 …NGTH 31 ///! The list or map has indefinite length, and will instead be terminated by a 0xFF token.
247 #define ZCBOR_FLAG_KEEP_PAYLOAD 4UL ///! Keep the pre-restore payload after restoring.
248 #define ZCBOR_FLAG_KEEP_DECODE_STATE 8UL ///! Keep the pre-restore decode state (everything only us…
265 #define ZCBOR_ERR_PAYLOAD_OUTDATED 15 ///! Because of a call to @ref zcbor_update_state
278 #define ZCBOR_LARGE_ELEM_COUNT (ZCBOR_MAX_ELEM_COUNT - 15)
281 /** Take a backup of the current state. Overwrite the current elem_count. */
290 /** Convenience function for starting encoding/decoding of a union.
293 * Makes a new backup.
297 /** Convenience function before encoding/decoding one element of a union.
304 /** Convenience function before encoding/decoding one element of a union.
310 /** Initialize a state with backups.
312 * as a struct zcbor_state_constant object.
315 * This means that you get a state with (n_states - 2) backups.
339 struct zcbor_state_constant *cs = state->constant_state; in zcbor_check_error()
340 return !(cs && cs->stop_on_error && cs->error); in zcbor_check_error()
347 if (!state->constant_state) { in zcbor_pop_error()
350 int err = state->constant_state->error; in zcbor_pop_error()
352 state->constant_state->error = ZCBOR_SUCCESS; in zcbor_pop_error()
359 if (!state->constant_state) { in zcbor_peek_error()
362 return state->constant_state->error; in zcbor_peek_error()
373 if (state->constant_state) { in zcbor_error()
374 state->constant_state->error = err; in zcbor_error()
382 return (state->payload == state->payload_end); in zcbor_payload_at_end()
390 * This sets a flag so that @ref zcbor_process_backup fails if a backup is
419 /** Assemble the fragments into a single string.
440 * @param[in] str1 A string
441 * @param[in] str2 A string to compare to @p str1
449 /** Calculate the length of a CBOR string, list, or map header.
451 * This can be used to find the start of the CBOR object when you have a
457 * @return The length of the header in bytes (1-9).
464 /** Convert a float16 value to float32.
466 * @param[in] input The float16 value stored in a uint16_t.
472 /** Convert a float32 value to float16.
476 * @return The resulting float16 value as a uint16_t.
483 return (((x) + (align) - 1) / (align) * (align)); in zcbor_round_up()