Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setmaps(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctab

stty, STTY

ports

termio



SETMAPS(1,C)                AIX Commands Reference                 SETMAPS(1,C)



-------------------------------------------------------------------------------
setmaps



PURPOSE

Sets terminal maps.


            +--------------------------------------------+
            |                                            |
setmaps ----|               one of                       |--|
            | +------+  +------------+  +--------------+ |
            +-|      |--| -i mapname |--|              |-+
              +- -r -+  | -I mapname |  +- -k keyname -+
                        | -o mapname |
                        | -O mapname |
                        | -t mapname |
                        +------------+

            one of
            +----+
setmaps ----| -h |--|
            | -c |
            +----+


Note:  This command does not have MBCS support.

DESCRIPTION

The setmaps command assigns a terminal map to the standard input device.  AIX
uses input and output terminal maps to convert multibyte characters in the data
stream to the ASCII characters supported by asynchronous terminals.  If you
call setmaps with no arguments, it displays the names of the current input and
output terminal maps.

A terminal map is a text file containing a list of rules that associate a
pattern string with a replacement string.  This file normally resides in the
directory /etc/nls/termmap.  AIX uses an input map file to map input from the
keyboard to an application and an output map file to map output from an
application to the display.

Terminal mapping works as follows.  The system collects characters in a buffer
until a pattern specified by a rule in the map file matches a substring in the
buffer.  The system then constructs and returns the replacement string
specified by the rule.  This processing continues with the remaining characters
in the buffer.

The rules of a terminal map can test and change the state of the pattern
processor.  The state is identified by a single-byte character, conventionally



Processed November 8, 1990       SETMAPS(1,C)                                 1





SETMAPS(1,C)                AIX Commands Reference                 SETMAPS(1,C)



a digit (0-9).  The state is reset to zero, the initial state, whenever the
system loads a new map or flushes the terminal input or output buffer (as when
it processes a kill or intr character or a program issues an ioctl system
call).  A terminal map can use states to do such things as detect multibyte
escape sequences.  You can test for state x by specifying @x in a pattern; you
can set the state to x by including @x in a replacement string.

The special name NOMAP will clear the corresponding mapping.

FILE FORMAT

The text of a terminal map file is a set of rules.  Each rule has the following
format:

   pattern:replacement

The pattern string can include the following special characters:

?            Matches any single byte

@x           Matches this rule only if the pattern processor is in state x,
             where x is any single byte.  (This sequence does not match a
             character in the input buffer.)

\?

\@

\\           Prevents the pattern processor from interpreting ?, @, or \ as
             special characters.

\ddd         Represents any byte in octal notation.

\xdd         Represents any byte in hexadecimal notation.

The replacement string can also include the following special characters:

$n           Uses the nth character in the input string that matched this
             pattern, where n is a decimal digit.

@x           Moves the pattern processor into state x.  (This sequence does not
             become part of the replacement string.)

\$

\@

\\           Prevents the pattern processor from interpreting $, @, or \ as
             special characters.

\ddd         Represents any byte in octal notation.




Processed November 8, 1990       SETMAPS(1,C)                                 2





SETMAPS(1,C)                AIX Commands Reference                 SETMAPS(1,C)



\xdd         Represents any byte in hexadecimal notation.

FLAGS

-i mapname   Selects /etc/nls/termmap/mapname.in as the input map.

-I mapname   Selects mapname as the input map, where mapname is a file residing
             in the current directory.  You must have superuser authority to
             specify this flag.

-o mapname   Selects /etc/nls/termmap/mapname.out as the output map.

-O mapname   Selects mapname as the output map, where mapname is a file
             residing in the current directory.  You must have superuser
             authority to specify this flag.

-t mapname   Selects /etc/nls/termmap/mapname.in as the input map and
             /etc/nls/termmap/mapname.out as the output map.

-k  keyname  Associates the specified keyname with the map being selected (see
             "stty, STTY").  This key name overrides the default key, which is
             normally set to the value of mapname.  You must have superuser
             authority to specify this flag.

-r mapname   Specifies that the kernel is to reload the specified map file.
             Terminals using the old map will continue to do so until they are
             logged off or until their maps are explicitly reset.  If you do
             not specify this flag, a map is loaded only if it has not already
             been loaded into the kernel.  You must have superuser authority to
             specify this flag.

-h           Display help message.

-c           Clears all mapping for the terminal.

FILES

/etc/nls/termmap/*.in     Input map files.
/etc/nls/termmap/*.out    Output map files.

RELATED INFORMATION

See the following commands:  "ctab" and "stty, STTY."

See the ports and termio files in AIX Operating System Technical Reference.

See "Overview of International Character Support" in Managing the AIX Operating
System.







Processed November 8, 1990       SETMAPS(1,C)                                 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026