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 */
|
||||
|
||||
|
||||
void c_sprintf(char *s, char *fmt, ...)
|
||||
int c_sprintf(char *s, const char *fmt, ...)
|
||||
{
|
||||
int n;
|
||||
va_list arg;
|
||||
va_start(arg, fmt);
|
||||
vsprintf(s, fmt, arg);
|
||||
n = vsprintf(s, fmt, arg);
|
||||
va_end(arg);
|
||||
return n;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -60,7 +60,7 @@ extern void output_redirect(const char *str);
|
|||
#define c_sprintf os_sprintf
|
||||
#else
|
||||
#include "c_stdarg.h"
|
||||
void c_sprintf(char* s,char *fmt, ...);
|
||||
int c_sprintf(char* s,const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
// #define c_vsprintf ets_vsprintf
|
||||
|
|
Loading…
Reference in New Issue