home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tcl / tclx.z / tclx
Encoding:
Text File  |  1998-10-30  |  153.9 KB  |  2,707 lines

  1.  
  2.  
  3.  
  4. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      TclX - Extended Tcl: Extended command set for Tcl
  10.  
  11. IIIINNNNTTTTRRRROOOODDDDUUUUCCCCTTTTIIIIOOOONNNN
  12.      This man page contains the documentation for all of the extensions that
  13.      are added to Tcl 7.4 by Extended Tcl (TclX 7.4a).  These extensions
  14.      increase Tcl's capabilities by adding new commands to it, without
  15.      changing the syntax of standard Tcl.  Extended Tcl is a superset of
  16.      standard Tcl and is built alongside the standard Tcl sources.  Extended
  17.      Tcl has three basic functional areas:  A set of new commands, a Tcl shell
  18.      (i.e. a Unix shell-style command line and interactive environment),  and
  19.      a user-extensible library of useful Tcl procedures, any of which can be
  20.      automatically loaded on the first attempt to execute it.
  21.  
  22.      The command descriptions are separated into several sections:
  23.  
  24.           o General Commands
  25.  
  26.           o Debugging and Development Commands
  27.  
  28.           o Unix Access Commands
  29.  
  30.           o File Commands
  31.  
  32.           o TCP/IP Server Access
  33.  
  34.           o File Scanning Commands
  35.  
  36.           o Math Commands
  37.  
  38.           o List Maninipulation Commands
  39.  
  40.           o Keyed Lists
  41.  
  42.           o String and Character Manipulation Commands
  43.  
  44.           o XPG/3 Message Catalog Commands
  45.  
  46.           o Extended Tcl Shell
  47.  
  48.           o Help Facility
  49.  
  50.           o Tcl Loadable Libraries and Packages
  51.  
  52. GGGGEEEENNNNEEEERRRRAAAALLLL CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  53.      A set of general, useful Tcl commands, includes a command to begin an
  54.      interactive session with Tcl, a facility for tracing execution, and a
  55.      looping command.
  56.  
  57.      ddddiiiirrrrssss This procedure lists the directories in the directory stack.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  71.  
  72.  
  73.  
  74.      ccccoooommmmmmmmaaaannnnddddlllloooooooopppp ?_p_r_o_m_p_t_1? ?_p_r_o_m_p_t_2?
  75.           Create an interactive command loop for the current TCL interpreter.
  76.           This command receives commands from stdin and executes them.  It is
  77.           useful TCL scripts that do not normally converse interactively with
  78.           a user through a Tcl command interpreter, but which sometimes want
  79.           to enter this mode.
  80.  
  81.           _P_r_o_m_p_t_1 is a Tcl command  that is evaluated to output a prompt
  82.           string.  The old value of ttttccccllll____pppprrrroooommmmpppptttt1111 is saved and it is set to this
  83.           value for the duration of the command loop.  _P_r_o_m_p_t_2 is a command
  84.           that is evaluated to output the ``downlevel prompt'', which is the
  85.           prompt which is issued for continuation input.  The old value of
  86.           ttttccccllll____pppprrrroooommmmpppptttt2222 is saved and it is set to this value for the duration of
  87.           the command loop.
  88.  
  89.           When the command terminates, the variables for the prompt hooks will
  90.           be set to their old value.  If these arguments are not specified,
  91.           the prompt hooks use their current value.
  92.  
  93.      eeeecccchhhhoooo ?_s_t_r ...?
  94.           Writes zero or more strings to standard output, followed by a
  95.           newline.
  96.  
  97.      iiiinnnnffffooooxxxx _o_p_t_i_o_n
  98.           Return information about Extended Tcl, or the current application.
  99.           The following iiiinnnnffffooooxxxx command options are available:
  100.  
  101.           vvvveeeerrrrssssiiiioooonnnn
  102.                Return the version number of Extended Tcl.  The version number
  103.                for Extended Tcl is generated by combining the base version of
  104.                the standard Tcl code with a letter indicating the version of
  105.                Extended Tcl being used.  This is the documentation for version
  106.                7777....4444aaaa.
  107.  
  108.           ppppaaaattttcccchhhhlllleeeevvvveeeellll
  109.                Return the patchlevel for Extended Tcl.
  110.  
  111.           hhhhaaaavvvveeee____ffffcccchhhhoooowwwwnnnn
  112.                Return 1111 if the ffffcccchhhhoooowwwwnnnn system call is available.  This supports
  113.                the ----ffffiiiilllleeeeiiiidddd option on the cccchhhhoooowwwwnnnn and cccchhhhggggrrrrpppp commands.
  114.  
  115.           hhhhaaaavvvveeee____ffffcccchhhhmmmmoooodddd
  116.                Return 1111 if the ffffcccchhhhmmmmoooodddd system call is available.  This supports
  117.                the ----ffffiiiilllleeeeiiiidddd option on the cccchhhhmmmmoooodddd command.
  118.  
  119.           hhhhaaaavvvveeee____fffflllloooocccckkkk
  120.                Return 1111 if the fffflllloooocccckkkk command defined,  0000 if it is not
  121.                available.
  122.  
  123.           hhhhaaaavvvveeee____ffffssssyyyynnnncccc
  124.                Return 1111 if the ffffssssyyyynnnncccc system call is available and the ssssyyyynnnncccc
  125.                command will sync individual files.  0000 if it is not available
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  137.  
  138.  
  139.  
  140.                and the ssssyyyynnnncccc command will always sync all file buffers.
  141.  
  142.           hhhhaaaavvvveeee____ffffttttrrrruuuunnnnccccaaaatttteeee
  143.                Return 1111 if the ffffttttrrrruuuunnnnccccaaaatttteeee system call is available.  If it is,
  144.                the ffffttttrrrruuuunnnnccccaaaatttteeee command ----ffffiiiilllleeeeiiiidddd option maybe used.
  145.  
  146.           hhhhaaaavvvveeee____mmmmssssggggccccaaaattttssss
  147.                Return 1111 if XPG message catalogs are available, 0000 if they are
  148.                not.  The ccccaaaattttggggeeeettttssss is designed to continue to function without
  149.                message catalogs, always returning the default string.
  150.  
  151.           hhhhaaaavvvveeee____ppppoooossssiiiixxxx____ssssiiiiggggnnnnaaaallllssss
  152.                Return 1111 if Posix signals are available (bbbblllloooocccckkkk and uuuunnnnbbbblllloooocccckkkk
  153.                options available for the signal command).  0000 is returned if
  154.                Posix signals are not available.
  155.  
  156.           hhhhaaaavvvveeee____ssssoooocccckkkkeeeettttssss
  157.                Return 1111 if sockets are available (sssseeeerrrrvvvveeeerrrr____**** suite and ffffssssttttaaaatttt
  158.                llllooooccccaaaallllhhhhoooosssstttt and rrrreeeemmmmooootttteeeehhhhoooosssstttt options).  0000 is returned if sockets
  159.                are not available.
  160.  
  161.           hhhhaaaavvvveeee____ttttrrrruuuunnnnccccaaaatttteeee
  162.                Return 1111 if the ttttrrrruuuunnnnccccaaaatttteeee of cccchhhhssssiiiizzzzeeee system call is available.
  163.                If it is, the ffffttttrrrruuuunnnnccccaaaatttteeee command will work.
  164.  
  165.           aaaappppppppnnnnaaaammmmeeee
  166.                Return the symbolic application name of the current application
  167.                linked with the Extended Tcl library.  The C variable
  168.                ttttccccllllAAAAppppppppNNNNaaaammmmeeee must be set by the application to return an
  169.                application specific value for this variable.
  170.  
  171.           aaaapppppppplllloooonnnnggggnnnnaaaammmmeeee
  172.                Return a natural language name for the current application. The
  173.                C variable ttttccccllllLLLLoooonnnnggggAAAAppppppppNNNNaaaammmmeeee must be set by the application to
  174.                return an application specific value for this variable.
  175.  
  176.           aaaappppppppvvvveeeerrrrssssiiiioooonnnn
  177.                Return the version number for the current application.  The C
  178.                variable ttttccccllllAAAAppppppppVVVVeeeerrrrssssiiiioooonnnn must be set by the application to return
  179.                an application-specific value for this variable.
  180.  
  181.           aaaappppppppppppaaaattttcccchhhhlllleeeevvvveeeellll
  182.                Return the patchlevel for the current application.  The C
  183.                variable ttttccccllllAAAAppppppppPPPPaaaattttcccchhhhlllleeeevvvveeeellll must be set by the application to
  184.                return an application-specific value for this variable.
  185.  
  186.      ffffoooorrrr____aaaarrrrrrrraaaayyyy____kkkkeeeeyyyyssss _v_a_r _a_r_r_a_y__n_a_m_e _c_o_d_e
  187.           This procedure performs a foreach-style loop for each key in the
  188.           named array.  The bbbbrrrreeeeaaaakkkk and ccccoooonnnnttttiiiinnnnuuuueeee statements work as with
  189.           ffffoooorrrreeeeaaaacccchhhh.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  203.  
  204.  
  205.  
  206.      ffffoooorrrr____rrrreeeeccccuuuurrrrssssiiiivvvveeee____gggglllloooobbbb _v_a_r _d_i_r_l_i_s_t _g_l_o_b_l_i_s_t _c_o_d_e
  207.           This procedure performs a foreach-style loop over recursively
  208.           matched files.  All directories in _d_i_r_l_i_s_t are recursively searched
  209.           (breadth-first), comparing each file found against the file glob
  210.           patterns in gggglllloooobbbblllliiiisssstttt.  For each matched file, the variable _v_a_r is
  211.           set to the file path and _c_o_d_e is evaluated.  Symbolic links are not
  212.           followed.
  213.  
  214.      lllloooooooopppp _v_a_r _f_i_r_s_t _l_i_m_i_t ?_i_n_c_r_e_m_e_n_t? _b_o_d_y
  215.           LLLLoooooooopppp is a looping command, similar in behavior to the Tcl ffffoooorrrr
  216.           statement, except that the lllloooooooopppp statement achieves substantially
  217.           higher performance and is easier to code when the beginning and
  218.           ending values of a loop are known, and the loop variable is to be
  219.           incremented by a known, fixed amount every time through the loop.
  220.  
  221.            The _v_a_r argument is the name of a Tcl variable that will contain
  222.           the loop index.  The loop index is set to the value specified by
  223.           _f_i_r_s_t.  The Tcl interpreter is invoked upon _b_o_d_y zero or more times,
  224.           where _v_a_r is incremented by _i_n_c_r_e_m_e_n_t every time through the loop,
  225.           or by one if _i_n_c_r_e_m_e_n_t is not specified.  _I_n_c_r_e_m_e_n_t can be negative
  226.           in which case the loop will count downwards.
  227.  
  228.           When _v_a_r reaches _l_i_m_i_t, the loop terminates without a subsequent
  229.           execution of _b_o_d_y.  For instance, if the original lllloooooooopppp parameters
  230.           would cause lllloooooooopppp to terminate, say _f_i_r_s_t was one, _l_i_m_i_t was zero and
  231.           _i_n_c_r_e_m_e_n_t was not specified or was non-negative, _b_o_d_y is not
  232.           executed at all and lllloooooooopppp returns.
  233.  
  234.           The _f_i_r_s_t, _l_i_m_i_t and _i_n_c_r_e_m_e_n_t are integer expressions.  They are
  235.           only evaulated once at the beginning of the loop.
  236.  
  237.           If a ccccoooonnnnttttiiiinnnnuuuueeee command is invoked within _b_o_d_y then any remaining
  238.           commands in the current execution of _b_o_d_y are skipped, as in the ffffoooorrrr
  239.           command.  If a bbbbrrrreeeeaaaakkkk command is invoked within _b_o_d_y then the lllloooooooopppp
  240.           command will return immediately.  LLLLoooooooopppp returns an empty string.
  241.  
  242.      ppppooooppppdddd
  243.           This procedure pops the top directory entry from the directory stack
  244.           and make it the current directory.
  245.  
  246.      ppppuuuusssshhhhdddd ?_d_i_r?
  247.           This procedure pushs the current directory onto the directory stack
  248.           and ccccdddd to the specified directory.  If the directory is not
  249.           specified, then the current directory is pushed, but remains
  250.           unchanged.
  251.  
  252.      rrrreeeeccccuuuurrrrssssiiiivvvveeee____gggglllloooobbbb _d_i_r_l_i_s_t _g_l_o_b_l_i_s_t
  253.           This procedure returns a list of recursively matches files.  All
  254.           directories in _d_i_r_l_i_s_t are recursively searched (breadth-first),
  255.           comparing each file found against the file glob patterns in
  256.           gggglllloooobbbblllliiiisssstttt.  Symbolic links are not followed.
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  269.  
  270.  
  271.  
  272.      sssshhhhoooowwwwpppprrrroooocccc ?_p_r_o_c_n_a_m_e ...?
  273.           This procedure lists the definition of the named procedures.
  274.           Loading them if it is not already loaded.  If no procedure names are
  275.           supplied, the definitions of all currently loaded procedures are
  276.           returned.
  277.  
  278.      This section contains information on commands and procdures that are
  279.      useful for developing and debugging Tcl scripts.
  280.  
  281.  
  282.      ccccmmmmddddttttrrrraaaacccceeee _l_e_v_e_l|oooonnnn ?nnnnooooeeeevvvvaaaallll? ?nnnnoooottttrrrruuuunnnnccccaaaatttteeee? ?_p_r_o_c_s? ?_f_i_l_e_i_d?
  283.           Print a trace statement for all commands executed at depth of _l_e_v_e_l
  284.           or below (1 is the top level).  If oooonnnn is specified, all commands at
  285.           any level are traced.  The following options are available:
  286.  
  287.           nnnnooooeeeevvvvaaaallll
  288.                Causes arguments to be printed unevaluated.  If nnnnooooeeeevvvvaaaallll is
  289.                specified, the arguments are printed before evaluation.
  290.                Otherwise, they are printed afterwards.
  291.  
  292.                If the command line is longer than 60 characters, it is
  293.                truncated to 60 and a "..." is postpended to indicate that
  294.                there was more output than was displayed.  If an evaluated
  295.                argument contains a space, the entire argument will be enclosed
  296.                inside of braces (`{}') to allow the reader to visually
  297.                separate the arguments from each other.
  298.  
  299.           nnnnoooottttrrrruuuunnnnccccaaaatttteeee
  300.                Disables the truncation of commands and evaluated arguments.
  301.  
  302.           pppprrrrooooccccssss
  303.                Enables the tracing of procedure calls only.  Commands that
  304.                aren't procedure calls (i.e. calls to commands that are written
  305.                in C, C++ or some object-compatible language) are not traced if
  306.                the pppprrrrooooccccssss option is specified.  This option is particularly
  307.                useful for greatly reducing the output of ccccmmmmddddttttrrrraaaacccceeee while
  308.                debugging.
  309.  
  310.           ffffiiiilllleeeeiiiidddd
  311.                This is a file id as returned by the ooooppppeeeennnn command.  If
  312.                specified, then the trace output will be written to the file
  313.                rather than stdout.  A stdio buffer flush is done after every
  314.                line is written so that the trace may be monitored externally
  315.                or provide useful information for debugging problems that cause
  316.                core dumps.
  317.      The most common use of this command is to enable tracing to a file during
  318.      the development.  If a failure occurs, a trace is then available when
  319.      needed.  Command tracing will slow down the execution of code, so it
  320.      should be removed when code is debugged.  The following command will
  321.      enable tracing to a file for the remainder of the program:
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  335.  
  336.  
  337.  
  338.             cmdtrace on [open cmd.log w]
  339.  
  340.      ccccmmmmddddttttrrrraaaacccceeee ooooffffffff
  341.           Turn off all tracing.
  342.  
  343.      ccccmmmmddddttttrrrraaaacccceeee ddddeeeepppptttthhhh
  344.           Returns the current maximum trace level, or zero if trace is
  345.           disabled.
  346.  
  347.      eeeeddddpppprrrrooooccccssss ?_p_r_o_c...?
  348.           This procedure writes the named procedures, or all currently defined
  349.           procedures, to a temporary file, then calls an editor on it (as
  350.           specified by the EEEEDDDDIIIITTTTOOOORRRR environment variable, or vvvviiii if none is
  351.           specified), then sources the file back in if it was changed.
  352.  
  353.      pppprrrrooooffffiiiilllleeee ????----ccccoooommmmmmmmaaaannnnddddssss???? oooonnnn
  354.  
  355.      pppprrrrooooffffiiiilllleeee ooooffffffff _a_r_r_a_y_V_a_r
  356.           This command is used to collect a performance profile of a Tcl
  357.           script.  It collects data at the Tcl procedure level. The number of
  358.           calls to a procedure, and the amount of real and CPU time is
  359.           collected. Time is also collected for the global context.  The
  360.           procedure data is collected by bucketing it based on the procedure
  361.           call stack, this allows determination of how much time is spent in a
  362.           particular procedure in each of it's calling contexts.
  363.  
  364.           The oooonnnn option enables profile data collection. If the ----ccccoooommmmmmmmaaaannnnddddssss
  365.           option is specifed, data on all commands within a procedure is
  366.           collected as well a procedures.  Multiple occurrences of a command
  367.           within a procedure are not distinguished, but this data may still be
  368.           useful for analysis.
  369.  
  370.           The ooooffffffff option turns off profiling and moves the data collected to
  371.           the array _a_r_r_a_y_V_a_r.  The array is address by a list containing the
  372.           procedure call stack.  Element zero is the top of the stack, the
  373.           procedure that the data is for.  The data in each entry is a list
  374.           consisting of the procedure call count and the real time and CPU
  375.           time in milliseconds spent in the procedure (and all procedures it
  376.           called). The list is in the form {_c_o_u_n_t _r_e_a_l _c_p_u}.  A Tcl procedure
  377.           pppprrrrooooffffrrrreeeepppp is supplied for reducing the data and producing a report
  378.  
  379.      pppprrrrooooffffrrrreeeepppp _p_r_o_f_D_a_t_a_V_a_r _s_o_r_t_K_e_y ?_o_u_t_F_i_l_e? ?_u_s_e_r_T_i_t_l_e?
  380.           This procedure generates a report from data collect from the profile
  381.           command.  PPPPrrrrooooffffDDDDaaaattttaaaaVVVVaaaarrrr is the name of the array containing the data
  382.           returned by the pppprrrrooooffffiiiilllleeee command. SSSSoooorrrrttttKKKKeeeeyyyy indicates which data value
  383.           to sort by.  It should be one of "ccccaaaallllllllssss", "ccccppppuuuu" or "rrrreeeeaaaallll".  OOOOuuuuttttFFFFiiiilllleeee
  384.           is the name of file to write the report to.  If omitted, stdout is
  385.           assumed.  UUUUsssseeeerrrrTTTTiiiittttlllleeee is an optional title line to add to output.
  386.  
  387.      ssssaaaavvvveeeepppprrrrooooccccssss _f_i_l_e_N_a_m_e ?_p_r_o_c...?
  388.           This prodcure saves the definition of the named procedure, or all
  389.           currently defined procedures if none is specified, to the named
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  401.  
  402.  
  403.  
  404.           file.
  405.  
  406. UUUUNNNNIIIIXXXX AAAACCCCCCCCEEEESSSSSSSS CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  407.      These commands provide access to many basic Unix facilities, including
  408.      process handling, date and time processing, signal handling and the
  409.      executing commands via the shell.
  410.  
  411.      aaaallllaaaarrrrmmmm _s_e_c_o_n_d_s
  412.           Instructs the system to send a SIGALRM signal in the specified
  413.           number of seconds.  This is a floating point number, so fractions of
  414.           a section may be specified.  If _s_e_c_o_n_d_s is 0.0, any previous alarm
  415.           request is canceled.  Only one alarm at a time may be active; the
  416.           command returns the number of seconds left in the previous alarm.
  417.           On systems without the sssseeeettttiiiittttiiiimmmmeeeerrrr system call, _s_e_c_o_n_d_s is rounded up
  418.           to an integer number of seconds.
  419.  
  420.      ccccoooonnnnvvvveeeerrrrttttcccclllloooocccckkkk _d_a_t_e_S_t_r_i_n_g ?GGGGMMMMTTTT|{}? ?_b_a_s_e_C_l_o_c_k?
  421.           Convert _d_a_t_e_S_t_r_i_n_g to an integer clock value (see ggggeeeettttcccclllloooocccckkkk).  This
  422.           command can parse and convert virtually any standard date and/or
  423.           time string, which can include standard time zone mnemonics.  If
  424.           only a time is specified, the current date is assumed.  If the
  425.           string does not contain a time zone mnemonic, the local time zone is
  426.           assumed, unless the GGGGMMMMTTTT argument is specified, in which case the
  427.           clock value is calculated assuming that the specified time is
  428.           relative to Greenwich Mean Time.
  429.  
  430.           If _b_a_s_e_C_l_o_c_k is specified, it should contain an integer clock value.
  431.           Only the date in this value is used, not the time.  This is useful
  432.           for determining the time on a specific day or doing other date-
  433.           relative conversions.
  434.  
  435.           The character string consists of zero or more specifications of the
  436.           following form:
  437.  
  438.           _t_i_m_e - A time of day, which is of the form _h_h[:_m_m[:_s_s]] [_m_e_r_i_d_i_a_n]
  439.           [_z_o_n_e] or _h_h_m_m [_m_e_r_i_d_i_a_n] [_z_o_n_e].  If no meridian is specified, _h_h
  440.           is interpreted on a 24-hour clock.
  441.  
  442.           _d_a_t_e - A specific month and day with optional year.  The acceptable
  443.           formats are _m_m/_d_d[/_y_y], _m_o_n_t_h_n_a_m_e _d_d[, _y_y], _d_d _m_o_n_t_h_n_a_m_e [_y_y], and
  444.           _d_a_y, _d_d _m_o_n_t_h_n_a_m_e _y_y.  The default year is the current year.  If the
  445.           year is less then 100, then 1900 is added to it.
  446.  
  447.           _r_e_l_a_t_i_v_e _t_i_m_e - A specification relative to the current time.  The
  448.           format is _n_u_m_b_e_r _u_n_i_t; acceptable units are _y_e_a_r, _f_o_r_t_n_i_g_h_t, _m_o_n_t_h,
  449.           _w_e_e_k, _d_a_y, _h_o_u_r, _m_i_n_u_t_e (or _m_i_n), and _s_e_c_o_n_d (or _s_e_c).  The unit can
  450.           be specified as a singular or plural, as in _3 _w_e_e_k_s.  These
  451.           modifiers may also be specified:  _t_o_m_o_r_r_o_w, _y_e_s_t_e_r_d_a_y, _t_o_d_a_y, _n_o_w,
  452.           _l_a_s_t, _t_h_i_s, _n_e_x_t, _a_g_o.
  453.  
  454.           The actual date is calculated according to the following steps.
  455.           First, any absolute date and/or time is processed and converted.
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  467.  
  468.  
  469.  
  470.           Using that time as the base, day-of-week specifications are added.
  471.           Next, relative specifications are used.  If a date or day is
  472.           specified, and no absolute or relative time is given, midnight is
  473.           used.  Finally, a correction is applied so that the correct hour of
  474.           the day is produced after allowing for daylight savings time
  475.           differences.
  476.  
  477.           _c_o_n_v_e_r_t_c_l_o_c_k ignores case when parsing all words.  The names of the
  478.           months and days of the week can be abbreviated to their first three
  479.           letters, with optional trailing period.  Periods are ignored in any
  480.           timezone or meridian values.
  481.  
  482.           Note that _c_o_n_v_e_r_t_c_l_o_c_k will convert symbolic time-zone names, but
  483.           these are not standardized and there are conflicts with various
  484.           parts of the world.  Use GMT when trying to produce a portable time
  485.           that can then be converted back to a numeric value.
  486.  
  487.           The only dates in the range 1902 and 2037 may be converted. Some
  488.           examples are:
  489.  
  490.               convertclock "14 Feb 92"
  491.               convertclock "Feb 14, 1992 12:20 PM PST"
  492.               convertclock "12:20 PM Feb 14, 1992"
  493.  
  494.      eeeexxxxeeeeccccllll ?----aaaarrrrggggvvvv0000 argv0? _p_r_o_g ?_a_r_g_l_i_s_t?
  495.           Do an execl, replacing the current program (either Extended Tcl or
  496.           an application with Extended Tcl embedded into it) with _p_r_o_g and
  497.           passing the arguments in the list _a_r_g_l_i_s_t.
  498.  
  499.           The ----aaaarrrrggggvvvv0000 options specifies that _a_r_g_v_0 is to be passed to the
  500.           program as argv [0] rather than _p_r_o_g.
  501.  
  502.           Note: If you are using eeeexxxxeeeeccccllll in a Tk application and it fails, you
  503.           may not do anything that accesses the X server or you will receive a
  504.           BBBBaaaaddddWWWWiiiinnnnddddoooowwww error from the X server.  This includes executing the Tk
  505.           version of the eeeexxxxiiiitttt command.  We suggest using the following command
  506.           to abort Tk applications after an eeeexxxxeeeeccccllll failure:
  507.  
  508.               kill [id process]
  509.  
  510.      ffffmmmmttttcccclllloooocccckkkk _c_l_o_c_k_v_a_l ?_f_o_r_m_a_t? ?GGGGMMMMTTTT||||{{{{}}}}?
  511.           Converts a Unix integer time value, typically returned by ggggeeeettttcccclllloooocccckkkk,
  512.           ccccoooonnnnvvvveeeerrrrttttcccclllloooocccckkkk, or the aaaattttiiiimmmmeeee, mmmmttttiiiimmmmeeee, or ccccttttiiiimmmmeeee options of the ffffiiiilllleeee
  513.           command, to human-readable form.  The _f_o_r_m_a_t argument is a string
  514.           that describes how the date and time are to be formatted.  Field
  515.           descriptors consist of a ``%'' followed by a field descriptor
  516.           character.  All other characters are copied into the result.  Valid
  517.           field descriptors are:
  518.  
  519.               %% - Insert a %.
  520.               %a - Abbreviated weekday name.
  521.               %A - Full weekday name
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  533.  
  534.  
  535.  
  536.               %b - Abbreviated month name.
  537.               %B - Full month name.
  538.               %d - Day of month (01 - 31).
  539.               %D - Date as %m/%d/%y.
  540.               %e - Day of month (1-31), no leading zeros.
  541.               %h - Abbreviated month name.
  542.               %H - Hour (00 - 23).
  543.               %I - Hour (00 - 12).
  544.               %j - Day number of year (001 - 366).
  545.               %m - Month number (01 - 12).
  546.               %M - Minute (00 - 59).
  547.               %n - Insert a new line.
  548.               %p - AM or PM.
  549.               %r - Time as %I:%M:%S %p.
  550.               %R - Time as %H:%M.
  551.               %S - Seconds (00 - 59).
  552.               %t - Insert a tab.
  553.               %T - Time as %H:%M:%S.
  554.               %U - Week number of year (01 - 52), Sunday is the first
  555.                    day of the week.
  556.               %w - Weekday number (Sunday = 0).
  557.               %W - Week number of year (01 - 52), Monday is the first
  558.                    day of the week.
  559.               %x - Local specific date format.
  560.               %X - Local specific time format.
  561.               %y - Year within century (00 - 99).
  562.               %Y - Year as ccyy (e.g. 1990)
  563.               %Z - Time zone name.
  564.  
  565.           If format is not specified, "%a %b %d %H:%M:%S %Z %Y" is used.  If
  566.           GGGGMMMMTTTT is specified, the time will be formated as Greenwich Mean Time.
  567.           If the argument is not specified or is empty, then the local
  568.           timezone will be used as defined by the operating environment.
  569.  
  570.      cccchhhhrrrrooooooootttt _d_i_r_n_a_m_e
  571.           Change root directory to _d_i_r_n_a_m_e, by invoking the POSIX cccchhhhrrrrooooooootttt((((2222))))
  572.           system call.  This command only succeeds if running as root.
  573.  
  574.      ffffoooorrrrkkkk
  575.           Fork the current Tcl process.  Fork returns zero to the child
  576.           process and the process number of the child to the parent process.
  577.           If the fork fails, a Tcl error is generated.
  578.  
  579.           If an eeeexxxxeeeeccccllll is not going to be performed before the child process
  580.           does output, or if a cccclllloooosssseeee and dddduuuupppp sequence is going to be performed
  581.           on ssssttttddddoooouuuutttt or ssssttttddddeeeerrrrrrrr, then a fffflllluuuusssshhhh should be issued against ssssttttddddoooouuuutttt,
  582.           ssssttttddddeeeerrrrrrrr and any other open output file before doing the ffffoooorrrrkkkk.
  583.           Otherwise characters from the parent process pending in the buffers
  584.           will be output by both the parent and child processes.
  585.  
  586.           Note: If you are ffffoooorrrrkkkking in a Tk based apllication you must eeeexxxxeeeeccccllll
  587.           before doing any window operations in the child or you will receive
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  599.  
  600.  
  601.  
  602.           a BBBBaaaaddddWWWWiiiinnnnddddoooowwww error from the X server.
  603.  
  604.      ggggeeeettttcccclllloooocccckkkk
  605.           Return the current date and time as a system-dependent integer
  606.           value.  The unit of the value is seconds, allowing it to be used for
  607.           relative time calculations.
  608.  
  609.      iiiidddd ooooppppttttiiiioooonnnnssss
  610.           This command provides a means of getting, setting and converting
  611.           user, group and process ids.  The iiiidddd command has the following
  612.           options:
  613.  
  614.           iiiidddd uuuusssseeeerrrr ?_n_a_m_e?
  615.  
  616.           iiiidddd uuuusssseeeerrrriiiidddd ?_u_i_d?
  617.                Set the real and effective user ID to _n_a_m_e or _u_i_d, if the name
  618.                (or uid) is valid and permissions allow it.  If the name (or
  619.                uid) is not specified, the current name (or uid) is returned.
  620.  
  621.           iiiidddd ccccoooonnnnvvvveeeerrrrtttt uuuusssseeeerrrriiiidddd _u_i_d
  622.  
  623.           iiiidddd ccccoooonnnnvvvveeeerrrrtttt uuuusssseeeerrrr _n_a_m_e
  624.                Convert a user ID number to a user name, or vice versa.
  625.  
  626.           iiiidddd ggggrrrroooouuuupppp ?_n_a_m_e?
  627.  
  628.           iiiidddd ggggrrrroooouuuuppppiiiidddd ?_g_i_d?
  629.                Set the real and effective group ID to _n_a_m_e or _g_i_d, if the name
  630.                (or gid) is valid and permissions allow it.  If the group name
  631.                (or gid) is not specified, the current group name (or gid) is
  632.                returned.
  633.  
  634.           iiiidddd ggggrrrroooouuuuppppssss
  635.  
  636.           iiiidddd ggggrrrroooouuuuppppiiiiddddssss
  637.                Return the current group access list of the process.  The
  638.                option ggggrrrroooouuuuppppssss returns group names and ggggrrrroooouuuuppppiiiiddddssss returns id
  639.                numbers.
  640.  
  641.           iiiidddd ccccoooonnnnvvvveeeerrrrtttt ggggrrrroooouuuuppppiiiidddd _g_i_d
  642.  
  643.           iiiidddd ccccoooonnnnvvvveeeerrrrtttt ggggrrrroooouuuupppp _n_a_m_e
  644.                Convert a group ID number to a group name, or vice versa.
  645.  
  646.           iiiidddd eeeeffffffffeeeeccccttttiiiivvvveeee uuuusssseeeerrrr
  647.  
  648.           iiiidddd eeeeffffffffeeeeccccttttiiiivvvveeee uuuusssseeeerrrriiiidddd
  649.                Return the effective user name, or effective user ID number,
  650.                respectively.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  665.  
  666.  
  667.  
  668.           iiiidddd eeeeffffffffeeeeccccttttiiiivvvveeee ggggrrrroooouuuupppp
  669.  
  670.           iiiidddd eeeeffffffffeeeeccccttttiiiivvvveeee ggggrrrroooouuuuppppiiiidddd
  671.                Return the effective group name, or effective group ID number,
  672.                respectively.
  673.  
  674.           iiiidddd eeeeffffffffeeeeccccttttiiiivvvveeee ggggrrrroooouuuuppppiiiiddddssss
  675.                Return all of the groupids the user is a member of.
  676.  
  677.           iiiidddd hhhhoooosssstttt
  678.                Return the hostname of the system the program is running on.
  679.  
  680.           iiiidddd pppprrrroooocccceeeessssssss
  681.                Return the process ID of the current process.
  682.  
  683.           iiiidddd pppprrrroooocccceeeessssssss ppppaaaarrrreeeennnntttt
  684.                Return the process ID of the parent of the current process.
  685.  
  686.           iiiidddd pppprrrroooocccceeeessssssss ggggrrrroooouuuupppp
  687.                Return the process group ID of the current process.
  688.  
  689.           iiiidddd pppprrrroooocccceeeessssssss ggggrrrroooouuuupppp sssseeeetttt
  690.                Set the process group ID of the current process to its process
  691.                ID.
  692.  
  693.           iiiidddd hhhhoooosssstttt
  694.                Returns the standard host name of the machine the process is
  695.                executing on.
  696.  
  697.      kkkkiiiillllllll ?----ppppggggrrrroooouuuupppp? ?_s_i_g_n_a_l? _i_d_l_i_s_t
  698.           Send a signal to the each process in the list _i_d_l_i_s_t, if permitted.
  699.           _S_i_g_n_a_l, if present, is the signal number or the symbolic name of the
  700.           signal, see the signal system call manual page.  The leading ``SIG''
  701.           is optional when the signal is specified by its symbolic name.  The
  702.           default for _s_i_g_n_o is 15, SIGTERM.
  703.  
  704.           If ----ppppggggrrrroooouuuupppp is specified, the numbers in _i_d_l_i_s_t are take as process
  705.           group ids and the signal is sent to all of the process in that
  706.           process group.  A process group id of 0000 specifies the current
  707.           process group.
  708.  
  709.      lllliiiinnnnkkkk ?----ssssyyyymmmm? _s_r_c_p_a_t_h _d_e_s_t_p_a_t_h
  710.           Create a directory entry, _d_e_s_t_p_a_t_h, linking it to the existing file,
  711.           _s_r_c_p_a_t_h.  If ----ssssyyyymmmm is specified, a symbolic link, rather than a hard
  712.           link, is created.  (The ----ssssyyyymmmm option is only available on systems
  713.           that support symbolic links.)
  714.  
  715.      mmmmkkkkddddiiiirrrr ????----ppppaaaatttthhhh???? _d_i_r_L_i_s_t
  716.           Create each of the directories in the list _d_i_r_L_i_s_t.  The mode on the
  717.           new directories is 777, modified by the umask.  If ----ppppaaaatttthhhh is
  718.           specified, then any non-existent parent directories in the specified
  719.           path(s) are also created.
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  731.  
  732.  
  733.  
  734.      nnnniiiicccceeee ?_p_r_i_o_r_i_t_y_i_n_c_r?
  735.           Change or return the process priority.  If _p_r_i_o_r_i_t_y_i_n_c_r is omitted,
  736.           the current priority is returned.  If _p_r_i_o_r_i_t_y_i_n_c_r is positive, it
  737.           is added to the current _p_r_i_o_r_i_t_y level, up to a system defined
  738.           maximum (normally 11119999),
  739.  
  740.           Negative _p_r_i_o_r_i_t_y_i_n_c_r values cumulatively increase the program's
  741.           priority down to a system defined minimum (normally ----11119999); increasing
  742.           priority with negative niceness values will only work for the
  743.           superuser.
  744.  
  745.           The new priority is returned.
  746.  
  747.      rrrreeeeaaaaddddddddiiiirrrr _d_i_r_P_a_t_h
  748.           Returns a list containing the contents of the directory _d_i_r_P_a_t_h.
  749.           The directory entries "." and ".." are not returned.
  750.  
  751.      rrrrmmmmddddiiiirrrr ?----nnnnooooccccoooommmmppppllllaaaaiiiinnnn? _d_i_r_L_i_s_t
  752.           Remove each of the directories in the list _d_i_r_L_i_s_t.  If ----nnnnooooccccoooommmmppppllllaaaaiiiinnnn
  753.           is specified, then errors will be ignored.
  754.  
  755.      ssssiiiiggggnnnnaaaallll _a_c_t_i_o_n _s_i_g_l_i_s_t ?_c_o_m_m_a_n_d?
  756.           Specify the action to take when a Unix signal is received by
  757.           Extended Tcl, or a program that embeds it.  _S_i_g_l_i_s_t is a list of
  758.           either the symbolic or numeric Unix signal (the SIG prefix is
  759.           optional).  _A_c_t_i_o_n is one of the following actions to be performed
  760.           on receipt of the signal.  To specify all modifiable signals, use
  761.           `*' (this will not include SIGKILL and SIGSTOP, as they can not be
  762.           modified).
  763.  
  764.           ddddeeeeffffaaaauuuulllltttt - Perform system default action when signal is received (see
  765.           ssssiiiiggggnnnnaaaallll system call documentation).
  766.  
  767.           iiiiggggnnnnoooorrrreeee - Ignore the signal.
  768.  
  769.           eeeerrrrrrrroooorrrr - Generate a catchable Tcl error.  It will be as if the
  770.           command that was running returned an error.  The error code will be
  771.           in the form:
  772.               PPPPOOOOSSSSIIIIXXXX SSSSIIIIGGGG _s_i_g_n_a_m_e
  773.           For the death of child signal, _s_i_g_n_a_m_e will always be SIGCHLD,
  774.           rather than SIGCLD, to allow writing portable code.
  775.  
  776.           ttttrrrraaaapppp - When the signal occurs, execute _c_o_m_m_a_n_d and continue
  777.           execution if an error is not returned by _c_o_m_m_a_n_d.  The command will
  778.           be executed in the global context.  The command will be edited
  779.           before execution, replacing occurrences of "%S" with the signal
  780.           name.  Occurrences of "%%" result in a single "%".  This editing
  781.           occurs just before the trap command is evaluated. If an error is
  782.           returned, then follow the standard Tcl error mechanism.  Often
  783.           _c_o_m_m_a_n_d will just do an eeeexxxxiiiitttt.
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  797.  
  798.  
  799.  
  800.           ggggeeeetttt - Retrieve the current settings of the specified signals.  A
  801.           keyed list will be returned were the keys are one of the specified
  802.           signals and the values are a list cosisting of the action associated
  803.           with the signal, a 0000 if the signal may be delivered (not block) and
  804.           a 1111 if it is blocked. The actions maybe one of `ddddeeeeffffaaaauuuulllltttt',`iiiiggggnnnnoooorrrreeee',
  805.           `eeeerrrrrrrroooorrrr' or `ttttrrrraaaapppp.  If the action is trap, the third element is the
  806.           command associated with the action.  The action `uuuunnnnkkkknnnnoooowwwwnnnn' is
  807.           returned if a non-Tcl signal handler has been associated with the
  808.           signal.
  809.  
  810.           sssseeeetttt - Set signals from a keyed list in the format returned by the
  811.           ggggeeeetttt.  For this action, _s_i_g_l_i_s_t is the keyed list of signal state.
  812.           Signals with an action of `uuuunnnnkkkknnnnoooowwwwnnnn' are not modified.
  813.  
  814.           bbbblllloooocccckkkk - Block the specified signals from being received. (Posix
  815.           systems only).
  816.  
  817.           uuuunnnnbbbblllloooocccckkkk - Allow the specified signal to be received. Pending signals
  818.           will not occur. (Posix systems only).
  819.  
  820.           The signal action will remain enabled after the specified signal has
  821.           occurred.  The exception to this is SSSSIIIIGGGGCCCCHHHHLLLLDDDD on systems without Posix
  822.           signals.  For these systems, SSSSIIIIGGGGCCCCHHHHLLLLDDDD is not be automatically
  823.           reenabled.  After a SSSSIIIIGGGGCCCCHHHHLLLLDDDD signal is received, a call to wwwwaaaaiiiitttt must
  824.           be performed to retrieve the exit status of the child process before
  825.           issuing another ssssiiiiggggnnnnaaaallll SSSSIIIIGGGGCCCCHHHHLLLLDDDD ... command.  For code that is to be
  826.           portable between both types of systems, use this approach.
  827.  
  828.           Signals are not processed until after the completion of the Tcl
  829.           command that is executing when the signal is received.  If an
  830.           interactive Tcl shell is running, then the SSSSIIIIGGGGIIIINNNNTTTT will be set to
  831.           eeeerrrrrrrroooorrrr, non-interactive Tcl sessions leave SSSSIIIIGGGGIIIINNNNTTTT unchanged from when
  832.           the process started (normally ddddeeeeffffaaaauuuulllltttt for foreground processes and
  833.           iiiiggggnnnnoooorrrreeee for processes in the background).
  834.  
  835.      sssslllleeeeeeeepppp _s_e_c_o_n_d_s
  836.           Sleep the Extended Tcl process for _s_e_c_o_n_d_s seconds.
  837.  
  838.      ssssyyyysssstttteeeemmmm _c_o_m_m_a_n_d
  839.           Executes _c_o_m_m_a_n_d via the _s_y_s_t_e_m(3) call.  Differs from eeeexxxxeeeecccc in that
  840.           ssssyyyysssstttteeeemmmm doesn't return the executed command's standard output as the
  841.           result string, and ssssyyyysssstttteeeemmmm goes through the Unix shell to provide
  842.           wildcard expansion, redirection, etc, as is normal from an sssshhhh
  843.           command line.  The exit code of the command is returned.
  844.  
  845.      ssssyyyynnnncccc ?_f_i_l_e_I_d?
  846.           If _f_i_l_e_I_d is not specified, or if it is and this system does not
  847.           support the _f_s_y_n_c system call, issues a _s_y_n_c system call to flush
  848.           all pending disk output.  If _f_i_l_e_I_d is specified and the system does
  849.           support the _f_s_y_n_c system call, issues an _f_s_y_n_c on the file
  850.           corresponding to the specified Tcl _f_i_l_e_I_d to force all pending
  851.           output to that file out to the disk.
  852.  
  853.  
  854.  
  855.                                                                        PPPPaaaaggggeeee 11113333
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  863.  
  864.  
  865.  
  866.           If _f_i_l_e_I_d is specified, the file must be writable.  A fffflllluuuusssshhhh will be
  867.           issued against the _f_i_l_e_I_d before the sync.
  868.  
  869.           The _i_n_f_o_x _h_a_v_e__f_s_y_n_c command can be used to determine if "ssssyyyynnnncccc
  870.           _f_i_l_e_I_d" will do a _s_y_n_c or a _f_s_y_n_c.
  871.  
  872.      ttttiiiimmmmeeeessss
  873.           Return a list containing the process and child execution times in
  874.           the form:
  875.               _u_t_i_m_e _s_t_i_m_e _c_u_t_i_m_e _c_s_t_i_m_e
  876.           Also see the _t_i_m_e_s(2) system call manual page.  The values are in
  877.           milliseconds.
  878.  
  879.      uuuummmmaaaasssskkkk ?_o_c_t_a_l_m_a_s_k?
  880.           Sets file-creation mode mask to the octal value of _o_c_t_a_l_m_a_s_k.  If
  881.           _o_c_t_a_l_m_a_s_k is omitted, the current mask is returned.
  882.  
  883.      uuuunnnnlllliiiinnnnkkkk ?----nnnnooooccccoooommmmppppllllaaaaiiiinnnn? _f_i_l_e_l_i_s_t
  884.           Delete (unlink) the files whose names are in the list _f_i_l_e_l_i_s_t.  If
  885.           ----nnnnooooccccoooommmmppppllllaaaaiiiinnnn is specified, then errors will be ignored.
  886.  
  887.      wwwwaaaaiiiitttt ?----nnnnoooohhhhaaaannnngggg? ?----uuuunnnnttttrrrraaaacccceeeedddd? ?----ppppggggrrrroooouuuupppp? ?_p_i_d?
  888.           Waits for a process created with the eeeexxxxeeeeccccllll command to terminate,
  889.           either due to an untrapped signal or call to _e_x_i_t system call.  If
  890.           the process id _p_i_d is specified, they wait on that process,
  891.           otherwise wait on any child process to terminate.
  892.  
  893.           If ----nnnnoooohhhhaaaannnngggg is specified, then don't block waiting on a process to
  894.           terminate.  If no process is immediately available, return an empty
  895.           list.  If ----uuuunnnnttttrrrraaaacccceeeedddd is specified then the status of child processes
  896.           that are stopped, and whose status has not yet been reported since
  897.           they stopped, are also returned.  If ----ppppggggrrrroooouuuupppp is specfied and _p_i_d is
  898.           not specified, then wait on any child process whose process groupd
  899.           ID is they same as the calling process. If _p_i_d is specified with
  900.           ----ppppggggrrrroooouuuupppp, then it is take as a process group ID, waiting on any
  901.           process in that process group to terminate.
  902.  
  903.           WWWWaaaaiiiitttt returns a list containing three elements: The first element is
  904.           the process id of the process that terminated.  If the process
  905.           exited normally, the second element is `EXIT', and the third
  906.           contains the numeric exit code.  If the process terminated due to a
  907.           signal, the second element is `SIG', and the third contains the
  908.           signal name.  If the process is currently stopped (on systems that
  909.           support SIGSTP), the second element is `STOP', followed by the
  910.           signal name.
  911.  
  912.           Note that it is possible to wait on processes to terminate that were
  913.           create in the background with the eeeexxxxeeeecccc command.  However, if any
  914.           other eeeexxxxeeeecccc command is executed after the process terminates, then
  915.           the process status will be reaped by the eeeexxxxeeeecccc command and will not
  916.           be available to the wwwwaaaaiiiitttt command.
  917.  
  918.  
  919.  
  920.  
  921.                                                                        PPPPaaaaggggeeee 11114444
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  929.  
  930.  
  931.  
  932. FFFFIIIILLLLEEEE CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  933.      These commands provide extended file access and manipulation.  This
  934.      includes searching ASCII-sorted data files, copying files, duplicating
  935.      file descriptors, control of file access options, retrieving open file
  936.      status, and creating pipes with the ppppiiiippppeeee system call.  Also linking and
  937.      unlinking files, setting file, process, and user attributes and
  938.      truncating files.  An interface to the sssseeeelllleeeecccctttt system call is available on
  939.      Unix systems that support it.
  940.  
  941.      It should be noted that Tcl file I/O is implemented on top of the stdio
  942.      library.  By default, the file is buffered.  When communicating to a
  943.      process through a pipe, a fffflllluuuusssshhhh command should be issued to force the
  944.      data out.  Alternatively, the ffffccccnnnnttttllll command may be used to set the
  945.      buffering mode of a file to line-buffered or unbuffered.
  946.  
  947.      bbbbsssseeeeaaaarrrrcccchhhh _f_i_l_e_I_d _k_e_y ?_r_e_t_v_a_r? ?_c_o_m_p_a_r_e__p_r_o_c?
  948.           Search an opened file _f_i_l_e_I_d containing lines of text sorted into
  949.           ascending order for a match.  _K_e_y contains the string to match.  If
  950.           _r_e_t_v_a_r is specified, then the line from the file is returned in
  951.           _r_e_t_v_a_r, and the command returns 1111 if _k_e_y was found, and 0000 if it
  952.           wasn't.  If _r_e_t_v_a_r is not specified or is a null name, then the
  953.           command returns the line that was found, or an empty string if _k_e_y
  954.           wasn't found.
  955.  
  956.           By default, the key is matched against the first white-space
  957.           separated field in each line.  The field is treated as an ASCII
  958.           string.  If _c_o_m_p_a_r_e__p_r_o_c is specified, then it defines the name of a
  959.           Tcl procedure to evaluate against each line read from the sorted
  960.           file during the execution of the bbbbsssseeeeaaaarrrrcccchhhh command.  _C_o_m_p_a_r_e__p_r_o_c
  961.           takes two arguments, the key and a line extracted from the file.
  962.           The compare routine should return a number less than zero if the key
  963.           is less than the line, zero if the key matches the line, or greater
  964.           than zero if the key is greater than the line.  The file must be
  965.           sorted in ascending order according to the same criteria
  966.           _c_o_m_p_a_r_e__p_r_o_c uses to compare the key with the line, or errouenous
  967.           results will occur.
  968.  
  969.      ccccooooppppyyyyffffiiiilllleeee ?----bbbbyyyytttteeeessss _n_u_m|----mmmmaaaaxxxxbbbbyyyytttteeeessss _n_u_m? _f_r_o_m_F_i_l_e_I_d _t_o_F_i_l_e_I_d
  970.           Copies the rest of the file specified by _f_r_o_m_F_i_l_e_I_d, starting from
  971.           its current position, to the file specified by _t_o_F_i_l_e_I_d, starting
  972.           from its current position.
  973.  
  974.           If ----bbbbyyyytttteeeessss is specified, then _n_u_m bytes are copied.  If less than _n_u_m
  975.           bytes are available, an error is returned.  If ----mmmmaaaaxxxxbbbbyyyytttteeeessss is
  976.           specified, then _n_u_m bytes are copied but no error is returned if
  977.           less are available.
  978.  
  979.           The command returns the number of bytes that were copied.
  980.  
  981.           The ----bbbbyyyytttteeeessss option is particularly useful for mixing binary data in
  982.           with ASCII commands or data in a data stream.
  983.  
  984.  
  985.  
  986.  
  987.                                                                        PPPPaaaaggggeeee 11115555
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  995.  
  996.  
  997.  
  998.      cccchhhhmmmmoooodddd [----ffffiiiilllleeeeiiiidddd] _m_o_d_e _f_i_l_e_l_i_s_t
  999.           Set permissions of each of the files in the list _f_i_l_e_l_i_s_t to _m_o_d_e,
  1000.           where _m_o_d_e is an absolute numeric mode or symbolic permissions as in
  1001.           the UNIX cccchhhhmmmmoooodddd((((1111)))) command.  To specify a mode as octal, it should be
  1002.           prefixed with a "0" (e.g. 0622).
  1003.  
  1004.           If the option ----ffffiiiilllleeeeiiiidddd is specified, _f_i_l_e_l_i_s_t is a list of open file
  1005.           identifiers rather than a list of file names.  This option is not
  1006.           available on all Unix systems.  Use the iiiinnnnffffooooxxxx hhhhaaaavvvveeee____ffffcccchhhhmmmmoooodddd command to
  1007.           determine if this functionallity is available.
  1008.  
  1009.      cccchhhhoooowwwwnnnn [----ffffiiiilllleeeeiiiidddd] _o_w_n_e_r|{_o_w_n_e_r _g_r_o_u_p} _f_i_l_e_l_i_s_t
  1010.           Set owner of each file in the list _f_i_l_e_l_i_s_t to _o_w_n_e_r, which can be a
  1011.           user name or numeric user id.  If the first parameter is a list,
  1012.           then the owner is set to the first element of the list and the group
  1013.           is set to the second element.  _G_r_o_u_p can be a group name or numeric
  1014.           group id.  If _g_r_o_u_p is {}, then the file group will be set to the
  1015.           login group of the specified user.
  1016.  
  1017.           If the option ----ffffiiiilllleeeeiiiidddd is specified, _f_i_l_e_l_i_s_t is a list of open file
  1018.           identifiers rather than a list of file names.  This option is not
  1019.           available on all Unix systems.  Use the iiiinnnnffffooooxxxx hhhhaaaavvvveeee____ffffcccchhhhoooowwwwnnnn command to
  1020.           determine if this functionallity is available.
  1021.  
  1022.      cccchhhhggggrrrrpppp [----ffffiiiilllleeeeiiiidddd] _g_r_o_u_p _f_i_l_e_l_i_s_t
  1023.           Set the group id of each file in the list _f_i_l_e_l_i_s_t to _g_r_o_u_p, which
  1024.           can be either a group name or a numeric group id.
  1025.  
  1026.           If the option ----ffffiiiilllleeeeiiiidddd is specified, _f_i_l_e_l_i_s_t is a list of open file
  1027.           identifiers rather than a list of file names.  This option is not
  1028.           available on all Unix systems.  Use the iiiinnnnffffooooxxxx hhhhaaaavvvveeee____ffffcccchhhhoooowwwwnnnn command to
  1029.           determine if this functionallity is available.
  1030.  
  1031.      dddduuuupppp _f_i_l_e_I_d ?_t_a_r_g_e_t_F_i_l_e_I_d?
  1032.           Duplicate an open file.  A new file id is opened that addresses the
  1033.           same file as _f_i_l_e_I_d.
  1034.  
  1035.           If _t_a_r_g_e_t_F_i_l_e_I_d is specified, the the file is dup to this specified
  1036.           file id.  Normally this is ssssttttddddiiiinnnn, ssssttttddddoooouuuutttt, or ssssttttddddeeeerrrrrrrr.  The dup
  1037.           command will handle flushing output and closing this file.  The new
  1038.           file will be buffered, if its needs to be unbuffered, use the ffffccccnnnnttttllll
  1039.           command to set it unbuffered.
  1040.  
  1041.           If _f_i_l_e_I_d is a number rather than a Tcl file id, then the dddduuuupppp
  1042.           command will bind that file to a Tcl file id.  This is usedful for
  1043.           accessing files that are passed from the parent process.  The
  1044.           argument ?_t_a_r_g_e_t_F_i_l_e_I_d? is not valid with this operation.
  1045.  
  1046.      ffffccccnnnnttttllll _f_i_l_e_I_d _a_t_t_r_i_b_u_t_e ?_v_a_l_u_e?
  1047.           This command either sets or clears a file option or returns its
  1048.           current value.  If _v_a_l_u_e are not specified, then the current value
  1049.           of aaaattttttttrrrriiiibbbbuuuutttteeee is returned. The following attributes may be specified:
  1050.  
  1051.  
  1052.  
  1053.                                                                        PPPPaaaaggggeeee 11116666
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1061.  
  1062.  
  1063.  
  1064.           RRRRDDDDOOOONNNNLLLLYYYY - The file is opened for reading only. (Get only)
  1065.  
  1066.           WWWWRRRROOOONNNNLLLLYYYY - The file is opened for writing only.  (Get only)
  1067.  
  1068.           RRRRDDDDWWWWRRRR - The file is opened for reading and writing.  (Get only)
  1069.  
  1070.           RRRREEEEAAAADDDD - If the file is readable. (Get only).
  1071.  
  1072.           WWWWRRRRIIIITTTTEEEE - If the file is writable. (Get only).
  1073.  
  1074.           AAAAPPPPPPPPEEEENNNNDDDD - The file is opened for append-only writes.  All writes will
  1075.           be forced to the end of the file.
  1076.  
  1077.           NNNNOOOONNNNBBBBLLLLOOOOCCCCKKKK - The file is to be accessed with non-blocking I/O.  See
  1078.           the rrrreeeeaaaadddd system call for a description of how it affects the
  1079.           behavior of file reads.
  1080.  
  1081.           CCCCLLLLOOOOEEEEXXXXEEEECCCC - Close the file on an process exec.  If the eeeexxxxeeeeccccllll command
  1082.           or some other mechanism causes the process to do an exec, the file
  1083.           will be closed if this option is set.
  1084.  
  1085.           NNNNOOOOBBBBUUUUFFFF - The file is not buffered. If set, then there no stdio
  1086.           buffering for the file.
  1087.  
  1088.           LLLLIIIINNNNEEEEBBBBUUUUFFFF - Output the file will be line buffered. The buffer will be
  1089.           flushed when a newline is written, when the buffer is full, or when
  1090.           input is requested.
  1091.  
  1092.           The AAAAPPPPPPPPEEEENNNNDDDD, NNNNOOOONNNNBBBBLLLLOOOOCCCCKKKK, and CCCCLLLLOOOOEEEEXXXXEEEECCCC attributes may be set or cleared
  1093.           by specifying the attribute name and a value 1111 to set the attribute
  1094.           and 0000 to clear it.
  1095.  
  1096.           The NNNNOOOOBBBBUUUUFFFF and LLLLIIIINNNNEEEEBBBBUUUUFFFF attributes may only be set (a value of 1111) and
  1097.           only one of the options may be selected.  Once set, it may not be
  1098.           changed.  These options should be set before any I/O operations have
  1099.           been done on the file or data may be lost.
  1100.  
  1101.      fffflllloooocccckkkk _o_p_t_i_o_n_s _f_i_l_e_I_d ?_s_t_a_r_t? ?_l_e_n_g_t_h? ?_o_r_i_g_i_n?
  1102.           This command places a lock on all or part of the file specified by
  1103.           _f_i_l_e_I_d.  The lock is either advisory or mandatory, depending on the
  1104.           mode bits of the file.  The lock is placed beginning at relative
  1105.           byte offset _s_t_a_r_t for _l_e_n_g_t_h bytes.  If _s_t_a_r_t or _l_e_n_g_t_h is omitted
  1106.           or empty, zero is assumed.  If _l_e_n_g_t_h is zero, then the lock always
  1107.           extents to end of file, even if the file grows.  If _o_r_i_g_i_n is
  1108.           "ssssttttaaaarrrrtttt", then the offset is relative to the beginning of the file.
  1109.           If it is "ccccuuuurrrrrrrreeeennnntttt", it is relative to the current access position in
  1110.           the file.  If it is "eeeennnndddd", then it is relative to the end-of-file (a
  1111.           negative is before the EOF, positive is after).  If _o_r_i_g_i_n is
  1112.           omitted, ssssttttaaaarrrrtttt is assumed.
  1113.  
  1114.           The following _o_p_t_i_o_n_s are recognized:
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                                                                        PPPPaaaaggggeeee 11117777
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1127.  
  1128.  
  1129.  
  1130.           ----rrrreeeeaaaadddd - Place a read lock on the file.  Multiple processes may be
  1131.           accessing the file with read-locks.
  1132.  
  1133.           ----wwwwrrrriiiitttteeee - Place a write lock on the file.  Only one process may be
  1134.           accessing a file if there is a write lock.
  1135.  
  1136.           ----nnnnoooowwwwaaaaiiiitttt - If specified, then the process will not block if the lock
  1137.           can not be obtained.  With this option, the command returns 1 if the
  1138.           lock is obtained and 0 if it is not.
  1139.  
  1140.           See your system's ffffccccnnnnttttllll system call documentation for full details
  1141.           of the behavior of file locking.  If locking is being done on ranges
  1142.           of a file, it is best to use unbuffered file access (see the ffffccccnnnnttttllll
  1143.           command).
  1144.  
  1145.      ffffoooorrrr____ffffiiiilllleeee _v_a_r _f_i_l_e_n_a_m_e { _c_o_d_e }
  1146.           This procedure implements a loop over the contents of a file.  For
  1147.           each line in _f_i_l_e_n_a_m_e, it sets _v_a_r to the line and executes _c_o_d_e.
  1148.  
  1149.           The bbbbrrrreeeeaaaakkkk and ccccoooonnnnttttiiiinnnnuuuueeee commands work as with foreach.
  1150.  
  1151.           For example, the command
  1152.  
  1153.                ffffoooorrrr____ffffiiiilllleeee lllliiiinnnneeee ////eeeettttcccc////ppppaaaasssssssswwwwdddd {{{{eeeecccchhhhoooo $$$$lllliiiinnnneeee}}}}
  1154.  
  1155.           would echo all the lines in the password file.
  1156.  
  1157.      ffffuuuunnnnlllloooocccckkkk _f_i_l_e_I_d ?_s_t_a_r_t? ?_l_e_n_g_t_h? ?_o_r_i_g_i_n?
  1158.           Remove a locked from a file that was previously placed with the
  1159.           _f_l_o_c_k command.  The arguments are the same as for the _f_l_o_c_k command,
  1160.           see that command for more details.
  1161.  
  1162.      ffffssssttttaaaatttt _f_i_l_e_I_d ?_i_t_e_m?|?ssssttttaaaatttt _a_r_r_a_y_v_a_r?
  1163.           Obtain status information about an open file.
  1164.  
  1165.           The following keys are used to identify data items:
  1166.  
  1167.           o aaaattttiiiimmmmeeee - The time of last access.
  1168.  
  1169.           o ccccttttiiiimmmmeeee - The time of last file status change
  1170.  
  1171.           o ddddeeeevvvv - The device containing a directory for the file.  This value
  1172.           uniquely identifies the file system that contains the file.
  1173.  
  1174.           o ggggiiiidddd - The group ID of the file's group.
  1175.  
  1176.           o iiiinnnnoooo - The inode number.  This field uniquely identifies the file
  1177.           in a given file system.
  1178.  
  1179.           o mmmmooooddddeeee - The mode of the file (see the mmmmkkkknnnnoooodddd system call).
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.                                                                        PPPPaaaaggggeeee 11118888
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1193.  
  1194.  
  1195.  
  1196.           o mmmmttttiiiimmmmeeee - Time when the data in the file was last modified.
  1197.  
  1198.           o nnnnlllliiiinnnnkkkk - The number of links to the file.
  1199.  
  1200.           o ssssiiiizzzzeeee - The file size in bytes.
  1201.  
  1202.           o ttttttttyyyy - If the file is associated with a terminal, then 1 otherwise
  1203.           0.
  1204.  
  1205.           o ttttyyyyppppeeee - The type of the file in symbolic form, which is one of the
  1206.           following values: ffffiiiilllleeee, ddddiiiirrrreeeeccccttttoooorrrryyyy, cccchhhhaaaarrrraaaacccctttteeeerrrrSSSSppppeeeecccciiiiaaaallll, bbbblllloooocccckkkkSSSSppppeeeecccciiiiaaaallll,
  1207.           ffffiiiiffffoooo, lllliiiinnnnkkkk, or ssssoooocccckkkkeeeetttt.
  1208.  
  1209.           o uuuuiiiidddd - The user ID of the file's owner.
  1210.  
  1211.           If one of these keys is specified as _i_t_e_m, then that data item is
  1212.           returned.
  1213.  
  1214.           If ssssttttaaaatttt _a_r_r_a_y_v_a_r is specified, then the information is returned in
  1215.           the array _a_r_r_r_a_y_v_a_r.  Each of the above keys indexes an element of
  1216.           the array containing the data.
  1217.  
  1218.           If only _f_i_l_e_I_d is specified, the command returns the data as a keyed
  1219.           list.
  1220.  
  1221.           The following values may be returned only if explicitly asked for,
  1222.           it will not be returned with the array or keyed list forms:
  1223.  
  1224.           o rrrreeeemmmmooootttteeeehhhhoooosssstttt - If _f_i_l_e_I_d is a TCP/IP socket connection, then a list
  1225.           is returned with the first element being the remote host IP address.
  1226.           If the remote host name can be found, it is returned as the second
  1227.           element of the list.  The remote host IP port number is returned as
  1228.           the this element.
  1229.  
  1230.           o llllooooccccaaaallllhhhhoooosssstttt - If _f_i_l_e_I_d is a TCP/IP socket connection, then a list
  1231.           is returned with the first element being the local host IP address.
  1232.           If the local host name can be found, it is returned as the second
  1233.           element of the list.  The local host IP port number is returned as
  1234.           the this element.
  1235.  
  1236.      ffffttttrrrruuuunnnnccccaaaatttteeee [----ffffiiiilllleeeeiiiidddd] _f_i_l_e _n_e_w_s_i_z_e
  1237.           Truncate a file to have a length of at most _n_e_w_s_i_z_e bytes.
  1238.  
  1239.           If the option ----ffffiiiilllleeeeiiiidddd is specified, _f_i_l_e is an open file identifier,
  1240.           otherwise it is a file path.
  1241.  
  1242.           This command is not available on all systems if the underlying
  1243.           operating system support is not available.  The command iiiinnnnffffooooxxxx
  1244.           hhhhaaaavvvveeee____ttttrrrruuuunnnnccccaaaatttteeee will indicate if this command is available.  On some
  1245.           systems, the ----ffffiiiilllleeeeiiiidddd option is not available,  check the result of
  1246.           iiiinnnnffffooooxxxx hhhhaaaavvvveeee____ffffttttrrrruuuunnnnccccaaaatttteeee to see if it can be used.
  1247.  
  1248.  
  1249.  
  1250.  
  1251.                                                                        PPPPaaaaggggeeee 11119999
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1259.  
  1260.  
  1261.  
  1262.      llllggggeeeettttssss _f_i_l_e_I_d ?_v_a_r_N_a_m_e?
  1263.           Reads the next Tcl list from the file given by _f_i_l_e_I_d and discards
  1264.           the terminating newline character.  This command differs from the
  1265.           ggggeeeettttssss command, in that it reads Tcl lists rather than lines.  If the
  1266.           list contains a newline, then that newline will be returned as part
  1267.           of the result.  Only a newline not quoted as part of the list
  1268.           indicates the end of the list.  There is no corresponding command
  1269.           for outputing lists, as ppppuuuuttttssss will do this correctly.  If _v_a_r_N_a_m_e is
  1270.           specified, then the line is placed in the variable by that name and
  1271.           the return value is a count of the number of characters read (not
  1272.           including the newline).  If the end of the file is reached before
  1273.           reading any characters then -1 is returned and _v_a_r_N_a_m_e is set to an
  1274.           empty string.  If _v_a_r_N_a_m_e is not specified then the return value
  1275.           will be the line (minus the newline character) or an empty string if
  1276.           the end of the file is reached before reading any characters.  An
  1277.           empty string will also be returned if a line contains no characters
  1278.           except the newline, so eeeeooooffff may have to be used to determine what
  1279.           really happened.
  1280.  
  1281.      ffffrrrreeeennnnaaaammmmeeee _o_l_d_P_a_t_h _n_e_w_P_a_t_h
  1282.           Renames _o_l_d_P_a_t_h to _n_e_w_P_a_t_h.  This command does not support renaming
  1283.           across file systems.
  1284.  
  1285.      ppppiiiippppeeee ?_f_i_l_e_I_d__v_a_r__r _f_i_l_e_I_d__v_a_r__w?
  1286.           Create a pipe.  If _f_i_l_e_I_d__v_a_r__r and _f_i_l_e_I_d__v_a_r__r are specified, then
  1287.           ppppiiiippppeeee will set the a variable named _f_i_l_e_I_d__v_a_r__r to contain the
  1288.           fileId of the side of the pipe that was opened for reading, and
  1289.           _f_i_l_e_I_d__v_a_r__w will contain the fileId of the side of the pipe that
  1290.           was opened for writing.
  1291.  
  1292.           If the fileId variables are not specified, then a list containing
  1293.           the read and write fileIdw is returned as the result of the command.
  1294.  
  1295.      rrrreeeeaaaadddd____ffffiiiilllleeee ?----nnnnoooonnnneeeewwwwlllliiiinnnneeee? _f_i_l_e_N_a_m_e
  1296.           rrrreeeeaaaadddd____ffffiiiilllleeee _f_i_l_e_N_a_m_e _n_u_m_B_y_t_e_s
  1297.           This proecure reads the file _f_i_l_e_N_a_m_e and returns the contents as a
  1298.           string.  If ----nnnnoooonnnneeeewwwwlllliiiinnnneeee is specified, then the last character of the
  1299.           file is discarded if it is a newline.  The second form specifies
  1300.           exactly how many bytes will be read and returned, unless there are
  1301.           fewer than _n_u_m_B_y_t_e_s bytes left in the file; in this case, all the
  1302.           remaining bytes are returned.
  1303.  
  1304.      sssseeeelllleeeecccctttt _r_e_a_d_f_i_l_e_I_d_s ?_w_r_i_t_e_f_i_l_e_I_d_s? ?_e_x_c_e_p_t_f_i_l_e_I_d_s? ?_t_i_m_e_o_u_t?
  1305.           This command allows an Extended Tcl program to wait on zero or more
  1306.           files being ready for for reading, writing, have an exceptional
  1307.           condition pending, or for a timeout period to expire.  _r_e_a_d_F_i_l_e_I_d_s,
  1308.           _w_r_i_t_e_F_i_l_e_I_d_s, _e_x_c_e_p_t_F_i_l_e_I_d_s are each lists of fileIds, as returned
  1309.           from ooooppppeeeennnn, to query.  An empty list ({}) may be specified if a
  1310.           category is not used.
  1311.  
  1312.           The files specified by the _r_e_a_d_F_i_l_e_I_d_s list are checked to see if
  1313.           data is available for reading. The _w_r_i_t_e_F_i_l_e_I_d_s are checked if the
  1314.  
  1315.  
  1316.  
  1317.                                                                        PPPPaaaaggggeeee 22220000
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1325.  
  1326.  
  1327.  
  1328.           specified files are clear for writing.  The _e_x_c_e_p_t_F_i_l_e_I_d_s are
  1329.           checked to see if an exceptional condition has occured (typically,
  1330.           an error).  The write and exception checking is most useful on
  1331.           devices, however, the read checking is very useful when
  1332.           communicating with multiple processes through pipes.  Select
  1333.           considers data pending in the stdio input buffer for read files as
  1334.           being ready for reading, the files do.  not have to be unbuffered.
  1335.  
  1336.           _T_i_m_e_o_u_t is a floating point timeout value, in seconds.  If an empty
  1337.           list is supplied (or the parameter is omitted), then no timeout is
  1338.           set.  If the value is zero, then the sssseeeelllleeeecccctttt command functions as a
  1339.           poll of the files, returning immediately even if none are ready.
  1340.  
  1341.           If the _t_i_m_e_o_u_t period expires with none of the files becomming
  1342.           ready, then the command returns an empty list.  Otherwise the
  1343.           command returns a list of three elements, each of those elements is
  1344.           a list of the fileIds that are ready in the read, write and
  1345.           exception classes.  If none are ready in a class, then that element
  1346.           will be the null list.  For example:
  1347.  
  1348.                   select {file3 file4 file5} {file6 file7} {} 10.5
  1349.  
  1350.           could return
  1351.  
  1352.                   {file3 file4} {file6} {}
  1353.  
  1354.           or perhaps
  1355.  
  1356.                   file3 {} {}
  1357.  
  1358.  
  1359.      wwwwrrrriiiitttteeee____ffffiiiilllleeee _f_i_l_e_N_a_m_e _s_t_r_i_n_g ?_s_t_r_i_n_g...?
  1360.           This procedure writes the specified strings to the named file.
  1361.  
  1362. TTTTCCCCPPPP////IIIIPPPP SSSSEEEERRRRVVVVEEEERRRR AAAACCCCCCCCEEEESSSSSSSS
  1363.      Commands are provided to access TCP/IP-based servers, and to create them.
  1364.      It is easy to build servers using Extended Tcl that run under iiiinnnneeeettttdddd, or
  1365.      even servers that run standalone and accept and manage multiple
  1366.      simultaneous connections.  The socket file handles maybe be read using
  1367.      the either the ggggeeeettttssss or rrrreeeeaaaadddd command and written using either the ppppuuuuttttssss or
  1368.      sssseeeerrrrvvvveeeerrrr____sssseeeennnndddd command.
  1369.  
  1370.      The ffffssssttttaaaatttt rrrreeeemmmmooootttteeeehhhhoooosssstttt and ffffssssttttaaaatttt llllooooccccaaaallllhhhhoooosssstttt requests are useful both for
  1371.      clients and servers.  To obtain the host name of the system the script is
  1372.      running on, use iiiidddd hhhhoooosssstttt.
  1373.  
  1374.      If a TclX script is setup to run under iiiinnnneeeettttdddd, it is launched with its
  1375.      stdin, stdout and stderr associated with the client socket.  The standard
  1376.      Tcl file ids ssssttttddddiiiinnnn, ssssttttddddoooouuuutttt and ssssttttddddeeeerrrrrrrr maybe then be used to communicate
  1377.      with the client.
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.                                                                        PPPPaaaaggggeeee 22221111
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1391.  
  1392.  
  1393.  
  1394.      sssseeeerrrrvvvveeeerrrr____ccccoooonnnnnnnneeeecccctttt ?_o_p_t_i_o_n_s? _h_o_s_t _s_e_r_v_i_c_e
  1395.           Open a TCP/IP connection to a server of _h_o_s_t on the port specified
  1396.           by _s_e_r_v_i_c_e.  The server is then accessed using the standard Tcl file
  1397.           I/O commands.  _H_o_s_t may be a host name or an IP address.  _P_o_r_t may
  1398.           be a port number of a service name.
  1399.  
  1400.           If a destination host name is supplied and more that one address is
  1401.           valid for the host, the host's addresses will be tried in the order
  1402.           returned until one can be connected to, or the list is exhausted.
  1403.           You may also use the sssseeeerrrrvvvveeeerrrr____iiiinnnnffffoooo command to obtain the list of valid
  1404.           address.
  1405.  
  1406.           The options are:
  1407.  
  1408.           o ----bbbbuuuuffff - Specifies that the file is buffered.  When writing to the
  1409.           file, the fffflllluuuusssshhhh command must be used to force data in the buffer to
  1410.           be sent to the server.  Buffered access will result in significantly
  1411.           better performance when reading data, and will also improve the
  1412.           performance of a series of writes done without intervening reads.
  1413.           The buffering is only used when accessing the file via the ggggeeeettttssss,
  1414.           rrrreeeeaaaadddd, and ppppuuuuttttssss commands. The sssseeeerrrrvvvveeeerrrr____sssseeeennnndddd command does not use the
  1415.           buffer.
  1416.  
  1417.           o ----nnnnoooobbbbuuuuffff - The file is unbuffered. A single file id, open for both
  1418.           reading and writing, is returned.
  1419.  
  1420.           o ----ttttwwwwooooiiiiddddssss - Return a pair of file ids in a list.  The first id is
  1421.           open for read access, the second for write access.  The cccclllloooosssseeee
  1422.           command must be called against both file ids when you are done using
  1423.           the socket and they maybe closed independently.  This option is
  1424.           primarily intended to implement compatibility procedures for
  1425.           deprecated commands, however it maybe useful for code that needs to
  1426.           independently manage the read and write ends of the socket.
  1427.  
  1428.           o ----mmmmyyyyiiiipppp _i_p_N_u_m_b_e_r - Define the IP number for your side of the
  1429.           connection.  This is useful for multi-homed hosts (hosts with more
  1430.           than one IP address).  Note that only IP addresses corresponding to
  1431.           network interfaces on your machine may be used. If ----mmmmyyyyiiiipppp is not
  1432.           specified, the operating system will assign the IP number for you.
  1433.  
  1434.           o ----mmmmyyyyppppoooorrrrtttt _p_o_r_t_N_u_m_b_e_r - Define the port number for your side of the
  1435.           connection.  If the port number is already in use, an error will be
  1436.           returned.  If the port number is in the privileged range, the Tcl
  1437.           program will have to be running as superuser, or an error will be
  1438.           returned.
  1439.  
  1440.      sssseeeerrrrvvvveeeerrrr____ccccrrrreeeeaaaatttteeee ?_o_p_t_i_o_n_s?
  1441.           Creates a TCP/IP server socket on the local machine.  A file handle
  1442.           is returned upon successful creation.  When a connection request is
  1443.           made to the server, the file handle becomes read-ready.  Connections
  1444.           can be accepted using sssseeeerrrrvvvveeeerrrr____aaaacccccccceeeepppptttt.
  1445.  
  1446.  
  1447.  
  1448.  
  1449.                                                                        PPPPaaaaggggeeee 22222222
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1457.  
  1458.  
  1459.  
  1460.           The file handle can be detected as read-ready using sssseeeelllleeeecccctttt, by using
  1461.           ffffccccnnnnttttllll to make the handle nonblocking and then calling sssseeeerrrrvvvveeeerrrr____aaaacccccccceeeepppptttt,
  1462.           or by using the TTTTkkkk ffffiiiilllleeeeeeeevvvveeeennnntttt command.
  1463.  
  1464.           Options are:
  1465.  
  1466.           o ----mmmmyyyyiiiipppp _i_p_N_u_m_b_e_r - Define the IP number for your side of the
  1467.           connection.  This is useful for multi-homed hosts (hosts with more
  1468.           than one IP address).  Note that only IP addresses corresponding to
  1469.           network interfaces on your machine may be used. If ----mmmmyyyyiiiipppp is not
  1470.           specified, the operating system will assign the IP number for you.
  1471.  
  1472.           o ----mmmmyyyyppppoooorrrrtttt _p_o_r_t_N_u_m_b_e_r - Define the port number for your side of the
  1473.           connection.  If the port number is already in use, an error will be
  1474.           returned.  If the port number is in the privileged range, the Tcl
  1475.           program will have to be running as superuser, or an error will be
  1476.           returned.
  1477.  
  1478.           o ----bbbbaaaacccckkkklllloooogggg _c_o_u_n_t - Maximum length the queue of pending connections
  1479.           may grow to.  If a connection request arrives with the queue full,
  1480.           the client may receive an error with an indication of _E_C_O_N_N_R_E_F_U_S_E_D,
  1481.           or, if the underlying protocol supports retransmission, the request
  1482.           may be ignored so that retries may succeed.  Note that on at least
  1483.           some BSD-based systems the backlog is silently limited to 5,
  1484.           regardless of the value specified.  The default is 5.
  1485.  
  1486.  
  1487.      sssseeeerrrrvvvveeeerrrr____aaaacccccccceeeepppptttt ?_o_p_t_i_o_n_s? _f_i_l_e_i_d
  1488.           Accept a TCP/IP connection to the server socket associated with
  1489.           _f_i_l_e_i_d.  Options are ----bbbbuuuuffff, ----nnnnoooobbbbuuuuffff and ----ttttwwwwooooiiiiddddssss.  See the
  1490.           sssseeeerrrrvvvveeeerrrr____ccccoooonnnnnnnneeeecccctttt command for a description of these options.  A file
  1491.           handle (or a pair of file handles when ----ttttwwwwooooiiiiddddssss) is return.
  1492.  
  1493.      sssseeeerrrrvvvveeeerrrr____iiiinnnnffffoooo aaaaddddddddrrrreeeesssssssseeeessss _h_o_s_t
  1494.           sssseeeerrrrvvvveeeerrrr____iiiinnnnffffoooo ooooffffffffiiiicccciiiiaaaallll____nnnnaaaammmmeeee _h_o_s_t
  1495.           sssseeeerrrrvvvveeeerrrr____iiiinnnnffffoooo aaaalllliiiiaaaasssseeeessss _h_o_s_t
  1496.           Optain information about a TCP/IP server. The argument hhhhoooosssstttt can be
  1497.           either a host name or an IP address.
  1498.  
  1499.           The following subcommands are recognized:
  1500.  
  1501.           o aaaaddddddddrrrreeeesssssssseeeessss - Return the list of IP addresses for _h_o_s_t.
  1502.  
  1503.           o ooooffffffffiiiicccciiiiaaaallll____nnnnaaaammmmeeee - Return official name for _h_o_s_t.
  1504.  
  1505.           o aaaalllliiiiaaaasssseeeessss - Return the list of aliases for _h_o_s_t.  (Note that these
  1506.           are IP number aliases, not DNS _C_N_A_M_E aliases. See _i_f_c_o_n_f_i_g(_2).)
  1507.  
  1508.      sssseeeerrrrvvvveeeerrrr____sssseeeennnndddd ?_o_p_t_i_o_n_s? _f_i_l_e_i_d _s_t_r_i_n_g
  1509.           Send the specified string to the TCP/IP connection corresponding to
  1510.           _f_i_l_e_i_d.  Thesssseeeerrrrvvvveeeerrrr____sssseeeennnndddd command is provide as an option to ppppuuuuttttssss for
  1511.           writing to a socket as it is better at detecting lost connections
  1512.  
  1513.  
  1514.  
  1515.                                                                        PPPPaaaaggggeeee 22223333
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1523.  
  1524.  
  1525.  
  1526.           and other IP-related error conditions.  File buffering is ignored
  1527.           for sssseeeerrrrvvvveeeerrrr____sssseeeennnndddd. There is no need to fffflllluuuusssshhhh after a sssseeeerrrrvvvveeeerrrr____sssseeeennnndddd.  The
  1528.           results of mixing sssseeeerrrrvvvveeeerrrr____sssseeeennnndddd with ppppuuuuttttssss without flushing the ppppuuuuttttssss
  1529.           output is indeterminate.
  1530.  
  1531.           Options are:
  1532.  
  1533.           o ----nnnnoooonnnneeeewwwwlllliiiinnnneeee - Don't append a newline character to the end of the
  1534.           message.  The default is to append a newline character.
  1535.  
  1536.           o ----ddddoooonnnnttttrrrroooouuuutttteeee - Requests that routing be bypassed and the direct
  1537.           interface used (usually used only by diagnostic or routing programs)
  1538.  
  1539.           o ----oooouuuuttttooooffffbbbbaaaannnndddd - Send out-of-band data on the socket.
  1540.  
  1541. FFFFIIIILLLLEEEE SSSSCCCCAAAANNNNNNNNIIIINNNNGGGG CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  1542.      These commands provide a facility to scan files, matching lines of the
  1543.      file against regular expressions and executing Tcl code on a match.  With
  1544.      this facility you can use Tcl to do the sort of file processing that is
  1545.      traditionally done with _a_w_k.  And since Tcl's approach is more
  1546.      declarative, some of the scripts that can be rather difficult to write in
  1547.      awk are simple to code in Tcl.
  1548.  
  1549.      File scanning in Tcl centers around the concept of a _s_c_a_n _c_o_n_t_e_x_t.  A
  1550.      scan context contains one or more match statements, which associate
  1551.      regular expressions to scan for with Tcl code to be executed when the
  1552.      expressions are matched.
  1553.  
  1554.      ssssccccaaaannnnccccoooonnnntttteeeexxxxtttt ?_o_p_t_i_o_n?
  1555.           This command manages file scan contexts.  A scan context is a
  1556.           collection of regular expressions and commands to execute when that
  1557.           regular expression matches a line of the file.  A context may also
  1558.           have a single default match, to be applied against lines that do not
  1559.           match any of the regular expressions.  Multiple scan contexts may be
  1560.           defined and they may be reused on multiple files.  A scan context is
  1561.           identified by a context handle.  The ssssccccaaaannnnccccoooonnnntttteeeexxxxtttt command takes the
  1562.           following forms:
  1563.  
  1564.      ssssccccaaaannnnccccoooonnnntttteeeexxxxtttt ccccrrrreeeeaaaatttteeee
  1565.           Create a new scan context.  The ssssccccaaaannnnmmmmaaaattttcccchhhh command is used to define
  1566.           patterns in the context.  A contexthandle is returned, which the Tcl
  1567.           programmer uses to refer to the newly created scan context in calls
  1568.           to the Tcl file scanning commands.
  1569.  
  1570.      ssssccccaaaannnnccccoooonnnntttteeeexxxxtttt ddddeeeelllleeeetttteeee _c_o_n_t_e_x_t_h_a_n_d_l_e
  1571.           Delete the scan context identified by _c_o_n_t_e_x_t_h_a_n_d_l_e, and free all of
  1572.           the match statements and compiled regular expressions associated
  1573.           with the specified context.
  1574.  
  1575.      ssssccccaaaannnnccccoooonnnntttteeeexxxxtttt ccccooooppppyyyyffffiiiilllleeee _c_o_n_t_e_x_t_h_a_n_d_l_e ?_f_i_l_e_h_a_n_d_l_e?
  1576.           Set or return the file handle that unmatched lines are copied to.
  1577.           (See ssssccccaaaannnnffffiiiilllleeee).  If _f_i_l_e_h_a_n_d_l_e is omitted, the copy file handle is
  1578.  
  1579.  
  1580.  
  1581.                                                                        PPPPaaaaggggeeee 22224444
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1589.  
  1590.  
  1591.  
  1592.           returned.  If no copy file is associated with the context, {} is
  1593.           returned.  If a file handle is specified, it becomes the copy file
  1594.           for this context.  If _f_i_l_e_h_a_n_d_l_e is {}, then it removes any copy
  1595.           file specification for the context.
  1596.  
  1597.      ssssccccaaaannnnffffiiiilllleeee ?-_c_o_p_y_f_i_l_e _c_o_p_y_F_i_l_e_I_d? _c_o_n_t_e_x_t_h_a_n_d_l_e _f_i_l_e_I_d
  1598.           Scan the file specified by _f_i_l_e_I_d, starting from the current file
  1599.           position.  Check all patterns in the scan context specified by
  1600.           _c_o_n_t_e_x_t_h_a_n_d_l_e against it, executing the match commands corresponding
  1601.           to patterns matched.
  1602.  
  1603.           If the optional -_c_o_p_y_f_i_l_e argument is specified, the next argument
  1604.           is a file ID to which all lines not matched by any pattern
  1605.           (excluding the default pattern) are to be written.  If the copy file
  1606.           is specified with this flag, instead of using the ssssccccaaaannnnccccoooonnnntttteeeexxxxtttt
  1607.           ccccooooppppyyyyffffiiiilllleeee command, the file is disassociated from the scan context at
  1608.           the end of the scan.
  1609.  
  1610.      ssssccccaaaannnnmmmmaaaattttcccchhhh ?----nnnnooooccccaaaasssseeee? _c_o_n_t_e_x_t_h_a_n_d_l_e ?_r_e_g_e_x_p? _c_o_m_m_a_n_d_s
  1611.           Specify Tcl _c_o_m_m_a_n_d_s, to be evaluated when _r_e_g_e_x_p is matched by a
  1612.           ssssccccaaaannnnffffiiiilllleeee command.  The match is added to the scan context specified
  1613.           by _c_o_n_t_e_x_t_h_a_n_d_l_e.  Any number of match statements may be specified
  1614.           for a give context.  _R_e_g_e_x_p is a regular expression (see the rrrreeeeggggeeeexxxxpppp
  1615.           command).  If ----nnnnooooccccaaaasssseeee is specified as the first argument, the
  1616.           pattern is matched regardless of alphabetic case.
  1617.  
  1618.           If _r_e_g_e_x_p is not specified, then a default match is specified for
  1619.           the scan context.  The default match will be executed when a line of
  1620.           the file does not match any of the regular expressions in the
  1621.           current scancontext.
  1622.  
  1623.           The array mmmmaaaattttcccchhhhIIIInnnnffffoooo is available to the Tcl code that is executed
  1624.           when an expression matches (or defaults).  It contans information
  1625.           about the file being scanned and where within it the expression was
  1626.           matched.
  1627.  
  1628.           mmmmaaaattttcccchhhhIIIInnnnffffoooo is local to the top level of the match command unless
  1629.           declared global at that level by the Tcl gggglllloooobbbbaaaallll command.  If it is
  1630.           to be used as a global, it _m_u_s_t be declared global before ssssccccaaaannnnffffiiiilllleeee
  1631.           is called (since ssssccccaaaannnnffffiiiilllleeee sets the mmmmaaaattttcccchhhhIIIInnnnffffoooo before the match code
  1632.           is executed, a subsequent gggglllloooobbbbaaaallll will override the local variable).
  1633.           The following array entries are available:
  1634.  
  1635.           mmmmaaaattttcccchhhhIIIInnnnffffoooo((((lllliiiinnnneeee))))
  1636.                Contains the text of the line of the file that was matched.
  1637.  
  1638.           mmmmaaaattttcccchhhhIIIInnnnffffoooo((((ooooffffffffsssseeeetttt))))
  1639.                The byte offset into the file of the first character of the
  1640.                line that was matched.
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.                                                                        PPPPaaaaggggeeee 22225555
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1655.  
  1656.  
  1657.  
  1658.           mmmmaaaattttcccchhhhIIIInnnnffffoooo((((lllliiiinnnneeeennnnuuuummmm))))
  1659.                The line number of the line that was matched. This is relative
  1660.                to the first line scanned, which is usually, but not
  1661.                necessarily, the first line of the file.  The first line is
  1662.                line number one.
  1663.  
  1664.           mmmmaaaattttcccchhhhIIIInnnnffffoooo((((ccccoooonnnntttteeeexxxxtttt))))
  1665.                The context handle of the context that this scan is associated
  1666.                with.
  1667.  
  1668.           mmmmaaaattttcccchhhhIIIInnnnffffoooo((((hhhhaaaannnnddddlllleeee))))
  1669.                The file id (handle) of the file currently being scanned.
  1670.  
  1671.           mmmmaaaattttcccchhhhIIIInnnnffffoooo((((ccccooooppppyyyyHHHHaaaannnnddddlllleeee))))
  1672.                The file id (handle) of the file specified by the ----ccccooooppppyyyyffffiiiilllleeee
  1673.                option.  The element does not exist if ----ccccooooppppyyyyffffiiiilllleeee was not
  1674.                specified.
  1675.  
  1676.           mmmmaaaattttcccchhhhIIIInnnnffffoooo((((ssssuuuubbbbmmmmaaaattttcccchhhh0000))))
  1677.                Will contain the characters matching the first parenthesized
  1678.                subexpression.  The second will be contained in ssssuuuubbbbmmmmaaaattttcccchhhh1111, etc.
  1679.  
  1680.           mmmmaaaattttcccchhhhIIIInnnnffffoooo((((ssssuuuubbbbiiiinnnnddddeeeexxxx0000))))
  1681.                Will contain the a list of the starting and ending indices of
  1682.                the string matching the first parenthesized subexpression.  The
  1683.                second will be contained in ssssuuuubbbbiiiinnnnddddeeeexxxx1111, etc.
  1684.  
  1685.      All ssssccccaaaannnnmmmmaaaattttcccchhhh patterns that match a line will be processed in the order
  1686.      in which their specifications were added to the scan context.  The
  1687.      remainder of the ssssccccaaaannnnmmmmaaaattttcccchhhh pattern-command pairs may be skipped for a
  1688.      file line if a ccccoooonnnnttttiiiinnnnuuuueeee is executed by the Tcl code of a preceding,
  1689.      matched pattern.
  1690.  
  1691.      If a rrrreeeettttuuuurrrrnnnn is executed in the body of the match command, the ssssccccaaaannnnffffiiiilllleeee
  1692.      command currently in progress returns, with the value passed to rrrreeeettttuuuurrrrnnnn as
  1693.      its return value.
  1694.  
  1695. MMMMAAAATTTTHHHH CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  1696.      Several extended math commands commands make many additional math
  1697.      functions available in TclX.  In addition, a set of procedures provide
  1698.      command access to the math functions supported by the eeeexxxxpppprrrr command.
  1699.  
  1700.  
  1701.      The following procedures provide command interfaces to the expr math
  1702.      functions. They take the same arguments as the eeeexxxxpppprrrr functions and may
  1703.      take expressions as arguments.
  1704.  
  1705.           aaaabbbbssss         aaaaccccoooossss        aaaassssiiiinnnn       aaaattttaaaannnn2222
  1706.           aaaattttaaaannnn        cccceeeeiiiillll        ccccoooossss        ccccoooosssshhhh
  1707.           ddddoooouuuubbbblllleeee      eeeexxxxpppp         fffflllloooooooorrrr      ffffmmmmoooodddd
  1708.           hhhhyyyyppppooootttt       iiiinnnntttt         lllloooogggg11110000      lllloooogggg
  1709.           ppppoooowwww         rrrroooouuuunnnndddd       ssssiiiinnnn        ssssiiiinnnnhhhh
  1710.  
  1711.  
  1712.  
  1713.                                                                        PPPPaaaaggggeeee 22226666
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1721.  
  1722.  
  1723.  
  1724.           ssssqqqqrrrrtttt        ttttaaaannnn         ttttaaaannnnhhhh
  1725.  
  1726.      mmmmaaaaxxxx _n_u_m_1 _n_u_m_2 ?.._n_u_m_N?
  1727.  
  1728.      eeeexxxxpppprrrr mmmmaaaaxxxx((((nnnnuuuummmm1111,,,, nnnnuuuummmm2222))))
  1729.           Returns the argument that has the highest numeric value. Each
  1730.           argument may be any integer or floating point value.
  1731.  
  1732.           This functionality is also available as a math function mmmmaaaaxxxx in the
  1733.           Tcl eeeexxxxpppprrrr command.
  1734.  
  1735.      mmmmiiiinnnn _n_u_m_1 _n_u_m_2 ?.._n_u_m_N?
  1736.  
  1737.      eeeexxxxpppprrrr mmmmiiiinnnn((((nnnnuuuummmm1111,,,, nnnnuuuummmm2222))))
  1738.           Returns the argument that has the lowest numeric value.  Each
  1739.           argument may be any integer or floating point value.
  1740.  
  1741.           This functionality is also available as a math function mmmmiiiinnnn in the
  1742.           Tcl eeeexxxxpppprrrr command.
  1743.  
  1744.      rrrraaaannnnddddoooommmm _l_i_m_i_t | sssseeeeeeeedddd ?_s_e_e_d_v_a_l?
  1745.           Generate a pseudorandom integer number greater than or equal to zero
  1746.           and less than _l_i_m_i_t.  If sssseeeeeeeedddd is specified, then the command resets
  1747.           the random number generator to a starting point derived from the
  1748.           sssseeeeeeeeddddvvvvaaaallll. This allows one to reproduce pseudorandom number sequences
  1749.           for testing purposes.  If _s_e_e_d_v_a_l is omitted, then the seed is set
  1750.           to a value based on current system state and the current time,
  1751.           providing a reasonably interesting and ever-changing seed.
  1752.  
  1753. LLLLIIIISSSSTTTT MMMMAAAANNNNIIIINNNNIIIIPPPPUUUULLLLAAAATTTTIIIIOOOONNNN CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  1754.      Extended Tcl provides additional list manipulation commands and
  1755.      procedures.
  1756.  
  1757.      iiiinnnntttteeeerrrrsssseeeecccctttt _l_i_s_t_a _l_i_s_t_b
  1758.           Procedure to return the logical intersection of two lists.  The
  1759.           returned list will be sorted.
  1760.  
  1761.      iiiinnnntttteeeerrrrsssseeeecccctttt3333 _l_i_s_t_a _l_i_s_t_b
  1762.           Procedure to intersects two lists, returning a list containing three
  1763.           lists:  The first list returned is everything in _l_i_s_t_a that wasn't
  1764.           in _l_i_s_t_b.  The second list contains the intersection of the two
  1765.           lists, and the third list contains all the elements that were in
  1766.           _l_i_s_t_b but weren't in _l_i_s_t_a.  The returned lists will be sorted.
  1767.  
  1768.      llllaaaassssssssiiiiggggnnnn _l_i_s_t _v_a_r ?_v_a_r...?
  1769.           Assign successive elements of a list to specified variables.  If
  1770.           there are more variable names than fields, the remaining variables
  1771.           are set to the empty string.  If there are more elements than
  1772.           variables, a list of the unassigned elements is returned.
  1773.  
  1774.           For example,
  1775.  
  1776.  
  1777.  
  1778.  
  1779.                                                                        PPPPaaaaggggeeee 22227777
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1787.  
  1788.  
  1789.  
  1790.              lassign {dave 100 200 {Dave Foo}} name uid gid longName
  1791.  
  1792.           Assigns _n_a_m_e to ``dave'', _u_i_d to ``100'', _g_i_d to ``200'', and
  1793.           _l_o_n_g_N_a_m_e to ``Dave Foo''.
  1794.  
  1795.      lllleeeemmmmppppttttyyyy _l_i_s_t
  1796.           Determine if the specified list is empty.  If empty, 1 is returned,
  1797.           otherwise, 0 is returned.  This command is an alternative to
  1798.           comparing a list to an empty string.
  1799.  
  1800.      llllmmmmaaaattttcccchhhh ?_m_o_d_e? _l_i_s_t _p_a_t_t_e_r_n
  1801.           Search the elements of _l_i_s_t, returning a list of all elements
  1802.           matching _p_a_t_t_e_r_n.  If none match, an empty list is returned.
  1803.  
  1804.           The _m_o_d_e argument indicates how the elements of the list are to be
  1805.           matched against _p_a_t_t_e_r_n and it must have one of the following
  1806.           values:
  1807.  
  1808.           ----eeeexxxxaaaacccctttt The list element must contain exactly the same string as
  1809.           _p_a_t_t_e_r_n.
  1810.  
  1811.           ----gggglllloooobbbb _P_a_t_t_e_r_n is a glob-style pattern which is matched against each
  1812.           list element using the same rules as the ssssttttrrrriiiinnnngggg mmmmaaaattttcccchhhh command.
  1813.  
  1814.           ----rrrreeeeggggeeeexxxxpppp _P_a_t_t_e_r_n is treated as a regular expression and matched
  1815.           against each list element using the same rules as the rrrreeeeggggeeeexxxxpppp
  1816.           command.
  1817.  
  1818.           If _m_o_d_e is omitted then it defaults to ----gggglllloooobbbb.
  1819.  
  1820.      llllrrrrmmmmdddduuuuppppssss _l_i_s_t
  1821.           Procedure to remove duplicate elements from a list.  The returned
  1822.           list will be sorted.
  1823.  
  1824.      llllvvvvaaaarrrrccccaaaatttt _v_a_r _s_t_r_i_n_g ?_s_t_r_i_n_g...?
  1825.           This command treats each _s_t_r_i_n_g argument as a list and concatenates
  1826.           them to the end of the contents of _v_a_r, forming a a single list.
  1827.           The list is stored back into _v_a_r and also returned as the result.
  1828.           if _v_a_r does not exist, it is created.
  1829.  
  1830.      llllvvvvaaaarrrrppppoooopppp _v_a_r ?_i_n_d_e_x_E_x_p_r? ?_s_t_r_i_n_g?
  1831.           The llllvvvvaaaarrrrppppoooopppp command pops (deletes) the element indexed by the
  1832.           expression _i_n_d_e_x_E_x_p_r from the list contained in the variable _v_a_r.
  1833.           If _i_n_d_e_x is omitted, then 0 is assumed.  If _s_t_r_i_n_g, is specified,
  1834.           then the deleted element is replaced by _s_t_r_i_n_g. The replaced or
  1835.           deleted element is returned.  Thus ``lvarpop argv 0'' returns the
  1836.           first element of argv, setting argv to contain the remainder of the
  1837.           string.
  1838.  
  1839.           If the expression _i_n_d_e_x_E_x_p_r starts with the string eeeennnndddd, then eeeennnndddd is
  1840.           replaced with the index of the last element in the list.  If the
  1841.           expression starts with lllleeeennnn, then lllleeeennnn is replaced with the length of
  1842.  
  1843.  
  1844.  
  1845.                                                                        PPPPaaaaggggeeee 22228888
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1853.  
  1854.  
  1855.  
  1856.           the list.
  1857.  
  1858.      llllvvvvaaaarrrrppppuuuusssshhhh _v_a_r _s_t_r_i_n_g ?_i_n_d_e_x_E_x_p_r?
  1859.           The llllvvvvaaaarrrrppppuuuusssshhhh command pushes (inserts) _s_t_r_i_n_g as an element in the
  1860.           list contained in the variable _v_a_r.  The element is inserted before
  1861.           position _i_n_d_e_x_E_x_p_r in the list. If _i_n_d_e_x is omitted, then 0 is
  1862.           assumed.  If _v_a_r does not exists, it is created.
  1863.  
  1864.           If the expression _i_n_d_e_x_E_x_p_r starts with the string eeeennnndddd, then eeeennnndddd is
  1865.           replaced with the index of the last element in the list.  If the
  1866.           expression starts with lllleeeennnn, then lllleeeennnn is replaced with the length of
  1867.           the list.  Note the a value of eeeennnndddd means insert the string before
  1868.           the last element.
  1869.  
  1870.      uuuunnnniiiioooonnnn _l_i_s_t_a _l_i_s_t_b
  1871.           Procedure to return the logical union of the two specified lists.
  1872.           Any duplicate elements are removed.
  1873.  
  1874. KKKKEEEEYYYYEEEEDDDD LLLLIIIISSSSTTTTSSSS
  1875.      Extended Tcl defines a special type of list referred to as _k_e_y_e_d _l_i_s_t_s.
  1876.      These lists provided a structured data type built upon standard Tcl
  1877.      lists.  This provides a functionality similar to _s_t_r_u_c_ts in the C
  1878.      programming language.
  1879.  
  1880.      A keyed list is a list in which each element contains a key and value
  1881.      pair.  These element pairs are stored as lists themselves, where the key
  1882.      is the first element of the list, and the value is the second.  The key-
  1883.      value pairs are refered to as _f_i_e_l_d_s.  This is an example of a keyed
  1884.      list:
  1885.  
  1886.               {{NAME {Frank Zappa}} {JOB {musician and composer}}}
  1887.  
  1888.      If the variable ppppeeeerrrrssssoooonnnn contained the above list, then kkkkeeeeyyyyllllggggeeeetttt ppppeeeerrrrssssoooonnnn NNNNAAAAMMMMEEEE
  1889.      would return {{{{FFFFrrrraaaannnnkkkk ZZZZaaaappppppppaaaa}}}}.  Executing the command:
  1890.  
  1891.           kkkkeeeeyyyyllllsssseeeetttt ppppeeeerrrrssssoooonnnn IIIIDDDD 111100006666
  1892.  
  1893.      would make ppppeeeerrrrssssoooonnnn contain
  1894.  
  1895.               {{ID 106} {NAME {Frank Zappa}} {JOB {musician and composer}}
  1896.  
  1897.      Fields may contain subfields; `.' is the seperator character.  Subfields
  1898.      are actually fields where the value is another keyed list.  Thus the
  1899.      following list has the top level fields _I_D and _N_A_M_E, and subfields
  1900.      _N_A_M_E._F_I_R_S_T and  _N_A_M_E._L_A_S_T:
  1901.  
  1902.               {ID 106} {NAME {{FIRST Frank} {LAST Zappa}}}
  1903.  
  1904.      There is no limit to the recursive depth of subfields, allowing one to
  1905.      build complex data structures.
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.                                                                        PPPPaaaaggggeeee 22229999
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1919.  
  1920.  
  1921.  
  1922.      Keyed lists are constructed and accessed via a number of commands.  All
  1923.      keyed list management commands take the name of the variable containing
  1924.      the keyed list as an argument (i.e. passed by reference), rather than
  1925.      passing the list directly.
  1926.  
  1927.      kkkkeeeeyyyyllllddddeeeellll _l_i_s_t_v_a_r _k_e_y
  1928.           Delete the field specified by _k_e_y from the keyed list in the
  1929.           variable _l_i_s_t_v_a_r.  This removes both the key and the value from the
  1930.           keyed list.
  1931.  
  1932.      kkkkeeeeyyyyllllggggeeeetttt _l_i_s_t_v_a_r ?_k_e_y? ?_r_e_t_v_a_r | {}?
  1933.           Return the value associated with _k_e_y from the keyed list in the
  1934.           variable _l_i_s_t_v_a_r.  If _r_e_t_v_a_r is not specified, then the value will
  1935.           be returned as the result of the command. In this case, if _k_e_y is
  1936.           not found in the list, an error will result.
  1937.  
  1938.           If _r_e_t_v_a_r is specified and _k_e_y is in the list, then the value is
  1939.           returned in the variable _r_e_t_v_a_r and the command returns 1111 if the key
  1940.           was present within the list.  If _k_e_y isn't in the list, the command
  1941.           will return 0000, and _r_e_t_v_a_r will be left unchanged.  If {{{{}}}} is
  1942.           specified for _r_e_t_v_a_r, the value is not returned, allowing the Tcl
  1943.           programmer to determine if a key is present in a keyed list without
  1944.           setting a variable as a side-effect.
  1945.  
  1946.           If _k_e_y is omitted, then a list of all the keys in the keyed list is
  1947.           returned.
  1948.  
  1949.      kkkkeeeeyyyyllllkkkkeeeeyyyyssss _l_i_s_t_v_a_r ?_k_e_y?
  1950.           Return the a list of the keyes in the keyed list in the variable
  1951.           _l_i_s_t_v_a_r.  If _k_e_y_s is specified, then it is the name of a key field
  1952.           who's subfield keys are to be retrieve.
  1953.  
  1954.      kkkkeeeeyyyyllllsssseeeetttt _l_i_s_t_v_a_r _k_e_y _v_a_l_u_e ?_k_e_y_2 _v_a_l_u_e_2 ...?
  1955.           Set the value associated with _k_e_y, in the keyed list contained in
  1956.           the variable _l_i_s_t_v_a_r, to _v_a_l_u_e.  If listvar does not exists, it is
  1957.           created.  If _k_e_y is not currently in the list, it will be added.  If
  1958.           it already exists, _v_a_l_u_e replaces the existing value.  Multiple
  1959.           keywords and values may be specified, if desired.
  1960.  
  1961. SSSSTTTTRRRRIIIINNNNGGGG AAAANNNNDDDD CCCCHHHHAAAARRRRAAAACCCCTTTTEEEERRRR MMMMAAAANNNNIIIIPPPPUUUULLLLAAAATTTTIIIIOOOONNNN CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  1962.      The commands provide additional functionality to classify characters,
  1963.      convert characters between character and numeric values, index into a
  1964.      string, determine the length of a string, extract a range of character
  1965.      from a string, replicate a string a number of times, and transliterate a
  1966.      string (similar to the Unix _t_r program).
  1967.  
  1968.      ccccccccoooollllllllaaaatttteeee ????----llllooooccccaaaallll???? _s_t_r_i_n_g_1 _s_t_r_i_n_g_2
  1969.           This command compares two strings. If returns ----1111 if _s_t_r_i_n_g_1 is less
  1970.           than _s_t_r_i_n_g_2, 0000 if they are equal amd 1111 if _s_t_r_i_n_g_1 is greater than
  1971.           _s_t_r_i_n_g_2.
  1972.  
  1973.           If ----llllooooccccaaaallll is specified, the strings are compared according to the
  1974.  
  1975.  
  1976.  
  1977.                                                                        PPPPaaaaggggeeee 33330000
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  1985.  
  1986.  
  1987.  
  1988.           collation environment of the current locale.
  1989.  
  1990.      cccceeeeqqqquuuuaaaallll _s_t_r_i_n_g_1 _s_t_r_i_n_g_2
  1991.           This command compares two strings for equality.  It returns 1111 if
  1992.           _s_t_r_i_n_g_1 and _s_t_r_i_n_g_2 are the identical and 0000 if they are not.  This
  1993.           command is a short-cut for ssssttttrrrriiiinnnngggg ccccoooommmmppppaaaarrrreeee and avoids the problems
  1994.           with string expressions being treated unintentionally as numbers.
  1995.  
  1996.      cccciiiinnnnddddeeeexxxx _s_t_r_i_n_g _i_n_d_e_x_E_x_p_r
  1997.           Returns the character indexed by the expression _i_n_d_e_x_E_x_p_r (zero
  1998.           based) from _s_t_r_i_n_g.
  1999.  
  2000.           If the expression _i_n_d_e_x_E_x_p_r starts with the string eeeennnndddd, then eeeennnndddd is
  2001.           replaced with the index of the last character in the string.  If the
  2002.           expression starts with lllleeeennnn, then lllleeeennnn is replaced with the length of
  2003.           the string.
  2004.  
  2005.      cccclllleeeennnnggggtttthhhh _s_t_r_i_n_g
  2006.           Returns the length of _s_t_r_i_n_g in characters. This command is a
  2007.           shortcut for:
  2008.  
  2009.               ssssttttrrrriiiinnnngggg lllleeeennnnggggtttthhhh _s_t_r_i_n_g
  2010.  
  2011.      ccccrrrraaaannnnggggeeee _s_t_r_i_n_g _f_i_r_s_t_E_x_p_r _l_a_s_t_E_x_p_r
  2012.           Returns a range of characters from _s_t_r_i_n_g starting at the character
  2013.           indexed by the expression _f_i_r_s_t_E_x_p_r (zero-based) until the character
  2014.           indexed by the expression _l_a_s_t_E_x_p_r.
  2015.  
  2016.           If the expression _f_i_r_s_t_E_x_p_r or llllaaaassssttttEEEExxxxpppprrrr starts with the string eeeennnndddd,
  2017.           then eeeennnndddd is replaced with the index of the last character in the
  2018.           string.  If the expression starts with lllleeeennnn, then lllleeeennnn is replaced
  2019.           with the length of the string.
  2020.  
  2021.      ccccssssuuuubbbbssssttttrrrr _s_t_r_i_n_g _f_i_r_s_t_E_x_p_r _l_e_n_g_t_h_E_x_p_r
  2022.           Returns a range of characters from _s_t_r_i_n_g starting at the character
  2023.           indexed by the expression _f_i_r_s_t_E_x_p_r (zero-based) for _l_e_n_g_t_h_E_x_p_r
  2024.           characters.
  2025.  
  2026.           If the expression _f_i_r_s_t_E_x_p_r or lllleeeennnnggggtttthhhhEEEExxxxpppprrrr starts with the string
  2027.           eeeennnndddd, then eeeennnndddd is replaced with the index of the last character in
  2028.           the string.  If the expression starts with lllleeeennnn, then lllleeeennnn is replaced
  2029.           with the length of the string.
  2030.  
  2031.      ccccttttooookkkkeeeennnn _s_t_r_v_a_r _s_e_p_a_r_a_t_o_r_s
  2032.           Parse a token out of a character string.  The string to parse is
  2033.           contained in the variable named _s_t_r_v_a_r.  The string _s_e_p_a_r_a_t_o_r_s
  2034.           contains all of the valid separator characters for tokens in the
  2035.           string.  All leading separators are skipped and the first token is
  2036.           returned.  The variable _s_t_r_v_a_r will be modified to contain the
  2037.           remainder of the string following the token.
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.                                                                        PPPPaaaaggggeeee 33331111
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2051.  
  2052.  
  2053.  
  2054.      cccceeeexxxxppppaaaannnndddd _s_t_r_i_n_g
  2055.           Expand backslash sequences in _s_t_r_i_n_g to their actual characters.  No
  2056.           other substitution takes place.
  2057.  
  2058.      ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _c_l_a_s_s _s_t_r_i_n_g
  2059.           ccccttttyyyyppppeeee determines whether all characters in _s_t_r_i_n_g are of the
  2060.           specified _c_l_a_s_s.  It returns 1111 if they are all of _c_l_a_s_s, and 0000 if
  2061.           they are not, or if the string is empty.  This command also provides
  2062.           another method (besides ffffoooorrrrmmmmaaaatttt and ssssccccaaaannnn) of converting between an
  2063.           ASCII character and its numeric value.  The following ccccttttyyyyppppeeee commands
  2064.           are available:
  2065.  
  2066.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _a_l_n_u_m _s_t_r_i_n_g
  2067.                Tests that all characters are alphabetic or numeric characters
  2068.                as defined by the character set.
  2069.  
  2070.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _a_l_p_h_a _s_t_r_i_n_g
  2071.                Tests that all characters are alphabetic characters as defined
  2072.                by the character set.
  2073.  
  2074.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _a_s_c_i_i _s_t_r_i_n_g
  2075.                Tests that all characters are an ASCII character (a non-
  2076.                negative number less than 0200).
  2077.  
  2078.           ccccttttyyyyppppeeee cccchhhhaaaarrrr _n_u_m_b_e_r
  2079.                Converts the numeric value, _s_t_r_i_n_g, to an ASCII character.
  2080.                Number must be in the range 0 through 255.
  2081.  
  2082.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _c_n_t_r_l _s_t_r_i_n_g
  2083.                Tests that all characters are ``control characters'' as defined
  2084.                by the character set.
  2085.  
  2086.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _d_i_g_i_t _s_t_r_i_n_g
  2087.                Tests that all characters are valid decimal digits, i.e. 0
  2088.                through 9.
  2089.  
  2090.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _g_r_a_p_h _s_t_r_i_n_g
  2091.                Tests that all characters within are any character for which
  2092.                _c_t_y_p_e _p_r_i_n_t is true, except for space characters.
  2093.  
  2094.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _l_o_w_e_r _s_t_r_i_n_g
  2095.                Tests that all characters are lowercase letters as defined by
  2096.                the character set.
  2097.  
  2098.           ccccttttyyyyppppeeee oooorrrrdddd _c_h_a_r_a_c_t_e_r
  2099.                Convert a character into its decimal numeric value.  The first
  2100.                character of the string is converted.
  2101.  
  2102.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _s_p_a_c_e _s_t_r_i_n_g
  2103.                Tests that all characters are either a space, horizontal-tab,
  2104.                carriage return, newline, vertical-tab, or form-feed.
  2105.  
  2106.  
  2107.  
  2108.  
  2109.                                                                        PPPPaaaaggggeeee 33332222
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2117.  
  2118.  
  2119.  
  2120.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _p_r_i_n_t _s_t_r_i_n_g
  2121.                Tests that all characters are a space or any character for
  2122.                which _c_t_y_p_e _a_l_n_u_m or _c_t_y_p_e _p_u_n_c_t is true or other ``printing
  2123.                character'' as defined by the character set.
  2124.  
  2125.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _p_u_n_c_t _s_t_r_i_n_g
  2126.                Tests that all characters are made up of any of the characters
  2127.                other than the ones for which aaaallllnnnnuuuummmm, ccccnnnnttttrrrrllll, or ssssppppaaaacccceeee is true.
  2128.  
  2129.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _u_p_p_e_r _s_t_r_i_n_g
  2130.                Tests that all characters are uppercase letters as defined by
  2131.                the character set.
  2132.  
  2133.           ccccttttyyyyppppeeee ?-_f_a_i_l_i_n_d_e_x _v_a_r? _x_d_i_g_i_t _s_t_r_i_n_g
  2134.                Tests that all characters are valid hexadecimal digits, that is
  2135.                _0 through _9, a through _f or _A through _F.
  2136.  
  2137.           If -_f_a_i_l_i_n_d_e_x is specified, then the index into _s_t_r_i_n_g of the first
  2138.           character that did not match the class is returned in _v_a_r.
  2139.  
  2140.      rrrreeeepppplllliiiiccccaaaatttteeee _s_t_r_i_n_g _c_o_u_n_t_E_x_p_r
  2141.           Returns _s_t_r_i_n_g, replicated the number of times indicated by the
  2142.           expression _c_o_u_n_t_E_x_p_r.
  2143.  
  2144.      ttttrrrraaaannnnsssslllliiiitttt _i_n_r_a_n_g_e _o_u_t_r_a_n_g_e _s_t_r_i_n_g
  2145.           Translate characters in _s_t_r_i_n_g, changing characters occuring in
  2146.           _i_n_r_a_n_g_e to the corresponding character in _o_u_t_r_a_n_g_e. _I_n_r_a_n_g_e and
  2147.           _o_u_t_r_a_n_g_e may be list of characters or a range in the form `A-M'.
  2148.           For example:
  2149.                   translit a-z A-Z foobar
  2150.  
  2151.           returns "FOOBAR".
  2152.  
  2153. XXXXPPPPGGGG////3333 MMMMEEEESSSSSSSSAAAAGGGGEEEE CCCCAAAATTTTAAAALLLLOOOOGGGG CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  2154.      These commands provide a Tcl interface to message catalogs that are
  2155.      compliant with the X/Open Portability Guide, Version 3 (XPG/3).
  2156.  
  2157.      Tcl programmers can use message catalogs to create applications that are
  2158.      language-independent.  Through the use of message catalogs, prompts,
  2159.      messages, menus and so forth can exist for any number of languages, and
  2160.      they can altered, and new languages added,  without affecting any Tcl or
  2161.      C source code, greatly easing the maintenance difficulties incurred by
  2162.      supporting multiple languages.
  2163.  
  2164.      A default text message is passed to the command that fetches entries from
  2165.      message catalogs.  This allows the Tcl programmer to create message
  2166.      catalogs containing messages in various languages, but still have a set
  2167.      of default messages available regardless of the presence of any message
  2168.      catalogs, and allow the programs to press on without difficulty when no
  2169.      catalogs are present.
  2170.  
  2171.      Thus, the normal approach to using message catalogs is to ignore errors
  2172.  
  2173.  
  2174.  
  2175.                                                                        PPPPaaaaggggeeee 33333333
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2183.  
  2184.  
  2185.  
  2186.      on ccccaaaattttooooppppeeeennnn, in which case ccccaaaattttggggeeeettttssss will return the default message that
  2187.      was specified in the call.
  2188.  
  2189.      The Tcl message catalog commands normally ignore most errors.  If it is
  2190.      desirable to detect errors, a special option is provided.  This is
  2191.      normally used only during debugging, to insure that message catalogs are
  2192.      being used.  If your Unix implementation does not have XPG/3 message
  2193.      catalog support, stubs will be compiled in that will create a version of
  2194.      ccccaaaattttggggeeeettttssss that always returns the default string.  This allows for easy
  2195.      porting of software to environments that don't have support for message
  2196.      catalogs.
  2197.  
  2198.      Message catalogs are global to the process, an application with multiple
  2199.      Tcl interpreters within the same process may pass and share message
  2200.      catalog handles.
  2201.  
  2202.      ccccaaaattttooooppppeeeennnn ?----ffffaaaaiiiillll|----nnnnooooffffaaaaiiiillll? _c_a_t_n_a_m_e
  2203.           Open the message catalog _c_a_t_n_a_m_e.  This may be a relative path name,
  2204.           in which case the NNNNLLLLSSSSPPPPAAAATTTTHHHH environment variable is searched to find
  2205.           an absolute path to the message catalog.  A handle in the form
  2206.           mmmmssssggggccccaaaatttt_N is returned.  Normally, errors are ignored, and in the case
  2207.           of a failed call to ccccaaaattttooooppppeeeennnn, a handle is returned to an unopened
  2208.           message catalog.  (This handle may still be passed to ccccaaaattttggggeeeettttssss and
  2209.           ccccaaaattttcccclllloooosssseeee, causing ccccaaaattttggggeeeettttssss to simply return the default string, as
  2210.           described above.  If the ----ffffaaaaiiiillll option is specified, an error is
  2211.           returned if the open fails.  The option ----nnnnooooffffaaaaiiiillll specifies the
  2212.           default behavior of not returning an error when ccccaaaattttooooppppeeeennnn fails to
  2213.           open a specified message catalog.  If the handle from a failed
  2214.           ccccaaaattttooooppppeeeennnn is passed to ccccaaaattttggggeeeettttssss, the default string is returned.
  2215.  
  2216.      ccccaaaattttggggeeeettttssss _c_a_t_H_a_n_d_l_e _s_e_t_n_u_m _m_s_g_n_u_m _d_e_f_a_u_l_t_s_t_r
  2217.           Retrieve a message form a message catalog. _C_a_t_H_a_n_d_l_e should be a Tcl
  2218.           message catalog handle that was returned by ccccaaaattttooooppppeeeennnn.  _S_e_t_n_u_m is the
  2219.           message set number, and _m_s_g_n_u_m is the message number. If the message
  2220.           catalog was not opened, or the message set or message number cannot
  2221.           be found, then the default string, _d_e_f_a_u_l_t_s_t_r, is returned.
  2222.  
  2223.      ccccaaaattttcccclllloooosssseeee ?----ffffaaaaiiiillll|----nnnnooooffffaaaaiiiillll? _c_a_t_h_a_n_d_l_e
  2224.           Close the message catalog specified by _c_a_t_h_a_n_d_l_e.  Normally, errors
  2225.           are ignored.  If ----ffffaaaaiiiillll is specified, any errors closing the message
  2226.           catalog file are returned.  The option ----nnnnooooffffaaaaiiiillll specifies the default
  2227.           behavior of not returning an error.  The use of ----ffffaaaaiiiillll only makes
  2228.           sense if it was also specified in the call to ccccaaaattttooooppppeeeennnn.
  2229.  
  2230. EEEEXXXXTTTTEEEENNNNDDDDEEEEDDDD TTTTCCCCLLLL SSSSHHHHEEEELLLLLLLL
  2231.      ttttccccllll ????----qqqqnnnn???? ????----ffff???? ????_s_c_r_i_p_t????||||????----cccc _c_o_m_m_a_n_d???? ????_a_r_g_s?
  2232.  
  2233.      TTTTccccllll starts the interactive Tcl command interpreter.  The Tcl shell
  2234.      provides an environment for writing, debugging and executing Tcl scripts.
  2235.      The functionality of the Tcl shell can be easily obtained by any
  2236.      application that includes Tcl.
  2237.  
  2238.  
  2239.  
  2240.  
  2241.                                                                        PPPPaaaaggggeeee 33334444
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2249.  
  2250.  
  2251.  
  2252.      The ttttccccllll command, issued without any arguments, invokes an interactive Tcl
  2253.      shell, allowing the user to interact directly with Tcl, executing any Tcl
  2254.      commands at will and viewing their results.
  2255.  
  2256.      If _s_c_r_i_p_t is specified, then the script is executed non-interactively
  2257.      with any additional arguments, _a_r_g_s, being supplied in the global Tcl
  2258.      variable `aaaarrrrggggvvvv'.  If _c_o_m_m_a_n_d is supplied, then this command (or
  2259.      semicolon-separated series of commands) is executed, with `aaaarrrrggggvvvv'
  2260.      containing any _a_r_g_s.
  2261.  
  2262.      The Tcl shell is intended as an environment for Tcl program development
  2263.      and execution.  While it is not a full-featured interactive shell, it
  2264.      provides a comfortable environment for the interactive development of Tcl
  2265.      code.  Note that the package library code described here overrides the
  2266.      uuuunnnnkkkknnnnoooowwwwnnnn command provided as part of the standard Berkeley Tcl library
  2267.      facility, although Tcl source libraries coded to that standard can be
  2268.      loaded and used by Extended Tcl.
  2269.  
  2270.      The following command line flags are recognized by the Tcl shell command
  2271.      line parser:
  2272.  
  2273.      ----qqqq   Quick initialization flag.  The Tcl initiaization file is not
  2274.           evaluated and the aaaauuuuttttoooo____ppppaaaatttthhhh variable is not set.  Tcl auto-load
  2275.           libraries will not be available.
  2276.  
  2277.      ----nnnn   No procedure call stack dump.  The procedure call stack will not be
  2278.           displayed when an error occurs, only the error message.  Useful in
  2279.           the #! line of already debugged scripts.
  2280.  
  2281.      ----ffff   Takes the next argument as a script for Tcl to source, rather than
  2282.           entering interactive mode.  The ----ffff flag is optional.  Normally the
  2283.           first argument that does not start with a `-' is taken as the script
  2284.           to execute unless the `-c' option is specified.  Any following
  2285.           arguments are passed to the script via aaaarrrrggggvvvv, thus any other Tcl
  2286.           shell command-line flags must precede this option.
  2287.  
  2288.      ----cccc   Take the next argument as a Tcl command to execute.  It may contain
  2289.           series of commands to execute, separated by `;'.  Any following
  2290.           arguments are passed in aaaarrrrggggvvvv, thus, as with ----ffff, any other Tcl shell
  2291.           flags must precede this option.
  2292.  
  2293.      --------   Mark the end of the arguments to the Tcl shell. All arguments
  2294.           following this are passed in the Tcl variable aaaarrrrggggvvvv.  This is useful
  2295.           to pass arguments without attempting to execute a Tcl script.
  2296.  
  2297.      The result string returned by a command executed from the Tcl shell
  2298.      command line is normally echoed back to the user.  If an error occurs,
  2299.      then the string result is displayed, along with the error message.  The
  2300.      error message will be preceded by the string ``Error:''.
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.                                                                        PPPPaaaaggggeeee 33335555
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2315.  
  2316.  
  2317.  
  2318.      The sssseeeetttt command is a special case.  If the command is called to set a
  2319.      variable (i.e. with two arguments), then the result will not be echoed.
  2320.      If only one argument, the name of a variable, is supplied to sssseeeetttt, then
  2321.      the result will be echoed.
  2322.  
  2323.      If an unknown Tcl command is entered from the command line, then the Unix
  2324.      command path, specified in the environment variable PPPPAAAATTTTHHHH, will be
  2325.      searched for a command of the same name.  If the command is found, it
  2326.      will be executed with any arguments remaining on the Tcl command line
  2327.      being passed as arguments to the command.  This feature is provided to
  2328.      enhance the interactive environment for developing Tcl scripts.
  2329.  
  2330.      Automatic execution of programs in this manner is only supported from the
  2331.      command line, not in script files or in procedures, to reduce confusion
  2332.      and mistakes while programming in Tcl.  Scripts should use the Tcl eeeexxxxeeeecccc
  2333.      or ssssyyyysssstttteeeemmmm commands to run Unix commands.
  2334.  
  2335.      The following variables are set and/or used by the Tcl shell.
  2336.  
  2337.      aaaarrrrggggvvvv0000
  2338.           Contains the name of the Tcl program specified on the command line
  2339.           or the name that the Tcl shell was invoked under if no program was
  2340.           specified.  aaaarrrrggggcccc Contains a count of the number of _a_r_g_v arguments (0
  2341.           if none).  aaaarrrrggggvvvv A list containing the arguments passed in from the
  2342.           command line, excluding arguments used by the Tcl shell.  The first
  2343.           element is the first passed argument, not the program name.
  2344.  
  2345.      ttttccccllll____iiiinnnntttteeeerrrraaaaccccttttiiiivvvveeee
  2346.           Set to 1111 if Tcl shell is invoked interactively, or 0000 if the Tcl
  2347.           shell is directly executing a script.  Normally checked by scripts
  2348.           so that they can function as a standalone application if specified
  2349.           on the command line, but merely load in and not execute if loaded
  2350.           during an interactive invocation of Tcl.
  2351.  
  2352.      aaaauuuuttttoooo____ppppaaaatttthhhh
  2353.           Path to search to locate Tcl scripts.  Used by the aaaauuuuttttoooo____llllooooaaaadddd command
  2354.           and the TclX unknown command handler.  The path is a Tcl list of
  2355.           directory names.
  2356.  
  2357.      ttttccccllllxxxx____lllliiiibbbbrrrraaaarrrryyyy
  2358.           Path to the TclX runtime library.  If your running the TclX shell or
  2359.           an appilcation based on it (like wishx), this is the same value
  2360.           returned by "info library".
  2361.  
  2362.      ttttccccllll____pppprrrroooommmmpppptttt1111
  2363.           Contains code to run to output the prompt used when interactively
  2364.           prompting for commands.
  2365.  
  2366.      ttttccccllll____pppprrrroooommmmpppptttt2222
  2367.           Contains code to run to output the prompt used when interactively
  2368.           prompting for continuation of an incomplete command.
  2369.  
  2370.  
  2371.  
  2372.  
  2373.                                                                        PPPPaaaaggggeeee 33336666
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2381.  
  2382.  
  2383.  
  2384.      ttttccccllllxxxx____eeeerrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr
  2385.           If this variable is set to the name of a procedure, that procedure
  2386.           will be call if an uncaught error occurs.  The procedure will be
  2387.           passed a single argument of the error message, however to allow
  2388.           future expansion, the procedure should have a final argument of
  2389.           aaaarrrrggggssss.  The procedure is only called in non-interactive shells.  If
  2390.           the procedure returns normally, the program will just exit without
  2391.           any error being issued by the shell.  Generally the procedure should
  2392.           exit with a non-zero exit code once the error has been processed.
  2393.           It is not possible to continue executing the code in which the error
  2394.           occurred.  This is useful for logging eeeerrrrrrrroooorrrrIIIInnnnffffoooo or e-mailing it to
  2395.           the maintainer.
  2396.  
  2397.      TTTTCCCCLLLLXXXXEEEENNNNVVVV
  2398.           Array that contains information used internally by various Tcl
  2399.           procedures that are part of the TclX shell.  Don't change this array
  2400.           unless you know what your doing.
  2401.  
  2402.      When Extended Tcl is installed, the standard runtime files are places in
  2403.      the Tcl master directory, which is configured when Tcl is built.  This
  2404.      master directory normally contains the Tcl initialization file
  2405.      (TclInit.tcl), the standard Tcl library file (tcl.tlib) and the help
  2406.      files.  The Tcl master directory is named after the version of Tcl it is
  2407.      associated with, e.g. ////uuuussssrrrr////llllooooccccaaaallll////ttttccccllllXXXX////7777....4444aaaa.  The path to the Tcl master
  2408.      directory is available from the iiiinnnnffffoooo lllliiiibbbbrrrraaaarrrryyyy command.  The location of
  2409.      the Tcl master directory can be overridden with the TTTTCCCCLLLL____LLLLIIIIBBBBRRRRAAAARRRRYYYY
  2410.      environment variable.
  2411.  
  2412.      The first step in initializing the Tcl shell is to locate the Tcl
  2413.      initialization file, normally TTTTccccllllIIIInnnniiiitttt....ttttccccllll.  If an environment variable
  2414.      TTTTCCCCLLLLIIIINNNNIIIITTTT exists, it contains the path to the Tcl initialization file.  If
  2415.      the TTTTCCCCLLLLIIIINNNNIIIITTTT environment variable is not set, the file TTTTccccllllIIIInnnniiiitttt....ttttccccllll is used
  2416.      from the default Tcl master directory.
  2417.  
  2418.      TTTTccccllll then evaulates the Tcl initialization file.  The aaaauuuuttttoooo____ppppaaaatttthhhh variable
  2419.      is initialized to the Tcl master directory and may be augmented by the
  2420.      intialization file or the application.  Other procedures and variables
  2421.      used by the Extended Tcl shell are also defined by this file.
  2422.  
  2423.      If the Tcl is invoked interactively, it will source a file named ._t_c_l_r_c
  2424.      in the user's home directory, if it exists.  Tcl is viewed primarily as a
  2425.      programming language, not an interactive shell, so the ._t_c_l_r_c is intended
  2426.      for use for loading development utilities, not to support applications,
  2427.      which should not have to rely on the user's environment in such a manner.
  2428.  
  2429.      The Extended Tcl Tk shell, wwwwiiiisssshhhhxxxx, has an additional master directory and
  2430.      initialization file.  It use the environment variable TTTTKKKK____LLLLIIIIBBBBRRRRAAAARRRRYYYY to
  2431.      override the default location of the Tk master directory.
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.                                                                        PPPPaaaaggggeeee 33337777
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2447.  
  2448.  
  2449.  
  2450. HELP FACILITY
  2451.      The help facility allows one to look up help pages which where extracted
  2452.      from the standard Tcl manual pages and Tcl scripts during Tcl
  2453.      installation.  Help files are structured as a multilevel tree of subjects
  2454.      and help pages.  Help files are found by searching directories named hhhheeeellllpppp
  2455.      in the directories listed in the aaaauuuuttttoooo____ppppaaaatttthhhh variable.  All of the files in
  2456.      the list of help directories form a virtual root of the help tree.  This
  2457.      method allows multiple applications to provide help trees without having
  2458.      the files reside in the same directory.
  2459.  
  2460.      The help facility can be accessed in two ways, as interactive commands in
  2461.      the Extended Tcl shell or as an interactive Tk-based program (if you have
  2462.      built Extended Tcl with Tk).
  2463.  
  2464.      To run the Tk-based interactive help program:
  2465.  
  2466.          tclhelp ?addpaths?
  2467.      Where _a_d_d_p_a_t_h_s are additional paths to search for help directories.  By
  2468.      default, only the _a_u_t_o__p_a_t_h used by ttttccccllllhhhheeeellllpppp is search.  This will result
  2469.      in help on Tcl, Extended Tcl and Tk.
  2470.  
  2471.      The following interactive Tcl commands and options are provided with the
  2472.      help package:
  2473.  
  2474.      hhhheeeellllpppp
  2475.           Help, without arguments, lists of all the help subjects and pages
  2476.           under the current help subject.
  2477.  
  2478.      hhhheeeellllpppp _s_u_b_j_e_c_t
  2479.           Displays all of help pages and lower level subjects (if any exist)
  2480.           under the subject _s_u_b_j_e_c_t.
  2481.  
  2482.      hhhheeeellllpppp _s_u_b_j_e_c_t/_h_e_l_p_p_a_g_e
  2483.           Display the specified help page.  The help output is passed through
  2484.           a simple pager if output exceeds 23 lines, pausing waiting for a
  2485.           return to be entered.  If any other character is entered, the output
  2486.           is terminated.
  2487.  
  2488.      hhhheeeellllppppccccdddd ????_s_u_b_j_e_c_t?
  2489.           Change the current subject, which is much like the Unix current
  2490.           directory.  If _s_u_b_j_e_c_t is not specified, return to the top-level of
  2491.           the help tree.  Help subject path names may also include ``..''
  2492.           elements.
  2493.  
  2494.      hhhheeeellllppppppppwwwwdddd
  2495.           Displays the current help subject.
  2496.  
  2497.      hhhheeeellllpppp hhhheeeellllpppp |||| ????
  2498.           Displays help on the help facility at any directory level.
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.                                                                        PPPPaaaaggggeeee 33338888
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2513.  
  2514.  
  2515.  
  2516.      aaaapppprrrrooooppppoooossss _p_a_t_t_e_r_n
  2517.           This command locates subjects by searching their one-line
  2518.           descriptions for a pattern.  Apropos is useful when you can remember
  2519.           part of the name or description of a command, and want to search
  2520.           through the one-line summaries for matching lines.  Full regular
  2521.           expressions may be specified (see the rrrreeeeggggeeeexxxxpppp command).
  2522.  
  2523. TTTTCCCCLLLL LLLLOOOOAAAADDDDAAAABBBBLLLLEEEE LLLLIIIIBBBBRRRRAAAARRRRIIIIEEEESSSS AAAANNNNDDDD PPPPAAAACCCCKKKKAAAAGGGGEEEESSSS
  2524.      Extended Tcl supports standard Tcl ttttccccllllIIIInnnnddddeeeexxxx libraries and package
  2525.      libraries. A package library file can contain multiple independent Tcl
  2526.      packages.  A package is a named collection of related Tcl procedures and
  2527.      initialization code.
  2528.  
  2529.      The package library file is just a regular Unix text file, editable with
  2530.      your favorite text editor, containing packages of Tcl source code. The
  2531.      package library file name must have the suffix ....ttttlllliiiibbbb.  An index file with
  2532.      the suffix ....ttttnnnnddddxxxx, corresponding to the package library.  The ....ttttnnnnddddxxxx will
  2533.      be automatically created by Tcl whenever it is out of date or missing
  2534.      (provided there is write access to the directory.
  2535.  
  2536.      The variable aaaauuuuttttoooo____ppppaaaatttthhhh contains a list of directories that are searched
  2537.      for libraries.  The first time an unknown command trap is take, the
  2538.      indexes for the libraries are loaded into memory. If the aaaauuuuttttoooo____ppppaaaatttthhhh
  2539.      variable is changed during execution of a program, it will be re-
  2540.      searched. Only the first package of a given name found during the
  2541.      execution of a program is loaded.  This can be overridden with
  2542.      llllooooaaaaddddlllliiiibbbbiiiinnnnddddeeeexxxx command.
  2543.  
  2544.      The start of a package is delimited by:
  2545.  
  2546.           ####@@@@ppppaaaacccckkkkaaaaggggeeee:::: _p_a_c_k_a_g_e__n_a_m_e _p_r_o_c_1 ?.._p_r_o_c_N?
  2547.  
  2548.      These lines must start in column one.  Everything between the ####@@@@ppppaaaacccckkkkaaaaggggeeee::::
  2549.      keyword and the next ####@@@@ppppaaaacccckkkkaaaaggggeeee:::: keyword or a ####@@@@ppppaaaacccckkkkeeeennnndddd keyword, or the
  2550.      end of the file, becomes part of the named package.  The specified
  2551.      procedures, _p_r_o_c_1.._p_r_o_c_N, are the entry points of the package.  When a
  2552.      command named in a package specification is executed and detected as an
  2553.      unknown command, all code in the specified package will be sourced.  This
  2554.      package should define all of the procedures named on the package line,
  2555.      define any support procedures required by the package and do any
  2556.      package-specific initialization.  Packages declarations maybe continued
  2557.      on subsequent lines using standard Tcl backslash line continuations.  The
  2558.      ####@@@@ppppaaaacccckkkkeeeennnndddd keyword is useful to make sure only the minimum required
  2559.      section of code is sourced.  Thus for example a large comment block at
  2560.      the beginning of the next file won't be loaded.
  2561.  
  2562.      Care should be taken in defining _p_a_c_k_a_g_e__n_a_m_e, as the first package found
  2563.      in the path by with a given name is loaded.  This can be useful in
  2564.      developing new version of packages installed on the system.
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.                                                                        PPPPaaaaggggeeee 33339999
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2579.  
  2580.  
  2581.  
  2582.      For example, in a package source file, the presence of the following
  2583.      line:
  2584.  
  2585.           ####@@@@ppppaaaacccckkkkaaaaggggeeee:::: ddddiiiirrrreeeeccccttttoooorrrryyyy____ssssttttaaaacccckkkk ppppuuuusssshhhhdddd ppppooooppppdddd ddddiiiirrrrssss
  2586.  
  2587.      says that the text lines following that line in the package file up to
  2588.      the next _p_a_c_k_a_g_e line or the end of the file is a package named
  2589.      ddddiiiirrrreeeeccccttttoooorrrryyyy____ssssttttaaaacccckkkk and that an attempt to execute either _p_u_s_h_d, _p_o_p_d or _d_i_r_s
  2590.      when the routine is not already defined will cause the ddddiiiirrrreeeeccccttttoooorrrryyyy____ssssttttaaaacccckkkk
  2591.      portion of the package file to be loaded.
  2592.  
  2593. PPPPAAAACCCCKKKKAAAAGGGGEEEE LLLLIIIIBBBBRRRRAAAARRRRYYYY MMMMAAAANNNNAAAAGGGGEEEEMMMMEEEENNNNTTTT CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  2594.      Several commands are available for building and managing package
  2595.      libraries.  Commands that are extended versions of the standard Tcl
  2596.      library commands are listed here.  All of the standard Tcl library
  2597.      management commands and variables are also supported.
  2598.  
  2599.      aaaauuuuttttoooo____ccccoooommmmmmmmaaaannnnddddssss ?----llllooooaaaaddddeeeerrrrssss?
  2600.           Lists the names of all known loadable procedures and commands
  2601.           procedures.  If ----llllooooaaaaddddeeeerrrrssss is specified, the command that will be
  2602.           executed to load the command will also be returned.
  2603.  
  2604.      bbbbuuuuiiiillllddddppppaaaacccckkkkaaaaggggeeeeiiiinnnnddddeeeexxxx _l_i_b_f_i_l_e_l_i_s_t
  2605.           Build index files for package libraries.  The argument _l_i_b_f_i_l_e_l_i_s_t
  2606.           is a list of package libraries.  Each name must end with the suffix
  2607.           ....ttttlllliiiibbbb.  A corresponding ....ttttnnnnddddxxxx file will be built.  The user must
  2608.           have write access to the directory containing each library.
  2609.  
  2610.      ccccoooonnnnvvvveeeerrrrtttt____lllliiiibbbb _t_c_l_I_n_d_e_x _p_a_c_k_a_g_e_l_i_b ?_i_g_n_o_r_e?
  2611.           Convert a Ousterhout style _t_c_l_I_n_d_e_x index file and associate source
  2612.           files into a package library ppppaaaacccckkkkaaaaggggeeeelllliiiibbbb.  If ppppaaaacccckkkkaaaaggggeeeelllliiiibbbb does not
  2613.           have a ....ttttlllliiiibbbb extension, one will be added.  Any files specified in
  2614.           _t_c_l_I_n_d_e_x that are in the list _i_g_n_o_r_e will be skipped.  Files listed
  2615.           in _i_g_n_o_r_e should just be the base file names, not full paths.
  2616.  
  2617.      aaaauuuuttttoooo____llllooooaaaadddd ?_c_o_m_m_a_n_d?
  2618.           Attempt to load the specified _c_o_m_m_a_n_d from a loadable library.
  2619.           loading the package containing the procedure.  If the package
  2620.           indexes have not been loaded for all package libraries in aaaauuuuttttoooo____ppppaaaatttthhhh,
  2621.           they will be loaded.  Out-of-date library indexes will be rebuilt if
  2622.           they are writable.  The procedure returns 1111 if the command was
  2623.           sucessfully loaded, or 0000 if it was not.
  2624.  
  2625.           Duplicated package names are skipped, the first package of a given
  2626.           name found in the path is loaded.  If the aaaauuuuttttoooo____ppppaaaatttthhhh has changed
  2627.           since the last load, indexes will be reloaded (duplicate packages
  2628.           will not be redefined).
  2629.  
  2630.           If _c_o_m_m_a_n_d is not specified, the indexes will be loaded, if they
  2631.           have not alreay been loaded or if the aaaauuuuttttoooo____ppppaaaatttthhhh variable has
  2632.           changed, but no command will be loaded.
  2633.  
  2634.  
  2635.  
  2636.  
  2637.                                                                        PPPPaaaaggggeeee 44440000
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644. TTTTccccllllXXXX((((3333TTTTccccllll))))                                                          TTTTccccllllXXXX((((3333TTTTccccllll))))
  2645.  
  2646.  
  2647.  
  2648.      This command overrides the standard Tcl procedure of the same name.
  2649.  
  2650.      llllooooaaaaddddlllliiiibbbbiiiinnnnddddeeeexxxx _l_i_b_f_i_l_e._t_l_i_b
  2651.           Load the package library index of the library file lllliiiibbbbffffiiiilllleeee (which
  2652.           must have the suffix ._t_l_i_b).  Package library indexes along the
  2653.           aaaauuuuttttoooo____ppppaaaatttthhhh are loaded automatically on the first ddddeeeemmmmaaaannnndddd____llllooooaaaadddd; this
  2654.           command is provided to explicitly load libraries that are not in the
  2655.           path.  If the index file (with a ._t_n_d_x suffix) does not exists or is
  2656.           out of date, it will be rebuilt if the user has directory
  2657.           permissions to create it. If a package with the same name as a
  2658.           package in _l_i_b_f_i_l_e._t_l_i_b has already been loaded, its definition will
  2659.           be overridden by the new package.  However, if any procedure has
  2660.           actually been used from the previously defined package, the
  2661.           procedures from _l_i_b_f_i_l_e._t_l_i_b will not be loaded.
  2662.  
  2663.           This command will also load an index built by mmmmkkkkiiiinnnnddddeeeexxxx....ttttccccllll program
  2664.           supplied with standard Tcl.  This file must be named "ttttccccllllIIIInnnnddddeeeexxxx".
  2665.  
  2666.      aaaauuuuttttoooo____ppppaaaacccckkkkaaaaggggeeeessss ?-_l_o_c_a_t_i_o_n?
  2667.           Returns a list of the names of all defined packages. If -_l_o_c_a_t_i_o_n is
  2668.           specified, a list of pairs of package name and the ....ttttlllliiiibbbb path name,
  2669.           offset and length of the package within the library.
  2670.  
  2671.      aaaauuuuttttoooo____llllooooaaaadddd____ffffiiiilllleeee _f_i_l_e
  2672.           Source a file, as with the ssssoooouuuurrrrcccceeee command, except search aaaauuuuttttoooo____ppppaaaatttthhhh
  2673.           for the file.
  2674.  
  2675.      sssseeeeaaaarrrrcccchhhhppppaaaatttthhhh _p_a_t_h _f_i_l_e
  2676.           Search all directories in the specified path, which is a Tcl list,
  2677.           for the specified file.  Returns the full path name of the file, or
  2678.           an empty string if the requested file could not be found.
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.                                                                        PPPPaaaaggggeeee 44441111
  2704.  
  2705.  
  2706.  
  2707.