mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 17:14:32 +00:00
[CRT] Sync _cputs() with Wine Staging 1.9.16. CORE-11866 CORE-8546
svn path=/trunk/; revision=72606
This commit is contained in:
parent
dc4261f3eb
commit
fc686705cd
2 changed files with 20 additions and 16 deletions
|
@ -287,6 +287,7 @@ kernel32 -
|
||||||
reactos/dll/win32/kernel32/winnls/string/sortkey.c # Synced to WineStaging-1.9.16
|
reactos/dll/win32/kernel32/winnls/string/sortkey.c # Synced to WineStaging-1.9.16
|
||||||
|
|
||||||
msvcrt -
|
msvcrt -
|
||||||
|
reactos/sdk/lib/crt/conio/cputs.c # Synced to WineStaging-1.9.16
|
||||||
reactos/sdk/lib/crt/except/cpp.c # Synced at 20080528
|
reactos/sdk/lib/crt/except/cpp.c # Synced at 20080528
|
||||||
reactos/sdk/lib/crt/except/cppexcept.c # Synced at 20071111
|
reactos/sdk/lib/crt/except/cppexcept.c # Synced at 20071111
|
||||||
reactos/sdk/lib/crt/process/_cwait.c # Synced to WineStaging-1.7.37
|
reactos/sdk/lib/crt/process/_cwait.c # Synced to WineStaging-1.7.37
|
||||||
|
|
|
@ -1,26 +1,29 @@
|
||||||
/*
|
/* Imported from msvcrt/console.c */
|
||||||
* COPYRIGHT: LGPL - See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS system libraries
|
|
||||||
* FILE: lib/sdk/crt/conio/cputs.c
|
|
||||||
* PURPOSE: Writes a character to stdout
|
|
||||||
* PROGRAMER: Aleksey Bragin
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <precomp.h>
|
#include <precomp.h>
|
||||||
|
|
||||||
/*
|
/*********************************************************************
|
||||||
* @implemented
|
* _cputs (MSVCRT.@)
|
||||||
*/
|
*/
|
||||||
int _cputs(const char *_str)
|
int CDECL _cputs(const char* str)
|
||||||
{
|
{
|
||||||
DWORD count;
|
DWORD count;
|
||||||
int retval = EOF;
|
int len, retval = -1;
|
||||||
HANDLE console_out = GetStdHandle(STD_OUTPUT_HANDLE);
|
#ifdef __REACTOS__ /* r54651 */
|
||||||
|
HANDLE MSVCRT_console_out = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
|
#endif
|
||||||
|
|
||||||
//LOCK_CONSOLE;
|
if (!MSVCRT_CHECK_PMT(str != NULL)) return -1;
|
||||||
if (WriteConsoleA(console_out, _str, strlen(_str), &count, NULL)
|
len = strlen(str);
|
||||||
&& count == 1)
|
|
||||||
|
#ifndef __REACTOS__ /* r54651 */
|
||||||
|
LOCK_CONSOLE;
|
||||||
|
#endif
|
||||||
|
if (WriteConsoleA(MSVCRT_console_out, str, len, &count, NULL)
|
||||||
|
&& count == len)
|
||||||
retval = 0;
|
retval = 0;
|
||||||
//UNLOCK_CONSOLE;
|
#ifndef __REACTOS__ /* r54651 */
|
||||||
|
UNLOCK_CONSOLE;
|
||||||
|
#endif
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue