Jason Edmeades
f252e9dfc8
cmd: Change command line parsing away from argv/argc.
2012-10-03 11:24:13 +02:00
Jason Edmeades
88f14bb590
cmd: Fix basic cmd.exe /c "echo hello" type syntax.
...
Add checks for existance of command to run in order to keep the
new quote handling capabilities of cmd.exe /C or /K. If the command
cannot be found, drop back to /S processing mode as per cmd.exe help.
2012-10-02 14:08:36 +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
4e10456bf6
cmd: Ensure current directory saved during cmd /c.
2012-10-01 14:31:33 +02:00
Francois Gouget
906127fe29
Assorted spelling fixes.
2012-10-01 12:07:41 +02:00
Frédéric Delanoy
8b3d494247
cmd: Spelling fixes.
2012-09-28 17:14:34 +02:00
Jason Edmeades
a810e41e47
cmd: Echo back command with whitespace removed first.
2012-09-26 17:49:11 +02:00
Jason Edmeades
2ff533c1f2
cmd: Support for ^ character at end of line.
...
Based on a patch by John Chow.
2012-09-26 17:48:59 +02:00
Jason Edmeades
d8c0fbcedc
cmd: Add circumflex support into command shell.
2012-09-26 17:48:24 +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
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
Alexandre Julliard
3c8d8f1e95
cmd: START needs to be an internal command.
2012-02-11 16:12:01 +01:00
Alexandre Julliard
c9eee73450
makefiles: Define __WINESRC__ when building programs.
2012-01-23 16:07:37 +01:00
Frédéric Delanoy
0b358703ca
cmd: Avoid unreachable code (Coverity).
2012-01-03 19:28:22 +01:00
Frédéric Delanoy
dbdf927e74
cmd: Merge two if blocks.
2011-12-20 20:24:10 +01:00
Frédéric Delanoy
15f65a0792
cmd: Avoid dead assignment (Clang).
2011-12-07 17:50:03 +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
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
ad81871f15
cmd: Move a global var to the file using it.
2011-11-30 11:43:21 +01:00
Frédéric Delanoy
513ee9a3aa
cmd: Rename unicodePipes variable.
2011-11-29 16:48:33 +01:00
Frédéric Delanoy
1a8df977ac
cmd: Reduce the scope of a global variable.
2011-11-29 16:48:22 +01:00
Frédéric Delanoy
51b05c72d7
cmd: Use boolean types for boolean variables.
2011-11-29 16:48:12 +01:00
Frédéric Delanoy
2820ed9764
cmd: Remove an unused global variable.
2011-11-29 16:47:58 +01:00
Eric Pouech
6faea5a606
cmd: Correctly parse program name when launching external processes.
2011-11-29 13:25:55 +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
de7841b2ce
cmd: Move builtins list to builtins.c.
2011-11-21 15:34:58 +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
6221e300bc
cmd: Avoid comparison between signed and unsigned values.
2011-11-08 13:55:14 +01:00
Frédéric Delanoy
41a9450440
cmd: Avoid unnecessary null pointer checks.
2011-10-31 16:48:26 +01: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
5e3cb1867b
cmd: Infer handle type from handle value in WCMD_fgets and WCMD_ReadAndParseLine.
2011-10-06 16:46:41 -05:00
Frédéric Delanoy
63e11558b6
cmd: Improve handle type recognition in WCMD_ReadFile.
2011-10-05 16:59:48 -05:00
Frédéric Delanoy
aee397a317
cmd: Output error messages to stderr instead of stdout where appropriate.
2011-10-03 09:45:43 -05:00
Frédéric Delanoy
29b57ca82d
cmd: Get rid of unused parameter in WCMD_ReadFile.
2011-09-28 17:29:24 +02:00
Frédéric Delanoy
d6f4f7308a
cmd: Avoid checking whether we're in console mode for every read.
2011-09-28 17:29:10 +02:00
Frédéric Delanoy
fbddecab77
cmd: Add WCMD_output_stderr function to output error messages to stderr.
2011-09-26 22:42:01 +02:00
Frédéric Delanoy
e5565a6d64
cmd: Use helper function to return file io buffer.
2011-09-26 22:42:01 +02:00
Frédéric Delanoy
a536004f34
cmd: Improve WCMD_volume documentation.
2011-09-23 12:43:53 +02:00
Frédéric Delanoy
c4db72f50e
cmd: verify_mode has BOOL type instead of int.
2011-09-16 17:24:19 +02:00
Frédéric Delanoy
b3561bf82e
cmd: echo_mode has BOOL type instead of int.
2011-09-16 17:24:18 +02:00
Frédéric Delanoy
9bf515974d
cmd: Make some variables static.
2011-09-14 17:27:20 +02:00
Christian Costa
faa23d2a16
cmd: Move externals list at the same place as the builtins one so it's easier to known how a command is implemented.
2011-09-12 11:10:53 +02:00
Frédéric Delanoy
4c3c2b121e
cmd: Backup echo mode before running external batch file.
2011-09-09 16:09:58 +02:00
Frédéric Delanoy
3627c28958
cmd: Add an output parameter to WCMD_parameter to point to the end of the extracted param, if requested.
2011-09-08 20:08:07 +02:00
Christian Costa
4aa865ed76
cmd: Remove attrib from builtins list.
2011-09-07 11:35:58 +02:00
Christian Costa
7b41ffbf61
attrib: Move implementation from cmd.exe to the standalone command.
2011-09-06 13:25:50 +02:00
Frédéric Delanoy
54c2f6491d
cmd: Get rid of obsolete autoexec.bat handling code.
2011-09-06 12:23:56 +02:00
Frédéric Delanoy
c1c76d279e
cmd: Add WCMD_output_asis_stderr function.
2011-08-30 16:55:46 +02:00
Frédéric Delanoy
93a68fa659
cmd: Avoid reading garbage when looking for redirection handle.
2011-08-29 13:55:47 +02:00
Frédéric Delanoy
bbdaed2f33
cmd: Fix redirection handle parsing.
2011-08-29 13:55:41 +02:00
Frédéric Delanoy
ef70d88be0
cmd: Make some WCHAR arrays static.
2011-08-26 11:32:35 +02:00
Frédéric Delanoy
eda33f22ff
cmd: Fix if/else tab handling.
2011-08-25 14:51:02 +02:00
Frédéric Delanoy
6d3fd3abcd
cmd: Fix REM tab handling.
2011-08-25 14:50:51 +02:00
Frédéric Delanoy
f37ab586d8
cmd: Skip tabs as well as spaces in WCMD_skip_leading_spaces.
2011-08-25 14:50:38 +02:00
Frédéric Delanoy
7b125126a7
cmd: Fix FOR tab handling.
2011-08-25 14:50:31 +02:00
Frédéric Delanoy
20fa3fe802
cmd: Fix FOR tab handling.
2011-08-24 14:01:13 +02:00
Frédéric Delanoy
ff501904a7
cmd: Constify some function parameters.
2011-08-23 16:53:50 +02:00
Frédéric Delanoy
bb47576f59
cmd: Rename WCMD_strtrim_leading_spaces to WCMD_skip_leading_spaces to better reflect its purpose.
2011-08-23 16:53:50 +02:00
Frédéric Delanoy
0758390607
cmd: Clarify some trace messages.
2011-08-23 16:53:50 +02:00
Frédéric Delanoy
d1731eb98a
cmd: Use CSTR_* instead of hardcoded values as result of CompareStringW.
2011-08-23 16:53:49 +02:00
Frédéric Delanoy
71a237d478
cmd: Fix handling of lines starting with echo. or echo:.
2011-08-05 16:41:14 +02:00
Dan Kegel
15ce9a5784
cmd: mkdir: Handle multiple arguments.
2011-08-03 17:44:53 +02:00
Frédéric Delanoy
8b73720d4e
cmd: Fix some comments.
2011-07-27 12:28:26 +02:00
Frédéric Delanoy
f43297f989
cmd: Do not show prompt when echo mode is off.
2011-07-15 17:07:46 +02:00
Frédéric Delanoy
123d5d0d60
cmd: Output a empty line before version in VER.
2011-07-15 17:03:17 +02:00
Dan Kegel
32ea7d1f2e
cmd: WCMD_delete: fix /s for dirnames containing spaces, add test.
2011-06-02 17:24:58 +02:00
Dan Kegel
1857a05996
cmd: Don't read past end of thisVar in WCMD_expand_envvar (valgrind).
2011-05-26 15:23:57 +02:00
Detlef Riekenberg
7045e478a8
cmd: Add CHOICE builtin with DOS6 to XP commandline parameter.
2010-12-20 12:47:41 +01:00
Alexandre Goujon
4cd2a0e542
cmd: Add a space at the end of the first echo'ed batch line.
2010-11-08 18:13:36 +01:00
Michael Stefaniuc
71e647fe51
cmd: Don't treat all command lines with '/?' as builtin commands.
2010-06-22 11:22:55 +02:00
Yann Droneaud
727df7a2ef
cmd: Fixed uninitialised field in WCMD_addCommand() (Valgrind).
2010-03-15 13:42:08 +01:00
Arjun Comar
a607f53779
cmd: Fix cmd to take /? as a help parameter.
2010-03-04 17:31:05 +01:00
Paul Vriens
4064efdc27
cmd: Fix a memory leak (Valgrind).
2010-02-23 12:06:51 +01:00
Dan Kegel
b6e8e13599
cmd: Fix echoing of multiline commands.
2010-01-04 11:41:28 +01:00
Dan Kegel
27235ecb65
cmd: Echoed prompts are preceded by a blank line.
2010-01-04 11:41:28 +01:00
Andrew Nguyen
f06cb3e6c0
cmd: Set the PROMPT environment variable on startup.
2009-12-31 12:12:18 +01:00
Austin English
cc72c4d346
cmd: Use DOS newlines, not UNIX.
2009-12-23 14:27:31 +01:00
Alexandre Julliard
79b00726f2
cmd: Use the explicit name for all A/W function.
2009-12-09 18:52:40 +01:00
Marcus Meissner
f62218fc66
cmd: Break out of the argument scan loop (Coverity).
2009-12-04 14:34:58 +01:00
Peter Dons Tychsen
a78ccf1160
cmd: Fix handling of quotes when line includes redirections and/or pipes.
2009-10-08 14:00:00 +02:00
André Hentschel
765d9a1411
wcmd: Ignore start and end quotes.
2009-08-29 16:48:52 +02:00
Francois Gouget
0c01b71a4e
cmd: Replace malloc() with HeapAlloc().
2009-06-15 13:42:30 +02:00
Francois Gouget
c48e5e048f
cmd: Introduce a WCMD_strsubstW() function to simplify string substitutions.
2009-06-15 13:42:29 +02:00
James Hawkins
474276d569
cmd: Fix a memory leak (Coverity 904).
2009-03-23 18:21:05 +01:00
Diaa Sami
8ea1a12ed6
cmd: Fixed a number of buffer overflows.
2009-03-03 14:03:48 +01:00
Erich Hoover
4691cc4f85
wcmd: Properly cleanup redirects when there are no in/out/error pipes.
2009-02-12 11:54:02 +01:00
Erich Hoover
8defde719a
wcmd: Fix redirecting a pipe to another pipe.
2009-01-13 16:39:18 +01:00
Erich Hoover
423929ad10
wcmd: Handle batch scripts containing quotes within quotes.
2009-01-13 16:39:13 +01:00
Francois Gouget
e46d25a661
cmd: Make some functions static.
2009-01-06 10:09:37 +01:00
Francois Gouget
6b16d0229d
cmd: WCMD_strtrim_trailing_spaces() is unused so remove it.
2009-01-06 10:09:37 +01:00
Alexandre Julliard
854c9b2089
cmd.exe: Don't use wvsprintf on sysv-style varargs, use a libwine function instead.
2009-01-03 11:38:26 +01:00
Alexandre Julliard
aa6f1c730a
cmd: Don't include time.h before winsock.h to avoid conflicts.
2008-12-31 20:05:33 +01:00
Francois Gouget
3d070ff8a6
cmd: Reorder some functions to avoid forward declarations.
2008-12-31 12:28:02 +01:00
Francois Gouget
3154768a94
cmd: Make WCMD_DumpCommands() static.
2008-12-15 12:25:00 +01:00
Michael Stefaniuc
cf8571fed0
cmd: Remove some superfluous casts.
2008-12-04 12:08:24 +01:00
Lei Zhang
e6bce797d3
cmd: Check the return value from HeapAlloc.
2008-07-30 14:38:51 +02:00
Francois Gouget
304b415284
Assorted spelling fixes.
2008-03-19 11:21:27 +01:00
Jason Edmeades
4492334762
cmd.exe: Support cd .. when saving current directory.
2008-03-04 11:54:21 +01:00