ReactOS 0.4.16-dev-927-g467dec4
cputs.cpp File Reference
#include <conio.h>
#include <corecrt_internal_lowio.h>
Include dependency graph for cputs.cpp:

Go to the source code of this file.

Functions

int __cdecl _cputs (char const *const string)
 

Function Documentation

◆ _cputs()

int __cdecl _cputs ( char const *const  string)

Definition at line 13 of file cputs.cpp.

14{
15 _VALIDATE_CLEAR_OSSERR_RETURN(string != nullptr, EINVAL, -1);
16
18 int result = 0;
19 __try
20 {
21 // Write the string directly to the console. Each character is written
22 // individually, as performance of this function is not considered
23 // critical.
24 for (char const* p = string; *p; ++p)
25 {
26 if (_putch_nolock(*p) == EOF)
27 {
28 result = -1;
29 __leave;
30 }
31 }
32 }
34 {
36 }
38 return result;
39}
#define EINVAL
Definition: acclib.h:90
void __cdecl __acrt_unlock(_In_ __acrt_lock_id lock)
Definition: locks.cpp:57
@ __acrt_conio_lock
__acrt_lock(__acrt_heap_lock)
GLuint64EXT * result
Definition: glext.h:11304
GLfloat GLfloat p
Definition: glext.h:8902
#define EOF
Definition: stdio.h:24
#define _VALIDATE_CLEAR_OSSERR_RETURN(expr, errorcode, retexpr)
#define __try
Definition: pseh2_64.h:188
#define __leave
Definition: pseh2_64.h:192
#define __endtry
Definition: pseh2_64.h:191
#define __finally
Definition: pseh2_64.h:190
_CRTIMP int __cdecl _putch_nolock(_In_ int _Ch)

Referenced by _cgets(), and gl_getpass().