We use box/line drawing characters in many of our text based users 
interfaces. In the past this was accomplished by using characters in the 
upper ascii range from the "PC OEM" character set. This character set is 
nice because it provides many useful glyphs for text based user interfaces. 
The most useful of these are the single and double line characters. With 
this it is simple to draw boxes and lines within a text based interface.

For a variety of reasons though, we need to stop using the PC OEM character 
set and switch to one that does not include any of the box drawing 
characters. Fortunately vt100/vt220 terminal emulation provides for an 
alternate character set that will provide similar functionality. This is a 
workable solution and we will be rewriting software to use the alternate 
character set box drawing.

An interesting option is that because we use ROS emulation in the 
Config_EMULATE file, jbase provides screen drawing codes for switching 
between the primary and alternate character sets as well as screen codes 
for each of the box drawing characters. However none of the other emulation 
modes support this functionality.

It seems preferable to me to use a solution that is not dependent on jbase 
emulation mode. The jbase solution is dependent on the value of the 
JBCEMULATE environment variable when the jRLA process is launched. While 
the documentation on the jbase website indicates that these are set at 
compile time, testing has revealed that they are determined when the jRLA 
process is strated (in linux jbase 5.2.19).

The solution I am leaning toward is to query at run time whether an 
alternate character set is supported, and to use it if it is. Otherwise, 
regular characters such as +|- will be used instead.

Example:

***********************************
EXECUTE 'tput smacs' CAPTURING smacs_val
IF smacs_val <> '' THEN
  CRT smacs_val :
  *** draw box chars here ***
  EXECUTE 'tput rmacs'
END ELSE
   *** draw box char substitutes here ***
END
***********************************

If such a runtime solution is preferable, it could be moved  to a 
subroutine such that box drawing characters are loaded in a uniform manner 
across all programs.

Any suggestions? Is it wise to use the @(-##) jbase screen codes? Or is a 
runtime solutions based upon terminfo values for smacs and rmacs preferable?

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to