Branch data Line data Source code
1 : : // Copyright 2019-2026 David Robillard <d@drobilla.net> 2 : : // SPDX-License-Identifier: ISC 3 : : 4 : : #include "fixed.h" 5 : : 6 : : #include <exess/exess.h> 7 : : 8 : : #include <stdint.h> 9 : : #include <stdlib.h> 10 : : 11 : : EXESS_NONBLOCKING EXESS_NONBLOCKING ExessResult 12 : 276 : exess_read_ubyte(const char* const str, uint8_t* const out) 13 : : { 14 : 276 : uint64_t value = 0U; 15 : 276 : const ExessResult r = read_unsigned(str, UINT8_MAX, &value); 16 : : 17 : 276 : *out = (uint8_t)value; 18 : 276 : return r; 19 : : } 20 : : 21 : : EXESS_NONBLOCKING EXESS_NONBLOCKING ExessResult 22 : 292 : exess_write_ubyte(const uint8_t value, const size_t buf_size, char* const buf) 23 : : { 24 : 292 : return exess_write_ulong(value, buf_size, buf); 25 : : }