mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 00:54:18 +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
|
||||
|
||||
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/cppexcept.c # Synced at 20071111
|
||||
reactos/sdk/lib/crt/process/_cwait.c # Synced to WineStaging-1.7.37
|
||||
|
|
|
@ -1,26 +1,29 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/* Imported from msvcrt/console.c */
|
||||
|
||||
#include <precomp.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
/*********************************************************************
|
||||
* _cputs (MSVCRT.@)
|
||||
*/
|
||||
int _cputs(const char *_str)
|
||||
int CDECL _cputs(const char* str)
|
||||
{
|
||||
DWORD count;
|
||||
int retval = EOF;
|
||||
HANDLE console_out = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
int len, retval = -1;
|
||||
#ifdef __REACTOS__ /* r54651 */
|
||||
HANDLE MSVCRT_console_out = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
#endif
|
||||
|
||||
//LOCK_CONSOLE;
|
||||
if (WriteConsoleA(console_out, _str, strlen(_str), &count, NULL)
|
||||
&& count == 1)
|
||||
if (!MSVCRT_CHECK_PMT(str != NULL)) return -1;
|
||||
len = strlen(str);
|
||||
|
||||
#ifndef __REACTOS__ /* r54651 */
|
||||
LOCK_CONSOLE;
|
||||
#endif
|
||||
if (WriteConsoleA(MSVCRT_console_out, str, len, &count, NULL)
|
||||
&& count == len)
|
||||
retval = 0;
|
||||
//UNLOCK_CONSOLE;
|
||||
#ifndef __REACTOS__ /* r54651 */
|
||||
UNLOCK_CONSOLE;
|
||||
#endif
|
||||
return retval;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue