| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files (x86)/Windows Kits/10/Source/10.0.19041.0/ucrt/conio/ |
Upload File : |
//
// cputs.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Defines _cputs(), which writes a string directly to the console.
//
#include <conio.h>
#include <corecrt_internal_lowio.h>
// Writes the given string directly to the console. No newline is appended.
// Returns 0 on success; nonzero on failure.
extern "C" int __cdecl _cputs(char const* const string)
{
_VALIDATE_CLEAR_OSSERR_RETURN(string != nullptr, EINVAL, -1);
__acrt_lock(__acrt_conio_lock);
int result = 0;
__try
{
// Write the string directly to the console. Each character is written
// individually, as performance of this function is not considered
// critical.
for (char const* p = string; *p; ++p)
{
if (_putch_nolock(*p) == EOF)
{
result = -1;
__leave;
}
}
}
__finally
{
__acrt_unlock(__acrt_conio_lock);
}
return result;
}