cmd: Move commonly used global vars declarations to header file.

This commit is contained in:
Frédéric Delanoy 2011-11-29 23:30:51 +01:00 committed by Alexandre Julliard
parent ad81871f15
commit 44a1e7d199
4 changed files with 12 additions and 27 deletions

View File

@ -24,10 +24,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(cmd);
extern WCHAR quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
extern BATCH_CONTEXT *context;
extern DWORD errorlevel;
/****************************************************************************
* WCMD_batch
*

View File

@ -19,13 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* NOTES:
* On entry to each function, global variables quals, param1, param2 contain
* the qualifiers (uppercased and concatenated) and parameters entered, with
* environment-variable and batch parameter substitution already done.
*/
/*
* FIXME:
* - No support for pipes, shell parameters
@ -43,9 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cmd);
extern int defaultColor;
extern BOOL echo_mode;
extern WCHAR quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
extern BATCH_CONTEXT *context;
extern DWORD errorlevel;
static HINSTANCE hinst;
static struct env_stack *saved_environment;

View File

@ -19,13 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* NOTES:
* On entry, global variables quals, param1, param2 contain
* the qualifiers (uppercased and concatenated) and parameters entered, with
* environment-variable and batch parameter substitution already done.
*/
#define WIN32_LEAN_AND_MEAN
#include "wcmd.h"
@ -33,9 +26,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(cmd);
extern WCHAR quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
extern DWORD errorlevel;
typedef enum _DISPLAYTIME
{
Creation = 0,

View File

@ -30,6 +30,9 @@
#include <ctype.h>
#include <wine/unicode.h>
/* msdn specified max for Win XP */
#define MAXSTRING 8192
/* Data structure to hold commands delimitors/separators */
typedef enum _CMDdelimiters {
@ -155,6 +158,15 @@ typedef struct _DIRECTORY_STACK
WCHAR *fileName;
} DIRECTORY_STACK;
/*
* Global variables quals, param1, param2 contain the current qualifiers
* (uppercased and concatenated) and parameters entered, with environment
* variables and batch parameters substitution already done.
*/
extern WCHAR quals[MAX_PATH], param1[MAXSTRING], param2[MAXSTRING];
extern DWORD errorlevel;
extern BATCH_CONTEXT *context;
#endif /* !RC_INVOKED */
/*
@ -264,6 +276,3 @@ extern WCHAR version_string[];
#define WCMD_VERSION 1033
#define WCMD_MOREPROMPT 1034
#define WCMD_LINETOOLONG 1035
/* msdn specified max for Win XP */
#define MAXSTRING 8192