home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / win32 / 2551 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  3.2 KB

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