harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b5cfc7cacdf8dbd022ca022a7094c489fbd7ae8c
parent 45cabcbe94241296bf890a9a64798baecd7c8c9d
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat,  9 Apr 2022 15:00:00 -0400

utf8: remove fputch

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Minclude/utf8.h | 5-----
Msrc/utf8.c | 9---------
2 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/include/utf8.h b/include/utf8.h @@ -32,9 +32,4 @@ size_t utf8_chsize(uint32_t ch); */ uint32_t utf8_fgetch(FILE *f); -/** - * Writes this character to the file and returns the number of bytes written. - */ -size_t utf8_fputch(FILE *f, uint32_t ch); - #endif diff --git a/src/utf8.c b/src/utf8.c @@ -132,12 +132,3 @@ utf8_fgetch(FILE *f) const char *ptr = buffer; return utf8_decode(&ptr); } - -size_t -utf8_fputch(FILE *f, uint32_t ch) -{ - char buffer[UTF8_MAX_SIZE]; - char *ptr = buffer; - size_t size = utf8_encode(ptr, ch); - return fwrite(&buffer, 1, size, f); -}