diff options
author | polwex <polwex@sortug.com> | 2025-10-05 21:56:51 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-10-05 21:56:51 +0700 |
commit | fcedfddf00b3f994e4f4e40332ac7fc192c63244 (patch) | |
tree | 51d38e62c7bdfcc5f9a5e9435fe820c93cfc9a3d /vere/ext/nasm/stdlib/snprintf.c |
claude is gud
Diffstat (limited to 'vere/ext/nasm/stdlib/snprintf.c')
-rw-r--r-- | vere/ext/nasm/stdlib/snprintf.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vere/ext/nasm/stdlib/snprintf.c b/vere/ext/nasm/stdlib/snprintf.c new file mode 100644 index 0000000..e4a1c0b --- /dev/null +++ b/vere/ext/nasm/stdlib/snprintf.c @@ -0,0 +1,26 @@ +/* + * snprintf() + * + * Implement snprintf() in terms of vsnprintf() + */ + +#include "compiler.h" + + +#include "nasmlib.h" + +#if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF) + +int snprintf(char *str, size_t size, const char *format, ...) +{ + va_list ap; + int rv; + + va_start(ap, format); + rv = vsnprintf(str, size, format, ap); + va_end(ap); + + return rv; +} + +#endif |