home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!uvaarpa!concert!ais.com!bruce
- From: bruce@ais.com (Bruce C. Wright)
- Newsgroups: comp.os.ms-windows.programmer.win32
- Subject: Re: ANSI terminal emulation in console?
- Message-ID: <1992Dec19.175006.5903@ais.com>
- Date: 19 Dec 92 17:50:06 GMT
- References: <1992Dec18.095040.4624@titan.ksc.nasa.gov> <724711186snz@chrism.demon.co.uk>
- Distribution: world
- Organization: Applied Information Systems, Chapel Hill, NC
- Lines: 49
-
- In article <724711186snz@chrism.demon.co.uk>, chris@chrism.demon.co.uk (Chris Marriott) writes:
- > In article <1992Dec18.095040.4624@titan.ksc.nasa.gov> rushing@titan.ksc.nasa.gov writes:
- >
- >>Is there any way to get ANSI terminal emulation in a console
- >>window? There's a file 'ansi.sys' in the nt/system dir, but
- >>sticking that into the config.sys file doesn't seem to do anything.
- >>The console API sample app doesn't mention anything about
- >>it either.
- >
- > No - Microsoft say that not including ANSI escape sequence support in
- > Console windows was a deliberate design decision, made for the sake of
- > performance. However, ANSI support MAY appear in the retail.
- > Note, however, that you have all the low-level stuff you need - moving
- > the cursor, etc - so "rolling your own" shouldn't be too hard a job.
-
- If you're talking about what I think you're talking about, and if that's
- the real reason for not including ANSI escape sequence support, then
- offhand it sounds wrongheaded to me. Although it's obvious that _using_
- the ANSI support would be less efficient than doing `move cursor' and
- similar functions manually (because the ANSI code would probably not be
- able to optimize the operations as well as a well-written app), if the
- functions are _there_ but not _used_, the overhead to determine that a
- string contains no ANSI sequences is quite low, down in the background
- noise level (language and OS I/O runtime, video drivers, etc).
-
- More likely the real reason is either (1) they haven't had time to put
- it in and test it properly yet or (2) they feel that using such sequences
- is poor programming practice on the part of application programmers, and
- are trying to discourage it for performance and/or maintainability reasons.
-
- Although I don't necessarily disagree too much with this logic (embedding
- hardcoded escape sequences in application code can definitely cause
- maintainability and porting problems), there is a lot of code out there
- that does this; and even if the application code doesn't do this, it
- often calls runtime library routines (like curses or similar packages)
- that spit out escape sequences depending on the terminal. (This latter
- approach is generally considered more maintainable then embedding the
- sequences in the app's code itself). Of course you can rewrite the
- library if you have time and the source code, but you don't always have
- either. Not supporting ANSI sequences as a `bridge' for older software
- to use until it can be rewritten looks like a case of shooting yourself
- in the foot in the name of ideological purity.
-
- If you're complaining that the graphics engine text output calls don't
- support ANSI escape sequences, that's entirely reasonable -- ANSI escape
- sequences have little meaning in an environment with multiple fonts and
- point sizes and with variable-pitch fonts.
-
- Bruce C. Wright
-