Korean Solaris System Administrator's Guide

TTY Utilities

ioctl (input/output control) calls are low-level routines for handling device input and output.

The termcap and terminfo databases are used by applications to configure their terminal display appropriately.

EUC ioctl Features

The Korean Solaris operating environment uses ioctl(2) STREAMS commands for general EUC handling. The following is a summary of these ioctl calls and their effects:

Table 4-1 ioctl Requests and Descriptions

ioctl Request

Description 

EUC_WGET

Get cswidth values from TTY stream

EUC_WSET

Set cswidth values for TTY stream

EUC_OXLOFF

Set code conversion to OFF 

EUC_OXLON

Set code conversion to ON 

Character code conversion to and from the terminal is controlled by EUC_OXLON and EUC_OXLOFF.

termcap

termcap and terminfo are the databases used to tailor the terminal characteristics for an application. The following are extensions to the termcap database:

Table 4-2 termcap Variables and Descriptions

Variable 

Description  

dv

Device type: language and codeset  

ci

Init sequence for multiple codesets  

s0

Shift into codeset 0  

s1

Shift into codeset 1  

s2

Shift into codeset 2  

s3

Shift into codeset 3  

terminfo

The following are extensions to terminfo. The s0-s3 string values are used as data announcement mechanisms for the respective code sets during terminal I/O.

Table 4-3 terminfo Variables and Definitions

Variable 

Capname 

Tc 

Definition 

device_type

devt

dv

Device type: language and codeset  

code_set_init

csin

ci

Init sequence for multiple codesets  

set0_des_set

s0ds

s0

Shift into codeset 0  

set1_des_set

s1ds

s1

Shift into codeset 1  

set2_des_set

s2ds

s2

Shift into codeset 2  

set3_des_set

s3ds

s3

Shift into codeset 3