mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-17 17:19:35 +08:00
Concentrate compiler dependencies to compiler.h; make sure compiler.h is included first in every .c file (since some prototypes may depend on the presence of feature request macros.) Actually use the conditional inclusion of various functions (totally broken in previous releases.)
27 lines
375 B
C
27 lines
375 B
C
/*
|
|
* snprintf()
|
|
*
|
|
* Implement snprintf() in terms of vsnprintf()
|
|
*/
|
|
|
|
#include "compiler.h"
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdarg.h>
|
|
|
|
#include "nasmlib.h"
|
|
|
|
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;
|
|
}
|
|
|