[comp.unix.programmer] missing function in curses.h

rad@genco.bungi.com (Bob Daniel) (12/27/90)

I have a routine in C that uses the function slk_set which it expects to find
in curses.h.  This routine is used to set fkey labels on AT&T terminals.  I
have looked on AT&T 3B2 and 386 running 3.2 UNIX and neither have this function.
What is this function, is there an alternative?

allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) (12/29/90)

As quoted from <173@genco.bungi.com> by rad@genco.bungi.com (Bob Daniel):
+---------------
| I have a routine in C that uses the function slk_set which it expects to find
| in curses.h.  This routine is used to set fkey labels on AT&T terminals.  I
| have looked on AT&T 3B2 and 386 running 3.2 UNIX and neither have this function.
| What is this function, is there an alternative?
+---------------

slk_* is from SVR3.2 curses, and provides support for function key labels.
slk_set() writes to a function key label (one of 8), which is either a
hardware label (such as on the Wyse 50/60, if you don't use the bottom line
for a status line) or is "borrowed" from the last line on the screen.

Chances are, you don't need the function key labels at all and can simply
remove (or stub out) any function starting with "slk_".

++Brandon
-- 
Me: Brandon S. Allbery			    VHF/UHF: KB8JRR on 220, 2m, 440
Internet: allbery@NCoast.ORG		    Packet: KB8JRR @ WA8BXN
America OnLine: KB8JRR			    AMPR: KB8JRR.AmPR.ORG [44.70.4.88]
uunet!usenet.ins.cwru.edu!ncoast!allbery    Delphi: ALLBERY

rad@genco.bungi.com (Bob Daniel) (12/31/90)

In article <1990Dec29.053417.6150@NCoast.ORG> allbery@ncoast.ORG.ORG (Brandon S. Allbery KB8JRR) writes:
>slk_* is from SVR3.2 curses, and provides support for function key labels.
>slk_set() writes to a function key label (one of 8), which is either a
>hardware label (such as on the Wyse 50/60, if you don't use the bottom line
>for a status line) or is "borrowed" from the last line on the screen.
>
>Chances are, you don't need the function key labels at all and can simply
>remove (or stub out) any function starting with "slk_".

Actually, I'm am using this routine for the purpose of setting function key
labels. I'm running AT&T SV3.2.2 and the 4.1.6 C Development Kit.  It doesn't
include all the slk_* functions.  Is there a solution?

allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) (01/01/91)

As quoted from <175@genco.bungi.com> by rad@genco.bungi.com (Bob Daniel):
+---------------
| Actually, I'm am using this routine for the purpose of setting function key
| labels. I'm running AT&T SV3.2.2 and the 4.1.6 C Development Kit.  It doesn't
| include all the slk_* functions.  Is there a solution?
+---------------

Aside from bitching to your vendor ---

It depends on how much work you want to do.  If your terminfo is up to date
(unlikely, since curses and terminfo are pretty much one and the same) then
you can access the terminfo codes directly and program them yourself.  I don't
have the list in front of me (this is a Xenix system I'm using) but it
shouldn't be difficult.

If you don't have the extended entries but you *do* have ripoffline(), you can
use that.  It removes the bottom line of the screen from curses; you can then
maintain it yourself.  But you have to maintain it *completely* yourself,
without help from curses.

A better solution is to code your program to not use the bottom line of the
screen, then write your own slk_* routines to use the last line.  Not
difficult using rudimentary curses calls, and the same code will work on BSD
curses flavors or SVR2 curses as well.

Personally, I'd opt for bawling the h*ll out of your vendor for not providing
a full V.3.2 --- especially from AT&T!

++Brandon
-- 
Me: Brandon S. Allbery			    VHF/UHF: KB8JRR on 220, 2m, 440
Internet: allbery@NCoast.ORG		    Packet: KB8JRR @ WA8BXN
America OnLine: KB8JRR			    AMPR: KB8JRR.AmPR.ORG [44.70.4.88]
uunet!usenet.ins.cwru.edu!ncoast!allbery    Delphi: ALLBERY