Commit graph

27 commits

Author SHA1 Message Date
Kamil Hornicek cd1f57b5d4 [CMD]
- fix resource leaks CID 716324, 716323, 716322, 716321, 716320, 716319, 716318

svn path=/trunk/; revision=64871
2014-10-21 16:05:54 +00:00
Hermès Bélusca-Maïto 51e2a35e96 [CMD-HELP]
Add a help.exe utility to replace the old built-in command "help" in cmd.exe (i.e. do it the Win2k3 way).
This way, if somebody runs a personalized command-line environment which provides its own help command, one can use the personalized help command and not the standard one (e.g. the "help" command of RosBE).

Adapted by myself from a patch by Lee Schroeder.
CORE-5701 #resolve #comment Committed in revision 59832, thanks :) I use a trick to be able to compile the utility (use: ninja cmd_help) because doing "ninja help" has a signification in ninja (signaled by AmineKhaldi).

svn path=/trunk/; revision=59832
2013-08-26 12:45:34 +00:00
Hermès Bélusca-Maïto 523f0d4f97 [CMD]
Yet again some whitespace fixes.

svn path=/trunk/; revision=59396
2013-06-30 16:10:54 +00:00
Hermès Bélusca-Maïto 55e05466fb [CMD]
Give help for the "help" command.

svn path=/trunk/; revision=59393
2013-06-30 14:09:38 +00:00
Hermès Bélusca-Maïto 3f69dc1614 [CMD]
Fix whitespace (part 4/x) (convert tabs into 4-space indent).

svn path=/trunk/; revision=59383
2013-06-30 12:27:18 +00:00
Amine Khaldi 2bd930547c * Slap *some* sense into our header inclusions.
* This significantly shrinks the dependency tracking data and the compiled objects size, which speeds up the whole build process (especially the incremental builds) accelerating the daily development as a result.
* No intended code changes, ~27% smaller build. Enjoy ;)

svn path=/trunk/; revision=58214
2013-01-24 23:00:42 +00:00
Timo Kreuzer ece4aa3f3f [CMD]
Handle the + character only optionally as a token seperator, so that other commands like rename are not affected.

svn path=/trunk/; revision=56349
2012-04-14 21:35:58 +00:00
Timo Kreuzer 00b699d98b [CMD]
Fix MSVC / 64 bit warnings

svn path=/trunk/; revision=56258
2012-03-28 09:50:04 +00:00
Jeffrey Morlan 9f0ebd0b54 - Simplified code for CD, PUSHD, and POPD commands and also fixed some bugs.
svn path=/trunk/; revision=40365
2009-04-05 01:50:24 +00:00
Jeffrey Morlan ad25b56ea8 Make command parsing in DoCommand/Execute more compatible with Windows
svn path=/trunk/; revision=40280
2009-03-29 05:13:35 +00:00
Jeffrey Morlan 341c5b2e5f - Allow running a batch file from inside a FOR
- A little cleanup

svn path=/trunk/; revision=40038
2009-03-15 15:45:17 +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 fd6ed40845 cmd_rmdir: Implement ability to remove multiple directories with one command.
svn path=/trunk/; revision=38946
2009-01-19 17:29:21 +00:00
Jeffrey Morlan 8bb3a3af67 - cmd_mkdir: Give an error message if the directory already exists (Bug 3961)
- Also, allow multiple directories to be created by one invocation

svn path=/trunk/; revision=38289
2008-12-22 23:50:53 +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 198d88a60b - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf.
- Also change FilePromptYN and FilePromptYNA to take a resource ID. Remove varargs code which nobody used (and didn't actually work anyway)

svn path=/trunk/; revision=34816
2008-07-26 22:49:49 +00:00
Jeffrey Morlan 6320253c94 In mkdir, don't add a backslash to the end - it can trick CreateDirectory into creating a dir with the name of a DOS device (even in Windows).
svn path=/trunk/; revision=34810
2008-07-26 17:15:37 +00:00
Colin Finck 0b51d20053 Revert the _T('x') to 'x' changes from my previous commit.
Although both methods work properly, _T('x') seems to be the more convenient method used throughout cmd.

svn path=/trunk/; revision=33546
2008-05-17 09:23:21 +00:00
Colin Finck 3b1370bd40 - Fix some warnings spotted by MSVC
- Define cmd_exit to ExitProcess if _DEBUG_MEM is not defined.
  Fixes compilation, when _DEBUG_MEM is turned off.

svn path=/trunk/; revision=33545
2008-05-17 08:49:39 +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 c16f477a80 Fix buffer overflow bug in mkdir command
See issue #2499 for more details.

svn path=/trunk/; revision=28072
2007-08-01 13:34:48 +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
Colin Finck d759e74461 Remove the wrong \0 character
svn path=/trunk/; revision=27723
2007-07-18 20:00:26 +00:00
Colin Finck 244d310147 Add the missing "help <command>" functionality in cmd (patch by Pierre Schweitzer, heis_spiter AT hotmail DOT com)
I slightly modified the patch to include a terminating null character
See issue #2406 for more details.

svn path=/trunk/; revision=27722
2007-07-18 19:41:25 +00:00
Eric Kohl e0364c78da Remove outdated email addresses.
svn path=/trunk/; revision=26648
2007-05-05 11:32:25 +00:00
Hervé Poussineau 253fa4b7a0 Fix mkdir command, if compiled in UNICODE. Patch by Pierre Schweitzer (heis_spiter at hotmail dot com)
See issue #2216 for more details.

svn path=/trunk/; revision=26545
2007-04-27 17:40:50 +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