Patryk Obara
3eaabb41c1
Fix output formatting of 'dir' command
...
Adapt to 'pause' command working correctly (assuming the terminal height
is 25, this will need further adjustments for supporting 80x50 and
different modes).
Adjust "intro" by 1 space to make formatting the same as MS-DOS 'dir'
command - this makes intro not "merge" visually with the files listed.
Adjust placing of files and directories counters, to make it resemble
most 'dir' implementations.
Count intro lines for purpose of correct pagination with 'dir /p'.
Skip counting not printed lines with 'dir /b /p'.
Output of 'dir /w /p' is still broken, but fixing it will require more
invasive changes.
Fixes : #75
2019-12-23 21:52:37 +01:00
Patryk Obara
e68a64aade
Adjust 'help /all' to fixed 'pause'
2019-12-23 21:52:37 +01:00
Patryk Obara
b0cdfa5161
Do not print newline after every command
...
This newline is already ommitted from batch files and noecho commands,
this change makes the behaviour consistent in interactive mode.
Additional newline is a behaviour inherited from MS-DOS, and even still
visible in Windows cmd.exe, but all modern DOS implementations,
PowerShell, unix terminals, etc - they all prefer consistent behaviour
over addtional newline. Also, there's no point in wasting 4% of screen
estate just to show empty line.
This fixes CLS command, which is now able to properly clean the screen
and place prompt in the first line.
2019-12-23 21:52:37 +01:00
Patryk Obara
c20579a835
Display newline after key was pressed in 'pause' cmd
...
Move newline from the string message to the WriteOut in command itself.
This makes the PAUSE command behave like the original, which is
important for commands like DIR /P.
2019-12-23 21:52:37 +01:00
Patryk Obara
5f9ac5eeab
Remove code ifdefed for OS/2
...
Cleanup before replacing SDL1.2 with SDL2.
OS/2 support was introduced in DOSBox in March 2006. OS/2 reached EOL
in December 2006.
As of 2019, OS/2 is being continued by proprietary 32-bit only ArcaOS,
although there is no official SDL2 support, despite pledges from SDL2
maintainers.
2019-12-09 16:27:11 +01:00
Patryk Obara
59edc4d9b5
Change the length of version field in infobox
...
Otherwise, infobox looks broken when version string has more
than 8 characters.
2019-11-29 06:27:14 +01:00
Patryk Obara
64671a888c
Avoid passing null to strcat
...
Static analysis indicated an issue, when line was being passed as 2nd
argument to strcat:
Null pointer passed as an argument to a 'nonnull' parameter
Replace repeated strcat with creating a formatted string and use
the opportunity to do a small format cleanup.
2019-11-24 17:14:32 +01:00
Patryk Obara
a4a6bed5c1
Merge branch 'svn/trunk'
2019-10-01 18:11:50 +02:00
Peter Veenstra
a919e33aec
Pick some lowhanging fruit. (some memory leaks and unused variables)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4264
2019-10-01 12:11:09 +00:00
Patryk Obara
b62a637157
Import svn:ignore props to .gitignore files
2019-09-15 20:34:57 +02:00
Sjoerd van der Berg
53666d5f27
Extra DIR sorting options patch by Saga Musix
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4255
2019-09-08 12:25:41 +00:00
Peter Veenstra
bec0e79890
Don't remove bytes from autoexec.bat when changing settings from autoexec.bat, but replace them instead. This way the location stays valid.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4212
2019-04-20 13:55:35 +00:00
Peter Veenstra
eb26b9a58e
Change first_shell to be DOS_Shell instead of Program. Makes future manipulations easier.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4211
2019-04-20 13:48:55 +00:00
Peter Veenstra
111fa1d45b
Check lengths before adding C style strings together. Fixes #498
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4202
2019-04-03 10:31:52 +00:00
Peter Veenstra
1fbaff47fc
Update year and address of FSF
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4183
2019-01-25 14:09:58 +00:00
ripsaw8080
31d7e74eac
It is more compatible with DOS to not insert carriage returns in the console device.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4114
2018-06-12 20:04:10 +00:00
Peter Veenstra
5bb10db88b
Time keeps on ticking
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4109
2018-05-29 12:58:58 +00:00
Peter Veenstra
4bcbd35104
Fix ExpandDot not caring about the size of the buffer. (vogons topic 59658)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4108
2018-05-29 09:27:16 +00:00
Peter Veenstra
80740117b9
Take length in consideration before moving the echo off upwards.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4106
2018-05-24 18:09:21 +00:00
Peter Veenstra
85789a06da
Fix echo off being written twice. Attempt to make the line endings in the generated autoexec.bat all DOS style line endings.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4105
2018-05-22 15:18:45 +00:00
Peter Veenstra
6485a80102
Silence a warning
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4070
2018-01-30 15:57:27 +00:00
Peter Veenstra
6cf39c1fc6
Years update
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4021
2017-05-30 11:35:08 +00:00
Peter Veenstra
a3345eed24
Spaces in LOG_MSG and some at the end of the line.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3999
2016-10-02 14:12:32 +00:00
ripsaw8080
4555aa279d
Implement INT 2E -- fixes Gold of the Aztecs and a few other games. Also, stop writing uninitialized junk into first shell's command tail at startup.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3979
2016-04-05 05:48:00 +00:00
Peter Veenstra
3000bd2feb
Be a bit more flexible. Parse ver set 3.2 correctly as well.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3964
2016-02-10 09:42:32 +00:00
Peter Veenstra
2a1ae6fb9c
Improve rename support for when renaming files (in a folder) on a drive different from the current one.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3947
2015-10-08 19:51:01 +00:00
Peter Veenstra
c8a128d733
Rework the parsing of arguments into the FCBs:
...
- We now first split the line into arguments using space,tab,;,=,',' as separators.
- Next we convert /Hello into H ello
- Lastly we feed the arguments 1 and 2 to the FCB_Parsename function
(- It got messy, but the results are better )
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3942
2015-10-02 20:23:14 +00:00
Peter Veenstra
cb28976df6
More robust parsing, so that dosbox -fullscreen A.EXE works
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3934
2015-09-08 13:46:26 +00:00
ripsaw8080
5a748e5cbb
Display a simple startup message for sub-shells instead of the welcome banner.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3930
2015-08-17 15:06:28 +00:00
ripsaw8080
59c9ae1d60
Fix shell PAUSE command when reading extended keys, and make TYPE command more compatible by stopping at EOF byte.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3927
2015-08-05 14:56:36 +00:00
Peter Veenstra
acd7b73c8a
Ignore/remove single % in batchfiles. (Fixes B13Demo batchfiles on pcgamer coverdisc 1995-08)
...
Remove magic constants.
Add some boundary checks.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3925
2015-07-15 16:31:35 +00:00
Peter Veenstra
e4b97eb62e
Handle "copy H*.txt file.txt" correctly
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3907
2015-03-18 14:38:24 +00:00
Peter Veenstra
017fda9ba0
Give some hints when we are on Z:\, but not on other drives.
...
Always return the directory for the drive if the drive exists.
Fixes/improves bug 390.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3888
2015-01-09 10:50:17 +00:00
Peter Veenstra
401d129694
Fix bug 392.
...
'\0' check at the wrong place.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3887
2015-01-09 08:57:43 +00:00
ripsaw8080
56c3a4be9c
Make the shell's internal run loop more like the command prompt run loop. Fixes CALLed batch files when executed in subshells, such as with Norton/Volkov Commander. Reference SourceForge bug #394 .
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3885
2015-01-06 18:32:47 +00:00
Peter Veenstra
0f4c92ca32
Year update.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3878
2015-01-06 14:40:32 +00:00
Peter Veenstra
144aa917e3
Small improvement to copy when dealing with a device (fixes a warning from the drive_cache on the findnext).
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3874
2014-12-12 18:59:36 +00:00
Peter Veenstra
ee0367653b
stdprn is now really prn and you can't read from it. Fixes a weird runtime that reads the PRN handle.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3858
2014-01-12 13:43:47 +00:00
ripsaw8080
f6864ba395
Initialize last byte of command tail.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3831
2013-05-26 01:03:33 +00:00
Peter Veenstra
c041f14071
Fix bug 391 by relaxing the SET /P check.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3829
2013-05-09 14:07:04 +00:00
Peter Veenstra
ca660c0cbf
Use uppercase characters for ScanCMDBool. Explicitly disallow Set/P
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3825
2013-03-20 14:38:53 +00:00
Peter Veenstra
2fea508f7f
Year update
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3812
2013-01-15 09:03:13 +00:00
Peter Veenstra
5eb1217cb4
Move buffer to class for upcomming multiple floppy support (rcblanke). Remove heavy bios_disk dependency from drives.h
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3806
2012-12-26 16:14:19 +00:00
Peter Veenstra
e60a44755a
Add composite lite patch by VileRancour/reenigne.
...
Thanks to everybody who participated in the discussion on the subject.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3804
2012-11-28 18:35:35 +00:00
Peter Veenstra
a6a7f4b82d
Make Visual Studio happy as well.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3803
2012-11-28 17:28:38 +00:00
Peter Veenstra
49fe397b0d
Fix some 64 bit warnings
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3800
2012-11-12 18:32:27 +00:00
Peter Veenstra
ff538caa62
Fix handling of a CDROM image command line option with respect to the -securemode flag
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3779
2012-03-28 15:26:29 +00:00
Peter Veenstra
4907599222
Undo goto:label code. breaks drive switching. Maybe change drive shouldn't be handled in shell:execute
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3774
2012-01-03 17:57:15 +00:00
Peter Veenstra
8749c42829
Treat : as seperater (for goto:label)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3771
2012-01-02 11:14:55 +00:00
Peter Veenstra
a7af902f2f
Even our comments and status messages have less bugs now (jomalin)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3764
2011-12-08 12:47:04 +00:00