Jeffrey Morlan
6f8ec7004e
Fixed output of various date/time stuff ($D and $T in prompt, %DATE% and %TIME% variables, DATE /T and TIME /T commands) to be more compatible with Windows.
...
svn path=/trunk/; revision=40050
2009-03-16 00:44:08 +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
a1eb1f6ba4
Replace a couple hacks supporting specific cases of enhanced variable substitution (%~var) with a more general implementation. All tests in rostests/win32/cmd/script_testsuite can now be passed using ReactOS cmd in Windows, though still not yet in ReactOS itself.
...
svn path=/trunk/; revision=40024
2009-03-15 04:54:41 +00:00
Jeffrey Morlan
4ef352817a
In a 'Bad command or filename' error, print the name of the non-existent program, so getting the error from a batch file isn't so mysterious.
...
svn path=/trunk/; revision=39998
2009-03-13 01:26:08 +00:00
Jeffrey Morlan
8c83602d51
In a pipeline ("prog1 | prog2") run all programs simultaneously, using a real pipe instead of a temporary file. Output from RosBE "make" is now visible immediately instead of having to wait for it to complete.
...
svn path=/trunk/; revision=39991
2009-03-12 22:04:59 +00:00
Daniel Reimer
70d2641a89
Bug 4255: ReactOS norwegian translate files by Lars Martin Hambro
...
svn path=/trunk/; revision=39977
2009-03-12 11:28:33 +00:00
Jeffrey Morlan
db0b0ba158
Give an error message when trying to DEL a file that doesn't exist (Bug 4244). Patch by Victor Martinez <vicmarcal at hotmail.com>.
...
svn path=/trunk/; revision=39944
2009-03-11 02:17:53 +00:00
Jeffrey Morlan
eb94cff07d
add ConPrintf and ConPrintfPaging prototypes to cmd.h
...
svn path=/trunk/; revision=39911
2009-03-08 19:21:07 +00:00
Jeffrey Morlan
be7941b485
- Clean up code for DIR command
...
- Fix bug where "DIR directoryname /S" wouldn't list subdirectories (you needed to do directoryname\*.*)
- Get rid of extra * that appeared in DIR /B /S output
svn path=/trunk/; revision=39910
2009-03-08 17:37:11 +00:00
Jeffrey Morlan
fff257c059
Implement SETLOCAL and ENDLOCAL commands. Make delayed expansion optional (disabled by default, enabled by CMD /V switch or with SETLOCAL)
...
svn path=/trunk/; revision=39892
2009-03-06 18:05:45 +00:00
Jeffrey Morlan
79c11338fa
- Ignore special characters in a REM line.
...
- Make the \n-printing in batch files with ECHO on more consistant with how Windows does it.
svn path=/trunk/; revision=39890
2009-03-06 17:27:42 +00:00
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
6db382c056
A little cleanup of cmd.c:
...
- Remove bIsBatch variable, and just check for bc != NULL instead.
- Since Batch doesn't return until the batch file is finished, CMD /C no longer needs to call ProcessInput.
- Don't bother loading ntdll.dll on Windows 98; it doesn't export the functions we want to use from it.
svn path=/trunk/; revision=39861
2009-03-04 04:23:40 +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
eff51218fb
Speed up batch file execution by reading a line at a time instead of a byte at a time.
...
svn path=/trunk/; revision=39848
2009-03-02 20:00:26 +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
9ea64ffebb
Fix BatchParams to handle unconventional spacing/quoting properly.
...
svn path=/trunk/; revision=39836
2009-03-01 20:25:13 +00:00
Jeffrey Morlan
ba3e9218c7
- FileGetString: Only end line on '\n', not on '\r'.
...
- Various improvements to ExpandAlias
svn path=/trunk/; revision=39817
2009-02-28 18:00:38 +00:00
Jeffrey Morlan
9ed19ef909
Handle quotes in a CMD /C or CMD /K argument properly.
...
svn path=/trunk/; revision=39795
2009-02-27 18:09:33 +00:00
Dmitry Gorbachev
1f80c7f756
Japanese explorer-new translation by Pcds90net (ds200xnet-ros|at|yahoo|dot|co|dot|jp). Bug #4203 .
...
svn path=/trunk/; revision=39787
2009-02-27 15:50:43 +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
a4da9945e8
Clean up DirReadParam a bit, reworked so that the code for adding a filename parameter doesn't need to be duplicated 3 times. Should handle quotes properly now (bug 4177)
...
svn path=/trunk/; revision=39699
2009-02-21 18:12:16 +00:00
Aleksey Bragin
16df5c0cb7
- Properly free a buffer allocated during "copy" command. Fixes cmd.exe crash when copy operation experiences a write error or is being interrupted with a Ctrl+C keypress.
...
svn path=/trunk/; revision=39684
2009-02-19 12:51:57 +00:00
Matthias Kupfer
d0948aebdb
- fix icon for 32bpp mode
...
svn path=/trunk/; revision=39652
2009-02-17 19:40:40 +00:00
Jeffrey Morlan
dc8e4248dd
- Improve performance of TYPE command by reading more than 1 byte at a time. (Bug 4057)
...
- Also allow it to be interrupted by ^C.
svn path=/trunk/; revision=39628
2009-02-16 21:50:54 +00:00
Jeffrey Morlan
f56130f164
SET /A improvements:
...
- Strip quotes from expression
- Use _tcstol instead of _ttoi to parse numbers, allowing hex/octal numbers to be used
- Skip space after an identifier
- Don't echo result when in a batch file
svn path=/trunk/; revision=39618
2009-02-16 03:00:27 +00:00
Jeffrey Morlan
9b0334da19
Don't expand FOR variables until execution time, so that special characters in them won't cause unwanted syntactic effects.
...
For example, "for %a in (^>) do echo %a" should just echo the greater than sign.
svn path=/trunk/; revision=39611
2009-02-15 18:18:16 +00:00
Jeffrey Morlan
122c236111
Make delayed environment-variable expansions actually be delayed.
...
svn path=/trunk/; revision=39597
2009-02-14 01:13:17 +00:00
Dmitry Gorbachev
468038e6d4
Kenichi Aramaki (karamaki-at-gmail-dot-com):
...
- Fix Japanese keyboard layout (bug #4145 ).
- Fix buffer overflow in CMD.EXE when dealing with double-byte code page (bug #4146 ).
svn path=/trunk/; revision=39493
2009-02-08 17:41:21 +00:00
Jeffrey Morlan
4d6bf5e49a
split, splitspace: Allow quotation marks anywhere in an argument, not just the start and end. (Bug 4054)
...
svn path=/trunk/; revision=39095
2009-01-25 16:39:06 +00:00
Martin Fuchs
5219191647
code beautification
...
svn path=/trunk/; revision=39088
2009-01-25 11:54:31 +00:00
Martin Fuchs
002d1e57e4
update to VS2008 format project files
...
svn path=/trunk/; revision=39085
2009-01-25 11:21:49 +00:00
Martin Fuchs
706b0df927
update XMLStorage to the current version, compatible to VS2008 and GCC@Linux
...
svn path=/trunk/; revision=39084
2009-01-25 11:20:47 +00:00
Martin Fuchs
a00125aff1
update to VS2008 format project files
...
svn path=/trunk/; revision=39083
2009-01-25 11:16:54 +00:00
Martin Fuchs
31dbcaed16
add new resource scripts to the project file
...
svn path=/trunk/; revision=39082
2009-01-25 11:15:56 +00:00
Martin Fuchs
e90c8b1830
add code comment
...
svn path=/trunk/; revision=39081
2009-01-25 11:05:27 +00:00
Martin Fuchs
e5c2f55545
activate korean resource script
...
svn path=/trunk/; revision=39080
2009-01-25 10:48:40 +00:00
Martin Fuchs
1940bfea3b
fix code page of korean resource script and remove buggy encoding of the "execute" dialog title
...
svn path=/trunk/; revision=39078
2009-01-25 09:03:27 +00:00
Pierre Schweitzer
edb415aa34
Added/Updated French translation for almost everything in trunk by Amine Khaldi.
...
With some adjustements I did.
We're ready for FOSDEM :). Real thanks for your work Amine.
Dedicated by Amine to Aleksey : happy birthday ;)
svn path=/trunk/; revision=39065
2009-01-24 17:56:31 +00:00
Pierre Schweitzer
07c701dd73
"Typo"
...
svn path=/trunk/; revision=39058
2009-01-24 10:13:21 +00:00
Pierre Schweitzer
ebd3acfd61
Added/Updated French translations for /base, excepted for calc.
...
svn path=/trunk/; revision=39057
2009-01-24 10:10:25 +00:00
Stefan Ginsberg
f233dab1ee
- Remove unnecessary allowwarnings="true"
...
svn path=/trunk/; revision=38948
2009-01-19 18:08:28 +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
39934ca5e2
cmd_move:
...
- Only check for options at the beginning of the command line (subsequent code already assumed the filenames were at the end).
- Give an error message if too many parameters are given.
- If no destination is given, default to current directory.
- Replace excessively complicated code to get source directory with single GetFullPathName call; hopefully that is sufficient. Check for pszFile == NULL to prevent crash that occurred when source was "/..".
- To determine whether source wildcard matches are files or directories, just use WIN32_FIND_DATA's dwFileAttributes; it's easier than constructing paths to pass to IsExistingFile/IsExistingDirectory.
- Fix memory leaks: some returns were missing freep(arg).
svn path=/trunk/; revision=38910
2009-01-18 20:21:03 +00:00
Jeffrey Morlan
2429c7df65
Don't treat a slash as the beginning of a new argument for the MOVE command (Bug 4013). Patch by Víctor Martínez Calvo <vicmarcal at hotmail.com>.
...
svn path=/trunk/; revision=38811
2009-01-17 12:55:46 +00:00
Matthias Kupfer
2b06cfc0ef
Víctor Martínez Calvo <vicmarcal AT hotmail DOT com>
...
- Fix dir command behavior for files without extension.
- See issue #3968 for more details.
svn path=/trunk/; revision=38746
2009-01-13 15:21:08 +00:00
Thomas Bluemel
9452b7e23c
Remove unused code
...
svn path=/trunk/; revision=38742
2009-01-13 00:34:32 +00:00
Dmitry Gorbachev
4e52f2d1e3
BATCH_BUFFSIZE -> 8192.
...
svn path=/trunk/; revision=38724
2009-01-12 16:13:06 +00:00
Martin Fuchs
607be3272e
update XMLStorage: preserve CDATA formating of processed XML documents
...
svn path=/trunk/; revision=38492
2008-12-31 15:59:36 +00:00
Jeffrey Morlan
00fd22c6ba
Make IF /? work again
...
svn path=/trunk/; revision=38481
2008-12-30 23:55:50 +00:00