Kbase P73645: Testing PROTERMCAP entries for colors on UNIX with Progress
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/17/2004 |
|
Status: Verified
GOAL:
Testing PROTERMCAP entries for colors on UNIX with Progress
GOAL:
Testing PROTERMCAP entries to get colors on UNIX for Progress to work
GOAL:
How to mahe colors works on Unix using PROTERMCAP?
FACT(s) (Environment):
Progress 9.x
Progress 8.x
OpenEdge 10
FIX:
This document applies to: Progress character clients version 8 and higher on UNIX
The purpose of that entry is to assists customer needs to test the usable color sequences for getting faster success.
An simple description of the way the Progress 4GL internally switches on the colors is by looking into the file specified by the PROTERMCAP environment variable for the used terminal specified by the TERM environment variable for the color entry specified by the 4GL statement e.g.:
color display red/black a
and putting that entry onto the screen
Since the escape sequences are hardware specific and that's why depending on the used terminal hardware for which sometimes only the manual for the terminal or the hardware vendor can provide the right information there are two things to check.
1. Is the terminal able to use the provided escape sequences to switch on the color
and
2. Does the 4GL find the right entry inside the PROTERMCAP file.
There are different ways to test the terminal either from the OS or the Progress 4GL. One possibility by using the Progress 4GL is the put screen statement e.g:
put screen "\E[31;40m" + "test" .
The way to test if the right PROTERMCAP entry is found without knowing if the escape sequence is working is to insert at the place where the escape sequence for the color should be a simple text between the \ and the : sign e.g:
:COLOR 5 RED/BLACK=\This test if that 1. entry goes for red:and 2.\
instead of
:COLOR 5 RED/BLACK=\E[31;40m:\E[m:\
Additional there is also a possibility to check with a different escape sequence e.g. a cursor sequence like \E[?25l or \E[?25h if the used escape character is the right one for the terminal.