Fixed command line size

Added workaround for broken command line support

svn path=/trunk/; revision=1599
This commit is contained in:
Eric Kohl 2001-02-03 10:40:19 +00:00
parent 62d9e11763
commit 2a2b027dc1

View file

@ -1,4 +1,4 @@
/* $Id: cmd.c,v 1.22 2000/07/19 06:58:12 ekohl Exp $ /* $Id: cmd.c,v 1.23 2001/02/03 10:40:19 ekohl Exp $
* *
* CMD.C - command-line interface. * CMD.C - command-line interface.
* *
@ -113,6 +113,9 @@
* *
* 28-Dec-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>) * 28-Dec-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
* Restore window title after program/batch execution * Restore window title after program/batch execution
*
* 03-Feb-2001 (Eric Kohl <ekohl@rz-online.de>)
* Workaround because argc[0] is NULL under ReactOS
*/ */
#include "config.h" #include "config.h"
@ -128,9 +131,6 @@
#include "batch.h" #include "batch.h"
#define CMDLINE_LENGTH 2048 //1024
BOOL bExit = FALSE; /* indicates EXIT was typed */ BOOL bExit = FALSE; /* indicates EXIT was typed */
BOOL bCanExit = TRUE; /* indicates if this shell is exitable */ BOOL bCanExit = TRUE; /* indicates if this shell is exitable */
BOOL bCtrlBreak = FALSE; /* Ctrl-Break or Ctrl-C hit */ BOOL bCtrlBreak = FALSE; /* Ctrl-Break or Ctrl-C hit */
@ -246,7 +246,7 @@ Execute (LPTSTR first, LPTSTR rest)
{ {
/* exec the program */ /* exec the program */
#ifndef __REACTOS__ #ifndef __REACTOS__
TCHAR szFullCmdLine [1024]; TCHAR szFullCmdLine [CMDLINE_LENGTH];
#endif #endif
PROCESS_INFORMATION prci; PROCESS_INFORMATION prci;
STARTUPINFO stui; STARTUPINFO stui;
@ -1063,6 +1063,7 @@ Initialize (int argc, char *argv[])
{ {
ParseCommandLine (_T("\\cmdstart.bat")); ParseCommandLine (_T("\\cmdstart.bat"));
} }
#ifndef __REACTOS__
else else
{ {
/* try to run cmdstart.bat from install dir */ /* try to run cmdstart.bat from install dir */
@ -1078,6 +1079,7 @@ Initialize (int argc, char *argv[])
ParseCommandLine (commandline); ParseCommandLine (commandline);
} }
} }
#endif
#ifdef FEATURE_DIR_STACK #ifdef FEATURE_DIR_STACK
/* initialize directory stack */ /* initialize directory stack */
@ -1114,6 +1116,7 @@ static VOID Cleanup (int argc, char *argv[])
ConErrPrintf ("Running \\cmdexit.bat...\n"); ConErrPrintf ("Running \\cmdexit.bat...\n");
ParseCommandLine (_T("\\cmdexit.bat")); ParseCommandLine (_T("\\cmdexit.bat"));
} }
#ifndef __REACTOS__
else else
{ {
/* try to run cmdexit.bat from install dir */ /* try to run cmdexit.bat from install dir */
@ -1130,6 +1133,7 @@ static VOID Cleanup (int argc, char *argv[])
ParseCommandLine (commandline); ParseCommandLine (commandline);
} }
} }
#endif
#ifdef FEATURE_ALIASES #ifdef FEATURE_ALIASES
DestroyAlias (); DestroyAlias ();