Commit Graph

297 Commits

Author SHA1 Message Date
Hugh McMaster 16cb9c4cb7 cmd: 'del' should set %errorlevel% to zero, not one, on error.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-17 22:56:40 +09:00
Hugh McMaster ca8b3843ab cmd: Set colour attributes when clearing the screen with 'cls'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-16 17:51:25 +09:00
Frédéric Delanoy 23e7b5a6b0 cmd: Simplify boolean expressions (PVS-Studio).
Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 12:51:17 +09:00
Thomas Faller 1d09a35878 cmd: Implement 'echo/'. 2015-08-19 08:39:26 +09:00
Andrey Gusev 5cdcd4493f Assorted spelling and typos fixes. 2015-08-18 15:00:13 +09:00
Thomas Faller 3cda870469 cmd: Fix invalid "else if" execution. 2015-06-25 13:56:40 +09:00
Thomas Faller 43dfe76376 cmd: Fix access of uninitialized memory. 2015-06-12 21:22:42 +09:00
Francois Gouget f505e6fb4a Assorted spelling fixes. 2015-03-19 21:54:14 +09:00
Michael Stefaniuc 232390e5b8 cmd: Remove duplicated if-check (PVS-Studio). 2014-11-27 11:43:22 +01:00
Alexandre Julliard 3d3c5ab400 cmd: Add a helper function to check if a path ends with a backslash. 2014-10-30 13:11:27 +09:00
Gerald Pfeifer 51d217e6df cmd: Remove fslashW. 2014-08-21 12:23:38 +02:00
Thomas Faber d4c4f0ab95 cmd: Do not omit mandatory argument to WriteFile. 2014-07-14 17:22:40 +02:00
Frédéric Delanoy 95ae71f3ab Assorted spelling/grammar fixes. 2014-07-01 13:09:13 +02:00
Frédéric Delanoy 0f2bed51bd Assorted spelling fixes. 2014-02-10 15:47:29 +01:00
Frédéric Delanoy e459131677 cmd: Use BOOL type where appropriate. 2013-10-17 10:45:05 +02:00
Marcus Meissner e85d3c7108 cmd: null terminate answer string (Coverity). 2013-07-10 10:53:14 +02:00
Jason Edmeades a5b1172e90 cmd: Fix 'for' expansion of wildcards when no args are supplied. 2013-06-05 11:45:23 +02:00
Jason Edmeades 56a33a8c55 cmd: set "var=value" ignores trailing characters. 2013-06-05 11:45:19 +02:00
Jason Edmeades dc4dd0cb97 cmd: Fix handling of redundant information on goto/labels. 2013-06-04 21:01:13 +02:00
Michael Stefaniuc 6899279bab cmd: Print the debug string instead of the pointer value. 2013-04-17 21:29:20 +02:00
Jason Edmeades 0b00b717b9 cmd: Add beginnings of support for delayed expansion. 2013-01-07 11:15:23 +01:00
Jason Edmeades 3735bf6af5 cmd: Avoid division by zero in set /a with %. 2013-01-07 11:14:24 +01:00
Francois Gouget f963f93964 Assorted spelling fixes. 2013-01-07 11:10:40 +01:00
Ann and Jason Edmeades 95279b87e4 cmd: Add set /a support. 2012-12-21 12:00:19 +01:00
Frédéric Delanoy 5188f08bf4 cmd: Remove dead assignments (clang). 2012-12-20 12:00:45 +01:00
Jason Edmeades d16f4e700b cmd: Add support for NUL in copy. 2012-11-20 11:53:15 +01:00
Jason Edmeades 47b35d5545 cmd: Add support for tokens= (for /f). 2012-11-20 11:46:40 +01:00
Jacek Caban 08c17ada57 cmd: Added HeapFree wrapper. 2012-11-16 11:40:36 +01:00
Jacek Caban c6d24089db cmd: Make allocation unfailable. 2012-11-15 21:21:53 +01:00
Jason Edmeades ae4571fb79 cmd: Fix for loops within for loops. 2012-11-06 16:02:41 +01:00
Frédéric Delanoy 5108b18940 cmd: Fix some leaks (coverity). 2012-11-01 15:54:40 +01:00
Frédéric Delanoy 1d3f679ef1 cmd: Avoid handle leaks (coverity). 2012-10-30 19:14:37 +01:00
Francois Gouget 5f86884771 cmd: Make WCMD_forf_getinputhandle() static. 2012-10-29 10:47:02 +01:00
Frédéric Delanoy 90c6f57fa9 cmd: Add support for GTR comparison operator in if statements. 2012-10-26 12:01:45 +02:00
Frédéric Delanoy 73995c71e0 cmd: Add support for GEQ comparison operator in if statements. 2012-10-26 12:01:40 +02:00
Frédéric Delanoy 80f8d49b07 cmd: Add support for NEQ comparison operator in if statements. 2012-10-26 12:01:36 +02:00
Frédéric Delanoy 14cd4151a9 cmd: Add support for EQU comparison operator in if statements. 2012-10-26 12:01:31 +02:00
Frédéric Delanoy 78af04f427 cmd: Add support for LEQ comparison operator in if statements. 2012-10-26 12:01:25 +02:00
Frédéric Delanoy 154710a093 cmd: Add support for LSS comparison operator in if statements. 2012-10-26 12:01:18 +02:00
Frédéric Delanoy 17607b8020 cmd: Avoid using strstr to match == operator in WCMD_if. 2012-10-26 12:00:44 +02:00
Frédéric Delanoy dd13954424 cmd: Move common error reporting code in WCMD_if. 2012-10-26 12:00:41 +02:00
Frédéric Delanoy cee1652e61 cmd: Get rid of longer needed 'end' parameter in WCMD_parameter. 2012-10-26 11:59:58 +02:00
Frédéric Delanoy 517ed44396 cmd: Correctly set the 'raw' parameter in calls to WCMD_parameter in WCMD_if. 2012-10-26 11:59:54 +02:00
Jason Edmeades 51b0d941d0 cmd: Add for /f delims= support. 2012-10-24 11:30:43 +02:00
Jason Edmeades a45301cb93 cmd: Strip quotes from for /f string before attempting to parse it. 2012-10-24 11:30:40 +02:00
Jason Edmeades 182c5459b0 cmd: Correct for /f string and command set handling. 2012-10-24 11:30:36 +02:00
Jason Edmeades 9171fd1454 cmd: Add support for usebackq (for /f). 2012-10-24 11:30:11 +02:00
Jason Edmeades 293da2d06c cmd: Implement support for for /f eol=c option. 2012-10-24 11:29:43 +02:00
Jason Edmeades a3688948d0 cmd: Use a common function for the string parsing in for /f. 2012-10-24 11:29:22 +02:00
Jason Edmeades 84ecf34c2c cmd: Refactor building a list of directories out of WCMD_for. 2012-10-24 11:29:13 +02:00
Jason Edmeades d64298df99 cmd: Add support parsing for /f options and implement skip. 2012-10-24 11:29:06 +02:00
Francois Gouget ed9e745580 Assorted spelling tweaks and fixes. 2012-10-22 12:21:55 +02:00
Jason Edmeades 3c05818515 cmd: Add support for calling a built in command. 2012-10-17 11:59:34 +02:00
Jason Edmeades 9f83165efb cmd: Rename parameter passed to builtin calls. 2012-10-17 11:57:35 +02:00
Jason Edmeades dccccfc273 cmd: Handle very odd delimiter support for command line. 2012-10-17 11:57:23 +02:00
Jason Edmeades 130cdcd727 cmd: Add full support for copy concatenation and ascii/binary. 2012-10-15 15:25:22 +02:00
Jason Edmeades 260210f6e6 cmd: Support copy to an 'ascii' destination. 2012-10-15 15:25:20 +02:00
Jason Edmeades 7b9971abf9 cmd: Rework the body of WCMD_copy based on new parameter parsing. 2012-10-15 15:25:10 +02:00
Jason Edmeades 89b8868ae0 cmd: Rework parameter parsing for WCMD_Copy. 2012-10-15 15:25:07 +02:00
Jason Edmeades b1dacc6c37 cmd: cmd.exe /c or /k should suppress copy overwrite prompts. 2012-10-02 14:08:36 +02:00
Jason Edmeades c55cd87632 cmd: Fix setlocal/endlocal implementation. 2012-10-01 14:30:49 +02:00
Jason Edmeades 9dde62cb96 cmd: Add full for /R support. 2012-10-01 14:29:58 +02:00
Jason Edmeades 8fbd65358e cmd: Convert wcmd_for to use WCMD_parameter. 2012-10-01 14:24:48 +02:00
Frédéric Delanoy c5a4878f5f cmd: Reuse common string constants. 2012-09-28 17:14:38 +02:00
Jason Edmeades cd9451c499 cmd: Display 'set' sort ordering correctly. 2012-09-26 17:49:23 +02:00
Jason Edmeades e35b239b41 cmd: Fix parameterization around delimiters. 2012-09-26 17:47:20 +02:00
Jason Edmeades ebd1810918 cmd: Space does not delimit environment variable names. 2012-09-06 18:23:40 +02:00
Jason Edmeades f9b4c78a89 cmd: A successful set should reset the errorlevel. 2012-09-06 18:23:40 +02:00
Jason Edmeades 9877b53b8c cmd: Fix incorrect pointer comparison. 2012-09-05 21:56:55 +02:00
Jason Edmeades 141e33b845 cmd: More generic zero iteration for loop fix. 2012-09-05 21:56:52 +02:00
Jason Edmeades 4f71f4af59 cmd: Fix "PATH=value" command. 2012-09-05 13:25:24 +02:00
Jason Edmeades c5a72379a1 cmd: Fix renaming inside directories. 2012-09-04 15:04:01 +02:00
Jason Edmeades 94f9e789c9 cmd: Fix rmdir error during recursive delete. 2012-09-04 15:03:44 +02:00
Jason Edmeades 1a9413b98a cmd: for /l with zero iterations failed to skip its commands. 2012-09-03 15:51:26 +02:00
Jason Edmeades 3a25888f38 cmd: for loops did not respect boundaries. 2012-09-03 15:51:20 +02:00
Frédéric Delanoy 0e4ceb9a8d cmd: Use BOOL instead of int for boolean variables. 2012-03-29 20:49:18 +02:00
Frédéric Delanoy 668e44ab26 cmd: Respect constant wide strings naming convention. 2012-02-13 12:29:34 +01:00
Frédéric Delanoy 7cf307a7bd cmd: Reuse common string constants. 2012-02-13 12:29:30 +01:00
Alexandre Julliard 3c8d8f1e95 cmd: START needs to be an internal command. 2012-02-11 16:12:01 +01:00
Francois Gouget af3d368aca cmd: Fix an internationalization issue in WCMD_ask_confirm().
Don't break the strings to translate in little chunks: this makes it
hard or even impossible to translate them correctly. For instance it
must be possible to insert an unbreakable space before question marks
for French.
2012-01-23 19:42:54 +01:00
Francois Gouget c2a9aae4ca cmd: Fix asking for a Yes / No / All confirmation. 2012-01-23 19:42:52 +01:00
Francois Gouget 774eb34e36 cmd: Remove an unused variable. 2012-01-23 19:42:52 +01:00
Akihiro Sagawa 8a00eb8609 cmd: Improve the message when the volume has no label. 2011-12-15 17:46:31 +01:00
Francois Gouget 8ef901fa32 cmd: Use FormatMessage() for better internationalization support.
This makes it possible to reorder the format string placeholders in message translations.
2011-12-06 18:23:49 +01:00
Francois Gouget bc176ecb81 cmd: Print error messages on stderr, not on stdout. 2011-12-02 11:53:23 +01:00
Frédéric Delanoy a5becedd0e cmd: Reorder global vars declarations/definitions to improve readability. 2011-11-30 11:44:13 +01:00
Frédéric Delanoy 44a1e7d199 cmd: Move commonly used global vars declarations to header file. 2011-11-30 11:44:05 +01:00
Frédéric Delanoy ad81871f15 cmd: Move a global var to the file using it. 2011-11-30 11:43:21 +01:00
Francois Gouget 3b72928464 cmd: Use WCMD_output_asis*() for strings that are not supposed to contain formating directives. 2011-11-25 17:16:11 +01:00
Frédéric Delanoy 3d028ab67c cmd: Avoid dead assignment (clang). 2011-11-24 20:57:01 +01:00
Frédéric Delanoy de7841b2ce cmd: Move builtins list to builtins.c. 2011-11-21 15:34:58 +01:00
Frédéric Delanoy e3a5423478 cmd: Move WCMD_part_execute function to avoid forward declaration. 2011-11-18 15:37:04 +01:00
Frédéric Delanoy 5fc25686a4 cmd: Avoid duplication of commonly used strings. 2011-11-15 11:45:58 +01:00
Frédéric Delanoy e8d8df3c54 cmd: Trim whitespace in echo on/off. 2011-11-15 11:44:40 +01:00
Frédéric Delanoy 6221e300bc cmd: Avoid comparison between signed and unsigned values. 2011-11-08 13:55:14 +01:00
Frédéric Delanoy 45c1dff552 cmd: Make 'if errorlevel' only recognize integer values. 2011-10-28 12:43:27 +02:00
Frédéric Delanoy 42f126e80d cmd: Constify WCMD_pushd parameter. 2011-10-21 12:31:46 +02:00
Frédéric Delanoy d19455e895 cmd: Rename WCMD_opt_s_strip_quotes function. 2011-10-19 16:38:52 +02:00
Frédéric Delanoy 6fd9d77426 cmd: Make RENAME work for read-only files. 2011-10-14 20:26:43 +02:00
Frédéric Delanoy 1e4c17e5dd cmd: Make MOVE work for read-only files. 2011-10-13 20:07:28 +02:00