A/UX 2.0 curses - buggy at the best ?

William Roberts; liam at cs.qmw.ac.uk
Tue Jan 22 01:00:38 AEST 1991


In <1991Jan20.225350.16448 at nada.kth.se> d88-jwa at 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 at cs.qmw.ac.uk
Queen Mary & Westfield College  UUCP: liam at qmw-cs.UUCP
Mile End Road                   AppleLink: UK0087
LONDON, E1 4NS, UK              Tel:  071-975 5250 (Fax: 081-980 6533)



More information about the Comp.unix.aux mailing list