commit d25c6061a51eebdc7cad406c6d8811bf3cb7ae24
parent 198ea2e013f8995f8878969a602f4b06475c025a
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date: Thu, 24 Dec 2020 12:40:54 +0100
btl: ungets now returns a size_t
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/btl/src/utils.cpp b/btl/src/utils.cpp
@@ -79,7 +79,7 @@ int esc_fputs( const char *s, FILE *stream )
return 0;
}
-int ungets( char const* const str, size_t str_sz )
+size_t ungets( char const* const str, size_t str_sz )
{
// reverse push, since otherwise one would start with EOF
for( size_t i = str_sz; i; --i )
diff --git a/btl/src/utils.hpp b/btl/src/utils.hpp
@@ -69,7 +69,7 @@ int esc_fputs( const char *s, FILE *stream );
// prints a string into stdin for further reading. Might not
// be null-terminated.
-inline int ungets( char const* const str, size_t str_sz );
+inline size_t ungets( char const* const str, size_t str_sz );
inline uint16_t find_unescaped( int end, int esc, char ** str, size_t str_sz )
{