diff options
author | Bill Meier <wmeier@newsguy.com> | 2014-10-05 22:14:57 -0400 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2014-10-06 02:55:49 +0000 |
commit | 07698d536b72f5267ebe654b0b0cbc394b713ce1 (patch) | |
tree | 1ae72c69e7e2ac830cf3ac3752da6c9fe067ee15 /ui/win32 | |
parent | 0111e461938d47efd1eb8dc17f135b93b253ab52 (diff) |
Adjust some whitespace to match editor modelines.
Change-Id: Ia22cac3ebd7a454c156f98d967e6fd61f708a2b3
Reviewed-on: https://code.wireshark.org/review/4489
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'ui/win32')
-rw-r--r-- | ui/win32/console_win32.c | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/ui/win32/console_win32.c b/ui/win32/console_win32.c index 7e69616697..c768868b0f 100644 --- a/ui/win32/console_win32.c +++ b/ui/win32/console_win32.c @@ -60,51 +60,51 @@ static gboolean stdin_capture = FALSE; /* Don't grab stdin & stdout if TRUE */ static gboolean needs_redirection(int std_handle) { - HANDLE fd; - DWORD handle_type; - DWORD error; - - fd = GetStdHandle(std_handle); - if (fd == NULL) { - /* - * No standard handle. According to Microsoft's - * documentation for GetStdHandle(), one reason for - * this would be that the process is "a service on - * an interactive desktop"; I'm not sure whether - * such a process should be popping up a console. - * - * However, it also appears to be the case for - * the standard input and standard error, but - * *not* the standard output, for something run - * with a double-click in Windows Explorer, - * sow we'll say it needs redirection. - */ - return TRUE; - } - if (fd == INVALID_HANDLE_VALUE) { - /* - * OK, I'm not when this would happen; return - * "no redirection" for now. - */ - return FALSE; - } - handle_type = GetFileType(fd); - if (handle_type == FILE_TYPE_UNKNOWN) { - error = GetLastError(); - if (error == ERROR_INVALID_HANDLE) { - /* - * OK, this appears to be the case where we're - * running something in a mode that needs a - * console. - */ - return TRUE; - } - } - - /* - * Assume no redirection is needed for all other cases. - */ - return FALSE; + HANDLE fd; + DWORD handle_type; + DWORD error; + + fd = GetStdHandle(std_handle); + if (fd == NULL) { + /* + * No standard handle. According to Microsoft's + * documentation for GetStdHandle(), one reason for + * this would be that the process is "a service on + * an interactive desktop"; I'm not sure whether + * such a process should be popping up a console. + * + * However, it also appears to be the case for + * the standard input and standard error, but + * *not* the standard output, for something run + * with a double-click in Windows Explorer, + * sow we'll say it needs redirection. + */ + return TRUE; + } + if (fd == INVALID_HANDLE_VALUE) { + /* + * OK, I'm not when this would happen; return + * "no redirection" for now. + */ + return FALSE; + } + handle_type = GetFileType(fd); + if (handle_type == FILE_TYPE_UNKNOWN) { + error = GetLastError(); + if (error == ERROR_INVALID_HANDLE) { + /* + * OK, this appears to be the case where we're + * running something in a mode that needs a + * console. + */ + return TRUE; + } + } + + /* + * Assume no redirection is needed for all other cases. + */ + return FALSE; } /* The code to create and desstroy console windows should not be necessary, |