Corrected sprintf() prototype & behaviour.
This commit is contained in:
parent
74d27b3486
commit
9fd215b028
|
@ -1094,12 +1094,14 @@ exponent(char *p, int exp, int fmtch)
|
||||||
#endif /* FLOATINGPT */
|
#endif /* FLOATINGPT */
|
||||||
|
|
||||||
|
|
||||||
void c_sprintf(char *s, char *fmt, ...)
|
int c_sprintf(char *s, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
int n;
|
||||||
va_list arg;
|
va_list arg;
|
||||||
va_start(arg, fmt);
|
va_start(arg, fmt);
|
||||||
vsprintf(s, fmt, arg);
|
n = vsprintf(s, fmt, arg);
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -60,7 +60,7 @@ extern void output_redirect(const char *str);
|
||||||
#define c_sprintf os_sprintf
|
#define c_sprintf os_sprintf
|
||||||
#else
|
#else
|
||||||
#include "c_stdarg.h"
|
#include "c_stdarg.h"
|
||||||
void c_sprintf(char* s,char *fmt, ...);
|
int c_sprintf(char* s,const char *fmt, ...);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #define c_vsprintf ets_vsprintf
|
// #define c_vsprintf ets_vsprintf
|
||||||
|
|
Loading…
Reference in New Issue