Traditional Chinese Solaris User'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 Traditional Chinese Solaris Operating System uses ioctl STREAMS commands for general EUC handling. The following is a summary of these ioctl calls and their effects:

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 and terminfo Databases

termcap and terminfo are the databases used to tailor the terminal characteristics for an application.

The following table lists extensions to the termcap database:

Table 11–1 ioctl Requests and Descriptions

Variable 

Description 

dv

Device type: language and code set 

ci

Init sequence for multiple code sets  

s0

Shift into code set 0 

s1

Shift into code set 1 

s2

Shift into code set 2 

s3

Shift into code set 3 

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

Table 11–2 terminfo Variables and Descriptions

Variable 

Capname 

Tc 

Description 

device_type

devt

dv

Device type: language and code set  

code_set_init

csin

ci

Init sequence for multiple code sets  

set0_des_set

s0ds

s0

Shift into code set 0  

set1_des_set

s1ds

s1

Shift into code set 1  

set2_des_set

s2ds

s2

Shift into code set 2  

set3_des_set

s3ds

s3

Shift into code set 3