[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2

slk_init Subroutine


Initializes soft function-key labels.


Curses Library (libcurses.a)


#include <curses.h>

slk_init( Labfmt)
int Labfmt;


The slk_init subroutine initializes soft function-key labels. This is one of several subroutines curses provides for manipulating soft function-key labels. These labels appear at the bottom of the screen and give applications, such as editors, a more user-friendly look. To use soft labels, you must call the slk_init subroutine before calling the initscr or newterm subroutine.

Some terminals support soft labels, others do not. For terminals that do not support soft labels. Curses emulates soft labels by using the bottom line of the stdscr. To accommodate soft labels, curses reduces the size of the stdscr and the LINES environment variable as required.


Labfmt Simulates soft labels. To arrange three labels on the right, two in the center, and three on the right of the screen, specify a 0 for this parameter. To arrange four labels on the left and four on the right of the screen, specify a 1 for this parameter.


To initialize soft labels on a terminal that does not support soft labels internally, do the following:


This example arranges the labels so that four labels appear on the right of the screen and four appear on the left.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The initscr (initscr and newterm Subroutine) subroutine, newterm (newterm Subroutine) subroutine.

Curses Overview for Programming, List of Curses Subroutines, Manipulating Soft Labels in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]