[comp.unix.aux] A/UX 2.0 curses - buggy at the best ?

d88-jwa@dront.nada.kth.se (Jon W{tte) (01/21/91)

I've tried to use the supplied AUX curses library, and run into
some troubles:
 
1) The input may allow 8bit characters after calling meta ( ), but
   the screen sure doesn't.
 
2) A_BOLD changes the spacing of the text as well as boldifying it.
   Making this work in a sensible way would be trivial. (This might
   be how CommandShell is handling the escape sequences. Still a
   piece of cake)
 
3) The keypad ( ) numbers don't work very well either - the arrow
   keys aren't reported until I press another key after them. This
   even though I use nodelay ( ) .
 
4) Pressing the left key using TERM mac2 (the large console window)
   results in immediate crash (some error reports rolled by too fast
   for me to read before I was logged out)
 
Maybe I would like a way to make CommandShell generate function
key codes as well. Wouldn't it be nice ?
 
The software has to be portable, so I can't use native mac
windowing :-(
 
This is all on a 8/80 IIfx with 13" 8bit color set to 1 bit and
various extra hardware. I compile with gcc, since the native CC
doesn't support ANSI style function prototypes. Otherwise the
A/UX 2.0 is fairly vanilla off the CD. It doesn't work in the
console emulator either, so you can't blame the mac environment.
 
Thanx for any answer,
 
                                                        h+


Jon W{tte, Stockholm, Sweden, h+@nada.kth.se
:: This article is fake. If you take it for real, the _REAL_
:: Jon W{tte will sue you for slander. So there ! Nyah ! :-)

liam@cs.qmw.ac.uk (William Roberts;) (01/21/91)

In <1991Jan20.225350.16448@nada.kth.se> d88-jwa@dront.nada.kth.se (Jon W{tte) 
writes:

>I've tried to use the supplied AUX curses library, and run into
>some troubles:

Which version of curses are you using? The choices under A/UX are:

     curses(3X)                                             curses(3X)

     NAME
          curses - CRT screen handling and optimization package

     SYNOPSIS
          #include <curses.h>
          cc [flags] files -lcurses [libraries]

This one uses terminfo to do its stuff. The alternative is:

     curses5.0(3X)                                       curses5.0(3X)

     NAME
          curses5.0 - BSD-style screen functions with  optimal  cursor
          motion

     SYNOPSIS
          cc [flags] files -lcurses5.0 -ltermcap [libraries]

This one uses termcap, as its synopsis implies, and so probably has at least 
minor differences in behaviour compared to the terminfo version. Note that the 
synopsis for this one is wrong, because the files in /usr/lib are:

  -rw-r--r--   1 bin      bin        44044 Jul 18  1990 /usr/lib/libcur5.0.a
  -rw-r--r--   1 bin      bin       160428 Jul 18  1990 /usr/lib/libcurses.a

and so you'd need to use "-lcur5.0 -ltermcap" instead.

>2) A_BOLD changes the spacing of the text as well as boldifying it.
>   Making this work in a sensible way would be trivial. (This might
>   be how CommandShell is handling the escape sequences. Still a
>   piece of cake)

This is a problem due to the CommandShell - it tries to get bold text (as 
distinct from reverse mode and underline mode) by the old daisywheel trick of 
overstriking after moving one pixel to the right. With the exception of 
monospaced fonts (such as Courier and possible Monaco?) the bold characters 
are normally different widths from the plain ones and so using the real bold 
fonts wouldn't help that much.
 
>3) The keypad ( ) numbers don't work very well either - the arrow
>   keys aren't reported until I press another key after them. This
>   even though I use nodelay ( ) .

This is due to a bug in the handling of multi-byte character sequences with 
select/raw mode input - it was described on this newsgroup some while ago and 
I worked away at it a bit and sent in a proper SPR on it.

>... A/UX 2.0 is fairly vanilla off the CD. It doesn't work in the
>console emulator either, so you can't blame the mac environment.

The console emulator behaves differently from the CommandShell, and 
differently from the "term" program from A/UX 1.1 days. My ideal solution to 
the CommandShell terminal emulation problem is to use the much vaunted Comms 
Toolbox and have a CommandShell whose terminal emulation was provided by a 
Comms Toolbox terminal tool: we could then plug in our own terminal types as 
required.
--

William Roberts                 ARPA: liam@cs.qmw.ac.uk
Queen Mary & Westfield College  UUCP: liam@qmw-cs.UUCP
Mile End Road                   AppleLink: UK0087
LONDON, E1 4NS, UK              Tel:  071-975 5250 (Fax: 081-980 6533)

d88-jwa@dront.nada.kth.se (Jon W{tte) (01/23/91)

In article <> liam@cs.qmw.ac.uk (William Roberts;) writes:

>>I've tried to use the supplied AUX curses library, and run into

>Which version of curses are you using? The choices under A/UX are:

>>2) A_BOLD changes the spacing of the text as well as boldifying it.
>>   Making this work in a sensible way would be trivial. (This might

I believe the attributes aren't available under BSD curses ?
It's the terminfo version, for sure.

>This is a problem due to the CommandShell - it tries to get bold text (as 
>distinct from reverse mode and underline mode) by the old daisywheel trick of 

Well, moving left one pixel after drawing each character would make
things work in a much better way. I PLEAD for this being implemented !

>>3) The keypad ( ) numbers don't work very well either - the arrow

>This is due to a bug in the handling of multi-byte character sequences with 
>select/raw mode input - it was described on this newsgroup some while ago and 
>I worked away at it a bit and sent in a proper SPR on it.

Let's hope... 2.0.1 is due soon...

>the CommandShell terminal emulation problem is to use the much vaunted Comms 
>Toolbox and have a CommandShell whose terminal emulation was provided by a 
>Comms Toolbox terminal tool: we could then plug in our own terminal types as 

How very appropriate ! A good solution !

Meanwhile, I'm disgruntedly forced to work in the SPARC this has to
be compatible with.
							h+

Jon W{tte, Stockholm, Sweden, h+@nada.kth.se
:: This article is fake. If you take it for real, the _REAL_
:: Jon W{tte will sue you for slander. So there ! Nyah ! :-)