ReactOS 0.4.16-dev-117-g38f21f9
cputs.c File Reference
#include <precomp.h>
Include dependency graph for cputs.c:

Go to the source code of this file.

Functions

int CDECL _cputs (const char *str)
 

Function Documentation

◆ _cputs()

int CDECL _cputs ( const char str)

Definition at line 8 of file cputs.c.

9{
11 int len, retval = -1;
12#ifdef __REACTOS__ /* r54651 */
13 HANDLE MSVCRT_console_out = GetStdHandle(STD_OUTPUT_HANDLE);
14#endif
15
16 if (!MSVCRT_CHECK_PMT(str != NULL)) return -1;
17 len = strlen(str);
18
19#ifndef __REACTOS__ /* r54651 */
20 LOCK_CONSOLE;
21#endif
22 if (WriteConsoleA(MSVCRT_console_out, str, len, &count, NULL)
23 && count == len)
24 retval = 0;
25#ifndef __REACTOS__ /* r54651 */
26 UNLOCK_CONSOLE;
27#endif
28 return retval;
29}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
#define NULL
Definition: types.h:112
BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleA(IN HANDLE hConsoleOutput, IN CONST VOID *lpBuffer, IN DWORD nNumberOfCharsToWrite, OUT LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved)
Definition: readwrite.c:1468
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum GLsizei len
Definition: glext.h:6722
#define MSVCRT_CHECK_PMT(x)
Definition: mbstowcs_s.c:26
const WCHAR * str
#define STD_OUTPUT_HANDLE
Definition: winbase.h:268

Referenced by _cgets(), and gl_getpass().