[libc] Match standard prototype for putchar()

Reported-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/388/head
Michael Brown 2021-06-07 13:26:01 +01:00
parent 52300ccf98
commit 3dd1989ac0
2 changed files with 5 additions and 2 deletions

View File

@ -20,11 +20,12 @@ unsigned int console_height = CONSOLE_DEFAULT_HEIGHT;
* Write a single character to each console device * Write a single character to each console device
* *
* @v character Character to be written * @v character Character to be written
* @ret character Character written
* *
* The character is written out to all enabled console devices, using * The character is written out to all enabled console devices, using
* each device's console_driver::putchar() method. * each device's console_driver::putchar() method.
*/ */
void putchar ( int character ) { int putchar ( int character ) {
struct console_driver *console; struct console_driver *console;
/* Automatic LF -> CR,LF translation */ /* Automatic LF -> CR,LF translation */
@ -37,6 +38,8 @@ void putchar ( int character ) {
console->putchar ) console->putchar )
console->putchar ( character ); console->putchar ( character );
} }
return character;
} }
/** /**

View File

@ -6,7 +6,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stdint.h> #include <stdint.h>
#include <stdarg.h> #include <stdarg.h>
extern void putchar ( int character ); extern int putchar ( int character );
extern int getchar ( void ); extern int getchar ( void );