[CRT] Improve the FILE header section. Brought to you by Adam Stachowicz. CORE-10114
[reactos.git] / reactos / lib / sdk / crt / conio / cputs.c
1 /*
2 * COPYRIGHT: LGPL - See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/sdk/crt/conio/cputs.c
5 * PURPOSE: Writes a character to stdout
6 * PROGRAMER: Aleksey Bragin
7 */
8
9 #include <precomp.h>
10
11 /*
12 * @implemented
13 */
14 int _cputs(const char *_str)
15 {
16 DWORD count;
17 int retval = EOF;
18 HANDLE console_out = GetStdHandle(STD_OUTPUT_HANDLE);
19
20 //LOCK_CONSOLE;
21 if (WriteConsoleA(console_out, _str, strlen(_str), &count, NULL)
22 && count == 1)
23 retval = 0;
24 //UNLOCK_CONSOLE;
25 return retval;
26 }