reactos/reactos/base/shell/cmd
Jeffrey Morlan 8b52a8e50a - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work.
- ReadBatchLine: Don't strip the trailing \n, the parser needs it. Remove handling of :labels and @quiet commands, now done by the parser.
- ReadCommand: Add a \n to the line. Move PrintPrompt call out, since the prompt shouldn't be printed for additional lines read in a command beyond the first.

svn path=/trunk/; revision=35530
2008-08-22 14:37:11 +00:00
..
lang Rename the Norwegian RC Files to no-NO.rc, which is correct according to MSDN. 2008-08-01 13:08:15 +00:00
res Add 8 bits and 16 bits icons 2007-12-29 16:02:48 +00:00
alias.c - Moved ExpandAlias call from ParseCommandLine to ReadCommand; aliases should only be processed when reading from the console. Removed processing of %variable% substitutions in ExpandAlias - not necessary now that aliases are expanded earlier. 2008-08-12 23:46:15 +00:00
attrib.c - Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined. 2007-08-01 10:17:13 +00:00
batch.c - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work. 2008-08-22 14:37:11 +00:00
batch.h - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work. 2008-08-22 14:37:11 +00:00
beep.c - Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined. 2007-08-01 10:17:13 +00:00
call.c - Implement X>&Y redirections. Hold redirections in a linked list structure, because order matters (>x 2>&1 is not the same as 2>&1 >x). Allow redirection of any handle number from 0 to 9. 2008-08-21 15:33:59 +00:00
chcp.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
choice.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
cls.c - Minor fixes to work more like WinXP's cmd 2008-05-17 20:07:31 +00:00
cmd.c - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work. 2008-08-22 14:37:11 +00:00
cmd.h - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work. 2008-08-22 14:37:11 +00:00
cmd.rbuild - Begin writing a real parser for cmd. &, &&, ||, and () are implemented. The parenthesized blocks aren't too useful yet as the parser can't read additional lines; doing this will require some restructuring in cmd.c. 2008-08-21 20:18:35 +00:00
cmd.rc Rename the Norwegian RC Files to no-NO.rc, which is correct according to MSDN. 2008-08-01 13:08:15 +00:00
cmddbg.c Fix debug output of strings 2008-05-15 20:29:50 +00:00
cmddbg.h - Fix some warnings spotted by MSVC 2008-05-17 08:49:39 +00:00
cmdinput.c - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work. 2008-08-22 14:37:11 +00:00
cmdtable.c fix a bug in goto 2008-02-01 09:49:58 +00:00
cmdver.h move explorer and cmd. Add a few .rbuild files 2006-02-16 23:23:37 +00:00
color.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
config.h Fix debug output of strings 2008-05-15 20:29:50 +00:00
console.c Improvements to cmd ConPrintfPaging: 2008-07-27 14:03:44 +00:00
copy.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
date.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
del.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
delay.c - Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined. 2007-08-01 10:17:13 +00:00
dir.c - Minor fixes to work more like WinXP's cmd 2008-05-17 20:07:31 +00:00
dirstack.c - Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined. 2007-08-01 10:17:13 +00:00
echo.c - Begin writing a real parser for cmd. &, &&, ||, and () are implemented. The parenthesized blocks aren't too useful yet as the parser can't read additional lines; doing this will require some restructuring in cmd.c. 2008-08-21 20:18:35 +00:00
error.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
filecomp.c - Fix some warnings spotted by MSVC 2008-05-17 08:49:39 +00:00
files.txt Samuel Erdtman <samuel@erdtman.se> 2007-09-27 08:35:08 +00:00
for.c - Implement X>&Y redirections. Hold redirections in a linked list structure, because order matters (>x 2>&1 is not the same as 2>&1 >x). Allow redirection of any handle number from 0 to 9. 2008-08-21 15:33:59 +00:00
free.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
goto.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
history.c cmd: replace static traces by dynamic ones 2008-05-15 20:02:05 +00:00
history.txt Remove outdated email address. 2007-05-27 14:50:12 +00:00
if.c Fix debug output of strings 2008-05-15 20:29:50 +00:00
internal.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
label.c - cmd_label: If a label is given on the command line, don't truncate it to only 12 characters; NTFS supports up to 32. Also, use _tcsncat, since _tcsncpy won't always nul-terminate. 2008-08-04 14:16:01 +00:00
license.txt move explorer and cmd. Add a few .rbuild files 2006-02-16 23:23:37 +00:00
locale.c Delete all Trailing spaces in code. 2007-10-19 23:21:45 +00:00
main.c Fix compiling rostests 2007-08-02 06:59:36 +00:00
memory.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
misc.c - Implement X>&Y redirections. Hold redirections in a linked list structure, because order matters (>x 2>&1 is not the same as 2>&1 >x). Allow redirection of any handle number from 0 to 9. 2008-08-21 15:33:59 +00:00
move.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
msgbox.c cmd: replace static traces by dynamic ones 2008-05-15 20:02:05 +00:00
parser.c - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work. 2008-08-22 14:37:11 +00:00
path.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
pause.c Fix debug output of strings 2008-05-15 20:29:50 +00:00
precomp.h Fix debug output of strings 2008-05-15 20:29:50 +00:00
prompt.c Delete all Trailing spaces in code. 2007-10-19 23:21:45 +00:00
readme.txt Remove outdated email address. 2007-05-27 14:50:12 +00:00
readme2.txt move explorer and cmd. Add a few .rbuild files 2006-02-16 23:23:37 +00:00
redir.c - Begin writing a real parser for cmd. &, &&, ||, and () are implemented. The parenthesized blocks aren't too useful yet as the parser can't read additional lines; doing this will require some restructuring in cmd.c. 2008-08-21 20:18:35 +00:00
ren.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
replace.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
resource.h Delete all Trailing spaces in code. 2007-10-19 23:21:45 +00:00
screen.c Delete all Trailing spaces in code. 2007-10-19 23:21:45 +00:00
set.c - Begin writing a real parser for cmd. &, &&, ||, and () are implemented. The parenthesized blocks aren't too useful yet as the parser can't read additional lines; doing this will require some restructuring in cmd.c. 2008-08-21 20:18:35 +00:00
setlocal.c fix a bug in goto 2008-02-01 09:49:58 +00:00
shift.c Fix debug output of strings 2008-05-15 20:29:50 +00:00
start.c - Implement X>&Y redirections. Hold redirections in a linked list structure, because order matters (>x 2>&1 is not the same as 2>&1 >x). Allow redirection of any handle number from 0 to 9. 2008-08-21 15:33:59 +00:00
strtoclr.c move explorer and cmd. Add a few .rbuild files 2006-02-16 23:23:37 +00:00
time.c Fix debug output of strings 2008-05-15 20:29:50 +00:00
timer.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
title.c - Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined. 2007-08-01 10:17:13 +00:00
todo.txt move explorer and cmd. Add a few .rbuild files 2006-02-16 23:23:37 +00:00
type.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
ver.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
verify.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
vol.c - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf. 2008-07-26 22:49:49 +00:00
where.c - Fix cmd's SearchForExecutable: it was inside out, giving extension priority over directory. 2008-08-08 16:48:21 +00:00
window.c Fix debug output of strings 2008-05-15 20:29:50 +00:00

