1
0
Fork 0
dosbox-staging/src
Patryk Obara a956f14de1 Inject newlines before displaying DOS prompt
In an earlier change, I removed appending newline outside of batch mode
in DOS shell code - that made DOSBox behave less like MS-DOS and more
like modern shells, that do not try to compensate for buggy
applications.

However, we should recognize that DOSBox (unlike e.g. FreeDOS) is designed
to run legacy applications, which might make assumptions about DOS
implementation. Some examples:

- PC Player Benchmark assumes, that help commands are displayed exactly
  at 80x25 terminal and formats the output to fill the whole screen
  (scrolling past DOS4GW messages).
- Quake and other ID games print shareware information on exit, but do
  it via a direct memory dump (not interrupts to print DOS text), and
  follow up with setting cursor exactly at line 22 (which is partly
  written already), expecting shell to inject newline.
- PCC Compiler prints status message on exit without newline, depending
  on MS-DOS shell behaviour.
- TEXTUTIL set of external commands do not print nothing to standard
  output, and are designed to clear the screen, therefore writing a
  newline after .COM commands would be a mistake.

Therefore we want to inject this newline, but not in every case.

New implementation reuses a static variable used by Program base class
(for purpose of translating UNIX newlines to DOS newlines) for detection
if it's appropriate to inject an additional newline or not.

Injecting the newline happens in function displaying the DOS prompt (so
we don't need to write additonal logic for separately handling batch
mode). When starting a non-COM, non-internal command the static variable
is set to the state indicating that next DOS prompt should inject the
newline.

Fixes: #208
2020-03-12 20:54:33 +01:00
..
cpu Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
debug Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
dos Inject newlines before displaying DOS prompt 2020-03-12 20:54:33 +01:00
fpu Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
gui Add output type texturepp for pixel-perfect scaling 2020-03-09 20:12:36 +01:00
hardware Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
ints Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
libs Add output type texturepp for pixel-perfect scaling 2020-03-09 20:12:36 +01:00
misc Inject newlines before displaying DOS prompt 2020-03-12 20:54:33 +01:00
platform Rewrite video capturing and fix some endian issues with all captures as well. Thanks jmarsh 2020-02-06 10:36:10 +00:00
shell Inject newlines before displaying DOS prompt 2020-03-12 20:54:33 +01:00
.gitignore Import svn:ignore props to .gitignore files 2019-09-15 20:34:57 +02:00
dosbox.cpp Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
dosbox.ico Updated Icon. Thanks Chaosfish 2007-01-10 15:07:12 +00:00
dosbox_splash.svg Add DOSBox splash screen graphic in vector format 2019-11-02 19:29:03 +01:00
dosbox_staging_splash.svg Use dosbox-staging splash screen 2020-01-16 06:42:19 +01:00
dosbox_staging_splash_640_400.png Use dosbox-staging splash screen 2020-01-16 06:42:19 +01:00
Makefile.am Add output type texturepp for pixel-perfect scaling 2020-03-09 20:12:36 +01:00
winres.rc Update copyright dates to 2020 2020-03-07 00:18:01 +01:00