Commit graph

14 commits

Author SHA1 Message Date
Jeffrey Morlan
39d2af2432 Make CALL command do another round of %-variable substitutions.
svn path=/trunk/; revision=39879
2009-03-05 05:10:10 +00:00
Jeffrey Morlan
516e7fa09c Rework batch-file processing so that 'call file.bat' doesn't return until the file has finished, allowing constructs like 'call file.bat & somethingelse' to work properly.
svn path=/trunk/; revision=39858
2009-03-03 20:06:54 +00:00
Jeffrey Morlan
484ee2fa7e Separate batch file contexts and FOR contexts into two different structs, since they don't actually have anything in common any more
svn path=/trunk/; revision=39846
2009-03-02 19:08:25 +00:00
Jeffrey Morlan
b18a547c1b Implement complete support for FOR command (including /D, /F, /L, and /R switches). cmd is now close to being able to run RosBE 1.3's initialization without errors.
svn path=/trunk/; revision=39742
2009-02-24 20:29:18 +00:00
Jeffrey Morlan
6c2116d0cf - Implement call :label by creating a new batch context; this way calls can be nested and have their own %0-%9 parameters.
- GetBatchVar: Implement %~n. Remove %? (an old FreeDOS-ism; the Windows equivalent is %ERRORLEVEL%)

svn path=/trunk/; revision=35681
2008-08-26 20:36:38 +00:00
Jeffrey Morlan
c49ed3a82c Remove the "LPTSTR cmd" argument to internal commands; there's no need for a command to be told its own name. It was only used in two places:
- a hack in cmd_mkdir that was already obsolete a decade ago
- to distinguish "echo" from "echo.", but that is the wrong way to implement this anyway. There's nothing particularly special about the period, "echo" is just one of those commands that is lenient about where its parameters begin, and when it echos a line, the first character (usually a space, but in the case of "echo." a period) is skipped.

svn path=/trunk/; revision=35647
2008-08-25 23:22:03 +00:00
Jeffrey Morlan
07912f2b23 - 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.
- Allow quotes around the redirection file name.
- Batch: Fix buffer overflow bug (incorrect size for bc->BatchFilePath)

svn path=/trunk/; revision=35508
2008-08-21 15:33:59 +00:00
Hervé Poussineau
c79d92ab52 Fix debug output of strings
svn path=/trunk/; revision=33536
2008-05-15 20:29:50 +00:00
Hervé Poussineau
2f9c333ded cmd: replace static traces by dynamic ones
svn path=/trunk/; revision=33533
2008-05-15 20:02:05 +00:00
Christoph von Wittich
76569bc213 handle call :Label
fix goto :Label

svn path=/trunk/; revision=32070
2008-01-31 20:55:05 +00:00
Daniel Reimer
ae7da04787 Delete all Trailing spaces in code.
svn path=/trunk/; revision=29690
2007-10-19 23:21:45 +00:00
Thomas Bluemel
df91a99233 - Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined.
- Change all calls to malloc, realloc and free to cmd_alloc, cmd_realloc and cmd_free

svn path=/trunk/; revision=28065
2007-08-01 10:17:13 +00:00
Eric Kohl
e0364c78da Remove outdated email addresses.
svn path=/trunk/; revision=26648
2007-05-05 11:32:25 +00:00
Ged Murphy
a5c746a592 move explorer and cmd. Add a few .rbuild files
svn path=/trunk/; revision=21019
2006-02-16 23:23:37 +00:00