Reads a code-set map file and assigns it to the standard input device.
Standard C Library (libc.a)
#include <sys/termios.h>
int setcsmap (Path);
char * Path;
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.
Item | Description |
---|---|
Path | Names the code-set map file. |
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.
Item | Description |
---|---|
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. |
EACCES | The named file cannot be read. |