ReactOS 0.4.15-dev-8235-gcd88a97
putch.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/sdk/crt/conio/putch.c
5 * PURPOSE: Writes a character to stdout
6 * PROGRAMER: Ariadne
7 * UPDATE HISTORY:
8 * 28/12/98: Created
9 */
10
11#include <precomp.h>
12
13/*
14 * @implemented
15 */
16int _putch(int c)
17{
18 DWORD NumberOfCharsWritten;
19
20 if (WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),&c,1,&NumberOfCharsWritten,NULL)) {
21 return -1;
22 }
23 return NumberOfCharsWritten;
24}
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
#define NULL
Definition: types.h:112
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
unsigned long DWORD
Definition: ntddk_ex.h:95
const GLubyte * c
Definition: glext.h:8905
int _putch(int c)
Definition: putch.c:16
#define STD_OUTPUT_HANDLE
Definition: winbase.h:268