Davide Dozza wrote:
>
> Hello world,
>
> I am trying to port an application for SCO open server 3.0 under linux,
> but I am finding
> some problems. It seems that emulation works good but masks are not
> visualised
> correctly. Instead to see right characters for the boxes with single or
> double line borders
> I get strange characters making the application unusable.
> I have tried to set different terminals and font set without obtaning
> any results,
> (may be I am not able to set the terminal....)
> the original script executing the application looks like:
>
> cd /usr/bbx
> TERMCAP=/usr/bbx/termcap
> export TERMCAP
> TERM=ansicoe-bb
> export TERM
> exec ./bbx3 -q -m500 SETUP
> exit
>
> I have tried to set TERMCAP but I did not manage to solve the problem.
>
> Does anyone have any suggestion?
go to http://www/squonk.net/users/linut/linux and download "asciichart"
(need bunzip2 to unzip I beleive)
run it with no options on the terminal you wish to run the bbx app on,
be it xterm, serial, or console
do you even see any of the line drawing characters you want there?
if so, do you perhaps see only the single-line and none of the double
lines?
try typing "tput smpch" (look up the "smpch" from in "man terminfo" look
for the capname for "set PC Character Set mode" also find a little
further down the capname that unsets it, "rmpch" or close to that.
put the terminal into PC character mode and then run asciichart again,
see the double-line box drawing characters this time? keep trying
different terminal modes untill asciichart shows the character set you
want
other tput caps to try:
smach - alternate character set (and rmach to revert it)
??? - graphics mode
for the console, these are settable via looking up the exact escape
sequences in "man console_codes"
but tput is better to try, since if you can get it via tput, then the
same tput command will work on any terminal for which the terminfo
description is complete enough, where as the escape sequenses in "man
console_codes" only apply to the console, and only the Linux console at
that.
once you get asciichart to display the character set that has all the
characters you want, add the command for setting the terminal into the
necessary mode to the beginning of you application start-up script, and
add the command for reverting the terminal back to normal to the end.
the command the sets the terminal back to normal might never get
executed unless you remove "exec" from the beginning of the bbx startup
line.
you may not notice the difference if the terminal is left in the other
mode at first, but after a bit you will notice that other apps don't
display correctly anymore sometimes. if they display correctly on a
fresh console, but not on one that has ever run your app since the last
reboot, then that is the reason. btw, the altered mode survives
exiting/logging back in.
then, run asciichart again on a terminal that has been put into the
special mode and is displaying the needed characters. on an adjacent
virtual console, edit /usr/bbx/termcap, in yet another virtual console,
edit /etc/termcap (only need to view this, not edit, so "view
/etc/termcap" is good. or "F3" in mc (midnight commander) use the mouse
to cut & paste the whole "li" termcap entry for the linux console into
/usr/bbx/termcap
then you need to add some special termcap mnemonics to the li entry that
are not commonly used, but which bbx uses. you have to create or modify
a termcap entry for each type of terminal you want to run the app on, in
/usr/bbx/termcap, adding in these special bbx-proprietary termcap
fields. you can find out what these fields are by downloading and
consulting the complete bbx documentation available in html and
windows-help formats, from www.basis.com
the documentation is for there latest version, PRO/5, but I have bbx 3.0
and all the termcap stuff is the same. I used it to get correct
operation & display, including color, highlighting, and graphics
characters of Prosper (an ancestor of FACTS) on dos/linux/windows
machines running various "ansi" terminal emulator programs.
that documentation is *invaluable* as a command reference when modifying
you programs too.
in that respect too, the PRO/5 documantation has proven to be almost
fully applicable to my horribly old version of bbx. the things that do
not apply are obvious, such as anything having to do with web
integration or Windows. the real usefull things, such as the
syntax/arguments/action of the various basic programming
commands,verbs,functions, and system variables is the same, and the
related technical information, like these special bbx termcap fields,
and other things like command line argumants that can be passed tp
/usr/bbx/bbx3
it almost all works for me just the way the PRO/5 docs describe.
notably wacky termcap fields that you will not see in any regular
termcap entry, but which you need for bbx:
Cy=string - set protected mode
Cz=string - unset protected mode
these are not wholly proprietary, they are Xenix extensions to termcap,
which some apps (bbx) use
GS=string - Start Graphics mode
GE=string - End graphics mode
G1=string - graphics (line/box drawing) character upper right corner
G2=string - upper left corner
G[34HVRLUDC] - the other graphics characters
theoretically, if GS and GE are defined correctly, you don't need G1,
G2, G3 etc
I have not been able to get it right, but it is simple, if tedious, to
look at asciichart, and see that the character for upper left corner is
octal 177 (I doubt this is actually correct, I'm describing the process,
but not looking at a linux screen right now.) then add a termcap field
to the li entry in /usr/bbx/termcap that defines the upper left corner
to match what the upper left corner actually happens to be, as reported
by asciichart. do this for the rest of the graphics characters and
arrive at an addition to the termcap entry that looks something like:
:G1=\177:G2=\178:G3=\179:G4=\180:GH=\200:GV=\204:\
:GR=...and so on
basically, you have to look at your working termcap entry in your
working evironment (this would be the entry for ansicoe-bb (which I
happen to know, includes tc=ansiex) and for every field in there you
need to come up with the linux equivalent. most of these equivalents are
already present in the linux entry you pasted from your linux
/etc/termcap, and fields (like the G* ones, Cy, Cz, you have to figure
out the appropriate escape code and define it inplace of the
scoansi-appropriate codes that are in ansicoe-bb and ansiex. a few
fields I cannot find in the documentation for generic termcap, linux
console, or the bbx documentation at all, but they are in almost all of
the /usr/bbx/termcaps and not in any other termcap I've ever seen, for
these, I just copied them into the linux entry from the closest relative
terminal type that is already in /usr/bbx/termcap.
one of the fields I'm talking about is "AA=1705" I don't know what it
does, but it's in all the bbx termcaps and documented no where. the 1705
is sometimes different for some terminals, but it is 1705 for all the
terminals that the linux console is most related to. these would be
plain ansi *not ansicoe or scoansi*, and vt102, so I added AA=1705 to my
entry for generic ansi-BBS comm programs and it's working. it worked
without it too. *shrug*
I never did a straight linux console entry, so I don't have a ready-made
termcap entry to just give you. sorry :)
once the linux entry id complete in the /usr/bbx/termcap, adjust the
TERM= line in the application startup script. also, adjust the line for
that tty in /usr/bbx/config or config.bbx whichever is being used
it's too bad about the damned config file, the way it hard-codes term
types to ttys like that, it keeps you from running the app using
different terminal types on the same tty automatically. Which means that
everything else on the system can find out how to talk to your dial-in
com program or your telnet client during login, but the bbx app will
ignore that and only knows that since you are on this tty, you must be
using this kind of terminal.
You can email me or post here for more specific questions and answers on
getting bbx to display right. This just happens to be *exactly*
something I've wasted great huge gobs of time on this year.
--
Brian~