mirror of
https://github.com/grub4dos/ntloader.git
synced 2025-05-09 20:21:08 +08:00
56 lines
1.2 KiB
C
56 lines
1.2 KiB
C
/*
|
|
* Copyright (C) 2012 Michael Brown <mbrown@fensystems.co.uk>.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
* 02110-1301, USA.
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
*
|
|
* Standard Input/Output
|
|
*
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include "pmapi.h"
|
|
|
|
/**
|
|
* Print character to console
|
|
*
|
|
* @v character Character to print
|
|
*/
|
|
int putchar (int character)
|
|
{
|
|
/* Convert LF to CR,LF */
|
|
if (character == '\n')
|
|
pm->_putchar ('\r');
|
|
|
|
pm->_putchar (character);
|
|
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* Get character from console
|
|
*
|
|
* @ret character Character
|
|
*/
|
|
int getchar (void)
|
|
{
|
|
return pm->_getchar ();
|
|
}
|