ReactOS command line interpreter CMD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ReactOS command line interpreter CMD is derived from FreeCOM, the
FreeDOS command line interpreter.

We are shooting mainly to be just like 2000/XP cmd.exe.  They are very close and only a small number(none that i can recall off the top of my head, so maybe 0) differences have been found between those two.  It has been reported that ROS cmd.exe does not work on nt4 because of a missing api.  I'm hoping to fix this at some point.


Compiling
~~~~~~~~~
ROS cmd used to depend on __REACTOS__ to provide two different ways to build cmd.  There is still code left in it for this but...  The __REACTOS__ = 0 has not been develped, maintained.  And therefore it does not even compile anymore.  __REACTOS__ = 1 works fine on both windows(nt). and someday i plan to remove all the __REACTOS__ = 0.

Using rbuild you can compile cmd seperatly by "make cmd_install".  Also you can compile cmd using MSVC 6 and soon 7/8 hopefully.


Current Features
~~~~~~~~~~~~~~~~
 - environment handling with prompt and path support.
 - directory utilities.
 - command-line history with doskey-like features.
 - batch file processing.
 - input/output redirection and piping.
 - alias support.
 - filename completion (use TAB), both unix and windows style.


Credits
~~~~~~~
FreeDOS developers:
   normat@rpi.edu (Tim Norman)
   mrains@apanix.apana.org.au (Matt Rains)
   ejeffrey@iastate.edu (Evan Jeffrey)
   Steffen.Kaiser@Informatik.TU-Chemnitz.DE (Steffen Kaiser)
   Svante Frey (sfrey@kuai.se)
   Oliver Mueller (ogmueller@t-online.de)
   Aaron Kaufman (morgan@remarque.berkeley.edu)
   Marc Desrochers (bitzero@hotmail.com)
   Rob Lake (rlake@cs.mun.ca)
   John P. Price <linux-guru@gcfl.net>
   Hans B Pufal <hansp@digiweb.com>

ReactOS developers:
   Eric Kohl
   Emanuele Aliberti <ea@iol.it>
   Paolo Pantaleo <paolopan@freemail.it>
   Brandon Turner <turnerb7@msu.edu>



Bugs
~~~~
There is still many bugs ;)
Please report bugs to ReactOS team <ros-dev@reactos.org> or to bugzilla at www.reactos.org