Ansi(3)                                                                Ansi(3)



NNAAMMEE
       Ansi -

SSYYNNOOPPSSIISS
   PPuubblliicc MMeetthhooddss
       void sseett__ccooddee (string code_name, string newcode)
       string qquueerryy__ccooddee (string code_name)
       ccrreeaattee ()
       string ggeett__ccooddee (string codename, object dest)
       aannssiitteesstt ()
       aannssiitteesstt22 ()
       aannssiitteesstt33 ()

   PPuubblliicc AAttttrriibbuutteess
       string EESSCCAAPPEE
       mapping ddeessiiggnneerr__ccooddeess

DDEETTAAIILLEEDD DDEESSCCRRIIPPTTIIOONN
       This base object is used by simul_efun to interpret ANSI codes. As a
       rule, you should not need to call functions in this object.

       Definition at line 6 of file ansi.c.

MMEEMMBBEERR FFUUNNCCTTIIOONN DDOOCCUUMMEENNTTAATTIIOONN
   aannssiitteesstt (())
       A simple function useful for testing if a terminal is ANSI compliant.
       \warn This function uses input_to (a privileged efun on this lib) and
       will conflict with interfaces.

       Definition at line 167 of file ansi.c.

   aannssiitteesstt22 (())
       Part 2 of the ANSI testing function.

       Definition at line 184 of file ansi.c.

   aannssiitteesstt33 (())
       Part 3 of the ANSI testing function.

       Definition at line 217 of file ansi.c.

   ccrreeaattee (())
       Initializes the ESCAPE string and the standard designer codes.

       Definition at line 51 of file ansi.c.

       References designer_codes, and ESCAPE.

   ssttrriinngg ggeett__ccooddee ((ssttrriinngg ccooddeennaammee,, oobbjjeecctt ddeesstt))
       The most important function in this file; this takes a tilde code in
       and returns an ANSI escape sequence that will perform the desired
       action on an ANSI compliant terminal.

       PPaarraammeetteerrss::

       _c_o_d_e_n_a_m_e
              The tilde code, with the tilde already stripped off.

       _d_e_s_t   The object which will be receiving the code. Most of the codes
              will only be returned properly if dest->query_ansi() is 1.

       RReettuurrnnss::
           An ANSI escape sequence; '' on invalid codes.

       Definition at line 73 of file ansi.c.

       References designer_codes.

   ssttrriinngg qquueerryy__ccooddee ((ssttrriinngg ccooddee__nnaammee))
       Allows you to query the code associated with a designer code.

       Definition at line 46 of file ansi.c.

       References designer_codes.

   vvooiidd sseett__ccooddee ((ssttrriinngg ccooddee__nnaammee,, ssttrriinngg nneewwccooddee))
       Sets a single 'designer' code. This is basically a code that aliases to
       another code. This is an important function for setting things like
       time of day, etc.

       Note that designer codes may later be changed to be carried on the
       player object, so that different players can have different color
       schemes (for varying weather, etc.)

       PPaarraammeetteerrss::

       _c_o_d_e___n_a_m_e
              The alias code, i.e. ~CCOM

       _n_e_w_c_o_d_e
              The code to which it will alias, i.e. ~[100

       Definition at line 39 of file ansi.c.

       References designer_codes.

MMEEMMBBEERR DDAATTAA DDOOCCUUMMEENNTTAATTIIOONN
   mmaappppiinngg ddeessiiggnneerr__ccooddeess
       The so-called 'designer codes' are modifiable codes, so far used only
       for color but actually translatable to any code recognized by this
       object. One restriction is that they cannot translate into a *sequence*
       of codes; they must be exactly one code long. They are not suitable for
       new functionality. A running list of existing designer codes should be
       kept in /help/wiz/colors.hlp

       Example: If I want to make ~CGRA mean 'color 7 on color 0' (gray on
       black) then I would set an entry in designer_codes as
       designer_codes['CGRA']='~[070'; This would then be translated as I
       want.

       Definition at line 25 of file ansi.c.

       Referenced by create(), get_code(), query_code(), and set_code().

   ssttrriinngg EESSCCAAPPEE
       A string of length one containing the ESCAPE character (ASCII #27).

       Definition at line 10 of file ansi.c.

       Referenced by create().


AAUUTTHHOORR
       Generated automatically by Doxygen for Walraven from the source code.



Walraven                          8 Jan 2004                           Ansi(3)
