From 8ddd579744cecde4222738a37c17e89620b3bf2d Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Mon, 20 Jan 2014 22:05:03 +1100 Subject: kernel32-console-text-fixes --- dlls/kernel32/console.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 67c353b..46a2029 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -108,7 +108,7 @@ static void input_records_AtoW( INPUT_RECORD *buffer, int count ) } } -/* map char infos to ASCII */ +/* map char info to ASCII */ static void char_info_WtoA( CHAR_INFO *buffer, int count ) { char ch; @@ -122,7 +122,7 @@ static void char_info_WtoA( CHAR_INFO *buffer, int count ) } } -/* map char infos to Unicode */ +/* map char info to Unicode */ static void char_info_AtoW( CHAR_INFO *buffer, int count ) { WCHAR ch; @@ -190,7 +190,7 @@ static BOOL put_console_into_raw_mode(int fd) term.c_cflag &= ~(CSIZE | PARENB); term.c_cflag |= CS8; /* FIXME: we should actually disable output processing here - * and let kernel32/console.c do the job (with support of enable/disable of + * and let kernel32/console.c do the job (with the support of the enable/disable values of * processed output) */ /* term.c_oflag &= ~(OPOST); */ @@ -203,8 +203,8 @@ static BOOL put_console_into_raw_mode(int fd) return S_termios_raw; } -/* put back the console in cooked mode iff we're the process which created the bare console - * we don't test if this process has set the console in raw mode as it could be one of its +/* Put the console back into cooked mode if we are the process which created the bare console. + * We don't test if this process put the console into raw mode, as it could have been one of its * children who did it */ static BOOL restore_console_mode(HANDLE hin) @@ -1151,7 +1151,7 @@ static enum read_console_input_return bare_console_fetch_input(HANDLE handle, in next_char = TRUE; break; case -1: - /* we haven't found the string into key-db, push full input string into server */ + /* we haven't found the string in key-db, so push full input string into server */ idxw = MultiByteToWideChar(CP_UNIXCP, 0, input, idx, inputw, sizeof(inputw) / sizeof(inputw[0])); /* we cannot translate yet... likely we need more chars (wait max 1/2s for next char) */ @@ -1529,7 +1529,7 @@ BOOL WINAPI AllocConsole(void) memset(&siConsole, 0, sizeof(siConsole)); siConsole.cb = sizeof(siConsole); - /* setup a view arguments for wineconsole (it'll use them as default values) */ + /* setup view arguments for wineconsole (it'll use them as default values) */ if (siCurrent.dwFlags & STARTF_USECOUNTCHARS) { siConsole.dwFlags |= STARTF_USECOUNTCHARS; @@ -1661,7 +1661,7 @@ BOOL WINAPI ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer, /* wait for at least one available input record (it doesn't mean we'll have * chars stored in xbuf...) * - * Although SDK doc keeps silence about 1 char, SDK examples assume + * Although SDK doc says nothing about reading 1 char, SDK examples assume * that we should wait for at least one character (not key). --KS */ charsread = 0; @@ -1989,7 +1989,7 @@ static DWORD WINAPI CONSOLE_SendEventThread(void* pmt) /****************************************************************** * CONSOLE_HandleCtrlC * - * Check whether the shall manipulate CtrlC events + * Check whether we should manipulate Ctrl-C events */ int CONSOLE_HandleCtrlC(unsigned sig) { @@ -2004,7 +2004,7 @@ int CONSOLE_HandleCtrlC(unsigned sig) { /* Create a separate thread to signal all the events. * This is needed because: - * - this function can be called in an Unix signal handler (hence on an + * - this function can be called in a Unix signal handler (hence on a * different stack than the thread that's running). This breaks the * Win32 exception mechanisms (where the thread's stack is checked). * - since the current thread, while processing the signal, can hold the @@ -2052,7 +2052,7 @@ BOOL WINAPI GenerateConsoleCtrlEvent(DWORD dwCtrlEvent, } SERVER_END_REQ; - /* FIXME: Shall this function be synchronous, i.e., only return when all events + /* FIXME: Should this function be synchronous, i.e., only return when all events * have been handled by all processes in the given group? * As of today, we don't wait... */ @@ -2295,8 +2295,8 @@ static BOOL next_line(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi) /****************************************************************** * write_block * - * WriteConsoleOutput helper: writes a block of non special characters - * Block can spread on several lines, and wrapping, if needed, is + * WriteConsoleOutput helper: writes a block of non-special characters + * Block can spread over several lines, and wrapping, if needed, is * handled * */ @@ -2324,8 +2324,8 @@ static BOOL write_block(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi, { int pos = csbi->dwCursorPosition.X; /* FIXME: we could reduce the number of loops - * but, in most cases we wouldn't gain lots of time (it would only - * happen if we're asked to overwrite more than twice the part of the line, + * but, in most cases, we wouldn't gain lots of time (it would only + * happen if we're asked to overwrite part of the line more than twice, * which is unlikely */ for (done = 0; done < len; done += blk) @@ -2414,7 +2414,7 @@ BOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber switch (psz[i]) { case '\b': case '\t': case '\n': case '\a': case '\r': - /* don't handle here the i-th char... done below */ + /* don't handle the i-th char here... this is done below */ if ((k = i - first) > 0) { if (!write_block(hConsoleOutput, &csbi, mode, &psz[first], k)) @@ -2750,7 +2750,7 @@ BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput, LPSMALL_RECT lpScr * CONSOLE_FillLineUniform * * Helper function for ScrollConsoleScreenBufferW - * Fills a part of a line with a constant character info + * Fills part of a line with constant character info */ void CONSOLE_FillLineUniform(HANDLE hConsoleOutput, int i, int j, int len, LPCHAR_INFO lpFill) { @@ -2927,8 +2927,8 @@ BOOL WINAPI SetConsoleDisplayMode(HANDLE hConsoleOutput, DWORD dwFlags, * ====================================================================*/ /* some missing functions... - * FIXME: those are likely to be defined as undocumented function in kernel32 (or part of them) - * should get the right API and implement them + * FIXME: these (or some of these) functions are likely to be defined as undocumented in kernel32 + * we should get the right API and implement them * SetConsoleCommandHistoryMode * SetConsoleNumberOfCommands[AW] */ -- 1.8.3.2