1
0
Fork 0
Commit graph

69 commits

Author SHA1 Message Date
Patryk Obara
f243f585ed Change Config::PrintConfig to use std::string 2020-04-04 04:20:28 +02:00
Patryk Obara
04d2e9f3f1 Allow config properties to be deprecated
This allows us to show a warning to the user if the .conf file includes
a property that is no longer supported, or a property that is completely
unknown.  Actual handling of the property can still be implemented
(e.g. to use as a fallback for modern replacement), but doesn't need
to be.
2020-03-27 00:54:11 +01:00
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
Joshua Fern
f2029d71d8 Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
Patryk Obara
bb7e202d2c Print newline after 'config -axadd' 2020-02-15 19:10:20 +01:00
Patryk Obara
0b505db4d8 Print newline after 'config -wcd' 2020-02-15 19:10:20 +01:00
Patryk Obara
8c8b1b58d7 Print newline after 'config -l' 2020-02-15 19:10:20 +01:00
Patryk Obara
25d1890196 Fix crash on 'config -get "foo bar"'
Crash happened due to mismatch between internationalization string and
parameters passed to WriteOut.

Also, print newline after output if no error occured.
2020-02-15 19:10:20 +01:00
Patryk Obara
270c9351e2 Print newline after 'config /?'
Also, remove unnecesary line breaks and improve formatting a little.
2020-02-15 19:10:20 +01:00
krcroft
878959a0aa Formatting and review fixes 2020-01-22 09:40:00 +01:00
krcroft
ec52c3ef3d Fix NULL issues in programs-related code 2020-01-22 09:40:00 +01:00
Peter Veenstra
46babe5666 End of environment is a bit shorter. Very old code, lets see what breaks.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4235
2019-06-20 09:22:17 +00:00
Peter Veenstra
8a156f17d8 fix limit check
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4210
2019-04-20 11:49:59 +00:00
Peter Veenstra
6b0f8d6833 Strip leading = from value. Can happen if you execute "irq =5".
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4209
2019-04-19 19:28:55 +00:00
Peter Veenstra
687e3cf058 Ensure room before adding environment variable using set. Noted when running a subshell under NC.
Bug left: we don't have a lot of environment space in that case (not the 160 minimum).


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4200
2019-04-01 16:50:49 +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
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
ripsaw8080
630b9befb5 ANSI emulation is activated for the session when an escape sequence is encountered other than those used by internal messages. Fixes LucasArts setup programs (Bug #458) provided that ANSI emulation is not activated.
Compatible scroll fill for ANSI emulation.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4097
2018-05-03 16:49:48 +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
db0a72cd4d and a few more.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3921
2015-07-04 18:37:14 +00:00
Peter Veenstra
bb604c1d77 some stl implementations fake the interators...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3920
2015-07-04 18:24:54 +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
2a8cf58b99 Reenable the setting of the %CONFIG% variable when doing a CONFIG -get command (reported in forum)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3842
2013-11-05 22:12:59 +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
81085e036e Keep track of last written character instead of previous character in buffer. This allow handling of leading and single newlines.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3750
2011-09-01 12:08:35 +00:00
Peter Veenstra
999f33de27 Update year. Remove CVS tags
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3700
2011-04-26 09:34:55 +00:00
Peter Veenstra
56f3bf59e5 Typo
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3664
2011-01-04 10:30:05 +00:00
Ralf Grillenberger
c759fb6de1 config:
-  fix crashes when passing unexpected parameter combinations
- config -get 'sectionname' now lists the properties with their values
- add missing translation string
Thanks robertmo for reporting.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3654
2010-11-01 22:21:54 +00:00
Ralf Grillenberger
ec1fbccb4d GCC compilation and test for empty string fix related to the config patch.
Thanks TeaRex and ripsaw8080 for reporting.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3652
2010-10-29 21:18:44 +00:00
Ralf Grillenberger
143beec6b1 Add new features to the config command for control of the config file:
- manipulate the autoexec section
- display information on sections and values
- show the used config files and startup command line parameters 
- restart capability
- save config files either in the config or program directory

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3651
2010-10-28 17:35:45 +00:00
Peter Veenstra
27714abb47 Convert line ends in the shell. Improves compatibility with the sierra what.exe utility
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3550
2010-02-13 11:37:25 +00:00
Peter Veenstra
a78b2c4f8b Update year
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3548
2010-02-11 13:36:50 +00:00
Peter Veenstra
16d14b78e1 Some year and version numbers
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3410
2009-05-27 09:15:42 +00:00
Peter Veenstra
d8266a6a41 revise switchToLongcmd a bit. allow execution of mount/imgmount from menus and such.(beta3)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3326
2009-03-23 10:55:36 +00:00
Peter Veenstra
9ec3c20d7d Headers, Add Prop_path which is capable of resolving paths relatively and absolutely.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3284
2009-02-01 14:19:20 +00:00
Peter Veenstra
2314183f15 Some warnings.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3227
2008-10-05 14:44:52 +00:00
Sebastian Strohhäcker
c994a9a25e fix some msvc64bit warnings
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3217
2008-09-07 10:55:16 +00:00
Peter Veenstra
e7d66020ea Add non-parsing WriteOut.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3184
2008-07-26 19:06:26 +00:00
Peter Veenstra
3f2e4fbd83 Allow longer commandlines in MOUNT and IMGMOUNT.
Fix crash reported by MiniMax (mount -u 0).
Fix bug reported by Tearex ("config -get" broken).
Add some protection that makes it harder to mount a directory from
within an executable.
Add some protection to make mounting from command /c much harder.
Add a securemode commandline switch to config and dosbox that should make it
impossible to mount a location when this isn't wanted by the user. (Addresses concerns of CVE-2007-6328)
Update documentation to reflect this.


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3114
2008-03-02 11:13:47 +00:00
Peter Veenstra
45074288cf Partial rewrite of the configsystem part 2. Should be usuable. Missing parts are cosmetic. (based on Moe his stuff). I hope everything works in visual C.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3098
2008-02-10 11:14:03 +00:00
Sebastian Strohhäcker
3e1301347f fix some potential overflows
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3038
2007-11-04 19:14:32 +00:00
Sebastian Strohhäcker
0c24e87fdc silence some warnings, add most of sf patch #1185267 by Moe
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2883
2007-06-12 20:22:09 +00:00
Peter Veenstra
fdd16dea1a Happy New Year\!
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2728
2007-01-08 19:45:42 +00:00
Peter Veenstra
132bbffb68 Add part of patch 1235377 of msharov and fix a few small bugs in the return values of the cpu cores
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2593
2006-04-11 19:02:33 +00:00
Peter Veenstra
b8499cab5a Some more const correctness
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2589
2006-04-10 12:06:07 +00:00
Peter Veenstra
3a071e89b9 A few fixes for broken input
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2534
2006-03-02 14:12:49 +00:00
Peter Veenstra
df67775306 time passes on and on....
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2480
2006-02-09 11:47:57 +00:00
Peter Veenstra
44d90e5cf4 implemented feature request 1242202: "getting config values via z:\config"
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2283
2005-08-22 19:31:27 +00:00
Peter Veenstra
31c4fe4ad9 make a memleak smaller
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2272
2005-08-11 18:56:57 +00:00
Peter Veenstra
8cf6549e85 Fix bug 1241199. Env variables were matched against the length of the wanted string. So if you wanted b, b* matched to this.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2242
2005-07-20 12:00:45 +00:00