diff options
Diffstat (limited to 'src/u8c/fmt.h.d/setfmt.c')
-rw-r--r-- | src/u8c/fmt.h.d/setfmt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/u8c/fmt.h.d/setfmt.c b/src/u8c/fmt.h.d/setfmt.c index 7956ea3..4c6d3a3 100644 --- a/src/u8c/fmt.h.d/setfmt.c +++ b/src/u8c/fmt.h.d/setfmt.c @@ -20,15 +20,15 @@ # if defined(u8c_bethrdsafe) # include <threads.h> # endif -bool u8c_setfmt(unsigned char const _base,unsigned char const _endian) { - uint_least8_t base = _base; - uint_least8_t endian = _endian; +struct u8c_setfmt_tuple u8c_setfmt(uint_least8_t const _base,bool const _endian) { + struct u8c_setfmt_tuple ret = { + .stat = false, + }; + register uint_least8_t base = _base; + register bool endian = _endian; if(_base > UINT8_C(0x20)) { base = UINT8_C(0xC); } - if(_endian > UINT8_C(0x1)) { - endian = UINT8_C(0x0); - } # if defined(u8c_bethrdsafe) mtx_lock(&u8c_dat.fmtlock); # endif @@ -37,5 +37,5 @@ bool u8c_setfmt(unsigned char const _base,unsigned char const _endian) { # if defined(u8c_bethrdsafe) mtx_unlock(&u8c_dat.fmtlock); # endif - return false; + return ret; } |