mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-23 01:29:34 +00:00
correct puts() usage, use putchar() and putstring()
This commit is contained in:
parent
6a00dde82b
commit
011304404a
@ -63,20 +63,6 @@ typedef unsigned char u_char;
|
||||
|
||||
static char *ksprintn(u_long ul, int base, int *lenp, int prec);
|
||||
|
||||
int puts(const char * s)
|
||||
{
|
||||
console_print(s);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int putchar(int c)
|
||||
{
|
||||
console_put(c);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
int sprintf(char * s, const char * format, ...)
|
||||
{
|
||||
va_list params;
|
||||
@ -255,7 +241,15 @@ printf(const char * format, ...)
|
||||
va_end(args);
|
||||
|
||||
if (len)
|
||||
puts(__printf_buffer);
|
||||
putstring(__printf_buffer);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
int puts(const char * s)
|
||||
{
|
||||
putstring(s);
|
||||
putchar('\n');
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user