Author: akhaldi Date: Wed Sep 7 09:31:52 2016 New Revision: 72606
URL: http://svn.reactos.org/svn/reactos?rev=72606&view=rev Log: [CRT] Sync _cputs() with Wine Staging 1.9.16. CORE-11866 CORE-8546
Modified: trunk/reactos/media/doc/README.WINE trunk/reactos/sdk/lib/crt/conio/cputs.c
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=7... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Wed Sep 7 09:31:52 2016 @@ -287,6 +287,7 @@ 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
Modified: trunk/reactos/sdk/lib/crt/conio/cputs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/conio/cputs.c?r... ============================================================================== --- trunk/reactos/sdk/lib/crt/conio/cputs.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/conio/cputs.c [iso-8859-1] Wed Sep 7 09:31:52 2016 @@ -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; }