Return codes for eolib operations.
| Enumerator |
|---|
| EO_SUCCESS | 0 | The operation completed successfully.
|
| EO_NULL_PTR | 1 | A required pointer argument was NULL.
Returned when a caller passes NULL for a mandatory parameter such as a writer, reader, sequencer, or output buffer pointer.
|
| EO_OVERFLOW | 2 | An internal size calculation would overflow.
Returned when growing a writer's buffer would exceed the addressable memory limit (SIZE_MAX).
|
| EO_ALLOC_FAILED | 3 | A memory allocation failed.
Returned when malloc or realloc returns NULL, indicating the system could not satisfy the requested allocation.
|
| EO_NUMBER_TOO_LARGE | 4 | A numeric value exceeds the EO encoding range.
Returned when a number passed to an EO encoding function is too large to be represented in the EO integer format (must be less than EO_INT_MAX).
|
| EO_BUFFER_UNDERRUN | 5 | The reader does not contain enough bytes for the requested read.
Returned when a reader function tries to consume more bytes than are available in the current read window.
|
| EO_CHUNKED_MODE_DISABLED | 6 | The reader is not in chunked reading mode.
Returned when eo_reader_next_chunk is called but chunked reading mode has not been enabled on the reader.
|
| EO_INVALID_SEQUENCE_RANGE | 7 | The calculated sequence range is invalid (max < min).
Returned by sequence_init_bytes when the derived seq1 bounds produce an empty range, indicating the start value is out of the representable sequence space.
|
| EO_SEQUENCE_OUT_OF_RANGE | 8 | A calculated sequence value falls outside [0, EO_CHAR_MAX - 1].
Returned by sequence_init_bytes or sequence_ping_bytes when the derived seq2 value cannot be encoded as a single EO byte.
|
| EO_INVALID_DATA | 9 | The data being deserialized is structurally invalid.
Returned during protocol deserialization when a required sentinel value does not match, a file magic string is wrong, or a required field contains an unexpected value.
|
| EO_STR_OUT_OF_RANGE | 10 | A string operation would exceed the allowed length.
Returned when a string operation, such as adding a fixed-length string, would result in a string that is too long for the allocated buffer.
|
| EO_STR_TOO_SHORT | 11 | A string is shorter than the expected length.
Returned when a fixed-length string added to a writer is shorter than the specified length, and padding is not enabled to fill the remaining space.
|
| EO_INVALID_CHAR | 12 | A character value is outside the valid range (0 to EO_CHAR_MAX).
Returned when attempting to encode a character that cannot be represented in the EO encoding format.
|
| EO_INVALID_SHORT | 13 | A short integer value is outside the valid range (0 to EO_SHORT_MAX).
Returned when attempting to encode a short integer that cannot be represented in the EO encoding format.
|
| EO_INVALID_THREE | 14 | A three-byte integer value is outside the valid range (0 to EO_THREE_MAX).
Returned when attempting to encode a three-byte integer that cannot be represented in the EO encoding format.
|
| EO_INVALID_INT | 15 | An integer value is outside the representable 4-byte EO range.
Returned when attempting to encode an integer whose 32-bit bit pattern cannot be represented in the EO integer format.
|