In article <y20a345edsfj.lk1dfj4b8zdb$***@40tude.net>,
JJ <***@outlook.com> wrote:
...
Post by JJDOS programs sometimes go wonky when run in a console window which was
created by a Windows program. The problem is related to switching from
Windows to DOS environment, then back to Windows environment again. FYI,
console window created by DOS and Windows programs, has different set of
rules, limitations, and behaviours. In short, it can be glitchy when mixing
console Windows programs with DOS programs.
If you want Windows version of the CHOICE tool, you can get it from Windows
XP Resource Kit; or from Windows 2003; or from 64-bit version of Windows XP
(get the 32-bit version of the tool). Those Windows can be found in
archive.org, but the XP Resource Kit is hard to find.
(Much more useful info - snipped for this post)
Thanks for all the info. A bit of a history lesson.
Anyway, and FWIW, and all that, in the end, I ended up going with an old
program I'd originally written decades ago for Unix/Linux/POSIX (whatever
and whichever name you prefer), called "pause", that basically implements
for Unix, the functionality of "pause" under DOS/Windows/NT/etc. I know
how to do the "don't wait for enter" thing in Unix, but not in DOS/Windows,
so it was easiest for me to do it that way.
I don't think that my "pause" program would compile under a "generic"
Windows C compiler, since it uses POSIX stuff to handle the terminal. As a
result, the hardest part of the project was getting a working version of
Cygwin for XP, so that I could compile it under Cygwin. The Cygwin project
has gone all 64 bit nowadays; they've completely abandoned the 32 bit
world. However, if you Google "Cygwin for Windows XP", you'll get the
info; you need to go to a site (archive) called "fruitbat" to get the
stuff. But, it actually isn't "fruitbat" anymore; you have to go to
something like "crouchingtiger_fruitbat". But once you have the right
sites, it all works perfectly.
Be aware that GCC is not in the default software load, so be sure to "tick
the box" for GCC, or you won't get it. I had to re-run setup to get GCC.
Also, don't forget the "-X" option on "setup.exe".
So, in case anyone is interested in any of this, I have put the "pause"
source code as well as an EXE and the needed Cygwin DLL here:
http://shell.xmission.com:65401/pause.zip
Note that this "pause" does pretty much everything that CHOICE does (*),
except for the "only accept these keys" part. I could easily hack that
into the C source if I needed it (so far, the need has not arisen).
(*) Actually, the default model is slightly different. It is "press any
key other than escape to continue". Pressing Escape generates an error
return (errorlevel != 0); any other key returns success.
--
A racist, a Nazi, and a Klansman walk into a bar...
Bartender says, "What will it be, Mr. Trump?"