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 ExessResult 12 : 65556 : exess_read_ushort(const char* const str, uint16_t* const out) 13 : : { 14 : 65556 : uint64_t value = 0U; 15 : 65556 : const ExessResult r = read_unsigned(str, UINT16_MAX, &value); 16 : : 17 : 65556 : *out = (uint16_t)value; 18 : 65556 : return r; 19 : : } 20 : : 21 : : EXESS_NONBLOCKING ExessResult 22 : 65572 : exess_write_ushort(const uint16_t value, const size_t buf_size, char* const buf) 23 : : { 24 : 65572 : return exess_write_ulong(value, buf_size, buf); 25 : : }