home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 21694 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  1.7 KB

  1. Path: sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!ucbvax!FNAL.FNAL.GOV!"WARNER::DAMBIK"
  2. From: WARNER::DAMBIK@FNAL.FNAL.GOV (Ed Dambik)
  3. Newsgroups: comp.os.vms
  4. Subject: RE: How do I use colour under VMS?
  5. Message-ID: <930120103559.22c00e9b@FNAL.FNAL.GOV>
  6. Date: 20 Jan 93 16:35:59 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Organization: The Internet
  9. Lines: 38
  10.  
  11. Peter De Rijk writes:
  12. >
  13. >I am working on a C program on a VAXstation. I currently use the Curses library
  14. >for output to terminal or DECterm. I would like to be able to display text in
  15. >different colours (if the terminal supports it). The Curses package under VMS
  16. >does not support colour. Programming in X woul take too much time ( especially
  17. >since I still would have to learn it). Is there another, easy, way to get
  18. >colour. I only need the very basic output commands: put a cursor on specified
  19. >position, and print characters (but in colour).
  20. >Any help would be greatly appreciated,
  21. >
  22. >Peter
  23.  
  24. ANSI Color is available under SMG using the SMG$M_USER1 through SMG$M_USER8
  25. text attributes. Please note that DEC color terminals do NOT support ANSI
  26. color (only DECTerms and some terminal emulators do). Aside from sending
  27. out your own escape sequences, I'm not certain how you would use color from
  28. curses. The relevant escape sequnce are called SGRs and include:
  29.  
  30.             <esc>[30m through <esc>[37m
  31.  
  32.                 -or-
  33.  
  34.             <CSI>30m through <CSI>37m
  35.  
  36. where 30=Black, 31=Red, 32=Green, 33=Yellow, 34=Blue, 35=Magenta,
  37.       36=Cyan, and 37=White text.
  38.  
  39. Hope that helps.
  40.  
  41.     Ed Dambik
  42.     Fermilab, Research Division, EE Dept., Controls Software Group
  43.     HEPnet/SPAN: FNAL::DAMBIK (43009::DAMBIK)
  44.     Internet: DAMBIK@FNAL.FNAL.GOV
  45.     BitNet: DAMBIK@FNAL
  46.     USnail: Fermilab POB 500 MS/220 Batavia, IL 60510
  47.  
  48.  
  49.