&/addworld
&addworld()

addworld()

  [1mFunction[22;0m usage: 

  [1mADDWORLD[22;0m(<[4mname[24m>, <[4mtype[24m>, [<[4mhost[24m>, <[4mport[24m> [, <[4mchar[24m>, <[4mpass[24m> [, <[4mfile[24m> [, 
  <[4mflags[24m> [, <[4msrchost[24m>]]]]])

  Command usage: 

  [1m/ADDWORLD[22;0m [-pxe] [-T<[4mtype[24m>] [-s<[4msrchost[24m>] <[4mname[24m> [<[4mchar[24m> <[4mpass[24m>] <[4mhost[24m> 
  <[4mport[24m> [<[4mfile[24m>]
  [1m/ADDWORLD[22;0m [-T<[4mtype[24m>] [-s<[4msrchost[24m>] <[4mname[24m>
  [1m/ADDWORLD[22;0m [-T<[4mtype[24m>] DEFAULT [<[4mchar[24m> <[4mpass[24m> [<[4mfile[24m>]]
  ____________________________________________________________________________

  Defines a new [1mworld[22;0m or redefines an existing [1mworld[22;0m with the name <[4mname[24m>.  
  <[4mName[24m> may not contain spaces; addtionally, when defining a new world, 
  <[4mname[24m> may not begin with "(".  

  <[4mHost[24m> is a server's internet hostname, IPv4 address, or (if your platform 
  supports it) IPv6 address.  <[4mPort[24m> is the number or name of a TCP port on 
  the host.  If <[4mhost[24m> and <[4mport[24m> are blank, then "connecting" to the world 
  will only create a tf window for the world, it will not open an actual 
  network connection; this is called a "connectionless" socket.  

  There may be a special [1mworld[22;0m named "default" which does not have a <[4mhost[24m> or 
  <[4mport[24m>.  If a normal [1mworld[22;0m is defined without a <[4mcharacter[24m>, <[4mpass[24m>, <[4mtype[24m>, 
  or <[4mmfile[24m>, then that [1mworld[22;0m will use the corresponding field of the 
  "default" [1mworld[22;0m if there is one.  If the "default" [1mworld[22;0m is redefined, 
  [1mworlds[22;0m with omitted fields will use the new default values.  

  In function form, <[4mflags[24m> is a string of 0 or more letters that modify the 
  behavior of the function.  For compatability with older versions of TF, an 
  "f" or "0" in <[4mflags[24m> has the same effect as "p", and an "n" or "1" in 
  <[4mflags[24m> has no effect.  

  [1mOptions[22;0m: 
  command: -p 
  function: <[4mflags[24m> contains "p" 
          [1m%{proxy_host}[22;0m will be ignored, and all connections to the world will 
          be direct.  By default, worlds use [1m%{proxy_host}[22;0m if it is set.  
  command: -x 
  function: <[4mflags[24m> contains "x" 
          TF will use the SSL protocol to make connections to this world.  
  command: -e 
  function: <[4mflags[24m> contains "e" 
          all text sent to the world will be echoed right back as if it were 
          received from the world (in addition to being sent to the server).  
          This is most useful with connectionless sockets.  
  command: -s<[4msrchost[24m> 
  function: <[4msrchost[24m> 
          defines the host name or IP address to use for the local (tf) side 
          of the connection.  This is useful if the host has multiple network 
          interfaces and you need to override the default choice of the OS.  
  command: -T<[4mtype[24m> 
  function: <[4mtype[24m> 
          The optional <[4mtype[24m> is used in hooks and triggers, and for automatic 
          [1mlogin[22;0m and flag setting.  (See below.) 

  The library pre-defines WORLD and LOGIN hooks for types that match these 
  [1mglob patterns[22;0m: 

  (none)  TinyMud [1mlogin[22;0m format ("connect <[4mchar[24m> <[4mpass[24m>"), the value of [1mlp[22;0m is 
          not changed.  

  tiny, tiny.* 
          TinyMud [1mlogin[22;0m format ("connect <[4mchar[24m> <[4mpass[24m>"), [1mlp[22;0m=off.  

  lp, lp.* 
  diku, diku.* 
  aber, aber.* 
          LP/Diku [1mlogin[22;0m format (sends <[4mchar[24m> and <[4mpass[24m> on separate lines), 
          [1mlp[22;0m=on.  For servers that send unterminated prompts.  

  lpp, lpp.* 
          LP/Diku [1mlogin[22;0m format, [1mlp[22;0m=off.  For muds that use GOAHEAD or EOR 
          [1mprompt protocol[22;0m.  

  telnet, telnet.* 
          Telnet [1mlogin[22;0m format (sends <[4mchar[24m> and <[4mpass[24m> when "login:" and 
          "password:" prompts are received), [1mlp[22;0m=on, [1m/localecho[22;0m on.  For any 
          line-by-line telnet service.  

  You can define your own world types for use in other triggers or hooks.  If 
  you use names that match the [1mglob[22;0m patterns above, the standard library hooks 
  will still work.  For example, if you did: 

    [1m/test[22;0m [1maddworld[22;0m("Cave", "tiny.muck.",     "cave.tcp.com", 2283, <[4mchar[24m>, <[4mpass[24m>)
    [1m/test[22;0m [1maddworld[22;0m("Foo",  "tiny.muck.msp.", "foo.com",      9999, <[4mchar[24m>, <[4mpass[24m>)
    [1m/test[22;0m [1maddworld[22;0m("Cow",  "tiny.moo.",      "cow.com",      8267, <[4mchar[24m>, <[4mpass[24m>)
    [1m/test[22;0m [1maddworld[22;0m("Buzz", "tiny.moo.msp.",  "buzz.org",     8267, <[4mchar[24m>, <[4mpass[24m>)

  then tiny-style [1mautologin[22;0m would still work (using the library hooks), and 
  you could also define your own [1mtriggers[22;0m and [1mhooks[22;0m specific to TinyMUCKs or 
  TinyMOOs (e.g., "[1m/def[22;0m [1m-T[22;0mtiny.muck.*") or to worlds that support MSP 
  regardless of their server type (e.g., "[1m/def[22;0m [1m-T[22;0m*.msp.*"), etc.  Note the 
  trailing period on the world type defintions, which make it easier to write 
  matching triggers.  

  Any <[4mtype[24m> is valid, but is only useful if it is matched by a "[1m-T<[4mtype[24m>[22;0m" 
  option of a [1mhook[22;0m or [1mtrigger[22;0m.  

  If [1maddworld()[22;0m with a password is executed from a file that has permissions 
  making it readable by others, it will produce a warning.  You should change 
  the file permissions to prevent other people from reading your password.  

  See: [1mworlds[22;0m, [1m/connect[22;0m, [1m/fg[22;0m, [1m/unworld[22;0m, [1m/edworld[22;0m, [1m/telnet[22;0m 

&/addtiny
&/addlp
&/addlpp
&/adddiku
&/addtelnet

/add<[4mworldtype[24m>

  The comamnds [1m/addtiny[22;0m, [1m/addlp[22;0m, [1m/addlpp[22;0m, [1m/adddiku[22;0m, and [1m/addtelnet[22;0m take the 
  same arguments as [1m/addworld[22;0m, and also give that world a type.  A world's 
  type determines the format for automatic login and flag settings.  

  See: [1m/addworld[22;0m 

&/alias
&/unalias

/alias

  Usage: 

  [1m/REQUIRE[22;0m alias.tf

  [1m/ALIAS[22;0m [<[4mname[24m> [<[4mcommand[24m>]]
  [1m/UNALIAS[22;0m <[4mname[24m>
  [1m/PURGEALIAS[22;0m
  ____________________________________________________________________________

  With no arguments, [1m/alias[22;0m lists all aliases.  With a <[4mname[24m> argument, [1m/alias[22;0m 
  lists the alias with names that match the glob pattern <[4mname[24m>.  Otherwise, 
  [1m/alias[22;0m defines <[4mname[24m> as an alias for <[4mcommand[24m>.  

  [1m/Unalias[22;0m undefines an alias for <[4mname[24m> that was defined with [1m/alias[22;0m.  

  [1m/Purgealias[22;0m undefines all aliases defined with [1m/alias[22;0m.  Note that 
  [1m/purgealias[22;0m does not take a pattern argument.  

  To use an alias, just type its name followed by any optional arguments.  
  Unlike [1mmacros[22;0m defined with [1m/def[22;0m, you do not type '/' before <[4mname[24m> to 
  execute an alias.  [1mArgument substitution[22;0m in aliases works the same as in 
  [1mmacros[22;0m.  

  As of 3.5 alpha 11, aliases can be called from other aliases or [1mmacros[22;0m.  To 
  send a line of text to the server without alias calls, use [1msend()[22;0m.  If an 
  old alias that used to work now results in "Too many recursions", you need 
  to rewrite the alias to use [1msend()[22;0m.  

  Using [1m/def[22;0m instead of [1m/alias[22;0m is recommended.  

  See: [1m/def[22;0m, [1mmacros[22;0m, [1msubstitution[22;0m, [1mtfrc[22;0m 

&/at

/at

  Usage: 

  [1m/AT[22;0m [-v] [<[4mdate[24m>] <[4mtime[24m> <[4mcommands[24m>
  ____________________________________________________________________________

  <[4mCommands[24m> will be executed at <[4mdate[24m> and <[4mtime[24m>.  <[4mDate[24m> must be of the 
  form "<[4myear[24m>-<[4mmonth[24m>-<[4mday[24m>" or "<[4mmonth[24m>-<[4mday[24m>", where <[4myear[24m> may be 2 or 4 
  digits.  <[4mTime[24m> must be of the form "<[4mhours[24m>:<[4mminutes[24m>" or 
  "<[4mhours[24m>:<[4mminutes[24m>:<[4mseconds[24m>", where <[4mhours[24m> is between 0 and 23, and 
  <[4mseconds[24m> may be specified to the nearest microsecond.  If any part of the 
  date is omitted, it defaults to the nearest value for which <[4mdate[24m> and 
  <[4mtime[24m> are in the future.  For example, if the current time is 16:00, then 
  an argument of "15:00" means 15:00 tomorrow, and "17:00" means 17:00 today.  

  [1mOptions[22;0m: 
  -v      verbose: prints full date and time 

  Examples: 
  [1m/at[22;0m 04-01 00:00:00 [1m/echo[22;0m Happy April Fools Day!
  [1m/def[22;0m lunch_reminder = [1m/at[22;0m 12:00 [1m/echo[22;0m Lunchtime!%%; /lunch_reminder

  See: [1mprocesses[22;0m, [1m/repeat[22;0m, [1m/quote[22;0m 

&/bamf

/bamf

  Usage: 

  [1m/BAMF[22;0m [OFF|ON|OLD]
  ____________________________________________________________________________

  Sets the flag [1m%{bamf}[22;0m.  This flag controls whether TF will cooperate with 
  portals.  A portal allows a mud character to move from one server to another 
  transparently, by simply going through a seemingly normal mud exit.  

  How it works: A "portal" is text sent by a server of the form: 


    #### Please reconnect to <[4mname[24m>@<[4maddr[24m> (<[4mhost[24m>) port <[4mport[24m> #### 

  For example: 


    #### Please reconnect to Islandia@128.100.102.51 (hawkwind.utcs.toronto.edu) port 2323 #### 

  If [1m%{bamf}[22;0m is off, lines in this format have no effect.  If [1m%{bamf}[22;0m is on, 
  Fugue will attempt to use the portal as an UnterMUD portal: it will 
  disconnect from the [1mcurrent[22;0m world, and attempt to connect to the new world; 
  if the [1m%{login}[22;0m flag is also on, TF will try to log in to the new world 
  using the name and password from the [1mcurrent[22;0m world.  If bamf is "old", Fugue 
  will connect to the new world without disconnecting from the [1mcurrent[22;0m world.  
  If [1m%{login}[22;0m is also on, and the new world has been defined with a name and 
  password in an [1m/addworld[22;0m command, Fugue will attempt to log in 
  automatically.  

  Note that on many servers, arbitrary users can spoof the portal text, 
  redirecting your tf against your will if you have bamfing enabled.  

  The flag [1m%{bamf}[22;0m defaults to 0 (off).  

  See: [1mworlds[22;0m, [1msockets[22;0m, [1m%bamf[22;0m, [1m%login[22;0m 

&/beep

/beep

  Usage: 

  [1m/BEEP[22;0m [<[4mnumber[24m>|ON|OFF]
  ____________________________________________________________________________

  [1m/beep[22;0m causes Fugue to emit <[4mnumber[24m> beeps (ASCII 7).  [1m/beep[22;0m with no 
  arguments will emit three beeps.  [1m/beep[22;0m OFF causes Fugue to ignore further 
  calls to [1m/beep[22;0m until a [1m/beep[22;0m ON is performed.  

  Note that on many terminals, multiple immediate beeps are indistinguishable. 
  You can use [1m/repeat[22;0m to put a delay between beeps: 

    [1m/repeat[22;0m -0.2 5 [1m/beep[22;0m

&/bind

/bind

  Usage: 

  [1m/BIND[22;0m <[4msequence[24m> = <[4mcommand[24m>
  ____________________________________________________________________________

  Creates a [1mmacro[22;0m that will be executed when <[4msequence[24m> is typed at the 
  keyboard.  The <[4msequence[24m> may use ^<[4mkey[24m> notation for a control key, and 
  \<[4mnumber[24m> for an ascii character code in octal, hexadecimal, or decimal.  
  For example, the escape character can be given by any of these forms: ^[, 
  \033, \0x1B, or \27.  

  When the key sequence <[4msequence[24m> is typed at the keyboard, <[4mcommand[24m> is 
  executed.  The command is actually a [1mmacro[22;0m body, so all the substitutions 
  described under "[1mevaluation[22;0m" will be performed.  The most common command 
  used with a key binding is [1m/dokey[22;0m.  

  At [1mstartup[22;0m, TF defines bindings for [1m/dokey[22;0m BSPC, BWORD, DLINE, REFRESH, 
  LNEXT, UP, DOWN, RIGHT, and LEFT based on your terminal settings.  Also, the 
  standard [1mmacro[22;0m library defines a set of (invisible) default bindings, one 
  for each of the [1m/dokey[22;0m functions.  

  If [1m/bind[22;0m fails for any reason, it returns 0.  Otherwise, it returns the 
  number of the new [1mmacro[22;0m (useful in [1m/undefn[22;0m and [1m/edit[22;0m).  

  As of version 3.5, the NUL character (^@) is allowed in keybindings.  

  The command
  [1m/bind[22;0m <[4msequence[24m> = <[4mcommand[24m>
  is equivalent to
  [1m/def[22;0m [1m-b[22;0m"<[4msequence[24m>" = <[4mcommand[24m>. 

  Examples: 

    [1m/bind[22;0m ^Xtw = :jumps to the left%;:steps to the right!
    [1m/bind[22;0m ^[q = [1m/set[22;0m [1mmore[22;0m off
    [1m/bind[22;0m ~ky = [1m/input[22;0m Kyosuke

  See: [1mkeys[22;0m, [1m/dokey[22;0m, [1m/unbind[22;0m, [1m/input[22;0m, [1minterface[22;0m 

&/break

/break

  Usage: 

  [1m/BREAK[22;0m [<[4mn[24m>]
  ____________________________________________________________________________

  During [1mmacro[22;0m evaluation, [1m/BREAK[22;0m unconditionally terminates the nearest 
  enclosing [1m/WHILE[22;0m loop.  If <[4mn[24m> is specified, it will break out of <[4mn[24m> 
  enclosing [1m/WHILE[22;0m loops.  If used outside a [1m/WHILE[22;0m loop, the [1mmacro[22;0m evaluation 
  is terminated.  

  See: [1m/while[22;0m, [1m/return[22;0m, [1m/exit[22;0m, [1mevaluation[22;0m 

&/cat

/cat

  Usage: 

  [1m/CAT[22;0m [%]
  ____________________________________________________________________________

  Concatenates (puts together) all subsequent lines until a line containing a 
  single "." is typed.  If the argument "%" is given, a "%;" sequence is 
  appended to each intermediate line.  The concatenated result is then 
  executed as a single line.  

  The concatenated result is stored in the input [1mhistory[22;0m as a single line, so 
  intermediate lines can not be recalled separately.  

  Example: 

    [1m/cat[22;0m %
    :foo
    :bar
    :baz
    . 

  This produces: 

    :foo%;:bar%;:baz

  If the [1m%{sub}[22;0m flag is set on, this will [1mexpand[22;0m to three lines ":foo", ":bar" 
  and ":baz" and be sent to the [1msocket[22;0m.  

  See: [1m/paste[22;0m, [1m/sub[22;0m, [1mgeneral[22;0m, [1mhistory[22;0m 

&/changes

/changes

  Usage: 

  [1m/CHANGES[22;0m [<[4mversion[24m>]
  ____________________________________________________________________________

  List the changes in a <[4mversion[24m> of TinyFugue; if omitted, <[4mversion[24m> defaults 
  to the current version.  <[4mVersion[24m> can be a full version name (e.g., "5.0 
  beta 7") or just the major and minor numbers (e.g., "5.0").  The information 
  is kept in the file [1m%TFLIBDIR/CHANGES[22;0m.  

  A list of changes in the latest version of tf can be found at 
  [1mhttp://tinyfugue.sourceforge.net/CHANGES[22;0m.  

  See: [1m/version[22;0m 

&completion
&/complete

/complete

  Usage: 

  [1m/COMPLETE[22;0m [<[4mtype[24m>]
  ____________________________________________________________________________

  When a part of a word is typed, and then [1m/complete[22;0m is called (from a 
  [1mkeybinding[22;0m), it will attempt to fill in the rest of the word.  The possible 
  words it chooses from depend on <[4mtype[24m>.  If no <[4mtype[24m> is given, it completes 
  from context: it will choose the type of completion based on earlier parts 
  of the line being typed, plus previous [1minput history[22;0m.  For example, if the 
  line begins with "/connect", it will use worldname completion; if the word 
  begins with "%" or "%{", it will use variable name completion; etc.  

  The following table lists the meanings and the default [1mkeybindings[22;0m for each 
  type.  

      Keys                Type            Meaning
      ----                ----            -------
      ^[^I (ESC TAB)                      complete word depending on context
      ^[^W                worldname       complete tf world name
      ^[$                 macroname       complete tf macro name
      ^[%                 variable        complete tf variable name
      ^[/                 filename        complete file name (unix only)
      ^[;                 user_defined    complete from [1m%{completion_list}[22;0m
      ^[i                 input_history   complete from previously typed words
                          sockname        complete name of open tf socket

  The "ESC TAB" and "ESC ;" bindings will use the [1m%{completion_list}[22;0m [1mvariable[22;0m, 
  in which you can store a list of any words you want to be able to complete.  

  You can also define your own types of completion.  See the 
  [1m%{TFLIBDIR}[22;0m/complete.tf file for more information.  

  See: [1mkeybindings[22;0m, [1minterface[22;0m 

&/connect

/connect

  Usage: 

  [1m/CONNECT[22;0m [-lqxbf] [<[4mworld[24m>]
  [1m/CONNECT[22;0m <[4mhost[24m> <[4mport[24m>
  ____________________________________________________________________________

  In the first form, [1m/connect[22;0m attempts to open a [1msocket[22;0m connected to <[4mworld[24m>.  
  <[4mWorld[24m> must be defined by the [1m/addworld[22;0m command and not already open.  If 
  <[4mworld[24m> is omitted, the first defined world will be used.  If <[4mworld[24m> does 
  not have a host and port, [1m/connect[22;0m will create a "connectionless" [1msocket[22;0m.  
  In the form "[1m/connect[22;0m <[4mhost[24m> <[4mport[24m>", it will define a temporary world named 
  "(unnamed<[4mN[24m>)" with the given address, and try to connect to it.  <[4mHost[24m> may 
  be an internet hostname, an [1mIPv4[22;0m address, or (if your platform supports it) 
  an [1mIPv6[22;0m address.  A temporary world will be undefined when it is no longer 
  in use.  

  [1mOptions:[22;0m 
  -l      No [1mautomatic login[22;0m (i.e., don't call the [1mLOGIN[22;0m [1mhook[22;0m).  
  -q      Quiet login (overrides [1m%{quiet}[22;0m flag).  
  -x      Connect using SSL (not necessary if [1mworld[22;0m was defined with the "x" 
          flag).  
  -f      Connect in the foreground 
  -b      Connect in the background 

  The first thing [1m/connect[22;0m does is create a new [1msocket[22;0m.  If the -f option was 
  given, or [1m/connect[22;0m was called from the foreground (e.g., from the command 
  line), the new [1msocket[22;0m is immediately brought into the [1mforeground[22;0m.  If the -b 
  option was given, or [1m/connect[22;0m was called from the background (e.g., from a 
  DISCONNECT [1mhook[22;0m in a [1mbackground[22;0m world), the connection proceeds in the 
  background.  

  If a hostname was given, TF must look it up to find one or more [1mIPv4[22;0m or (if 
  your platform supports it) [1mIPv6[22;0m addresses.  If [1m%{gethostbyname}[22;0m is 
  "nonblocking" (the default), and this process takes more than a fraction of 
  a second, TF will print "Hostname resolution for <[4mworld[24m> in progress" (the 
  PENDING [1mhook[22;0m), and TF will continue running normally while the lookup 
  proceeds.  But if [1m%{gethostbyname}[22;0m is "blocking", TF will freeze until the 
  lookup is finished.  Either way, if the lookup succeeds, TF will try to 
  connect; if it fails, you will be notified.  

  Next, TF tries to open a network connection to the IP address, and prints 
  "Trying to connect to <[4mworld[24m>: <[4maddress[24m> <[4mport[24m>" (the PENDING hook).  On 
  most platforms, if [1m%{connect}[22;0m is "nonblocking" (the default), TF continues 
  running normally while the network connection proceeds.  But if [1m%{connect}[22;0m 
  is "blocking", TF will freeze until the network connection is finished.  If 
  the connection succeeds, a message is printed, but (unlike previous versions 
  of TF) the [1msocket[22;0m is not automatically brought to the [1mforeground[22;0m.  However, 
  if you had run [1m/connect[22;0m in the foreground (e.g.  from the command line), the 
  [1msocket[22;0m would already be in the [1mforeground[22;0m, unless it was nonblocking and had 
  taken a long time and you [1mforegrounded[22;0m another [1msocket[22;0m while you were 
  waiting, in which case you probably wouldn't want to automatically 
  [1mforeground[22;0m the new [1msocket[22;0m.  If you prefer automatic [1mforegrounding[22;0m upon 
  successful connection, you can [1mdefine[22;0m a CONNECT [1mhook[22;0m that calls "[1m/fg[22;0m [1m%{1}[22;0m".  

  Even if [1m%{gethostbyname}[22;0m and/or [1m%{connect}[22;0m are "blocking", they can be 
  interrupted with the SIGINT [1msignal[22;0m (^C).  

  If the connection fails, TF normally prints "Connection to <[4mworld[24m> failed: 
  <[4maddress[24m> <[4mport[24m>: <[4mreason[24m>" (the CONFAIL [1mhook[22;0m).  But, if the failure was in 
  the specific address, and there is more than one address associated with the 
  [1mworld[22;0m's hostname, the message will instead say "Intermediate connection to 
  <[4mworld[24m> failed: ..." (the ICONFAIL [1mhook[22;0m), and TF will try to connect to the 
  next address.  So, a failed [1m/connect[22;0m will always result in a series of zero 
  or more ICONFAIL [1mhooks[22;0m followed by exactly one CONFAIL [1mhook[22;0m.  But an 
  ICONFAIL may also be followed by a successful connection to an alternate 
  address.  

  If the network connection is successful, or the [1msocket[22;0m is "connectionless", 
  these events occur: 

    * If the [1mworld[22;0m was defined with an <[4mmfile[24m>, that file will be loaded 
      (and the LOAD [1mhook[22;0m will be called); 
    * The CONNECT [1mhook[22;0m is called (unless the socket is connectionless or 
      the connection is via a [1mproxy[22;0m).  
    * If [1m%{login}[22;0m is on, and a character and password is defined for the 
      [1mworld[22;0m, the LOGIN [1mhook[22;0m is called (unless the socket is connectionless or 
      the connection is via a [1mproxy[22;0m).  The default LOGIN [1mhooks[22;0m sends the 
      character name and password in a format corresponding to the world type. 
      To automatically login to a world that expects a different login format, 
      define your own LOGIN [1mhook[22;0m.  

  If you have trouble connecting (especially if you use SOCKS), try "[1m/set[22;0m 
  [1mconnect[22;0m=blocking".  

  If your host has multiple network interfaces, the OS will choose one of them 
  for the client end of the connection according to its own rules.  To 
  override the system's choice, set the [1mtfhost[22;0m variable or define the [1mworld[22;0m 
  with a <[4msrchost[24m> parameter to [1maddworld[22;0m.  

  [1m/connect[22;0m returns 0 on error or failure, 1 for immediate success, or 2 if the 
  name lookup or network connection is pending.  

  See: [1mworlds[22;0m, [1msockets[22;0m, [1mproxy[22;0m, [1m/world[22;0m, [1m/addworld[22;0m, [1m/fg[22;0m, [1m/retry[22;0m, [1m%login[22;0m, 
  [1m%gethostbyname[22;0m, [1m%connect[22;0m, [1mhooks[22;0m [1mprocotols[22;0m 

&disconnect
&close
&/dc

/dc

  Usage: 

  [1m/DC[22;0m [<[4mworld[24m>|-ALL]
  ____________________________________________________________________________

  Disconnects from the named world, or the [1mcurrent[22;0m world if no world is given, 
  or all worlds if "-all" is given.  If the flag [1m%{quitdone}[22;0m is on, and [1m/dc[22;0m 
  disconnects the last [1msocket[22;0m, TF will exit.  

  Disconnecting with [1m/dc[22;0m does not invoke the [1mDISCONNECT[22;0m [1mhook[22;0m.  

  See: [1msockets[22;0m, [1m%quitdone[22;0m, [1m/quit[22;0m 

&/def

/def

  Usage: 

  [1m/DEF[22;0m [<[4moptions[24m>] [<[4mname[24m>] [= <[4mbody[24m>]
  ____________________________________________________________________________

  Defines a [1mmacro[22;0m with an optional [1mkeybinding[22;0m, [1mtrigger[22;0m and/or [1mhook[22;0m associated 
  with it.  The [1moptions[22;0m and their meanings are: 

#-msimple
#-mglob
#-mregexp
#/def -m
#-m
  -m<[4mmatching[24m> 
          Determines which matching style should be used for [1m-t[22;0m, [1m-h[22;0m, or [1m-T[22;0m 
          options.  Valid values are "[1msimple[22;0m", "[1mglob[22;0m", and "[1mregexp[22;0m" (see also: 
          [1mpatterns[22;0m).  If omitted, the value of [1m%{matching}[22;0m ("[1mglob[22;0m" by default) 
          is used, unless [1m-P[22;0m is also given, in which case "[1mregexp[22;0m" is used.  

#/def -n
#-n
  -n<[4mshots[24m> 
          The [1mmacro[22;0m is a multi-shot, that is, it will be deleted after it is 
          [1mtrigger[22;0med or [1mhook[22;0med <[4mshots[24m> times.  A value of 0 makes the [1mmacro[22;0m 
          permanent.  Default: 0.  

#/def -E
#-E
  -E<[4mexpression[24m> 
          Before this [1mmacro[22;0m is tested for a [1mtrigger[22;0m ([1m-t[22;0m) or [1mhook[22;0m ([1m-h[22;0m) match, 
          <[4mexpression[24m> is evaluated; if its value is 0, the macro will not be 
          considered a match, so no [1mattributes[22;0m (-a) will be applied, and this 
          macro will not prevent matches of lower [1mpriority[22;0m (-p), and its body 
          will not be executed.  If the value of <[4mexpression[24m> is non-zero, the 
          comparison proceedes as usual.  Note: 
          * [1mpositional parameters[22;0m ([1m%n[22;0m) and [1msubexpression matches[22;0m ([1m%Pn[22;0m) are not 
          available in <[4mexpression[24m>.  
          * Remember that for every macro with a trigger and an -E expression, 
          its <[4mexpression[24m> must be evaluated for every line received.  So, you 
          should keep it simple (e.g., "enable_foo" or "[1m${world_name}[22;0m =~ 
          [1mfg_world[22;0m()").  More complex expressions should be put in the body of 
          the macro.  
          * The body of a high [1mpriority[22;0m [1mmacro[22;0m is not necessarily executed 
          before the -E expression of a lower [1mpriority[22;0m [1mmacro[22;0m is tested, so 
          <[4mexpression[24m> should not rely on values that may be changed by other 
          macros that match the same [1mtrigger[22;0m or [1mhook[22;0m.  
          Default: no [1mexpression[22;0m (i.e., always match if the [1mtrigger[22;0m or [1mhook[22;0m 
          matches).  See: [1mexpressions[22;0m.  

#/def -t
#-t
  -t<[4mpattern[24m> 
          Defines a [1mtrigger[22;0m pattern which will cause the [1mmacro[22;0m to be called 
          when it is matched by a line of text from a socket.  <[4mPattern[24m> may 
          be enclosed in quotes (", ', or `); if so, all occurances of quotes 
          and '\' within the pattern must be preceded with a '\'.  The [1mpattern[22;0m 
          matching style is determined by the [1m-m[22;0m option, or defaults to the 
          value of [1m%{matching}[22;0m.  Default: no [1mtrigger[22;0m.  See: [1mtriggers[22;0m.  

#/def -h
#-h
  -h"<[4mevent[24m>[ <[4mpattern[24m>]" 
          Specifies that the [1mmacro[22;0m will be called automatically whenever 
          <[4mevent[24m> occurs and its arguments match <[4mpattern[24m>.  <[4mEvent[24m> may be a 
          single event name or a list separated by '|'.  If <[4mpattern[24m> is 
          omitted, it will match any arguments, and the quotes may also be 
          omitted.  If quotes are used, then all occurances of quotes and '\' 
          within the option argument must be preceded with a '\'.  The [1mpattern[22;0m 
          matching style is determined by the [1m-m[22;0m option, or defaults to the 
          value of [1m%{matching}[22;0m.  Default: no [1mhook[22;0m.  See: [1mhooks[22;0m.  

#/def -b
#-b
  -b<[4mbind[24m> 
          The [1mmacro[22;0m will be called when the string <[4mbind[24m> is typed at the 
          keyboard.  Default: no binding.  The <[4mbind[24m> string may contain the 
          special codes described under "[1mbind[22;0m".  See: [1mkeys[22;0m.  

#/def -B
#-B
  -B<[4mkeyname[24m> 
          Deprecated.  The [1mmacro[22;0m will be called when the key named <[4mkeyname[24m> 
          (according to the termcap database) is typed at the keyboard.  
          Default: none.  See "[1mkeys[22;0m".  

#/def -p
#-p
  -p<[4mpri[24m> 
          Sets the [1mpriority[22;0m of the [1mmacro[22;0m's [1mtrigger[22;0m or [1mhook[22;0m to <[4mpri[24m>.  As in 
          all [1mnumeric options[22;0m, the argument to -p may be an [1mexpression[22;0m that 
          has a numeric value.  E.g.  "[1m/def[22;0m -pmaxpri ..." will set the macro's 
          priority to the value of the variable maxpri.  The [1mexpression[22;0m is 
          evaluated only once, when the macro is defined.  Default: 1.  See 
          also: [1mfall-thru[22;0m.  See: [1mpriority[22;0m, [1m/def -F[22;0m.  

#/def -c
#-c
  -c<[4mchance[24m> 
          Sets the percent probability of executing the body of a matched 
          [1mtrigger[22;0m or [1mhook[22;0m.  (The macro still counts as a match for attributes 
          and priority even if it does not execute.) Default: 100%.  

#/def -w
#-w
  -w<[4mworld[24m> 
          If the [1mmacro[22;0m has a [1mtrigger[22;0m or [1mhook[22;0m, it can be matched only by text 
          or events from <[4mworld[24m>.  Default: any world.  

#/def -T
#-T
  -T<[4mtype[24m> 
          If the [1mmacro[22;0m has a [1mtrigger[22;0m or [1mhook[22;0m, it can be matched only by text 
          or events from worlds of type <[4mtype[24m>.  (See: [1m/addworld[22;0m).  The 
          [1mpattern[22;0m matching style is determined by the [1m-m[22;0m option, or defaults 
          to the value of [1m%{matching}[22;0m.  Default: any type.  

#/def -F
#-F
  -F      [1mFall-thru[22;0m: on a [1mtrigger[22;0m or [1mhook[22;0m, allows additional matches of lower 
          [1mpriority[22;0m to be run.  Default: not [1mfall-thru[22;0m.  See: [1mpriority[22;0m 

#/def -a
#-a
  -a[ngGLAurBbhC] 
          Set [1mattribute[22;0m(s) (normal, [1mgag[22;0m, nohistory, nolog, noactivity, 
          underline, reverse, bold, bell, [1mhilite[22;0m, Color) used to display text 
          matched by the [1mtrigger[22;0m or to display the default message of a [1mhook[22;0m.  
          Default: normal.  See: [1mattributes[22;0m.  

#/def -P
#-P
  -P[<[4mpart[24m>]<[4mattr[24m>[;[<[4mpart[24m>]<[4mattr[24m>]...  
          Define a "partial [1mhilite[22;0m".  The argument consists of a list of pairs 
          of parts (<[4mpart[24m>) and attributes (<[4mattr[24m>), separated by ';'.  When a 
          line matches the [1mregexp[22;0m [1mtrigger[22;0m of this macro, each <[4mattr[24m> is 
          applied to the corresponding <[4mpart[24m> of the line.  <[4mAttr[24m> can contain 
          any of the [1mattribute[22;0m codes "nxurBhC".  (normal, exclusive, 
          underline, reverse, bold, [1mhilite[22;0m, Color).  The value of <[4mpart[24m> 
          determines which part of the text is affected: 
          L       text to the left of the [1mregexp[22;0m match 
          R       text to the right of the [1mregexp[22;0m match 
          0       text matched by the entire [1mregexp[22;0m 
          <[4mnumber[24m>
                  text matched by the the <[4mnumber[24m>th parenthesized 
                  subexpression of the [1mregexp[22;0m.  
          If <[4mpart[24m> is omitted it defaults to 0.  If <[4mpart[24m> is a number and 
          there are multiple matches in the text, the <[4mattr[24m> will be applied 
          to all of the matches.  Implies [1m-m[22;0mregexp.  Only one [1m-P[22;0m option is 
          allowed.  See: [1mattributes[22;0m.  

#/def -f
#-f
  -f      Same as [1m-a[22;0m, for backward compatibility.  

#/def -I
#-I
#/def -i
#-i
  -i 
  -I      Makes the [1mmacro[22;0m "invisible".  Invisible [1mmacros[22;0m are not processed by 
          [1m/list[22;0m, [1m/save[22;0m, or [1m/purge[22;0m unless forced.  Default: not invisible.  

#/def -q
#-q
  -q      Makes the [1mmacro[22;0m "quiet".  If called as a [1mtrigger[22;0m, the [1mmacro[22;0m will not 
          count toward the [1mBACKGROUND[22;0m [1mhook[22;0m or the return value of [1m/trigger[22;0m.  
          If called as a [1mSEND[22;0m [1mhook[22;0m, the [1mmacro[22;0m will not prevent the sending of 
          the original input.  If called as a [1mPROMPT[22;0m [1mhook[22;0m, the [1mmacro[22;0m will not 
          remove the text from the data stream.  

#-1
  -1      Defines a one-shot.  Equivalent to "[1m-n[22;0m1".  

#
  <[4mname[24m>  The name of the [1mmacro[22;0m.  Default: no name.  Names should begin with a 
          letter, and contain letters, numbers, or '_' characters.  This is 
          not enforced, but other characters (especially '$', '/', and '%') 
          may cause unwanted interpretations during [1mexpansion[22;0m.  

  = <[4mbody[24m> 
          Text to be executed when [1mmacro[22;0m is called.  Default: no body.  

  If [1m/def[22;0m could not create a new [1mmacro[22;0m, it returns 0.  Otherwise, it returns 
  the number of the new [1mmacro[22;0m (useful with [1m/undefn[22;0m and [1m/edit[22;0m).  
  ____________________________________________________________________________

##follow
  Example: 

    [1m/def[22;0m follow = \
        [1m/def[22;0m [1m-T^tiny[22;0m [1m-mregexp[22;0m [1m-p2[22;0m [1m-t[22;0m"^[1m%{1}[22;0m goes ([a-z]*)\\\\.$$" do_follow = \
            go %%P1

  This will create a [1mmacro[22;0m named "follow".  When it is called like "/follow 
  Joe", it will execute the command 

    [1m/def[22;0m [1m-T^tiny[22;0m [1m-mregexp[22;0m [1m-p2[22;0m [1m-t[22;0m"^Joe goes ([a-z]*)\\.$" do_follow = go [1m%P1[22;0m

  Note the [1msubstitutions[22;0m that occurred: "[1m%{1}[22;0m" was replaced with the first 
  (and only) argument; each "[1m\\[22;0m" was replaced with "\"; "[1m$$[22;0m" was replaced with 
  "$"; and "[1m%%[22;0m" was replaced with "%".  

  That command, in turn, defines another [1mmacro[22;0m called "do_follow", with a 
  [1mregexp[22;0m [1mtrigger[22;0m 

    ^Joe goes ([a-z]*)\.$

  which will only match on worlds whose type matches the [1mregexp pattern[22;0m 
  "^tiny".  

  Thereafter, when a line like "Joe goes north." is received, it will match 
  the [1mtrigger[22;0m, and cause this command to be executed: 

    go north

  Note how "[1m%P1[22;0m" was substituted with the text matched by the first set of 
  parentheses (in this case, "north").  

  When writing nested [1mmacros[22;0m like this, it is usually easiest to think 
  backwards.  In this example, you would first figure out how /do_follow 
  should be defined, and then figure out how to define /follow in such a way 
  that it will define /do_follow.  
#
  ____________________________________________________________________________

  [1m/def[22;0m is sufficient to perform all the functions of the [1m/trig[22;0m, [1m/trigp[22;0m, 
  [1m/trigc[22;0m, [1m/trigpc[22;0m, [1m/gag[22;0m, [1m/hilite[22;0m, [1m/partial[22;0m, [1m/hook[22;0m, and [1m/bind[22;0m commands.  

  See: [1mmacros[22;0m, [1mtriggers[22;0m, [1mpatterns[22;0m, [1mhooks[22;0m, [1mpriority[22;0m, [1mevaluation[22;0m, [1mattributes[22;0m, 
  [1m/undef[22;0m, [1m/undefn[22;0m, [1m/purge[22;0m, [1m/list[22;0m, [1m/save[22;0m, [1m/load[22;0m 

&/dokey

/dokey

  Usage: 

  [1m/DOKEY[22;0m <[4mname[24m>
  ____________________________________________________________________________

  Performs an action that is intended to be invoked from a [1mkeybinding[22;0m created 
  with [1m/bind[22;0m or [1m/def -b[22;0m.  Most of the actions not meaningful or useful when 
  the [1m/dokey[22;0m command is executed from the command line.  


    Name          Default binding   Action
    ----          ---------------   --------
#bs
#backspace
#bspc
    BSPC          (stty), ^H, ^?    Backspace
#bword
    BWORD         (stty), ^W        Delete previous word
#dline
    DLINE         (stty), ^U        Delete entire line
#refresh
    REFRESH       (stty), ^R        Refresh line
#lnext
    LNEXT         (stty), ^V        Ignore any binding next key might have
#

#up
    UP            (none)            Cursor up
#down
    DOWN          (none)            Cursor down
#right
    RIGHT         [1mkey_right[22;0m         Cursor right
#left
    LEFT          [1mkey_left[22;0m          Cursor left
#

#newline
    NEWLINE       ^J, ^M            Execute current line
#recallb
    RECALLB       ^P                Recall previous input line
#recallf
    RECALLF       ^N                Recall next input line
#recallbeg
    RECALLBEG     ^[<               Recall first input line
#recallend
    RECALLEND     ^[>               Recall last input line
#searchb
    SEARCHB       ^[p               Search backward in input history
#searchf
    SEARCHF       ^[n               Search forward in input history
#socketb
    SOCKETB       ^[b               Switch to previous [1msocket[22;0m
#socketf
    SOCKETF       ^[f               Switch to next [1msocket[22;0m
#dword
    DWORD         ^[d               Delete word
#del
#delete
#dch
    DCH           ^D                Delete character under cursor
#redraw
    REDRAW        ^L                Redraw screen
#clear
    CLEAR         ^[^L              Clear screen
#home
    HOME          ^A                Go to beginning of line
#end
    END           ^E                Go to end of line
#wleft
    WLEFT         ^B                Go left, to beginning of word
#wright
    WRIGHT        ^F                Go right, to end of word
#deol
    DEOL          ^K                Delete from cursor to end of line
#pause
    PAUSE         ^S                Pause screen
#page
    PAGE          [1mkey_tab[22;0m           Scroll 1 page forward ("[1mmore[22;0m")
#pageback
    PAGEBACK      (none)            Scroll 1 page backward ("[1mmore[22;0m")
#hpage
    HPAGE         ^X]               Scroll half page forward ("[1mmore[22;0m")
#hpageback
    HPAGEBACK     ^X[               Scroll half page backward ("[1mmore[22;0m")
#pgup
    PGDN          [1mkey_pgdn[22;0m          [1m/dokey_hpage[22;0m
#pgup
    PGUP          [1mkey_pgup[22;0m          [1m/dokey_hpageback[22;0m
#line
    LINE          ^[^N              Scroll forward 1 line ("[1mmore[22;0m")
#lineback
    LINEBACK      ^[^P              Scroll backward 1 line ("[1mmore[22;0m")
#flush
    FLUSH         ^[j               Jump to end of scroll buffer
#selflush
    SELFLUSH      ^[J               Show lines with [1mattributes[22;0m,
                                        and jump to end of buffer

#

  A default of "(stty)" means the key sequence is that used by your terminal 
  driver.  A default of the form "key_<[4mname[24m>" means the key named <[4mname[24m> (see 
  [1mkeybindings[22;0m).  

  The return value of [1m/dokey[22;0m depends on the action.  The movement and deletion 
  actions return the new position of the cursor; the scrolling actions return 
  the number of lines scrolled.  The return values of other actions aren't 
  very useful.  

  See "[1mkeybindings[22;0m" for a complete list of keybindings.  

  Example: 

    [1m/bind[22;0m ^B = [1m/dokey[22;0m RECALLB
    [1m/bind[22;0m ^F = [1m/dokey[22;0m RECALLF

  Then, ^B and ^F could be used to recall input backwards and forwards.  

  See: [1mkeybindings[22;0m, [1m/bind[22;0m, [1msockets[22;0m, [1mhistory[22;0m, [1m/more[22;0m 

&/echo
&/_echo
&echo()

echo()

  [1mFunction[22;0m usage: 

  [1mECHO[22;0m(<[4mtext[24m> [, <[4mattrs[24m> [, <[4minline[24m> [, <[4mdest[24m>]]])

  Command usage: 

  [1m/ECHO[22;0m [-peA] [-a<[4mattrs[24m>] [-w[<[4mworld[24m>]] <[4mtext[24m>
  [1m/_ECHO[22;0m <[4mtext[24m>
  ____________________________________________________________________________

  Displays <[4mtext[24m> on the [1mtfout stream[22;0m (i.e., the screen, usually), unless 
  otherwise redirected by options.  

  [1mOptions[22;0m and arguments: 
  command: -a<[4mattrs[24m> 
  function: <[4mattrs[24m> 
          Echo <[4mtext[24m> with the [1mattributes[22;0m given by <[4mattrs[24m>.  
  command: -p 
  function: <[4minline[24m> = "on" or 1 
          Interpet "@{<[4mattr[24m>}" strings as commands to set [1mattributes[22;0m inline.  
          "@@" strings are interpreted as "@".  "@{n}" or "@{x}" will turn 
          attributes off.  See also: [1mdecode_attr()[22;0m.  
  command: -w<[4mworld[24m> 
  function: <[4mdest[24m> = "w<[4mworld[24m>" 
          Echo <[4mtext[24m> to the <[4mworld[24m> [1mstream[22;0m instead of the default [1mtfout 
          stream[22;0m (see [1mtfio[22;0m).  If <[4mworld[24m> is blank, the [1mcurrent[22;0m world is 
          assumed.  
  command: -e 
  function: <[4mdest[24m> = "e" 
          Echo <[4mtext[24m> to the [1mtferr stream[22;0m, instead of the default [1mtfout stream[22;0m 
          (see [1mtfio[22;0m).  
  function: <[4mdest[24m> = "o" 
          Echo <[4mtext[24m> to the [1mtfout stream[22;0m (the default).  
  command: -A 
  function: <[4mdest[24m> = "a" 
          Echo <[4mtext[24m> to the [1malert stream[22;0m, instead of the default [1mtfout stream[22;0m 
          (see [1mtfio[22;0m).  

  The command form is usually more convenient, but the function form is the 
  only way to echo text with leading or trailing spaces.  Remember that "-" by 
  itself can be used to mark the end of command [1moptions[22;0m, in case <[4mtext[24m> begins 
  with "-".  

  [1m/_echo[22;0m is more efficient than [1m/echo[22;0m, so it is better for use in heavily used 
  macros that don't need all the options of [1m/echo[22;0m.  

  When echoing to the [1mtferr stream[22;0m, if no <[4mattrs[24m> are specified, text will be 
  echoed with the "E" [1mattribute[22;0m.  

  Example: Both of these commands 

    [1m/test[22;0m [1mecho[22;0m("@{u}Hello@{n}, world!", "BCred", 1)
    [1m/echo[22;0m -aBCred -p @{u}Hello@{n}, world!

  echo the following line, with "Hello" underlined, and the whole line bold 
  red: 

    [31m[1m[4mHello[24m, world![22m[0m

  Echoed text is not matched against [1mtriggers[22;0m.  To do that, use [1m/trigger[22;0m.  

  See: [1mattributes[22;0m, [1mworlds[22;0m, [1mfwrite()[22;0m, [1mpad()[22;0m, [1mtfio[22;0m 

&/edit

/edit

  Usage: 

  [1m/EDIT[22;0m [<[4moptions[24m>] [<[4mname[24m>] [= <[4mbody[24m>]
  ____________________________________________________________________________

  Edits a currently existing [1mmacro[22;0m or the [1mtrigger[22;0m associated with a [1mmacro[22;0m.  
  Options are described under "[1mdef[22;0m".  The name of the [1mmacro[22;0m must be specified 
  and cannot be changed, with the following two exceptions: 

  1.  The [1mmacro[22;0m name can be specified as "#<[4mnum[24m>" where <[4mnum[24m> is the number of 
  the [1mmacro[22;0m instead of the name.  A [1mmacro[22;0m number can be determined by listing 
  the [1mmacro[22;0m with [1m/list[22;0m, or from the return value of [1m/def[22;0m or [1m/edit[22;0m.  

  2.  The [1mmacro[22;0m name can be specified as "$<[4mpattern[24m>" where <[4mpattern[24m> is the 
  [1mtrigger[22;0m pattern.  You may still change the pattern if this is used to locate 
  the [1mmacro[22;0m.  

  In either case, the name cannot be changed.  It is possible to create a 
  [1mmacro[22;0m which changes the name of a [1mmacro[22;0m, if it does not have any options 
  other than a name and a body: 

  [1m/def[22;0m rename = [1m/def[22;0m [1m%2[22;0m = $[1m%1[22;0m%; [1m/undef[22;0m [1m%1[22;0m 

  How this works is discussed in the help section "[1mexpansion[22;0m".  

  Also, the [1m/edmac[22;0m command will allow you to edit an existing macro definition 
  on the command line.  

  The [1m-i[22;0m flag will be cleared automatically from the [1mmacro[22;0m if it is not 
  explicitly given to [1m/edit[22;0m.  The body may be cleared by specifiying "=" with 
  nothing after it; if "=" is not present at all, the macro's body will be 
  unchanged.  It is not possible to clear the [1m-F[22;0m option.  The [1m-w[22;0m, [1m-T[22;0m [1m-t[22;0m, and 
  [1m-h[22;0m options also can not be cleared, but their arguments can be changed.  The 
  [1m-T[22;0m, [1m-t[22;0m, and [1m-h[22;0m options will use the [1mpattern matching style[22;0m specified by the 
  [1m-m[22;0m option to the [1m/edit[22;0m command; they will [4mnot[24m inherit [1m-m[22;0m from the original 
  definition.  Any other options that are not specified with [1m/edit[22;0m will remain 
  unchanged from the original definition.  

  As of version 5.0, [1m/edit[22;0m does not renumber the macro being edited.  

  Example: 

  [1m/def[22;0m [1m-p2[22;0m [1m-t[22;0m"* has arrived." [1m-ah[22;0m greet = :greets [1m%1[22;0m
  [1m/edit[22;0m -c0 greet 

  The second command will change the probability of /greet's [1mtrigger[22;0m from 100% 
  to 0%, effectively disabling it without actually [1mundefining[22;0m it (however, 
  because it is not [1mfall-through[22;0m, it will still block other triggers of lower 
  [1mpriority[22;0m).  

  See: [1mmacros[22;0m, [1mtriggers[22;0m, [1mpatterns[22;0m, [1mevaluation[22;0m, [1mattributes[22;0m, [1m/def[22;0m, [1m/list[22;0m, [1m/edmac[22;0m 

&/escape

/escape

  [1mFunction[22;0m usage: 

  [1mESCAPE[22;0m(<[4mmetacharacters[24m>, <[4mstring[24m>)

  Command usage: 

  [1m/ESCAPE[22;0m <[4mmetacharacters[24m> <[4mstring[24m>
  ____________________________________________________________________________

  Echoes (in command form) or returns (in [1mfunction[22;0m form) <[4mstring[24m>, with any 
  <[4mmetacharacters[24m> or '\' characters contained in <[4mstring[24m> preceded by a '\' 
  character.  

  Example: 

  [1m/def[22;0m blue = [1m/def[22;0m [1m-a[22;0mCblue [1m-t[22;0m"$([1m/escape[22;0m " [1m%*[22;0m)"
  /blue * pages, "*" 

  When the second command executes, it will [1mexpand[22;0m to: 

  [1m/def[22;0m [1m-a[22;0mCblue [1m-t[22;0m"* pages, \"*\"" 

  See: [1mevaluation[22;0m 

&/not
&/eval
&eval
&eval()

eval()

  Function usage: 

  [1meval[22;0m(<[4mtext[24m> [, <[4mlevel[24m>])

  Command usage: 

  [1m/EVAL[22;0m [-s<[4mlevel[24m>] <[4mtext[24m>
  [1m/NOT[22;0m [-s<[4mlevel[24m>] <[4mtext[24m>
  ____________________________________________________________________________

  <[4mText[24m> is [1mevaluated[22;0m as a [1mmacro[22;0m body: it goes through [1msubstitution[22;0m, and is 
  executed in a new [1mscope[22;0m.  The return value of [1meval()[22;0m and [1m/eval[22;0m is that of 
  the last command in <[4mtext[24m>; the return value of [1m/not[22;0m is the logical negation 
  of return value of the last command in <[4mtext[24m>.  

  Positional parameters ([1m%1[22;0m, etc) are inherited from the caller.  

  [1mOptions[22;0m and arguments: 
  command: -s<[4mlevel[24m> 
  function: <[4mlevel[24m> 
          Expands the <[4mtext[24m> as if [1m%{sub}[22;0m were set to <[4mlevel[24m>.  By default, 
          [1meval[22;0m expands the <[4mtext[24m> as if [1m%{sub}[22;0m were "full", and echoes it if 
          [1m%{mecho}[22;0m is not "off".  

  Note: calling [1m/eval[22;0m with arguments from a [1mtrigger[22;0m could be dangerous.  If 
  not written carefully, such a [1mtrigger[22;0m could allow anyone with access to the 
  server to gain access to your tf or shell account (if they have not been 
  [1m/restrict[22;0med).  

  Example:
  command: [1m/def[22;0m showvar = [1m/eval[22;0m [1m/echo[22;0m [1m%{1}[22;0m is %%{[1m%{1}[22;0m}. 
  command: /showvar borg
  output: borg is on. 

  "[1m/Eval[22;0m -s0" can be useful when the argument is generated by an expansion.  
  For example, if you defined "[1m/def[22;0m do = [1m%{*}[22;0m, and then called "/do /echo 
  test", it would send "/echo test" to the server instead of executing it as a 
  tf command.  But if you defined "[1m/def[22;0m do = [1m/eval[22;0m -s0 [1m%{*}[22;0m", then "/do /echo 
  test" would execute "/echo test" as a tf command.  

  Note: Instead of [1m/not[22;0m, you should normally use the "/!<[4mcommand[24m>" syntax to 
  execute "/<[4mcommand[24m>" and negate its result.  [1m/not[22;0m evaluates its arguments, 
  which may be undesirable.  

  See: [1mevaluation[22;0m 

&/exit

/exit

  Usage: 

  [1m/EXIT[22;0m [<[4mn[24m>]
  ____________________________________________________________________________

  When called directly or indirectly during a [1m/load[22;0m, [1m/exit[22;0m aborts execution of 
  all enclosing macro bodies, and aborts <[4mn[24m> (default 1) enclosing [1m/load[22;0m's.  

  When called outside of a [1m/load[22;0m, [1m/exit[22;0m has no effect.  

  Example: one way to prevent a file from being loaded more than once is to 
  put commands like these at the beginning of the file: 

    [1m/if[22;0m (<[4mvariable[24m>) [1m/exit[22;0m%; [1m/endif[22;0m
    [1m/set[22;0m <[4mvariable[24m>=1

  ...where <[4mvariable[24m> is the name of the file or some other unique name.  

  See: [1m/load[22;0m, [1m/return[22;0m, [1m/break[22;0m, [1m/loaded[22;0m 

&/export

/export

  Usage: 

  [1m/EXPORT[22;0m <[4mvariable[24m>
  ____________________________________________________________________________

  If <[4mvariable[24m> is a global [1mvariable[22;0m, it becomes an environment [1mvariable[22;0m.  
  This makes <[4mvariable[24m> available to the environment for "[1m/sh[22;0m" and "[1m/quote[22;0m !". 

  Local [1mvariables[22;0m may not be exported.  

  See: [1menvironment[22;0m, [1mvariables[22;0m, [1m/setenv[22;0m 

&/expr

/expr

  Usage: 

  [1m/EXPR[22;0m <[4m[1mexpression[22;0m[24m>
  ____________________________________________________________________________

  Evaluates <[4m[1mexpression[22;0m[24m> and prints its value.  This almost the same as "[1m/eval[22;0m 
  [1m/echo[22;0m -- $$[<[4m[1mexpression[22;0m[24m>]", except that [1m{#}[22;0m and [1mpositional parameters[22;0m ({1}, 
  etc) are not defined.  If you neet to print a value of an expression that 
  uses positional parameters, use [1m/result[22;0m or [1mecho()[22;0m.  

  Example: 

  command: [1m/set[22;0m x=4
  command: [1m/expr[22;0m x * 2
  output: 8

  See: [1mexpressions[22;0m 

&/features

/features

  Usage: 

  [1m/FEATURES[22;0m [<[4mname[24m>]
  ____________________________________________________________________________

  With no arguments, [1m/features[22;0m prints a list of optional TF features, each 
  prefixed with "+" or "-" to indicate that it is enabled or disabled, 
  respectively.  

  With a <[4mname[24m> argument, [1m/features[22;0m returns 0 or 1 if the feature <[4mname[24m> is 
  disabled or enabled, respectively, in this instance of tf.  Case is 
  insignificant in <[4mname[24m>.  

    Feature           Meaning
    -------           -------
    256colors         256 color support
    core              If tf crashes, it can dump a core file
    float             Floating point arithmetic and functions
    ftime             [1mftime[22;0m() accepts % formatting
    history           /recall and /quote #
    IPv6              Internet Protocol version 6
    locale            allow alternate character sets and date formats
                      (see: [1mlocale[22;0m)
    MCCPv1            Mud Client Compression Protocol version 1 (see: [1mmccp[22;0m)
    MCCPv2            Mud Client Compression Protocol version 2 (see: [1mmccp[22;0m)
    process           /repeat and /quote
    SOCKS             SOCKS proxy
    ssl               Secure Sockets Layer
    subsecond         time is measured with subsecond accuracy
    TZ                honors the [1mTZ[22;0m variable

  Example: 

    [1m/if[22;0m (!features("ssl")) [1m/echo[22;0m -e warning: socket is not secure%; /endif
    

&/bg
&/fg

/fg

  Usage: 

  [1m/FG[22;0m [-nsq<>l] [-c<[4mN[24m>] [<[4mworld[24m>]
  [1m/BG[22;0m
  ____________________________________________________________________________

  Bring the [1msocket[22;0m associated with <[4mworld[24m> into the [1mforeground[22;0m.  The <[4mworld[24m> 
  must already be connected with the [1m/connect[22;0m command.  Any lines that arrived 
  while the [1msocket[22;0m was in the background will be displayed or counted in the 
  [1mmore[22;0m prompt, unless the -q option is given.  

  /fg [1mOptions:[22;0m 
  -n      no [1msocket[22;0m: put all [1msockets[22;0m in the [1mbackground[22;0m.  
  -s      suppress error messages.  
  -<      previous [1msocket[22;0m in cycle.  
  ->      next [1msocket[22;0m in cycle.  
  -c<[4mN[24m>   Repeat the -< or -> option <[4mN[24m> times.  
  -l      ignored.  
  -q      quiet: jump to the last screenful of text, instead of starting at 
          the same location you were at the last time the [1msocket[22;0m was in the 
          [1mforeground[22;0m.  

  If successful, [1m/fg[22;0m returns nonzero and invokes the WORLD [1mhook[22;0m; otherwise, it 
  returns 0.  

  By default, [1m/fg[22;0m draws a dividing line between old and new text.  If you 
  would prefer no dividing line, or clearing old text, this can be configured 
  with [1m%textdiv[22;0m.  

  [1m/bg[22;0m puts all [1msockets[22;0m in the [1mbackground[22;0m, and is equivalent to [1m/fg[22;0m -n.  By 
  default, [1m/bg[22;0m is bound to the ^] [1mkey[22;0m (not ESC, which is ^[) 

  See: [1m/connect[22;0m, [1mworlds[22;0m, [1msockets[22;0m, [1m%textdiv[22;0m, [1m%textdiv_str[22;0m.  

&finger.tf
&/finger

/finger

  Usage: 

  [1m/REQUIRE[22;0m finger.tf

  [1m/FINGER[22;0m [<[4muser[24m>][@<[4mhost[24m>]
  ____________________________________________________________________________

  Like unix finger, [1m/finger[22;0m reports information about <[4muser[24m> (default: all 
  users) on <[4mhost[24m> (default: localhost), assuming that <[4mhost[24m> is running a 
  standard finger daemon.  

  See: [1m/require[22;0m, [1mworlds[22;0m, [1msockets[22;0m 

&/for

/for

  Usage: 

  [1m/FOR[22;0m <[4mvariable[24m> <[4mstart[24m> <[4mend[24m> <[4mcommands[24m>
  ____________________________________________________________________________

  The <[4mvariable[24m> will take on all numeric values between <[4mstart[24m> and <[4mend[24m>, 
  inclusive.  The <[4mcommands[24m> will be executed once for each of the values.  If 
  <[4mend[24m> is less then <[4mstart[24m>, <[4mcommands[24m> will not be executed.  

  <[4mCommands[24m> are executed in a new [1mevaluation scope[22;0m.  This means, for example, 
  that a [1m/for[22;0m called from a [1mmacro[22;0m must use "%%{...}" and "%%;" instead of 
  "%{...}" and "%;" to have the [1msubstitutions[22;0m performed when the [1m/for[22;0m is 
  [1mexpanded[22;0m instead of when the calling [1mmacro[22;0m is [1mexpanded[22;0m.  

  Example: 

  Given the definition 

    [1m/def[22;0m countdown = [1m/for[22;0m i 0 %{1} say $$[%{1} - i]
    

  then the command "/countdown 10" would cause you to execute the commands 
  "say 10", "say 9", ...  "say 0".  Note that the "%{1}" is [1msubstituted[22;0m when 
  /countdown is [1mexpanded[22;0m, and the "$$" is replaced with "$".  The resulting 
  "$[10 - i]" is [1msubstituted[22;0m when [1m/for[22;0m is [1mexpanded[22;0m.  If /countdown used 
  "$[...]" instead of "$$[...]" in the <[4mcommands[24m>, it would be [1msubstituted[22;0m 
  when /countdown is [1mexpanded[22;0m, and you would repeat "10" 11 times.  If 
  /countdown used "%%{1}" or "{1}" instead of "%{1}" inside the [1mexpression[22;0m, it 
  would not be [1msubstituted[22;0m until [1m/for[22;0m was [1mexpanded[22;0m, so it would have the value 
  of [1m/for[22;0m's first argument (the string "i", which has numeric value 0), and 
  you would end up counting down from 0 to -10.  

  See: [1m/while[22;0m 

&ftime
&ftime()

ftime()

  [1mFunction[22;0m usage: 

  [1mftime[22;0m([<[4mformat[24m> [, <[4mtime[24m>]])
  ____________________________________________________________________________

  Returns a string formatted from an absolute system time <[4mtime[24m> (obtained 
  from [1mtime()[22;0m or [1mmktime()[22;0m) according to <[4mformat[24m>.  If <[4mtime[24m> is omitted, it 
  defaults to the current time.  If <[4mtime[24m> is out of range, ftime() returns an 
  empty string and prints an error message.  If <[4mformat[24m> is omitted, it 
  defaults to [1m%time_format[22;0m.  If <[4mformat[24m> is "@", a raw system time (e.g., 
  seconds since 1970-01-01 00:00:00 UTC) will be displayed.  Otherwise, each 
  "%" in <[4mformat[24m> describes a conversion: 
  %@      raw system time, in seconds, to the nearest microsecond 
          (nonstandard) 
  %.      microseconds since last whole second (nonstandard) 
  %a      abbreviated weekday name 
  %A      full weekday name 
  %b      abbreviated month name 
  %B      full month name 
  %c      [1mlocal[22;0m time and date representation 
  %d      day of month (01-31) 
  %F      ISO 8601 date format (equivalent to "%Y-%m-%d") 
  %H      hour on 24-hour clock (00-23) 
  %I      hour on 12-hour clock (01-12) 
  %j      day of year (001-366) 
  %m      month (01-12) 
  %M      minute (00-59) 
  %p      [1mlocal[22;0m equivalent of "AM" or "PM" 
  %s      raw system time, rounded down to the nearest whole second 
          (nonstandard) 
  %S      second (00-61) 
  %T      ISO 8601 time format (equivalent to "%H:%M:%S") 
  %U      week number of year, Sunday is first day of week (00-53) 
  %w      weekeday (0-6, Sunday is 0) 
  %W      week number of year, Monday is first day of week (00-53) 
  %x      [1mlocal[22;0m date representation 
  %X      [1mlocal[22;0m time representation 
  %y      year without century (00-99) 
  %Y      year with century 
  %Z      time zone name, if any 
  %%      "%" 
  Names and conversions labeled "local" may be affected by the setting of the 
  LC_TIME [1mlocale[22;0m category.  Additional "%" conversions may be supported by 
  your system, including 3-character conversions starting with "%E" and "%O"; 
  see your system's strftime() documentation for details.  All other 
  characters in <[4mformat[24m> are copied unmodified to the result.  

  The formats "%@" and "%s.%." do not give the same results if <[4mtime[24m> is 
  negative.  

  Example:
  command: [1m/expr[22;0m [1mftime[22;0m("Today is %a %b %d", [1mtime[22;0m())
  output: Today is Thu Jul 02

  See: [1mfunctions[22;0m, [1mtime()[22;0m, [1mlocale[22;0m, [1m%TZ[22;0m, [1m%time_format[22;0m, [1m%clock_format[22;0m.  

&/gag

/gag

  Usage: 

  [1m/GAG[22;0m [<[4mpattern[24m> [=<[4mresponse[24m>]]
  ____________________________________________________________________________

  Creates a [1mmacro[22;0m which will [1mtrigger[22;0m on text matching <[4m[1mpattern[22;0m[24m> and prevent it 
  from being displayed, optionally executing <[4mresponse[24m>.  

  With no arguments, [1m/gag[22;0m sets the flag [1m%{gag}[22;0m to 1 (on).  This flag enables 
  the [1mgag[22;0m [1mattribute[22;0m on [1mtriggers[22;0m.  It is on by default.  

  The matching style of the [1mgag[22;0m [1mpattern[22;0m is determined by [1m%{matching}[22;0m.  The 
  [1mpriority[22;0m of the [1mgag[22;0m is determined by [1m%{gpri}[22;0m.  These variables are examined 
  when the [1mgag[22;0m is defined, not when it is executed.  

  [1mGagged[22;0m lines from [1mbackground[22;0m worlds will not set the activity indicator on 
  the [1mstatus line[22;0m or call the activity [1mhook[22;0m.  

  If [1m/gag[22;0m does not create a new [1mmacro[22;0m, it returns 0.  Otherwise, it returns 
  the number of the new [1mmacro[22;0m (useful in [1m/undefn[22;0m and [1m/edit[22;0m).  

  [1m/gag[22;0m <[4mpattern[24m> [= <[4mresponse[24m>]
  is equivalent to
  [1m/def[22;0m [1m-ag[22;0m [1m-t[22;0m"<[4mpattern[24m>" [= <[4mresponse[24m>]. 

  See: [1mtriggers[22;0m, [1mpatterns[22;0m, [1mevaluation[22;0m, [1m%gag[22;0m, [1m/def[22;0m, [1m/nogag[22;0m 

&download
&/getfile_MUCK
&/getfile_LP
&/getfile_UNIX
&/getfile

/getfile

  Usage: 

  [1m/REQUIRE[22;0m filexfer.tf

  [1m/GETFILE_MUCK[22;0m <[4mfile[24m> [<[4mremote-file[24m>]
  [1m/GETFILE_LP[22;0m <[4mfile[24m> [<[4mremote-file[24m>]
  [1m/GETFILE_UNIX[22;0m <[4mfile[24m> [<[4mremote-file[24m>]
  ____________________________________________________________________________

  Downloads text <[4mremote-file[24m> from a MUCK, LP, or remote UNIX shell to <[4mfile[24m> 
  on the local host.  If <[4mremote-file[24m> is omitted, <[4mfile[24m> is used as the name 
  on both ends.  Do not use "wildcard" globbing characters in the file names.  

  When using [1m/getfile_UNIX[22;0m, an extra line of garbage may appear at the 
  beginning of the downloaded file unless you first disable remote echo with 
  "stty -echo".  

  Bug: if there is a log open for the [1mcurrent[22;0m world, it will be closed by 
  [1m/getfile[22;0m.  

  See: [1m/putfile[22;0m, [1m/log[22;0m 

&/grab

/grab

  Usage: 

  [1m/GRAB[22;0m <[4mtext[24m>
  ____________________________________________________________________________

  This command puts <[4mtext[24m> into the input buffer.  It is not really useful 
  from the normal command line, but is quite useful when called from a [1mmacro[22;0m 
  to redefine [1mmacros[22;0m, or perhaps when bound to a key to speed up part of a 
  line ([1mmacros[22;0m allow you to largely do what this would allow, however).  Any 
  text already in the input buffer is discarded.  

  Example: 

    [1m/def[22;0m reedit = [1m/grab[22;0m [1m/edit[22;0m [1m%1[22;0m = $[1m%1[22;0m

  If you had previously done "[1m/def[22;0m flail = :flails at his keyboard", the 
  command "/reedit flail" would place "[1m/edit[22;0m flail = :flails at his keyboard" 
  in the input buffer and allow you to edit it using the editing keys.  See 
  "[1mevaluation[22;0m" for details on how [1mmacros[22;0m like this work.  

  See: [1m/input[22;0m, [1mgeneral[22;0m 

&oldgrep
&grep.tf

/grep

  Usage: 

  [1m/REQUIRE[22;0m grep.tf

  [1m/FGREP[22;0m <[4mpattern[24m> <[4mcommand[24m>
  [1m/GREP[22;0m <[4mpattern[24m> <[4mcommand[24m>
  [1m/EGREP[22;0m <[4mpattern[24m> <[4mcommand[24m>
  ____________________________________________________________________________

  Executes <[4mcommand[24m> and prints only the output that matches <[4mpattern[24m> (which 
  must not contain spaces).  [1m/fgrep[22;0m prints lines that [4mcontain[24m the string 
  <[4mpattern[24m>; [1m/grep[22;0m prints lines that match the [1mglob[22;0m <[4mpattern[24m>; [1m/egrep[22;0m prints 
  lines that match the [1mregexp[22;0m <[4mpattern[24m>.  

  Remember to use "*" at each end of <[4mpattern[24m> to make [1m/grep[22;0m match lines that 
  [4mcontain[24m a piece that matches the [1mglob[22;0m <[4mpattern[24m>; without the "*"s, the 
  entire line must match.  

  Example: "/fgrep T'tiny.muck' /listworlds" lists all the worlds defined with 
  the -T'tiny.muck' option.  

  See: [1mtextutil.tf[22;0m, [1m/require[22;0m, [1mpatterns[22;0m, [1mexpressions[22;0m, [1mfunctions[22;0m 

&/man
&/help

/help

  Usage: 

  [1m/HELP[22;0m [<[4mtopic[24m>]
  ____________________________________________________________________________

  Displays help on the topic specified, or displays a quick summary of 
  available topics if no topic is given.  

  In the documentation, words or phrases in [1mthis format[22;0m are references to 
  other topics.  That is, a hyperlink in HTML, or something that can be used 
  as an argument to [1m/help[22;0m in [1mtf[22m.  

  Commands are described with the format "/COMMAND arguments".  Words in all 
  caps must be spelled exactly as shown (but do not need to be capitalized).  
  Arguments in <[4mthis format[24m> (underlined angle brackets in /help, or italics 
  in HTML) can be given any value.  Arguments in [square brackets] may be 
  omitted.  The character | means "or".  For example, "[OFF|ON]" means you may 
  type "off", "on", or nothing.  

  Some help topics have punctuation in their names: variables begin with "%", 
  commands begin with "/", and functions end with "()".  A name with omitted 
  punctuation will usually match the same topic (e.g., "[1m/def[22;0m" and "[1mdef[22;0m" both 
  match the /def command topic), but sometime will match a different topic 
  (e.g., "[1m%MAIL[22;0m" matches the MAIL variable topic, but "[1mMAIL[22;0m" matches the MAIL 
  hook topic).  There are also (sub)topics for various tf syntax constructions 
  such as "[1m%{}[22;0m" and "[1m$()[22;0m".  

  For [1m/help[22;0m to work, the [1mvariable[22;0m [1m%TFHELP[22;0m must contain the name of the 
  helpfile.  It is set when TF is installed, and should not normally be 
  changed.  If the helpfile or the help index is not found, [1m/help[22;0m will not 
  function.  The help file is in ASCII with embedded ANSI display codes, so 
  can be read or printed by any program that can handle ANSI codes.  

#html
  The help documents are also available on the web at 
  [1mhttp://tinyfugue.sourceforge.net/help/[22;0m.  
#

  See: [1mindex[22;0m, [1mintro[22;0m, [1moptions[22;0m 

&/highlight
&/hilite

/hilite

  Usage: 

  [1m/HILITE[22;0m [<[4mpattern[24m> [= <[4mresponse[24m>]]
  ____________________________________________________________________________

  Creates a [1mmacro[22;0m which will [1mtrigger[22;0m on text matching <[4m[1mpattern[22;0m[24m> and display it 
  with the [1mhilite[22;0m [1mattribute[22;0m, optionally executing <[4mresponse[24m>.  

  With no arguments, [1m/hilite[22;0m sets the flag [1m%{hilite}[22;0m to 1 (on).  This flag 
  enables [1mhilite[22;0m and other [1mattributes[22;0m on [1mtriggers[22;0m.  It is on by default.  

  The [1mattribute[22;0m(s) for [1mhilite[22;0md text are determined by the [1m%{hiliteattr}[22;0m 
  [1mvariable[22;0m.  The default is bold ([1mhiliteattr[22;0m=B).  Colors are also available 
  (e.g., [1mhiliteattr[22;0m=Cgreen); see "[1mattributes[22;0m" and "[1mcolor[22;0m" for more 
  information.  

  The matching style of the [1mhilite[22;0m [1mpattern[22;0m is determined by [1m%{matching}[22;0m.  The 
  [1mpriority[22;0m of the [1mhilite[22;0m is determined by [1m%{hpri}[22;0m.  These [1mvariables[22;0m are 
  examined when the [1mhilite[22;0m is defined, not when it is executed.  

  If [1m/hilite[22;0m does not create a new [1mmacro[22;0m, it returns 0.  Otherwise, it returns 
  the number of the new [1mmacro[22;0m (useful in [1m/undefn[22;0m and [1m/edit[22;0m).  

  The [1mstandard library[22;0m also defines [1m/hilite_page[22;0m and [1m/hilite_whisper[22;0m which 
  [1mhilite[22;0m several different commonly used page and whisper formats.  

  [1m/hilite[22;0m <[4mpattern[24m> [=<[4mresponse[24m>]
  is equivalent to
  [1m/def[22;0m [1m-ah[22;0m [1m-t[22;0m"<[4mpattern[24m>" [=<[4mresponse[24m>]. 

  Example: 

    [1m/hilite[22;0m {*} tried to kill you!

  With the default settings, any line matching that pattern will appear bold.  

  To hilite messages generated by tf, see [1mhooks[22;0m.  

  See: [1mtriggers[22;0m, [1mpatterns[22;0m, [1mattributes[22;0m, [1m/def[22;0m, [1m/nohilite[22;0m, [1m/partial[22;0m 

&/histsize

/histsize

  Usage: 

  [1m/HISTSIZE[22;0m [-lig] [-w[<[4mworld[24m>]] [<[4msize[24m>]
  ____________________________________________________________________________

  [1mOptions:[22;0m 
  -l      local history 
  -i      input history 
  -g      global [1mhistory[22;0m (default) 
  -w<[4mworld[24m> 
          world history 

  If <[4msize[24m> is not given, [1m/histsize[22;0m reports the maximum number of lines that 
  can be stored in the specified [1mhistory[22;0m.  

  If <[4msize[24m> is given, [1m/histsize[22;0m changes the maximum size of the specified 
  [1mhistory[22;0m to <[4msize[24m>.  If the new size is less than the old size, the oldest 
  lines will be lost immediately.  If the new size is greater than the old 
  size, no more old lines will be lost until enough new lines are added to 
  reach the new size.  

  [1m/histsize[22;0m returns 0 for failure, and the size of the [1mhistory[22;0m otherwise.  

  The [1m%{histsize}[22;0m [1mvariable[22;0m can be used to set the default size of world 
  histories before they are created.  

  See: [1mhistory[22;0m, [1m%histsize[22;0m 

&/hook

/hook

  Usage: 

  [1m/HOOK[22;0m <[4mevent[24m>[ <[4mpattern[24m>] [= <[4mbody[24m>]
  [1m/HOOK[22;0m [OFF|ON]
  ____________________________________________________________________________

  Creates a [1mmacro[22;0m which will execute <[4mbody[24m> when <[4mevent[24m> occurs and the 
  event's arguments match the optional <[4mpattern[24m>.  The <[4mevent[24m> may be a single 
  event or a list of events separated by '|'.  If omitted, <[4mpattern[24m> will 
  default to "*".  

  [1m/hook[22;0m with no arguments displays the state of the [1m%{hook}[22;0m flag.  [1m/hook[22;0m with 
  an argument of ON or OFF sets the [1m%{hook}[22;0m flag, which determines if [1mhooks[22;0m 
  will execute their associated [1mmacros[22;0m.  

  The matching style of the [1mhook[22;0m pattern is determined by [1m%{matching}[22;0m.  This 
  [1mvariable[22;0m is examined when the [1mhook[22;0m is defined, not when it is executed.  

  Defining a [1mhook[22;0m will not replace an existing [1mhook[22;0m on the same event, but 
  rather creates an additional [1mhook[22;0m [1mmacro[22;0m on the event.  The [1mmacro[22;0m or [1mmacros[22;0m 
  to be executed are chosen by the normal [1mpriority[22;0m rules.  

  See the section "[1mhooks[22;0m" for details on [1mhook[22;0m operation, a list of event 
  names, and examples.  

  If [1m/hook[22;0m does not create a new [1mmacro[22;0m, it returns 0.  Otherwise, it returns 
  the number of the new [1mmacro[22;0m (useful in [1m/undefn[22;0m and [1m/edit[22;0m).  

  [1m/hook[22;0m <[4mevent[24m>[ <[4mpattern[24m>] [=<[4mresponse[24m>]
  is equivalent to
  [1m/def[22;0m [1m-h[22;0m"<[4mevent[24m>[ <[4mpattern[24m>]" [=<[4mresponse[24m>]. 

  Example: 

    [1m/hook[22;0m MAIL = [1m/sh[22;0m mutt

  will automatically invoke "mutt" to read mail when it arrives.  

  See: [1mhooks[22;0m, [1mmacros[22;0m, [1mevaluation[22;0m, [1mpatterns[22;0m, [1m/def[22;0m, [1m/unhook[22;0m 

&/if
&/then
&/elseif
&/else
&/endif
&/if

/if

  Usage: 

  [1m/IF[22;0m ([4mexpr[24m) [4mlist[24m [ [1m/ELSEIF[22;0m ([4mexpr[24m) [4mlist[24m ]...  [ [1m/ELSE[22;0m [4mlist[24m ] [1m/ENDIF[22;0m
  [1m/IF[22;0m [4mlist[24m [1m/THEN[22;0m [4mlist[24m [ [1m/ELSEIF[22;0m [4mlist[24m [1m/THEN[22;0m [4mlist[24m ]...  [ [1m/ELSE[22;0m [4mlist[24m ] [1m/ENDIF[22;0m
  ____________________________________________________________________________

  <[4mList[24m> is any list of commands.  The return value of a <[4mlist[24m> is the return 
  value of the last command executed in the <[4mlist[24m>.  Note that each <[4mlist[24m> 
  must be terminated by "[1m%;[22;0m".  

  <[4mexpr[24m> is any [1mexpression[22;0m, and must be surrounded by parentheses.  

  The <[4mlist[24m> or <[4mexpr[24m> following the [1m/IF[22;0m is executed or evaluated.  If the 
  result is non-zero, the next <[4mlist[24m> is executed.  Otherwise, this is 
  repeated for each [1m/ELSEIF[22;0m.  If none of the [1m/IF[22;0m or [1m/ELSEIF[22;0m <[4mlist[24m>s or <[4mexpr[24m>s 
  return non-zero, the [1m/ELSE[22;0m <[4mlist[24m> is executed if there is one.  

  The return value of the [1m/IF[22;0m...[1m/ENDIF[22;0m statement is undefined.  

  [1m/IF[22;0m (expr) body%; [1m/ENDIF[22;0m 
  is equivalent to
  [1m/IF[22;0m [1m/TEST[22;0m expr%; [1m/THEN[22;0m body%; [1m/ENDIF[22;0m 
  except that in the former, <[4mexpr[24m> does not undergo macro body [1msubstitution[22;0m.  

  When [1m/IF[22;0m is used on the command line, "[1m%;[22;0m" command separation is done even 
  if [1m%sub[22;0m=off.  Of course, full substitution will be done if [1m%sub[22;0m=full.  

  If <[4mlist[24m> is a server (mud) command, the condition being tested is whether 
  the command is sent successfully; that is, whether there is a [1mcurrent 
  socket[22;0m.  TF has no way of knowing how the server deals with the command or 
  what is considered "success" for a server command, and tf does not wait for 
  a server response which will be delayed by network latency.  So, doing 
  something like "[1m/if[22;0m rob corpse%; /then ..." will not have the effect you 
  probably want.  To achieve that effect, you should define a [1mtrigger[22;0m on each 
  of the possible server responses, before you send your command.  

  Example: 

    [1m/if[22;0m ([1mTERM[22;0m !~ "dumb") [1m/visual[22;0m on%; [1m/endif[22;0m

  will do "[1m/visual[22;0m on" if your [1m%{TERM}[22;0m is not "dumb".  

  See: [1mevaluation[22;0m, [1mexpressions[22;0m, [1m/test[22;0m, [1m/def -E[22;0m, 

&builtins
&commands
&index

index

  Commands marked with '+' are new in the current version.  Commands marked 
  with '*' have changed significantly in the current version.  

  *[1mADDWORLD[22;0m      *[1mFG[22;0m             [1mLISTVAR[22;0m        [1mREPLACE[22;0m        [1mTOGGLE[22;0m        
  *[1mAT[22;0m             [1mFINGER[22;0m         [1mLISTWORLDS[22;0m    *[1mRESTRICT[22;0m       [1mTR[22;0m            
   [1mBAMF[22;0m           [1mFOR[22;0m            [1mLOAD[22;0m           [1mRETURN[22;0m         [1mTRIG[22;0m          
   [1mBEEP[22;0m           [1mGAG[22;0m            [1mLOCALECHO[22;0m     +[1mRUNTIME[22;0m       *[1mTRIGGER[22;0m       
  *[1mBIND[22;0m           [1mGETFILE[22;0m        [1mLOG[22;0m            [1mSAVE[22;0m           [1mUNBIND[22;0m        
   [1mBREAK[22;0m          [1mGRAB[22;0m           [1mmapping[22;0m        [1mSAVEWORLD[22;0m      [1mUNDEF[22;0m         
   [1mCAT[22;0m            [1mHELP[22;0m          *[1mMORE[22;0m          *[1mSEND[22;0m           [1mUNDEFN[22;0m        
   [1mCHANGES[22;0m        [1mHILITE[22;0m         [1mNOHILITE[22;0m       [1mSET[22;0m            [1mUNDEFT[22;0m        
  *[1mCONNECT[22;0m        [1mHISTSIZE[22;0m       [1mPARTIAL[22;0m        [1mSETENV[22;0m         [1mUNHOOK[22;0m        
   [1mDC[22;0m             [1mHOOK[22;0m          *[1mPASTE[22;0m          [1mSH[22;0m             [1mUNSET[22;0m         
  *[1mDEF[22;0m            [1mIF[22;0m            *[1mPS[22;0m             [1mSHIFT[22;0m          [1mUNTRIG[22;0m        
  *[1mDOKEY[22;0m          [1mINPUT[22;0m          [1mPURGE[22;0m          [1mspelling[22;0m       [1mUNWORLD[22;0m       
  *[1mECHO[22;0m           [1mKILL[22;0m           [1mPURGEWORLD[22;0m     [1mSUB[22;0m            [1mVERSION[22;0m       
  *[1mEDIT[22;0m           [1mLCD[22;0m            [1mPUTFILE[22;0m        [1mSUBSTITUTE[22;0m     [1mWATCHDOG[22;0m      
   [1mESCAPE[22;0m         [1mLET[22;0m           *[1mQUIT[22;0m           [1mSUSPEND[22;0m        [1mWATCHNAME[22;0m     
  *[1mEVAL/NOT[22;0m      +[1mLIMIT[22;0m         *[1mQUOTE[22;0m          [1mTELNET[22;0m         [1mWHILE[22;0m         
   [1mEXIT[22;0m           [1mlist commands[22;0m  [1mquo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          