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

Technical Reference: Base Operating System and Extensions , Volume 2


setcsmap Subroutine

Purpose

Reads a code-set map file and assigns it to the standard input device.

Library

Standard C Library (libc.a)

Syntax

#include <sys/termios.h>


int setcsmap (Path);
char * Path;

Description

The setcsmap subroutine reads in a code-set map file. The path parameter specifies the location of the code-set map file. The path is usually composed by forming a string with the csmap directory and the code set, as in the following example:

n=sprintf(path,"%s%s",CSMAP_DIR,nl_langinfo(CODESET));

The file is processed and according to the included informations, the setcsmap subroutine changes the tty configuration. Multibyte processing may be enabled, and converter modules may be pushed onto the tty stream.

Parameter


Path Names the code-set map file.

Return Values

If a code set-map file is successfully opened and compiled, a value of 0 is returned. If an error occurred, a value of 1 is returned and the errno global variable is set to identify the error.

Error Codes


EINVAL Indicates an invalid value in the code set map.
EIO An I/O error occurred while the file system was being read.
ENOMEM Insufficient resources are available to satisfy the request.
EFAULT A kernel service, such as copyin, has failed.
ENOENT The named file does not exist.
EACCESS The named file cannot be read.

Implementation Specifics

The setcsmap function is part of Base Operating System (BOS) Runtime.

Related Information

The setmaps command.

The setmaps file format.

tty Subsystem Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


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