Jukka wrote:
Yes, many DOS console apps don't work under plain Wine because DOS emulation does not create console for the applications. Some applications actually make Wine crash because the application gets illegal coordinates when GetConsoleScreenBufferInfo fails.
The correct place for console allocation would likely be VGA_SetAlphaMode; call to normal Windows AllocConsole() function should be enough, no server calls are needed. Additionally, if DOS console application tries to call a routine that requires console, VGA_SetAlphaMode should be called in order to initialize console (see VGA_SetCursorPos).
I have been thinking doing this myself, but I have always ended up being uncertain about how this change is going to affect piping input and output of DOS programs that use only stream IO and not console IO.
Sounds like we need some regression tests that run DOS progams like 'find' and 'more', and make sure they work properly. I myself use the sourcesafe commandline tools, which are of the sort that just pipe characters to stdout and from stdin, and was horrified to discover that sometime after 9/2001, wine stopped running them correctly -- it started putting stdout in raw mode (!), which caused all line-oriented reads from stdin to fail. It also did curses initialization (!!), which made things look very messy indeed. I'm still running my snapshot from around 9/2001, but if I ever get up the energy, maybe I'll write a regression test to make sure e.g. DOS "more" works correctly.
- Dan