Subject: HP Console & Arrow Keys

From: Stephen Anderson <[email-masked]>
Date: Mon, 28 Jul 1997 08:28:08 -0500 (CDT)

Can somebody help me get the arrow keys working on the console of my HP
machine?  I am running HP-UX 10.10 and I have a 700/96 console.  I've read
through the pine-info archives and seen much discussion about the arrow
keys.

I have tried recompiling with the -DTERMCAP_WINS flag, but this did not
work.  I saw a script for reassinging the arrow keys for a Wyse console;
can something like this be done for my HP console?

The symptoms of the problem are this:  No matter what I try, the arrow
keys move on the screen, but not in the file.  In fact, if I use the down
arrow enough it scrolls around to the top of the screen rather than
scrolling the file down.  Since the arrow keys work in VI, I am guessing
that for some reason PINE isn't telling the console that it want's to
operate in some kind of cursor mode instead of the default terminal mode.
I've try doing the above things as well as playing with the termcaps and
terminfo.  All to no avail.  Any help with this would be greatly
appreciated!   

                                       Stephen Anderson
                                     <[email-masked]>

---

From: Richard Gering <[email-masked]>
Date: Wed, 30 Jul 1997 09:25:53 +0100 (WET)

> terminfo.  All to no avail.  Any help with this would be greatly

Hi Stephen,

Maybe the difference in behavior between VI and Pine can be explained by
the fact that both use a different set of terminal definitions. VI would
almost certainly use terminfo but, judging from the .hpp makefiles, Pine
uses termcap. 

Although the problem ought to be fixable in termcap as well, it might be
worth to convert your Pine to use terminfo, as the terminal definitions in
here are usually the most up to date. You can try this with just Pico. 

I don't have an HP-UX system here, so I can't check it for you, but look
in /usr/lib and /lib to find the name of the terminfo library available on
your system (libterminfo.a?, libtinfo.a?, libtermlib.a?) 

Next, make the following changes to pico/makefile.hpp:

- Replace "-ltermcap" at LIBS= with "-lXXX" (XXX matching libXXX.a for the
  library just picked)

- Replace tcap.c with tinfo.c at CFILES= and tcap.o wit tinfo.o at OFILES=

Be sure to keep the previously added -DTERMCAP_WINS option in your CFLAGS. 

Now try a "build clean" followed by "build hpp pico".

If this results in a version of Pico that does allow you to move your
cursor around properly, your terminfo database is indeed better than 
your termcap. If so, Pine itself needs to be modified as follows:

- Make the terminfo library change at STDLIBES= in pine/makefile.hpp

- Uncomment USE_TERMINFO in pine/osdep/os-hpp.h

After a "build hpp", you should be in business :-)

If all this doesn't help, your console might indeed require a special
setup string that isn't defined at "ti=" (termcap) / "smcup=" (terminfo). 
Shouldn't happen, but terminal databases are known to be notoriously bad. 
Let us know if this is the case, we might be able to cook something up. 

Best regards,

- Richard Gering.

-- 
+-----------------------------------------------------------------------------+
| Richard Gering ([email-masked]) |  There's IPv6 at the end of the tunnel  |
| Computer Industries International |                                         |
+-----------------------------------------------------------------------------+

---

From: Stephen Anderson <[email-masked]>
Date: Wed, 30 Jul 1997 08:56:34 -0500 (CDT)

> Let us know if this is the case, we might be able to cook something up. 

Thanks for your help Richard.  I tried tweaking the makefile as you
suggested to get it to use terminfo.  Unfortunately, that did not fix the
problem.  The cursor still did not bind to the point of text insertion.  I
took a look at my termcap and my particular console was indeed not
included.  The terminfo library did include a file for my console though,
and I am slightly bewildered why this last attempt didn't cure the
problem.

If we could try "cooking" an initialization string up as you say, I would
sure appreciate it.  Thanks again for your time and help!

Stephen Anderson
[email-masked]