Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mapchan(4) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ascii(5)

keyboard(7)

lp(7)

mapchan(1M)

mapkey(1M)

stty(1)

trchan(1)

tty(7)






       mapchan(4)                                                mapchan(4)


       NAME
             mapchan - format of tty device mapping files

       DESCRIPTION
             mapchan configures the mapping of information input and output
             of UNIX.

             Each unique channel map requires a 2048-byte buffer for
             mapping the input and output of characters.  No buffers are
             required if no channels are mapped.

             A method of sharing maps is implemented for channels that have
             the same map in place.  Each additional, unique map allocates
             an additional buffer.  The maximum number of map buffers
             available on a system is configured in the kernel, and is
             adjustable via the link kit NEMAP parameter.  Buffers of maps
             no longer in use are returned for use by other maps.

       EXAMPLES OF A MAP FILE
             The internal character set used by UNIX System V/386 is
             defined by the right column of the input map, and the first
             column of the output map in place on that line.  The default
             internal character set is the 8-bit ISO 8859/1 character set,
             which is also known as dpANS X3.4.2 and ISO/TC97/SC2.  It
             supports the Latin alphabet and can represent most European
             languages.

             Any character value not given is assumed to be a straight
             mapping.  Only the differences are shown in the mapfile [see
             mapchan(1M)].  The left hand column must be unique.  More than
             one occurrence of any entry is an error.  Right hand column
             characters can appear more than once.  This is many to one
             mapping.  Nulls can be produced with compose sequences or as
             part of an output string.

             It is recommended that no mapping be enabled on the channel
             used to create or modify the mapping files.  This prevents any
             confusion of the actual values being entered due to mapping.
             It is also recommended that numeric rather than character
             representations be used in most cases, as these are not likely
             to be subject to mapping.  Use comments to identify the
             characters represented.  Refer to the ascii(5) manual page and
             hardware reference manual of the device being mapped for the
             values to assign.




                           Copyright 1994 Novell, Inc.               Page 1













      mapchan(4)                                                mapchan(4)


                  #
                  #sharp/pound/cross-hatched is the comment character
                  #however, a quoted # ('#') is 0x23, not a comment
                  #
                  #beep, input, output, dead, compose and control
                  #are special keywords and should appear as shown.
                  #
                  beep        #sound bell when errors occur
                  input
                  a b
                  c d
                  dead p
                  q r         # p followed by q yields r.
                  s t         # p followed by s yields t.
                  dead u
                  v w         # u followed by v yields w.
                  compose x   # x is the compose key (only one allowed).
                  y z a
                  B C D       # x followed by B and C yields D.
                  output
                  e f         # e is mapped to f.
                  g h i j     # g is mapped to hij- one to many.
                  k l m n o   # k is mapped lmno
                  control     # The control must be last
                  input
                  E 1         # The character E is followed by 1 or more
                                unmapped character
                  output
                  FG 2        # The characters FG are followed by 2 more
                                unmapped characters

            All of the single letters above preceding the control section
            must be in one of these formats:

                  56   # decimal
                  045  # octal
                  0xfa # hexadecimal
                  'b'  # quoted char
                  '\076'# quoted octal
                  '\x4a'# quoted hex

            All of the above formats are translated to a single byte
            values.





                          Copyright 1994 Novell, Inc.               Page 2













       mapchan(4)                                                mapchan(4)


             The control sections (which must be the last in the file)
             contain specifications of character sequences which should be
             passed through to or from the terminal device without going
             through the normal mapchan processing.  These specifications
             consist of two parts: a fixed sequence of one or more defined
             characters indicating the start of a no-map sequence, followed
             by a number of characters of which the actual values are
             unspecified.

             To illustrate this, consider a cursor-control sequence which
             should be passed directly to the terminal without being
             mapped.  Such a sequence would typically begin with a fixed
             escape sequence instructing the terminal to interpret the
             following two characters as a cursor position; the values of
             the following two characters are variable, and depend on the
             cursor position requested.  Such a control sequence would be
             specified as:

                   E= 2       # Cursor control: escape = <x> <y>

             There are two subsections under the control section: the input
             section, which is used to filter data sent from the terminal
             to UNIX System V/386, and the output section, which is used to
             filter data sent from UNIX System V/386 to the terminal.  The
             two fields in each control sequence are separated by white
             space, that is the SPACE or TAB characters.  Also the # (HASH)
             character introduces a comment, causing the remainder of the
             line to be ignored.  Therefore, if any of these three
             characters are required in the specification itself, they
             should be entered using one of alternative means of entering
             characters, as follows:

             ^x    The character produced by the terminal on pressing the
                   CONTROL and x keys together.

             E or \
                   The ESCAPE character, octal 033.

             \c    Where c is one of b, f, l, n, r or t, produces
                   BACKSPACE, FORMFEED, LINEFEED, NEWLINE, CARRIAGE RETURN
                   or TAB characters, respectively.

             O     Since the NULL character can not be represented, this
                   sequence is not stored as the character with octal value
                   0200, which behaves as a NULL on most terminals.



                           Copyright 1994 Novell, Inc.               Page 3













      mapchan(4)                                                mapchan(4)


            0 or 0n
                  Specifies the octal value of the character directly.

                  Followed by any any other character is interpreted as
                  that character.  This can be used to enter SPACE, TAB,
                  or HASH characters.

      RETURN VALUES
            mapchan performs these error checks when processing the
            mapfile:

                  more than one compose key
                  characters mapped to more than one thing
                  syntax errors in the byte values
                  missing input or output keywords
                  dead or compose keys also occurring in the input section
                  extra information on a line
                  mapping a character to null
                  starting an output control sequence with a character that is already mapped

            If characters are displayed as the 7-bit value instead of the
            8-bit value, use stty -a [see stty(1)] to verify that -strip
            is set.  Make sure input is mapping to the 8859 character set.
            Dead and compose sequences are input mapping and should be
            going to 8859.

      FILES
            /etc/default/mapchan
            /usr/lib/mapchan/*

      NOTICES
            Some non-U.S keyboards and display devices do not support
            characters commonly used by UNIX command shells and the C
            programming language.  Do not attempt to use such devices for
            system administration tasks.

            Not all terminals or printers can display all the characters
            that can be represented using this utility.  Refer to the
            device's hardware manual for information on the capabilities
            of the peripheral device.

            Use of mapping files that specify a different internal
            character set per-channel, or a set other than the 8-bit ISO
            8859 set supplied by default can cause strange side effects.
            It is especially important to retain the 7-bit ASCII portion
            of the character set [see ascii(5)] UNIX System V/386


                          Copyright 1994 Novell, Inc.               Page 4













       mapchan(4)                                                mapchan(4)


             utilities and applications assume these values.  Media
             transported between machines with different internal code set
             mappings may not be portable as no mapping is performed on
             block devices, such as tape and floppy drives.  trchan can be
             used to translate from one internal character set to another.

             Do not set ISTRIP [see stty(1)] on channels that have mapping
             that includes eight bit character set.

       REFERENCES
             ascii(5), keyboard(7), lp(7), mapchan(1M), mapkey(1M),
             stty(1), trchan(1), tty(7)




































                           Copyright 1994 Novell, Inc.               Page 5








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