From a5becedd0e869ec979e933fda61a8010aedca9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Tue, 29 Nov 2011 23:30:52 +0100 Subject: [PATCH] cmd: Reorder global vars declarations/definitions to improve readability. --- programs/cmd/builtins.c | 23 ++++++++++------------- programs/cmd/wcmdmain.c | 29 ++++++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 7a8f8971c89..60f9f992356 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -37,12 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(cmd); extern int defaultColor; extern BOOL echo_mode; -static HINSTANCE hinst; -static struct env_stack *saved_environment; struct env_stack *pushd_directories; - -static BOOL verify_mode = FALSE; - +const WCHAR dotW[] = {'.','\0'}; +const WCHAR dotdotW[] = {'.','.','\0'}; +const WCHAR nullW[] = {'\0'}; +const WCHAR starW[] = {'*','\0'}; +const WCHAR slashW[] = {'\\','\0'}; +const WCHAR equalW[] = {'=','\0'}; const WCHAR inbuilt[][10] = { {'C','A','L','L','\0'}, {'C','D','\0'}, @@ -90,24 +91,20 @@ const WCHAR inbuilt[][10] = { {'C','H','O','I','C','E','\0'}, {'E','X','I','T','\0'} }; - static const WCHAR externals[][10] = { {'A','T','T','R','I','B','\0'}, {'X','C','O','P','Y','\0'} }; - -const WCHAR dotW[] = {'.','\0'}; -const WCHAR dotdotW[] = {'.','.','\0'}; -const WCHAR nullW[] = {'\0'}; -const WCHAR starW[] = {'*','\0'}; -const WCHAR slashW[] = {'\\','\0'}; -const WCHAR equalW[] = {'=','\0'}; static const WCHAR fslashW[] = {'/','\0'}; static const WCHAR onW[] = {'O','N','\0'}; static const WCHAR offW[] = {'O','F','F','\0'}; static const WCHAR parmY[] = {'/','Y','\0'}; static const WCHAR parmNoY[] = {'/','-','Y','\0'}; +static HINSTANCE hinst; +static struct env_stack *saved_environment; +static BOOL verify_mode = FALSE; + /************************************************************************** * WCMD_ask_confirm * diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 94ce9de6ce7..df4f9cba15e 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -32,19 +32,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(cmd); extern const WCHAR inbuilt[][10]; +extern struct env_stack *pushd_directories; + +BATCH_CONTEXT *context = NULL; DWORD errorlevel; +WCHAR quals[MAX_PATH], param1[MAXSTRING], param2[MAXSTRING]; + int defaultColor = 7; BOOL echo_mode = TRUE; -static BOOL opt_c, opt_k, opt_s; + +WCHAR anykey[100], version_string[100]; const WCHAR newline[] = {'\r','\n','\0'}; const WCHAR space[] = {' ','\0'}; -WCHAR anykey[100]; -WCHAR version_string[100]; -WCHAR quals[MAX_PATH], param1[MAXSTRING], param2[MAXSTRING]; -BATCH_CONTEXT *context = NULL; -extern struct env_stack *pushd_directories; + +static BOOL opt_c, opt_k, opt_s, unicodeOutput = FALSE; + +/* Variables pertaining to paging */ +static BOOL paged_mode; static const WCHAR *pagedMessage = NULL; -static BOOL unicodeOutput = FALSE; +static int line_count; +static int max_height; +static int max_width; +static int numChars; #define MAX_WRITECONSOLE_SIZE 65535 @@ -151,12 +160,6 @@ void WCMD_output_stderr (const WCHAR *format, ...) { WCMD_output_asis_len(string, ret, GetStdHandle(STD_ERROR_HANDLE)); } -static int line_count; -static int max_height; -static int max_width; -static BOOL paged_mode; -static int numChars; - void WCMD_enter_paged_mode(const WCHAR *msg) { CONSOLE_SCREEN_BUFFER_INFO consoleInfo;