diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9b6b3d5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: C CI + +on: + push: + branches: + - release + - "feature/*" + - "*" + pull_request: + branches: + - release + - "feature/*" + - "*" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: autoconf + run: autoconf + - name: configure + run: ./configure + - name: make + run: make diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..be96f85 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +*.o +*.orig +*.rej +*.sw! +*.un~ +/Makefile +/autom4te.cache +/config.* +/configure +/help/html2tf +/help/tf-help +/tf-lib/tf-help.idx +/src/Makefile +/src/TF_LIBDIR.build +/src/default +/src/makehelp +/src/tf +/src/tfconfig.h +/src/tfdefs.h +/unix/vars.mak diff --git a/CHANGES b/CHANGES index 037c766..2e15c31 100644 --- a/CHANGES +++ b/CHANGES @@ -7,7 +7,7 @@ If you have not yet read all changes since 4.0 stable 1, please do now. (read the CHANGES file directly, or type "/changes 5.0" in tf.) If you have custom code to do any of the following in older versions, you'll probably want to get rid of it or redesign it, since it is now - superceded by standard features: key bindings; text redraw (after world + superseded by standard features: key bindings; text redraw (after world switch, or resuming from sh or suspend); scrollback; status line customizations; ... @@ -50,7 +50,7 @@ Fixed: various bad things could happen if a trigger attempted to apply a Fixed bugs on 64-bit platforms: /fg -c (Debian bug #327448), some variable assignments Fixed: some cases of hostname resolution failure could cause a crash -More robust TELNET protocol handling reduces problems on noncompliant servers: +More robust TELNET protocol handling reduces problems on non-compliant servers: Ignores option subnegotiation if option has not been agreed on. If IAC SB (0xff 0xfa) is received before any other telnet command, the server is treated as a non-telnet server. @@ -67,10 +67,10 @@ Colors: extension codes. Added "/feature 256colors". Added "/load testcolor.tf" to test color functionality and appearance. -Added "E" and "W" attributes, with corresponding defintions in %error_attr +Added "E" and "W" attributes, with corresponding definitions in %error_attr and %warning_attr. Added encode_ansi() to generate a string with attribute control codes. -Added test() for backward compatiblity with version 4.0. +Added test() for backward compatibility with version 4.0. Added strcmpattr(), like strcmp() but also compares display attributes. In commands that match macros (/list, /purge, /save), a color attribute will match only the same color attribute, not just any color attribute. @@ -84,7 +84,7 @@ Added -f (foreground) and -b (background) options to /world; documented -x (SSL) option. Uses system's copy of libpcre if possible. Redefinition of macros or keybindings does not invoke the REDEF hook if the - new and old defintions are identical (so file reloading is less noisy). + new and old definitions are identical (so file reloading is less noisy). If you used to gag REDEF to reduce noise, you may want to ungag it now that it is less noisy and more informative. Status bar changes: @@ -107,7 +107,7 @@ Other screen display changes: Changing %wrappunct immediately rewraps everything on screen. Eliminated extra screen redraw when the terminal is resized. Fixed: under some conditions, rewrapping screen could cause entire - scrollback buffer to be redrawn, instead of just a screenful. (If + scrollback buffer to be redrawn, instead of just a screenfull. (If %more was on, this acted like a jump to the beginning of the buffer.) Fixed: did not send new terminal size to server after resizing the terminal in nonvisual mode. @@ -223,7 +223,7 @@ Fixed a timing bug that may have caused many seemingly unrelated problems, including processes not running on time, status bar not updating, and keyboard or background worlds being ignored. (50a13) Fixed handling of case where server sends ANSI display code followed by - backspace (not known to ever happen in practice, but fixed nontheless). + backspace (not known to ever happen in practice, but fixed nonetheless). Fixed: in some cases, if TF already had a prompt from the server, it would ignore a new prompt from the server. Improved some error messages. @@ -316,7 +316,7 @@ Renamed BACKGROUND hook to BGTRIG (but old name still works). Added BGTEXT hook. Fixed activity_status.tf to update for lines generated by /echo -w. Fixed: ACTIVITY and PREACTIVITY hooks didn't run in the world in which the - activity occured when caused by /echo -w. + activity occurred when caused by /echo -w. Fixed order of /dc message relative to text already queued on socket. Fixed: under certain conditions, a dead socket would not go away and could not be foregrounded. @@ -421,7 +421,7 @@ Fixed: speedwalk incorrectly matched lines containing only digits. ------------ moresize() takes an optional world argument, and defaults to operating on current world (instead of foreground world). -Page Up and Page Down scroll a full screenful, not a half. +Page Up and Page Down scroll a full screenfull, not a half. Added ^] keybinding for /bg. Can wrap at punctuation other than space; %wrappunct controls it. Can reverse scroll until first line is at bottom of window (useful with @@ -475,13 +475,13 @@ New screen handling. See "/help windows". Half page backward (PgUp, ^X[) or forward (PgDn, ^X]), full page backward (^X{) or forward (^X}), line backward (^[^P) or forward line (^[^N). - /dokey_flush means jump to end, showing last screenful - /dokey_selflush shows last screenful of lines with attrs + /dokey_flush means jump to end, showing last screenfull + /dokey_selflush shows last screenfull of lines with attrs Redraw after /suspend, /sh, and changing window size, %visual, or %isize. Doesn't automatically leave a dead socket if the text hadn't been seen. WORLD hook is silent. A disconnected socket does not disappear automatically after displaying its - buffered text. It will dissappear if you /dc it again, or /fg another. + buffered text. It will disappear if you /dc it again, or /fg another. /dokey redraw (^L) actually redraws screen. Added /dokey clear (^[^L) to clear screen. %shpause defaults to on. @@ -515,7 +515,7 @@ added /status_add, /status_rm, /status_edit, /clock {on|off}, %clock_format, %status_field_defaults. You should not set %status_fields directly. Variables used in status_fields do not need to exist. Various keys are bound to /dokey_pg{up,dn} which in turn calls - /dokey_hpage{back,}. To make keys move a whole screenful, user should + /dokey_hpage{back,}. To make keys move a whole screenfull, user should not rebind the keys, but redefine /dokey_pg{up,dn} to call /dokey_page{back,}. Note: some emulators (NiftyTelnet, TeraTerm) incorrectly send ^[[3~ for @@ -523,7 +523,7 @@ Note: some emulators (NiftyTelnet, TeraTerm) incorrectly send ^[[3~ for The PgUp key in these emulators will not work correctly in tf unless you (preferred) fix your emulator, or (easier) "/bind ^[[3~ = /dokey_pgup" (warning: may break your Delete key) -Replaced Henry Spencer's regexp pacage with PCRE (Perl Comaptible Regular +Replaced Henry Spencer's regexp package with PCRE (Perl Compatible Regular Expressions). It is backwards compatible, with one exception: the character '{' introduces a quantifier, so you must use '\{' to match a literal '{'. Also, regexps containing no uppercase letters default to @@ -534,7 +534,7 @@ regmatch() returns any positive integer for success, not necessarily 1 (so you should write (regmatch(...)), not (regmatch(...) == 1) Time is measured and printed with microsecond resolution: %prompt_sec and %prompt_usec replaced with %prompt_wait - /recall: h:m[:s[.f]] is interpeted as time-of-day, s.f as absolute time. + /recall: h:m[:s[.f]] is interpreted as time-of-day, s.f as absolute time. ftime(): "%@" includes microseconds; added "%.", "%s", "%F", "%T" formats. /ps, time(), idle(), sidle() print or return values to the microsecond. Time values for /repeat, /quote, /at, %ptime, %maildelay can be specified @@ -598,7 +598,7 @@ ftime() supports %E and %O if system library does. Added mktime(). Added "i" argument to /repeat for infinite count. Optional argument to /ps. -Improved workaround for solaris terminal driver bug that could disable +Improved workaround for Solaris terminal driver bug that could disable keyboard after typing LNEXT (^V), FLUSH (^O), STOP (^S), or START (^Q); also, in the extremely unlikely case that it does happen, it can be fixed with any signal (e.g., ^Z or ^C) without quitting tf. @@ -673,7 +673,7 @@ see above 4.0 stable 1 (1999-03-06) ------------ -Workaround for solaris terminal driver bug that could disable keyboard after +Workaround for Solaris terminal driver bug that could disable keyboard after typing LNEXT (^V) or FLUSH (^O). 4.0 gamma 3 (1999-01-31) @@ -687,12 +687,12 @@ Fixed crash caused by beep on unsupported terminals. Fixed crash caused by closing unconnected socket with buffered output. Fixed problems related to failed nonblocking hostname resolution. Will not busy loop if tty closes without killing tf. -Eliminiated warnings in /color_on. +Eliminated warnings in /color_on. 4.0 gamma 2 (1998-11-15) ----------- Worlds without type or mfile now use corresponding field of "default" world. -Improved prompt detection heuristics for typeless worlds. +Improved prompt detection heuristics for type less worlds. /addworld can reset fields other than host and port for "(unnamedN)" worlds. Clarified scope rules in "/help /for". Fixed fatal error when reconnecting in a DISCONNECT hook. (40g1) @@ -972,7 +972,7 @@ Fixed compilation error involving conditional and hstrerror under some lame compilers (socket.c:788). Fixed output misdirection during a read() inside a command sub. Fixed rare bug causing command line to execute in wrong world when a - simultaneous background trigger occured. + simultaneous background trigger occurred. Fixed /world with no arguments. Fixed fatal input bug after /histsize -i. (35a21) Fixed bug which disabled history recording after /recall on an empty history. @@ -1167,7 +1167,7 @@ Fixed fatal bug in handling background prompt with ansi attributes. (35a11) 3.5 alpha 12 (1995-09-24) ------------ -Fixed fatal macro bug occuring during startup on some systems (including +Fixed fatal macro bug occurring during startup on some systems (including OS/2, Linux, and IRIX). (35a11) Fixed minor bug in telnet NAWS when a window dimension is 255. (35a10) @@ -1235,7 +1235,7 @@ Gags are applied when text arrives instead of when it is displayed, making Improved error and warning messages. Added %{gethostbyname} variable, set to "blocking" by default under unix. Fixed /histsize: empty history bug, and downsizing memory leak. -Fixed fatal bug in /send -w to a nonexistant world. +Fixed fatal bug in /send -w to a nonexistent world. Fixed regexp scope bugs (including a bug in the ^W keybinding). (35a4) Fixed bug in handling bad environment values for special variables (it would usually just say "Killed" and exit). @@ -1256,7 +1256,7 @@ New /listsockets format, includes idle time and world type. With emulation=ansi_attr, server attributes now continue across lines. Supports nonblocking hostname lookup on OS/2 as well as UNIX. Fixed /dc. (35a4) -Fixed bug in using /histsize on a non-existant or unused world. (34a3) +Fixed bug in using /histsize on a non-existent or unused world. (34a3) Fixed select on closed pipe (35a4). Fixed compile-time rand()/random() problem on OS/2 (35a4). Fixed hostname resolution on IRIX 5 (without breaking socket stuff on other @@ -1313,7 +1313,7 @@ Changed parsing of ambiguous special substitutions like "%Lx" to be "%{Lx}" 3.4 alpha 14 (1994-12-30) ------------ -Fixed instalation problem on SunOS 4.1.3 (possibly others). (34a13) +Fixed installation problem on SunOS 4.1.3 (possibly others). (34a13) 3.4 alpha 13 (1994-12-28) ------------ @@ -1344,7 +1344,7 @@ autoconfig works with stupid linkers that return a useless exit status. 3.4 alpha 10 (1994-10-09) ------------ -Fixed fatal bug occuring when history becomes full (34a9). +Fixed fatal bug occurring when history becomes full (34a9). 3.4 alpha 9 (1994-10-09) ----------- @@ -1367,7 +1367,7 @@ Fixed infinite loop in SIGQUIT (^\) handler on systems with BSD-like signals. Fixed fatal bug in backward-wrapping delete in visual mode on some terminals. Installation no longer gives the option of removing old files; it caused too many problems with users who answered 'y' without reading the list first. -Porting fix: elimiated 'signed' type (34a). +Porting fix: eliminated 'signed' type (34a). Better preprocessor and library testing in autoconfig. Improved make output and core dump messages. @@ -1392,7 +1392,7 @@ Fixed bugs in prompt refresh in nonvisual mode (34a). Added to file-xfer.tf library: /putfile_MUCK, /putfile_LP, /putfile_UNIX, /getfile_MUCK, /getfile_LP, /getfile_UNIX. Fixed: glob pattern "{}" matches empty string (34a). -Elminated beep in /grab (34a). +Eliminated beep in /grab (34a). 3.4 alpha 4 (1994-08-16) ----------- @@ -1426,18 +1426,18 @@ More useful return values for synchronous /repeats and command /quotes. A set high bit on an input character is converted to ESC. See /help %istrip. Increased speed of macro processing, startup, etc. Supports nonblocking connect if used with SOCKS 4.2beta. -/BREAK takes an optional argument specifing the number of levels to break. +/BREAK takes an optional argument specifying the number of levels to break. Under linux, nonblocking connect failure now hooks CONFAIL, not DISCONNECT. Removed improper evaluation of $[...] in unexecuted /if and /while branches. Fixed bug in /BREAK followed by a nested /WHILE. -Fixed bug in detecting new mail in a previously nonexistant mail file. +Fixed bug in detecting new mail in a previously nonexistent mail file. Fixed bug: lines from background world were reversed in global history/log. Fixed refreshing of input in noecho mode (password entry) with visual=off. Fixed bug causing writing into variable argument of toupper(), tolower(), or builtin command called as a function. Fixed bugs in idea of current socket in CONFAIL hook and immediately after /fg and (successful or failed) /connect. -Fixed bug in /purgeworld'ing a nonexistant "default" world. +Fixed bug in /purgeworld'ing a nonexistent "default" world. Reverted to pre-33b16 parsing of '\' in option arguments (not a bug, but caused unexpected behavior of incorrectly written user macros). Improved debugging information for potential internal errors. @@ -1575,13 +1575,13 @@ The SEND hook always prevents sending of the original text (previous versions of TF required a gag to do so). Use "/send %*" in the hook body if you really want it to be sent. /def -w is equivalent to /def -w${world_name}. -/kill can take mutiple arguments. +/kill can take multiple arguments. Several improvements in display of major editing operations (visual and nonvisual). /dokey redraw (^L) now does something useful in non-visual mode. Increased speed of macro execution by about 15%. Improved visual input scroll for terminals without scroll regions. -Improved appearace of external messages (e.g. "write") in visual mode. +Improved appearance of external messages (e.g. "write") in visual mode. Fixes for bugs and portability. Removed %{quoted_args}. @@ -1668,7 +1668,7 @@ Other portability stuff. 3.0 beta 2 ---------- Added time arithmetic in expressions. -Bug fix: identifers in expressions can contain '_' chracters. +Bug fix: identifiers in expressions can contain '_' characters. Bug fix: added -T option to /addworld to support extended /add* commands. Added argument to WORLD and LOGIN hooks. May break a few old macros. PROCESS and KILL hooks are silent by default. @@ -1788,13 +1788,13 @@ Fixed /ps output 1.5.5 beta1 ----------- -Autologin support for untermud cyberportals, with '/bamf unter' command +Autologin support for UnterMUD cyberportals, with '/bamf unter' command Removed /listbind, /act, /reply, /nointr, /nowrap, /nostty, /nolog, /nologme, /nologin, /noquiet, and /qctries Flags /stty, /log, /logme, /login and /quiet do not turn on when called with no arguments. Expanded /ps and /listsocket output -Imporoved effeciency of keyboard processing and macro expansion +Improved efficiency of keyboard processing and macro expansion Eliminated busy-wait in /more, /shpause, and Yes/No queries Command quotes use pipes instead of temp files, and capture standard error Removed -DIRIX and -DMANUAL_SWITCH compile flags diff --git a/COPYING b/COPYING index 4ab9dab..137a33a 100644 --- a/COPYING +++ b/COPYING @@ -1,14 +1,15 @@ -TinyFugue is Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003 +TinyFugue is Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) by Ken Keys, and licensed under the following terms. GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. Preamble @@ -59,7 +60,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -114,7 +115,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -172,7 +173,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -229,7 +230,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -282,7 +283,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest @@ -309,7 +310,7 @@ the "copyright" line and a pointer to where the full notice is found. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. diff --git a/CREDITS b/CREDITS index 912552f..ae911c9 100644 --- a/CREDITS +++ b/CREDITS @@ -1,5 +1,13 @@ -This version of TinyFugue is written, maintained, and copyrighted +This fork of TinyFugue is currently being supported by Kruton, +Sketch, and wstarter. It also includes assorted patches developed +by various community members in the years since TF saw saw it's +final release. + +For a long time TinyFugue was written, maintained, and copyrighted by Ken Keys ("Hawkeye"), who can be reached by email at kkeys@ucsd.edu. +His final release was 50b8 in January 2007, but he is still active +in giving support at https://sourceforge.net/p/tinyfugue + See the file "COPYING" for the full copyright and license. Support for OS/2 was contributed by Andreas Sahlbach (asa@stardiv.de). @@ -7,7 +15,7 @@ Support for OS/2 was contributed by Andreas Sahlbach (asa@stardiv.de). TinyFugue versions 1.5.3 and earlier were written by Greg Hudson ("Explorer_Bob"), without whom I would have never gotten into this mess. -TinyFugue was intially derived from tinytalk, a unix client written by +TinyFugue was initially derived from tinytalk, a unix client written by Anton Rang ("Tarrant") and modified by Leo Plotkin ("Grod"). Additional thanks to Jeff Prothero ("Cynbe"), Bruce Sterling Woodcock @@ -15,4 +23,3 @@ Additional thanks to Jeff Prothero ("Cynbe"), Bruce Sterling Woodcock glia.biostr.washington.edu, and everyone else who tested, found bugs, or came up with suggestions, and to Jim Lick ("Jingoro") for providing tcp.com services. - diff --git a/Makefile b/Makefile index a32dc13..27c8e1f 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ ######################################################################## # # TinyFugue - programmable mud client -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) # # TinyFugue (aka "tf") is protected under the terms of the GNU -# General Public Licence. See the file "COPYING" for details. +# General Public License. See the file "COPYING" for details. # ######################################################################## @@ -30,3 +30,4 @@ install files tf clean uninstall: all # The next line is a hack to get around a bug in BSD/386 make. make: + diff --git a/Makefile.in b/Makefile.in index 61a8aeb..1db4153 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,10 +1,10 @@ ######################################################################## # # TinyFugue - programmable mud client -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) # # TinyFugue (aka "tf") is protected under the terms of the GNU -# General Public Licence. See the file "COPYING" for details. +# General Public License. See the file "COPYING" for details. # ######################################################################## @@ -15,9 +15,10 @@ LONGPATH=${PATH}:@PATH@ default: files files all install tf clean uninstall: _force_ - @cd src; PATH=${LONGPATH} ${MAKE} $@ + @cd src; PATH="${LONGPATH}" ${MAKE} $@ _force_: # The next line is a hack to get around a bug in BSD/386 make. make: + diff --git a/README b/README index 024bf06..de6f0ae 100644 --- a/README +++ b/README @@ -1,3 +1,49 @@ +TinyFugue 50b8 with numerous patches and improvements + +UTF8 support (--enable-widechar=yes) +/HELP has been spell checked, along with everything else +HTML documentation and html2tf found and returned to repo +ANSI log output (/help ansi_log) off by default +LOGs output prefix, such as timestamp (/help log_prefix) off by default +ERROR output prefix now adjustable (/help error_prefix) '%' by default +UNNAMED worlds not wrapped in () (/help oldunnamed) no-() by default +@ALERT picks up on messages that could have been lost +/ as a prefix to /command sends to MU, as opposed to ///command +SSL now looks for GNU TLS +ATCP protocol support (--enable-atcp=yes) off by default +GMCP protocol support (--enable-gmcp=yes) off by default +OPTION 102 protocol support (--enable-option102=yes) off by default +MCCP protocol lockup issue resolved +RFC 2066 compliance for Telnet Charset Negotiation +PCRE unbundled and now can use system libraries +GCC 10 and CLANG support +64-bit crash issues resolved +MULTI-address hostname crash issue resolved +OS X compile issues resolved +BUFFERS increased to reflect more modern computing resources +TF-LIB being maintained as well. + +Plus numerous bug fixes, clean-up, and needed code base +clean-up and modernization. + +Significant effort has been put into finding the various community +patches for TF50b8 and integrating them all into one place. There +are still several patches in the queue waiting to be examined and +then potentially applied. + +In addition, new work has been added to this code base and will +probably continue to be for some time. The intention is to make sure +a well loved piece of software is still able to be run on modern +platforms and future platforms, increased stability, and then lastly +to add some additional features in-line with the existing codebase. + +Similar efforts are being done with TinyFugue Macros, and some may later +be integrated into tf-lib: + +https://github.com/warmstarter/tinyfugue-scripts + +====== + Unicode notes: "Release" is the branch you want. On Debian or Ubuntu, make sure you apt-get libicu-dev before running @@ -8,16 +54,16 @@ Unicode notes: if unencodeable bytes are in the input box. I will gladly accept pull requests. + Setting your terminal to send ^H instead of ^? for backspace mitigates + some, but not all of the backspace issues. + For servers that don't negotiate charsets, /set default_charset=NAME before defining a world with /addworld or /test addworld(). I recommend putting /set default_charset=Latin-1 at the top of your worlds.tf. ====== - TinyFugue is Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys. - - PCRE regexp package is Copyright 1997-1999 University of Cambridge. - See src/pcre-2.08/LICENCE for details. + TinyFugue is Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) ======= @@ -33,7 +79,7 @@ Unicode notes: You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ======= @@ -101,7 +147,7 @@ Compression If you are short on disk space, you can compress the helpfile and library files (except stdlib.tf). Make sure the COMPRESS_SUFFIX and COMPRESS_READ macros are set correctly; set them in the -%{TFLIBDIR}/local.tf file if needed. Note that compresion can not +%{TFLIBDIR}/local.tf file if needed. Note that compression can not be used if /restrict is used. @@ -144,6 +190,6 @@ Amiga, so I don't plan on porting to them. However, I am willing to work with someone who wants to try and is willing to follow my guidelines (this is how the OS/2 version was created, and why it is an official version which continues to grow). Basically, this means -keeping the platform-specific code seperate and to a minimum, and not +keeping the platform-specific code separate and to a minimum, and not adding new features. diff --git a/README.OtherOS b/README.OtherOS new file mode 100644 index 0000000..981aed3 --- /dev/null +++ b/README.OtherOS @@ -0,0 +1,53 @@ +TinyFugue for Mac OS X + +You must have the developer tools installed on your system. +Open a shell window, and follow the instructions in unix/README. + +---------------------------------------------------------------- + +TinyFugue for Win32 + +The likely best option for running TinyFugue under Windows is to +get 'Windows Subsystem for Linux'. This should be straight-forward +and give you an almost identical experience to a TinyFugue on UNIX +like systems, but it has not yet been tested. + +https://docs.microsoft.com/en-us/windows/wsl/install-win10 + +Once installed, open a shell window, and follow the instructions in +unix/README. + +=================================================================== + +Older note on TinyFugue for Win32 (not the recommended option) + +The official release of TF for win32 is available only in source form. +To compile it, you will need the Cygwin Development Kit (cdk.exe), +available at http://www.cygnus.com/misc/gnu-win32/. Once you have the +CDK installed, follow the instructions for compiling TF under UNIX. + +Unofficial binary releases may be available. Check +http://tinyfugue.sourceforge.net/ for more information. + +There are several known problems with the win32 version of tf, mostly due +to shortcomings of cygwin: + * Scrolling in visual mode is jumpy. + * /quote ! (and code that calls it, like /sys) is not supported. + * $COMPRESS_READ is not supported. + * Nonblocking hostname resolution (%gethostbyname) is not supported. + * The flash attribute (-af) does not work. + +Note that TF (and all cygwin applications) use "//X" notation instead of +"X:" to indicate drives in paths, and slashes instead of backslashes +to separate path components. For example, a DOS path of "C:\foo\bar" +should be written "//c/foo/bar" in cygwin. + +----------------------------------------------------------------------- + +TinyFugue for OS/2 + +Theoretically this is still supported, but it seems unlikely anyone will +still be looking for this. Since this requires additional files, it's +likely to slowly diverge from the rest of the code. It may very well be +removed from the release line of this repo, but the old files would +remain tracked and preserved for the future. diff --git a/aclocal.m4 b/aclocal.m4 index 374f5cf..3a61dc2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1 +1,3 @@ -m4_include([m4/ac_check_icu.m4]) +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_include([m4/ax_check_icu.m4]) +m4_include([m4/ax_compiler_vendor.m4]) diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0 deleted file mode 100644 index 3c9d9da..0000000 --- a/autom4te.cache/output.0 +++ /dev/null @@ -1,10077 +0,0 @@ -@%:@! /bin/sh -@%:@ From configure.in Id: configure.in. -@%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.59. -@%:@ -@%:@ Copyright (C) 2003 Free Software Foundation, Inc. -@%:@ This configure script is free software; the Free Software Foundation -@%:@ gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="src/tf.h" -ac_default_prefix=` - if test -w /usr/local/bin && test -w /usr/local/share; then - echo "/usr/local" - elif uname -s | egrep BeOS >/dev/null 2>&1; then - # prefix according to Steven Black - echo "$HOME/config" - else - echo "$HOME" - fi -` -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif -#if STDC_HEADERS -# include -# include -#else -# if HAVE_STDLIB_H -# include -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif -#if HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TFVERSION CC UNAME CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SET_MAKE STRIP RANLIB PCRE EXENAME LIBNAME SYMLINK MODE OTHER_OBJS LIB@&t@OBJS LTLIBOBJS' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -ac_prev= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-version insert version number into names of installed files - (equivalent to --program-suffix=\"-${TFVER}\") - --enable-symlink=NAME make a symlink NAME to the executable - NAME=BINDIR/tf - --enable-core enable debugging core files - --disable-ssl disable SSL support - --enable-getaddrinfo enable getaddrinfo() (if configure complains) - --disable-getaddrinfo disable getaddrinfo() (implies --disable-inet6) - --disable-inet6 disable IPv6 support - --disable-termcap use hardcoded vt100 codes instead of termcap - --enable-termcap=LIB enable termcap with library LIB (e.g., "ncurses") - (needed only if configure guesses incorrectly) - --disable-256colors disable 256 color support (may reduce memory use) - --disable-mailcheck disable mail checking - --enable-mailcheck=DIR enable checking for mail in directory DIR - (needed only if configure guesses incorrectly) - --disable-history disable /recall and other history features - --disable-process disable /quote and /repeat - --disable-float disable floating point arithmetic and functions - - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-incdirs=DIRS search for include files in DIRS - --with-libdirs=DIRS search for libraries in DIRS - --with-inclibdirs=DIRS same as --with-incdirs=DIRS --with-libdirs=DIRS - --with-inclibpfx=DIRS same, but appends '/include' and '/lib' - - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright (C) 2003 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -@%:@@%:@ --------- @%:@@%:@ -@%:@@%:@ Platform. @%:@@%:@ -@%:@@%:@ --------- @%:@@%:@ - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -@%:@@%:@ ----------- @%:@@%:@ -@%:@@%:@ Core tests. @%:@@%:@ -@%:@@%:@ ----------- @%:@@%:@ - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -@%:@@%:@ ---------------- @%:@@%:@ -@%:@@%:@ Cache variables. @%:@@%:@ -@%:@@%:@ ---------------- @%:@@%:@ -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -@%:@@%:@ ----------------- @%:@@%:@ -@%:@@%:@ Output variables. @%:@@%:@ -@%:@@%:@ ----------------- @%:@@%:@ -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -@%:@@%:@ ------------- @%:@@%:@ -@%:@@%:@ Output files. @%:@@%:@ -@%:@@%:@ ------------- @%:@@%:@ -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -@%:@@%:@ ----------- @%:@@%:@ -@%:@@%:@ confdefs.h. @%:@@%:@ -@%:@@%:@ ----------- @%:@@%:@ -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - - -SOCKS='' -OTHER_OBJS="" -TFVER=`sed -ne 's/^TFVER=\(.*\)/\1/p' src/vars.mak` -TFVERSION=`sed -n -e '/Fugue version/s/^.*"\(.*\)".*$/\1/p' src/main.c` - - ac_config_headers="$ac_config_headers src/tfconfig.h" - - - - - -{ echo "$as_me:$LINENO: Configuring $TFVERSION" >&5 -echo "$as_me: Configuring $TFVERSION" >&6;} - -# User installation options -# Check whether --enable-version or --disable-version was given. -if test "${enable_version+set}" = set; then - enableval="$enable_version" - -else - enable_version=default -fi; -# Check whether --enable-symlink or --disable-symlink was given. -if test "${enable_symlink+set}" = set; then - enableval="$enable_symlink" - -else - enable_symlink=default -fi; -# Check whether --enable-core or --disable-core was given. -if test "${enable_core+set}" = set; then - enableval="$enable_core" - -else - enable_core=default -fi; - -# Check whether --enable-ssl or --disable-ssl was given. -if test "${enable_ssl+set}" = set; then - enableval="$enable_ssl" - -else - enable_ssl=yes -fi; -# Check whether --enable-getaddrinfo or --disable-getaddrinfo was given. -if test "${enable_getaddrinfo+set}" = set; then - enableval="$enable_getaddrinfo" - -else - enable_getaddrinfo=default -fi; -# Check whether --enable-inet6 or --disable-inet6 was given. -if test "${enable_inet6+set}" = set; then - enableval="$enable_inet6" - -else - enable_inet6=yes -fi; -# Check whether --enable-termcap or --disable-termcap was given. -if test "${enable_termcap+set}" = set; then - enableval="$enable_termcap" - -else - enable_termcap=default -fi; -# Check whether --enable-256colors or --disable-256colors was given. -if test "${enable_256colors+set}" = set; then - enableval="$enable_256colors" - -else - enable_256colors=yes -fi; -# Check whether --enable-mailcheck or --disable-mailcheck was given. -if test "${enable_mailcheck+set}" = set; then - enableval="$enable_mailcheck" - -else - enable_mailcheck=yes -fi; - -# User feature options -# Check whether --enable-history or --disable-history was given. -if test "${enable_history+set}" = set; then - enableval="$enable_history" - -else - enable_history=yes -fi; -# Check whether --enable-process or --disable-process was given. -if test "${enable_process+set}" = set; then - enableval="$enable_process" - -else - enable_process=yes -fi; -# Check whether --enable-float or --disable-float was given. -if test "${enable_float+set}" = set; then - enableval="$enable_float" - -else - enable_float=yes -fi; - - -# Check whether --with-incdirs or --without-incdirs was given. -if test "${with_incdirs+set}" = set; then - withval="$with_incdirs" - -fi; - -# Check whether --with-libdirs or --without-libdirs was given. -if test "${with_libdirs+set}" = set; then - withval="$with_libdirs" - -fi; - -# Check whether --with-inclibdirs or --without-inclibdirs was given. -if test "${with_inclibdirs+set}" = set; then - withval="$with_inclibdirs" - -fi; - -# Check whether --with-inclibpfx or --without-inclibpfx was given. -if test "${with_inclibpfx+set}" = set; then - withval="$with_inclibpfx" - -fi; - -# Check whether --with-incdir or --without-incdir was given. -if test "${with_incdir+set}" = set; then - withval="$with_incdir" - -fi; -# Check whether --with-libdir or --without-libdir was given. -if test "${with_libdir+set}" = set; then - withval="$with_libdir" - -fi; -# Check whether --with-inclibdir or --without-inclibdir was given. -if test "${with_inclibdir+set}" = set; then - withval="$with_inclibdir" - -fi; - -# Developer options -# --enable-development implies --enable-core --disable-symlink -# Check whether --enable-development or --disable-development was given. -if test "${enable_development+set}" = set; then - enableval="$enable_development" - -else - enable_development=default -fi; -# Check whether --enable-dmalloc or --disable-dmalloc was given. -if test "${enable_dmalloc+set}" = set; then - enableval="$enable_dmalloc" - -else - enable_dmalloc=no -fi; - -{ echo "$as_me:$LINENO: " >&5 -echo "$as_me: " >&6;} - -if test "$enable_development" = "default"; then - if test -d CVS; then - enable_development=yes - else - enable_development=no - fi -fi - -if test "$enable_development" = "yes"; then - { echo "$as_me:$LINENO: Development version." >&5 -echo "$as_me: Development version." >&6;} -elif echo $TFVERSION | egrep "alpha" >/dev/null 2>&1; then -cat <&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break -done - - fi -else - cat >>confdefs.h <<\_ACEOF -@%:@define NDEBUG 1 -_ACEOF - -fi - -if test "$enable_core" = "yes"; then - { echo "$as_me:$LINENO: Core dumps enabled." >&5 -echo "$as_me: Core dumps enabled." >&6;} - CFLAGS="${CFLAGS} -g" - STRIP=":" -else - { echo "$as_me:$LINENO: Core dumps disabled." >&5 -echo "$as_me: Core dumps disabled." >&6;} - cat >>confdefs.h <<\_ACEOF -@%:@define DISABLE_CORE 1 -_ACEOF - -fi - - - - -UNAME=`{ uname -s && uname -v && uname -r || uname -a; } 2>/dev/null` -UNAME=`echo $UNAME` # remove newlines - -#AC_CYGWIN - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $@%:@ != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -@%:@ifndef __cplusplus - choke me -@%:@endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -@%:@include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep - - -if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 -echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 -if test "${ac_cv_prog_gcc_traditional+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 -echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - - - - -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -all: - @echo 'ac_maketemp="$(MAKE)"' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftest.make -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - SET_MAKE= -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - -##if test "$enable_core" = "no"; then -## AC_CHECK_PROG(STRIP, strip, strip, :) -##fi - - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - - - -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -@%:@define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -echo "$as_me:$LINENO: checking for short" >&5 -echo $ECHO_N "checking for short... $ECHO_C" >&6 -if test "${ac_cv_type_short+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((short *) 0) - return 0; -if (sizeof (short)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_short=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_short=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&6 - -echo "$as_me:$LINENO: checking size of short" >&5 -echo $ECHO_N "checking size of short... $ECHO_C" >&6 -if test "${ac_cv_sizeof_short+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_short" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (short))) >= 0)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (short))) < 0)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (short)); } -unsigned long ulongval () { return (long) (sizeof (short)); } -@%:@include -@%:@include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (short))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (short)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (short)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_short=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6 -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - -echo "$as_me:$LINENO: checking for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 -if test "${ac_cv_type_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((int *) 0) - return 0; -if (sizeof (int)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_int=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_int=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 - -echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 -if test "${ac_cv_sizeof_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_int" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) >= 0)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) < 0)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (int)); } -unsigned long ulongval () { return (long) (sizeof (int)); } -@%:@include -@%:@include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (int))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (int)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (int)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_int=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 -if test "${ac_cv_type_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((long *) 0) - return 0; -if (sizeof (long)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_long=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 - -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= 0)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) < 0)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } -@%:@include -@%:@include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_long=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - -if test "$GCC" = "yes"; then - # gcc may generate a warning for "inline", so use "__inline__" instead. - echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\_ACEOF -@%:@define inline __inline__ -_ACEOF - -else - echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -fi - - - - - - - - - if test "${with_incdirs}" != "no" && test "${with_incdirs}" != ""; then - for dir in ${with_incdirs}; do - CPPFLAGS="${CPPFLAGS} -I${dir}" - done - fi - - - if test "${with_incdir}" != "no" && test "${with_incdir}" != ""; then - for dir in ${with_incdir}; do - CPPFLAGS="${CPPFLAGS} -I${dir}" - done - fi - - - if test "${with_inclibdirs}" != "no" && test "${with_inclibdirs}" != ""; then - for dir in ${with_inclibdirs}; do - CPPFLAGS="${CPPFLAGS} -I${dir}" - done - fi - - - if test "${with_inclibdir}" != "no" && test "${with_inclibdir}" != ""; then - for dir in ${with_inclibdir}; do - CPPFLAGS="${CPPFLAGS} -I${dir}" - done - fi - - - if test "${with_inclibpfx}" != "no" && test "${with_inclibpfx}" != ""; then - for dir in ${with_inclibpfx}; do - CPPFLAGS="${CPPFLAGS} -I${dir}/include" - done - fi - - -LIBDIRS="" - - if test "${with_libdirs}" != "no" && test "${with_libdirs}" != ""; then - for dir in ${with_libdirs}; do - LIBDIRS="${LIBDIRS} -L${dir}" - done - fi - - - if test "${with_libdir}" != "no" && test "${with_libdir}" != ""; then - for dir in ${with_libdir}; do - LIBDIRS="${LIBDIRS} -L${dir}" - done - fi - - - if test "${with_inclibdirs}" != "no" && test "${with_inclibdirs}" != ""; then - for dir in ${with_inclibdirs}; do - LIBDIRS="${LIBDIRS} -L${dir}" - done - fi - - - if test "${with_inclibdir}" != "no" && test "${with_inclibdir}" != ""; then - for dir in ${with_inclibdir}; do - LIBDIRS="${LIBDIRS} -L${dir}" - done - fi - - - if test "${with_inclibpfx}" != "no" && test "${with_inclibpfx}" != ""; then - for dir in ${with_inclibpfx}; do - LIBDIRS="${LIBDIRS} -L${dir}/lib" - done - fi - - -LDFLAGS="$LDFLAGS $LIBDIRS" - - -echo "$as_me:$LINENO: checking for library containing select" >&5 -echo $ECHO_N "checking for library containing select... $ECHO_C" >&6 -if test "${ac_cv_search_select+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_select=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char select (); -int -main () -{ -select (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_select="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_select" = no; then - for ac_lib in bsd; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char select (); -int -main () -{ -select (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_select="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_select" >&5 -echo "${ECHO_T}$ac_cv_search_select" >&6 -if test "$ac_cv_search_select" != no; then - test "$ac_cv_search_select" = "none required" || LIBS="$ac_cv_search_select $LIBS" - -else - { { echo "$as_me:$LINENO: error: TF can not work without select()." >&5 -echo "$as_me: error: TF can not work without select()." >&2;} - { (exit 1); exit 1; }; } -fi - - -echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 -echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 -if test "${ac_cv_search_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_gethostbyname=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname (); -int -main () -{ -gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_gethostbyname" = no; then - for ac_lib in bsd nsl_s nsl resolv socket; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname (); -int -main () -{ -gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 -if test "$ac_cv_search_gethostbyname" != no; then - test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" - -else - { echo "$as_me:$LINENO: WARNING: Host name resolution will not be available." >&5 -echo "$as_me: WARNING: Host name resolution will not be available." >&2;} -fi - - - -echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 -if test "${ac_cv_lib_inet_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-linet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_inet_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_inet_main=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 -if test $ac_cv_lib_inet_main = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBINET 1 -_ACEOF - - LIBS="-linet $LIBS" - -fi - - - -echo "$as_me:$LINENO: checking for main in -lnet" >&5 -echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6 -if test "${ac_cv_lib_net_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_net_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_net_main=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5 -echo "${ECHO_T}$ac_cv_lib_net_main" >&6 -if test $ac_cv_lib_net_main = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBNET 1 -_ACEOF - - LIBS="-lnet $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for library containing connect" >&5 -echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6 -if test "${ac_cv_search_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_connect=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect (); -int -main () -{ -connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_connect="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_connect" = no; then - for ac_lib in socket; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect (); -int -main () -{ -connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_connect="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 -echo "${ECHO_T}$ac_cv_search_connect" >&6 -if test "$ac_cv_search_connect" != no; then - test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS" - -fi - - - - - -echo "$as_me:$LINENO: checking for library containing setlocale" >&5 -echo $ECHO_N "checking for library containing setlocale... $ECHO_C" >&6 -if test "${ac_cv_search_setlocale+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_setlocale=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char setlocale (); -int -main () -{ -setlocale (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_setlocale="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_setlocale" = no; then - for ac_lib in intl; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char setlocale (); -int -main () -{ -setlocale (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_setlocale="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_setlocale" >&5 -echo "${ECHO_T}$ac_cv_search_setlocale" >&6 -if test "$ac_cv_search_setlocale" != no; then - test "$ac_cv_search_setlocale" = "none required" || LIBS="$ac_cv_search_setlocale $LIBS" - -else - { echo "$as_me:$LINENO: WARNING: Locales will not be supported." >&5 -echo "$as_me: WARNING: Locales will not be supported." >&2;} -fi - - -if test "$enable_ssl" = "yes"; then - ok=0 - old_LIBS="$LIBS" - old_CFLAGS="$CFLAGS" - old_CPPFLAGS="$CPPFLAGS" - while true; do - LIBS="$LIBS -lssl -lcrypto" - echo "$as_me:$LINENO: checking for libcrypto and libssl" >&5 -echo $ECHO_N "checking for libcrypto and libssl... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char SSL_new (); -int -main () -{ -SSL_new (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -CFLAGS="$CFLAGS -L/usr/local/ssl/lib"; - CPPFLAGS="-I/usr/local/ssl/include $CPPFLAGS"; - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char SSL_new (); -int -main () -{ -SSL_new (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: /usr/local/ssl" >&5 -echo "${ECHO_T}/usr/local/ssl" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; break -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - echo "$as_me:$LINENO: checking for ssl kerberos dependency" >&5 -echo $ECHO_N "checking for ssl kerberos dependency... $ECHO_C" >&6 - if test -r /usr/kerberos/include/krb5.h; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - CPPFLAGS="-I/usr/kerberos/include $CPPFLAGS" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - if test "${ac_cv_header_openssl_ssl_h+set}" = set; then - echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5 -echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6 -if test "${ac_cv_header_openssl_ssl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5 -echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5 -echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5 -echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5 -echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6 -if test "${ac_cv_header_openssl_ssl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_openssl_ssl_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5 -echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6 - -fi -if test $ac_cv_header_openssl_ssl_h = yes; then - : -else - break -fi - - - cat >>confdefs.h <<\_ACEOF -@%:@define HAVE_SSL 1 -_ACEOF - - ok=1 - break - done - if test "$ok" = "0"; then - echo "$as_me:$LINENO: result: ssl support will not be enabled." >&5 -echo "${ECHO_T}ssl support will not be enabled." >&6 - LIBS="$old_LIBS" - CFLAGS="$old_CFLAGS" - CPPFLAGS="$old_CPPFLAGS" - fi -fi - - -terminal_hardcode="TERM_vt100"; - -if test "$CYGWIN" = "yes"; then - terminal_hardcode="TERM_ansi"; - if test "$enable_termcap" = "default"; then - enable_termcap="no"; - fi -fi - -if test "$enable_termcap" = "default"; then - enable_termcap="yes"; -fi - -if test "$enable_termcap" = "no"; then - cat >>confdefs.h <<_ACEOF -@%:@define HARDCODE $terminal_hardcode -_ACEOF - -else - if test "$enable_termcap" = "yes"; then enable_termcap=""; fi - echo "$as_me:$LINENO: checking for library containing tgetent" >&5 -echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6 -if test "${ac_cv_search_tgetent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_tgetent=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char tgetent (); -int -main () -{ -tgetent (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_tgetent="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_tgetent" = no; then - for ac_lib in $enable_termcap termcap ncurses curses; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char tgetent (); -int -main () -{ -tgetent (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_tgetent="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5 -echo "${ECHO_T}$ac_cv_search_tgetent" >&6 -if test "$ac_cv_search_tgetent" != no; then - test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" - cat >>confdefs.h <<\_ACEOF -@%:@define TERMCAP 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -@%:@define HARDCODE $terminal_hardcode -_ACEOF - - { echo "$as_me:$LINENO: WARNING: Hardcoding terminal codes." >&5 -echo "$as_me: WARNING: Hardcoding terminal codes." >&2;} -fi - -fi - - -if test "$enable_256colors" = "yes"; then - cat >>confdefs.h <<\_ACEOF -@%:@define NCOLORS 256 -_ACEOF - -fi - - -if test "$enable_float" = "yes"; then - echo "$as_me:$LINENO: checking for library containing sqrt" >&5 -echo $ECHO_N "checking for library containing sqrt... $ECHO_C" >&6 -if test "${ac_cv_search_sqrt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_sqrt=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char sqrt (); -int -main () -{ -sqrt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_sqrt="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_sqrt" = no; then - for ac_lib in m; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char sqrt (); -int -main () -{ -sqrt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_sqrt="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_sqrt" >&5 -echo "${ECHO_T}$ac_cv_search_sqrt" >&6 -if test "$ac_cv_search_sqrt" != no; then - test "$ac_cv_search_sqrt" = "none required" || LIBS="$ac_cv_search_sqrt $LIBS" - -fi - -fi - - -echo "$as_me:$LINENO: checking for inflate in -lz" >&5 -echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6 -if test "${ac_cv_lib_z_inflate+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char inflate (); -int -main () -{ -inflate (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_z_inflate=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_z_inflate=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5 -echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6 -if test $ac_cv_lib_z_inflate = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for pcre_compile in -lpcre" >&5 -echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6 -if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpcre $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pcre_compile (); -int -main () -{ -pcre_compile (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_pcre_pcre_compile=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_pcre_pcre_compile=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pcre_pcre_compile" >&5 -echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6 -if test $ac_cv_lib_pcre_pcre_compile = yes; then - : -else - - { echo "$as_me:$LINENO: Note: will use old copy of pcre distributed with tf" >&5 -echo "$as_me: Note: will use old copy of pcre distributed with tf" >&6;}; - PCRE=pcre; LDFLAGS="${LDFLAGS} -Lpcre-2.08"; -fi - - - - - -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -@%:@define STDC_HEADERS 1 -_ACEOF - -fi - - - - -for ac_header in unistd.h memory.h sys/select.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 -echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 -if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif - -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_sys_wait_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_sys_wait_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 -if test $ac_cv_header_sys_wait_h = yes; then - -cat >>confdefs.h <<\_ACEOF -@%:@define HAVE_SYS_WAIT_H 1 -_ACEOF - -fi - - - -for ac_header in locale.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { echo "$as_me:$LINENO: WARNING: Locales will not be supported." >&5 -echo "$as_me: WARNING: Locales will not be supported." >&2;} -fi - -done - - - -for ac_header in pwd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { echo "$as_me:$LINENO: WARNING: Filename '~user' expansion will not be supported." >&5 -echo "$as_me: WARNING: Filename '~user' expansion will not be supported." >&2;} -fi - -done - - - -for ac_header in zlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - found=0; - for f in netinet/in.h sys/in.h sys/netinet/in.h; do - -for ac_header in $f -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - cat >>confdefs.h <<_ACEOF -@%:@define NETINET_IN_H <$f> -_ACEOF - - found=1 - break -fi - -done - - if test $found -eq 1; then break; fi - done - if test $found -eq 1; then - :; - else - :; { echo "$as_me:$LINENO: WARNING: I will use my own internet structures. Good luck." >&5 -echo "$as_me: WARNING: I will use my own internet structures. Good luck." >&2;} - fi - unset found - - - - found=0; - for f in arpa/inet.h sys/inet.h; do - -for ac_header in $f -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - cat >>confdefs.h <<_ACEOF -@%:@define ARPA_INET_H <$f> -_ACEOF - - found=1 - break -fi - -done - - if test $found -eq 1; then break; fi - done - if test $found -eq 1; then - :; - else - :; - fi - unset found - - - - - found=0; - for f in netdb.h sys/netdb.h; do - -for ac_header in $f -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - cat >>confdefs.h <<_ACEOF -@%:@define NETDB_H <$f> -_ACEOF - - found=1 - break -fi - -done - - if test $found -eq 1; then break; fi - done - if test $found -eq 1; then - :; - else - :; { { echo "$as_me:$LINENO: error: can't find netdb.h" >&5 -echo "$as_me: error: can't find netdb.h" >&2;} - { (exit 1); exit 1; }; } - fi - unset found - - -echo "$as_me:$LINENO: checking whether struct sockaddr has sa_len" >&5 -echo $ECHO_N "checking whether struct sockaddr has sa_len... $ECHO_C" >&6 -if test "${tf_cv_sa_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -int -main () -{ -struct sockaddr sa; return sa.sa_len; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tf_cv_sa_len=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -tf_cv_sa_len=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $tf_cv_sa_len" >&5 -echo "${ECHO_T}$tf_cv_sa_len" >&6 - -if test "${tf_cv_sa_len}" = "yes"; then - cat >>confdefs.h <<\_ACEOF -@%:@define HAVE_SOCKADDR_SA_LEN 1 -_ACEOF - -fi - - - - - - -for ac_header in termios.h termio.h sgtty.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -@%:@include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -@%:@include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -@%:@@%:@ ------------------------------------------ @%:@@%:@ -@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -@%:@@%:@ ------------------------------------------ @%:@@%:@ -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - break -fi - -done - - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "struct winsize" >/dev/null 2>&1; then - cat >>confdefs.h <<\_ACEOF -@%:@define NEED_PTEM_H 1 -_ACEOF - -fi -rm -f conftest* - - - - - - - -echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 -if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#ifdef signal -# undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int -main () -{ -int i; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_signal=void -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_signal=int -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6 - -cat >>confdefs.h <<_ACEOF -@%:@define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 -if test "${ac_cv_type_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((pid_t *) 0) - return 0; -if (sizeof (pid_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_pid_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_pid_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 -if test $ac_cv_type_pid_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -@%:@define pid_t int -_ACEOF - -fi - -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((size_t *) 0) - return 0; -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_size_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 -if test $ac_cv_type_size_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -@%:@define size_t unsigned -_ACEOF - -fi - -echo "$as_me:$LINENO: checking for time_t" >&5 -echo $ECHO_N "checking for time_t... $ECHO_C" >&6 -if test "${ac_cv_type_time_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((time_t *) 0) - return 0; -if (sizeof (time_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_time_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_time_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 -echo "${ECHO_T}$ac_cv_type_time_t" >&6 -if test $ac_cv_type_time_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -@%:@define time_t long -_ACEOF - -fi - -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 -if test "${ac_cv_type_socklen_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#if STDC_HEADERS -#include -#include -#endif - -#include -#include - - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - ac_cv_type_socklen_t=yes -else - ac_cv_type_socklen_t=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 -if test $ac_cv_type_socklen_t = no; then - cat >>confdefs.h <<\_ACEOF -@%:@define socklen_t int -_ACEOF - -fi - - - - - - - -for ac_func in strftime -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - # strftime is in -lintl on SCO UNIX. -echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 -echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6 -if test "${ac_cv_lib_intl_strftime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strftime (); -int -main () -{ -strftime (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_intl_strftime=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_intl_strftime=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6 -if test $ac_cv_lib_intl_strftime = yes; then - cat >>confdefs.h <<\_ACEOF -@%:@define HAVE_STRFTIME 1 -_ACEOF - -LIBS="-lintl $LIBS" -fi - -fi -done - - - -for ac_func in h_errno -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - -for ac_func in strstr strtol -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - { { echo "$as_me:$LINENO: error: Missing required standard function." >&5 -echo "$as_me: error: Missing required standard function." >&2;} - { (exit 1); exit 1; }; } -fi -done - - - - - - - - - - - - - - - -for ac_func in bcopy bzero connect fileno getcwd \ - gethostname gethostbyname getipnodebyname \ - getpwnam gettimeofday getwd hstrerror index inet_aton -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$enable_getaddrinfo" = "default"; then - if test `uname -s` = 'Darwin'; then - { echo "$as_me:$LINENO: WARNING: getaddrinfo() may be broken, so IPv6 support is disabled. Use --enable-getaddrinfo to override." >&5 -echo "$as_me: WARNING: getaddrinfo() may be broken, so IPv6 support is disabled. Use --enable-getaddrinfo to override." >&2;} - enable_getaddrinfo=no - else - enable_getaddrinfo=yes - fi -fi -if test "$enable_getaddrinfo" = "no"; then - enable_inet6=no -else - - -for ac_func in getaddrinfo gai_strerror -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -fi - - - - - - - - - - - - - - - - - - - -for ac_func in kill memcpy memset raise setlocale setrlimit sigaction \ - srand srandom \ - strcasecmp strchr strcmpi strcspn strerror stricmp strtod tzset waitpid -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$CYGWIN" = "yes"; then - cat >>confdefs.h <<\_ACEOF -@%:@define HAVE_H_ERRNO 0 /* h_errno is broken in cygwin32 b18. */ -_ACEOF - -fi - -if test "$enable_inet6" = "yes"; then - echo "$as_me:$LINENO: checking for IPv6 address structure" >&5 -echo $ECHO_N "checking for IPv6 address structure... $ECHO_C" >&6 - for type in in6_addr in_addr6; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include NETINET_IN_H - -int -main () -{ - -#ifndef AF_INET6 -# error AF_INET6 not defined -#endif - struct ${type} foo; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<_ACEOF -@%:@define IN6_ADDR $type -_ACEOF - - echo "$as_me:$LINENO: result: $type" >&5 -echo "${ECHO_T}$type" >&6 - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -fi - - - - - - -if test "$enable_mailcheck" = "no"; then - MAILDIR="" -elif test "$enable_mailcheck" = "yes"; then - echo "$as_me:$LINENO: checking location of mail directory" >&5 -echo $ECHO_N "checking location of mail directory... $ECHO_C" >&6 - if test -n "$MAIL" ; then - # Not every system has dirname. sigh. - MAILDIR=`echo $MAIL | sed 's;/[^/]*$;;'` - elif test -d /usr/spool/mail ; then - MAILDIR="/usr/spool/mail" - elif test -d /var/spool/mail ; then - MAILDIR="/var/spool/mail" - elif test -d /usr/mail ; then - MAILDIR="/usr/mail" - elif test -d /var/mail ; then - MAILDIR="/var/mail" - else - MAILDIR="" - fi - echo "$as_me:$LINENO: result: ${MAILDIR-(none)}" >&5 -echo "${ECHO_T}${MAILDIR-(none)}" >&6 -else - MAILDIR="$enable_mailcheck" -fi -if test -n "$MAILDIR"; then - cat >>confdefs.h <<_ACEOF -@%:@define MAILDIR "$MAILDIR" -_ACEOF - -fi - - - -if test "$enable_version" != "no" && test "$program_suffix" = "NONE"; then - program_suffix="-${TFVER}" -fi - -EXENAME="tf" -test "${program_prefix}" != "NONE" && EXENAME="${program_prefix}${EXENAME}" -test "${program_suffix}" != "NONE" && EXENAME="${EXENAME}${program_suffix}" -if test "${program_transform_name}" != "NONE"; then - EXENAME=`echo "${EXENAME}" | sed "${program_transform_name}"` -fi -LIBNAME="${EXENAME}-lib" - -if test "$enable_symlink" = "no"; then - SYMLINK="" -elif test "$enable_symlink" = "yes"; then - SYMLINK='${bindir}/tf' -else - SYMLINK="$enable_symlink" -fi - - - - - - - - - - - - - - - -MODE=755 - - - - - -PATH="$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:/usr/ccs/bin" - - -if test "$enable_dmalloc" = "yes"; then - CPPFLAGS="$CPPFLAGS -DUSE_DMALLOC" - OTHER_OBJS="$OTHER_OBJS dmalloc.o" -fi - - -if test "$enable_inet6" = "yes"; then cat >>confdefs.h <<\_ACEOF -@%:@define ENABLE_INET6 1 -_ACEOF - fi -if test "$enable_history" = "no"; then cat >>confdefs.h <<\_ACEOF -@%:@define NO_HISTORY 1 -_ACEOF - fi -if test "$enable_process" = "no"; then cat >>confdefs.h <<\_ACEOF -@%:@define NO_PROCESS 1 -_ACEOF - fi -if test "$enable_float" = "no"; then cat >>confdefs.h <<\_ACEOF -@%:@define NO_FLOAT 1 -_ACEOF - fi - -CPPFLAGS="${CPPFLAGS} -DDATADIR=\${datadir}" - - - - - - ac_config_files="$ac_config_files Makefile unix/vars.mak src/tfdefs.h" - ac_config_commands="$ac_config_commands default" -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIB@&t@OBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX -@%:@@%:@ Running $as_me. @%:@@%:@ -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "unix/vars.mak" ) CONFIG_FILES="$CONFIG_FILES unix/vars.mak" ;; - "src/tfdefs.h" ) CONFIG_FILES="$CONFIG_FILES src/tfdefs.h" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "src/tfconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/tfconfig.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@TFVERSION@,$TFVERSION,;t t -s,@CC@,$CC,;t t -s,@UNAME@,$UNAME,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@STRIP@,$STRIP,;t t -s,@RANLIB@,$RANLIB,;t t -s,@PCRE@,$PCRE,;t t -s,@EXENAME@,$EXENAME,;t t -s,@LIBNAME@,$LIBNAME,;t t -s,@SYMLINK@,$SYMLINK,;t t -s,@MODE@,$MODE,;t t -s,@OTHER_OBJS@,$OTHER_OBJS,;t t -s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in - if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file - fi - else - cat $tmp/config.h - rm -f $tmp/config.h - fi -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - default ) - -### Create src/Makefile from pieces. - -cat >src/Makefile <> src/Makefile - ;; - esac -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - - -{ echo "$as_me:$LINENO: -##################################################### -## prefix: $prefix -## exec_prefix: $exec_prefix -## bindir: $bindir -## datadir: $datadir -## executable: \${bindir}/$EXENAME -## library: \${datadir}/$LIBNAME -## -## TinyFugue configuration successful. -## Use \"make\" to build. -" >&5 -echo "$as_me: -##################################################### -## prefix: $prefix -## exec_prefix: $exec_prefix -## bindir: $bindir -## datadir: $datadir -## executable: \${bindir}/$EXENAME -## library: \${datadir}/$LIBNAME -## -## TinyFugue configuration successful. -## Use \"make\" to build. -" >&6;} diff --git a/autom4te.cache/requests b/autom4te.cache/requests deleted file mode 100644 index d80b1c9..0000000 --- a/autom4te.cache/requests +++ /dev/null @@ -1,184 +0,0 @@ -# This file was generated. -# It contains the lists of macros which have been traced. -# It can be safely removed. - -@request = ( - bless( [ - '0', - 1, - [ - '/usr/share/autoconf' - ], - [ - '/usr/share/autoconf/autoconf/autoconf.m4f', - 'configure.in' - ], - { - 'm4_pattern_forbid' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AC_C_VOLATILE' => 1, - 'AC_TYPE_OFF_T' => 1, - 'AC_FUNC_CLOSEDIR_VOID' => 1, - 'AC_REPLACE_FNMATCH' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AC_FUNC_STAT' => 1, - 'AC_FUNC_WAIT3' => 1, - 'AC_HEADER_TIME' => 1, - 'AC_FUNC_LSTAT' => 1, - 'AC_STRUCT_TM' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AC_FUNC_GETMNTENT' => 1, - 'AC_TYPE_MODE_T' => 1, - 'AC_FUNC_STRTOD' => 1, - 'AC_CHECK_HEADERS' => 1, - 'AC_FUNC_STRNLEN' => 1, - 'm4_sinclude' => 1, - 'AC_PROG_CXX' => 1, - 'AC_PATH_X' => 1, - 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, - 'AC_PROG_AWK' => 1, - '_m4_warn' => 1, - 'AC_HEADER_STDC' => 1, - 'AC_HEADER_MAJOR' => 1, - 'AC_FUNC_ERROR_AT_LINE' => 1, - 'AC_PROG_GCC_TRADITIONAL' => 1, - 'AC_LIBSOURCE' => 1, - 'AC_FUNC_MBRTOWC' => 1, - 'AC_STRUCT_ST_BLOCKS' => 1, - 'AC_TYPE_SIGNAL' => 1, - 'AC_TYPE_UID_T' => 1, - 'AC_PROG_MAKE_SET' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - 'm4_pattern_allow' => 1, - 'sinclude' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AC_FUNC_STRERROR_R' => 1, - 'AC_PROG_CC' => 1, - 'AC_DECL_SYS_SIGLIST' => 1, - 'AC_FUNC_FORK' => 1, - 'AC_FUNC_STRCOLL' => 1, - 'AC_FUNC_VPRINTF' => 1, - 'AC_PROG_YACC' => 1, - 'AC_INIT' => 1, - 'AC_STRUCT_TIMEZONE' => 1, - 'AC_FUNC_CHOWN' => 1, - 'AC_SUBST' => 1, - 'AC_FUNC_ALLOCA' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AC_FUNC_GETPGRP' => 1, - 'AC_PROG_RANLIB' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_FUNC_SETPGRP' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AC_FUNC_MMAP' => 1, - 'AC_FUNC_REALLOC' => 1, - 'AC_TYPE_SIZE_T' => 1, - 'AC_CONFIG_LINKS' => 1, - 'AC_CHECK_TYPES' => 1, - 'AC_CHECK_MEMBERS' => 1, - 'AM_MAINTAINER_MODE' => 1, - 'AC_FUNC_UTIME_NULL' => 1, - 'AC_FUNC_SELECT_ARGTYPES' => 1, - 'AC_HEADER_STAT' => 1, - 'AC_FUNC_STRFTIME' => 1, - 'AC_PROG_CPP' => 1, - 'AC_C_INLINE' => 1, - 'AC_PROG_LEX' => 1, - 'AC_C_CONST' => 1, - 'AC_TYPE_PID_T' => 1, - 'AC_CONFIG_FILES' => 1, - 'include' => 1, - 'AC_FUNC_SETVBUF_REVERSED' => 1, - 'AC_PROG_INSTALL' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AC_CHECK_LIB' => 1, - 'AC_FUNC_OBSTACK' => 1, - 'AC_FUNC_MALLOC' => 1, - 'AC_FUNC_GETGROUPS' => 1, - 'AC_FUNC_GETLOADAVG' => 1, - 'AH_OUTPUT' => 1, - 'AC_FUNC_FSEEKO' => 1, - 'AM_PROG_CC_C_O' => 1, - 'AC_FUNC_MKTIME' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'AM_CONDITIONAL' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_HEADER_SYS_WAIT' => 1, - 'AC_PROG_LN_S' => 1, - 'AC_FUNC_MEMCMP' => 1, - 'm4_include' => 1, - 'AC_HEADER_DIRENT' => 1, - 'AC_CHECK_FUNCS' => 1 - } - ], 'Autom4te::Request' ), - bless( [ - '1', - 1, - [ - '/usr/share/autoconf' - ], - [ - '/usr/share/autoconf/autoconf/autoconf.m4f', - 'aclocal.m4', - 'configure.in' - ], - { - '_LT_AC_TAGCONFIG' => 1, - 'AM_PROG_F77_C_O' => 1, - 'AC_INIT' => 1, - 'm4_pattern_forbid' => 1, - '_AM_COND_IF' => 1, - 'AC_CANONICAL_TARGET' => 1, - 'AC_SUBST' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AC_FC_SRCEXT' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AM_PATH_GUILE' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_REQUIRE_AUX_FILE' => 1, - 'AC_CONFIG_LINKS' => 1, - 'm4_sinclude' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'AM_MAINTAINER_MODE' => 1, - 'AM_NLS' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, - '_m4_warn' => 1, - 'AM_PROG_CXX_C_O' => 1, - '_AM_COND_ENDIF' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, - 'AM_ENABLE_MULTILIB' => 1, - 'AM_SILENT_RULES' => 1, - 'AM_PROG_MOC' => 1, - 'AC_CONFIG_FILES' => 1, - 'include' => 1, - 'LT_INIT' => 1, - 'AM_PROG_AR' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AC_LIBSOURCE' => 1, - 'AM_PROG_FC_C_O' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AC_FC_FREEFORM' => 1, - 'AH_OUTPUT' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - 'sinclude' => 1, - 'AM_PROG_CC_C_O' => 1, - 'm4_pattern_allow' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'AM_CONDITIONAL' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AM_POT_TOOLS' => 1, - 'm4_include' => 1, - '_AM_COND_ELSE' => 1, - 'AC_SUBST_TRACE' => 1 - } - ], 'Autom4te::Request' ) - ); - diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0 deleted file mode 100644 index 1c28111..0000000 --- a/autom4te.cache/traces.0 +++ /dev/null @@ -1,352 +0,0 @@ -m4trace:configure.in:18: -1- AC_INIT([src/tf.h]) -m4trace:configure.in:18: -1- m4_pattern_forbid([^_?A[CHUM]_]) -m4trace:configure.in:18: -1- m4_pattern_forbid([_AC_]) -m4trace:configure.in:18: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -m4trace:configure.in:18: -1- m4_pattern_allow([^AS_FLAGS$]) -m4trace:configure.in:18: -1- m4_pattern_forbid([^_?m4_]) -m4trace:configure.in:18: -1- m4_pattern_forbid([^dnl$]) -m4trace:configure.in:18: -1- m4_pattern_forbid([^_?AS_]) -m4trace:configure.in:18: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) -m4trace:configure.in:18: -1- AC_SUBST([PATH_SEPARATOR]) -m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) -m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) -m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) -m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) -m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) -m4trace:configure.in:18: -1- AC_SUBST([exec_prefix], [NONE]) -m4trace:configure.in:18: -1- AC_SUBST([prefix], [NONE]) -m4trace:configure.in:18: -1- AC_SUBST([program_transform_name], [s,x,x,]) -m4trace:configure.in:18: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) -m4trace:configure.in:18: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) -m4trace:configure.in:18: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) -m4trace:configure.in:18: -1- AC_SUBST([datadir], ['${prefix}/share']) -m4trace:configure.in:18: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) -m4trace:configure.in:18: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) -m4trace:configure.in:18: -1- AC_SUBST([localstatedir], ['${prefix}/var']) -m4trace:configure.in:18: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) -m4trace:configure.in:18: -1- AC_SUBST([includedir], ['${prefix}/include']) -m4trace:configure.in:18: -1- AC_SUBST([oldincludedir], ['/usr/include']) -m4trace:configure.in:18: -1- AC_SUBST([infodir], ['${prefix}/info']) -m4trace:configure.in:18: -1- AC_SUBST([mandir], ['${prefix}/man']) -m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) -m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ -#undef PACKAGE_NAME]) -m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) -m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME]) -m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) -m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ -#undef PACKAGE_VERSION]) -m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) -m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING]) -m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) -m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT]) -m4trace:configure.in:18: -1- AC_SUBST([build_alias]) -m4trace:configure.in:18: -1- AC_SUBST([host_alias]) -m4trace:configure.in:18: -1- AC_SUBST([target_alias]) -m4trace:configure.in:18: -1- AC_SUBST([DEFS]) -m4trace:configure.in:18: -1- AC_SUBST([ECHO_C]) -m4trace:configure.in:18: -1- AC_SUBST([ECHO_N]) -m4trace:configure.in:18: -1- AC_SUBST([ECHO_T]) -m4trace:configure.in:18: -1- AC_SUBST([LIBS]) -m4trace:configure.in:25: -1- AC_CONFIG_HEADERS([src/tfconfig.h]) -m4trace:configure.in:38: -1- AC_SUBST([TFVERSION]) -m4trace:configure.in:141: -1- AC_SUBST([CC]) -m4trace:configure.in:144: -1- AC_DEFINE_TRACE_LITERAL([NDEBUG]) -m4trace:configure.in:153: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_CORE]) -m4trace:configure.in:162: -1- AC_SUBST([UNAME]) -m4trace:configure.in:167: -1- AC_PROG_CC -m4trace:configure.in:167: -1- AC_SUBST([CC]) -m4trace:configure.in:167: -1- AC_SUBST([CFLAGS]) -m4trace:configure.in:167: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.in:167: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:167: -1- AC_SUBST([CC]) -m4trace:configure.in:167: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.in:167: -1- AC_SUBST([CC]) -m4trace:configure.in:167: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.in:167: -1- AC_SUBST([CC]) -m4trace:configure.in:167: -1- AC_SUBST([CC]) -m4trace:configure.in:167: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.in:167: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) -m4trace:configure.in:167: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) -m4trace:configure.in:168: -1- AC_PROG_GCC_TRADITIONAL -m4trace:configure.in:168: -1- AC_PROG_CPP -m4trace:configure.in:168: -1- AC_SUBST([CPP]) -m4trace:configure.in:168: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:168: -1- AC_SUBST([CPP]) -m4trace:configure.in:168: -1- AC_SUBST([EGREP]) -m4trace:configure.in:188: -1- AC_PROG_MAKE_SET -m4trace:configure.in:188: -1- AC_SUBST([SET_MAKE]) -m4trace:configure.in:193: -1- AC_SUBST([STRIP]) -m4trace:configure.in:195: -1- AC_SUBST([RANLIB]) -m4trace:configure.in:200: -1- AC_HEADER_STDC -m4trace:configure.in:200: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.in:200: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS]) -m4trace:configure.in:200: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H]) -m4trace:configure.in:200: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H]) -m4trace:configure.in:200: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from... -autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... -autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from... -configure.in:200: the top level]) -m4trace:configure.in:200: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SHORT]) -m4trace:configure.in:200: -1- AH_OUTPUT([SIZEOF_SHORT], [/* The size of a `short\', as computed by sizeof. */ -#undef SIZEOF_SHORT]) -m4trace:configure.in:201: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from... -autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... -autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from... -configure.in:201: the top level]) -m4trace:configure.in:201: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_INT]) -m4trace:configure.in:201: -1- AH_OUTPUT([SIZEOF_INT], [/* The size of a `int\', as computed by sizeof. */ -#undef SIZEOF_INT]) -m4trace:configure.in:202: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from... -autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... -autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from... -configure.in:202: the top level]) -m4trace:configure.in:202: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG]) -m4trace:configure.in:202: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of a `long\', as computed by sizeof. */ -#undef SIZEOF_LONG]) -m4trace:configure.in:208: -1- AC_DEFINE_TRACE_LITERAL([inline]) -m4trace:configure.in:210: -1- AC_C_INLINE -m4trace:configure.in:210: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler - calls it, or to nothing if \'inline\' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif]) -m4trace:configure.in:261: -1- AC_CHECK_LIB([inet], [main]) -m4trace:configure.in:261: -1- AH_OUTPUT([HAVE_LIBINET], [/* Define to 1 if you have the `inet\' library (-linet). */ -#undef HAVE_LIBINET]) -m4trace:configure.in:261: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBINET]) -m4trace:configure.in:264: -1- AC_CHECK_LIB([net], [main]) -m4trace:configure.in:264: -1- AH_OUTPUT([HAVE_LIBNET], [/* Define to 1 if you have the `net\' library (-lnet). */ -#undef HAVE_LIBNET]) -m4trace:configure.in:264: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNET]) -m4trace:configure.in:315: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSL]) -m4trace:configure.in:347: -1- AC_DEFINE_TRACE_LITERAL([HARDCODE]) -m4trace:configure.in:351: -2- AC_DEFINE_TRACE_LITERAL([TERMCAP]) -m4trace:configure.in:353: -2- AC_DEFINE_TRACE_LITERAL([HARDCODE]) -m4trace:configure.in:360: -1- AC_DEFINE_TRACE_LITERAL([NCOLORS]) -m4trace:configure.in:368: -1- AC_CHECK_LIB([z], [inflate]) -m4trace:configure.in:368: -1- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the `z\' library (-lz). */ -#undef HAVE_LIBZ]) -m4trace:configure.in:368: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ]) -m4trace:configure.in:372: -1- AC_CHECK_LIB([pcre], [pcre_compile], [:], [ - AC_MSG_NOTICE([Note: will use old copy of pcre distributed with tf]); - PCRE=pcre; LDFLAGS="${LDFLAGS} -Lpcre-2.08"; ]) -m4trace:configure.in:373: -1- AC_SUBST([PCRE]) -m4trace:configure.in:378: -1- AC_HEADER_STDC -m4trace:configure.in:378: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.in:378: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS]) -m4trace:configure.in:379: -1- AC_CHECK_HEADERS([unistd.h memory.h sys/select.h]) -m4trace:configure.in:379: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H]) -m4trace:configure.in:379: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H]) -m4trace:configure.in:379: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H]) -m4trace:configure.in:380: -1- AC_HEADER_SYS_WAIT -m4trace:configure.in:380: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_WAIT_H]) -m4trace:configure.in:380: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H]) -m4trace:configure.in:384: -1- AC_CHECK_HEADERS([locale.h], [], [{ echo "$as_me:$LINENO: WARNING: Locales will not be supported." >&5 -echo "$as_me: WARNING: Locales will not be supported." >&2;}]) -m4trace:configure.in:384: -1- AH_OUTPUT([HAVE_LOCALE_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H]) -m4trace:configure.in:388: -1- AC_CHECK_HEADERS([pwd.h], [], [{ echo "$as_me:$LINENO: WARNING: Filename '~user' expansion will not be supported." >&5 -echo "$as_me: WARNING: Filename '~user' expansion will not be supported." >&2;}]) -m4trace:configure.in:388: -1- AH_OUTPUT([HAVE_PWD_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_PWD_H]) -m4trace:configure.in:391: -1- AC_CHECK_HEADERS([zlib.h]) -m4trace:configure.in:391: -1- AH_OUTPUT([HAVE_ZLIB_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_ZLIB_H]) -m4trace:configure.in:417: -2- AC_DEFINE_TRACE_LITERAL([NETINET_IN_H]) -m4trace:configure.in:417: -1- AC_CHECK_HEADERS([$f], [cat >>confdefs.h <<_ACEOF -@%:@define NETINET_IN_H <$f> -_ACEOF - - found=1 - break]) -m4trace:configure.in:420: -2- AC_DEFINE_TRACE_LITERAL([ARPA_INET_H]) -m4trace:configure.in:420: -1- AC_CHECK_HEADERS([$f], [cat >>confdefs.h <<_ACEOF -@%:@define ARPA_INET_H <$f> -_ACEOF - - found=1 - break]) -m4trace:configure.in:427: -2- AC_DEFINE_TRACE_LITERAL([NETDB_H]) -m4trace:configure.in:427: -1- AC_CHECK_HEADERS([$f], [cat >>confdefs.h <<_ACEOF -@%:@define NETDB_H <$f> -_ACEOF - - found=1 - break]) -m4trace:configure.in:435: -2- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... -configure.in:435: the top level]) -m4trace:configure.in:438: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKADDR_SA_LEN]) -m4trace:configure.in:444: -1- AC_CHECK_HEADERS([termios.h termio.h sgtty.h], [break]) -m4trace:configure.in:444: -1- AH_OUTPUT([HAVE_TERMIOS_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_TERMIOS_H]) -m4trace:configure.in:444: -1- AH_OUTPUT([HAVE_TERMIO_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_TERMIO_H]) -m4trace:configure.in:444: -1- AH_OUTPUT([HAVE_SGTTY_H], [/* Define to 1 if you have the header file. */ -#undef HAVE_SGTTY_H]) -m4trace:configure.in:447: -2- AC_DEFINE_TRACE_LITERAL([NEED_PTEM_H]) -m4trace:configure.in:475: -1- AC_TYPE_SIGNAL -m4trace:configure.in:475: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) -m4trace:configure.in:475: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ -#undef RETSIGTYPE]) -m4trace:configure.in:476: -1- AC_TYPE_PID_T -m4trace:configure.in:476: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) -m4trace:configure.in:476: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ -#undef pid_t]) -m4trace:configure.in:477: -1- AC_TYPE_SIZE_T -m4trace:configure.in:477: -1- AC_DEFINE_TRACE_LITERAL([size_t]) -m4trace:configure.in:477: -1- AH_OUTPUT([size_t], [/* Define to `unsigned\' if does not define. */ -#undef size_t]) -m4trace:configure.in:478: -1- AC_DEFINE_TRACE_LITERAL([time_t]) -m4trace:configure.in:478: -1- AH_OUTPUT([time_t], [/* Define to `long\' if does not define. */ -#undef time_t]) -m4trace:configure.in:482: -1- AC_DEFINE_TRACE_LITERAL([socklen_t]) -m4trace:configure.in:491: -1- AC_FUNC_STRFTIME -m4trace:configure.in:491: -1- AC_CHECK_FUNCS([strftime], [], [# strftime is in -lintl on SCO UNIX. -AC_CHECK_LIB(intl, strftime, - [AC_DEFINE(HAVE_STRFTIME) -LIBS="-lintl $LIBS"])]) -m4trace:configure.in:491: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the `strftime\' function. */ -#undef HAVE_STRFTIME]) -m4trace:configure.in:491: -1- AC_CHECK_LIB([intl], [strftime], [AC_DEFINE(HAVE_STRFTIME) -LIBS="-lintl $LIBS"]) -m4trace:configure.in:491: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME]) -m4trace:configure.in:495: -1- AC_CHECK_FUNCS([h_errno]) -m4trace:configure.in:495: -1- AH_OUTPUT([HAVE_H_ERRNO], [/* Define to 1 if you have the `h_errno\' function. */ -#undef HAVE_H_ERRNO]) -m4trace:configure.in:499: -1- AC_CHECK_FUNCS([strstr strtol], [], [{ { echo "$as_me:$LINENO: error: Missing required standard function." >&5 -echo "$as_me: error: Missing required standard function." >&2;} - { (exit 1); exit 1; }; }]) -m4trace:configure.in:499: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ -#undef HAVE_STRSTR]) -m4trace:configure.in:499: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ -#undef HAVE_STRTOL]) -m4trace:configure.in:503: -1- AC_CHECK_FUNCS([bcopy bzero connect fileno getcwd \ - gethostname gethostbyname getipnodebyname \ - getpwnam gettimeofday getwd hstrerror index inet_aton]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_BCOPY], [/* Define to 1 if you have the `bcopy\' function. */ -#undef HAVE_BCOPY]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_BZERO], [/* Define to 1 if you have the `bzero\' function. */ -#undef HAVE_BZERO]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_CONNECT], [/* Define to 1 if you have the `connect\' function. */ -#undef HAVE_CONNECT]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_FILENO], [/* Define to 1 if you have the `fileno\' function. */ -#undef HAVE_FILENO]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_GETCWD], [/* Define to 1 if you have the `getcwd\' function. */ -#undef HAVE_GETCWD]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_GETHOSTNAME], [/* Define to 1 if you have the `gethostname\' function. */ -#undef HAVE_GETHOSTNAME]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */ -#undef HAVE_GETHOSTBYNAME]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_GETIPNODEBYNAME], [/* Define to 1 if you have the `getipnodebyname\' function. */ -#undef HAVE_GETIPNODEBYNAME]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_GETPWNAM], [/* Define to 1 if you have the `getpwnam\' function. */ -#undef HAVE_GETPWNAM]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ -#undef HAVE_GETTIMEOFDAY]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_GETWD], [/* Define to 1 if you have the `getwd\' function. */ -#undef HAVE_GETWD]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_HSTRERROR], [/* Define to 1 if you have the `hstrerror\' function. */ -#undef HAVE_HSTRERROR]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_INDEX], [/* Define to 1 if you have the `index\' function. */ -#undef HAVE_INDEX]) -m4trace:configure.in:503: -1- AH_OUTPUT([HAVE_INET_ATON], [/* Define to 1 if you have the `inet_aton\' function. */ -#undef HAVE_INET_ATON]) -m4trace:configure.in:516: -1- AC_CHECK_FUNCS([getaddrinfo gai_strerror]) -m4trace:configure.in:516: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Define to 1 if you have the `getaddrinfo\' function. */ -#undef HAVE_GETADDRINFO]) -m4trace:configure.in:516: -1- AH_OUTPUT([HAVE_GAI_STRERROR], [/* Define to 1 if you have the `gai_strerror\' function. */ -#undef HAVE_GAI_STRERROR]) -m4trace:configure.in:521: -1- AC_CHECK_FUNCS([kill memcpy memset raise setlocale setrlimit sigaction \ - srand srandom \ - strcasecmp strchr strcmpi strcspn strerror stricmp strtod tzset waitpid]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_KILL], [/* Define to 1 if you have the `kill\' function. */ -#undef HAVE_KILL]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_MEMCPY], [/* Define to 1 if you have the `memcpy\' function. */ -#undef HAVE_MEMCPY]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ -#undef HAVE_MEMSET]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_RAISE], [/* Define to 1 if you have the `raise\' function. */ -#undef HAVE_RAISE]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_SETLOCALE], [/* Define to 1 if you have the `setlocale\' function. */ -#undef HAVE_SETLOCALE]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_SETRLIMIT], [/* Define to 1 if you have the `setrlimit\' function. */ -#undef HAVE_SETRLIMIT]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the `sigaction\' function. */ -#undef HAVE_SIGACTION]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_SRAND], [/* Define to 1 if you have the `srand\' function. */ -#undef HAVE_SRAND]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_SRANDOM], [/* Define to 1 if you have the `srandom\' function. */ -#undef HAVE_SRANDOM]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */ -#undef HAVE_STRCASECMP]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ -#undef HAVE_STRCHR]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_STRCMPI], [/* Define to 1 if you have the `strcmpi\' function. */ -#undef HAVE_STRCMPI]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_STRCSPN], [/* Define to 1 if you have the `strcspn\' function. */ -#undef HAVE_STRCSPN]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ -#undef HAVE_STRERROR]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_STRICMP], [/* Define to 1 if you have the `stricmp\' function. */ -#undef HAVE_STRICMP]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_STRTOD], [/* Define to 1 if you have the `strtod\' function. */ -#undef HAVE_STRTOD]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_TZSET], [/* Define to 1 if you have the `tzset\' function. */ -#undef HAVE_TZSET]) -m4trace:configure.in:521: -1- AH_OUTPUT([HAVE_WAITPID], [/* Define to 1 if you have the `waitpid\' function. */ -#undef HAVE_WAITPID]) -m4trace:configure.in:525: -1- AC_DEFINE_TRACE_LITERAL([HAVE_H_ERRNO]) -m4trace:configure.in:542: -2- AC_DEFINE_TRACE_LITERAL([IN6_ADDR]) -m4trace:configure.in:544: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... -configure.in:544: the top level]) -m4trace:configure.in:581: -1- AC_DEFINE_TRACE_LITERAL([MAILDIR]) -m4trace:configure.in:610: -1- AC_SUBST([EXENAME]) -m4trace:configure.in:611: -1- AC_SUBST([LIBNAME]) -m4trace:configure.in:612: -1- AC_SUBST([SYMLINK]) -m4trace:configure.in:687: -1- AC_SUBST([MODE]) -m4trace:configure.in:706: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_INET6]) -m4trace:configure.in:707: -1- AC_DEFINE_TRACE_LITERAL([NO_HISTORY]) -m4trace:configure.in:708: -1- AC_DEFINE_TRACE_LITERAL([NO_PROCESS]) -m4trace:configure.in:709: -1- AC_DEFINE_TRACE_LITERAL([NO_FLOAT]) -m4trace:configure.in:712: -1- AC_SUBST([CFLAGS]) -m4trace:configure.in:713: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:714: -1- AC_SUBST([LIBS]) -m4trace:configure.in:715: -1- AC_SUBST([OTHER_OBJS]) -m4trace:configure.in:730: -1- AC_CONFIG_FILES([Makefile unix/vars.mak src/tfdefs.h]) -m4trace:configure.in:730: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. -You should run autoupdate.], []) -m4trace:configure.in:730: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.in:730: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) diff --git a/bogus.mak b/bogus.mak index a32dc13..27c8e1f 100644 --- a/bogus.mak +++ b/bogus.mak @@ -1,10 +1,10 @@ ######################################################################## # # TinyFugue - programmable mud client -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) # # TinyFugue (aka "tf") is protected under the terms of the GNU -# General Public Licence. See the file "COPYING" for details. +# General Public License. See the file "COPYING" for details. # ######################################################################## @@ -30,3 +30,4 @@ install files tf clean uninstall: all # The next line is a hack to get around a bug in BSD/386 make. make: + diff --git a/configure b/configure deleted file mode 100755 index 30f0fa7..0000000 --- a/configure +++ /dev/null @@ -1,7075 +0,0 @@ -#! /bin/sh -# From configure.in Id: configure.in. -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= - -ac_unique_file="src/tf.h" -ac_default_prefix=` - if test -w /usr/local/bin && test -w /usr/local/share; then - echo "/usr/local" - elif uname -s | egrep BeOS >/dev/null 2>&1; then - # prefix according to Steven Black - echo "$HOME/config" - else - echo "$HOME" - fi -` -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='LTLIBOBJS -LIBOBJS -OTHER_OBJS -MODE -SYMLINK -LIBNAME -EXENAME -ICU_LIBS -ICU_CXXFLAGS -ICU_CFLAGS -ICU_CONFIG -RANLIB -STRIP -SET_MAKE -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -UNAME -CC -TFVERSION -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_version -enable_symlink -enable_core -enable_ssl -enable_getaddrinfo -enable_inet6 -enable_termcap -enable_256colors -enable_mailcheck -enable_history -enable_process -enable_float -enable_widechar -with_incdirs -with_libdirs -with_inclibdirs -with_inclibpfx -with_incdir -with_libdir -with_inclibdir -enable_development -enable_dmalloc -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-version insert version number into names of installed files - (equivalent to --program-suffix=\"-${TFVER}\") - --enable-symlink=NAME make a symlink NAME to the executable - NAME=BINDIR/tf - --enable-core enable debugging core files - --disable-ssl disable SSL support - --enable-getaddrinfo enable getaddrinfo() (if configure complains) - --disable-getaddrinfo disable getaddrinfo() (implies --disable-inet6) - --disable-inet6 disable IPv6 support - --disable-termcap use hardcoded vt100 codes instead of termcap - --enable-termcap=LIB enable termcap with library LIB (e.g., "ncurses") - (needed only if configure guesses incorrectly) - --disable-256colors disable 256 color support (may reduce memory use) - --disable-mailcheck disable mail checking - --enable-mailcheck=DIR enable checking for mail in directory DIR - (needed only if configure guesses incorrectly) - --disable-history disable /recall and other history features - --disable-process disable /quote and /repeat - --disable-float disable floating point arithmetic and functions - --disable-widechar disable wide character support (UTF-8) - - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-incdirs=DIRS search for include files in DIRS - --with-libdirs=DIRS search for libraries in DIRS - --with-inclibdirs=DIRS same as --with-incdirs=DIRS --with-libdirs=DIRS - --with-inclibpfx=DIRS same, but appends '/include' and '/lib' - - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.68 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -SOCKS='' -OTHER_OBJS="" -TFVER=`sed -ne 's/^TFVER=\(.*\)/\1/p' src/vars.mak` -TFVERSION=`sed -n -e '/Fugue version/s/^.*"\(.*\)".*$/\1/p' src/main.c` - -ac_config_headers="$ac_config_headers src/tfconfig.h" - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring $TFVERSION" >&5 -$as_echo "$as_me: Configuring $TFVERSION" >&6;} - -# User installation options -# Check whether --enable-version was given. -if test "${enable_version+set}" = set; then : - enableval=$enable_version; -else - enable_version=default -fi - -# Check whether --enable-symlink was given. -if test "${enable_symlink+set}" = set; then : - enableval=$enable_symlink; -else - enable_symlink=default -fi - -# Check whether --enable-core was given. -if test "${enable_core+set}" = set; then : - enableval=$enable_core; -else - enable_core=default -fi - - -# Check whether --enable-ssl was given. -if test "${enable_ssl+set}" = set; then : - enableval=$enable_ssl; -else - enable_ssl=yes -fi - -# Check whether --enable-getaddrinfo was given. -if test "${enable_getaddrinfo+set}" = set; then : - enableval=$enable_getaddrinfo; -else - enable_getaddrinfo=default -fi - -# Check whether --enable-inet6 was given. -if test "${enable_inet6+set}" = set; then : - enableval=$enable_inet6; -else - enable_inet6=yes -fi - -# Check whether --enable-termcap was given. -if test "${enable_termcap+set}" = set; then : - enableval=$enable_termcap; -else - enable_termcap=default -fi - -# Check whether --enable-256colors was given. -if test "${enable_256colors+set}" = set; then : - enableval=$enable_256colors; -else - enable_256colors=yes -fi - -# Check whether --enable-mailcheck was given. -if test "${enable_mailcheck+set}" = set; then : - enableval=$enable_mailcheck; -else - enable_mailcheck=yes -fi - - -# User feature options -# Check whether --enable-history was given. -if test "${enable_history+set}" = set; then : - enableval=$enable_history; -else - enable_history=yes -fi - -# Check whether --enable-process was given. -if test "${enable_process+set}" = set; then : - enableval=$enable_process; -else - enable_process=yes -fi - -# Check whether --enable-float was given. -if test "${enable_float+set}" = set; then : - enableval=$enable_float; -else - enable_float=yes -fi - -# Check whether --enable-widechar was given. -if test "${enable_widechar+set}" = set; then : - enableval=$enable_widechar; -else - enable_widechar=yes -fi - - - -# Check whether --with-incdirs was given. -if test "${with_incdirs+set}" = set; then : - withval=$with_incdirs; -fi - - -# Check whether --with-libdirs was given. -if test "${with_libdirs+set}" = set; then : - withval=$with_libdirs; -fi - - -# Check whether --with-inclibdirs was given. -if test "${with_inclibdirs+set}" = set; then : - withval=$with_inclibdirs; -fi - - -# Check whether --with-inclibpfx was given. -if test "${with_inclibpfx+set}" = set; then : - withval=$with_inclibpfx; -fi - - -# Check whether --with-incdir was given. -if test "${with_incdir+set}" = set; then : - withval=$with_incdir; -fi - -# Check whether --with-libdir was given. -if test "${with_libdir+set}" = set; then : - withval=$with_libdir; -fi - -# Check whether --with-inclibdir was given. -if test "${with_inclibdir+set}" = set; then : - withval=$with_inclibdir; -fi - - -# Developer options -# --enable-development implies --enable-core --disable-symlink -# Check whether --enable-development was given. -if test "${enable_development+set}" = set; then : - enableval=$enable_development; -else - enable_development=default -fi - -# Check whether --enable-dmalloc was given. -if test "${enable_dmalloc+set}" = set; then : - enableval=$enable_dmalloc; -else - enable_dmalloc=no -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} - -if test "$enable_development" = "default"; then - if test -d CVS; then - enable_development=yes - else - enable_development=no - fi -fi - -if test "$enable_development" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Development version." >&5 -$as_echo "$as_me: Development version." >&6;} -elif echo $TFVERSION | egrep "alpha" >/dev/null 2>&1; then -cat <&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break -done - - fi -else - $as_echo "#define NDEBUG 1" >>confdefs.h - -fi - -if test "$enable_core" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Core dumps enabled." >&5 -$as_echo "$as_me: Core dumps enabled." >&6;} - CFLAGS="${CFLAGS} -g" - STRIP=":" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Core dumps disabled." >&5 -$as_echo "$as_me: Core dumps disabled." >&6;} - $as_echo "#define DISABLE_CORE 1" >>confdefs.h - -fi - - - - -UNAME=`{ uname -s && uname -v && uname -r || uname -a; } 2>/dev/null` -UNAME=`echo $UNAME` # remove newlines - -#AC_CYGWIN - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -if test $ac_cv_c_compiler_gnu = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -$as_echo_n "checking whether $CC needs -traditional... " >&6; } -if ${ac_cv_prog_gcc_traditional+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_pattern="Autoconf.*'x'" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -$as_echo "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -##if test "$enable_core" = "no"; then -## AC_CHECK_PROG(STRIP, strip, strip, :) -##fi - - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if ${ac_cv_sizeof_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_short=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - -if test "$GCC" = "yes"; then - # gcc may generate a warning for "inline", so use "__inline__" instead. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define inline __inline__" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -fi - - - - - - - - - if test "${with_incdirs}" != "no" && test "${with_incdirs}" != ""; then - for dir in ${with_incdirs}; do - CPPFLAGS="${CPPFLAGS} -I${dir}" - done - fi - - - if test "${with_incdir}" != "no" && test "${with_incdir}" != ""; then - for dir in ${with_incdir}; do - CPPFLAGS="${CPPFLAGS} -I${dir}" - done - fi - - - if test "${with_inclibdirs}" != "no" && test "${with_inclibdirs}" != ""; then - for dir in ${with_inclibdirs}; do - CPPFLAGS="${CPPFLAGS} -I${dir}" - done - fi - - - if test "${with_inclibdir}" != "no" && test "${with_inclibdir}" != ""; then - for dir in ${with_inclibdir}; do - CPPFLAGS="${CPPFLAGS} -I${dir}" - done - fi - - - if test "${with_inclibpfx}" != "no" && test "${with_inclibpfx}" != ""; then - for dir in ${with_inclibpfx}; do - CPPFLAGS="${CPPFLAGS} -I${dir}/include" - done - fi - - -LIBDIRS="" - - if test "${with_libdirs}" != "no" && test "${with_libdirs}" != ""; then - for dir in ${with_libdirs}; do - LIBDIRS="${LIBDIRS} -L${dir}" - done - fi - - - if test "${with_libdir}" != "no" && test "${with_libdir}" != ""; then - for dir in ${with_libdir}; do - LIBDIRS="${LIBDIRS} -L${dir}" - done - fi - - - if test "${with_inclibdirs}" != "no" && test "${with_inclibdirs}" != ""; then - for dir in ${with_inclibdirs}; do - LIBDIRS="${LIBDIRS} -L${dir}" - done - fi - - - if test "${with_inclibdir}" != "no" && test "${with_inclibdir}" != ""; then - for dir in ${with_inclibdir}; do - LIBDIRS="${LIBDIRS} -L${dir}" - done - fi - - - if test "${with_inclibpfx}" != "no" && test "${with_inclibpfx}" != ""; then - for dir in ${with_inclibpfx}; do - LIBDIRS="${LIBDIRS} -L${dir}/lib" - done - fi - - -LDFLAGS="$LDFLAGS $LIBDIRS" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing select" >&5 -$as_echo_n "checking for library containing select... " >&6; } -if ${ac_cv_search_select+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char select (); -int -main () -{ -return select (); - ; - return 0; -} -_ACEOF -for ac_lib in '' bsd; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_select=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_select+:} false; then : - break -fi -done -if ${ac_cv_search_select+:} false; then : - -else - ac_cv_search_select=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_select" >&5 -$as_echo "$ac_cv_search_select" >&6; } -ac_res=$ac_cv_search_select -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "TF can not work without select()." "$LINENO" 5 -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -$as_echo_n "checking for library containing gethostbyname... " >&6; } -if ${ac_cv_search_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -for ac_lib in '' bsd nsl_s nsl resolv socket; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_gethostbyname=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_gethostbyname+:} false; then : - break -fi -done -if ${ac_cv_search_gethostbyname+:} false; then : - -else - ac_cv_search_gethostbyname=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 -$as_echo "$ac_cv_search_gethostbyname" >&6; } -ac_res=$ac_cv_search_gethostbyname -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Host name resolution will not be available." >&5 -$as_echo "$as_me: WARNING: Host name resolution will not be available." >&2;} -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 -$as_echo_n "checking for main in -linet... " >&6; } -if ${ac_cv_lib_inet_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-linet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_inet_main=yes -else - ac_cv_lib_inet_main=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 -$as_echo "$ac_cv_lib_inet_main" >&6; } -if test "x$ac_cv_lib_inet_main" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBINET 1 -_ACEOF - - LIBS="-linet $LIBS" - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnet" >&5 -$as_echo_n "checking for main in -lnet... " >&6; } -if ${ac_cv_lib_net_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_net_main=yes -else - ac_cv_lib_net_main=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_main" >&5 -$as_echo "$ac_cv_lib_net_main" >&6; } -if test "x$ac_cv_lib_net_main" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNET 1 -_ACEOF - - LIBS="-lnet $LIBS" - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing connect" >&5 -$as_echo_n "checking for library containing connect... " >&6; } -if ${ac_cv_search_connect+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -for ac_lib in '' socket; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_connect=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_connect+:} false; then : - break -fi -done -if ${ac_cv_search_connect+:} false; then : - -else - ac_cv_search_connect=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_connect" >&5 -$as_echo "$ac_cv_search_connect" >&6; } -ac_res=$ac_cv_search_connect -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setlocale" >&5 -$as_echo_n "checking for library containing setlocale... " >&6; } -if ${ac_cv_search_setlocale+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char setlocale (); -int -main () -{ -return setlocale (); - ; - return 0; -} -_ACEOF -for ac_lib in '' intl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_setlocale=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_setlocale+:} false; then : - break -fi -done -if ${ac_cv_search_setlocale+:} false; then : - -else - ac_cv_search_setlocale=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setlocale" >&5 -$as_echo "$ac_cv_search_setlocale" >&6; } -ac_res=$ac_cv_search_setlocale -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Locales will not be supported." >&5 -$as_echo "$as_me: WARNING: Locales will not be supported." >&2;} -fi - - -if test "$enable_ssl" = "yes"; then - ok=0 - old_LIBS="$LIBS" - old_CFLAGS="$CFLAGS" - old_CPPFLAGS="$CPPFLAGS" - while true; do - LIBS="$LIBS -lssl -lcrypto" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcrypto and libssl" >&5 -$as_echo_n "checking for libcrypto and libssl... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SSL_new (); -int -main () -{ -return SSL_new (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - CFLAGS="$CFLAGS -L/usr/local/ssl/lib"; - CPPFLAGS="-I/usr/local/ssl/include $CPPFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SSL_new (); -int -main () -{ -return SSL_new (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/local/ssl" >&5 -$as_echo "/usr/local/ssl" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl kerberos dependency" >&5 -$as_echo_n "checking for ssl kerberos dependency... " >&6; } - if test -r /usr/kerberos/include/krb5.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - CPPFLAGS="-I/usr/kerberos/include $CPPFLAGS" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : - -else - break -fi - - - $as_echo "#define HAVE_SSL 1" >>confdefs.h - - ok=1 - break - done - if test "$ok" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ssl support will not be enabled." >&5 -$as_echo "ssl support will not be enabled." >&6; } - LIBS="$old_LIBS" - CFLAGS="$old_CFLAGS" - CPPFLAGS="$old_CPPFLAGS" - fi -fi - - -terminal_hardcode="TERM_vt100"; - -if test "$CYGWIN" = "yes"; then - terminal_hardcode="TERM_ansi"; - if test "$enable_termcap" = "default"; then - enable_termcap="no"; - fi -fi - -if test "$enable_termcap" = "default"; then - enable_termcap="yes"; -fi - -if test "$enable_termcap" = "no"; then - cat >>confdefs.h <<_ACEOF -#define HARDCODE $terminal_hardcode -_ACEOF - -else - if test "$enable_termcap" = "yes"; then enable_termcap=""; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 -$as_echo_n "checking for library containing tgetent... " >&6; } -if ${ac_cv_search_tgetent+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tgetent (); -int -main () -{ -return tgetent (); - ; - return 0; -} -_ACEOF -for ac_lib in '' $enable_termcap termcap ncurses curses; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_tgetent=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_tgetent+:} false; then : - break -fi -done -if ${ac_cv_search_tgetent+:} false; then : - -else - ac_cv_search_tgetent=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 -$as_echo "$ac_cv_search_tgetent" >&6; } -ac_res=$ac_cv_search_tgetent -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - $as_echo "#define TERMCAP 1" >>confdefs.h - - -else - cat >>confdefs.h <<_ACEOF -#define HARDCODE $terminal_hardcode -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Hardcoding terminal codes." >&5 -$as_echo "$as_me: WARNING: Hardcoding terminal codes." >&2;} -fi - -fi - - -if test "$enable_256colors" = "yes"; then - $as_echo "#define NCOLORS 256" >>confdefs.h - -fi - - -if test "$enable_float" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sqrt" >&5 -$as_echo_n "checking for library containing sqrt... " >&6; } -if ${ac_cv_search_sqrt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sqrt (); -int -main () -{ -return sqrt (); - ; - return 0; -} -_ACEOF -for ac_lib in '' m; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_sqrt=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_sqrt+:} false; then : - break -fi -done -if ${ac_cv_search_sqrt+:} false; then : - -else - ac_cv_search_sqrt=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sqrt" >&5 -$as_echo "$ac_cv_search_sqrt" >&6; } -ac_res=$ac_cv_search_sqrt -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - -if test "$enable_widechar" = "yes"; then - for ac_header in wchar.h wctype.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - succeeded=no - - if test -z "$ICU_CONFIG"; then - # Extract the first word of "icu-config", so it can be a program name with args. -set dummy icu-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ICU_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ICU_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ICU_CONFIG="$ICU_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ICU_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ICU_CONFIG" && ac_cv_path_ICU_CONFIG="no" - ;; -esac -fi -ICU_CONFIG=$ac_cv_path_ICU_CONFIG -if test -n "$ICU_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_CONFIG" >&5 -$as_echo "$ICU_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi - - if test "$ICU_CONFIG" = "no" ; then - echo "*** The icu-config script could not be found. Make sure it is" - echo "*** in your path, and that taglib is properly installed." - echo "*** Or see http://ibm.com/software/globalization/icu/" - else - ICU_VERSION=`$ICU_CONFIG --version` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU >= 4.2" >&5 -$as_echo_n "checking for ICU >= 4.2... " >&6; } - VERSION_CHECK=`expr $ICU_VERSION \>\= 4.2` - if test "$VERSION_CHECK" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU_CFLAGS" >&5 -$as_echo_n "checking ICU_CFLAGS... " >&6; } - ICU_CFLAGS=`$ICU_CONFIG --cflags` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_CFLAGS" >&5 -$as_echo "$ICU_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU_CXXFLAGS" >&5 -$as_echo_n "checking ICU_CXXFLAGS... " >&6; } - ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_CXXFLAGS" >&5 -$as_echo "$ICU_CXXFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU_LIBS" >&5 -$as_echo_n "checking ICU_LIBS... " >&6; } - ICU_LIBS=`$ICU_CONFIG --ldflags` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_LIBS" >&5 -$as_echo "$ICU_LIBS" >&6; } - else - ICU_CFLAGS="" - ICU_CXXFLAGS="" - ICU_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - - fi - - - - - fi - - if test $succeeded = yes; then - LIBS="${LIBS} -licuuc" - else - as_fn_error $? "Widechar cannot be enabled without icu." "$LINENO" 5 - fi - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 -$as_echo_n "checking for inflate in -lz... " >&6; } -if ${ac_cv_lib_z_inflate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inflate (); -int -main () -{ -return inflate (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflate=yes -else - ac_cv_lib_z_inflate=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 -$as_echo "$ac_cv_lib_z_inflate" >&6; } -if test "x$ac_cv_lib_z_inflate" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5 -$as_echo_n "checking for pcre_compile in -lpcre... " >&6; } -if ${ac_cv_lib_pcre_pcre_compile+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpcre $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pcre_compile (); -int -main () -{ -return pcre_compile (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pcre_pcre_compile=yes -else - ac_cv_lib_pcre_pcre_compile=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5 -$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; } -if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPCRE 1 -_ACEOF - - LIBS="-lpcre $LIBS" - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -for ac_header in unistd.h memory.h sys/select.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if ${ac_cv_header_sys_wait_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif - -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_sys_wait_h=yes -else - ac_cv_header_sys_wait_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then - -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - -fi - - -for ac_header in locale.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOCALE_H 1 -_ACEOF - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Locales will not be supported." >&5 -$as_echo "$as_me: WARNING: Locales will not be supported." >&2;} -fi - -done - - -for ac_header in pwd.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" -if test "x$ac_cv_header_pwd_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PWD_H 1 -_ACEOF - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Filename '~user' expansion will not be supported." >&5 -$as_echo "$as_me: WARNING: Filename '~user' expansion will not be supported." >&2;} -fi - -done - - -for ac_header in zlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB_H 1 -_ACEOF - -fi - -done - - - - - - - - found=0; - for f in netinet/in.h sys/in.h sys/netinet/in.h; do - for ac_header in $f -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - cat >>confdefs.h <<_ACEOF -#define NETINET_IN_H <$f> -_ACEOF - - found=1 - break -fi - -done - - if test $found -eq 1; then break; fi - done - if test $found -eq 1; then - :; - else - :; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I will use my own internet structures. Good luck." >&5 -$as_echo "$as_me: WARNING: I will use my own internet structures. Good luck." >&2;} - fi - unset found - - - - found=0; - for f in arpa/inet.h sys/inet.h; do - for ac_header in $f -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - cat >>confdefs.h <<_ACEOF -#define ARPA_INET_H <$f> -_ACEOF - - found=1 - break -fi - -done - - if test $found -eq 1; then break; fi - done - if test $found -eq 1; then - :; - else - :; - fi - unset found - - - - - found=0; - for f in netdb.h sys/netdb.h; do - for ac_header in $f -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - cat >>confdefs.h <<_ACEOF -#define NETDB_H <$f> -_ACEOF - - found=1 - break -fi - -done - - if test $found -eq 1; then break; fi - done - if test $found -eq 1; then - :; - else - :; as_fn_error $? "can't find netdb.h" "$LINENO" 5 - fi - unset found - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct sockaddr has sa_len" >&5 -$as_echo_n "checking whether struct sockaddr has sa_len... " >&6; } -if ${tf_cv_sa_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ -struct sockaddr sa; return sa.sa_len; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tf_cv_sa_len=yes -else - tf_cv_sa_len=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tf_cv_sa_len" >&5 -$as_echo "$tf_cv_sa_len" >&6; } - -if test "${tf_cv_sa_len}" = "yes"; then - $as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h - -fi - - - -for ac_header in termios.h termio.h sgtty.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - break -fi - -done - - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "struct winsize" >/dev/null 2>&1; then : - $as_echo "#define NEED_PTEM_H 1" >>confdefs.h - -fi -rm -f conftest* - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default" -if test "x$ac_cv_type_time_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define time_t long -_ACEOF - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 -$as_echo_n "checking for socklen_t... " >&6; } -if ${ac_cv_type_socklen_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if STDC_HEADERS -#include -#include -#endif - -#include -#include - - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then : - ac_cv_type_socklen_t=yes -else - ac_cv_type_socklen_t=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5 -$as_echo "$ac_cv_type_socklen_t" >&6; } -if test $ac_cv_type_socklen_t = no; then - $as_echo "#define socklen_t int" >>confdefs.h - -fi - - - - - - -for ac_func in strftime -do : - ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRFTIME 1 -_ACEOF - -else - # strftime is in -lintl on SCO UNIX. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 -$as_echo_n "checking for strftime in -lintl... " >&6; } -if ${ac_cv_lib_intl_strftime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strftime (); -int -main () -{ -return strftime (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_intl_strftime=yes -else - ac_cv_lib_intl_strftime=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 -$as_echo "$ac_cv_lib_intl_strftime" >&6; } -if test "x$ac_cv_lib_intl_strftime" = xyes; then : - $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h - -LIBS="-lintl $LIBS" -fi - -fi -done - - -for ac_func in h_errno -do : - ac_fn_c_check_func "$LINENO" "h_errno" "ac_cv_func_h_errno" -if test "x$ac_cv_func_h_errno" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_H_ERRNO 1 -_ACEOF - -fi -done - - -for ac_func in strstr strtol -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - as_fn_error $? "Missing required standard function." "$LINENO" 5 -fi -done - -for ac_func in bcopy bzero connect fileno getcwd \ - gethostname gethostbyname getipnodebyname \ - getpwnam gettimeofday getwd hstrerror index inet_aton -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$enable_getaddrinfo" = "default"; then - if test `uname -s` = 'Darwin'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: getaddrinfo() may be broken, so IPv6 support is disabled. Use --enable-getaddrinfo to override." >&5 -$as_echo "$as_me: WARNING: getaddrinfo() may be broken, so IPv6 support is disabled. Use --enable-getaddrinfo to override." >&2;} - enable_getaddrinfo=no - else - enable_getaddrinfo=yes - fi -fi -if test "$enable_getaddrinfo" = "no"; then - enable_inet6=no -else - for ac_func in getaddrinfo gai_strerror -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -fi - -for ac_func in kill memcpy memset raise setlocale setrlimit sigaction \ - srand srandom \ - strcasecmp strchr strcmpi strcspn strerror stricmp strtod tzset waitpid -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$CYGWIN" = "yes"; then - $as_echo "#define HAVE_H_ERRNO 0 /* h_errno is broken in cygwin32 b18. */" >>confdefs.h - -fi - -if test "$enable_inet6" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 address structure" >&5 -$as_echo_n "checking for IPv6 address structure... " >&6; } - for type in in6_addr in_addr6; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include NETINET_IN_H - -int -main () -{ - -#ifndef AF_INET6 -# error AF_INET6 not defined -#endif - struct ${type} foo; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat >>confdefs.h <<_ACEOF -#define IN6_ADDR $type -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $type" >&5 -$as_echo "$type" >&6; } - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -fi - - - - - - -if test "$enable_mailcheck" = "no"; then - MAILDIR="" -elif test "$enable_mailcheck" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking location of mail directory" >&5 -$as_echo_n "checking location of mail directory... " >&6; } - if test -n "$MAIL" ; then - # Not every system has dirname. sigh. - MAILDIR=`echo $MAIL | sed 's;/[^/]*$;;'` - elif test -d /usr/spool/mail ; then - MAILDIR="/usr/spool/mail" - elif test -d /var/spool/mail ; then - MAILDIR="/var/spool/mail" - elif test -d /usr/mail ; then - MAILDIR="/usr/mail" - elif test -d /var/mail ; then - MAILDIR="/var/mail" - else - MAILDIR="" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${MAILDIR-(none)}" >&5 -$as_echo "${MAILDIR-(none)}" >&6; } -else - MAILDIR="$enable_mailcheck" -fi -if test -n "$MAILDIR"; then - cat >>confdefs.h <<_ACEOF -#define MAILDIR "$MAILDIR" -_ACEOF - -fi - - - -if test "$enable_version" != "no" && test "$program_suffix" = "NONE"; then - program_suffix="-${TFVER}" -fi - -EXENAME="tf" -test "${program_prefix}" != "NONE" && EXENAME="${program_prefix}${EXENAME}" -test "${program_suffix}" != "NONE" && EXENAME="${EXENAME}${program_suffix}" -if test "${program_transform_name}" != "NONE"; then - EXENAME=`echo "${EXENAME}" | sed "${program_transform_name}"` -fi -LIBNAME="${EXENAME}-lib" - -if test "$enable_symlink" = "no"; then - SYMLINK="" -elif test "$enable_symlink" = "yes"; then - SYMLINK='${bindir}/tf' -else - SYMLINK="$enable_symlink" -fi - - - - - - - - - - - - - - - -MODE=755 - - - - - -PATH="$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:/usr/ccs/bin" - - -if test "$enable_dmalloc" = "yes"; then - CPPFLAGS="$CPPFLAGS -DUSE_DMALLOC" - OTHER_OBJS="$OTHER_OBJS dmalloc.o" -fi - - -if test "$enable_inet6" = "yes"; then $as_echo "#define ENABLE_INET6 1" >>confdefs.h - fi -if test "$enable_history" = "no"; then $as_echo "#define NO_HISTORY 1" >>confdefs.h - fi -if test "$enable_process" = "no"; then $as_echo "#define NO_PROCESS 1" >>confdefs.h - fi -if test "$enable_float" = "no"; then $as_echo "#define NO_FLOAT 1" >>confdefs.h - fi -if test "$enable_widechar" = "yes"; then $as_echo "#define WIDECHAR 1" >>confdefs.h - fi - -CPPFLAGS="${CPPFLAGS} -DDATADIR=\${datadir}" - - - - - -ac_config_files="$ac_config_files Makefile unix/vars.mak src/tfdefs.h" - -ac_config_commands="$ac_config_commands default" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.68, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "src/tfconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS src/tfconfig.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "unix/vars.mak") CONFIG_FILES="$CONFIG_FILES unix/vars.mak" ;; - "src/tfdefs.h") CONFIG_FILES="$CONFIG_FILES src/tfdefs.h" ;; - "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "default":C) - -### Create src/Makefile from pieces. - -cat >src/Makefile <> src/Makefile - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: -##################################################### -## prefix: $prefix -## exec_prefix: $exec_prefix -## bindir: $bindir -## datadir: $datadir -## executable: \${bindir}/$EXENAME -## library: \${datadir}/$LIBNAME -## -## TinyFugue configuration successful. -## Use \"make\" to build. -" >&5 -$as_echo "$as_me: -##################################################### -## prefix: $prefix -## exec_prefix: $exec_prefix -## bindir: $bindir -## datadir: $datadir -## executable: \${bindir}/$EXENAME -## library: \${datadir}/$LIBNAME -## -## TinyFugue configuration successful. -## Use \"make\" to build. -" >&6;} diff --git a/configure.in b/configure.in index 0aa8355..422160e 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl dnl TinyFugue - programmable mud client -dnl Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +dnl Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) dnl dnl TinyFugue (aka "tf") is protected under the terms of the GNU dnl General Public License. See the file "COPYING" for details. @@ -9,66 +9,123 @@ dnl DO NOT EDIT THIS FILE. dnl Any configuration changes should be made to the unix/Config file. dnl -AC_REVISION($Id: configure.in,v 35000.61 2007/01/13 23:12:35 kkeys Exp $) - dnl Note: autoconf uses </dev/null 2>&1; then - # prefix according to Steven Black - echo "$HOME/config" - else - echo "$HOME" - fi -`) +AC_MSG_NOTICE([Configuring $PACKAGE_NAME $PACKAGE_VERSION]) -AC_SUBST(TFVERSION) -AC_MSG_NOTICE([Configuring $TFVERSION]) +dnl is there a better way to do this? +UNAME=`{ uname -s && uname -v && uname -r || uname -a; } 2>/dev/null` +UNAME=`echo $UNAME` # remove newlines +AC_SUBST(UNAME) + +dnl #SOCKS='' +dnl #OTHER_OBJS="" +dnl #AC_CONFIG_MACRO_DIRS +dnl #AC_CONFIG_AUX_DIR +dnl #AC_REQUIRE_AUX_FILE +AC_LANG([C]) +dnl AC_REQUIRE_CPP +AC_PROG_CC([clang gcc cc]) +AX_COMPILER_VENDOR +AC_C_INLINE + +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) + +AC_EXEEXT +AC_OBJEXT + +AC_PROG_EGREP +AC_PROG_LN_S +AC_PROG_RANLIB +AC_PROG_SED + +dnl# #Not sure that BeOS is still a 'thing' but mabe add this in in a nicer way later. +dnl# AC_PREFIX_DEFAULT(` +dnl# if test -w /usr/local/bin && test -w /usr/local/share; then +dnl# echo "/usr/local" +dnl# elif uname -s | egrep BeOS >/dev/null 2>&1; then +dnl# # prefix according to Steven Black +dnl# echo "$HOME/config" +dnl# else +dnl# echo "$HOME" +dnl# fi +dnl#`) # User installation options -AC_ARG_ENABLE(version, -[ --enable-version insert version number into names of installed files - (equivalent to --program-suffix=\"-${TFVER}\")], - , enable_version=default) -AC_ARG_ENABLE(symlink, -[ --enable-symlink[=NAME] make a symlink NAME to the executable - [NAME=BINDIR/tf]], - , enable_symlink=default) -AC_ARG_ENABLE(core, -[ --enable-core enable debugging core files], - , enable_core=default) - -AC_ARG_ENABLE(ssl, -[ --disable-ssl disable SSL support], - , enable_ssl=yes) -AC_ARG_ENABLE(getaddrinfo, -[ --enable-getaddrinfo enable getaddrinfo() (if configure complains) - --disable-getaddrinfo disable getaddrinfo() (implies --disable-inet6)], - , enable_getaddrinfo=default) -AC_ARG_ENABLE(inet6, -[ --disable-inet6 disable IPv6 support], - , enable_inet6=yes) +AC_ARG_ENABLE([version], + [AC_HELP_STRING( + [--enable-version], + [insert version number into names of installed files])], + [], + [enable_version=default]) + +AC_ARG_ENABLE([symlink], + [AC_HELP_STRING( + [--enable-symlink[=NAME]], + [make a symlink NAME to the executable])], + [], + [enable_symlink=default]) + +AC_ARG_ENABLE([core], + [AC_HELP_STRING( + [--enable-core], + [enable core dumps for debugging])], + [], + [enable_core=default]) + +AC_ARG_ENABLE([ssl], + [AC_HELP_STRING( + [--disable-ssl], + [disable SSL connections])], + [], + enable_ssl=yes) + +AC_ARG_ENABLE([getaddrinfo], + [AC_HELP_STRING([--enable-getaddrinfo], + [disable getaddrinfo -implies --disable-inet6])], + [], + [enable_getaddrinfo=default]) + +AC_ARG_ENABLE([inet6], + [AC_HELP_STRING([--disable-inet6], + [disable IPv6 network support])], + [], + [enable_inet6=yes]) + AC_ARG_ENABLE(termcap, [ --disable-termcap use hardcoded vt100 codes instead of termcap --enable-termcap=LIB enable termcap with library LIB (e.g., "ncurses") (needed only if configure guesses incorrectly)], , enable_termcap=default) -AC_ARG_ENABLE(256colors, -[ --disable-256colors disable 256 color support (may reduce memory use)], - , enable_256colors=yes) + +AC_ARG_ENABLE([256colors], + [AC_HELP_STRING([--disable-256colors], + [disable 256 color support])], + [], + [enable_256colors=yes]) + AC_ARG_ENABLE(mailcheck, [ --disable-mailcheck disable mail checking --enable-mailcheck=DIR enable checking for mail in directory DIR @@ -76,18 +133,47 @@ AC_ARG_ENABLE(mailcheck, , enable_mailcheck=yes) # User feature options -AC_ARG_ENABLE(history, -[ --disable-history disable /recall and other history features], - , enable_history=yes) -AC_ARG_ENABLE(process, -[ --disable-process disable /quote and /repeat], - , enable_process=yes) -AC_ARG_ENABLE(float, -[ --disable-float disable floating point arithmetic and functions], - , enable_float=yes) -AC_ARG_ENABLE(widechar, -[ --disable-widechar disable wide character support (UTF-8)], - , enable_widechar=yes) +AC_ARG_ENABLE([history], + [AC_HELP_STRING([--disable-history], + [disable /recall and other history features])], + [], + [enable_history=yes]) + +AC_ARG_ENABLE([process], + [AC_HELP_STRING([--disable-process], + [disable /quote and repeat])], + [], + [enable_process=yes]) + +AC_ARG_ENABLE([float], + [AC_HELP_STRING([--disable-float], + [disable floating point arithmetic and functions])], + [], + [enable_float=yes]) + +AC_ARG_ENABLE([widechar], + [AC_HELP_STRING([--disable-widechar], + [disable wide character UTF-8 support])], + [], + [enable_widechar=yes]) + +AC_ARG_ENABLE([atcp], + [AC_HELP_STRING([--enable-atcp], + [enable ATCP protocol support])], + [], + [enable_atcp=yes]) + +AC_ARG_ENABLE([gmcp], + [AC_HELP_STRING([--enable-gmcp], + [enable GMCP protocol support])], + [], + [enable_gmcp=yes]) + +AC_ARG_ENABLE([option102], + [AC_HELP_STRING([--enable-option102], + [enable option102 protocl support])], + [], + [enable_option102=yes]) AC_ARG_WITH(incdirs, [ --with-incdirs=DIRS search for include files in DIRS]) @@ -97,25 +183,26 @@ AC_ARG_WITH(inclibdirs, [ --with-inclibdirs=DIRS same as --with-incdirs=DIRS --with-libdirs=DIRS]) AC_ARG_WITH(inclibpfx, [ --with-inclibpfx=DIRS same, but appends '/include' and '/lib']) -AC_ARG_WITH(incdir) dnl because I never remember if it's singular or plural -AC_ARG_WITH(libdir) dnl because I never remember if it's singular or plural -AC_ARG_WITH(inclibdir) dnl because I never remember if it's singular or plural - +AC_ARG_WITH(incdir) dnl because I never remember if it's singular or plural +AC_ARG_WITH(libdir) dnl because I never remember if it's singular or plural +AC_ARG_WITH(inclibdir) dnl because I never remember if it's singular or plural + +AC_ARG_ENABLE(manpage, , , enable_manpage=yes) +if test "$enable_manpage" = "yes"; then + MANPAGE='${mandir}/man1/'${PACKAGE_SHORTNAME}.1 + MANTYPE='nroff' +else + MANPAGE='' + MANTYPE='' +fi +AC_SUBST(MANPAGE) +AC_SUBST(MANTYPE) # Developer options # --enable-development implies --enable-core --disable-symlink -AC_ARG_ENABLE(development, , , enable_development=default) +AC_ARG_ENABLE(development, , , enable_development=no) AC_ARG_ENABLE(dmalloc, , , enable_dmalloc=no) - -AC_MSG_NOTICE([]) - -if test "$enable_development" = "default"; then - if test -d CVS; then - enable_development=yes - else - enable_development=no - fi -fi +AC_ARG_ENABLE(mmalloc, , , enable_mmalloc=no) if test "$enable_development" = "yes"; then AC_MSG_NOTICE([Development version.]) @@ -128,6 +215,8 @@ to deal with this, get the latest stable or gamma version. END fi +dnl ''' for vim syntax highlighting + if test "$enable_core" = "default"; then enable_core=$enable_development fi @@ -140,11 +229,8 @@ if test "$enable_development" = "yes"; then if test "$enable_symlink" = "default"; then enable_symlink=no fi - if test -z "${CC}"; then - AC_CHECK_PROGS(CC, tfcc gcc-anal) - fi else - AC_DEFINE(NDEBUG) + AC_DEFINE([NDEBUG], [1], [debug disabled]) fi if test "$enable_core" = "yes"; then @@ -152,68 +238,36 @@ if test "$enable_core" = "yes"; then CFLAGS="${CFLAGS} -g" STRIP=":" else - AC_MSG_NOTICE([Core dumps disabled.]) - AC_DEFINE(DISABLE_CORE) + AC_DEFINE([DISABLE_CORE], [1], [core dumps disabled]) +fi + +if test "$enable_dmalloc" = "yes"; then + AC_MSG_NOTICE([Debug malloc enabled.]) + OTHER_OBJS="$OTHER_OBJS dmalloc.o" + AC_DEFINE([USE_DMALLOC], [1], [dmalloc enabled]) fi +if test "$enable_mmalloc" = "yes"; then + AC_MSG_NOTICE([GNU malloc enabled.]) + CPPFLAGS="${CPPFLAGS} -DUSE_MMALLOC" + AC_DEFINE([USE_MMALLOC], [1], [GNU malloc enabled]) +fi dnl XXX option: TTYDRIVER -UNAME=`{ uname -s && uname -v && uname -r || uname -a; } 2>/dev/null` -UNAME=`echo $UNAME` # remove newlines -AC_SUBST(UNAME) -#AC_CYGWIN - dnl ########### programs ############ -AC_PROG_CC -AC_PROG_GCC_TRADITIONAL -dnl XXX STD_C=1, if compiler is standard - -dnl XXX -dnl ${CC} ${CCFLAGS} -c symtest.c >symtest.out 2>&1 || { -dnl echo -dnl cat symtest.out -dnl echo -dnl echo "## The messages above indicate one of these configuration problems:" -dnl echo "## 1. the compiler is not installed correctly;" -dnl echo "## 2. you do not have permission to execute the compiler; or" -dnl echo "## 3. CCFLAGS='${CCFLAGS}' in unix/Config is invalid." -dnl echo "## In any case, this is a local problem that can only be" -dnl echo "## solved by you or a system administrator, so don't ask me." -dnl echo -dnl exit 1 -dnl } - -dnl XXX AC_AIX - AC_PROG_MAKE_SET -##if test "$enable_core" = "no"; then -## AC_CHECK_PROG(STRIP, strip, strip, :) -##fi +if test "$enable_core" = "no"; then + AC_CHECK_PROG(STRIP, strip, strip, :) +fi AC_SUBST(STRIP) AC_CHECK_PROG(RANLIB, ranlib, ranlib, :) -dnl ########### compiler characteristics ############ - -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) - -if test "$GCC" = "yes"; then - # gcc may generate a warning for "inline", so use "__inline__" instead. - AC_MSG_CHECKING([for inline]) - AC_MSG_RESULT([yes]) - AC_DEFINE(inline, __inline__) -else - AC_C_INLINE -fi - - dnl ########### libraries ############ dnl ### Library testing. @@ -222,7 +276,6 @@ dnl # So we test incrementally, building the list from right to left. dnl # Dynix/ptx needs: -lsocket -linet -lnsl dnl # SysV needs: -lsocket -lnsl - dnl TF_DIRS(src, dst[, prefix[, suffix]]) AC_DEFUN(TF_DIRS, [ if test "${$1}" != "no" && test "${$1}" != ""; then @@ -232,18 +285,18 @@ AC_DEFUN(TF_DIRS, [ fi ]) -TF_DIRS(with_incdirs, CPPFLAGS, -I) -TF_DIRS(with_incdir, CPPFLAGS, -I) +TF_DIRS(with_incdirs, CPPFLAGS, -I) +TF_DIRS(with_incdir, CPPFLAGS, -I) TF_DIRS(with_inclibdirs, CPPFLAGS, -I) -TF_DIRS(with_inclibdir, CPPFLAGS, -I) -TF_DIRS(with_inclibpfx, CPPFLAGS, -I, /include) +TF_DIRS(with_inclibdir, CPPFLAGS, -I) +TF_DIRS(with_inclibpfx, CPPFLAGS, -I, /include) LIBDIRS="" -TF_DIRS(with_libdirs, LIBDIRS, -L) -TF_DIRS(with_libdir, LIBDIRS, -L) +TF_DIRS(with_libdirs, LIBDIRS, -L) +TF_DIRS(with_libdir, LIBDIRS, -L) TF_DIRS(with_inclibdirs, LIBDIRS, -L) -TF_DIRS(with_inclibdir, LIBDIRS, -L) -TF_DIRS(with_inclibpfx, LIBDIRS, -L, /lib) +TF_DIRS(with_inclibdir, LIBDIRS, -L) +TF_DIRS(with_inclibpfx, LIBDIRS, -L, /lib) dnl Must append LIBDIRS to LDFLAGS now so it's present for AC_CHECK_LIB. dnl (LIBDIRS will not work in the OTHER-LIBRARIES argument of AC_CHECK_LIB @@ -251,6 +304,14 @@ dnl on all platforms since it will _follow_ the -l option for the library dnl being tested.) LDFLAGS="$LDFLAGS $LIBDIRS" +dnl This is needed to compile when usinc GCC 10 +dnl This check isn't working properly and reports GCC +dnl even when using clang. This doesn't cause any +dnl issues, but still should be fixed at some point +dnl in case this is needed for something more. +if test "$ax_cv_c_compiler_vendor" = "gnu"; then + LDFLAGS="-Wl,--allow-multiple-definition $LDFLAGS" +fi AC_SEARCH_LIBS(select, bsd, , AC_MSG_ERROR([TF can not work without select().])) @@ -270,7 +331,6 @@ dnl ## If we haven't found connect(), look for -lsocket. dnl ## Note: on IRIX 5, -lsocket exists, but we mustn't use its gethostbyname(). AC_SEARCH_LIBS(connect, socket) - dnl XXX --enable-socks dnl if test "$enable_socks" != "no" ; then dnl # SOCKS uses res_init(), so we need -lresolv if there is one. @@ -284,7 +344,6 @@ dnl echo "#define SOCKS_NONBLOCK" >&4 dnl fi dnl fi - dnl ### I'm guessing setlocale() is in libintl on some systems, if not in libc. AC_SEARCH_LIBS(setlocale, intl, , AC_MSG_WARN([Locales will not be supported.])) @@ -297,14 +356,19 @@ if test "$enable_ssl" = "yes"; then old_CPPFLAGS="$CPPFLAGS" while true; do dnl -lssl needs -lcrypto - dnl Try in default locations first, then /usr/local/ssl + dnl Try in default locations first, then /usr/local/ssl, then try the + dnl GnuTLS compatibility layer LIBS="$LIBS -lssl -lcrypto" AC_MSG_CHECKING([for libcrypto and libssl]) AC_TRY_LINK_FUNC(SSL_new, AC_MSG_RESULT([yes]), CFLAGS="$CFLAGS -L/usr/local/ssl/lib"; CPPFLAGS="-I/usr/local/ssl/include $CPPFLAGS"; AC_TRY_LINK_FUNC(SSL_new, AC_MSG_RESULT([/usr/local/ssl]), - AC_MSG_RESULT([no]); break)) + LIBS="$old_LIBS -lgnutls-openssl" + CFLAGS="$old_CFLAGS" + CPPFLAGS="$old_CPPFLAGS" + AC_TRY_LINK_FUNC(SSL_new, AC_MSG_RESULT([gnutls]), + AC_MSG_RESULT([no]); break))) dnl Red Hat 9 and Yellow Dog Linux have ssl.h in a standard place, dnl but it depends on krb5.h which isn't in a standard place. AC_MSG_CHECKING(for ssl kerberos dependency) @@ -314,9 +378,12 @@ if test "$enable_ssl" = "yes"; then else AC_MSG_RESULT([no]) fi - AC_CHECK_HEADER(openssl/ssl.h, , break) - AC_DEFINE(HAVE_SSL) - ok=1 + AC_CHECK_HEADERS([openssl/ssl.h], ok=1, + [AC_CHECK_HEADERS([gnutls/openssl.h], [ok=1])]) + if test "$ok" = "1"; then + AC_DEFINE([HAVE_SSL], [1], [SSL enabled]) + AC_CHECK_FUNCS(ERR_peek_error) + fi break done if test "$ok" = "0"; then @@ -327,75 +394,93 @@ if test "$enable_ssl" = "yes"; then fi fi +dnl ########### terminal ############ + dnl ### test termcap. dnl # At least one system (Red Hat Linux) has a broken ncurses and a working dnl # termcap, so we try termcap before ncurses. terminal_hardcode="TERM_vt100"; -dnl # Cygwin may not have termcap at all, but it only supports ANSI emulation -dnl # anyway, so we hardcode that (unless it was overridden). -if test "$CYGWIN" = "yes"; then - terminal_hardcode="TERM_ansi"; - if test "$enable_termcap" = "default"; then - enable_termcap="no"; - fi -fi - if test "$enable_termcap" = "default"; then enable_termcap="yes"; fi if test "$enable_termcap" = "no"; then - AC_DEFINE_UNQUOTED(HARDCODE, $terminal_hardcode) + AC_DEFINE_UNQUOTED([HARDCODE], [$terminal_hardcode], [termcap disabled - hardcoding terminal]) else if test "$enable_termcap" = "yes"; then enable_termcap=""; fi +dnl AC_SEARCH_LIBS(tgetent, $enable_termcap termcap ncurses curses, +dnl AC_DEFINE([TERMCAP], [1], [termcap enabled])) +dnl AC_DEFINE_UNQUOTED([HARDCODE], [$terminal_hardcode], [termcap enabled - hardcoding terminal]) +dnl AC_MSG_WARN([Hardcoding terminal codes.]) AC_SEARCH_LIBS(tgetent, $enable_termcap termcap ncurses curses, - AC_DEFINE(TERMCAP) + AC_DEFINE(TERMCAP) , - AC_DEFINE_UNQUOTED(HARDCODE, $terminal_hardcode) - AC_MSG_WARN([Hardcoding terminal codes.])) + AC_DEFINE_UNQUOTED(HARDCODE, $terminal_hardcode) + AC_MSG_WARN([Hardcoding terminal codes.])) fi dnl XXX check for debian linux's broken termcap +dnl ########### cygwin ############ -if test "$enable_256colors" = "yes"; then - AC_DEFINE(NCOLORS, 256) +dnl XXX check for debian linux's broken termcap +dnl # Cygwin may not have termcap at all, but it only supports ANSI emulation +dnl # anyway, so we hardcode that (unless it was overridden). +if test "$CYGWIN" = "yes"; then + terminal_hardcode="TERM_ansi"; + if test "$enable_termcap" = "default"; then + enable_termcap="no"; + fi fi +dnl AC_CANONICAL_HOST +dnl case $host_os in +dnl *cygwin* ) CYGWIN=yes;; +dnl * ) CYGWIN=no;; +dnl esac + +dnl # override a few values +if test "$CYGWIN" = "yes"; then + AC_DEFINE([HAVE_H_ERRNO], [0], [cygwin h_errno broken]) +fi + +if test "$enable_256colors" = "yes"; then + AC_DEFINE([NCOLORS], [256], [256 color mode enabled]) +fi if test "$enable_float" = "yes"; then AC_SEARCH_LIBS(sqrt, m) fi if test "$enable_widechar" = "yes"; then - AC_CHECK_HEADERS(wchar.h wctype.h) - AC_CHECK_ICU([4.2], - [LIBS="${LIBS} -licuuc"], - [AC_MSG_ERROR([Widechar cannot be enabled without icu.])]) + AX_CHECK_ICU(1, + [AC_DEFINE([WIDECHAR], [1], [widechar unicode enabled])], + [AC_MSG_WARN([libicuuc not found. disabling widechar support.])]) + AC_CHECK_HEADERS([wchar.h wctype.h], [], + [AC_MSG_WARN([wchar.h and wctype.h not found, require for widechar unicode support.])]) fi AC_CHECK_LIB(z, inflate) AC_CHECK_LIB(pcre, pcre_compile) + dnl ########### headers ############ -AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h memory.h sys/select.h) +AC_CHECK_HEADERS([lunistd.h memory.h sys/select.h]) AC_HEADER_SYS_WAIT dnl ### For optional language support. -AC_CHECK_HEADERS(locale.h, , +AC_CHECK_HEADERS([locale.h], , AC_MSG_WARN([Locales will not be supported.])) dnl ### Find pwd.h -AC_CHECK_HEADERS(pwd.h, , -AC_MSG_WARN([Filename '~user' expansion will not be supported.])) +AC_CHECK_HEADERS([pwd.h], , + AC_MSG_WARN([Filename '~user' expansion will not be supported.])) dnl ### Find zlib.h -AC_CHECK_HEADERS(zlib.h) - +AC_CHECK_HEADERS([zlib.h]) dnl TF_SEARCH_HEADERS(SYMBOL, HEADERS... [, DO-IF-FOUND [, DO-IF-NOT-FOUND]]) dnl Searches for each header in HEADERS, and defines SYMBOL to the first one @@ -403,10 +488,10 @@ dnl found. AC_DEFUN(TF_SEARCH_HEADERS, [ found=0; for f in $2; do - AC_CHECK_HEADERS($f, - AC_DEFINE_UNQUOTED($1, <$f>) - found=1 - break) + AC_CHECK_HEADERS([$f], + AC_DEFINE_UNQUOTED([$1], [<$f>], [$1 defined]) + found=1 + break) if test $found -eq 1; then break; fi done if test $found -eq 1; then @@ -417,78 +502,32 @@ AC_DEFUN(TF_SEARCH_HEADERS, [ unset found ]) - dnl ### Find internet structure header -TF_SEARCH_HEADERS(NETINET_IN_H, netinet/in.h sys/in.h sys/netinet/in.h, , -AC_MSG_WARN([I will use my own internet structures. Good luck.])) +TF_SEARCH_HEADERS(NETINET_IN_H, [netinet/in.h sys/in.h sys/netinet/in.h], , + AC_MSG_WARN([I will use my own internet structures. Good luck.])) dnl ### Find internet address header -TF_SEARCH_HEADERS(ARPA_INET_H, arpa/inet.h sys/inet.h) - -dnl ### Find nameser header -dnl TF_SEARCH_HEADERS(NAMESER_H, arpa/nameser.h nameser.h) +TF_SEARCH_HEADERS(ARPA_INET_H, [arpa/inet.h sys/inet.h]) dnl ### Find netdb header -TF_SEARCH_HEADERS(NETDB_H, netdb.h sys/netdb.h, , +TF_SEARCH_HEADERS(NETDB_H, [netdb.h sys/netdb.h], , AC_MSG_ERROR([can't find netdb.h])) AC_CACHE_CHECK([whether struct sockaddr has sa_len], tf_cv_sa_len, - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -#include ], - [struct sockaddr sa; return sa.sa_len;], - tf_cv_sa_len=yes, - tf_cv_sa_len=no)) +#include ]], [[struct sockaddr sa; return + sa.sa_len;]])],[tf_cv_sa_len=yes],[tf_cv_sa_len=no])) if test "${tf_cv_sa_len}" = "yes"; then - AC_DEFINE(HAVE_SOCKADDR_SA_LEN) + AC_DEFINE([HAVE_SOCKADDR_SA_LEN], [1], [struct sockaddr has sa_len]) fi - dnl ### Figure out which terminal driver to use. - -AC_CHECK_HEADERS(termios.h termio.h sgtty.h, break) +AC_CHECK_HEADERS([termios.h termio.h sgtty.h], break) dnl # Some brain damaged systems (Xenix) need for struct winsize. -AC_EGREP_HEADER([struct winsize], sys/ptem.h, AC_DEFINE(NEED_PTEM_H)) - - -dnl ########### typedefs ############ - -dnl TF_CHECK_TYPE(TYPE, DEFAULT [, OTHER_HEADERS]) -dnl ...because AC_CHECK_TYPE doesn't have OTHER_HEADERS -AC_DEFUN(TF_CHECK_TYPE, -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_type_$1, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [ -#if STDC_HEADERS -#include -#include -#endif -$3 -], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl -AC_MSG_RESULT($ac_cv_type_$1) -if test $ac_cv_type_$1 = no; then - AC_DEFINE($1, $2) -fi -]) - - -AC_TYPE_SIGNAL -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_CHECK_TYPE(time_t, long) -TF_CHECK_TYPE(socklen_t, int, [ -#include -#include -]) - - -dnl ########### structures ############ +AC_EGREP_HEADER(struct winsize, sys/ptem.h, AC_DEFINE([NEED_PTEM_H], [1], [ptem.h needed])) dnl ########### functions ############ @@ -507,6 +546,13 @@ dnl # optional functions AC_CHECK_FUNCS(bcopy bzero connect fileno getcwd \ gethostname gethostbyname getipnodebyname \ getpwnam gettimeofday getwd hstrerror index inet_aton) +dnl # uncommented functions, presumably all optional +AC_CHECK_FUNCS(kill memcpy memset raise setlocale \ + setrlimit sigaction srand srandom strcasecmp strchr \ + strcmpi strcspn strerror stricmp strtod tzset waitpid) + + +dnl ########### networking ############ if test "$enable_getaddrinfo" = "default"; then if test `uname -s` = 'Darwin'; then @@ -522,42 +568,27 @@ else AC_CHECK_FUNCS(getaddrinfo gai_strerror) fi -AC_CHECK_FUNCS(kill memcpy memset raise setlocale setrlimit sigaction \ - srand srandom \ - strcasecmp strchr strcmpi strcspn strerror stricmp strtod tzset waitpid) - -dnl # override a few values -if test "$CYGWIN" = "yes"; then - AC_DEFINE(HAVE_H_ERRNO, [0 /* h_errno is broken in cygwin32 b18. */]) -fi - if test "$enable_inet6" = "yes"; then AC_MSG_CHECKING([for IPv6 address structure]) for type in in6_addr in_addr6; do - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include #include NETINET_IN_H -], - [ +]],[[ #ifndef AF_INET6 # error AF_INET6 not defined #endif struct ${type} foo; - ], - AC_DEFINE_UNQUOTED(IN6_ADDR, $type) - AC_MSG_RESULT([$type]) - break) + ]])],[AC_DEFINE_UNQUOTED([IN6_ADDR], [$type], [IN6_ADDR defined]) + AC_MSG_RESULT($type) + break],[]) done fi dnl ########### system services ############ -dnl # These should come after AC_PROG_CC. -AC_EXEEXT -AC_OBJEXT - dnl ### Find mail directory by looking at $MAIL, then in the usual places. if test "$enable_mailcheck" = "no"; then MAILDIR="" @@ -584,20 +615,20 @@ else MAILDIR="$enable_mailcheck" fi if test -n "$MAILDIR"; then - AC_DEFINE_UNQUOTED(MAILDIR, "$MAILDIR") + AC_DEFINE_UNQUOTED([MAILDIR], ["$MAILDIR"], [mail enabled]) fi dnl ### Figure out names of executable, library directory, and symlink. -if test "$enable_version" != "no" && test "$program_suffix" = "NONE"; then +if test "$enable_version" != "no" && test "$program_suffix" == "NONE"; then program_suffix="-${TFVER}" fi dnl The "right" way of using program_transform_name, program_prefix, and dnl program_suffix expects you to use AC_ARG_PROGRAM here and do transformation dnl in the Makefile, but we want the values now, so we do it ourselves. -EXENAME="tf" +EXENAME="tf" PROGNAME="tf" test "${program_prefix}" != "NONE" && EXENAME="${program_prefix}${EXENAME}" test "${program_suffix}" != "NONE" && EXENAME="${EXENAME}${program_suffix}" if test "${program_transform_name}" != "NONE"; then @@ -614,29 +645,11 @@ else fi AC_SUBST(EXENAME) +AC_SUBST(PROGNAME) AC_SUBST(LIBNAME) AC_SUBST(SYMLINK) -dnl ### man page - -dnl if test "$enable_manpage" = "yes"; then -dnl MANPAGE='${mandir}/man1/${EXENAME}.1' -dnl MANTYPE='nroff' -dnl else -dnl MANPAGE='' -dnl MANTYPE='' -dnl fi -dnl AC_SUBST(MANPAGE) -dnl AC_SUBST(MANTYPE) dnl XXX - - -dnl ########### output ############ - - -dnl ########### end ############ - - dnl # XXX dnl ### Sanity check for filenames (some people do pretty stupid things) dnl # The "${SYMLINK}/" is just to make the grep return false if SYMLINK is empty. @@ -673,7 +686,7 @@ dnl # echo "${DIR2}/" | egrep "^${BUILDTREE}/" >/dev/null 2>&1 || dnl # echo "${DIR3}/" | egrep "^${BUILDTREE}/" >/dev/null 2>&1 dnl #then dnl # echo -dnl # echo 'You can not install files in the build tree,' +dnl # echo 'You can not install files in the build tree, ' dnl # echo "${BUILDTREE}." dnl # echo 'Edit unix/Config and try again.' dnl # exit 2 @@ -688,13 +701,9 @@ dnl # echo 'different name for the executable.' dnl # exit 1 dnl #fi - MODE=755 AC_SUBST(MODE) - - - dnl ### Make sure the PATH is sane. dnl # Ideally, this should be done before the compiler check. But a compiler dnl # found now in the extended PATH won't be found in src/Makefile, because it @@ -702,18 +711,29 @@ dnl # won't inherit this PATH. PATH="$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:/usr/ccs/bin" -if test "$enable_dmalloc" = "yes"; then - CPPFLAGS="$CPPFLAGS -DUSE_DMALLOC" - OTHER_OBJS="$OTHER_OBJS dmalloc.o" -fi - dnl ### write variables -if test "$enable_inet6" = "yes"; then AC_DEFINE(ENABLE_INET6) fi -if test "$enable_history" = "no"; then AC_DEFINE(NO_HISTORY) fi -if test "$enable_process" = "no"; then AC_DEFINE(NO_PROCESS) fi -if test "$enable_float" = "no"; then AC_DEFINE(NO_FLOAT) fi -if test "$enable_widechar" = "yes"; then AC_DEFINE(WIDECHAR) fi +if test "$enable_inet6" = "yes"; then + AC_DEFINE([ENABLE_INET6], [1], [IPV6 networking enabled]) +fi +if test "$enable_atcp" = "yes"; then + AC_DEFINE([ENABLE_ATCP], [1], [ATCP protcol enabled]) +fi +if test "$enable_gmcp" = "yes"; +then AC_DEFINE([ENABLE_GMCP], [1], [GMCP protocol enabled]) +fi +if test "$enable_option102" = "yes"; +then AC_DEFINE([ENABLE_OPTION102], [1], [OPTION102 protocol enabled]) +fi +if test "$enable_history" = "no"; +then AC_DEFINE([NO_HISTORY], [1], [history and recall disabled]) +fi +if test "$enable_process" = "no"; +then AC_DEFINE([NO_PROCESS], [1], [quote and repeat disabled]) +fi +if test "$enable_float" = "no"; +then AC_DEFINE([NO_FLOAT], [1], [floating point disabled]) +fi CPPFLAGS="${CPPFLAGS} -DDATADIR=\${datadir}" AC_SUBST(CFLAGS) @@ -721,30 +741,32 @@ AC_SUBST(CPPFLAGS) AC_SUBST(LIBS) AC_SUBST(OTHER_OBJS) -AC_OUTPUT(Makefile unix/vars.mak src/tfdefs.h, [ - ### Create src/Makefile from pieces. - +AC_CONFIG_FILES([Makefile unix/vars.mak src/tfdefs.h]) +AC_CONFIG_COMMANDS([default],[ cat >src/Makefile <> src/Makefile -]) +],[]) +AC_OUTPUT AC_MSG_NOTICE([ ##################################################### ## prefix: $prefix ## exec_prefix: $exec_prefix ## bindir: $bindir +## datarootdir: $datarootdir ## datadir: $datadir ## executable: \${bindir}/$EXENAME ## library: \${datadir}/$LIBNAME +## manpage: ${MANPAGE} ## ## TinyFugue configuration successful. ## Use "make" to build. ]) + diff --git a/help/Makefile b/help/Makefile new file mode 100644 index 0000000..a7956f7 --- /dev/null +++ b/help/Makefile @@ -0,0 +1,38 @@ +######################################################################## +# +# TinyFugue - programmable mud client +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) +# +# TinyFugue (aka "tf") is protected under the terms of the GNU +# General Public License. See the file "COPYING" for details. +# +######################################################################## + +CC=gcc +CFLAGS=-O2 -I../src + +# Help files were being maintained as html and then converting, which +# is a PITA to maintain. For now, we're preventing the html2tf from +# blowing away our updated tf-help in tf-lib. In the future, there +# should be some easily maintained source to generate html and tf-help +# from. Likely whichever Markdown system allows for the most pain free +# conversion from html. + +all: tf-help + echo Building html help files available in the help/ directory +# cp tf-help ../tf-lib + +tf-help: html2tf commands/*.html topics/*.html + ./html2tf commands/*.html > tf-help || { rm tf-help; exit 1; } + ./html2tf topics/*.html >> tf-help || { rm tf-help; exit 1; } + +#debug: +# @# Test for missing quotes +# egrep '' */*.html && false || true + +clean: + rm -f html2tf tf-help + +# The next line is a hack to get around a bug in BSD/386 make. +make: + diff --git a/help/commands/addworld.html b/help/commands/addworld.html new file mode 100644 index 0000000..4f08181 --- /dev/null +++ b/help/commands/addworld.html @@ -0,0 +1,189 @@ +TinyFugue: /addworld + + +

addworld()

+ +

+ Function usage: + +

+ ADDWORLD(name, type, + [host, port + [, char, pass [, file [, flags [, srchost]]]]])
+ +

+ Command usage: + +

+ /ADDWORLD [-pxe] [-Ttype] [-ssrchost] + name [char pass] host port + [file]
+ /ADDWORLD [-Ttype] [-ssrchost] + name
+ /ADDWORLD [-Ttype] DEFAULT + [char pass [file]]
+


+ +

+ Defines a new world or redefines an + existing world with the name name. + Name may not contain spaces; additionally, when defining a new world, + name may not begin with "(". + +

+ Host is a server's internet hostname, IPv4 address, or (if your + platform supports it) IPv6 address. Port is the number or name + of a TCP port on the host. + If host and port 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 world + named "default" which does not have a host or port. If a + normal world is defined without a + character, pass, type, or mfile, then that + world will use the corresponding field + of the "default" world if there is one. + If the "default" world is redefined, + worlds with omitted fields will use + the new default values. + +

+ In function form, flags is a string of 0 or more letters + that modify the behavior of the function. + For compatibility with older versions of TF, an "f" or "0" in flags + has the same effect as "p", and an "n" or "1" in flags has no effect. + +

+ Options: +

+ +
command: -p +
function: flags contains "p" +
%{proxy_host} + will be ignored, and all connections to the world will be direct. + By default, worlds use + %{proxy_host} + if it is set. + +
command: -x +
function: flags contains "x" +
TF will use the SSL protocol to make connections to this world. + +
command: -e +
function: flags 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: -ssrchost +
function: srchost +
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: -Ttype +
function: type +
The optional type is used in hooks and triggers, and for + automatic login and flag setting. + (See below.) +
+ +

+ The library pre-defines WORLD and LOGIN hooks for + types that match these + glob patterns: + +

+

+
(none) +
TinyMUD login format + ("connect char pass"), the value of + lp is not changed. + +

+

tiny, tiny.* +
TinyMUD login format + ("connect char pass"), + lp=off. + +

+

lp, lp.* +
diku, diku.* +
aber, aber.* +
LP/Diku login format + (sends char and pass on separate lines), + lp=on. + For servers that send unterminated prompts. + +

+

lpp, lpp.* +
LP/Diku login format, + lp=off. + For MUDs that use GOAHEAD or EOR + prompt protocol. + +

+

telnet, telnet.* +
Telnet login format + (sends char and pass when "login:" and "password:" + prompts are received), + lp=on, + /localecho 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 + glob + patterns above, the standard library + hooks will still work. For example, if you did: + +

+  /test addworld("Cave", "tiny.muck.",     "cave.tcp.com", 2283, char, pass)
+  /test addworld("Foo",  "tiny.muck.msp.", "foo.com",      9999, char, pass)
+  /test addworld("Cow",  "tiny.moo.",      "cow.com",      8267, char, pass)
+  /test addworld("Buzz", "tiny.moo.msp.",  "buzz.org",     8267, char, pass)
+
+ + then tiny-style autologin would still + work (using the library hooks), and + you could also define your own triggers + and hooks specific to TinyMUCKs or + TinyMOOs (e.g., "/def + -Ttiny.muck.*") + or to worlds that support MSP regardless of their server type + (e.g., "/def + -T*.msp.*"), + etc. Note the trailing period on the world type definitions, which + make it easier to write matching triggers. + +

+ Any type is valid, but is only useful if it is matched by a + "-Ttype" option of a + hook or + trigger. + +

+ If addworld() 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: worlds, + /connect, + /fg, + /unworld, + /edworld, + /telnet + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/addworldtype.html b/help/commands/addworldtype.html new file mode 100644 index 0000000..74bef19 --- /dev/null +++ b/help/commands/addworldtype.html @@ -0,0 +1,28 @@ +TinyFugue: /addtelnet + + + + + +

/addworldtype

+ +

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

+ See: /addworld + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/alias.html b/help/commands/alias.html new file mode 100644 index 0000000..e39d90d --- /dev/null +++ b/help/commands/alias.html @@ -0,0 +1,70 @@ +TinyFugue: /alias + + +

/alias

+ +

+ Usage: + +

+ /REQUIRE alias.tf
+ +

+ /ALIAS [name + [command]]
+ /UNALIAS name
+ /PURGEALIAS
+


+ +

+ With no arguments, /alias lists all + aliases. With a name argument, + /alias lists the alias with names + that match the glob pattern + name. Otherwise, /alias + defines name as an alias for command. + +

+ /Unalias undefines an alias for + name that was defined with + /alias. + +

+ /Purgealias undefines all aliases + defined with /alias. + Note that /purgealias does not take + a pattern argument. + +

+ To use an alias, just type its name followed by any optional arguments. + Unlike macros defined with + /def, you do + not type '/' before name to execute an alias. + Argument substitution + in aliases works the same as in macros. + +

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

+ Using /def instead of + /alias is recommended. + +

+ See: /def, + macros, + substitution, + tfrc + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/at.html b/help/commands/at.html new file mode 100644 index 0000000..c45f6a2 --- /dev/null +++ b/help/commands/at.html @@ -0,0 +1,51 @@ +TinyFugue: /at + +

/at

+ +

+ Usage: + +

+ /AT [-v] [date] time commands
+


+ +

+ Commands will be executed at date and time. + Date must be of the form "year-month-day" + or "month-day", where year may be 2 or 4 digits. + Time must be of the form "hours:minutes" or + "hours:minutes:seconds", + where hours is between 0 and 23, and seconds may be specified + to the nearest microsecond. + If any part of the date is omitted, it defaults to the nearest value + for which date and time 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. + +

+ Options: +

+
-v
verbose: prints full date and time +
+ +

+ Examples:
+ /at 04-01 00:00:00 + /echo Happy April Fools Day!
+ /def lunch_reminder = + /at 12:00 + /echo Lunchtime!%%; + /lunch_reminder
+ +

+ See: processes, + /repeat, + /quote + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/bamf.html b/help/commands/bamf.html new file mode 100644 index 0000000..93a30bf --- /dev/null +++ b/help/commands/bamf.html @@ -0,0 +1,72 @@ +TinyFugue: /bamf + +

/bamf

+ +

+ Usage: + +

+ /BAMF [OFF|ON|OLD]
+


+ +

+ Sets the flag %{bamf}. + 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 name@addr (host) port port #### 
+
+ +

+ For example: + +

+

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

+ If %{bamf} is off, + lines in this format have no effect. If + %{bamf} is on, Fugue + will attempt to use the portal as an UnterMUD portal: it will disconnect + from the current + world, and attempt to connect to the new world; if the + %{login} flag is also + on, TF will try to log in to the new world using the name and password from + the current world. + If bamf is "old", Fugue will connect to the new world + without disconnecting from the + current world. If + %{login} is also on, + and the new world has been defined with a name and password in an + /addworld 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 %{bamf} + defaults to 0 (off). + +

+ See: worlds, + sockets, + %bamf, + %login + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/beep.html b/help/commands/beep.html new file mode 100644 index 0000000..1dfbc77 --- /dev/null +++ b/help/commands/beep.html @@ -0,0 +1,33 @@ +TinyFugue: /beep + +

/beep

+ +

+ Usage: + +

+ /BEEP [number|ON|OFF]
+


+ +

+ /beep causes Fugue to emit + number beeps (ASCII 7). /beep + with no arguments will emit three beeps. + /beep OFF causes Fugue to ignore + further calls to /beep until a + /beep ON is performed. + +

+ Note that on many terminals, multiple immediate beeps are indistinguishable. + You can use /repeat to put a delay + between beeps: +

+  /repeat -0.2 5 /beep
+
+ + +
+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/bind.html b/help/commands/bind.html new file mode 100644 index 0000000..2281b1b --- /dev/null +++ b/help/commands/bind.html @@ -0,0 +1,77 @@ +TinyFugue: /bind + +

/bind

+ +

+ Usage: + +

+ /BIND sequence = + command
+


+ +

+ Creates a macro that will be executed + when sequence is typed at the keyboard. The sequence may use + ^key notation for a control key, and \number 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 sequence is typed at the keyboard, + command is executed. The command is actually a + macro body, so all the substitutions + described under "evaluation" will + be performed. The most common command used with a key binding is + /dokey. + +

+ At startup, TF defines bindings for + /dokey BSPC, BWORD, DLINE, REFRESH, + LNEXT, UP, DOWN, RIGHT, and LEFT based on your terminal settings. Also, + the standard macro library defines a + set of (invisible) default bindings, one for each of the + /dokey functions. + +

+ If /bind fails for any reason, it + returns 0. Otherwise, it returns the number of the new + macro (useful in + /undefn and + /edit). + +

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

+ The command
+ /bind sequence = + command
+ is equivalent to
+ /def + -b"sequence" = + command.
+ +

+ Examples: +

+  /bind ^Xtw = :jumps to the left%;:steps to the right!
+  /bind ^[q = /set more off
+  /bind ~ky = /input Kyosuke
+
+ +

+ See: keys, + /dokey, + /unbind, + /input, + interface + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/break.html b/help/commands/break.html new file mode 100644 index 0000000..e48e220 --- /dev/null +++ b/help/commands/break.html @@ -0,0 +1,33 @@ +TinyFugue: /break + +

/break

+ +

+ Usage: + +

+ /BREAK [n]
+


+ +

+ During macro evaluation, + /BREAK unconditionally terminates the + nearest enclosing /WHILE loop. If + n is specified, it will break out of n enclosing + /WHILE loops. If used outside a + /WHILE loop, the + macro evaluation is terminated. + +

+ See: /while, + /return, + /exit, + evaluation + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/cat.html b/help/commands/cat.html new file mode 100644 index 0000000..f13e9a2 --- /dev/null +++ b/help/commands/cat.html @@ -0,0 +1,58 @@ +TinyFugue: /cat + +

/cat

+ +

+ Usage: + +

+ /CAT [%]
+


+ +

+ 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 + history as a single line, so + intermediate lines can not be recalled separately. + +

+ Example: +

+  /cat %
+  :foo
+  :bar
+  :baz
+  . 
+
+ +

+ This produces: +

+  :foo%;:bar%;:baz
+
+ +

+ If the %{sub} flag is + set on, this will expand to three + lines ":foo", ":bar" and ":baz" and be sent to the + socket. + +

+ See: + /paste, + /sub, + general, + history + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/changes.html b/help/commands/changes.html new file mode 100644 index 0000000..d1c609c --- /dev/null +++ b/help/commands/changes.html @@ -0,0 +1,32 @@ +TinyFugue: /changes + +

/changes

+ +

+ Usage: + +

+ /CHANGES [version]
+


+ +

+ List the changes in a version of TinyFugue; if omitted, + version defaults to the current version. Version 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 + %TFLIBDIR/CHANGES. + +

+ A list of changes in the latest version of tf can be found at + http://tinyfugue.sourceforge.net/CHANGES. + +

+ See: /version + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/complete.html b/help/commands/complete.html new file mode 100644 index 0000000..94ad26d --- /dev/null +++ b/help/commands/complete.html @@ -0,0 +1,66 @@ +TinyFugue: /complete + + +

/complete

+ +

+ Usage: + +

+ /COMPLETE [type]
+


+ +

+ When a part of a word is typed, and then + /complete is called + (from a keybinding), + it will attempt to fill in the rest of the word. + The possible words it chooses from depend on type. + If no type is given, it completes from context: + it will choose the type of completion based on earlier parts of the + line being typed, plus previous + input history. + 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 + keybindings 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 %{completion_list}
+    ^[i			input_history	complete from previously typed words
+			sockname	complete name of open tf socket
+
+ +

+ The "ESC TAB" and "ESC ;" bindings will use the + %{completion_list} + variable, 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 + %{TFLIBDIR}/complete.tf + file for more information. + +

+ See: keybindings, + interface + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/connect.html b/help/commands/connect.html new file mode 100644 index 0000000..a4f9187 --- /dev/null +++ b/help/commands/connect.html @@ -0,0 +1,204 @@ +TinyFugue: /connect + +

/connect

+ +

+ Usage: + +

+ /CONNECT [-lqxbf] [world]
+ /CONNECT host port
+


+ +

+ In the first form, /connect + attempts to open a socket connected to + world. World must be defined by the + /addworld command and not already + open. If world is omitted, the first defined world will be + used. + If world does not have a host and port, + /connect will + create a "connectionless" socket. + In the form + "/connect host + port", it will define a temporary world named + "(unnamedN)" with the given address, and try + to connect to it. + Host may be an internet hostname, + an IPv4 address, + or (if your platform supports it) + an IPv6 address. + A temporary world will be undefined when it is no longer in use. + +

+ Options: +

+
-l +
No automatic login + (i.e., don't call the LOGIN + hook). +
-q +
Quiet login (overrides + %{quiet} + flag). +
-x +
Connect using SSL (not necessary if + world was defined with the + "x" flag). +
-f +
Connect in the foreground +
-b +
Connect in the background +
+ +

+ The first thing /connect does is + create a new socket. + If the -f option was given, or /connect + was called from the foreground (e.g., from the command line), the new + socket is immediately brought into + the foreground. + If the -b option was given, or /connect + was called from the background (e.g., from a DISCONNECT + hook in a + background world), the + connection proceeds in the background. + +

+ If a hostname was given, TF must look it up to find one or more + IPv4 + or (if your platform supports it) + IPv6 addresses. + If + %{gethostbyname} + is "nonblocking" (the default), and this process takes more than a fraction + of a second, + TF will print "Hostname resolution for world in progress" (the PENDING + hook), and TF will continue running + normally while the lookup proceeds. + But if + %{gethostbyname} + 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 world: address port" + (the PENDING hook). + On most platforms, if + %{connect} is + "nonblocking" (the default), TF continues running normally while + the network connection proceeds. + But if %{connect} 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 socket + is not automatically brought to the + foreground. + However, if you had run /connect + in the foreground (e.g. from the command line), + the socket would already be in the + foreground, + unless it was nonblocking and had taken a long time and you + foregrounded another + socket while you were waiting, + in which case you probably wouldn't want to automatically + foreground the new + socket. + If you prefer automatic + foregrounding upon + successful connection, you can define a + CONNECT hook that calls + "/fg + %{1}". + +

+ Even if + %{gethostbyname} + and/or %{connect} are + "blocking", they can be interrupted with the SIGINT + signal (^C). + +

+ If the connection fails, TF normally prints + "Connection to world failed: address port: reason" + (the CONFAIL hook). + But, if the failure was in the specific address, and there is more than one + address associated with the world's + hostname, the message will instead say + "Intermediate connection to world failed: ..." + (the ICONFAIL hook), + and TF will try to connect to the next address. + So, a failed /connect will always + result in a series of zero or more + ICONFAIL hooks + followed by exactly one CONFAIL hook. + But an ICONFAIL may also be followed by a successful connection to an + alternate address. + +

+ If the network connection is successful, or the + socket is "connectionless", + these events occur: +

    +
  • If the world was defined with an + mfile, that file will be loaded + (and the LOAD hook will be called); +
  • The CONNECT hook is called + (unless the socket is connectionless + or the connection is via a proxy). +
  • If %{login} is on, + and a character and password is defined for the + world, the LOGIN + hook is called + (unless the socket is connectionless + or the connection is via a proxy). + The default LOGIN + hooks 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 hook. +
+ +

+ If you have trouble connecting (especially if you use SOCKS), + try "/set + connect=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 + tfhost variable + or define the world with a + srchost parameter to + addworld. + +

+ /connect returns 0 on error or + failure, 1 for immediate success, or 2 if the name lookup or network + connection is pending. + +

+ See: worlds, + sockets, + proxy, + /world, + /addworld, + /fg, + /retry, + %login, + %gethostbyname, + %connect, + hooks + protocols + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/dc.html b/help/commands/dc.html new file mode 100644 index 0000000..e0cc9fb --- /dev/null +++ b/help/commands/dc.html @@ -0,0 +1,38 @@ +TinyFugue: /dc + + + +

/dc

+ +

+ Usage: + +

+ /DC [world|-ALL]
+


+ +

+ Disconnects from the named world, or the + current world if no world is + given, or all worlds if "-all" is given. If the flag + %{quitdone} is on, + and /dc disconnects the last + socket, TF will exit. + +

+ Disconnecting with /dc does not invoke the + DISCONNECT + hook. + +

+ See: sockets, + %quitdone, + /quit + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/def.html b/help/commands/def.html new file mode 100644 index 0000000..6d7d467 --- /dev/null +++ b/help/commands/def.html @@ -0,0 +1,459 @@ +TinyFugue: /def + +

/def

+ +

+ Usage: + +

+ /DEF [options] [name] [= + body]
+


+ +

+ Defines a macro with an optional + keybinding, + trigger and/or + hook associated with it. The + options and their meanings are: +

+ +

+ + + + + +

-mmatching +
Determines which matching style should be used for + -t, + -h, or + -T options. + Valid values are + "simple", + "glob", and + "regexp" + (see also: patterns). If + omitted, the value of + %{matching} + ("glob" + by default) is used, unless -P + is also given, in which case + "regexp" is used. + +

+ + +

-nshots +
The macro is a multi-shot, + that is, it will be deleted after it is + triggered or + hooked shots times. A + value of 0 makes the macro + permanent. Default: 0. + +

+ + +

-Eexpression +
Before this macro is + tested for a trigger + (-t) + or hook + (-h) match, + expression is evaluated; if its value is 0, + the macro will not be considered a match, so no + attributes (-a) + will be applied, and this macro will not prevent matches + of lower priority (-p), + and its body will not be executed. + If the value of expression is non-zero, the comparison + proceeds as usual. + Note: +
* + positional parameters + (%n) and + subexpression matches + (%Pn) + are not available in expression. +
* + Remember that for every macro with a trigger and an -E expression, + its expression must be evaluated for every line received. + So, you should keep it simple (e.g., "enable_foo" + or + "${world_name} =~ + fg_world()"). + More complex expressions should be put in the body of the macro. +
* + The body of a high priority + macro is not necessarily + executed before the -E expression of a lower + priority + macro is tested, + so expression should not rely on values that may be + changed by other macros that match the same + trigger or + hook. +
+ Default: no expression + (i.e., always match if the + trigger or + hook matches). + See: expressions. + +

+ + +

-tpattern +
Defines a trigger + pattern which will cause the + macro to be called when + it is matched by a line of text from a socket. + Pattern may be enclosed in quotes (", ', or `); if so, + all occurrences of quotes and '\' within the pattern must be + preceded with a '\'. + The pattern matching style + is determined by the -m option, + or defaults to the value of + %{matching}. + Default: no trigger. + See: triggers. + +

+ + +

-h"event[ pattern]" +
Specifies that the macro + will be called automatically whenever event occurs and its + arguments match pattern. Event may be a single event + name or a list separated by '|'. If pattern is omitted, it + will match any arguments, and the quotes may also be omitted. + If quotes are used, then + all occurrences of quotes and '\' within the option argument must be + preceded with a '\'. + The pattern matching style + is determined by the -m option, + or defaults to the value of + %{matching}. + Default: no hook. + See: hooks. + +

+ + +

-bbind +
The macro will be called + when the string bind is typed at the keyboard. Default: + no binding. The bind string may contain the special codes + described under "bind". + See: keys. + +

+ + +

-Bkeyname +
Deprecated. + The macro will be called + when the key named keyname (according to the termcap database) + is typed at the keyboard. Default: none. + See "keys". + +

+ + +

-ppri +
Sets the priority of the + macro's + trigger or + hook to pri. + As in all numeric options, + the argument to -p may be an + expression + that has a numeric value. + E.g. "/def -pmaxpri + ..." will set the macro's priority to the value of the + variable maxpri. + The expression is evaluated + only once, when the macro is defined. + Default: 1. + See also: fall-thru. + See: priority, + /def -F. + +

+ + +

-cchance +
Sets the percent probability of executing the body of a matched + trigger or + hook. (The macro still counts + as a match for attributes and priority even if it does not execute.) + Default: 100%. + +

+ + +

-wworld +
If the macro has a + trigger or + hook, it can be matched only by + text or events from world. Default: any world. + +

+ + +

-Ttype +
If the macro has a + trigger or + hook, it can be matched only by + text or events from worlds of type type. + (See: /addworld). + The pattern matching style + is determined by the -m option, + or defaults to the value of + %{matching}. + Default: any type. + +

+ + +

-F +
Fall-thru: on a + trigger or + hook, allows additional matches + of lower priority to be run. + Default: not fall-thru. + See: priority + +

+ + +

-a[ngGLAurBbhC] +
Set attribute(s) + (normal, gag, nohistory, + nolog, noactivity, underline, reverse, + bold, bell, + hilite, Color) used to + display text matched by the + trigger or to display the + default message of a hook. + Default: normal. + See: attributes. + +

+ + +

-P[part]attr[;[part]attr]... +
Define a "partial + hilite". + The argument consists of a list of pairs of parts + (part) and attributes (attr), + separated by ';'. + When a line matches the + regexp + trigger of this macro, + each attr is applied to the corresponding part + of the line. + Attr can contain any of the + attribute codes + "nxurBhC". + (normal, exclusive, underline, reverse, bold, + hilite, Color). + The value of part determines which part of the text + is affected: +
+
L
text to the left of the + regexp match +
R
text to the right of the + regexp match +
0
text matched by the entire + regexp +
number
text matched by the + the numberth parenthesized subexpression of the + regexp. +
+ + If part is omitted it defaults to 0. + If part is a number and + there are multiple matches in the text, the + attr will be applied + to all of the matches. + Implies -mregexp. + Only one -P option is allowed. + See: attributes. + +

+ + +

-f +
Same as -a, + for backward compatibility. + +

+ + + + +

-i +
-I +
Makes the macro "invisible". + Invisible macros + are not processed by /list, + /save, or + /purge unless forced. + Default: not invisible. + +

+ + +

-q +
Makes the macro "quiet". + If called as a trigger, + the macro + will not count toward the + BACKGROUND + hook or the return value of + /trigger. If called as + a SEND + hook, the + macro + will not prevent the sending of the + original input. If called as a + PROMPT + hook, the + macro + will not remove the text from the data stream. + +

+ +

-1 +
Defines a one-shot. Equivalent to + "-n1". + +

+ +

name +
The name of the macro. + 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 + expansion. + +

+

= body +
Text to be executed when + macro is called. Default: no + body. +
+ +

+ If /def could not create a new + macro, it returns 0. Otherwise, it + returns the number of the new macro + (useful with /undefn and + /edit). + +


+ +

+ + Example: +

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

+ This will create a macro named + "follow". When it is called like "/follow Joe", it will + execute the command +

+  /def -T^tiny -mregexp -p2 -t"^Joe goes ([a-z]*)\\.$" do_follow = go %P1
+
+ Note the substitutions that + occurred: + "%{1}" was replaced with the + first (and only) argument; + each "\\" was replaced with "\"; + "$$" was replaced with "$"; + and "%%" was replaced with "%". + +

+ That command, in turn, defines another + macro + called "do_follow", + with a regexp + trigger +

+  ^Joe goes ([a-z]*)\.$
+
+ which will only match on worlds whose type matches the + regexp pattern "^tiny". + +

+ Thereafter, when a line like "Joe goes north." is received, it will match + the trigger, and cause this command + to be executed: +

+  go north
+
+ Note how + "%P1" was substituted + with the text matched by the first set of parentheses (in this case, + "north"). + +

+ When writing nested macros 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. + +


+ +

+ /def is sufficient to perform all the + functions of the /trig, + /trigp, + /trigc, + /trigpc, + /gag, + /hilite, + /partial, + /hook, and + /bind commands. + +

+ See: macros, + triggers, + patterns, + hooks, + priority, + evaluation, + attributes, + /undef, + /undefn, + /purge, + /list, + /save, + /load + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/dokey.html b/help/commands/dokey.html new file mode 100644 index 0000000..90e5654 --- /dev/null +++ b/help/commands/dokey.html @@ -0,0 +1,148 @@ +TinyFugue: /dokey + +

/dokey

+ +

+ Usage: + +

+ /DOKEY name
+


+ +

+ Performs an action that is intended to be invoked from a + keybinding + created with /bind or + /def -b. + Most of the actions not meaningful or useful when the + /dokey command is executed from the + command line. + +

+ + + +

+  Name		Default binding	  Action
+  ----		---------------	  --------
+  BSPC		(stty), ^H, ^?	  Backspace
+  BWORD		(stty), ^W	  Delete previous word
+  DLINE		(stty), ^U	  Delete entire line
+  REFRESH	(stty), ^R	  Refresh line
+  LNEXT		(stty), ^V	  Ignore any binding next key might have
+
+  UP		(none)		  Cursor up
+  DOWN		(none)		  Cursor down
+  RIGHT		key_right	  Cursor right
+  LEFT		key_left	  Cursor left
+
+  NEWLINE	^J, ^M		  Execute current line
+  RECALLB	^P		  Recall previous input line
+  RECALLF	^N		  Recall next input line
+  RECALLBEG	^[<		  Recall first input line
+  RECALLEND	^[>		  Recall last input line
+  SEARCHB	^[p		  Search backward in input history
+  SEARCHF	^[n		  Search forward in input history
+  SOCKETB	^[b		  Switch to previous socket
+  SOCKETF	^[f		  Switch to next socket
+  DWORD		^[d		  Delete word
+  DCH		^D		  Delete character under cursor
+  REDRAW	^L		  Redraw screen
+  CLEAR		^[^L		  Clear screen
+  HOME		^A		  Go to beginning of line
+  END		^E		  Go to end of line
+  WLEFT		^B		  Go left, to beginning of word
+  WRIGHT	^F		  Go right, to end of word
+  DEOL		^K		  Delete from cursor to end of line
+  PAUSE		^S		  Pause screen
+  PAGE		key_tab		  Scroll 1 page forward ("more")
+  PAGEBACK	(none)		  Scroll 1 page backward ("more")
+  HPAGE		^X]		  Scroll half page forward ("more")
+  HPAGEBACK	^X[		  Scroll half page backward ("more")
+  PGDN		key_pgdn	  /dokey_hpage
+  PGUP		key_pgup	  /dokey_hpageback
+  LINE		^[^N		  Scroll forward 1 line ("more")
+  LINEBACK	^[^P		  Scroll backward 1 line ("more")
+  FLUSH		^[j		  Jump to end of scroll buffer
+  SELFLUSH	^[J		  Show lines with attributes,
+				      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_name" means the key named + name (see keybindings). + +

+ The return value of /dokey 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 "keybindings" for a complete + list of keybindings. + +

+ Example: +

+  /bind ^B = /dokey RECALLB
+  /bind ^F = /dokey RECALLF
+
+ Then, ^B and ^F could be used to recall input backwards and forwards. + +

+ See: keybindings, + /bind, + sockets, + history, + /more + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/echo.html b/help/commands/echo.html new file mode 100644 index 0000000..cccf9b5 --- /dev/null +++ b/help/commands/echo.html @@ -0,0 +1,116 @@ +TinyFugue: echo() + + + +

echo()

+ +

+ Function usage: + +

+ ECHO(text [, attrs + [, inline [, dest]]])
+ +

+ Command usage: + +

+ /ECHO [-peA] [-aattrs] + [-w[world]] text
+ /_ECHO text
+


+ +

+ Displays text on the tfout stream + (i.e., the screen, usually), unless otherwise redirected by options. + +

+ Options and arguments: +

+
command: -aattrs +
function: attrs +
Echo text with the + attributes given by + attrs. +
command: -p +
function: inline = "on" or 1 +
Interpret "@{attr}" strings as commands to + set attributes inline. + "@@" strings are interpreted as "@". + "@{n}" or "@{x}" will + turn attributes off. + See also: decode_attr(). +
command: -wworld +
function: dest = "wworld" +
Echo text to the world + stream instead of the default + tfout stream + (see tfio). + If world is blank, the + current world is assumed. +
command: -e +
function: dest = "e" +
Echo text to the + tferr stream, instead of the default + tfout stream + (see tfio). +
function: dest = "o" +
Echo text to the + tfout stream (the default). +
command: -A +
function: dest = "a" +
Echo text to the + alert stream, instead of the default + tfout stream + (see tfio). +
+ +

+ 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 + options, + in case text begins with "-". + +

+ /_echo is more efficient than + /echo, so it is better for use in + heavily used macros that don't need all the options of + /echo. + +

+ When echoing to the tferr stream, + if no attrs are specified, text will be echoed with the "E" + attribute. + +

+ Example: + Both of these commands +

+  /test echo("@{u}Hello@{n}, world!", "BCred", 1)
+  /echo -aBCred -p @{u}Hello@{n}, world!
+
+ echo the following line, with "Hello" underlined, and the whole line bold red: +
+  Hello, world!
+
+ +

+ Echoed text is not matched against + triggers. + To do that, use /trigger. + +

+ See: attributes, + worlds, + fwrite(), + pad(), + tfio + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/edit.html b/help/commands/edit.html new file mode 100644 index 0000000..d077d82 --- /dev/null +++ b/help/commands/edit.html @@ -0,0 +1,129 @@ +TinyFugue: /edit + +

/edit

+ +

+ Usage: + +

+ /EDIT [options] [name] [= + body]
+


+ +

+ Edits a currently existing macro or the + trigger associated with a + macro. Options are described under + "def". The name of the + macro must be specified and cannot be + changed, with the following two exceptions: + +

+ 1. The macro name can be specified as + "#num" where num is the number of the + macro instead of the name. A + macro number can be determined by + listing the macro with + /list, or from the return value of + /def or + /edit. + +

+ 2. The macro name can be specified as + "$pattern" where pattern is the + trigger pattern. You may still + change the pattern if this is used to locate the + macro. + +

+ In either case, the name cannot be changed. It is possible to create a + macro which changes the name of a + macro, if it does not have any options + other than a name and a body: + +

+ /def rename = + /def + %2 = + $%1%; + /undef + %1 + + +

+ How this works is discussed in the help section + "expansion". + +

+ Also, the /edmac command will allow + you to edit an existing macro definition on the command line. + +

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

+ As of version 5.0, /edit + does not renumber the macro being edited. + +

+ Example: + +

+ + /def + -p2 + -t"* has arrived." + -ah + greet = :greets %1
+ /edit -c0 greet +
+ +

+ The second command will change the probability of /greet's + trigger from 100% to 0%, effectively + disabling it without actually + undefining it + (however, because it is not + fall-through, + it will still block other triggers of lower + priority). + +

+ See: macros, + triggers, + patterns, + evaluation, + attributes, + /def, + /list, + /edmac + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/escape.html b/help/commands/escape.html new file mode 100644 index 0000000..66ab3d8 --- /dev/null +++ b/help/commands/escape.html @@ -0,0 +1,56 @@ +TinyFugue: /escape + +

/escape

+ +

+ Function usage: +

+ ESCAPE(metacharacters, + string)
+ +

+ Command usage: +

+ /ESCAPE metacharacters + string
+


+ +

+ Echoes (in command form) or returns (in + function form) string, + with any metacharacters or '\' characters contained in string + preceded by a '\' character. + +

+ Example: + +

+ + /def blue = + /def + -aCblue + -t"$(/escape " %*)"
+ /blue * pages, "*" +
+ +

+ When the second command executes, it will + expand to: + +

+ + /def + -aCblue + -t"* pages, \"*\"" + + +

+ See: evaluation + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/eval.html b/help/commands/eval.html new file mode 100644 index 0000000..72954ec --- /dev/null +++ b/help/commands/eval.html @@ -0,0 +1,97 @@ +TinyFugue: /eval + + + + +

eval()

+ +

+ Function usage: + +

+ eval(text [, level])
+ +

+ Command usage: + +

+ /EVAL [-slevel] text
+ /NOT [-slevel] text
+


+ +

+ Text is evaluated + as a macro body: + it goes through substitution, + and is executed in a new scope. + The return value of eval() + and /eval + is that of the last command in text; + the return value of /not is the logical + negation of return value of the last command in text. + +

+ Positional parameters (%1, + etc) are inherited from the caller. + +

+ Options and arguments: +

+
command: -slevel +
function: level +
Expands the text as if + %{sub} were set + to level. By default, eval + expands the text as if + %{sub} were "full", + and echoes it if + %{mecho} + is not "off". +
+ +

+ Note: calling /eval with arguments from + a trigger could be dangerous. If not + written carefully, such a trigger + could allow anyone with access to the server to gain access to your tf or + shell account (if they have not been + /restricted). + +

+ Example:
+ command: /def showvar = + /eval + /echo + %{1} is + %%{%{1}}.
+ command: /showvar borg
+ output: borg is on.
+ +

+ "/Eval -s0" can be useful when the + argument is generated by an expansion. For example, if you defined + "/def do = + %{*}, 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 + "/def do = + /eval -s0 + %{*}", then + "/do /echo test" would execute "/echo test" as a tf command. + +

+ Note: Instead of /not, you should + normally use the "/!command" syntax to execute "/command" and + negate its result. /not evaluates its + arguments, which may be undesirable. + +

+ See: evaluation + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/exit.html b/help/commands/exit.html new file mode 100644 index 0000000..fa374ab --- /dev/null +++ b/help/commands/exit.html @@ -0,0 +1,44 @@ +TinyFugue: /exit + +

/exit

+ +

+ Usage: + +

+ /EXIT [n]
+


+ +

+ When called directly or indirectly during a + /load, + /exit aborts execution of all enclosing + macro bodies, and aborts n (default 1) enclosing + /load's. + +

+ When called outside of a /load, + /exit 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: +

+  /if (variable) /exit%; /endif
+  /set variable=1
+
+ ...where variable is the name of the file or some other unique name. + +

+ See: /load, + /return, + /break, + /loaded + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/export.html b/help/commands/export.html new file mode 100644 index 0000000..c6b4b8b --- /dev/null +++ b/help/commands/export.html @@ -0,0 +1,33 @@ +TinyFugue: /export + +

/export

+ +

+ Usage: + +

+ /EXPORT variable
+


+ +

+ If variable is a global + variable, it becomes an environment + variable. This makes variable + available to the environment for "/sh" and + "/quote !". + +

+ Local variables may not be exported. + +

+ See: environment, + variables, + /setenv + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/expr.html b/help/commands/expr.html new file mode 100644 index 0000000..b9c774a --- /dev/null +++ b/help/commands/expr.html @@ -0,0 +1,43 @@ +TinyFugue: /expr + +

/expr

+ +

+ Usage: + +

+ /EXPR + expression
+


+ +

+ Evaluates expression and + prints its value. This almost the same as + "/eval + /echo -- + $$[expression]", + except that + {#} and + positional parameters ({1}, etc) + are not defined. If you need to print a value of an expression that uses + positional parameters, use /result or + echo(). + +

+ Example: + +

+ command: /set x=4
+ command: /expr x * 2
+ output: 8
+ +

+ See: expressions + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/features.html b/help/commands/features.html new file mode 100644 index 0000000..6d66458 --- /dev/null +++ b/help/commands/features.html @@ -0,0 +1,54 @@ +TinyFugue: /features + +

/features

+ +

+ Usage: + +

+ /FEATURES [name]
+


+ +

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

+ With a name argument, /features + returns 0 or 1 if the feature name is disabled or enabled, + respectively, in this instance of tf. Case is insignificant in name. + +

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

+ Example: +

+  /if (!features("ssl")) /echo -e warning: socket is not secure%; /endif
+  
+ +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/fg.html b/help/commands/fg.html new file mode 100644 index 0000000..80a0d90 --- /dev/null +++ b/help/commands/fg.html @@ -0,0 +1,82 @@ +TinyFugue: /fg + + +

/fg

+ +

+ Usage: + +

+ /FG [-nsq<>l] [-cN] [world]
+ /BG
+


+ +

+ Bring the socket associated with + world into the + foreground. + The world must already be + connected with the /connect command. + Any lines that arrived while the socket + was in the background will be displayed or counted in the + more prompt, + unless the -q option is given. + +

+ /fg Options: +

+
-n +
no socket: put all + sockets in the + background. +
-s +
suppress error messages. +
-< +
previous socket in cycle. +
-> +
next socket in cycle. +
-cN +
Repeat the -< or -> option N times. +
-l +
ignored. +
-q +
quiet: jump to the last screenfull of text, instead of starting + at the same location you were at the last time the + socket was in the + foreground. +
+ +

+ If successful, /fg returns nonzero and + invokes the WORLD hook; + otherwise, it returns 0. + +

+ By default, /fg 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 + %textdiv. + +

+ /bg puts all + sockets in the + background, and is + equivalent to /fg -n. + By default, /bg is bound to the ^] + key (not ESC, which is ^[) + +

+ See: /connect, + worlds, + sockets, + %textdiv, + %textdiv_str. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/finger.html b/help/commands/finger.html new file mode 100644 index 0000000..e5ee69f --- /dev/null +++ b/help/commands/finger.html @@ -0,0 +1,34 @@ +TinyFugue: /finger + + +

/finger

+ +

+ Usage: + +

+ /REQUIRE finger.tf
+ +

+ /FINGER + [user][@host]
+


+ +

+ Like unix finger, /finger + reports information about user (default: all users) + on host (default: localhost), assuming that host + is running a standard finger daemon. + +

+ See: /require, + worlds, + sockets + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/for.html b/help/commands/for.html new file mode 100644 index 0000000..68b0365 --- /dev/null +++ b/help/commands/for.html @@ -0,0 +1,73 @@ +TinyFugue: /for + +

/for

+ +

+ Usage: + +

+ /FOR variable start + end commands
+


+ +

+ The variable will take on all numeric values between start + and end, inclusive. The commands will be executed once for + each of the values. If end is less then start, + commands will not be executed. + +

+ Commands are executed in a new + evaluation scope. + This means, for example, that a /for + called from a macro + must use "%%{...}" and "%%;" + instead of "%{...}" and "%;" + to have the substitutions + performed when the /for is + expanded instead of when the + calling macro is + expanded. + +

+ Example: + +

+ Given the definition +

+  /def countdown = /for 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 + substituted when /countdown is + expanded, and the "$$" is replaced + with "$". The resulting "$[10 - i]" is + substituted when + /for is + expanded. + If /countdown used + "$[...]" instead of "$$[...]" in the commands, it would be + substituted when /countdown is + expanded, and you would repeat + "10" 11 times. + If /countdown used + "%%{1}" or "{1}" instead of "%{1}" inside the + expression, it would not be + substituted until + /for was + expanded, so it would have the + value of /for's first argument + (the string "i", which has numeric value 0), and you would end up counting + down from 0 to -10. + +

+ See: /while + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/ftime.html b/help/commands/ftime.html new file mode 100644 index 0000000..3c640a7 --- /dev/null +++ b/help/commands/ftime.html @@ -0,0 +1,92 @@ +TinyFugue: ftime() + + +

ftime()

+ +

+ Function usage: + +

+ ftime([format + [, time]])
+


+ +

+Returns a string formatted from an absolute system time time +(obtained from +time() or +mktime()) +according to +format. +If time is omitted, it defaults to the current time. +If time is out of range, ftime() returns an empty string +and prints an error message. +If format is omitted, it defaults to + %time_format. +If format is "@", a raw system time +(e.g., seconds since 1970-01-01 00:00:00 UTC) will be displayed. +Otherwise, each "%" in format 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
local 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
local 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
local date representation +
%X
local 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 locale 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 format are copied unmodified to the result. + +

+The formats "%@" and "%s.%." do not give the same +results if time is negative. + +

+Example:
+command: /expr +ftime("Today is %a %b %d", +time())
+output: Today is Thu Jul 02
+ +

+ See: + functions, + time(), + locale, + %TZ, + %time_format, + %clock_format. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/gag.html b/help/commands/gag.html new file mode 100644 index 0000000..3edfa3a --- /dev/null +++ b/help/commands/gag.html @@ -0,0 +1,74 @@ +TinyFugue: /gag + +

/gag

+ +

+ Usage: + +

+ /GAG [pattern + [=response]]
+


+ +

+ Creates a macro which will + trigger on text matching + pattern and prevent it from + being displayed, optionally executing response. + +

+ With no arguments, /gag sets the flag + %{gag} to 1 (on). This + flag enables the gag + attribute on + triggers. It is on by default. + +

+ The matching style of the gag + pattern is determined by + %{matching}. The + priority of the + gag is determined + by %{gpri}. These + variables are examined when the gag + is defined, not when it is executed. + +

+ Gagged lines from + background worlds + will not set the activity indicator on the + status line + or call the activity + hook. + +

+ If /gag does not create a new + macro, it returns 0. Otherwise, it + returns the number of the new macro + (useful in /undefn and + /edit). + +

+ /gag pattern [= + response]
+ is equivalent to
+ /def + -ag + -t"pattern" + [= response].
+ +

+ See: triggers, + patterns, + evaluation, + %gag, + /def, + /nogag + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/getfile.html b/help/commands/getfile.html new file mode 100644 index 0000000..5228877 --- /dev/null +++ b/help/commands/getfile.html @@ -0,0 +1,50 @@ +TinyFugue: /getfile + + + + + +

/getfile

+ +

+ Usage: + +

+ /REQUIRE filexfer.tf
+ +

+ /GETFILE_MUCK file + [remote-file]
+ /GETFILE_LP file + [remote-file]
+ /GETFILE_UNIX file + [remote-file]
+


+ +

+ Downloads text remote-file from a MUCK, LP, or remote UNIX shell to + file on the local host. If remote-file is omitted, + file is used as the name on both ends. Do not use "wildcard" + globbing characters in the file names. + +

+ When using /getfile_UNIX, 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 + current world, it will be + closed by /getfile. + +

+ See: /putfile, + /log + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/grab.html b/help/commands/grab.html new file mode 100644 index 0000000..5de9394 --- /dev/null +++ b/help/commands/grab.html @@ -0,0 +1,44 @@ +TinyFugue: /grab + +

/grab

+ +

+ Usage: + +

+ /GRAB text
+


+ +

+ This command puts text into the input buffer. It is not really + useful from the normal command line, but is quite useful when called from a + macro to redefine + macros, or perhaps when bound to a key + to speed up part of a line (macros + allow you to largely do what this would allow, however). Any text already + in the input buffer is discarded. + +

+ Example: +

+  /def reedit = /grab /edit %1 = $%1
+
+ If you had previously done "/def + flail = :flails at his keyboard", the command "/reedit + flail" would place "/edit + flail = :flails at his keyboard" in the input buffer and allow you + to edit it using the editing keys. See + "evaluation" for details on how + macros like this work. + +

+ See: /input, + general + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/grep.html b/help/commands/grep.html new file mode 100644 index 0000000..133bf95 --- /dev/null +++ b/help/commands/grep.html @@ -0,0 +1,54 @@ +TinyFugue: /grep + + +

/grep

+ +

+ Usage: + +

+ /REQUIRE grep.tf
+ +

+ /FGREP pattern command
+ /GREP pattern command
+ /EGREP pattern command
+


+ +

+ Executes command and prints only the output that matches + pattern (which must not contain spaces). + /fgrep prints lines that + contain the string pattern; + /grep prints lines that match + the glob pattern; + /egrep prints lines that match + the regexp pattern. + +

+ Remember to use "*" at each end of pattern to make + /grep match lines that contain + a piece that matches + the glob pattern; + 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: + textutil.tf, + /require, + patterns, + expressions, + functions + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/help.html b/help/commands/help.html new file mode 100644 index 0000000..5337895 --- /dev/null +++ b/help/commands/help.html @@ -0,0 +1,77 @@ +TinyFugue: /help + + +

/help

+ +

+ Usage: + +

+ /HELP [topic]
+


+ +

+ 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 this format are references to other + topics. That is, a hyperlink in HTML, or something that can be used + as an argument to /help in tf. + +

+ 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 this format + (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., + "/def" and + "def" + both match the /def command topic), but sometime will + match a different topic (e.g., + "%MAIL" + matches the MAIL variable topic, but + "MAIL" + matches the MAIL hook topic). + There are also (sub)topics for various tf syntax constructions such as + "%{}" and + "$()". + +

+ For /help to work, + the variable + %TFHELP + 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, /help 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. + +

+ + The help documents are also available on the web at + http://tinyfugue.sourceforge.net/help/. + + +

+ See: index, + intro, + options + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/hilite.html b/help/commands/hilite.html new file mode 100644 index 0000000..cb1e59c --- /dev/null +++ b/help/commands/hilite.html @@ -0,0 +1,97 @@ +TinyFugue: /hilite + + +

/hilite

+ +

+ Usage: + +

+ /HILITE [pattern [= + response]]
+


+ +

+ Creates a macro which will + trigger on text matching + pattern and display it with the + hilite + attribute, optionally executing + response. + +

+ With no arguments, /hilite sets the + flag %{hilite} to 1 + (on). This flag enables hilite and + other attributes on + triggers. It is on by default. + +

+ The attribute(s) for + hilited text are determined by the + %{hiliteattr} + variable. The default is bold + (hiliteattr=B). + Colors are also available (e.g., + hiliteattr=Cgreen); + see "attributes" and + "color" for more information. + +

+ The matching style of the hilite + pattern is determined by + %{matching}. The + priority of the + hilite is + determined by %{hpri}. + These variables are examined when the + hilite is defined, not when it is + executed. + +

+ If /hilite does not create a new + macro, it returns 0. Otherwise, it + returns the number of the new macro + (useful in /undefn and + /edit). + +

+ The standard library also defines + /hilite_page and + /hilite_whisper which + hilite several different commonly + used page and whisper formats. + +

+ /hilite pattern + [=response]
+ is equivalent to
+ /def -ah -t"pattern" + [=response].
+ +

+ Example: +

+  /hilite {*} tried to kill you!
+
+ With the default settings, any line matching that pattern will appear bold. + +

+ To hilite messages generated by tf, see + hooks. + +

+ See: triggers, + patterns, + attributes, + /def, + /nohilite, + /partial + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/histsize.html b/help/commands/histsize.html new file mode 100644 index 0000000..75a8e09 --- /dev/null +++ b/help/commands/histsize.html @@ -0,0 +1,59 @@ +TinyFugue: /histsize + +

/histsize

+ +

+ Usage: + +

+ /HISTSIZE [-lig] [-w[world]] + [size]
+


+ +

+ Options: +

+
-l +
local history +
-i +
input history +
-g +
global history (default) +
-wworld +
world history +
+ +

+ If size is not given, + /histsize reports the maximum + number of lines that can be stored in the specified + history. + +

+ If size is given, /histsize + changes the maximum size of the specified + history to size. 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. + +

+ /histsize returns 0 for failure, + and the size of the history otherwise. + +

+ The %{histsize} + variable can be used to set the + default size of world histories before they are created. + +

+ See: history, + %histsize + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/hook.html b/help/commands/hook.html new file mode 100644 index 0000000..16e4d63 --- /dev/null +++ b/help/commands/hook.html @@ -0,0 +1,86 @@ +TinyFugue: /hook + +

/hook

+ +

+ Usage: + +

+ /HOOK event[ pattern] [= + body]
+ /HOOK [OFF|ON]
+


+ +

+ Creates a macro which will execute + body when event occurs and the event's arguments match the + optional pattern. The event may be a single event or a list + of events separated by '|'. If omitted, pattern will default to + "*". + +

+ /hook with no arguments displays the + state of the %{hook} + flag. /hook with an argument of ON or + OFF sets the %{hook} + flag, which determines if hooks will + execute their associated macros. + +

+ The matching style of the hook pattern + is determined by + %{matching}. This + variable is examined when the + hook is defined, not when it is executed. + +

+ Defining a hook will not replace an + existing hook on the same event, but + rather creates an additional hook + macro on the event. The + macro or + macros to be executed are chosen by + the normal priority rules. + +

+ See the section "hooks" for details on + hook operation, a list of event names, + and examples. + +

+ If /hook does not create a new + macro, it returns 0. Otherwise, it + returns the number of the new macro + (useful in /undefn and + /edit). + +

+ /hook + event[ pattern] [=response]
+ is equivalent to
+ /def + -h"event[ pattern]" + [=response].
+ +

+ Example: +

+  /hook MAIL = /sh mutt
+
+ will automatically invoke "mutt" to read mail when it arrives. + +

+ See: hooks, + macros, + evaluation, + patterns, + /def, + /unhook + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/if.html b/help/commands/if.html new file mode 100644 index 0000000..65ba36b --- /dev/null +++ b/help/commands/if.html @@ -0,0 +1,103 @@ +TinyFugue: /if + + + + + + +

/if

+ +

+ Usage: + +

+ /IF (expr) list [ + /ELSEIF (expr) list + ]... [ /ELSE list ] + /ENDIF
+ /IF list + /THEN list [ + /ELSEIF list + /THEN list ]... [ + /ELSE list ] + /ENDIF
+


+ +

+ List is any list of commands. The return value of a list is + the return value of the last command executed in the list. Note + that each list must be terminated by + "%;". + +

+ expr is any expression, and + must be surrounded by parentheses. + +

+ The list or expr following the + /IF is executed or evaluated. If the + result is non-zero, the next list is executed. Otherwise, this is + repeated for each /ELSEIF. If none of + the /IF or + /ELSEIF lists or exprs + return non-zero, the /ELSE list is + executed if there is one. + +

+ The return value of the + /IF.../ENDIF + statement is undefined. + +

+ /IF (expr) body%; + /ENDIF
+ is equivalent to
+ /IF + /TEST expr%; + /THEN body%; + /ENDIF
+ except that in the former, expr does not undergo macro body + substitution. + +

+ When /IF is used on the command line, + "%;" command separation is + done even if %sub=off. + Of course, full substitution will be done if + %sub=full. + +

+ If list is a server (mud) command, the condition being tested + is whether the command is sent successfully; that is, whether there is a + current socket. + 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 + "/if rob corpse%; /then ..." + will not have the effect you probably want. + To achieve that effect, you should define a + trigger + on each of the possible server responses, before you send your command. + +

+ Example: +

+  /if (TERM !~ "dumb") /visual on%; /endif
+
+ will do "/visual on" if your + %{TERM} is not "dumb". + +

+ See: evaluation, + expressions, + /test, + /def -E, + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/index.html b/help/commands/index.html new file mode 100644 index 0000000..1250315 --- /dev/null +++ b/help/commands/index.html @@ -0,0 +1,137 @@ +TinyFugue: index + + + +

index

+ +

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

+ + + +
+ + + + + + + + + +
+
+ See also: intro, + topics + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/input.html b/help/commands/input.html new file mode 100644 index 0000000..7fb4da9 --- /dev/null +++ b/help/commands/input.html @@ -0,0 +1,40 @@ +TinyFugue: /input + +

/input

+ +

+ Usage: + +

+ /INPUT text
+


+ +

+ Enters text into the input buffer as if it had been typed at the + keyboard, without deleting the current contents of the input buffer. + +

+ /Input is perhaps most useful in + combination with /bind, to create short + key sequences that expand to longer text. For example, if you have this + binding: + +

+ /bind ^[oj = + /input OliverJones + +

+ and then type "page ^[oj = snausages!" at the keyboard, it will appear in + the input window as "page OliverJones = snausages!". + +

+ See: /bind, + /grab + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/ismacro.html b/help/commands/ismacro.html new file mode 100644 index 0000000..9574db4 --- /dev/null +++ b/help/commands/ismacro.html @@ -0,0 +1,39 @@ +TinyFugue: /ismacro + +

/ismacro

+ +

+ Usage: + +

+ /ISMACRO macro-options
+


+ +

+ If macro-options matches one or more existing + macros, + /ismacro returns the number of the + last matching macro; otherwise, + /ismacro returns 0. + Macro-options may include any of the options accepted by + /list. If -m is not specified, + %{matching} is + used. + +

+ Example: +

+  /if /!ismacro -b"^X*"%; /then /bind ^X = /foobar%; /endif
+
+ +

+ See: /list, + macros + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/isvar.html b/help/commands/isvar.html new file mode 100644 index 0000000..2379b52 --- /dev/null +++ b/help/commands/isvar.html @@ -0,0 +1,32 @@ +TinyFugue: /isvar + +

/isvar

+ +

+ Usage: + +

+ /ISVAR name
+


+ +

+ Returns 1 if variable name + is set, 0 otherwise. + +

+ Example: +

+  /if (!isvar('LANG')) /set LANG=en_US%; /endif
+
+ +

+ See: /listvar, + variables + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/kill.html b/help/commands/kill.html new file mode 100644 index 0000000..4374338 --- /dev/null +++ b/help/commands/kill.html @@ -0,0 +1,42 @@ +TinyFugue: /kill + +

/kill

+ +

+ Usage: + +

+ /KILL pid...
+


+ +

+ For each pid given, + /kill terminates the corresponding + process + (/quote or + /repeat command). + The pid of a process + can be determined from the return + value of the /quote or + /repeat, the + /ps command, or a PROCESS + hook. + +

+ Bug: /kill on a pending + /quote ! will block until the + shell process exits. The block can be broken with an interrupt. + +

+ See: processes, + /quote, + /repeat, + /ps + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/lcd.html b/help/commands/lcd.html new file mode 100644 index 0000000..2b12d3d --- /dev/null +++ b/help/commands/lcd.html @@ -0,0 +1,38 @@ +TinyFugue: /lcd + + + +

/lcd

+ +

+ Usage: + +

+ /LCD [dir]
+ /CD [dir]
+ /PWD
+


+ +

+ /lcd and + /cd change to a new working directory. + If dir is omitted with /lcd, the + current directory is displayed (if supported on your system). If + dir is omitted with /cd, + %{HOME} is assumed. + +

+ The dir name is expanded as described under + "filenames". + +

+ /pwd displays the current working + directory (if supported on your system). + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/let.html b/help/commands/let.html new file mode 100644 index 0000000..2e89220 --- /dev/null +++ b/help/commands/let.html @@ -0,0 +1,35 @@ +TinyFugue: /let + +

/let

+ +

+ Usage: + +

+ /LET name=value
+ /LET name value
+


+ +

+ Assigns value to variable + name in the current local scope. + Can only be used during macro + expansion. The + variable will be + destroyed when the scope. + in which it was created exits. + +

+ Note to lisp users: this is nothing like lisp's let. + +

+ See: /set, + variables + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/limit.html b/help/commands/limit.html new file mode 100644 index 0000000..1852c1a --- /dev/null +++ b/help/commands/limit.html @@ -0,0 +1,112 @@ +TinyFugue: /limit + + + +

/limit

+ +

+ Usage: + +

+ /LIMIT [-v] + [-a] [-mstyle] + + [pattern]
+ /RELIMIT
+ /UNLIMIT
+


+ +

+ /Limit redraws the window, showing only lines that match + pattern. + It is then possible to scroll forward and backward within the "limited" + window. + The limit affects only the current screen, and stays in effect until + /unlimit is called. + +

+ /Limit options: +

+
-v +
show only lines that don't match + pattern +
-a +
show only lines that have attributes +
-mstyle +
use matching style + (simple, + glob, or + regexp), + instead of the default + %{matching}. + +
+ +

+ +

+ If pattern + is given, only lines in the given range that match + pattern + will be recalled. + The matching style is determined by the -m option if given, + %{matching} + otherwise. + By default, the @more status field + does not count lines that are omitted by + /limit. + +

+ With no options or arguments, /limit + returns 1 if a limit is in effect, 0 if not. + +

+ /unlimit disables the + /limit so all lines are displayed. + +

+ During /limit, + scrolling to any point, including the bottom, results in a + More prompt that shows the number of lines (possibly 0) below the status + line. In this state, + /unlimit + will leave the bottom visible line where it + is, and redraw the unlimited lines above it. + Thus, you can use /limit to find + a line you are interested in, use the scrolling keys to position that + line at the bottom of the window, then + /unlimit to see the context of that + line. + But if you attempt to scroll past the bottom during + /limit, + the More prompt changes to "LIMIT ON"; in + this state, + /unlimit will redraw with the + previously invisible last line at the bottom of the screen. + + +

+ /relimit repeats the last + /limit. + +

+ The default keybinding ^[L toggles the last limit off and on. + +

+ See: + /recall + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/list.html b/help/commands/list.html new file mode 100644 index 0000000..4723540 --- /dev/null +++ b/help/commands/list.html @@ -0,0 +1,159 @@ +TinyFugue: /list + + + + + + + +

/list

+ +

+ Usage: + +

+ /LIST [-s] [macro-options] + [name] [= body]
+


+ +

+ Lists macros having all the specified + options. Except for "-s", each option is compared against a + macro's option, and the + macro selected only if the options + match. Omitted options are "don't care", and will not be used in the + comparison. Thus, with no arguments, + /list will list all + non-invisible + macros. + +

+ + Options: +

+
-s +
List macros in short + format. +
-S +
Sort macros by name. +
-mmatching +
Determines matching style used for comparison of string fields + (trigger, keybinding, keyname, + hook, worldtype, name, and + body). This is not compared against the -m options of + macros. If omitted, the style + is determined by + %{matching}. +
-tpattern +
-bpattern +
-Bpattern +
-Epattern +
-Tpattern +
Matches macros with + a corresponding /def option + whose option-argument matches pattern. + pattern. An option with no pattern matches all + macros that have that option, + regardless of the value of the option-argument. + A "{}" glob pattern or + "^$" regexp + can be used to match + macros that don't + have that option, +
-h["event[ pattern]"] +
Matches macros with + hooks matching event + and pattern. + "-h" by itself matches all non-empty + hooks; "-h0" matches only + macros without + hooks. +
-aattrs +
Matches macros having one + or more of the display + attributes in attrs. +
-Ppartattrs +
Matches macros having a + -Ppart + with one or more of the display + attributes in attrs. +
-i +
Matches invisible macros + as well as normal macros. +
-I +
Matches only invisible + macros. +
name +
A pattern that macro names + must match. The + glob + pattern "{}" or + regexp + "^$" will match only + macros without names. + If name starts with "#", it is compared against macro + numbers, instead of as a pattern against macro names. +
= body +
body is a pattern that macro bodies must match. The + glob pattern "{}", or the + regexp "^$" or the + simple pattern + "" will match + bodyless macros only. +
+ + +

+ Other options allowed by /def may + be used with /list, and are compared + directly to macros. + +

+ The return value of /list is the number + of the last macro listed, or 0 if no + macros were listed (because of error or + none matched the specified options). + +

+ The standard library also defines the + macros + /listbind, + /listdef, + /listgag, + /listhilite, + /listfullhilite, + /listpartial, + /listhook, and + /listtrig, which list + macros of the appropriate type. + +

+ Example: +

+    /list -mregexp -n0 -t -aurh ^foo =
+
+ will list all macros whose names begin + with "foo"; have a trigger; are not + multi-shots; have any of the underline, reverse, or + hilite + attributes; and have an empty body. + +

+ To list functions for named keys, try + "/list -i key_*". + +

+ See: macros, + triggers, + patterns, + attributes, + library, + /def + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/list_commands.html b/help/commands/list_commands.html new file mode 100644 index 0000000..d40580d --- /dev/null +++ b/help/commands/list_commands.html @@ -0,0 +1,90 @@ +TinyFugue: list commands + + + + + + + + + + + + + + + + +

list commands

+ +

+ Usage: + +

+ /REQUIRE lisp.tf
+


+ +

+ These commands operate on lists of words, and are similar to those in lisp. + They all give their results with /echo, + and are intended to be used in + $(...) command substitution + to capture the result. +

+ +

+

/car list +
Echo first word. (Same as + /first). +
/cdr list +
Echo all words after first. (Same as + /rest). +
/cadr list +
Echo second word. +
/cddr list +
Echo all words after second. +
/caddr list +
Echo third word. +
/cdddr list +
Echo all words after third. + +

+

/length list +
Echo number of words in list. + +

+

/reverse list +
Reverse the order of the words in list. + +

+

/mapcar cmd + list +
Execute "cmd word" for each word in + list. +
/maplist cmd + list +
Execute "cmd list" repeatedly, removing the + first word from list each time, until list is empty. + +

+

/remove word + list +
Echo list with all occurrences of word removed. + +

+

/unique list +
Remove all duplicate words from list. Note: + /unique is very slow + on long lists. +
+ +

+ See: /nth + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/listsockets.html b/help/commands/listsockets.html new file mode 100644 index 0000000..ecfe128 --- /dev/null +++ b/help/commands/listsockets.html @@ -0,0 +1,119 @@ +TinyFugue: /listsockets + +

/listsockets

+ +

+ Usage: + +

+ /LISTSOCKETS + [-sn] [-mstyle] [-Sfield] [-Ttype] [name]
+


+ + Lists the sockets to which TinyFugue + is connected. + +

+ Options and arguments: +

+
-s
short form, list only world names +
-n
print host and port in numeric form +
-mstyle
Use style for + pattern matching + in other options + (default: %{matching}). + +
-Sfield
Sort sockets by field. Field + may be "name", "type", "character", + "host", "port", "lines", "idle", + or "-" (don't sort; this is the default). + Only the first character is necessary. +
-Ttype
list only worlds with a type matching the + pattern + type. +
name
list only worlds with a name matching the + pattern + name. +
+ +

+ The output will look something like this (unless the -s option is given): +

+     LINES IDLE TYPE      NAME            HOST                       PORT
+   10+  48  13h tiny.muck Cave            tcp.com                    2283
+*  foregnd   1m tiny.mush DeepSeas        muds.okstate.edu           6250
+         0   7s telnet    whitehouse.gov, whitehouse.gov             smtp
+ ?       0  15s tiny      SlowMUD         slow.machine.com           4201
+
+ The columns and their meanings are: +
+
unlabeled first column +
"*" marks the + current socket. +
unlabeled second column +
the state of the socket is + one of: +
+
!
dead +
?
hostname lookup or network connection is incomplete +
C/c
an established normal connection +
S/s
an established connection currently in telnet + subnegotiation +
X/x
an established SSL + connection +
O
an open + connectionless + socket +
+ A lowercase state character indicates the connection is using + MCCP. +
unlabeled third column +
"P" if the connection is + proxied +
LINES +
for a background + socket, + the number of old (seen) and new (unseen) lines past the + bottom of the socket's window + (ignoring any limit + that may be in effect on that window); + or, "foregnd" for a + foreground + socket. +
IDLE +
how long since the last text was received on the + socket. +
TYPE +
the type of the world (set with + /addworld -T). +
NAME +
the name of the world associated with the + socket. +
HOST +
the host to which the + socket is connected. +
PORT +
the port to which the + socket is connected. +
+ +

+ The return value of + /listsockets + is the number of sockets listed. + +

+ See: sockets, + %background, + /connect, + /fg, + nactive(), + idle() + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/liststreams.html b/help/commands/liststreams.html new file mode 100644 index 0000000..205ff0f --- /dev/null +++ b/help/commands/liststreams.html @@ -0,0 +1,53 @@ +TinyFugue: /liststreams + +

/liststreams

+ +

+ Usage: + +

+ /LISTSTREAMS
+


+ + Lists tfio streams opened by + tfopen(). + The tfin, + tfout, and + tferr + streams + are not included. + +

+ The columns and their meanings are: +

+
HANDLE +
The handle returned by + tfopen(). +
MODE +
The mode argument given to + tfopen(). +
FLUSH +
Whether automatic flushing is enabled. + See tfflush(). +
NAME +
The name argument, if any, given to + tfopen(). + Files of mode "q" do not need a name, but you may wish to give + them one anyway so it appears here. +
+ +

+ The return value of + /liststreams + is the number of open streams listed. + +

+ See: tfio + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/listvar.html b/help/commands/listvar.html new file mode 100644 index 0000000..6625328 --- /dev/null +++ b/help/commands/listvar.html @@ -0,0 +1,57 @@ +TinyFugue: /listvar + +

/listvar

+ +

+ Usage: + +

+ /LISTVAR [-mmatching] [-gxsv] [name [value]]
+


+ +

+ Options: +

+
-mmatching +
Determines matching style used for comparison of + name and value. + If omitted, the style is determined by + %{matching}. +
-g +
List only global (unexported) variables. +
-x +
List only variables that are exported to the environment. +
-s +
Short format: list variable names only. +
-v +
List values only. +
+ + +

+ /Listvar lists values of + variables whose name and value + match name and value according to matching, + sorted by name. + If neither -g nor -x is given, global and + environment variables are listed. + +

+ The return value of /listvar + is the number of variables listed. + +

+ See: variables, + /set, + /setenv, + /export, + /let, + /unset + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/listworlds.html b/help/commands/listworlds.html new file mode 100644 index 0000000..7212d82 --- /dev/null +++ b/help/commands/listworlds.html @@ -0,0 +1,54 @@ +TinyFugue: /listworlds + +

/listworlds

+ +

+ Usage: + +

+ /LISTWORLDS [-cus] + [-mstyle] [-Sfield] [-Ttype] [name]
+


+ +

+ Lists world definitions. + +

+ Options and arguments: +

+
-mstyle
Use style for + pattern matching + of type and name patterns. + (default: %{matching}). +
-s
Display short format (world names only). +
-c
Display command format (including passwords). +
-Sfield
Sort worlds by field. Field + may be "name" (the default), "type", "character", + "host", "port", or "-" (don't sort). + Only the first character is necessary. +
-u
Include unnamed temporary worlds in the listing. +
-Ttype
List only worlds with a type matching the + pattern + type. +
name
List only worlds with a name matching the + pattern + name. +
+ +

+ If neither -s nor -c are given, a table format is used, + and passwords are not shown. + The return value of /listworlds + is the number of worlds listed. + +

+ See: worlds, + patterns + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/load.html b/help/commands/load.html new file mode 100644 index 0000000..aa09d93 --- /dev/null +++ b/help/commands/load.html @@ -0,0 +1,129 @@ +TinyFugue: /load + + + + + + + + + + +

/load

+ +

+ Usage: + +

+ /LOAD [-q] file
+ /REQUIRE [-q] file
+
+ /LOADED token
+


+ +

+ /Load and + /require + both read and execute commands from file. + They are identical, except that if file calls + /loaded and has + already been read once, /require + will not read it again (but the LOAD + message/hook + will still be displayed/called). + +

+ "/Loaded token" + should be the first command in a file that is designed to be loaded only + once with /require. + Token should be a string that does not contain space or + glob metacharacters, and + is different than the token used by any other + /loaded call. + The file's full name is usually a good choice for token. + +

+ Options: +

+
-q +
Do not echo the "% Loading commands from file" message + in this /load call or any + /load calls in file. + (but the LOAD hook will still + be called). +
+ +

+ The file may contain any legal TinyFugue commands. Blank lines and lines + beginning with ';' or '#' are ignored. Any leading whitespace on a line is + stripped. Any line ending in '\' will have the following line joined to + it (after leading spaces are stripped). A '%' preceding a '\' eliminates + its special meaning. + +

+ The file name is expanded as described under + "filenames". + +

+ If the + COMPRESS_SUFFIX and + COMPRESS_READ + macros are defined, the file will be + automatically uncompressed if needed. + +

+ If the expanded filename is not an absolute path name, TF will search first + in the current directory (which can be changed with + /lcd), and then in the list of + directories named by + %{TFPATH}. + If %{TFPATH} is + blank or unset, the single directory named by + %{TFLIBDIR} is used. + +

+ A /load may be aborted early with + the /exit command in the file. + +

+ Loaded files may be given any name, but names ending in ".tf" are + recommended. + +

+ /Load and + /require return 1 if successful + (for /require, this includes not + needing to read the file), or 0 if not successful. + /Loaded does not return if the file + that calls it has already been loaded. + +

+ The standard macro library also defines + the commands /loaddef, + /loadbind, + /loadhilite, + /loadgag, + /loadtrig, + /loadhook, and + /loadworld. + These macros will load from a + default file + if no file is specified. + +

+ See: macros, + library, + /exit, + /def, + /save, + /lcd, + filenames, + compression + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/localecho.html b/help/commands/localecho.html new file mode 100644 index 0000000..4efeb5d --- /dev/null +++ b/help/commands/localecho.html @@ -0,0 +1,68 @@ +TinyFugue: /localecho + + + +

/localecho

+ +

+ Usage: + +

+ /LOCALECHO [ON|OFF]
+


+ +

+ /Localecho with no arguments + returns 1 if local echoing is enabled for the + current socket, 0 otherwise. + TF echoes its input by default, unless the server has negotiated otherwise. + +

+ /Localecho with an argument + attempts to enable or disable echoing for the + current socket. + If the server is not known to support TELNET protocol, + "/localecho [ON|OFF]" does nothing, + and returns 0. + ON tells the server DONT ECHO; if the server acknowledges (as it must + according to TELNET protocol), tf will echo its own input. + OFF tells the server to DO ECHO; if the server acknowledges, + tf will not echo its own input, expecting the server to do it. + The actual change of state takes place after the server agrees, which + may be delayed by network latency ("netlag"). + +

+ Note that tf does not transmit input until a newline is pressed, and + the server can not echo it until it is received; so, with + /localecho off, + your typing will not be visible until you hit return, at which + time the server may echo back the entire line. + +

+ Some mud servers use the ECHO option to disable local echo during password + entry. Telnet servers, however, try to disable local echo for the entire + session, which would interfere with many useful tf features. Hooks + defined in the standard library use + /localecho to + override the telnet server automatically. + +

+ /Localecho is intended to be + called by library macros, and should not need to be called by the user. + /Localecho obsoletes %{always_echo}. + +

+ The TELNET ECHO option is defined in RFC 857. + +

+ See: prompts, + %telopt, + /telnet + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/log.html b/help/commands/log.html new file mode 100644 index 0000000..4319faf --- /dev/null +++ b/help/commands/log.html @@ -0,0 +1,115 @@ +TinyFugue: /log + +

/log

+ +

+ Usage: + +

+ /LOG [-ligw[world]] + [OFF|ON|file]
+


+ +

+ Enables or disables logging, or lists currently open log files. + An [-ligw] option specifies which + history is used (only one can be used). + The [OFF|ON|file] argument specifies what action is taken on that + history. + +

+ Options: +

+
-wworld +
Output from world only. +
-w +
Output from the + current world. +
-l +
Local output (i.e., output generated by TF). +
-i +
Keyboard input. +
-g +
Global output (all worlds and local TF output). +
+ +

+ Arguments: +

+
OFF +
Disable specified log, or all logs if unspecified. +
ON +
Log to + ${LOGFILE}; + -g is assumed if -ligw not given. +
file +
Log to file; -g is assumed if -ligw not given. +
(none) +
With no option, lists all open logs. +
(none) +
With an -ligw option, same as "ON". +
+ +

+ When logging is enabled for a history, + lines that are normally recorded in that + history are also appended + to the log file (unless the line has the "L" nolog + attribute). + The previously existing contents of the file, if any, + are not affected. + +

+ It is possible to have multiple log files open simultaneously. It is also + possible to have several types of output go to the same log file, by using + several /log commands. For example, +

+  /log -i tt.log
+  /log -wTT tt.log
+  /log -g on
+
+ will send input from the keyboard and output from the world TT to the file + "tt.log", and also send all (global) output to the file named by the + LOGFILE macro. + +

+ This example logs the current + world's output to a file whose name contains the world's name and today's + date: +

+  /eval /log -w ${world_name}.$[ftime("%F")]
+  
+ +

+ The functions of the /logme command in + older versions of TF can be performed with + /log -i. + +

+ Wrapping will be done in the log file only if the + %{wraplog} + variable is "on". + +

+ Logging is disabled by default. The default value of + ${LOGFILE} is + "tiny.log". + +

+ Note: the natural logarithm function was renamed from log() to ln() + in version 5.0, to avoid confusion with /log. + +

+ See: + %wraplog, + history, + nlog() + fwrite() + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/logme.html b/help/commands/logme.html new file mode 100644 index 0000000..36c89c4 --- /dev/null +++ b/help/commands/logme.html @@ -0,0 +1,14 @@ +TinyFugue: /logme + +

/logme

+ +

+ Obsolete. See "log". + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/map.html b/help/commands/map.html new file mode 100644 index 0000000..e9e35ed --- /dev/null +++ b/help/commands/map.html @@ -0,0 +1,96 @@ +TinyFugue: mapping + + + + + + + + + +

mapping

+ +

+ Usage: + +

+ /REQUIRE map.tf
+ +

+ /MARK dir
+ /UNMARK
+ /PATH
+ /RETURN
+ /MAP
+ /UNPATH
+ /SAVEPATH name
+ /DOPATH path
+


+ +

+ These commands, similar to those in tintin, help keep track of sequences + of directions between two locations on a mud. When mapping is enabled + with /mark, + all mud movement commands (n, s, e, w, ne, sw, nw, se, u, d) that you + type are recorded in the "current path". + +

+ /mark + clears the current path and starts recording your movement. + +

+ /unmark + disables map recording (but does not clear the current path). + +

+ /path + prints the current recorded path. + +

+ /revert + "undoes" the last movement by + deleting it from the path and executing the opposite movement command. + (This was called "/return" prior to version 4.0). + +

+ /map + adds dir to the current path as if you had actually gone + in that direction. + +

+ /unpath + deletes the last movement from the path (but does not move you to your + previous position) + +

+ /savepath + defines a + macro + named name that will execute the movements in + the currently defined path. (To save this + macro to a file, use + "/save + [-a] file name"). + +

+ /dopath + executes a path. Path must be a space-separated list + of movement commands with optional repeat counts. For example, + "/dopath 10 n e d 2 w" + will execute "n" 10 times, "e" once, "d" once, and "w" twice. + +

+ See: + /require, + speedwalk + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + + + diff --git a/help/commands/more.html b/help/commands/more.html new file mode 100644 index 0000000..dd38971 --- /dev/null +++ b/help/commands/more.html @@ -0,0 +1,74 @@ +TinyFugue: /more + + + + + +

/more

+ +

+ Usage: + +

+ /MORE [OFF|ON]
+


+ +

+ Sets the value of the + %{more} flag. If the + %{more} flag is ON when + the screen or output window fills up, output will stop, and a + "More" prompt will be displayed. + With the default keybindings, + TAB will scroll one screenfull, + PgDn and PgUp will scroll a half screen forward or backward, + ^[^N and ^[^P will scroll one line forward or backward, + and ^[j will Jump to the last screenfull. + +

+ Regardless of the setting of the + %more flag, you can + use "/dokey pause" (^S) + at any time to pause the screen immediately, or use any of the scrolling + commands to scroll backward and forward. After doing so, the "more" + prompt will remain until you reach the bottom line again; after that point, + newly displayed lines will obey the + %more flag normally. + +

+ In visual mode, + with the default status bar settings, + the More prompt displays the number of old lines (i.e., how far you have + scrolled backwards) and the number of new lines you haven't had a chance to + see yet (i.e. lines that arrived since the More prompt first appeared). + If you have not scrolled backwards, only the count of new lines is shown, + so the More prompt looks the same as it would have in version 4.0. + If either count would not fit in the space allotted to it in the More prompt, + they may be displayed in units of thousands (e.g., "17523" would be shown as + "17k"). + +

+ Each socket + and open world world + has its own window with its own "more" state. + +

+ If your terminal can't scroll in + visual mode, TF will start over at the top + of the output window instead. + +

+ See: /dokey, + visual, + %more, + morescroll(), + moresize(), + status_fields + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/nogag.html b/help/commands/nogag.html new file mode 100644 index 0000000..159cce8 --- /dev/null +++ b/help/commands/nogag.html @@ -0,0 +1,38 @@ +TinyFugue: /nogag + +

/nogag

+ +

+ Usage: + +

+ /NOGAG [pattern]
+


+ +

+ Eliminates a macro that is + triggered by pattern and has + the gag + attribute. + /nogag with no arguments turns off the + flag %{gag}, disabling + all gag + attributes. Pattern is + matched against existing patterns using simple comparison. + +

+ The flag %{gag} defaults + to 1 (on). + +

+ See: triggers, + /gag, + %gag + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/nohilite.html b/help/commands/nohilite.html new file mode 100644 index 0000000..d484285 --- /dev/null +++ b/help/commands/nohilite.html @@ -0,0 +1,43 @@ +TinyFugue: /nohilite + +

/nohilite

+ +

+ Usage: + +

+ /NOHILITE [pattern]
+


+ +

+ With a pattern argument, + /nohilite + undefines a macro that is + triggered by pattern and has + the hilite + attribute. + Pattern is + matched against existing patterns using simple comparison. + +

+ With no argument, + /nohilite turns off the flag + %{hilite}, disabling + all display attributes. + +

+ The flag %{hilite} + defaults to 1 (on). + +

+ See: triggers, + /hilite, + %hilite + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/nth.html b/help/commands/nth.html new file mode 100644 index 0000000..d58fc2f --- /dev/null +++ b/help/commands/nth.html @@ -0,0 +1,42 @@ +TinyFugue: /nth + + + +

/nth

+ +

+ Usage: + +

+ /FIRST text
+ /LAST text
+ /NTH n text
+


+ +

+ Echoes the first, last, or nth word from text. + `/first text' is equivalent to + `/nth 1 text'. + +

+ These commands can be useful in command substitutions. For example, to + make "ctrl-O 1" input the first word of the most recent mud output, you could + do this: + +

+ /bind ^O1 = + /input + $(/first + $(/recall 1)) + +

+ See: parameters, + command substitution + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/partial.html b/help/commands/partial.html new file mode 100644 index 0000000..c33656e --- /dev/null +++ b/help/commands/partial.html @@ -0,0 +1,64 @@ +TinyFugue: /partial + +

/partial

+ +

+ Usage: + +

+ /PARTIAL regexp
+


+ +

+ Creates a macro which will + hilite the part of a line + containing text matched by the + regular expression + regexp. Remember that + regular expressions + are case sensitive. The new + macro is a + fall-thru, so multiple + /partials (and other + triggers) can match the same text. + +

+ The attribute(s) for + hilited text are determined by the + %{hiliteattr} + variable. The default is bold + (hiliteattr=B). + Colors are also available. + +

+ For example, "/partial + [Hh]awkeye" will hilite any + occurrence of "Hawkeye" or "hawkeye". + +

+ Unlike version 3.2, a partial + hilite will be applied to every + match on a line, not just the first match. + +

+ /partial + regexp
+ is equivalent to
+ /def + -Ph + -F + -tregexp
+ +

+ See: attributes, + patterns, + /hilite, + /def + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/paste.html b/help/commands/paste.html new file mode 100644 index 0000000..b0df221 --- /dev/null +++ b/help/commands/paste.html @@ -0,0 +1,92 @@ +TinyFugue: /paste + + + + +

/paste

+ +

+ Usage: + +

+ /PASTE [-pnx] [prefix]
+ /ENDPASTE
+


+ +

+ After executing /paste, every line of + input (including lines that begin with "/") will have prefix + prepended to it and then get sent to the + current socket. + If prefix is omitted and -n is not specified, the + prefix defaults to the value of %paste_prefix; + if %paste_prefix is empty or unset, it defaults to + ":|". + Typing "/endpaste" or "." on a line + by itself ends the pasting; "/abort" on a line by itself aborts the pasting. + /Paste can be very useful when + using the cut-and-paste mechanism of many windowing systems. + +

+ Options: +

+
-p +
"paragraph mode": adjacent non-blank lines are joined, + and leading spaces are stripped (this is particularly useful + when pasting text cut from a web browser or a window of different + width). +
-n +
Don't prepend any prefix. +
-x +
After prepending the prefix (if any), execute the resulting + line as a command + (without substitution) + instead of sending it. +
-wworld +
Send the text to world. +
-eend +
End when the user types end (default: "/endpaste"). + With or without this option, "." will always work. +
-aabort +
Abort when the user types abort (default: "/abort"). + With or without this option, interrupt (^C) will always work. +
-q +
quiet: do not print "Entering paste mode" message. +
-s +
strip trailing spaces from each pasted line +
-h +
invoke matching SEND hooks + for each line sent by /paste. +
+ +

+ Note that /endpaste is not actually + a command, but a "magic cookie" recognized by + /paste. + "/Endpaste", ".", and SIGINT (^C) + are the only ways to end /paste. + +

+ Lines sent by /paste will + invoke matching SEND hooks. + +

+ Examples: +

+
Prepare to paste text from a web page to a mud: +
/paste -p +
Prepare to paste a bunch of lines to be recorded in your input + history: +
/paste -x + /recordline -i - +
+

+ See: /quote + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/prompt.html b/help/commands/prompt.html new file mode 100644 index 0000000..0b76e5d --- /dev/null +++ b/help/commands/prompt.html @@ -0,0 +1,59 @@ +TinyFugue: /prompt + +

/prompt

+ +

+ Function usage: + +

+ PROMPT(text)
+ +

+ Command usage: + +

+ /PROMPT [-aattrs] [-p] text
+


+ +

+ Sets the prompt for the + current + socket to text, + replacing any existing prompt. + +

+ Command options: +

+
-aattrs +
Apply the attributes + given by attrs to text. +
-p +
Interpret "@{attr}" strings within text + as commands to set attributes + inline. + See decode_attr(). +
+ +

+ /prompt is most useful when called + from a PROMPT hook, like this: +

+    /def -h"PROMPT *> " catch_prompt = /test prompt({*})
+
+ Then, any text that ends in ">" without a newline will be made the prompt. + +

+ For a more sophisticated example, see + "status line". + +

+ See: prompts, + hooks (PROMPT) + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/ps.html b/help/commands/ps.html new file mode 100644 index 0000000..48ce2d4 --- /dev/null +++ b/help/commands/ps.html @@ -0,0 +1,67 @@ +TinyFugue: /ps + +

/ps

+ +

+ Usage: + +

+ /PS [-srq] [-wworld] [pid]
+


+ +

+ Options: +

+
-s
short form, lists only PIDs. +
-r
list /repeats only. +
-q
list /quotes only. +
-w[world]
list only processes for world. +
+ +

+ Lists information about + process pid, + or all currently running /quote and + /repeat + processes: + +

+

+
PID +
unique process + identification number. +
NEXT +
time remaining until next execution of + process, or "pending" if + process + is waiting for output from a shell command. +
T +
the type of the command: + "q" for
quote or + "r" for repeat. +
D +
disposition of + /quote lines: + "e" for echo, "s" for send, or "x" for exec. +
WORLD +
world to which output is sent, if not the + current world. +
PTIME +
delay between executions. +
COUNT +
number of /repeat + executions remaining. +
COMMAND +
the command to be executed. +
+ +

+ See: processes + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/purge.html b/help/commands/purge.html new file mode 100644 index 0000000..d2b3679 --- /dev/null +++ b/help/commands/purge.html @@ -0,0 +1,62 @@ +TinyFugue: /purge + + + + + + + + +

/purge

+ +

+ Usage: + +

+ /PURGE [macro-options] + [name] [= body]
+


+ +

+ Removes all macros matching the + specified restrictions. The + macro-options + are the same as those in + the /list command; see + "/list" for details. Invisible + macros will not be purged unless "-i" + is specified. Remember that "macros" includes keybindings, + hilites, + gags, + triggers, and + hooks. + +

+ The standard macro library also defines + the commands /purgedef, + /purgebind, + /purgehilite, + /purgegag, + /purgetrig, + /purgedeft, and + /purgehook, which purge + macros of the appropriate type. These + always use glob matching. + +

+ See: macros, + triggers, + patterns, + attributes, + library, + /def, + /list, + /purgeworld + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/purgeworld.html b/help/commands/purgeworld.html new file mode 100644 index 0000000..2edb83f --- /dev/null +++ b/help/commands/purgeworld.html @@ -0,0 +1,46 @@ +TinyFugue: /purgeworld + +

/purgeworld

+ +

+ Usage: + +

+ /PURGEWORLD + [-mstyle] [-Ttype] [name]
+


+ +

+ Removes world definitions. + +

+ Options and arguments: +

+
-mstyle
Use style for + pattern matching + of type and name patterns. + (default: %{matching}). +
-Ttype
Remove only worlds with a type matching the + pattern + type. +
name
Remove only worlds with a name matching the + pattern + name. +
+ +

+ The return value of /purgeworld + is the number of world definitions that were removed. + +

+ See: worlds, + /listworlds, + patterns + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/putfile.html b/help/commands/putfile.html new file mode 100644 index 0000000..801228b --- /dev/null +++ b/help/commands/putfile.html @@ -0,0 +1,48 @@ +TinyFugue: /putfile + + + + + +

/putfile

+ +

+ Usage: + +

+ /REQUIRE filexfer.tf
+ +

+ /PUTFILE_MUCK file + [remote-file]
+ /PUTFILE_LP file + [remote-file]
+ /PUTFILE_UNIX file + [remote-file]
+


+ +

+ Uploads text file from the local system to remote-file on a + MUCK, LP, or UNIX server, using an editor on the remote system. If + remote-file is omitted, file is used as the name of the + remote file. + +

+ /Putfile_LP assumes the LPmud has + an "ed" editor similar to that in UNIX. + +

+ For backward compatibility, /putfile + is the same as /putfile_MUCK. + +

+ See: /getfile, + /quote + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/quit.html b/help/commands/quit.html new file mode 100644 index 0000000..e0edbc9 --- /dev/null +++ b/help/commands/quit.html @@ -0,0 +1,51 @@ +TinyFugue: /quit + +

/quit

+ +

+ Usage: + +

+ /QUIT [-y]
+


+ +

+ Exits TF. If TF is + interactive, + and there are any worlds + with unseen text, /quit first asks you to confirm the exit; + if you type anything other than "Y" or "y", TF does not exit. + +

+ Options: +

+
-y +
exit unconditionally, without prompting. +
+ + When TF exits, all socket + connections will be disconnected; all logfiles will be closed; + all /quotes and + /repeats will be killed; and all + history, unsaved + macros, and + variables will be lost. + +

+ If you prefer to never be prompted by /quit, you can redefine it like this: +

+  /def quit = /@quit -y
+
+ +

+ See also: + /dc, + %quitdone + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/quote.html b/help/commands/quote.html new file mode 100644 index 0000000..3e08841 --- /dev/null +++ b/help/commands/quote.html @@ -0,0 +1,197 @@ +TinyFugue: /quote + +

/quote

+ +

+ Usage: + +

+ /QUOTE [options] [pre] '"file"[suf]
+ /QUOTE [options] [pre] #"recall_args"[suf]
+ /QUOTE [options] [pre] !"shell_cmd"[suf]
+ /QUOTE [options] [pre] `"TF_cmd"[suf]
+


+ +

+ /Quote generates lines of text, one + for each line quoted from a file, shell command, + history, or TF command. + Each generated line is then echoed, sent to a socket, or executed as + a command. + Lines will be generated at a rate described in the section + "processes". + +

+ Options and arguments: +

+
-ddisp +
disposition of generated text. Disp is one of: "echo" + (echo to the screen), "send" (send directly to the + socket), or "exec" (execute + text as a tf command). The default disp is "send" if there + is no pre, and "exec" if there is a pre. +
-wworld +
Generated commands will be executed with world as the + current + world. If world is blank, it uses the world that was + current + when the /quote + started. If -w is omitted, each command's + current world will be + whatever happens to be in the + foreground + when each command occurs. + (See "sockets"). +
-time +
The delay between each generated line. It can have the format + "hours:minutes:seconds", + "hours:minutes", or "seconds", + and seconds may be specified to the nearest microsecond. + If -time is omitted, the + variable + %{ptime} is + used. + If time is given as the letter "S", the quote will run + synchronously, with no delay. + If a slow shell command is used with + /quote -S !, tf will hang + until the command produces some output or exits. A synchronous + /quote may be used inside + another /quote. + If time is given as the letter "P", the quote will run + whenever a prompt is received. + See "processes" for more + information on process timing. +
-ssub +
Expand TF_cmd as if + %{sub} were set + to sub. + By default, /quote + expands TF_cmd as if + %{sub} + were "full". +
pre +
pre is prefixed to each generated line. If pre + contains any of the command characters ('!`#), they must be + preceded with '\' to remove their special meaning. +
'file +
Get text from file. The file name is expanded as + described under /help + filenames. +
!shell_cmd +
Get text from the standard output and standard error of + executing shell_cmd in the shell. +
`TF_cmd +
Get text from the output of executing TF_cmd in tf. +
#recall_args +
Get text from executing + /recall + recall_args. (See + "recall" for the exact syntax). +
suf +
Append suf to each generated line. If omitted, + the double quotes around the file or command may + also be omitted. +
+ +

+ +

+ An asynchronous (background) /quote + (i.e., a + /quote without -S) returns the pid + of the new process, or 0 if an + error occurred. A synchronous (-S) shell (!) or + command (`) quote returns the return value of the command. A synchronous + file (') quote returns 0 on error, nonzero otherwise. + +

+ The library file + quoter.tf defines some + useful quoter commands + that are shortcuts for some common uses of + quote. + +

+ The following is a list of some nearly equivalent pairs of commands: +

+
/quote -S -dexec 'file +
/load file +
/quote -S /echo -aG - #args +
/recall args +
/quote opts + `/recall args +
/quote opts + #args +
+ +

+


+ +

+ Examples: + +

+

+  /quote -1 :reads about '"/usr/dict/words" in the dictionary.
+
+ This sends off lines like:
+
+  :reads about aardvark in the dictionary.
+  :reads about aardvore in the dictionary.
+
+ with one-second delays between lines. + +

+

+  /quote -S /echo !ps -gux
+
+ This displays the output of the system command "ps -gux" by echoing it + locally, immediately. + +

+

+  /quote -0 :heard: #-wCave /2 *pages*
+
+ This sends off quickly: + +

+ :heard: [the last 2 lines from Cave that contain "pages"] + +

+

+  /quote :is using `/version
+
+ will tell everybody in the room what version of TF you're running. + +

+

+  /quote -wlpmud -dsend 'prog.c
+
+ will send the file "prog.c" to the world "lpmud", without any + interpretation of leading spaces or slashes (in lines like "/* comment */"), + etc.) + +

+


+ +

+ See: processes, + %ptime, + %lpquote, + quoter.tf, + history, + command subs, + /load, + /recall, + /sh, + /sys, + /paste + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/quoter.html b/help/commands/quoter.html new file mode 100644 index 0000000..df9a904 --- /dev/null +++ b/help/commands/quoter.html @@ -0,0 +1,124 @@ +TinyFugue: quoter commands + + + + + + + + +

Quoter Commands

+

+ /REQUIRE quoter.tf
+


+ +

+ After doing "/REQUIRE quoter.tf", + the quoting commands can be used to take the output of various sources + and execute them as commands, typically quoting them to a mud server. + These are all just shortcuts for things + you can already do with /quote -S. + The default prefix is ":|", which will perform a pose on + Tiny-style MUDs. + The default prefix can be changed by setting the appropriate variable: + qdef_prefix, qmac_prefix, qworld_prefix, qtf_prefix, qsh_prefix, or + qmud_prefix. + An alternate prefix can be given on the command line for + /qdef, + /qmac, + /qworld, and + /qfile. + Also, before any output is generated, the command used to generate + the output is quoted. + +

+

+

/QDEF [prefix] name +
Prepends prefix to each line generated by + "/list name", + and executes each resulting line as a command. + +

+

/QMAC [prefix] name +
Searches for the definition of macro name in a group of tf files, + prepends prefix to each line found, + "/quote name", + and executes each resulting line as a command. + +

+

/QWORLD [prefix] name +
Prepends prefix to each line generated by + "/listworlds name", + and executes each resulting line as a command. + +

+

/QFILE [prefix] name +
Prepends prefix to each line of file name, + and executes each resulting line as a command. + +

+

/QTF cmd +
Prepends prefix to each line generated by executing cmd + in tf, + and executes each resulting line as a command. + +

+

/QSH cmd +
Prepends prefix to each line generated by executing cmd + in the shell, + and executes each resulting line as a command. + +

+

/QMUD [-wworld] cmd +
Prepends prefix to each line generated by executing cmd + on world world + (default: the current + world), + and executes each resulting line as a command. + /Qmud requires that the + mud supports the OUTPUTPREFIX and OUTPUTSUFFIX commands. +
+ +

+ Examples: + +

+ The command +

+  /qsh finger
+
+ would generate a series of commands something like this: +
+  :! finger
+  :| Login       Name              TTY Idle    When    Site Info
+  :| hawkeye  Ken Keys              p3       Fri 19:32 
+  :| hawkeye  Ken Keys              p4       Sat 17:37 
+
+ +

+ And, on a Tiny-style mud named "Cave", the command +

+  /qmud score
+
+ would generate a series of commands something like this: +
+  :| Cave> score
+  :| You have 8704 pennies.
+
+ +

+


+ +

+ See: + /quote, + processes, + /paste + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/recall.html b/help/commands/recall.html new file mode 100644 index 0000000..9f726e3 --- /dev/null +++ b/help/commands/recall.html @@ -0,0 +1,180 @@ +TinyFugue: /recall + +

/recall

+ +

+ Usage: + +

+ /RECALL [-wworld] [-ligv] + [-t[format]] [-aattrs] [-mstyle] [-An] [-Bn] [-Cn] + [#]range [pattern]
+


+ +

+ Recalls lines from a history buffer. + Only one of the [-ligw] options can be used, to specify the history from + which to recall. + +

+ Options: +

+
-w +
recall from current + world's history (default) +
-wworld +
recall from world's + history +
-l +
recall from local history + (i.e., TF output) +
-g +
recall from global + history (all worlds, and + local) +
-i +
recall from input history +
-t[format] +
display timestamps on each line, using format. If + format is omitted, + "[%{time_format}]" + will be used. + The format is described in + ftime(). +
-v +
recall lines that don't match the + pattern +
-q +
quiet: suppress the header and footer lines +
-aattr +
suppress specified + attributes (e.g., -ag shows + gagged lines) +
-mstyle +
matching style + (simple, + glob, or + regexp). +
-An +
Print n lines of context after each matching line. +
-Bn +
Print n lines of context before each matching line. +
-Cn +
Equivalent to -An -Bn. +
# +
display line numbers (must be last option, before + range) +
+ +

+ range can have one of the formats below. If x and y + are plain integers, they are interpreted as line numbers or counts. + If they have the form "hours:minutes" or + "hours:minutes:seconds", they are interpreted as time + values (either a period of time, or a clock time within the last 24 hours). + If they are real numbers (with up to 6 decimal places), they are interpreted + as absolute system times. +

+
/x +
Recall the last x matching lines. +
x +
Recall from the last x lines, or lines within the last + time period x. +
x-y +
Recall lines starting with x and ending with y. +
-y +
If y is a line number, recall the yth previous + line; if y is a time, recall lines earlier than y. + Remember to use "-" + before "-y" so it isn't interpreted as an + option. +
x- +
Recall lines after x. +
+ +

+ If range is prefixed with "#", line numbers will be displayed. + +

+ If pattern + is given, only lines in the given range that match + pattern + will be recalled. + The matching style is determined by the -m option if given, + %{matching} + otherwise. + +

+ If the output of + /recall + is being sent to the screen, it will be preceded by + "================ Recall start ================" + and followed by + "================= Recall end =================" + unless -q is used. + These lines will not be produced if the output is redirected, for + example with + $(...) + command substitution or + "/quote `/recall". + When -A, -B, or -C is used, groups of lines that are not adjacent in history + will be separated by "--". + +

+ If lines are received while tf is suspended (by + ^Z or + /suspend) or in a subshell (by + /sh), the timestamps on the lines will + correspond to the time tf resumed control, not the time they actually + arrived. + +

+ The return value of /recall is the + number of lines that were actually recalled. + +

+ Because the output of + /recall may clutter the + current window, you may wish to use + /limit instead. + +

+

Examples

+These examples assume that +matching=glob +(the default). +
+
Recall every line beginning with "Kite whispers" that arrived in the last +hour: +
+ /recall 1:00 Kite whispers* + +
Recall every line that arrived between 11 am and 1 pm: +
+ /recall 11:00-13:00 + +
Recall the last 5 lines containing "spam": +
+ /recall /5 *spam* + +
Recall the last 4th most recent line: +
+ /recall - -4 + +
+ +

+ See: + history, + attributes, + /limit, + /quote, + %time_format + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/recordline.html b/help/commands/recordline.html new file mode 100644 index 0000000..174daaa --- /dev/null +++ b/help/commands/recordline.html @@ -0,0 +1,93 @@ +TinyFugue: /recordline + +

/recordline

+ +

+ Usage: + +

+ /RECORDLINE [-lig] + [-w[world]] [-ttime] text
+


+ +

+ Records text into a history + buffer. + +

+ Options: +

+
-w +
record to current + world's history +
-wworld +
record to world's + history +
-l +
record to local history +
-g +
record to global history + (default) +
-i +
record to input history +
-ttime +
record the line with the system time time (as displayed + by /recall -t@) + instead of the current time +
-aattrs +
Record text with the + attributes given by + attrs. +
-p +
Interpret "@{attr}" strings as commands to + set attributes inline. + "@@" strings are interpreted as "@". + "@{n}" or "@{x}" will + turn attributes off. + See also: decode_attr(). +
+ +

+ The text will not be echoed to the screen or saved in any log. + +

+ /Recordline can be combined with + /quote to read a log file back into + history. For example, if you had + created a log with "/log -i + input.log" in an earlier tf session, you could start a new tf + session and use + +

+ + /quote -S -dexec + /recordline -i + - 'input.log + + +

+ to restore that input history. That + way, you could use the RECALLB, RECALLF, RECALLBEG, RECALLEND, SEARCHB, and + SEARCHF (^P, ^N, ^[<, ^[>, ^[P, and ^[N) keys to recall lines you typed + in the earlier session. + +

+ Note that /recordline + always appends to the end of a history. + /Recordline + -ttime makes it possible to insert lines that + are not in chronological order, which may produce strange results with + /recall. + +

+ See: /recall, + /quote, + history + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/repeat.html b/help/commands/repeat.html new file mode 100644 index 0000000..36022a6 --- /dev/null +++ b/help/commands/repeat.html @@ -0,0 +1,151 @@ +TinyFugue: /repeat + + +

/repeat

+ +

+ Usage: + +

+ /REPEAT [-w[world]] + [-n] {[-time]|-S|-P} count command
+


+ +

+ Repeats command, count times. Command may be any + legal macro body. If count + is "i", the command repeats indefinitely. + This works through a process, + which runs concurrently with normal operations. + +

+ Options: +

+
-w[world] +
Command will execute with world as the + current world. + If world is omitted, it is assumed to be the world that + was current for + /repeat. + If this option is omitted entirely, the + command's + current world will be + whatever world happens to be in the + foreground + when it's time for command to run. +
-time +
Time is the delay between each execution of command. + Time may be specified in the format + "hours:minutes:seconds", + "hours:minutes", or "seconds" + (seconds may be specified to the nearest microsecond). +
-S +
The repeat will run synchronously. +
-P +
The repeat will run whenever a + prompt is received. +
-n +
When combined with the -time option, this makes the first + execution of command happen with no delay. +
+ + At most one of the -S, -P, and -time options should be specified. + If none are specified, the delay between each execution of command + is determined by the variable + %{ptime}. + See "processes" for more information + on process timing. + +

+ The command undergoes macro body + substitution when it is executed. + +

+ An asynchronous /repeat (without -S) + returns the pid of the new process, + or 0 if an error occurred. + A synchronous /repeat + returns the return value of the last command. + +

+ Since the first run is not done until after the first interval + (for /repeat without -S or -n), + a useful trick is to use + "/repeat -time 1 + command" to delay the execution of a single command. + +

+ Example: /repeat -0:30 1 + /echo -ab Dinner's ready + + +

+There is no good way to directly "sleep" within a +macro body. +Any attempt to write your own /sleep macro will, at best, "freeze" tf +for the duration of the sleep, or even worse hog the machine's CPU time +in a busy wait. +The best way to achieve the effect a sleep in a +/while +loop is probably to use a /repeat +where each execution of the /repeat +body corresponds to an iteration of the desired +/while loop. +That is, if you want to write + +

+    /def foo = \
+	/before_stuff%; \
+	/while (condition) \
+            /do_stuff%; \
+            /sleep 5%; \
+	/done%; \
+	/after_stuff
+
+ +you must instead write: + +
+    /def foo = \
+	/before_stuff%; \
+	/foo_loop
+
+    /def foo_loop = \
+	/if (condition) \
+            /do_stuff%; \
+	    /repeat -5 1 /foo_loop%; \
+	/else
+	    /after_stuff%; \
+	/endif
+
+Of course, local variables +will not survive between calls of /do_stuff in the second version as they +would in the first (if it were possible), so any +variables you need to share between +iterations must be global. +

+But, if the reason you want to sleep is to wait for a response from a +server, then you really don't want to sleep at all: you want a +trigger. +First, set up triggers on the possible +responses, then send the command. If one of the possible responses is +no response at all, then a /repeat can +be useful to wait for some maximum timeout and then handle the no-reponse +case and delete the response triggers. +This is in general the best way to write +macros that interact with a server. + + +

+ See: processes, + %ptime, + /at, + kbnum + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/replace.html b/help/commands/replace.html new file mode 100644 index 0000000..db00936 --- /dev/null +++ b/help/commands/replace.html @@ -0,0 +1,46 @@ +TinyFugue: /replace + +

/replace

+ +

+ Function usage: +

+ REPLACE(old, new, + string)
+ +

+ Command usage: +

+ /REPLACE old new + string
+


+ +

+ Echoes (in command form) or returns (in + function form) string, + with any occurrences of old in string + replaced by new. + +

+ + Example: + +

+ This example replaces "TF" with "TinyFugue" in every line sent by the + server. +

+  /def -mregexp -t"TF" replace_tf = \
+      /test substitute(replace("TF", "TinyFugue", {P0}))
+
+ +

+ See: evaluation, + /tr + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/restrict.html b/help/commands/restrict.html new file mode 100644 index 0000000..34a10f2 --- /dev/null +++ b/help/commands/restrict.html @@ -0,0 +1,72 @@ +TinyFugue: /restrict + + +

/restrict

+ +

+ Usage: + +

+ /RESTRICT [SHELL|FILE|WORLD]
+


+ +

+ With no arguments, /restrict + reports the current restriction level. + +

+ With an argument, /restrict sets + the restriction level. Once restriction has been set to a particular + level, it can not be lowered. +

+
level 0: NONE +
No restrictions. + +
level 1: SHELL +
Prevents all access to shell or external commands. Disables + TF builtins "/sh" and + "/quote !", and uncompression during + /load and + /help. + +
level 2: FILE +
Prevents reading and writing of files. Disables TF builtins + "/load", + "/save", + "/saveworld", + "/lcd", + "/log", and + "/quote '", + "tfopen()", + the "sockmload + feature. + Implies /restrict shell. + +
level 3: WORLD +
Disallows all new user-defined connections. The TF builtins + /addworld and the + "/connect host port" + semantics are disabled. Implies + /restrict file. +
+ +

+ /Restrict is typically placed in + %{TFLIBDIR}/local.tf + by an administrator of a public copy of TF who wishes to restrict users' + access. + +

+ Note that while I believe these options to be secure, I provide no warranty + to that effect. + +

+ See: warranty + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/return.html b/help/commands/return.html new file mode 100644 index 0000000..463d2f5 --- /dev/null +++ b/help/commands/return.html @@ -0,0 +1,100 @@ +TinyFugue: /return and /result + + +

/return and /result

+ +

+ Usage: + +

+ /RETURN + [expression]
+ /RESULT + [expression]
+


+ +

+ /return stops execution of the + macro + body that called it, and causes the macro to return the string value + of expression. + If the expression + is omitted, the return value of the + macro is the empty string. + +

+ When a macro that calls /result + was called as a function, + /result is identical to + /return. + + When a macro that calls /result + was called as a command, + /result has the additional effect + of echoing the value of + expression to + the tfout stream. + + /Result thus allows the same macro to + be called usefully as either + a command or + a function. + +

+ Note that /return and + /result take the string + value of expression. This is not a problem for integer- or + float-valued expressions, since they convert freely to strings and back + without loss of information. But if the expression is an + enumerated special variable + (e.g., borg), + the value returned will be its string value (e.g., "on"), + not its integer value (e.g., 1). + To force it to use the integer value, you can use the unary plus operator + (e.g., +borg). + +

+ The return value of the last command (builtin or macro) is stored in + %{?}. The return value of + a function (builtin or macro) is just the value of the function. + +

+ These examples define several macros + intended to be called as a functions: +

+  /def square = /return pow({1}, 2)
+
+  /def hypot = /return sqrt(square({1}) + square({2}))
+
+  /def strrev = \
+      /let len=$[strlen({*})]%; \
+      /return (len <= 1) ? {*} : \
+          strcat(strrev(substr({*},len/2)), strrev(substr({*},0,len/2)))
+
+ + If those examples had used /result + instead of /return, they could also + be used as commands when echoing is more convenient. + For example, + +
+    /eval say My name backwards is $(/strrev ${world_character}).
+
+ +

+ See: /if, + /while, + /test, + /break, + /exit, + expressions, + evaluation, + variables + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/runtime.html b/help/commands/runtime.html new file mode 100644 index 0000000..5d6738e --- /dev/null +++ b/help/commands/runtime.html @@ -0,0 +1,29 @@ +TinyFugue: /runtime + +

/runtime

+ +

+ Usage: + +

+ /runtime command
+


+ +

+ Executes command, and prints the real time and cpu time used. + Command is not put through any additional + substitution before being executed. + The return value of /runtime + is that of command. + +

+ See: cputime(), + debugging. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2000-2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/rwho.html b/help/commands/rwho.html new file mode 100644 index 0000000..da473b9 --- /dev/null +++ b/help/commands/rwho.html @@ -0,0 +1,36 @@ +TinyFugue: /rwho + + + +

/rwho

+ +

+ Usage: + +

+ /REQUIRE rwho.tf
+ +

+ /RWHO
+ /RWHO name=player
+ /RWHO mud=mud
+


+ +

+ Gets a remote WHO list from a mudwho server. The first form gives a + complete list, the other forms give partial lists. Due to the short + timeout of the mudwho server, sometimes the complete list is sent even if + the second or third format is used (send complaints to the author or + maintainer of the mudwho server, not to me). + +

+ Make sure you /load rwho.tf _after_ you + define your worlds, or rwho will be the default world. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/save.html b/help/commands/save.html new file mode 100644 index 0000000..c5fb445 --- /dev/null +++ b/help/commands/save.html @@ -0,0 +1,109 @@ +TinyFugue: /save + + + + + + + +

/save

+ +

+ Usage: + +

+ /SAVE [-a] file + [list-options]
+


+ +

+ Saves specified macros to file. + The list-options + are the same as those in the + /list command; see + "/list" for details. Invisible + macros will not be saved unless "-i" is + specified. + +

+ If "-a" is specified, macros will be + appended to file. Otherwise, the + macros will overwrite any existing + contents of file. + +

+ The return value of /save is the number + of the last macro listed, or 0 if no + macros were listed (because of error or + none matched the specified options). + +

+ The standard macro library also defines + commands that save macros of a particular type: +

+
/savedef +
macros with names, but no + triggers, + hooks, or + keybindings +
/savebind +
macros with keybindings +
/savehilite +
macros with triggers and + attributes other than -ag +
/savegag +
macros with triggers and the -ag + attribute +
/savetrig +
macros with triggers and no + attributes +
/savehook +
macros with hooks +
+ These commands take a filename argument; if it is omitted, a default + file name will be used. No -a (append) option is allowed. + +

+ The /save* commands are useful if your + macros are few and simple, but if you + have many and/or complex macros, you + will probably find it easier to write them with an editor and then + /load them in tf, instead of writing + them in tf and /save'ing them to a + file. Avoiding /save allows you to + keep the file(s) nicely formatted, use comments, and organize them better. + Use whatever works best for you. + +

+ Note that when tf starts, it does not automatically read files created with + any of the /save commands. To make it + do so, add the corresponding /load + command to your .tfrc file. + +

+ Except for its return value,
+ /save [-a] file + [list-options]
+ is equivalent to
+ /eval + /list [list-options] + %| + /writefile [-a] file + +

+ See: macros, + patterns, + attributes, + library, + /def, + /list, + /load, + /saveworld + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/saveworld.html b/help/commands/saveworld.html new file mode 100644 index 0000000..fa84578 --- /dev/null +++ b/help/commands/saveworld.html @@ -0,0 +1,40 @@ +TinyFugue: /saveworld + +

/saveworld

+ +

+ Usage: + +

+ /SAVEWORLD [-a] [file]
+


+ +

+ Saves world definitions to file if specified, otherwise from the + file named in the body of the + WORLDFILE macro. + +

+ If "-a" is given, world definitions will be appended to file; + otherwise, the world definitions will replace any original contents of + file. + +

+ Note that when tf starts, it does not automatically read files created with + /saveworld. To make it do so, add + the /loadworld command to your + .tfrc file. + +

+ See: worlds, + library, + /addworld, + /load + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/send.html b/help/commands/send.html new file mode 100644 index 0000000..2483559 --- /dev/null +++ b/help/commands/send.html @@ -0,0 +1,65 @@ +TinyFugue: /send + + +

/send

+ +

+ Function usage: + +

+ SEND(text[, world[, flags]])
+ +

+ Command Usage: + +

+ /SEND [-W] [-Ttype] + [-w[world]] [-n] text
+


+ +

+ Sends text to a world. + If no world is specified, the current world is used. + By default, send does not execute SEND + hooks. + +

+ In the function form, the optional flags is a string containing + letters that modify the function's behavior: +

+
"h"
test for and invoke matching SEND + hooks. +
"u"
send text unterminated (i.e., without a + CR LF end-of-line marker). +
+ For backwards compatibility, the flags "o", "n", and "1" are ignored, + and the flags "0" and "f" are equivalent to "u". + +

+ Command options: +

+
-wworld
sends text to world. +
-Ttype
sends text to all connected worlds + with a type that matches the pattern type. +
-W
sends text to all connected worlds. +
-n
send text without an end-of-line + marker (CR LF). +
-h
test for and invoke matching SEND + hooks. +
+ +

+ The return value of send + is 0 if the text is not successfully sent, nonzero if it is. + +

+ See: + functions. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/set.html b/help/commands/set.html new file mode 100644 index 0000000..98be871 --- /dev/null +++ b/help/commands/set.html @@ -0,0 +1,55 @@ +TinyFugue: /set + +

/set

+ +

+ Usage: + +

+ /SET name=value
+ /SET [name [value]]
+


+ +

+ In the first form, or with two arguments, + /set will set the value of + variable name to value. + With one argument, /set will display + the value of variable name. + With no arguments, /set + will display the value of all internal + variables. If the first form is + used, there should be no spaces on either side of the '='. + +

+ Variable name will be an + internal variable unless it has + already been defined as an environment + variable. + +

+ Note: The variables + 'L' and 'R' are reserved. You should not assign values to them. + +

+ When setting a variable, /set returns + 1 if successful, 0 if not. + When listing variables, /set returns + the number of variables listed. + +

+ See: variables, + /listvar, + /setenv, + /export, + /let, + /unset, + /edvar + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/setenv.html b/help/commands/setenv.html new file mode 100644 index 0000000..a8ff945 --- /dev/null +++ b/help/commands/setenv.html @@ -0,0 +1,45 @@ +TinyFugue: /setenv + +

/setenv

+ +

+ Usage: + +

+ /SETENV [name + [value]]
+ /SETENV name=value
+ +

+ With two arguments, /setenv will set + the value of name to value in the environment. With one + argument, /setenv will display the + value of name. With no arguments, + /setenv will display the value of all + environment variables. + If the second form is used, spaces around the '=' will not be stripped. + +

+ If name was already defined as an internal + variable, it will become + an environment variable. + +

+ When setting a variable, /setenv returns + 1 if successful, 0 if not. + When listing variables, /setenv returns + the number of variables listed. + +

+ See: variables, + /listvar, + /set, + /export + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/sh.html b/help/commands/sh.html new file mode 100644 index 0000000..8840f33 --- /dev/null +++ b/help/commands/sh.html @@ -0,0 +1,69 @@ +TinyFugue: /sh + +

/sh

+ +

+ Usage: + +

+ /SH [-q] [command]
+ /PSH [command]
+


+ +

+ If no command is given, /sh and + /psh execute an interactive shell + named by %{SHELL}. + With a command, /sh will execute + command in the default shell (/bin/sh on unix), and + /psh will execute command + in the shell named by + %{SHELL}. + Command is executed interactively, + so it may accept input and may produce any output. + +

+ In visual mode, + /sh and + /psh + will fix the screen first, and restore it after executing the shell. + /Sys does not. + +

+ If the -q option is given, /sh will be quiet: the + SHELL + hook will not + be called, and the "Executing" line will not be printed. + +

+ If the %{shpause} + and %{interactive} + flags are on, TF will wait for a keypress before returning. + +

+ Note: calling /sh or + /psh with arguments from a + trigger is very dangerous. If not + written carefully, such a trigger + could allow anyone connected to the server to gain access to your shell + account. + +

+ The return value of /sh and + /psh is the exit + status of the shell if it exited normally, -1 otherwise. Note that UNIX + shell commands usually return 0 for success and nonzero for failure. + +

+ See: /quote, + /sys, + utilities + (/psh) + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/shift.html b/help/commands/shift.html new file mode 100644 index 0000000..3a1f86e --- /dev/null +++ b/help/commands/shift.html @@ -0,0 +1,48 @@ +TinyFugue: /shift + +

/shift

+ +

+ Usage: + +

+ /SHIFT [n]
+


+ +

+ Shifts the positional parameters left by n. That is, the positional + parameters %(n+1) ... + %# are renamed to + %1 ... %(#-n). If + n is omitted, 1 is assumed. + +

+ /shift is useful only during + macro + expansion. + +

+ Example: +

+  /def worlds = /while ({#}) /world %1%; /shift%; /done
+
+ +

+ Then, the command "/worlds foo + bar baz" would execute the commands + "/world foo", + "/world bar", and + "/world baz". + +

+ See: variables, + evaluation, + list commands + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/signal.html b/help/commands/signal.html new file mode 100644 index 0000000..fcc10e9 --- /dev/null +++ b/help/commands/signal.html @@ -0,0 +1,32 @@ +TinyFugue: /signal + +

/signal

+ +

+ Usage: + +

+ /SIGNAL [sig]
+


+ +

+ Sends signal sig to the tf process, or with no arguments, + /signal lists all valid signal names. + Valid signals usually include: HUP, INT, QUIT, KILL, SEGV, TERM, USR1, + USR2, and TSTP. The complete list varies from system to system. + +

+ See: + signals, + /suspend, + getpid(), + hooks (SIGHUP, SIGTERM, SIGUSR1, + SIGUSR2) + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/spell.html b/help/commands/spell.html new file mode 100644 index 0000000..3e9371b --- /dev/null +++ b/help/commands/spell.html @@ -0,0 +1,44 @@ +TinyFugue: /spell_line + + + +

spelling checker

+ +

+ Usage: + +

+ /REQUIRE spell.tf
+ +

+ /SPELL_LINE
+ Keybinding: ^[s
+


+ +

+ After executing "/require spell.tf", + typing "^[s" will call + /spell_line + to report any misspellings in the current input line. + /Spell_line can of course be bound + to other keys with + "/def + -b". + +

+ /Spell_line + assumes your system has a program called "spell" that reports + misspellings in its standard input. + +

+ See: + interface, + keys + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/split.html b/help/commands/split.html new file mode 100644 index 0000000..3e4b9b1 --- /dev/null +++ b/help/commands/split.html @@ -0,0 +1,34 @@ +TinyFugue: /split + +

/split

+ +

+ Usage: + +

+ /split args
+


+ +

+ Sets %{P1} to the + substring of args before the first '=', and sets + %{P2} to the substring of + args after the first '='. If there is no '=' in args, + %{P1} will contain the + entire string and %{P2} + will be empty. %{P0} + will contain the entire string. + +

+ Spaces surrounding the '=' are stripped. + +

+ See: getopts() + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/sub.html b/help/commands/sub.html new file mode 100644 index 0000000..bf0871d --- /dev/null +++ b/help/commands/sub.html @@ -0,0 +1,52 @@ +TinyFugue: /sub + +

/sub

+ +

+ Usage: + +

+ /SUB [OFF|ON|FULL]
+


+ +

+ Sets the flag %{sub}. + +

+ If the flag %{sub} is + OFF (0), all lines except for history + substitutions (line beginning with '^') and commands (/) are sent as-is to + the socket. + +

+ If the flag %{sub} is ON + (1), the sequences + "%;" and "%\" are substituted + with newlines, and the + sequence "%%" is substituted + with "%", and the sequence "\n" + is substituted with the character with decimal ASCII code n. + +

+ If the flag %{sub} is + FULL, text is processed just as if it were the body of a + macro (see + "evaluation") called without any + arguments. This allows you to have in-line + macros in regular input. + +

+ The flag %{sub} defaults + to 0 (off). + +

+ See: general, + evaluation + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/substitute.html b/help/commands/substitute.html new file mode 100644 index 0000000..826c795 --- /dev/null +++ b/help/commands/substitute.html @@ -0,0 +1,79 @@ +TinyFugue: /substitute + + +

/substitute

+ +

+ Function usage: +

+ SUBSTITUTE(text [, + attrs [, inline]])
+ +

+ Command usage: +

+ /SUBSTITUTE [-aattrs] [-p] + text
+


+ +

+ When called from a trigger (directly + or indirectly), the entire triggering line + is replaced with text. After a + /substitute, it will appear as if + text is what caused the trigger; + the original line is lost. In particular, this means when + /substitute is called from a + fall-thru + trigger, + triggers of lower + priority will be + compared against text instead of the original line. + +

+ Options and arguments: +

+
command: -aattrs +
function: attrs +
Give text the + attributes described by + attrs. These are added to the original line's + attributes unless attrs + include the "x" attribute. + +
command: -p +
function: inline = "on" or 1 +
Interpret @{attr} strings as commands to + set attributes inline, as + in /echo. (See + /echo). +
+ +

+ Example: + +

+ On a mud that uses MUFpage, you could set your #prepend string to + "##page>", and define a trigger like: +

+  /def -ah -t"##page> *" hilite_mufpage = /substitute %-1
+
+ +

+ This will match no matter what page format the sender uses, and strip off + the "##page>" so you never see it. + +

+ For another example, see + /replace. + +

+ See: triggers + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/suspend.html b/help/commands/suspend.html new file mode 100644 index 0000000..d486878 --- /dev/null +++ b/help/commands/suspend.html @@ -0,0 +1,31 @@ +TinyFugue: /suspend + +

/suspend

+ +

+ Usage: + +

+ /SUSPEND
+


+ +

+ Suspends the TF process, if your system and shell support job control. + This has the same effect as typing ^Z on most UNIX-like systems. + When TF is resumed, it redraws the screen and processes all + /repeat and + /quote commands that + were scheduled to run while TF was suspended and + processes all text that was received while TF was suspended. + +

+ See: signals, + /signal. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/sys.html b/help/commands/sys.html new file mode 100644 index 0000000..b54dee0 --- /dev/null +++ b/help/commands/sys.html @@ -0,0 +1,49 @@ +TinyFugue: /sys + +

/sys

+ +

+ Usage: + +

+ /SYS shell-command
+


+ +

+ Executes shell-command. The command is executed without a tty, so + it should have no input, and its output, if any, should be plain text. The + command's stdout and stderr are echoed to tf's output window. + /sys differs from + /sh in that + /sys can not do an interactive shell + command, but does not redraw the screen or produce any extra messages. + +

+ Note: calling /sys with arguments from a + trigger is dangerous. If not + written carefully, such a trigger + could allow anyone with access to the server to gain access to your shell + account. + +

+ The return value of /sys is the exit + status of the shell if it exited normally, -1 otherwise. Note that UNIX + shell commands usually return 0 for success and nonzero for failure, + which is the opposite of the TF convention. + +

+ /sys executes synchronously. To execute + a command asynchronously (in the background), use + /quote without the -S option. + +

+ See: /sh, + /quote + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/telnet.html b/help/commands/telnet.html new file mode 100644 index 0000000..442ba73 --- /dev/null +++ b/help/commands/telnet.html @@ -0,0 +1,55 @@ +TinyFugue: /telnet + +

/telnet

+ +

+ Usage: + +

+ /TELNET host [port]
+


+ +

+ Connect to a line-based telnet host. The telnet login port is used if + port is omitted. + +

+ Note that TF operates strictly in line-by-line mode, but telnetd (the + server running on the telnet login port) expects character-by- character + mode. So, simple shell operations and anything else which is basically + line-by-line should work without much difficulty, but anything that tries + to control the screen or expects single keystroke input will not + work. /Telnet is somewhat useful, + but not useful enough to alter the fundamental line-by-line nature of TF. + If you want a general telnet client, you know where to find it. + +

+ TF supports most of the TELNET protocol (even if a command other than + /telnet was used to connect). + TF implements the TELNET options + ECHO (lets server control echoing of input), + SGA (suppress GOAHEAD), + EOR (allows use of END-OF-RECORD in + prompts), + NAWS (allows TF to send window size information to the server), + TTYPE (allows server to ask about the terminal type), + and BINARY (allows transmission of 8-bit characters). + For TTYPE queries, TF responds "TINYFUGUE", "ANSI-ATTR", "ANSI", and + "UNKNOWN", in that order. + For information on TELNET protocol, see RFC 854 and 1123. + See also: prompts. + +

+ See: /addtelnet, + /connect, + %telopt, + %binary_eol, + protocols + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/test.html b/help/commands/test.html new file mode 100644 index 0000000..e928601 --- /dev/null +++ b/help/commands/test.html @@ -0,0 +1,64 @@ +TinyFugue: /test + +

/test

+ +

+ Usage: + +

+ /TEST + expression
+


+ +

+ /test evaluates the + expression and returns + its value, also setting the special + variable + %?. + The return value may be any type (before version 4.0, only integer values + were allowed). + A new variable scope is NOT created. + +

+ /Test can be useful for evaluating + an expression for its side + effects, ignoring the return value. For example, the command + "/test + kbdel(kbpoint() - 1)" + will perform a backspace, and + "/test regmatch('foo(.*)', + 'foobar')" will assign "bar" to %P1. + +

+ Before version 3.5, /test was + frequently used as the condition of an + /IF or + /WHILE statement. This is no longer + needed, since /IF and + /WHILE can now take an + expression as a condition. + +

+ Before version 4.0, /test was sometimes + used to set the return value of a macro, + since a macro's return value is that of + the last command executed. The preferred way to do this now is with + /return or + /result. + +

+ See: /return, + /if, + /while, + expressions, + evaluation, + variables + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/textencode.html b/help/commands/textencode.html new file mode 100644 index 0000000..1ed70fb --- /dev/null +++ b/help/commands/textencode.html @@ -0,0 +1,54 @@ +TinyFugue: /textencode + +

textencode()

+ +

+ /require textencode.tf
+

+ Function usage: + +

+ textencode(string)
+ textdecode(encodedstring)
+


+ +

+ textencode converts string + to a form that contains only letters, digits, and underscores. + textdecode converts + encodedstring (returned by a previous call to + textencode) + back to the original string. + +

+ These two functions can be useful for converting arbitrary text, such + as a world name or the name of a player on a mud, into a form that is + safe to use as part of a tf + variable or + macro name, + or a filename. + +

+ The following example records the time a player connects to the mud, + and is safe even if the player name contains characters that are not + legal in tf variable names:
+ + /def + -mglob + -t'{*} has connected.' + record_connect_time = \
+      + /set + connect_time_$[textencode({1})]=$[time()] +
+ +

+ See: functions + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/textutil.html b/help/commands/textutil.html new file mode 100644 index 0000000..5054d75 --- /dev/null +++ b/help/commands/textutil.html @@ -0,0 +1,141 @@ +TinyFugue: text utility commands + + + + + + + + + + + + + + +

Text Utilities

+

+ /REQUIRE textutil.tf
+


+ +

+ The library file textutil.tf + defines several unix-like commands that are particularly convenient when + used with the %| pipe to + redirect their input or output. + +

+ In the descriptions below, filename is the name of a file, and + in and out are handles of + tfio streams. + When in is optional, its default is + tfin. + +

+

+

+

/fgrep [-cvi] pattern +
/grep [-cv] pattern +
/egrep [-cvi] pattern +
These commands search tfin for lines + that match the given pattern, and by default prints those lines. + For /fgrep, + a line must contain pattern to match; + for /grep, + the entire line must match the + glob pattern pattern; + for /egrep, it must match the + regexp pattern pattern. +
Options: +
+
-c
print only the count of matching lines. +
-v
select only non-matching lines. +
-i
ignore case (for /fgrep and /egrep only; + /grep always ignores case). +
+ Note: these commands are not compatible with those defined in the old + library file grep.tf. + +

+

/readfile filename +
Reads lines from filename and writes them to + tfout. + +

+

/writefile [-a] filename +
Reads lines from tfin and writes them + to file filename. +
Options: +
+
-a
append to file instead of overwriting. +
+ +

+

/head [-ncount] [in] +
Reads the first count (default 10) lines from + in or tfin + and writes them to tfout. + +

+

/wc [-lwc] [in] +
Reads lines from in or tfin + and prints the count of lines, space-separated words, and characters + that were read. +
Options: +
+
-l
Print the count of lines only. +
-w
Print the count of words only. +
-c
Print the count of characters only. +
+ +

+

/tee out +
Reads lines from tfin and echoes them + to out and tfout. + +

+

/copyio in out +
Reads lines from in and writes them to out. + This can be useful, for example, when you want to send text from a + tfio stream to a + command that reads only tfin: +
+    /copyio in o %| /command
+    
+ +

+

/fmt +
Copies tfin to + tfout, with adjacent non-blank lines + joined. + +

+

/uniq +
Copies tfin to + tfout, with adjacent duplicate lines + removed. + +

+

/randline [in] +
Copies one randomly selected line from + in or tfin + to tfout. +
+ +

+


+ +

+ See: + tfio, + evaluation, + substitution, + oldgrep + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/tick.html b/help/commands/tick.html new file mode 100644 index 0000000..c026461 --- /dev/null +++ b/help/commands/tick.html @@ -0,0 +1,69 @@ +TinyFugue: /tick + + + + + +

/tick

+ +

+ Usage: + +

+ /REQUIRE tick.tf
+ +

+ /tick
+ /tickoff
+ /tickon
+ /tickset
+ /ticksize n
+


+ +

+ The /tick* commands implement + dikumud tick counting, similar to tintin. When the ticker is started + with /tickon, it will warn you + 10 seconds before each tick, and print "TICK" on the tick. + +

+ The messages can be changed by redefining the /tick_warn (10-second + warning) and /tick_action ("TICK") macros. You can make them perform + any tf command, not just printing. + +

+ It is up to you to start the ticker in sync with the mud. If the + mud prints something on a tick, you can define a + trigger + on that which calls /tickon. + +

+ /Tick displays the time + remaining until the next tick. + +

+ /Tickoff + stops the ticker. + +

+ /Tickon and + /tickset + reset and start the ticker. + +

+ /Ticksize + sets the tick period to n seconds (the default is 75). + +

+ See: + /require, + timing, + prompts + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/time.html b/help/commands/time.html new file mode 100644 index 0000000..686af58 --- /dev/null +++ b/help/commands/time.html @@ -0,0 +1,34 @@ +TinyFugue: /time + +

/time

+ +

+ Usage: + +

+ /TIME [format]
+


+ +

+ Displays the current time. Format is described under + "ftime()". If format + is omitted, + %{time_format} + is used. + +

+ See: time(), + ftime(), + mktime(), + %TZ, + %time_format, + %clock, + idle() + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/toggle.html b/help/commands/toggle.html new file mode 100644 index 0000000..4162180 --- /dev/null +++ b/help/commands/toggle.html @@ -0,0 +1,25 @@ +TinyFugue: /toggle + +

/toggle

+ +

+ Usage: + +

+ /TOGGLE variable
+


+ +

+ If variable has a value of 0, its value will be set to "1". If + variable has a non-zero value, its value will be set to "0". + +

+ See: variables + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/tr.html b/help/commands/tr.html new file mode 100644 index 0000000..5fda88b --- /dev/null +++ b/help/commands/tr.html @@ -0,0 +1,43 @@ +TinyFugue: /tr + +

/tr

+ +

+ Usage: + +

+ /REQUIRE tr.tf
+ +

+ /TR + domain range string
+


+ +

+ Domain and range are lists of characters of equal length. + Each character in string that appears in domain + is translated to the corresponding character in range, + and the resulting string is printed. + +

+ Example:
+ command: + /def biff = + /tr OIS. 01Z! + $[toupper({*})]
+ command: /biff TinyFugue is cool wares, dude.
+ output: T1NYFUGUE 1Z C00L WAREZ, DUDE!
+ +

+ See: + /replace, + expressions, + functions + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/trig.html b/help/commands/trig.html new file mode 100644 index 0000000..9d1df80 --- /dev/null +++ b/help/commands/trig.html @@ -0,0 +1,89 @@ +TinyFugue: /trig + + + + + +

/trig

+ +

+ Usage: + +

+ /TRIG pattern = body
+ /TRIGP priority pattern = + body
+ /TRIGC chance pattern = + body
+ /TRIGPC priority chance + pattern = body
+


+ +

+ Creates an unnamed macro that will + trigger on + pattern and execute + body. If chance is given with + /trigc or + /trigpc, it will be the percentage + probability of the trigger going off; + default is 100%. If priority is given with + /trigp or + /trigpc, it will be the + priority of the + trigger; default is 0. The matching + style of the trigger is determined by + the global variable + %{matching}. + +

+ If the command fails it returns 0. Otherwise, it creates a new + macro and returns its (positive) number + (useful in /undefn and + /edit). + +

+ /trig is equivalent to: + /def + -tpattern + = body.
+ /trigp is equivalent to: + /def + -ppriority + -tpattern + = body.
+ /trigc is equivalent to: + /def + -cchance + -tpattern + = body.
+ /trigpc is equivalent to: + /def + -ppriority + -cchance + -tpattern + = body.
+ +

+ Note: the /trig commands create + macros without names. Thus each + /trig command will create a new + macro macro instead of replacing + an old macro. For this reason, + it is usually better to use /def + and give your macros names. + +

+ See: triggers, + evaluation, + patterns, + /def, + /untrig + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/trigger.html b/help/commands/trigger.html new file mode 100644 index 0000000..db09b79 --- /dev/null +++ b/help/commands/trigger.html @@ -0,0 +1,81 @@ +TinyFugue: /trigger + +

/trigger

+ +

+ Usage: + +

+ /TRIGGER [-ln] [-g] [-w[world]] + [-h[event]] text
+


+ +

+ Executes macros with + triggers or + hook arguments that match text, + just as if text had come from a + socket or a hook event had occurred + with text as its arguments. + The return value of /trigger + is the number of (non-quiet) + macros that were executed. + /Trigger is useful + for debugging + triggers and + hooks. + +

+ Options: +

+
-g +
Match "global" triggers + or hooks that were not defined with + /def + -w +
-wworld +
Match triggers or + hooks for world, + or the current + world if world is omitted. +
-hevent +
Match hooks where event + matches the hook event and text matches the hook argument pattern. + Without -h, /trigger matches + triggers, + not hooks. +
-n +
Do not execute any of the matched macros; instead, display a list + of each macro that would have matched, including its + fallthru flag, + priority, and name. + (Note that if any macro in the list would have executed + substitute() or + /substitute, + the macros listed after it may not be correct.) +
-l +
Like -n, but list each macro in full, as if by + /list. +
+ If neither -g nor -w options are given, both are assumed. + That is, text + is matched against global triggers + or hooks, as well as + triggers + or hooks for the + current + world. + +

+ See: triggers, + hooks, + debugging, + /def + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/true.html b/help/commands/true.html new file mode 100644 index 0000000..89b86e2 --- /dev/null +++ b/help/commands/true.html @@ -0,0 +1,31 @@ +TinyFugue: /true + + + +

/true

+ +

+ Usage: + +

+ /TRUE
+ /FALSE
+


+ +

+ /True does nothing, and returns + nonzero. + +

+ /False does nothing, and returns zero. + +

+ /: is the same as /true. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/unbind.html b/help/commands/unbind.html new file mode 100644 index 0000000..77feb1b --- /dev/null +++ b/help/commands/unbind.html @@ -0,0 +1,27 @@ +TinyFugue: /unbind + +

/unbind

+ +

+ Usage: + +

+ /UNBIND sequence
+


+ +

+ Removes a macro with the keybinding + sequence. + +

+ See: general, + /bind, + /purge + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/undef.html b/help/commands/undef.html new file mode 100644 index 0000000..2635690 --- /dev/null +++ b/help/commands/undef.html @@ -0,0 +1,36 @@ +TinyFugue: /undef + +

/undef

+ +

+ Usage: + +

+ /UNDEF name...
+


+ +

+ For each name given, /undef + removes the definition of the macro + with that name. + +

+ The return value of /undef is the + number of macros that were removed. + +

+ See: macros, + /def, + /purge, + /undefn, + /undeft, + /untrig, + /unhook + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/undefn.html b/help/commands/undefn.html new file mode 100644 index 0000000..71f8859 --- /dev/null +++ b/help/commands/undefn.html @@ -0,0 +1,32 @@ +TinyFugue: /undefn + +

/undefn

+ +

+ Usage: + +

+ /UNDEFN number ...
+


+ +

+ Removes macros with the numbers + specified in the arguments. Macro + numbers can be determined with /list, + or from the return value of the command used to create the + macro. + +

+ See: macros, + /def, + /list, + /purge, + /undef + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/undeft.html b/help/commands/undeft.html new file mode 100644 index 0000000..d2a09e7 --- /dev/null +++ b/help/commands/undeft.html @@ -0,0 +1,32 @@ +TinyFugue: /undeft + +

/undeft

+ +

+ Usage: + +

+ /UNDEFT trigger
+


+ +

+ Removes a macro with a + trigger associated with it that is + triggered by the pattern + trigger. Trigger is matched against existing + triggers using simple comparison. + +

+ See: macros, + triggers, + /def, + /purge, + /undef + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/unhook.html b/help/commands/unhook.html new file mode 100644 index 0000000..5c70c89 --- /dev/null +++ b/help/commands/unhook.html @@ -0,0 +1,29 @@ +TinyFugue: /unhook + +

/unhook

+ +

+ Usage: + +

+ /UNHOOK event + [pattern]
+


+ +

+ Removes a macro with an associated + hook on event pattern. + +

+ See: hooks, + /hook, + /purge, + /undef + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/unset.html b/help/commands/unset.html new file mode 100644 index 0000000..e7241b4 --- /dev/null +++ b/help/commands/unset.html @@ -0,0 +1,32 @@ +TinyFugue: /unset + +

/unset

+ +

+ Usage: + +

+ /UNSET name
+


+ +

+ /Unset removes the value of + variable name. + +

+ /Unset returns 0 if an error + occurred, nonzero otherwise. + +

+ See: variables, + /set, + /setenv, + /let + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/untrig.html b/help/commands/untrig.html new file mode 100644 index 0000000..a7faf5e --- /dev/null +++ b/help/commands/untrig.html @@ -0,0 +1,34 @@ +TinyFugue: /untrig + +

/untrig

+ +

+ Usage: + +

+ /UNTRIG [-aattrs] + trigger
+


+ +

+ Removes a macro with an associated + trigger that is + triggered by the pattern + trigger and has attributes + attrs. If -aattrs is omitted, -an is assumed. + Trigger is matched against existing + triggers using simple comparison. + +

+ See: triggers, + /trig, + /purge, + /undef + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/unworld.html b/help/commands/unworld.html new file mode 100644 index 0000000..e4ee178 --- /dev/null +++ b/help/commands/unworld.html @@ -0,0 +1,33 @@ +TinyFugue: /unworld + +

/unworld

+ +

+ Usage: + +

+ /UNWORLD name...
+


+ +

+ For each name given, /unworld + removes the definition of the world with that name. + The history for removed worlds will be + deleted, but some or all of the lines may still exist in the global + history. + +

+ The return value of /unworld + is the number of worlds that were removed. + +

+ See: worlds, + /addworld + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/version.html b/help/commands/version.html new file mode 100644 index 0000000..61d21b9 --- /dev/null +++ b/help/commands/version.html @@ -0,0 +1,36 @@ +TinyFugue: /version + + +

/version

+ +

+ Usage: + +

+ /VERSION
+ /VER
+


+ +

+ /Version displays the TinyFugue + version you're running and the operating system for which it was compiled + (if known). + +

+ /Ver displays an abbreviated version + number. + +

+ The latest version of TF can be found at + http://tinyfugue.sourceforge.net/. + +

+ See: /changes + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/watchdog.html b/help/commands/watchdog.html new file mode 100644 index 0000000..c427d91 --- /dev/null +++ b/help/commands/watchdog.html @@ -0,0 +1,43 @@ +TinyFugue: /watchdog + +

/watchdog

+ +

+ Usage: + +

+ /WATCHDOG [OFF|ON]
+ /WATCHDOG n1 [n2]
+


+ +

+ Sets the flag + %{watchdog}. This + flag determines whether Fugue will watch for identical lines and suppress + them. Fugue looks for lines which have occurred n1 times out of + n2 (n1 defaults to 2 and n2 to 5) and suppress them, + so with the default settings Fugue will suppress any lines that have + occurred 2 times out of the last 5. + +

+ The n1 and n2 settings for + /watchdog are distinct from the + n1 and n2 settings for + /watchname. + +

+ The flag + %{watchdog} + defaults to 0 (off). + +

+ See: %watchdog, + /watchname + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/watchname.html b/help/commands/watchname.html new file mode 100644 index 0000000..b62b371 --- /dev/null +++ b/help/commands/watchname.html @@ -0,0 +1,46 @@ +TinyFugue: /watchname + +

/watchname

+ +

+ Usage: + +

+ /WATCHNAME [OFF|ON]
+ /WATCHNAME n1 + [n2]
+


+ +

+ Sets the flag + %{watchname}. + This flag determines whether Fugue will watch for players displaying lots + of output. Fugue looks for names which have begun the line n1 times + out of n2 (n1 defaults to 4 and n2 to 5) and + gag that person (with a message), + so with the default settings Fugue will + gag any person whose name has begun + 4 of the last 5 lines. + +

+ The n1 and n2 settings for + /watchname are distinct from the + n1 and n2 settings for + /watchdog. + +

+ The flag + %{watchname} + defaults to 0 (off). + +

+ See: %watchname, + /watchdog + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/while.html b/help/commands/while.html new file mode 100644 index 0000000..e2e2710 --- /dev/null +++ b/help/commands/while.html @@ -0,0 +1,78 @@ +TinyFugue: /while + + + + +

/while

+ +

+ Usage: + +

+ /WHILE (expr) + list /DONE
+ /WHILE list + /DO list + /DONE
+


+ +

+ The lists may be any list of commands. The return value of a + list is the return value of the last command executed in the + list. Each list must be terminated by + "%;". + +

+ The list or expr following the + /WHILE is called the condition. The + condition is executed or evaluated, and if its result is non-zero, the next + list is executed. This sequence is repeated until the condition + returns zero. + +

+ The /BREAK command can be used within + the loop to terminate the loop early. The loop can also be terminated + early by catching a SIGINT (usually generated by typing ^C). If the + variable + %{max_iter} is + non-zero, the loop will terminate automatically if the number of iterations + reaches that number. + +

+ When /WHILE is used on the command + line, "%;" command separation + will be done even if + %sub=off. Of course, + full substitution will be done if + %sub=full. + +

+ Example: + +

+

+  /def count = \
+      /let i=1%; \
+      /while (i <= {1}) \
+	  say %{i}%; \
+	  /let i=$[i + 1]%; \
+      /done
+
+ +

+ The command "/count 10" will execute the commands "say 1", "say 2", ... + "say 10". + +

+ See: evaluation, + /test, + /break, + /for + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/commands/world.html b/help/commands/world.html new file mode 100644 index 0000000..18727bb --- /dev/null +++ b/help/commands/world.html @@ -0,0 +1,41 @@ +TinyFugue: /world + +

/world

+ +

+ Usage: + +

+ /WORLD [-lqnxfb] [world]
+ /WORLD host port
+


+ +

+ If world is already connected, + "/world world" is equivalent to + "/fg world", and brings + world into the foreground. If world is not connected, + "/world world" is equivalent to + "/connect world", and + attempts to open a connection to that world. + +

+ The second form is equivalent to + "/connect host port". + +

+ The -lqnxfb options are the same as those for + /fg and + /connect. + +

+ See: /connect, + /fg + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/html2tf.c b/help/html2tf.c new file mode 100644 index 0000000..81ae15b --- /dev/null +++ b/help/html2tf.c @@ -0,0 +1,552 @@ +/* + * html2tf.c - convert limited html format to tf helpfile format. + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) + * + * Usage: html2tf FILE... + * Converts each FILE and prints the result on stdout. + * + * Everything after this is ignored. + * +
+Back to tf home page +
Copyright © 1995 - 1999 +Ken Keys diff --git a/help/topics/attributes.html b/help/topics/attributes.html new file mode 100644 index 0000000..cc06ae2 --- /dev/null +++ b/help/topics/attributes.html @@ -0,0 +1,178 @@ +TinyFugue: display attributes + + + + + + + + + + + + +

display attributes

+ +

+ Many TF commands take an argument to specify an + attribute list, + containing one or more of: + "n" (none), + "x" (exclusive), + "g" (gag), + "G" (nohistory), + "L" (nolog), + "A" (noactivity), + "u" (underline), + "r" (reverse), + + + "B" (bold), + "b" (bell), + "h" (hilite), + "E" (error), + "W" (warning), + or + "Ccolor" (color). + These + attributes are used to display text + associated with the command. + Use commas to separate attributes within an attribute list; commas may be + omitted between single-letter attributes. For example, + "BuCred,Cbgyellow" means bold underlined red text on a yellow + background. + +

+ "None" ("n") is useful for finding macros without attributes (e.g. + "/list -an") or + for turning off attributes in the middle of a line (e.g. + "/echo -p foo @{u}bar@{n} baz"). + +

+ Normally, new attributes are combined with the pre-existing attributes. + But if the new attributes include "x" (exclusive), the pre-existing + display attributes are turned off first. + + So, for example, if one trigger with + -au and another trigger with + -Pr match the same line, the whole + line will be underlined and part of it will also be reversed; but if the + second trigger had -Pxr instead, + then most of the line would be underlined, and part would be reversed but + not underlined. + +

+ The "G" (nohistory) + attribute + prevents the line from being recorded in + history. + The "L" (nolog) + attribute + prevents the line from being recorded in a + log file. + +

+ The "A" (noactivity) + attribute + prevents the line from causing an + ACTIVITY + hook or a nonzero + moresize(). + For example, the following command prevents people connecting and + disconnecting from counting as activity: +

+      /def -aA -q -t"{*} has {*connected.}" noact_connect
+  
+ +

+ The "Cname" (Color) + attribute + allows you to name a color. + The "C" must be followed by the name of the color; a comma after + the name can be used to separate it from attributes that follow it. + Depending on your terminal and how tf was compiled, there may be 8, 16, + or 256 colors available. + See: color. + +

+ The "h" (hilite), + "E" (error), and "W" (warning) + attributes are special. When + "h", "E", or "W" is specified, it is replaced with the + attributes listed in + the %{hiliteattr}, + %{error_attr}, or + %{warning_attr} + variable, respectively. + Additionally, error and warning messages generated by tf automatically + have the "E" and "W" attributes, + so you can alter their appearance by setting the corresponding variable. + For example, the commands +

+      /set hiliteattr=r
+      /echo -ahu foobar
+
+ will display the word "foobar" with reverse and underline + attributes. + %{hiliteattr} + makes it easy to change the meaning of all your hilite macros at once, + without editing each one individually. + +

+ The "f" (flash) and "d" (dim) + attributes are accepted + for backward compatibility, but ignored. + +

+ All attributes except 'n' may be + combined usefully. (Even gags can + be combined with other attributes: + combining 'g' and 'B', for example, will + gag the text initially, but will + display it as bold if it is recalled with + /recall -ag.) + +

+ It is possible to apply + attributes to a part of a line, + using /partial or the + -P option of + /def. If two or more partial + attributes overlap, their + effects will be combined (unless the "x" attribute is used). For example, + overlapping bold and reverse will appear bold and reverse; + overlapping blue and red will appear magenta. + +

+ Ansi attribute codes sent by the + server will be interpreted by tf if + %{emulation} is + set to "ansi_attr". See: + %emulation. + +

+ As of version 5.0, attributes + in string values are preserved by just about every string operation, + including + commands, + variables, + expression operators, + functions, + regexp substitutions, + $() command substitution, and + status bar field expressions. + The inline_attr() + function can be used to convert attribute codes within a string to actual + attributes. + +

+ Attributes not supported by your + terminal type will be stored, but not displayed. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/catch_ctrls.html b/help/topics/catch_ctrls.html new file mode 100644 index 0000000..e29f0cb --- /dev/null +++ b/help/topics/catch_ctrls.html @@ -0,0 +1,10 @@ +TinyFugue: %catch_ctrls + +

%catch_ctrls

+ See: %emulation + +
+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/colors.html b/help/topics/colors.html new file mode 100644 index 0000000..557befa --- /dev/null +++ b/help/topics/colors.html @@ -0,0 +1,165 @@ + + + + + + + +TinyFugue: colors + + + + + + + +

colors

+ +

+ Color is enabled by default. To disable it, use "/color_off"; to re-enable + color using ANSI codes, use "/color_on". + +

+ The color attribute + allows you to specify a foreground color with "Cname" + or a background color with "Cbgname". + Any terminal that supports color should support the 8 basic colors: + black (black), + red, + green, + yellow, + blue, + magenta, + cyan, + white (white). + (If you are reading this in tf, and the previous sentence did not contain + colored words, you do not have working color support. + If it contained strange codes, you should do + "/color_off" or redefine the codes as described below.) + The standard library defines these 8 basic colors with ANSI control codes, + which will work on most terminals that support color. + +

+ Many terminals also support brighter versions of the 8 basic colors, but + may need to be configured to do so. On xterm, you may want + to disable the "boldColors" resource so that bold plus a normal color + does not produce one of these bright colors. + The bright color names are: + gray, + brightred, + brightgreen, + brightyellow, + brightblue, + brightmagenta, + brightcyan, or + brightwhite. + The standard library defines these 8 bright colors with ISO 6429 extension + control codes, which will work on most terminals that support 16 colors. + +

+ Some newer terminals can display 256 colors. If tf was built + with the "256colors" feature, + tf will recognize the following additional color names. + Names names of the form "rgbRGB" describe a color + within a 6x6x6 color cube: R, G and B are each a + single digit between 0 and 5 that specifies the brightness of the + red, green, or blue component of the color. + For example, "rgb020" is a dark green, and "rgb520" is reddish orange. + Names of the form "grayN" describe a point on a grayscale, where + N is between 0 (dark) and 23 (light). + The standard library defines the "rgb*" and "gray*" colors with + xterm 256 color extension control codes. + +

+ To test the functionality and appearance of colors in tf, you can + "/load testcolor.tf". + This will also show the + R, G and B values of each color. + +

+ You can use a defined color in any + attribute string. For example, to + make /hilite'd text appear blue, you + can /set + hiliteattr=Cblue. + +

+ To define your own control codes for terminals that don't accept the + predefined codes, + you will need to edit the color + variables. + The code to enable foreground or background color name is stored in a + variable called + %{start_color_name} or + %{start_color_bgname}. + The code to turn off colors is stored in + %{end_color}. + These variables may contain carat + notation and backslashed ascii codes in + decimal, octal, or hexadecimal (e.g., ESC is ^[, \27, \033, or \0x1B). + +

+ The default definition of + %end_color + is "\033[39;49;0m", which should work on most ANSI-like + terminals. If this does not work on your terminal, then try + "/set + end_color + \033[30;47;0m" (for black on white) or + "/set + end_color + \033[37;40;0m" (for white on black). + +

+ If %{emulation} is + set to "ansi_attr" (the default), then ANSI, ISO 6429, and xterm 256 color + extension codes sent by the server will be interpreted by + tf. As a result, if the + %{start_color_name} + variables are set correctly for + your terminal, tf will translate color codes from the server into codes + for your terminal, displaying them correctly even if your + terminal does not use the same codes the server sends. See: + %emulation. + +

+ Note for "screen(1)" users: to make 8-16 colors work under Screen, you + need the following screenrc settings: +

+    termcap  xterm AF=\E[3%dm
+    terminfo xterm AF=\E[3%p1%dm
+    termcap  xterm AB=\E[4%dm
+    terminfo xterm AB=\E[4%p1%dm
+  
+ To make 256 colors work under Screen, it must have been compiled with + "--enable-colors256", and you need the following screenrc settings: +
+    terminfo xterm Co=256
+    termcap  xterm Co=256
+    termcap  xterm AF=\E[38;5;%dm
+    terminfo xterm AF=\E[38;5;%p1%dm
+    termcap  xterm AB=\E[48;5;%dm
+    terminfo xterm AB=\E[48;5;%p1%dm
+  
+ +

+ Colors are numbered 0 through 255 in the order in which they are + described above, but referring to colors by their enumeration number is + generally not recommended, as the numbering is subject to change. + In particular, the numbering and interpretation of background colors + changed in version 5.0 beta 7. + +

+ See: attributes + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + + + diff --git a/help/topics/copyright.html b/help/topics/copyright.html new file mode 100644 index 0000000..d893fa8 --- /dev/null +++ b/help/topics/copyright.html @@ -0,0 +1,55 @@ +TinyFugue: copyright + + + + +

copyright

+ +

+ TinyFugue - programmable mud client
+ Copyright © 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) + +

+ PCRE regexp package is Copyright © 1997-1999 University of Cambridge + +

+ For bug reports, questions, suggestions, etc., + see "problems". + +

+ This program is free software; you can redistribute it and/or modify it + under the terms of the + GNU General Public License + as published by the Free + Software Foundation; either version 2 of the + License, or (at your option) + any later version. + +

+ This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +

+ You should have received a copy of the + GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +

+ + + + + + For information on TinyFugue 5.0b8 and earlier, check out the official + sourceforge + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/debugging.html b/help/topics/debugging.html new file mode 100644 index 0000000..16c6ab7 --- /dev/null +++ b/help/topics/debugging.html @@ -0,0 +1,45 @@ +TinyFugue: debugging + + + +

Debugging

+ +

+ Debugging topics: +

    +
  • %kecho + - echo keyboard input +
  • %mecho + - echo macros as they execute +
  • %qecho + - echo generated /quote text +
  • %secho + - echo text sent to server +
  • %pedantic + - enable extra warnings +
  • %defcompile + - display syntax errors when macros are defined instead of the + first time they are used +
  • %emulation=debug + - display nonprintable characters +
  • %telopt + - echo telnet negotiation +
  • /trigger -n + - see what macros would be triggered +
  • /addworld -e + - simulated "loopback" server +
  • /runtime + - measure running time of commands +
+ +

+ See also: + hints + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/evaluation.html b/help/topics/evaluation.html new file mode 100644 index 0000000..e1a7186 --- /dev/null +++ b/help/topics/evaluation.html @@ -0,0 +1,138 @@ +TinyFugue: evaluation + + + + + + + +

evaluation

+ +

+ A Builtin Command is any of the commands listed under + "commands". All builtin commands start with + "/". All builtins have a return value, usually nonzero for success and 0 + for failure. + +

+ A Macro Command is a user-defined + command. Macro commands also start + with '/'. The return value of a macro + is the return value of its body when executed. + +

+ + + + + A command starting with a single "/" is either + a Macro Command or + a Builtin Command. + If the "/" is followed by "!", the return value of the command will be + negated. + If the "/" or "/!" is followed by "@", the rest of the word is interpreted + as the name of a Builtin Command. + If the "/" or "/!" is followed by "#", the rest of the word is interpreted + as the number of a macro. + If neither "@" nor "#" is used (the normal case), the rest of the word is + interpreted as a macro if there is one + with that name, otherwise it is interpreted as the name of a + Builtin Command. + If the name does not match any macro or + Builtin Command, + the NOMACRO + hook is called. + + +

+ A Simple Command is any command that does not start with "/". The text of + such a command is sent directly to the + current world, if there is one. + The return value of a simple command is 1 if the text is successfully sent to + the current world, otherwise 0. + To send a line that starts with "/" without having it interpreted as a + Macro Command or + Builtin Command, + use a leading "//"; the first "/" will be stripped. + +

+ A Compound Command is one of + /IF.../ENDIF + or + /WHILE.../DONE. + These are described under separate help sections. Their return value is + that of the last command executed. + +

+ A List is a sequence of commands separated by + "%;" (separator) or + "%|" (pipe) tokens. + The commands are executed in sequence, but may be aborted early + with the /RETURN + or /BREAK commands. + and the return value of the List is + the return value of the last command executed in the sequence. + An empty List has a return value of 1. + +

+ Two commands separated by "%|" + pipe token mentioned above will have the output stream + (tfout) of the first connected to + the input stream (tfin) of the second. + The first command runs to completion before the second command begins; + the second command should stop reading tfin + when it becomes empty. + Simple Commands have no tfin or + tfout, so they may not be piped. + The tfout of a Compound Command may + not be piped directly, but the output of a macro that contains a + Compound Command may be piped. + +

+ Some characters within a macro body + undergo substitution. These special characters are not interpreted as + themselves, but cause some evaluation to be performed, and the result + substituted in place of these characters. This is described under + "substitution". + +

+ + When an + expansion begins, a new scope is + created. Any local variables created + during the expansion will be placed + in this new scope. The scope and all + variables in it are destroyed when + the expansion exits. + +

+ Any variable reference will refer to + the variable with that name in the + nearest enclosing (i.e., most recently created) still existing scope. This + is called "dynamic scope". + +

+ Lexical scope can be simulated to some extent by using + variable + substitutions with the correct number of "%"s instead of + variable + references. (Remember, a "reference" uses the name by itself in an + expression, like + "/test foo"; a + "substitution" uses "%" characters, like + "/test %foo"). + +

+ See: commands, + macros, + substitution, + /if, + /while + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/expnonvis.html b/help/topics/expnonvis.html new file mode 100644 index 0000000..45332dc --- /dev/null +++ b/help/topics/expnonvis.html @@ -0,0 +1,59 @@ +TinyFugue: experimental non-visual mode + + + +

experimental non-visual mode

+ +

+ TF 5.0 beta 5 has a new experimental non-visual mode ("expnonvis") that + fixes design flaws in traditional + non-visual mode. + I may get rid of traditional non-visual mode in the future, so if + you use it, I suggest you try expnonvis mode now and let me know + if you don't like it. + To enable expnonvis mode, + "/set expnonvis=on" and + "/set visual=off". + You may also want to + "/set kecho=on" + (see below). + +

+ In the new expnonvis mode, input is only ever visible on the bottom line. + It scrolls your input buffer left and right as needed to display the part + of the input buffer in the neighborhood of the cursor. The part of the line + that is "off the left edge" of the screen is simply not visible. + In traditional non-visual mode, that part of the line would scroll up, + polluting the output region with partial input lines. + +

+ The "only on bottom line" rule applies even when you hit return to execute + the input line. Your input is erased, and the command is executed; it does + not scroll up. If you want to see the input text scroll up, you can + "/set kecho=on"; + this will print the entire input, not just the last segment of it that fit + within the screen width. You may also want to set + %kecho_attr + so that the echoed input is easily distinguishable from regular output. + +

+ The minimum amount of scrolling is determined by the %sidescroll variable, + which defaults to 1. For slow terminals, you may wish to increase this. + Any movement that would exceed half the screen width does not use the + terminal's scrolling, but instead redraws the line. + +

+ The current implementation probably has a few bugs; if the screen display + ever appears incorrect, use ^R or ^L to redraw it. + I don't think there are any fatal bugs, but it is possible that some + remain, so don't try expnonvis unless you don't mind crashing tf. + Terminals without the delete character capability are not yet supported, + but will be in the future. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/expressions.html b/help/topics/expressions.html new file mode 100644 index 0000000..9a26d48 --- /dev/null +++ b/help/topics/expressions.html @@ -0,0 +1,348 @@ +TinyFugue: expressions + + + + + + +

expressions

+ +

+ Expressions apply operators + to numeric and string operands, and return a result. + They can be used in + $[...] expression subs, + the condition of + /if and + /while statements, + the condition of /def -E, + and as arguments to /return, + /result, and + /test commands. + +

+ + + + + + + + + + + + + + +

Operands

+ Operands can be any of: +
    +
  • Integer constants (e.g., 42). +
  • Real decimal point constants ("reals", for short) containing + a decimal point (e.g., 12.3456789) or + exponent (e.g., 1e-2) or + both (e.g., 1.23e4). +
  • Time duration ("dtime") values of the form hours:minutes, + hours:minutes:seconds, or + seconds (where seconds may contain a decimal point + followed by up to 6 digits), + will be interpreted as real seconds (e.g., 0:01:02.3 == 62.3), + and can be used anywhere a number is expected. +
  • Absolute time ("atime") values, in the form of a number with up to 6 + decimal places. On most systems, this represents the number of seconds + since 1970-01-01 00:00:00 UTC. +
  • Strings of characters, surrounded with quotes (", ', or `, with the + same kind of quote on each end), like "hello world". +
  • Variable references (see below) + like visual. +
  • Variable substitutions + (see below) like {visual} and {1}. +
  • Macro substitutions + like ${COMPRESS_SUFFIX}. +
  • Command substitutions + like $(/listworlds + -s). +
+ +

+ Named variables may be accessed by + simply using their name (with no leading '%'). This is called a + variable reference, and is the + preferred way of using a + variable in an expression. + The special substitutions + (*, + ?, + #, + n, + Ln, + Pn, + R) + may not be used this way. + +

+ Variable substitutions of the + form "{selector}" and + "{selector-default}" may be + used. They follow the same rules as + variable substitution in + macros, except that there is no leading + '%', and the '{' and '}' are required. + The special substitutions + (*, + ?, + #, + n, + Ln, + Pn, + R) + are allowed. + +

+ Macro-style + variable substitutions + beginning with '%' may also be used, but are not + recommended, since the multiple '%'s required in nested + macros can quickly get confusing. It + always easier to use one of the above methods. + + +

+ +

Operators

+ In the following list, operators are listed in groups, from highest to + lowest precedence. Operators listed together have equal precedence. The + letters in the table below correspond to the type of objects acted on by + the operators: + n for numeric (integer or real); + s for string; + e for any expression. + All operators group left-to-right except assignment, + which groups right-to-left. + If any binary numeric operator is applied to two integers, the result + will be an integer, unless the result would overflow, in which case it + is converted to real. If either operand is a real, the other will + be converted to real if it is not already a real, and the result will be + a real. +

+ +

+ +
(e) +
Parentheses, for grouping. + +

+
func(args) +
Perform function + func on arguments args. + (see: functions). + +

+
!n +
Boolean NOT (1 if n==0, otherwise 0). +
+n +
Unary positive (useful for converting a string to a number). +
-n +
Unary negative. +
++v +
Equivalent to + (v := v + 1). +
--v +
Equivalent to + (v := v - 1). + +

+
n1 * n2 +
Numeric multiplication. +
n1 / n2 +
Numeric division. + Remember, if both operands are type integer, the result will be + truncated to integer. + +

+
n1 + n2 +
Numeric addition. +
n1 - n2 +
Numeric subtraction. + +

+
n1 = n2 +
Numeric equality (but easily confused with assignment; + you are advised to use == instead). +
n1 == n2 +
Numeric equality. +
n1 != n2 +
Numeric inequality. +
s1 =~ s2 +
String equality (case sensitive, + attribute insensitive). +
s1 !~ s2 +
String inequality (case sensitive, + attribute insensitive). +
s1 =/ s2 +
String s1 matches + glob pattern s2. +
s1 !/ s2 +
String s1 does not match + glob pattern s2. +
n1 < n2 +
Numeric less than. +
n1 <= n2 +
Numeric less than or equal. +
n1 > n2 +
Numeric greater than. +
n1 >= n2 +
Numeric greater than or equal. + +

+
n1 & n2 +
Boolean AND. n2 will be evaluated if and only if + n1 is nonzero. + +

+
n1 | n2 +
Boolean OR. n2 will be evaluated if and only if + n1 is zero. + +

+
n ? e1 : e2 +
n ? : e2 +
Conditional. If n is nonzero, the result is the + value of expression + e1; otherwise it is the value of + expression e2. + If e1 is omitted, the value of n is used in + its place. + Note that digits followed by a colon is interpreted as a dtime value, + so if the e2 operand of the ?: operator is an integer, + you must separate it from the colon (with a space or parenthesis, + for example). + +

+
v := e +
Assignment. The identifier "v" refers to the + variable in the nearest scope. + If not found, a new variable + is created at the global level, as if by + /set. + If v is a + special variable, + the value of e may need to be converted to the type of + v, or the assignment may fail altogether if the value + is not legal for v. The value of the assignment + expression is the new value of v. + +
v += n +
Equivalent to + v := v + (n). +
v -= n +
Equivalent to + v := v - (n). +
v *= n +
Equivalent to + v := v * (n). +
v /= n +
Equivalent to + v := v / (n). + +

+
e1 , e2 +
Comma. Expressions + e1 and e2 are evaluated; the result is the + value of e2. Only useful if e1 has some side + effect. +
+ +

+ The comparison operators return 0 for false, nonzero for true. The boolean + operators (& and |) stop evaluating as soon as the value of the + expression is known + ("short-circuit"), and return the value of the last operand evaluated. + This does not affect the value of the + expression, but is important when + the second operand performs side effects. + +

+ Normal (non-enumerated) + Variables set with any of the + assignment operators keep the type of the + expression assigned to them. + This is different than /set and + /let, which always assign a string value + to the variables. + This distinction is important for real numeric values, which lose precision + if converted to a string and back. + + +

+ All operands will be automatically converted to the type expected by the + operator. +

    +
  • String to numeric: leading signs, digits, colons, and exponents are + interpreted as an integer, decimal (real), or dtime (real) value; e.g., + "12abc" becomes 12, + "12.3junk" becomes 12.3, + "0:01:02.3" becomes 0:01:02.3, + and "xyz" becomes 0. + +
  • Integer to real: straightforward. + +
  • Real to integer: the fractional part is truncated. + +
  • Enumerated variable to + string: straightforward string value. + +
  • Enumerated variable to + numeric: one integer stands for each of the allowed values. + "Off" is always 0, "on" is always 1, etc. + This makes (!visual) + and (visual == 0) the same + as (visual =~ 'off'). + +
  • Integer to string: straightforward. +
  • Real to string: decimal notation if the exponent + is greater than -5 and less than + %sigfigs, + otherwise exponential notation. + +
  • Normal (non-enumerated) + variables are treated as whatever + type their value has. +
+ + +

+

Examples

+ Given the variables +
+    /set X=5
+    /set name=Hawkeye
+    /set visual=1
+
+ here are some expressions and + their values: +
+    Expression		   Value   Comments
+    ----		   -----   --------
+    3 + X * 2		      13   3 + (5 * 2) = 13.
+    "foo" =~ "bar"	       0   "foo" is not identical to "bar".
+    name =/ 'hawk*'	       1   "Hawkeye" matches the glob "hawk*".
+    X =~ "+5"		       0   X is interpreted as string "5".
+    X == "+5"		       1   string "+5" is converted to integer 5.
+    visual & (X > 0)	       1   visual is nonzero, AND %X is positive.
+
+ +

+ See: functions, + /test, + evaluation, + patterns + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/filenames.html b/help/topics/filenames.html new file mode 100644 index 0000000..d4d1d1a --- /dev/null +++ b/help/topics/filenames.html @@ -0,0 +1,39 @@ +TinyFugue: filename expansion + + + + +

filename expansion

+ +

+ Certain strings are treated as filenames in tf + (%{TFHELP}; + %{TFLIBDIR}; + %{TFLIBRARY}; + arguments to /load, + fwrite(); etc.). + Those strings undergo filename expansion as described below. + +

+ If file begins with '~', all characters after the '~' up to the + first '/' or end of string are treated as a user name, and the '~' and user + name are replaced with the name of the home directory of that user. If the + user name is empty, + %{HOME} is substituted. + +

+ For example, if bob's home directory is /users/bob, then the command + "/load ~bob/macros.tf" + will attempt to load the file /users/bob/macros.tf. + +

+ "~user" expansion is not supported on systems that do not have the + getpwnam() function. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/functions.html b/help/topics/functions.html new file mode 100644 index 0000000..68abd1b --- /dev/null +++ b/help/topics/functions.html @@ -0,0 +1,906 @@ +TinyFugue: functions + + +

functions

+ + + +

+ In an expression, a function + operates on 0 or more arguments and returns a result. + A function call is made with a function name, followed by a parenthesized + list of comma-separated arguments: + "name(arg1, arg2, ... + argN)". + +

+ There are three kinds of objects that can be called as functions: + builtin functions, + macros, and builtin commands. + They are searched in that order, so if a builtin function and a macro + have the same name, using that name in a function call will invoke the + builtin function. + +

+ A macro called as a function can be called with any number of arguments; + each argument corresponds to a + positional parameter + (%1, + %2, etc.). + For example, if "spam" is a macro, the function call +

spam("foo", "bar", "baz")
+ will set the parameters the same as in the command invocation +
/spam foo bar baz
+ The function call syntax allows + positional parameters + to contain spaces, which is not possible in the command syntax. + (Note: prior to version 4.0, a macro called as a function could only take + 0 or 1 arguments, and a single argument was broken into positional parameters + at whitespace.) + A macro can set its return value using + /return or + /result. + +

+ A builtin command called as a function can have 0 or 1 arguments; the + argument is treated as a command line. + For example, the function call +

def("-t'{*} has arrived.' greet = :waves.")
+ is the same as the command invocation +
/def -t'{*} has arrived.' greet = :waves.
+ +

+ To evaluate a function for its "side effect" only, you can call it from + /test and ignore the return value + (e.g., "/test + kbdel(0)"). + +

+ +

Builtin functions

+ +

+ In the following list of builtin functions, the first letter of each + argument indicates its type: + s for string, + i for integer, + r for real, + n for any numeric type, or + f for flag (0 or "off"; or, 1 or "on"). + +

+

Mathematical functions

+Angles are in radians. +
+ + + +
abs(n) +
Absolute value of n. Result has the same numeric type + as n. + + + +
sin(r) +
(real) Sine of r. + + + +
cos(r) +
(real) Cosine of r. + + + +
tan(r) +
(real) Tangent of r. + + + +
asin(r) +
(real) Arcsine of r, in the range [-pi/2, pi/2]. + r must be in the domain [-1, 1]. + + + +
acos(r) +
(real) Arccosine of r, in the range [0, pi]. + r must be in the domain [-1, 1]. + + + +
atan(r) +
(real) Arctangent of r, in the range [-pi/2, pi/2]. + + + +
exp(r) +
(real) e raised to the power r. + + + +
pow(n1, n2) +
(real) n1 raised to the power n2. + If n1 is negative, n2 must be an integer. + + + +
sqrt(n) +
(real) Square root of n + (same as pow(n, 0.5)). + + + + + + + +
ln(n) +
(real) Natural logarithm of n. + n must be positive. + The base B logarithm of any number N can be found with the expression + ln(N) / ln(B). + +
log10(n) +
(real) Base 10 logarithm of n. + n must be positive. + + + +
mod(i1,i2) +
(int) Remainder of i1 divided by i2. + + + +
trunc(r) +
(int) Integer part of r. + + + + +
rand() +
(int) Random integer in the range [0, system maximum]. +
rand(i) +
(int) Random integer in the range [0, i - 1]. +
rand(i1,i2) +
(int) Random integer in the range [i1, i2]. + + +
+ +

+

Input/output functions

+
+ + +
echo(s1 [,attrs [,inline + [,dest]]]) +
(int) Echoes s1 to the screen or dest with + attributes attrs, + interpreting inline attribute + codes if the flag inline is 1 or "on". + See: "echo()". + + +
send(s1[, world[, flags]]) +
(int) Sends string s1 to world . + See send(). + + +
prompt(s1) +
(int) Sets the prompt of the + current socket + to s1. + See /prompt. + + + +
fwrite(s1,s2) +
Writes string s2 to the end of file s1. + fwrite() is good + for writing a single line, but when writing multiple lines it is + more efficient to use + tfopen(), a series + of tfwrite(), + and a tfclose(). + Display attributes in + s2 are not written. + + + +
tfopen(s1, s2) +
tfopen() +
(int) Open a tfio stream + using file s1 and mode s2. + See tfio. + + + +
tfclose(i) +
(int) Close the stream + indicated by handle i. + See tfio. + + + +
tfread(i, v) +
tfread(v) +
(int) Read into variable v from the + stream indicated by + handle i. + See tfio. + + + +
tfwrite(i, s) +
tfwrite(s) +
(int) Write s to the + stream indicated by + handle i. + See tfio. + + + +
tfflush(i) +
Flushes the stream + indicated by handle i. +
tfflush(i, f) +
Disables (if f is 0 or "off") or + enables (if f is 1 or "on") automatic flushing for the + stream indicated by handle + i. + See tfio. + + + +
read() +
Obsolete. Use + tfread() instead. + + +
+ +

+

String functions

+ +

+ String positions are always counted from 0. Therefore the first character + of a string s is + substr(s, 0, 1), + and the last character is + substr(s, + strlen(s)-1). + +

+ Range checking is done on string positions. Any position given outside the + allowed range will be silently forced to the closest value that is in the + range. + +

+ + +
ascii(s) +
(int) Integer code of the first character of s, + The character does not have to be ASCII, but may be any character + allowed by your locale. + + + +
char(i) +
(str) character with integer code i. If + i is outside the range allowed by your + locale, + it will be silently forced into the allowed range. + + + +
tolower(s) +
tolower(s, i) +
(str) Convert the first i (default all) characters + in s to lower case. + + + +
toupper(s) +
toupper(s, i) +
(str) Convert the first i (default all) characters + in s to upper case. + + + +
pad([s, i]...) +
(str) There may be any number of (s, i) pairs. + For each pair, s is padded with spaces to a length equal to + the absolute value of i. + If i is positive, s is right-justified (left-padded); + If i is negative, s is left-justified (right-padded). + The result is the concatenation of all the padded strings. + + + +
regmatch(s1, s2) +
(int) If string s2 matches + regexp s1, + regmatch() returns a positive integer indicating the number + of captured substrings (including + %P0). + regmatch() returns 0 if string s2 does not match + regexp s1. + After a successful match, captured substrings can later be + extracted using the Pn + variables or + %Pn + substitutions. + (See also: regexp) + + + +
replace(s1, s2, s3) +
(int) Returns s3 with every occurrence of s1 + replaced with s2. + See: "/replace". + + + +
strcat(s...) +
(str) Returns the concatenation of all string arguments. + + + +
strchr(s1, s2) +
strchr(s1, s2, i) +
(int) Searches for any character of s2 in + s1 starting at position i (default 0), and + returns the position if found, or -1 if not found. + If i is negative, it is counted as an absolute value + from the end of s. + + + +
strcmp(s1, s2) +
(int) Returns an integer less than, equal to, or greater than 0 + if s1 is lexicographically less than, equal to, or greater + than s2, respectively. + + + +
strcmpattr(s1, s2) +
(int) Like + strcmp(), + except that in order for the strings to + be considered equal, both their text and their attributes must + be equal. In other words, + strcmp(encode_attr(s1), encode_attr(s2)) + The ordering of attributes is not documented, and may change + between versions of tf. + + + +
strlen(s) +
(int) Length of string s. + + + +
strncmp(s1, s2, i) +
(int) Like + strcmp(), but + compares only the first i characters of s1 and + s2. + + + +
strrchr(s1, s2) +
strrchr(s1, s2, i) +
(int) Searches backward in s1 starting at position + i (default: end of s1) for any character of s2, + and returns the position if found, or -1 if not found. + If i is negative, it is counted as an absolute value + from the end of s. + + + +
strrep(s, i) +
(str) Returns a string containing i repetitions of + s. + + + +
strstr(s1, s2) +
strstr(s1, s2, i) +
(int) Searches for s2 in + s1 starting at position i (default 0), and + returns the position if found, or -1 if not found. + + + +
substr(s, i1) +
substr(s, i1, i2) +
(str) Substring of s, starting at position i1, + with length i2. If i2 is omitted, it defaults to + the remaining length of s. If i1 or i2 is + negative, they are counted as absolute values from the end of + s. + + + +
strip_attr(s) +
(str) Returns s with all display + attributes removed. + + + + + +
decode_attr(s1 [, s2 [, f]]) +
(str) Returns s1 with + "@{attr}" codes interpreted as display + attributes, + as in /echo -p. + If present, s2 is a string of + attributes + that will be applied to the entire string + (as in /echo -as2). + If f is present and equal to 0 or "off", then + "@{attr}" codes are not interpreted; this is useful + for applying s2 attributes with no other effects. + + + +
encode_attr(s) +
(str) Returns s with + display attributes + encoded in "@{attr}" form. + + + +
decode_ansi(s) +
(str) Returns s with attribute control codes interpreted as + display attributes, and, if + %expand_tabs + is on, tabs are expanded to spaces according to + %tabsize. + Any attributes originally on s are not copied + to the result. + The attribute control codes recognized include ANSI codes, + ISO 6429 16-color extension codes, + and xterm 256-color extension codes. + + + +
encode_ansi(s) +
(str) Returns s with + display attributes + encoded in terminal control code form. + The control codes generated include ANSI codes, + ISO 6429 16-color extension codes, + and xterm 256-color extension codes. + + +
textencode(s) +
(str) Returns s converted to a form containing only + letters, digits, and underscores. + See textencode(). + + +
textdecode(s) +
(str) Converts s, the result of + textencode(), + back to its original form. + See textencode(). + + + +
+ +

+

Keyboard buffer functions

+
+ + + +
kbdel(i) +
(int) Delete from the cursor to position i in the input + buffer. Returns the new position. + + + +
kbgoto(i) +
(int) Move the cursor to position i in the input + buffer. Returns the new position (which may be different than + i if i would put the cursor outside the buffer). + + + +
kbhead() +
(str) Return the current input up to the cursor. + + + +
kblen() +
(int) Length of current input line. + + + +
kbmatch() +
kbmatch(i) +
(int) Finds one of "()[]{}" under or to the right of the + position i (default: cursor position), and returns the + position of its match, or -1 if not found. + (See also: keybindings) + + + +
kbpoint() +
(int) Return the current position of the cursor in input. + + + +
kbtail() +
(str) Return the current input after the cursor. + + + +
kbwordleft() +
kbwordleft(i) +
(int) Position of the beginning of the word left of i + within the input buffer. i defaults to the current cursor + position. (See also: + %wordpunct) + + + +
kbwordright() +
kbwordright(i) +
(int) Position just past the end of the word right of i + within the input buffer. i defaults to the current cursor + position. (See also: + %wordpunct) + + + +
keycode(s) +
(str) String generated by typing the key labeled s, + as defined in the termcap entry corresponding to the value of + %TERM. + See also: + keybindings. + + +
+ +

+

Information functions

+
+ + + +
time() +
(atime) Absolute system time in seconds, to the nearest + microsecond (typically measured since 1970-01-01 00:00:00 UTC). + See also: + cputime(), + mktime(), + idle(), + sidle(), + /time, + ftime(). + + + +
cputime() +
(real) CPU time used by tf, or -1 if not available. + The resolution depends on the operating system. See also: + /runtime, + time(), + /time. + + + +
columns() +
(int) Number of columns on the screen. + See also: hooks (RESIZE), + lines(), + winlines(), + %COLUMNS. + + + +
lines() +
(int) Number of lines on the screen. + To get the number of lines in the output window, use + winlines(). + See also: hooks (RESIZE), + winlines(), + columns(), + %LINES. + + + +
winlines() +
(int) Number of lines in the output window. + See also: hooks (RESIZE), + lines(), + columns(). + + + +
morepaused([s1]) +
(int) Returns 1 if output of world s1 is paused + (by more or + (dokey pause). + If omitted, s1 defaults to the current world. + See also: moresize(). + + + +
morescroll(i) +
(int) If i is positive, this function scrolls + i lines of text from the window buffer into the window + from the bottom. + If i is negative, it reverse-scrolls + abs(i) lines of text from the window buffer into the + window from the top. + If abs(i) is larger than one screenfull, the actual + scrolling is skipped, and only the end result is displayed. + Returns the number of lines actually scrolled. + + + +
moresize([s1 [, s2]]) +
(int) Returns a line count for world s2, + or the current world if s2 is omitted. + If s1 is omitted or blank, + the count is the number of lines below the + bottom of the output window + (i.e., queued at a more prompt). + If s1 contains "n", it counts only new lines that have never + been seen, not lines that had been displayed and then reverse + scrolled off. + If s1 contains "l", it counts only lines that match the + current /limit. + "n" and "l" may be combined. + If all lines that would be counted have the + "A" (noactivity) attribute, + the result will normally be 0. But if s1 contains "a", + lines with "A" attributes + are counted anyway. + In all cases, the count is the number of physical (after wrapping) + lines. + Note that a return value of 0 does not necessarily indicate that + output is not paused; it may be the case that output is paused and + there are just 0 lines below the bottom of the window, or that + all the lines have the "A" + attribute. + Use morepaused(), + to tell if output is paused. + See also: + morepaused(), + nactive(). + + + +
nactive() +
(int) Number of active worlds (ie, worlds with unseen text). +
nactive(s) +
(int) Number of unseen lines in world s. +
Note: when + nactive() + (with or without arguments) + is called from a trigger, the + line that caused the trigger + is not counted by + nactive() + because it has not yet been fully processed (for example, a lower + priority + trigger might + gag the line). + nactive(s) + is equivalent to + moresize("n", + s). + See also: moresize(). + + + +
world_info(s1, s2) +
(str) Return the value of field s2 of world s1, +
world_info(s2) +
(str) Return the value of field s2 of the + current world. +
world_info() +
(str) Return the name of the + current world. + See worlds. + + + +
fg_world() +
(str) Returns the name of the + world associated with the + foreground + socket. + + + +
is_connected() +
(int) Returns 1 if the + current + socket is connected, + 0 otherwise. +
is_connected(s) +
(int) Returns 1 if + world s is connected, + 0 otherwise. + See also is_open(). + + + +
is_open() +
(int) Returns 1 if the + current + socket is open, + 0 otherwise. +
is_open(s) +
(int) Returns 1 if + world s is open, + 0 otherwise. + + + +
idle() +
(dtime) Number of seconds (to the nearest microsecond) + since the last keypress. +
idle(s) +
(dtime) Number of seconds (to the nearest microsecond) + since the last text was received on the + socket connected to + world + s, or -1 on error. + + + +
sidle() +
sidle(s) +
(dtime) Number of seconds (to the nearest microsecond) + since the last text was sent on the + current socket or the + socket connected to + world + s, or -1 on error. + + + +
nlog() +
(int) Number of open log files. + + + +
nmail() +
(int) Number of monitored mail files containing unread mail. + See mail. + + + +
nread() +
(int) Returns a positive number if a + read + from the keyboard is in progress, 0 otherwise. + + + +
getpid() +
(int) The operating system's process id for tf. + + + +
gethostname() +
(str) Returns the host's name, or an empty string if the + host name is not available. + + + +
systype() +
(str) System type: "unix" (includes MacOS X), + "os/2", or "cygwin32". + +
+ +

+

Other functions

+
+ + +
addworld(name, type, host, port, char, pass, file, use_proxy) +
Defines or redefines a + world. + See "addworld()". + + +
eval(s1 [, s2]) +
(str) Evaluates s1 as a + macro body. + See: /eval. + + + +
filename(s) +
(str) Performs filename expansion on s as described + under "filenames". + + +
ftime(s,n) +
ftime(s) +
ftime() +
(str) Formats a system time n (obtained from + time()) according to + format s, or prints an error message and returns an empty + string if n is out of range. + See: ftime(). + + + +
mktime(year [, month [, day [, + hour [, minute [, second [, + microsecond]]]]]]) +
(atime) Returns the system time in seconds of the date in the + local time zone + represented by the arguments. Returns -1 if the arguments do not + represent a valid date. + Omitted month or day arguments default to 1; + other omitted arguments default to 0. + See: + %TZ, + ftime(), + /time, + + +
getopts(s1, s2) +
(int) Parse macro options according to format s1. + See "getopts()". + + +
test(s) +
Interprets the contents of the string s as an + expression and returns the result. + See also: + /test, + /expr. + + +
status_fields([i]) +
Returns the list of fields of status row i, + or row 0 if i is omitted. + status area. + + +
substitute(s [,attrs [,inline]]) +
(int) Replaces trigger text. + See "/substitute". + + +
+ +

+ Examples: + +

+ Capitalize first letter of string s: +

+      strcat(toupper(substr(s, 0, 1)), substr(s, 1))
+
+ +

+ Extract the number from a string dbref of the form "(#123PML)": +

+      0 + substr(dbref, strchr(dbref, "#") + 1)
+
+ +

+ See: expressions + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/getopts.html b/help/topics/getopts.html new file mode 100644 index 0000000..51d2dad --- /dev/null +++ b/help/topics/getopts.html @@ -0,0 +1,133 @@ +TinyFugue: getopts() + + +

getopts()

+ +

+ Usage: + +

+ getopts(options [, init])
+


+ +

+ getopts() is a + function that parses + and validates macro options according + to the format described by options. Options is a list of + letters that getopts() + will accept. + If a letter is followed by ":", + the option will be expected to have a string argument; + if a letter is followed by "#", + the option will be expected to have a + expression argument that + evaluates to a (possibly signed) integer; + if a letter is followed by "@", + the option will be expected to have a time argument. + The option syntax accepted by + getopts() is a subset of that accepted + by builtin tf commands, as described under + "options". + +

+ When an option is found, getopts() + creates a new local variable + named "opt_X", where "X" is the letter of the + option. If an argument is expected, the + variable will get that argument as + its value; otherwise, the variable + will have a value of "1". + +

+ If init is given, the + variables corresponding + to each letter of options are initialized to init + before processing the command line options. + If init is omitted, the + variables + are not initialized, so if variables + with the same names already exist and are not set by + getopts(), + they will be unchanged. You can use this to set the + variables to some default + value before calling getopts(). + +

+ The argument list will be shifted to discard the options that have been + parsed, so %{*} will contain + the remainder of the arguments, without the options. + +

+ If getopts() encounters an error, it + will print an error message and return 0; otherwise, it returns nonzero. + +

+ Using getopts(), + /escape, and + /split, it is possible to write + macros that behave just like builtin tf + commands. + +

+ Here's a contrived example to illustrate how + getopts() works: + +

+

+  /def foo = \
+      /if (!getopts("abn#s:", "")) /return 0%; /endif%; \
+      /echo option a:  %{opt_a}%;\
+      /echo option b:  %{opt_b}%;\
+      /echo option n:  %{opt_n}%;\
+      /echo option s:  %{opt_s}%;\
+      /echo args: %{*}%;\
+      /split %{*}%;\
+      /echo name: %{P1}%;\
+      /echo body: %{P2}
+
+ +

+ Now, all of these commands are equivalent: +

+      /foo -a -b -n5 -s"can't stop" -- whiz = bang biff
+      /foo -a -b -n5 -s'can\'t stop' whiz = bang biff
+      /foo -n5 -ba -s`can't stop` whiz = bang biff
+      /foo -as"can't stop" -bn5 whiz = bang biff
+
+ and produce this output: +
+      option a:  1
+      option b:  1
+      option n:  5
+      option s:  can't stop
+      args: whiz = bang biff
+      name: whiz
+      body: bang biff
+
+ +

+ But the command: +

+      /foo -a -x whiz = bang biff
+
+ produces the error: +
+      % foo: invalid option 'x'
+      % foo: options: -ab -n<integer> -s<string>
+
+ +

+ See: expressions, + functions, + options, + /escape, + /split + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/hints.html b/help/topics/hints.html new file mode 100644 index 0000000..3f7749d --- /dev/null +++ b/help/topics/hints.html @@ -0,0 +1,166 @@ +TinyFugue: hints + + + +

hints

+ +

+ Some hints and style tips: + +

+

    +
  • Use a high-priority + trigger on + yourself to prevent loops. Say I want to throw a tomato at anyone who says + the word "tomato", and I write the following + trigger: +
    +  /def -t"*tomato*" tomato = :throws a tomato at %1.
    +
    + If Ben uses the word tomato, I will + trigger, and then see the text + "Hawkeye throws a tomato at Ben." That text contains the word tomato, which + will trigger me again, creating an + infinite loop. One way to prevent this is by creating a + high-priority + trigger on myself which does nothing: +
    +  /def -p99999 -t"{Hawkeye|You}*" anti_loop
    +
    + Now, when I see "Hawkeye throws a tomato at Ben", the /anti_loop + trigger will catch it before /tomato + does, so I won't loop. + +

    +

  • Use multiple lines, spacing, and indentation in + /load files. Normally, commands must + be on one line. But in files read with + /load, if a line ends in '\', the + following line will have leading whitespace stripped and the two lines will + be joined. This makes it much easier (for humans) to read complex + macros. Compare the two identical + macros below, and see which is easier + to read. + +

    +

    +  /def count=/let i=1%;/while (i<=%1) say %i%;/let i=$[i+1]%;/done
    +
    + +

    +

    +  /def count = \
    +      /let i=1%; \
    +      /while ( i <= %1 ) \
    +	  say %i%; \
    +	  /let i=$[i + 1]%; \
    +      /done
    +
    + +

    +

  • Use comments in /load files. + Complicated macros are much easier to + read if you include a short comment describing the arguments to the + macro and what it does. Lines + beginning with ';' or '#' are comments, and are ignored during + /load. + +

    +

  • Name all triggers and + hooks. If you ever need to + /load a file a second time, + triggers, + hilites, + hooks, and + gags without names may be + duplicated. But if they are named, old copies of + macros will be replaced with new copies + of macros with the same name. Naming + macros also makes them easier to + manipulate with commands like + /list and + /undef. + +

    +

  • Don't use "weird" characters in + macro names. Although any + macro name is legal, some characters + can have unwanted expansion + effects. Weird characters are also harder to read. You should stick to + letters, numbers, and '_' characters. In particular, avoid '~' characters, + since they are used in library macros. + +

    +

  • Use local variables instead of + global variables if possible. This + avoids conflicts when two macros use a + variable with the same name. + If you're using a + variable in an + expression, + use /let first to initialize the + variable in the local scope. + But remember, when you use a variable + reference (by name, as opposed to a + variable substitution using "%"), TF + uses dynamic scoping (see: scope). + +

    +

  • Use variable references + instead of %-substitutions + in expressions. + Because macro bodies + are expanded, something like + "/test + %1" is prone to problems if + %1 contains any special + characters. But by using a variable + reference you can avoid this problem; + for example, "/test {1}". + +

  • + "/set + pedantic=on" to + make tf generate warnings about some potential problems. + +

  • + "/set + defcompile=on" to + see syntax errors in a macro + when you define it, instead of waiting until you first run it. + +

  • + "/set + mecho=on" to + see what commands are being executed, or + /connect to a + normal or connectionless + socket + defined with + "/addworld -e" + to see what you're sending to the + socket. + +

  • + "/set + emulation=debug" + and "telopt=on" + to see exactly what the socket is sending to tf. + +

  • + Use the -n or -l option of /trigger + to see a list of trigger + macros that would match a given line. + +
+ +

+ See also debugging. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/history.html b/help/topics/history.html new file mode 100644 index 0000000..7ec03f6 --- /dev/null +++ b/help/topics/history.html @@ -0,0 +1,67 @@ +TinyFugue: history + +

history

+ +

+ Associated topics: + +

+ scrollback
+ /recall
+ /quote
+ /histsize
+ /recordline
+ ^string1^string2
+ Recall previous/next keys + (RECALLB/RECALLF, + default ^P and ^N)
+ Recall beginning/end keys + (RECALLBEG/RECALLEND, + default ^[< and ^[>)
+ Search backward/forward keys + (SEARCHB/SEARCHF, + default ^[p and ^[n)
+ +

+ TinyFugue stores lines in 4 different types of + history lists. + Input history records the last 100 + non-repeated commands from the keyboard, including the current line. + Each world has a world history, + which stores 1000 lines of output from that world. + Local history stores 100 lines of output generated by TF, + i.e. anything that didn't come from a world. + Global history is an integrated list + of 1000 lines from TF and every world. + The history sizes can be changed with + the /histsize command and + the %{histsize} + variable. + +

+ /recall is used to display text from + any of the history lists. The + /quote command may be used to quote + out of any history list using the + /quote # feature. + +

+ + Typing ^string1^string2 finds the last + command in the input history + containing string1, replaces string1 with string2, and + executes the modified line. + +

+ The recall keys replace the current input with a line from + the input history list. See + /dokey for details. + +

+ See also /log. + +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/hooks.html b/help/topics/hooks.html new file mode 100644 index 0000000..75b943d --- /dev/null +++ b/help/topics/hooks.html @@ -0,0 +1,296 @@ +TinyFugue: hooks + + +

hooks

+ +

+ Associated topics: +

+
/def +
define a macro with any + fields +
/hook +
define a hook + macro +
/unhook +
undefine a hook + macro +
/trigger -h +
call a hook + macro +
%hook +
enable hooks +
%max_hook +
maximum hook rate +
+ +

+ Hooks are a method of calling a + macro based on special events within + TF, in much the same way as triggers + call macros based on text received + from a socket. + Hooks allow the user to customize the + behavior of TinyFugue and automate special functions. + +

+ A hook definition has two parts: an + event and a pattern. When the event occurs, the + macro will be executed if the arguments + supplied by the event match the macro's + pattern (see the section on + "patterns"). + +

+ If multiple hooks match the same event + and pattern, one or more are selected as described under + "priority". + +

+ Most hooks have a default message + associated with them, which will be displayed + with the + attributes of the + hook if one is defined. Thus a + hook with a + gag + attribute will suppress the display + of the message. + +

+ Hook may have + multi-shots, in which case it and the + macro it is associated with is removed + after executing a specified number of times. + +

+ In the table below, 'A' or 'W' in the message column indicates the location + of the message display: +

+
A
the message is printed to the + the alert stream + (i.e., the status line). +
W
the message is printed to the + appropriate world's stream; + if that world is not the foreground world, the message is also printed + to the alert stream. +
Otherwise, the message is sent to the the + tferr stream (i.e., the screen). +
+
+
+  Event Name  Arguments       Default Message or Action
+  ----------  ---------       -------------------------
+  ACTIVITY    world           A '% Activity in world world'
+                                (called only the first time activity
+                                occurs on a given socket.)
+  BAMF        world           W '% Bamfing to world'
+  BGTEXT      world             Text was printed in background world world
+  BGTRIG      world           A '% Trigger in world world'
+  CONFAIL     world, reason   W '% Connection to world failed: reason'
+  CONFAIL     world, reason   W '% Unable to connect to world: reason'
+  CONFLICT    macro             '% macro conflicts with builtin command.'
+  CONNECT     world, cipher   W '% Connected to world[ using cipher].'
+  ICONFAIL    world, reason   W '% Intermediate connection to world
+                                failed: reason'
+  DISCONNECT  world, reason   W '% Connection to world closed: reason.'
+                                (Called if you send the server's disconnect
+                                command (e.g., "QUIT") or socket closes, but
+                                not if you use /dc.)
+  KILL        pid               (process ends)
+  LOAD        file              '% Loading commands from file file'
+  LOADFAIL    file, reason      '% file: reason'
+  LOG         file              '% Logging to file file'
+  LOGIN       world             (automatic login)
+  MAIL        file            A '% You have new mail in file.'
+                                (See: mail).
+  MORE                          '--More--' (reverse bold)
+  NOMACRO     name              '% name: No such command or macro'
+  PENDING     world           W '% Hostname lookup for world in progress'
+  PENDING     world, address  A '% Trying to connect to world: address'
+  PREACTIVITY world             (Activity in world world)
+                                (called only the first time activity
+                                occurs on a given socket.)
+  PROCESS     pid               process starts
+  PROMPT      text              text is a partial (unterminated) line
+                                from the server.  See "prompts"
+  PROXY       world             (proxy connection to world has completed)
+  REDEF       obj_type, name    '% Redefined obj_type name'
+  RESIZE      columns, lines    (window was resized)
+                                (see also: columns(), lines())
+  SEND        text              (text sent to current socket)
+                                (see note below ("hooks"))
+  SHADOW      var_name          '% Variable var_name overshadows global'
+  SHELL       type, command     '% Executing type: command'
+  SIGHUP                        (SIGHUP signal caught; tf may terminate)
+  SIGTERM                       (SIGTERM signal caught; tf terminates)
+  SIGUSR1                       (SIGUSR1 signal caught; no effect)
+  SIGUSR2                       (SIGUSR2 signal caught; no effect)
+  WORLD       world           W (foreground socket changes)
+
+ + Notes: + +

+ The -w and -T options to /def can be + used to restrict hooks to matching + only when the current + world matches the world or world type. + +

+ When a macro is defined with the same + name as an existing macro, the + REDEF hook will be called, + unless the new macro + is identical to the original. + +

+ BGTRIG used to be called BACKGROUND, and the old name still works. + Its "% Trigger in world " message can be quieted for + individual triggers by defining them with + /def + -q, + or for all triggers with "/def -ag -hBGTRIG". + +

+ The SEND hook is called whenever text + would be sent to the current + socket. + If a SEND hook matches the text that + would be sent, the text is not sent (unless the hook was defined with + /def -q), + and the hook is executed instead. + By default, SEND hooks are not invoked + from send() + or /send, + but there is an option to do so; + SEND hooks are invoked + from any macro or command line that + sends plain text. + +

+ When successfully connected to a new + socket, these events occur: + 1) If this is a proxy connection, + the PROXY hook is called; + 2) If there is a file associated with the world, the file will be + loaded (and the LOAD hook will be + called). + 3) If this is not a proxy connection, + the CONNECT hook is called; + 4) If %{login} is on, + a character and password are defined, and this is not a + proxy connection, + the LOGIN + hook is called. + +

+ When a (non-gagged) + line is displayed in a background world, the + PREACTIVITY hook is called immediately before the line is displayed, and + the ACTIVITY hook is called immediately after. + Thus, functions like + moresize() and + nactive() + will give different results in the two hooks. + Any activity generated by a PREACTIVITY hook will not recursively + cause another PREACTIVITY or ACTIVITY event. + +

+ The SIGHUP, SIGTERM, SIGUSR1, and SIGUSR2 + hooks are called when the corresponding + signal is received. + If SIGHUP is received and SIGHUP was not ignored when tf was started, + or SIGTERM was received, TF will terminate immediately + after executing the hook; if the + hook calls any commands with delayed + effects (a /repeat or + /quote without -S, a nonblocking + /connect, etc), those effects will + not occur before termination. + +

+ A hook's message, if any, is displayed (with its + attributes) + before any of the hooked macros + are executed. Prior to version 5.0, the message was displayed + after executing hooked macros, + which may have generated their own output, which was sometimes + confusing. + +

+ Examples: + +

+

+    /hook ACTIVITY|DISCONNECT {TT|SM}* = /world %1
+
+ will cause TF to automatically switch to TT or SM if either becomes active + or disconnected. +
+    /def -T'tiny.mush' -hSEND mush_escape = /send - $(/escape \%[ %*)
+
+ will catch any line sent to a world of type 'tiny.mush', escape all + occurrences of '%', '[' and '\' within that line, and send the new line + instead of the original. This is useful for avoiding unwanted + interpretation of '%', '[', and '\' on TinyMUSH servers. +
+    /hook SIGHUP = /log on%; /recall /10
+
+ will log the last 10 lines of output if + you are unexpectedly disconnected from your tf session. + +

+ + The CONNETFAIL hook, which existed in versions 5.0 alpha 13 through + 5.0 beta 6, + has been replaced with the ICONFAIL hook. + + +

+ See also: macros, + triggers, + patterns, + priority, + signals. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/index.html b/help/topics/index.html new file mode 100644 index 0000000..9012fb2 --- /dev/null +++ b/help/topics/index.html @@ -0,0 +1,58 @@ +TinyFugue: topics + +

topics

+ +

+ Topics marked with + are new; those marked with * have changed since the + last version. Many topics also have subtopics that are not listed here + (e.g., individual variables, + hooks, and functions). + +

+

+ *copying	copyright; no warranty
+  intro		introduction to tf
+  startup	how to start tf
+  interface	how input works
+  tfrc		personal config file
+ *visual	split-screen mode
+ *commands	list of commands
+ *worlds	defining worlds
+ *patterns	glob and regexp pattern matching
+ *variables	state and environment
+ *globals	special tf variables
+  attributes	special text display
+  prompts	using LP/Diku prompts
+  problems	bugs, core dumps, etc.
+ *evaluation	macro body execution
+  macros	user-defined commands
+ *sockets	world connections
+  history	recall and logging
+  priority	trigger/hook selection
+ *keybindings	keyboard operations
+  color		terminal color codes
+ *protocols	protocols supported by TF
+  expressions	math and string operations
+  triggers	automatic command execution based on incoming text
+ *hooks		automatic command execution based on tf events
+ +mail		mail checking
+  library	macros and variables in stdlib.tf
+ *tools		extra commands in tools.tf
+  utilities	useful extra command files
+ *processes	timed commands and command quoting
+ *subs		arithmetic, command, macro, and variable substitutions
+ *functions	special expression operations
+ *hints		some hints and style tips for macro programming
+ +debugging	debugging your macros
+ *tfio		output, error, and world streams
+ *proxy		connecting to outside hosts via a proxy server (firewall)
+ +locale	multi-language support
+  
+ +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/interface.html b/help/topics/interface.html new file mode 100644 index 0000000..bd21eac --- /dev/null +++ b/help/topics/interface.html @@ -0,0 +1,89 @@ +TinyFugue: interface + + + +

interface

+ +

+ Any input line that does not begin with '/' will be sent directly to the + foreground world, if there + is one. A line starting with more than one '/' + will be sent to the foreground socket + after having the first '/' removed. (Exception: lines may be caught with a + SEND hook before being sent; see + "hooks"). + +

+ Any input line beginning with a single '/' is a TF + command, which will be interpreted as described in + "evaluation". + +

+ Input lines of the form "^old^new" will cause TF to search + backward in the input history for a + line containing "old", replace that text with "new", and execute the + modified command. See: history. + +

+ Many special functions, such as backspace, can be performed by special keys + or sequences of keys. See "dokey" for + a complete list. You can also define your own commands and bind them to + key sequences. See bind. + +

+ Normally, user input does not undergo the + expansion that + macro bodies undergo. The + /eval command can be used to + expand text before executing it. + + + If the %{sub} flag is on + (it is off by default), user input undergoes + macro body + expansion without the + %{sub} flag. The + %{sub} flag also applies + to text generated by "^old^new" history commands. + See: history, + /sub, + variables + +

+ Control characters may be input literally. A + literal control character will be displayed in the input window in + printable form in bold reverse. Note that since most control keys are also + parts of the default keybindings, it will usually be necessary to type ^V + (/dokey LNEXT) to avoid invoking the + keybinding. + +

+ International characters may be input if your + locale is set to + a locale that supports them and your system supports locales. + Any input character that is not valid in your locale and has the high + bit set (normally generated by holding the "meta" key) will be + translated to ESC plus that character with the high bit stripped (assuming + %meta_esc is on). + This allows M-x and ^[x to invoke the same ^[x keybinding. See + locale, + %meta_esc, + %istrip. + +

+ If standard input is not a terminal, + visual mode will not be allowed, + and tf will continue to operate even after EOF is read, until /quit + or something else terminates it. + +

+ See also: visual, + options + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/intro.html b/help/topics/intro.html new file mode 100644 index 0000000..d100baa --- /dev/null +++ b/help/topics/intro.html @@ -0,0 +1,83 @@ +TinyFugue: introduction + + + + + +

introduction

+ +

+ TinyFugue is a MUD client. It helps you connect to a MUD, in a much more + convenient manner than telnet. You can connect to a mud world using the + same syntax as you would with telnet: "tf + host port". Or, while running tf, you can use + "/connect host port". + To make things easier, you can give names to worlds, using + /addworld, and then use + "tf name" and + "/connect name". If you + store a set of /addworld commands + in a file, TF can read them automatically when it starts. You can even + connect to more than one world at the same time, and switch between them. + See: /connect, + /fg, + /addworld, + worlds, + tfrc. + +

+ Normally, TF will split the screen into two windows: one for input, + and one for output. TF will display useful information on the line + separating the two windows, such as the name of the + foreground world. + See: windows. + +

+ Any line you type that starts with a single '/' is a tf command. Anything + else you type will be sent to the mud. See: + interface, + commands. + +

+ You can define your own tf commands, called + macros. The simplest type of + macro is just an abbreviation or alias + for a longer command or commands. But + macros can also perform much more + powerful tasks. See: macros, + /def. + +

+ You can tell tf to watch for certain patterns in the text from the mud, and + then do special things when it sees that pattern: display the text in a + special way (hilite); not display + the text at all (gag); execute a + macro command + (trigger); or do any combination of + these. See: attributes, + triggers, + /hilite, + /gag, + /trig, + /def. + +

+ TF keeps a history of every line it + prints, every line sent by the mud, and every command you enter. You can + see those histories using /recall. + You can also have this text saved in a file using + /log. See: + history, + /recall, + /log. + +

+ See also: topics + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/keybindings.html b/help/topics/keybindings.html new file mode 100644 index 0000000..798b73d --- /dev/null +++ b/help/topics/keybindings.html @@ -0,0 +1,613 @@ +TinyFugue: keybindings + + + + + + + +

keybindings

+ +

+

Default keybindings

+ TF's default command line editing keys are similar to those in emacs and + bash. In addition, several features may be invoked by more than one + keybinding, and TF has keybindings for unique features like switching + the foreground + socket. +

+ Here, and throughout the TF documentation, the notation "^X" means the + character generated by typing the X key while holding the CTRL key. + Also, "^[" can be more easily typed just by pressing the ESC key. + /Def -b and + /bind accept the ^X notation + as well as "\number" notation, where number is the + octal, hexadecimal, or decimal number of the character's ascii value. + For example, the escape character can be given in any of these forms: + ^[, \033, \0x1B, or \27. +

+ In the tables below, keys with "*" in the "Meaning" column make use of + kbnum + (see below). + +

+ +

Named keys

+To redefine the named keys, see the section titled +"Mapping Named Keys to functions". +
+Key	    Command		    Meaning
+---	    -------		    -------
+Up	    /kb_up_or_recallb	    *cursor up or recall bkwd input history
+Down	    /kb_down_or_recallf	    *cursor down or recall fwd input history
+Right	    /dokey RIGHT	    *cursor right
+Left	    /dokey LEFT		    *cursor left
+Center	    (none)
+
+Esc_Left    /fg -<		    *foreground previous socket
+Esc_Right   /fg ->		    *foreground next socket
+
+Ctrl_Up     /dokey_recallb	    *recall backward input
+Ctrl_Down   /dokey_recallf	    *recall forward input
+Ctrl_Right  /dokey_wright	    *word right
+Ctrl_Left   /dokey_wleft	    *word left
+
+Insert	    /test insert:=!insert    toggle insert mode
+Delete	    /dokey dch		    *delete character
+Home	    /dokey_home		     cursor to beginning of line
+End	    /dokey_end		     cursor to end of line
+PgDn	    /dokey_pgdn		    *scroll forward a screenfull
+PgUp	    /dokey_pgup		    *scroll back a screenfull
+Tab	    /dokey page		    *scroll forward a screenfull
+
+Ctrl_Home   /dokey_recallbeg	     recall first line of input
+Ctrl_End    /dokey_recallend	     recall last line of input
+Ctrl_PgDn   /dokey_flush	     scroll forward to last screenfull
+Ctrl_PgUp   (reserved for future use)
+
+F1	    /help		     help
+F2	    (none)		     (function key F1)
+...
+F20	    (none)		     (function key F20)
+
+nkpTab	    (none)		     (see "keypad" section below)
+nkpEnt	    (none)		     (see "keypad" section below)
+nkp*	    (none)		     (see "keypad" section below)
+nkp+	    (none)		     (see "keypad" section below)
+nkp,	    (none)		     (see "keypad" section below)
+nkp-	    (none)		     (see "keypad" section below)
+nkp.	    (none)		     (see "keypad" section below)
+nkp/	    (none)		     (see "keypad" section below)
+nkp0	    (none)		     (see "keypad" section below)
+...
+nkp9	    (none)		     (see "keypad" section below)
+nkp=	    (none)		     (see "keypad" section below)
+
+ +

+ +

Unnamed key sequences

+
+String	Command			Meaning
+------	-------			-------
+"^A"	/dokey_home		 cursor to beginning of line
+"^B"	/dokey LEFT		*cursor left
+"^D"	/dokey_dch		*delete character to the right
+"^E"	/dokey_end		 cursor to end of line
+"^F"	/dokey RIGHT		*cursor right
+"^G"	/beep 1			 beep
+"^H"	(internal)		*backspace
+"^I"	/key_tab		 perform the function assigned to the TAB key
+"^J"	(internal)		 execute current line
+"^K"	/dokey_deol		 delete to end of line
+"^L"	/dokey redraw		 redraw (not clear) screen
+"^M"	(internal)		 execute current line
+"^N"	/dokey recallf		*recall forward input history
+"^P"	/dokey recallb		*recall backward input history
+"^Q"	/dokey LNEXT		 input next key literally (may be overridden
+				 by terminal)
+"^R"	/dokey REFRESH		 refresh line
+"^S"	/dokey PAUSE		 pause screen
+"^T"	/kb_transpose_chars	*transpose characters
+"^U"	/kb_backward_kill_line	 delete to beginning of line
+"^V"	/dokey LNEXT		 input next key literally
+"^W"	/dokey BWORD		*delete backward word (space-delimited)
+"^?"	(internal)		*backspace
+"^X^R"	/load ~/.tfrc		 reload personal config file
+"^X^V"	/version		 display version information
+"^X^?"	/kb_backward_kill_word	*delete backward word (punctuation-delimited)
+"^X["	/dokey_hpageback	*scroll back a half screenfull
+"^X]"	/dokey_hpage		*scroll forward a half screenfull
+"^X{"	/dokey_pageback		*scroll back a screenfull
+"^X}"	/dokey_page		*scroll forward a screenfull
+"^[^E"	/kb_expand_line		 expand current input line in place
+"^[^H"	/kb_backward_kill_word	*delete backward word (punctuation-delimited)
+"^[^I"	/complete		 complete current word, depending on context
+"^[^L"	/dokey clear		 clear screen (can be refilled with scrollback)
+"^[^N"	/dokey line		*scroll forward one line
+"^[^P"	/dokey lineback		*scroll back one line
+"^[^W"	/complete worldname	 complete TF world name
+"^[$"	/complete macroname	 complete TF macro name
+"^[%"	/complete variable	 complete TF variable name
+"^[/"	/complete filename	 complete file name (unix only)
+"^[ "	/kb_collapse_space	 change multiple spaces to a single space
+"^[-"	/set kbnum=-		 start kbnum entry with -
+"^[0"	/set kbnum=+0		 start kbnum entry with 0
+...
+"^[9"	/set kbnum=+9		 start kbnum entry with 9
+"^[;"	/complete user_defined	 complete from %{completion_list}
+"^[="	/kb_goto_match		 move cursor to matching parenthesis/bracket
+"^[."	/kb_last_argument	 input last word of previous line
+"^[<"	/dokey recallbeg	 go to beginning of input history
+"^[>"	/dokey recallend	 go to end of input history
+"^[J"	/dokey selflush		 selective flush (similar to "/dokey flush"
+				 followed by "/limit -a")
+"^[L"	/kb_toggle_limit	 toggle between /unlimit and /relimit
+"^[_"	/kb_last_argument	 input last word of previous line
+"^[b"	/dokey_wleft		*cursor to beginning of word
+"^[c"	/kb_capitalize_word	*capitalize word
+"^[d"	/kb_kill_word		*delete forward word
+"^[f"	/dokey_wright		*cursor to end of word
+"^[h"	/dokey_hpage		*scroll forward a half screenfull
+"^[i"	/complete input_history	 complete from previously typed words
+"^[j"	/dokey flush		 jump to last screenfull of text
+"^[l"	/kb_downcase_word	*convert word to lower case
+"^[n"	/dokey searchf		*search forward input history
+"^[p"	/dokey searchb		*search backward input history
+"^[u"	/kb_upcase_word		*convert word to upper case
+"^[v"	/@test insert:=!insert	 toggle insert mode
+"^[w"	/to_active_or_prev_world /fg next active world, or previous world
+"^[{"	/fg -<			*foreground previous socket
+"^[}"	/fg ->			*foreground next socket
+"^[^?"	/kb_backward_kill_word	*delete backward word (punctuation-delimited)
+"^]"	/bg			 put all sockets in background
+
+ + +

+

Other useful commands not bound by default

+
+Command			Meaning
+-------			-------
+/dokey_bspc		*delete character
+/dokey UP		*cursor up
+/dokey DOWN		*cursor down
+/dokey RECALLB		*recall input backward
+/dokey RECALLF		*recall input forward
+/dokey NEWLINE		 execute input line
+
+ +

+ + + +

Terminal keys

+ Some keys are interpreted by the terminal, not TF, so if you want to change + them, you must do so outside of TF (e.g. with stty in unix). + Typical unix terminal keys include: +
+    Key   Name   Meaning
+    ---   ----   -------
+    ^C    int    generates a SIGINT signal.
+    ^\    quit   generates a SIGQUIT signal.
+    ^Z    susp   suspends the TF process
+
+When TF starts, it disables the terminal driver's "stop" and "start" keys +(typically ^S and ^Q), so they are available for binding within TF. + + +

Using keys

+ +

+Keys F1...F12 are the function keys, located across the top of most keyboards. + +

+Keys with names of the form "esc_name" correspond to the ESC key +followed by the name key. There is an "esc_name" for every +single key in the Named Key table above, but only the ones with default +meanings are listed in the table; the rest are available for custom +definitions. + +

+On recent versions of xterm with the modifyCursorKeys resource, tf can +recognize when the CTRL, SHIFT, or META modifier is held down while pressing +the editor keys (insert, delete, home, end, pgdn, pgup), arrow keys, +or numbered function keys, and calls +/key_ctrl_name, +/key_shift_name, or +/key_meta_name, +respectively. +Additionally, by default, each +/key_meta_name calls the corresponding +/key_esc_name, +so, for example, pressing META-Left has the same effect as ESC Left. +Note that some xterms capture shift_insert, shift_pgup, and shift_pgdn +by default for their own use, so tf will not receive these sequences. +If you use another terminal emulator that generates unique character +sequences for ctrl-, shift-, and meta-modified keys, you can bind those +sequences to call the corresponding /key_mod_name +(and send them to the tf author for +inclusion in a future release of tf). +

+ + + +

Numeric keypad

+TF tries to put the keypad in "application mode", which on +many terminals will make the keypad keys generate unique character +sequences. Application mode can be disabled by setting +%keypad to "off". +The meaning of your numeric keypad keys depends on your terminal emulator +and its settings, +the setting of %keypad +in tf, +and the state of your NumLock key. +Two common configurations of the keypad are shown below. +A name on a key in the diagram indicates that it is bound +in tf to "/key_name". +
+            configuration A                   configuration B
+
+     +------+------+------+------+     +------+------+------+------+
+     |      |      |      |      |     |      |nkp/  |nkp*  |nkp-  |
+     +------+------+------+------+     +------+------+------+------+
+     |Home  |Up    |PgUp  |      |     |nkp7  |nkp8  |nkp9  |nkp+  |
+     +------+------+------+      |     +------+------+------+      |
+     |Left  |Center|Right |      |     |nkp4  |nkp5  |nkp6  |      |
+     +------+------+------+------+     +------+------+------+------+
+     |End   |Down  |PgDn  |      |     |nkp1  |nkp2  |nkp3  |nkpEnt|
+     +------+------+------+      |     +------+------+------+      |
+     |   Insert    |Delete|      |     |    nkp0     |nkp.  |      |
+     +-------------+------+------+     +-------------+------+------+
+
+ +How this works for some specific terminals: +
+
X Consortium xterm +
%keypad=on + and NumLock on gives configuration B above; + %keypad=off + and NumLock on gives normal digit/punctuation keys; + and NumLock off gives configuration A. + +
XFree86/X.Org xterm +
Identical to X Consortium xterm if you disable the + "Alt/numlock modifiers" option (under the ctrl-leftclick menu); + if you do not, then + %keypad=on + and NumLock on gives normal digit/punctuation keys, and there is no way to + get configuration B. + There is also a "VT220 keyboard" option; if that is enabled, + %keypad=on + and NumLock off gives configuration B, and all other combinations of + %keypad + and NumLock give normal digit/punctuation keys. + +
linux (Linux console) +
%keypad=on + gives configuration B, with these changes: + "NumLock" calls /key_f1, "/" calls /key_f2, "*" calls /key_f3, + and "-" calls /key_f4. + With %keypad=off, + NumLock chooses between configuration A and normal digit/punctuation keys. + (Prior to TF 5.0 beta 7, it was often impossible to set + %keypad=on + because many (if not all) "linux" termcap entries were missing a necessary + code; TF now supplies that code automatically if it is missing and + %TERM is "linux".) + +
konsole and gnome-terminal +
As far as I can tell, + %keypad + has no effect, NumLock chooses between configuration A and normal digit/punctuation + keys, and there is no way to get configuration B. + +
PuTTY +
%keypad=on + and NumLock on gives configuration B above; + %keypad=off + and NumLock on gives normal digit/punctuation keys; + and NumLock off gives a configuration similar to configuration A. + +
Mac OSX Terminal +
By default, Terminal's keypad always acts like normal digit/punctuation + keys. But if you turn on "strict vt100 keypad behavior" under + Terminal | Window Settings | Emulation, then + %keypad=on + will give a configuration similar to configuration B. +
+ + +

+In some environments, unnamed key sequences consisting of "^[" (ESC) +followed by one other character +may also be typed by holding the META key while typing the other character +instead of typing ESC before the other character. +See %meta_esc. + +

+The one-time warning about certain new keybindings in 5.0 can be disabled +by setting the variable +warn_5keys=off. + + +

Mapping Named Keys to functions

+

+Named keys have two levels of mapping: +first the character sequence generated by the key is bound +(with /def -b) to call a macro named +key_name; +then the macro key_name is defined to execute a command. +If you wish to change the functionality of any named key, you should +do so by redefining key_name. +For example, if you want Insert to invoke your own macro /foo, +you should redefine "/def key_insert = /foo". +You should only make a direct keybinding if a key on your terminal generates +a character sequence not covered by TF's default bindings; and then you should +only bind the character sequence to call key_name +(but first, see the "keypad" section above). +For example, if your Insert key generates "^[Q", you can bind it with +"/def -b'^[Q' = /key_insert". +You should never redefine any of the predefined /dokey_* or /kb_* commands. +

+There are several advantages to this two-level mapping: +redefining a key's function is independent of the terminal; +and adding keybindings for new terminals is independent of the functions +invoked by a named key. + +

+Examples of popular alternatives to the standard key definitions: + +

+Make PgUp and PgDn to scroll a half screen instead of a full screen: +

+    /def key_pgdn = /dokey_hpage
+    /def key_pgup = /dokey_hpageback
+
+ +Make up and down arrow keys perform movement only: +
+    /def key_up = /dokey_up
+    /def key_down = /dokey_down
+
+ +Make up and down arrow keys perform input recall only: +
+    /def key_up = /dokey_recallb
+    /def key_down = /dokey_recallf
+
+ +

+ Before version 5.0, /def -B + was the only way to bind a named key to a + macro. + This, however, has been superseded by the use of "key_name" macros. + Whereas /def -B depends strictly + on termcap entries, + the bindings to "key_name" macros are automatically generated + from TF's own list of standard keybindings in addition to termcap entries. + Termcap entries are often incomplete or not well matched to your terminal + emulator; TF's additional keybindings fill in the gaps. + So, to redefine the meaning of a named key, you should redefine + "/def key_name = ...", + not "/def + -Bname = ...". + The names recognized by /def -B are + different than the names in the Named Key table. + For reference, they are: + the function keys "F0", "F1",... "F19"; + the keypad keys "KP1" (upper left), "KP2" (center), "KP3" (upper right), + "KP4" (lower left), "KP5" (lower right); + the arrow keys "Up", "Down", "Right", "Left"; + and the other keys, + "Backspace", "Clear EOL", "Clear EOS", "Clear Screen", + "Delete", "Delete Line", "Home", "Home Down", "Insert", "Insert Line", + "PgDn", "PgUp", "Scroll Down", "Scroll Up". + They must be spelled as shown, but capitalization is ignored. + The function keycode() + can be used to find the string generated by a key (as defined in + the termcap entry for + %TERM). + + +

Mapping character sequences to functions

+

+/Def -b +(or /bind) +allows you to bind a character sequence to a +macro body. +Typing that sequence at the keyboard (which may mean pressing a single key +that generates the sequence) will then execute the +macro body. + +

+TF's input handler recognizes ^H and ^? as backspace and ^J and ^M as newline, +even when they are not bound to anything. +However, if a keybinding is defined for any of these keys, +it will override the internal handling of that key. + +

+At startup, TF also examines the +terminal driver settings for character sequences corresponding to the +/dokey functions +BWORD, DLINE, REFRESH, and LNEXT, and binds them +accordingly in addition to the default bindings listed above. + +

Mapping character sequences to Named Keys

+

+Because TF runs in a terminal and not in a windowing system, it +does not see actual keystrokes, but only the characters generated by a +keystroke. For example, the up arrow key on many terminals generates "^[[A", +and that is what TF receives. +Thus, TF uses a set of definitions like +"/def -b'charsequence' = +/key_name" +to map character sequences to the keys that generate them. +If two different keys generate the same sequence of characters, +there is no way for TF to tell them apart. + +

+At startup, TF automatically binds character sequences to the +named key macros according to vt100, vt220, ANSI, and xterm definitions, +plus OS/2 definitions if running on OS/2, +as well as the termcap entry corresponding to your +%TERM variable. +If the named keys on your terminal generate character sequences that +are not recognized by TF, you will need to bind them yourself with +"/def -b'charsequence' = +/key_name". +For example, if your terminal's PgUp key generates "^[[3~", TF will think you +pressed Delete, since that is the character sequence generated by Delete +on most terminals. To tell TF about PgUp on your terminal, you should do +"/def -b'^[[3~' = /key_pgup". + +

+ + + + + +Note for Mac OS X Terminal.app users: by default, Terminal.app traps PageUp +and PageDown keys itself and does not send them to the application (tf). +It does however send Shift-PageUp and Shift-PageDown to the application, +so you can use these to scroll in tf running inside Terminal. +You can also tell Terminal to send the unshifted keys to tf by +redefining them in Terminal | Window Settings | Keyboard. + +

+ + + +Note: some broken terminal emulators (TeraTerm, NiftyTelnet) send incorrect +character sequences for the editor keypad +(insert, delete, home, end, pgup, pgdn). +For TeraTerm users, the preferred fix is to copy +%TFLIBDIR/teraterm.keyboard.cnf +to KEYBOARD.CNF in their TeraTerm directory; +this will help all applications you run within TeraTerm, not just TF. +Users of either terminal emulator may work around the problem with +"/load kb_badterm.tf". + + +

+Note that before version 3.5 alpha 21 or beta 1, it was usually harmless to +"/set +TERM=vt100" +on terminals that accepted a superset of vt100 display codes. +However, the termcap key definitions are often different for terminals +that are otherwise similar (e.g., vt100 and xterm share many display +codes, but the key definitions are different), so setting +%TERM incorrectly +may interfere with the operation of named keys. +Xterm users should also note that since 5.0, TF has its own +scrollback, +and xterm's scrollback will not work properly even if you try to trick TF +with TERM=vt100. + +

+ +

"Kbnum" argument

+With the default keybindings, +ESC followed by an optional "-" and any number of digits sets the global +variable %kbnum. +By default, the current +%kbnum +value is displayed near the right end of the +status line. +Then, when any other keybinding is typed, +that keybinding may use the value of +%kbnum. +Whether the keybinding uses the value or not, +%kbnum is cleared after +the keybinding has run. +Most keybindings that use +%kbnum +use it as a repeat count. +For example, typing "ESC 1 2 x" is the same as typing +"x" 12 times. +For keybindings that have a sense of direction, negative values of +%kbnum reverse that +direction: for example, typing "ESC - 4 PgDn" is like typing +"PgUp" 4 times. +The "^G" (/beep) keybinding +does not honor %kbnum, +so it can be used to cancel +%kbnum with no effect. +The variable +%max_kbnum +sets an upper limit on the value of +%kbnum +that can be entered by the ESC and digit keys, to prevent +typos from sending TF into very long loops. + +

+The interpretation of +%kbnum +must be done by the command called from the keybinding; +it is not done automatically by TF. So, for +%kbnum +to be meaningful in a macro you write, you must implement those +semantics yourself. +Additionally, most of the standard "/kb_*" and +"/dokey" +commands that use %kbnum +are optimized to not simply repeat the command a number of times, +but instead calculate only the end result. For example, +ESC 300 TAB does not laboriously scroll 300 screenfulls of text +onto the screen, but figures out what the 300th screenfull looks +like and draws that immediately. It does this because /dokey_page +calls "/test +morescroll( +winlines() * +(kbnum?:1))". + +

+To set %kbnum +by means other than the default keybindings above, simply +/set it as you would any other variable. +Once it is set, all typed digits are appended to it. When any non-digit +key is typed, that key will be executed, and +%kbnum will be cleared. + + +

+

Other key bindings

+ + + + + + + + + + + +

+ Some additional keyboard operations can be defined by + /loading these library files: +

+
kb-old.tf
keybindings like those in TF 4.0 and earlier +
kb-emacs.tf
additional emacs-like keybindings +
kbregion.tf
cut-and-paste operations +
kbstack.tf
save the current input line with ESC DOWN and + restore it later with ESC UP. +
+ See the comments at the top of each file for further documentation. + + +
+

+ See also: /dokey, + /bind, + /complete, + %wordpunct, + signals. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/library.html b/help/topics/library.html new file mode 100644 index 0000000..6ccfdf4 --- /dev/null +++ b/help/topics/library.html @@ -0,0 +1,211 @@ +TinyFugue: standard library + + + + + + +

standard library

+ +

+ When TF is started, commands are loaded + from the standard library + (%{TFLIBDIR}/stdlib.tf). + If the installer has created an optional local library + (%{TFLIBDIR}/local.tf), + that will also be loaded. Macros + defined in the standard library are marked with the invisible option + ("-i") + so they will not be processed by + /list, + /save and + /purge unless forced. Redefining or + undefining such a macro will clear the + -i + option, so customized macros with + the same names as library macros can be + created, listed, saved, and purged. + +

+ See also: utilities + +

+ +

Filenames:

+ +

+ These macros may be redefined to any + filename. LOGFILE contains the default filename used by + /log. MACROFILE, HILITEFILE, GAGFILE, + TRIGFILE, BINDFILE, HOOKFILE, and WORLDFILE contain the default filenames + used by the /load* and + /save* families of commands. + + +

+ +

List commands:

+
+
/listdef spec +
equivalent to '/list + spec'. +
/listhilite spec +
lists hilites on + spec. +
/listgag spec +
lists gags on + spec. +
/listtrig spec +
lists triggers on + spec. +
/listbind spec +
lists key bindings matching spec +
/listhook spec +
lists hooks matching + spec. +
+ +

+ See: /list + +

+ +

Purge commands:

+ +

+

+
/purgedef spec +
purges macros whose name + matches spec +
/purgehilite spec +
purges macros with + hilites on spec +
/purgegag spec +
purges macros with + gags on spec +
/purgetrig spec +
purges macros with + triggers on spec +
/purgedeft spec +
purges named macros with + triggers on spec +
/purgebind spec +
purges key bindings matching spec. +
/purgehook spec +
purges hooks matching + spec. +
+ +

+ See: /purge + +

+ +

Load commands:

+ +

+ /loaddef, + /loadhilite, + /loadgag, + /loadtrig, + /loadbind, + /loadhook, + /loadworld. All take a + file argument; if the argument is omitted, the appropriate default + filename macro is used. + +

+ See: /load + +

+ +

Save commands:

+ +

+ /savedef, + /savehilite, + /savegag, + /savetrig, + /savebind, + /savehook, + /saveworld. All take a + file argument. If file is omitted, the appropriate default + filename macro is used. + +

+ See: /save + +

+ + + + + + +

File compression:

+ +

+ The helpfile, personal config file, and files read with + /load may be stored compressed on disk. + If TF can not find a file with the specified name, it will add + ${COMPRESS_SUFFIX} to the filename and try to read it by piping it through + ${COMPRESS_READ}. ${COMPRESS_READ} should contain the name of a shell + command that takes a filename as an argument, and prints its output on + standard output. The default values for ${COMPRESS_SUFFIX} and + ${COMPRESS_READ} defined in the library are ".Z" and "zcat" for unix, + ".zip" and "unzip -p" for os/2. Undefining ${COMPRESS_SUFFIX} will disable + this feature. Note: /save, + /saveworld, and + /log do not write compressed files. + +

+ + +

World connection commands:

+ +

+

+
/retry world [delay] +
Try to connect to world; repeat every delay + seconds until successful. +
/retry_off [world] +
Cancels "/retry + world" (default: all worlds) +
+ +

+ + + + +

Hilite commands:

+ +

+ /hilite_whisper, + /hilite_page, + /nohilite_whisper, and + /nohilite_page turn on or + off hiliting several different page + and whisper formats. + +

+ +

Backward compatible commands:

+ +

+ /reply, + /act, + /nolog, + /nologin, + /nologme, + /noquiet, and + /nowrap are provided for + compatibility. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/locale.html b/help/topics/locale.html new file mode 100644 index 0000000..b6f5c5d --- /dev/null +++ b/help/topics/locale.html @@ -0,0 +1,118 @@ +TinyFugue: locale + + + + + + + + + + + + + +

locale

+ +

+ + On many systems, "/setenv + LC_CTYPE=en_US" will allow you to use characters in the 8-bit ISO 8859 + character set. If this does not work on your system, or you want to use a + non-English locale, or you just want to learn more, keep reading. + +

+ A locale defines a set of rules for a language and culture. If the + platform on which TF runs supports locales, TF will support the following + categories of locale rules: + +

+
LC_CTYPE
determines what characters are allowed, and whether + they should be treated as letters, digits, punctuation, or + control characters. When using a locale with an 8-bit + character set, make sure that + %istrip + is off and + %meta_esc + is off or nonprint, + so you can type 8-bit characters with the meta key. +
LC_TIME
determines the names and formats used in displaying + dates and times with + /time, + ftime(), etc. +
+ +

+ The user can set the locale either by having special variables defined in + the environment before starting TF (preferred), or by setting them + while TF is running (they will automatically be exported to the environment + even if /set is used). + The exact rules for setting locale depend on the platform, and should be + found your system's documentation for setlocale(). + The rules are usually something like this: + +

    +
  1. If the variable + LC_ALL is set, + its value is used as the locale for all supported categories. +
  2. Otherwise, if the variable with the name of a category (e.g., LC_CTYPE) + is set, its value is used as the locale for that category. +
  3. Otherwise, if the variable + LANG is set, + its value is used as the locale for any supported categories + that were not covered by the first two rules. +
  4. If none of those are set for a category, the default "C" locale is + used for that category, which allows the 7-bit ASCII character + set and US English date and time formats. +
+ +

+ The valid values for the locale variables depend on your system. + On a POSIX system, the valid values can be listed with the shell command + "locale -a". + +

+ Bugs: +

    +
  • LC_COLLATE and LC_MESSAGES categories are not supported. +
  • In glob patterns, + there is no way to specify a range of all letters that works in + all locales. E.g., "[A-Za-z]" works in the standard "C" locale, + but not necessarily in others. + (However, in regexp patterns, + locale information is used to define character type operators + like "\w" and "\W", case insensitivity, etc.) +
  • TF will convert character 0x80 to the character 0x00. This is not + usually an issue, since character 0x80 is not a printable character in + the character sets of most locales (including all ISO character sets). +
+ +

+ If your system has locale support, but does not have any locales installed, + you can get the POSIX 1003.2 WG15-collection locale definitions from + ftp://dkuug.dk/i18n/ or + ftp://i44ftp.info.uni-karlsruhe.de/pub/linux/ctype/. + +

+ Note that even though TF supports locales with non-ASCII character sets, + not all MUD servers support non-ASCII character sets. Many servers simply + discard characters that are not printable ASCII. Among servers that do + support non-ASCII characters, the most commonly used set is ISO-8859-1 + (Latin1). When choosing a locale for TF, you should choose one that + uses the same character set as the servers you use. + +

+ Note to linux users and other users of GNU libc: + at least some versions of GNU localedef generate invalid LC_TIME + information from the WG15-collection sources, and the GNU libc causes + any program that tries to use the invalid LC_TIME information to crash. + Workarounds: delete the LC_TIME data; or, do not set any of the + LC_ALL, LC_TIME, or LANG variables. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/login.html b/help/topics/login.html new file mode 100644 index 0000000..d6e59a9 --- /dev/null +++ b/help/topics/login.html @@ -0,0 +1,36 @@ +TinyFugue: login + + +

login

+ +

+ If the %{login} flag + is on when you connect + to a world, and that world was + defined with a + character, password, and optional worldtype, TF will attempt to + automatically login to that world. + +

+ Autologin + is done by a hook defined in + the standard library. + The hook for the default + worldtype uses TinyMUD login format; + there are also + hooks for "tiny", "lp", "lpp", and + "telnet" worldtypes. You can also define your own LOGIN + hooks. + +

+ See: hooks, + variables, + /addworld + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/macros.html b/help/topics/macros.html new file mode 100644 index 0000000..f9a4c94 --- /dev/null +++ b/help/topics/macros.html @@ -0,0 +1,202 @@ +TinyFugue: macros + +

macros

+ A macro is basically a named set of + commands. + The simplest kind of macro has a name + and a body. The body is a list of one or more commands, separated by '%;' + tokens. These commands are executed when the + macro is called. For example, if you + define a macro like +
+    /def time_warp = :jumps to the left!%;:steps to the right!
+
+ and call it by typing +
+    /time_warp
+
+ you will execute the commands +
+    :jumps to the left!
+    :steps to the right!
+
+ A macro name is the way of calling it + from the command line or from another + macro. You can execute a + macro by typing '/' followed by the + name of the macro. If a + macro and builtin have the same name, + the macro will be called. Typing '/@' + followed by the name will always call the builtin command. + +

+ A macro body, or execution text, is the + commands and/or text executed when the + macro is called. This text is + evaluated according to the rules described under + "evaluation". + +

+ Macros actually have many more fields, + described below. All fields (including name and body) are optional. +

+ +

+

name +
The name of the macro. + Names should begin with a letter, and contain letters, numbers, or + '_' characters. + +

+

body +
One or more commands to be executed when + macro is called. + The body is compiled to an efficient internal format the first + time it is needed, so each future call can execute it more quickly. + +

+

number +
All macros are + automatically numbered sequentially. This field can not be + changed. + +

+

trigger +
when text matches the + trigger pattern, the + macro may be called. + +

+

hook +
the macro can be called + when a TF hook event occurs. + +

+

keybinding +
the macro will be called + when its keybinding is typed. + +

+

shots +
the macro will be deleted + after it is triggered or + hooked a certain number of + times. + +

+

priority +
when multiple triggers + match the same text, the one with the highest + priority is selected + (see "priority"). + +

+

fall-thru +
on a trigger or + hook, allows additional + macros of lower + priority to be + run (see "priority"). + +

+

world +
the macro can only be + triggered/hooked + by text/events from a particular world. + +

+

worldtype +
the macro can only be + triggered/hooked + by text/events from a particular type of world. + +

+

expression +
the macro can only be + triggered/hooked + if expression is non-zero. + +

+

attributes +
bold, underline, etc. for displaying + trigger text. + +

+

probability +
when triggered, the + macro has a certain probability + of being executed. + +

+

invisibility +
prevents handling of macro + by /list, + /save, or + /purge. +
+ Macros may be called in several ways: +
    +
  • a command of the form "/name" or "/#number" +
  • triggered by text from a socket + (see "triggers") +
  • hooked by a tinyfugue event (see + "hooks") +
  • by keybindings +
+ +

+ Associated commands: +

+
/def +
define a named macro, with + any fields +
/trig +
define a trigger + macro +
/hilite +
define a hilite + macro +
/gag +
define a gag + macro +
/bind +
define a keybinding macro +
/hook +
define a hook + macro +
/undef +
undefine a named macro +
/unhook +
undefine a hook + macro +
/unbind +
undefine a keybinding macro +
/undefn +
undefine a macro by number +
/undeft +
undefine a macro by + trigger +
/purge +
undefine a set of macros +
/list +
display a list of macros +
/load +
load commands from a file +
/save +
save macro definitions to a + file +
+ +

+ See also: triggers, + gags, + hilites, + hooks + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/mail.html b/help/topics/mail.html new file mode 100644 index 0000000..0294cd9 --- /dev/null +++ b/help/topics/mail.html @@ -0,0 +1,73 @@ +TinyFugue: mail checking + + + +

mail checking

+ +

+If %{maildelay} +is nonzero, TF will check for mail every +%{maildelay} seconds. +TF checks for mail in each file in the space-separated list of files in +the %{TFMAILPATH} +variable (literal spaces in TFMAILPATH +may be quoted by preceding them with a backslash). +If %{TFMAILPATH} +is not set, TF will check in the single file named by the +%{MAIL} +variable. + +

+TF considers a mailfile to have unread mail if the file has been written more +recently than it has been read. When this changes for any of the monitored +files, TF updates the mail indicator on the +status line +(actually, the "@mail" +status). + +When TF determines that a mailfile contains +new mail, it calls the MAIL hook, +which by default prints "You have new mail". +If a mailfile is not empty the first time TF checks it, +TF just prints "You have mail" without calling the +MAIL hook. + +

+If an error occurs while checking any file, an error message will be displayed +only once, until that error clears up (or changes to a different error), but +TF will continue to check that file. To disable checking, even after an +error, you must remove the file from +%{TFMAILPATH} or +%{MAIL}. + +

+The nmail() +function returns +the number of monitored mail files containing unread mail. + +

+MAIL and/or MAILPATH variables are usually set in the environment before +TF starts. +If %{MAIL} is not +set when TF starts, TF will try to set it to the name of the system mail +directory plus your user name (if the system mail directory was defined +when TF was installed). If MAILPATH (which uses ":" as a delimiter) +is set when TF starts, it is transferred to +%{TFMAILPATH} +(which uses space as a delimiter). + +

+ See: + nmail(), + variables, + special variables, + /set, + mailing list. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/mailinglist.html b/help/topics/mailinglist.html new file mode 100644 index 0000000..3d965c2 --- /dev/null +++ b/help/topics/mailinglist.html @@ -0,0 +1,19 @@ +TinyFugue: mailing list + + + + +

mailing list

+ +

+ The TinyFugue mailing list is an email forum for discussion of topics + related to TinyFugue. To subscribe, follow the instructions at + http://tinyfugue.sourceforge.net/ + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/mccp.html b/help/topics/mccp.html new file mode 100644 index 0000000..b35d038 --- /dev/null +++ b/help/topics/mccp.html @@ -0,0 +1,38 @@ +TinyFugue: Mud Client Compression Protocol + + + +

Mud Client Compression Protocol

+ +

+ TF supports versions 1 and 2 of the Mud Client Compression Protocol (MCCP) + described at + http://www.randomly.org/projects/MCCP/. + MCCP allows a server to compress the data stream it sends to the client (TF), + which may improve throughput on a poor connection. + +

+ MCCP is transparent to the user. When TF connects to a server that supports + MCCP, it will be enabled automatically, unless the + mccp variable is off. + The listsockets command + will indicate that MCCP is enabled. + +

+ MCCP v1 is broken, and may not be supported in the future if it is found + to interfere with valid protocols. + If you use a server that has only MCCP v1, you should encourage + the owner to upgrade to add support for v2. + +

+ See also: + protocols, + telnet + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2000-2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/mode.html b/help/topics/mode.html new file mode 100644 index 0000000..6807e75 --- /dev/null +++ b/help/topics/mode.html @@ -0,0 +1,116 @@ +TinyFugue: mode + + + + + + +

mode

+ +

+ TinyFugue has two main interface modes: Visual and non-visual. + Visual mode will be enabled by default, unless your + %{TERM} does not + support it, or + %{visual} + is explicitly turned off in .tfrc, + or tf is started with the -v option. + Visual mode can be turned off or on with the + "/visual" command. + +

+ +

Visual mode

+ The Visual interface has two windows: the bottom window is for input, the + top for output. + TF maintains a separate + virtual window for each + open socket; only the + foreground world's window + is displayed. + If your terminal can scroll in a region, output will + scroll; + otherwise if your terminal can delete and insert lines, TF will + simulate scrolling; + otherwise it will wrap from bottom to top, clearing two + lines ahead. The + %{scroll} + variable + can be set to explicitly choose + scrolling + or wrapping. The + %{isize}, + %{cleardone}, and + %{clearfull} + variables + can be used to customize the visual display. See: + %isize, + %cleardone, + %clearfull. + +

+ The two windows are separated by a + status line, which can be + formatted by the user as described under + status line. + +

+ If you are using a terminal emulator that emulates different terminal types, + the recommended type to use is vt220, vt100, or ansi (in that order), with + %{TERM} set to the same + value. Scrolling may appear jumpy under ansi, but will be smooth under + vt220 and vt100. vt220 also provides some additional features that may + make command line editing smoother (especially over a slow modem). + +

+ +

Non-visual mode

+ In the non-visual interface, input and output are both displayed on the + bottom line. If you are typing and output appears, your input is cleared, + the output is displayed and everything above it scrolls, + and your input is redisplayed on the last line. + If your input has wrapped around to a second or third line, only the last + line will be cleared and redisplayed. + +

+ +


+

+ In both modes, the output window is redrawn whenever necessary: when its + size changes, when the mode changes, when + %wrap, + %wrapsize, or + %wrapspace + change, or when TF resumes after + /suspend or + /sh. + +

+ In both modes, output text is wrapped around at a right margin of one less + than the number of columns on your screen (typically 79) unless + wrapping has + been turned off. In addition, when text is wrapped, all wrapped lines + after the first will be indented 4 spaces to help distinguish them from + the beginning of an original line + (configurable by setting + %wrapspace). + See: + columns(), + %wrap, + %wrapsize, + %wrappunct, + %wrapspace. + +

+ If the %{more} flag is + on, output is suspended when the screen is full, and you can use the TAB + key to continue. See: /more, + /dokey. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/options.html b/help/topics/options.html new file mode 100644 index 0000000..72570b7 --- /dev/null +++ b/help/topics/options.html @@ -0,0 +1,39 @@ +TinyFugue: options + + + + +

options

+ +

+ Many commands take options to modify their behavior, following these rules + (similar to UNIX conventions, but not identical): +

    +
  • All options must be immediately preceded by '-'. +
  • Options may be grouped after a single '-'. +
  • Some options may take string, numeric, or time arguments. There must + be no space between the option and the argument. +
  • String option-arguments may be delimited by a space, double quotes, + single quotes, or backquotes. +
  • A literal delimiter character or '\' within a delimited string must + be escaped by preceding it with '\'. +
  • A numeric option-argument may be given as an + expression + that evaluates to a numeric value. If the expression contains spaces + or quotes, they must be quoted or escaped as in a string option-argument. +
  • All options must precede normal arguments. +
  • A '-' or '--' by itself may be used to mark the end of the options. + This is useful when the first regular argument begins with '-'. +
  • A '-?' or invalid option will produce a list of valid options. +
+ +

+ See also: getopts(). + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/patterns.html b/help/topics/patterns.html new file mode 100644 index 0000000..de3b13d --- /dev/null +++ b/help/topics/patterns.html @@ -0,0 +1,210 @@ +TinyFugue: patterns + +

patterns

+ +

+ Patterns are used throughout TF, including + triggers, + hooks, + /purge, + /list, + /limit, + /recall, and + expressions. + There are four styles of pattern matching available: +

+
simple +
target string and pattern string must be identical +
glob +
similar to shell filename patterns +
regexp +
perl-compatible regular expressions +
substr +
target string must contain pattern string +
+ The style used by + a particular command is determined either by the use of the -m option or + the setting of the global variable + %{matching}. + +

+ + + +

Simple matching ("simple")

+ +

+ The pattern is compared directly to the string. There are no special + characters. Case is significant. + +

+ + +

Substring matching ("substr")

+ +

+ The string must contain the pattern. There are no special + characters. Case is significant. + +

+ + + +

Globbing ("glob")

+ +

+ Globbing is the default matching style, and was the only style available + before version 3.2. It is similar to filename expansion ("globbing") used + by many shells (but unlike shells, tf uses glob only for comparison, + not expansion). + +

+ There are several special sequences that can be used in tf globbing: + +

+

    +
  • The '*' character matches any number of characters. + +

    +

  • The '?' character matches any one character. + +

    +

  • Square brackets ([...]) can be used to match any one of a sequence of + characters. Ranges can be specified by giving the first and last + characters with a '-' between them. If '^' is the first character, the + sequence will match any character NOT specified. + +

    +

  • Curly braces ({...}) can be used to match any one of a list of words. + Different words can be matched by listing each within the braces, separated + by a '|' (or) character. Both ends of {...} will only match a space or end + of string. Therefore "{foo}*" and "{foo}p" do not match "foop", and + "*{foo}" and "p{foo}" do not match "pfoo". + +

    + Patterns containing "{...}" can easily be meaningless. A valid {...} + pattern must: (a) contain no spaces, (b) follow a wildcard, space, or + beginning of string, (c) be followed by a wildcard, space, or end of + string. + +

    + The pattern "{}" will match the empty string. + +

    +

  • Any other character will match itself, ignoring case. A special + character can be made to match itself by preceding it with '\' to remove + its special meaning. +
+ +

+ Examples:
+ "d?g" matches "dog", "dig" and "dug" but not "dg" or "drug".
+ "d*g" matches "dg", "dog", "drug", "debug", "dead slug", etc.
+ "{d*g}" matches "dg", "dog", "drug", "debug", but not "dead slug".
+ "M[rs]." matches "Mr." and "Ms."
+ "M[a-z]" matches "Ma", "Mb", "Mc", etc.
+ "[^a-z]" matches any character that is not in the English alphabet.
+ "{storm|chup*}*" matches "chupchup fehs" and "Storm jiggles".
+ "{storm|chup*}*" does NOT match "stormette jiggles".
+ +

+ + + + + +

Regular expressions ("regexp")

+ +

+ TF implements regular expressions with the package PCRE 2.08, + Copyright (c) 1997-1999 University of Cambridge. + The PCRE regexp syntax is documented on its own page under the topic + "pcre". +

+ The syntax and semantics of these regular expressions is nearly identical + to those in perl 5, and is roughly a superset of those used in versions of + tf prior to 5.0. + There is one incompatibility with old tf regexps: the "{" character + is now special, and must be written "\{" to match a literal "{". + To help with the transition to the new syntax, you will be warned + if you use a regexp containing "{", unless you turn off the + warn_curly_re + variable. +

+ If all letters in a regexp are lower case, the regexp will default to + using caseless matching. If a regexp contains any upper case letters, it + will default to case-sensitive matching. Of course, you can explicitly + specify caseless matching by including "(?i)" at the beginning of the regexp, + or case-sensitive by including "(?-i)". +

+ Regexps will honor the locale that + was set when the regexp was defined. + Locale affects caseless matching, + and determines whether characters are letters, digits, or whatever. + So, for example, while the regexp "[A-Za-z]" will match only English letters, + "[^\W\d_]" will match any letter defined by the + locale. +

+ After a regexp match, %Pn + substitutions can be used to get the value of the string that matched + various parts of the regexp. + See %Pn. +

+ For those of you who care about code details: + TF compiles PCRE regexps with the PCRE_DOLLAR_ENDONLY and PCRE_DOTALL + options. +

+ See also: + regmatch(), + substitution. + +

Comparison of glob and regexps.

+ +In a glob, '*' and '?' by themselves match text. +In a regexp, '*' and '?' are only meaningful in combination with +the pattern they follow. + +Regexps are not "anchored"; that is, the match may occur anywhere in +the string, unless you explicitly use '^' and/or '$' to anchor it. +Globs are anchored, and must match the entire string. + +
+    regexp		equivalent glob
+    ------		-----------------
+    "part of line"	"*part of line*"
+    "^entire line$"	"entire line"
+    "\bword\b"		"*{word}*"
+    "^(you|hawkeye) "	"{you|hawkeye} *"
+    "foo.*bar"		"*foo*bar*"
+    "f(oo|00)d"		"*{*food*|*f00d*}*"
+    "line\d"		"*line[0-9]*"
+    "^[^ ]+ whispers,"	"{*} whispers,*"
+    "foo(xy)?bar"	"*{*foobar*|*fooxybar*}*"
+    "zoo+m"		none
+    "foo ?bar"		none
+    "(foo bar|frodo)"	none
+
+ +

+

Notes.

+
    +
  • For best performance, make the beginning of your patterns as specific as + possible. +
  • Do not use ".*" or "^.*" at the beginning of a + regexp. It is very inefficient, and not needed. Use + %PL instead if you need to + retrieve the substring to the left of the match. +
  • If a glob and regexp can do the same job, the glob is usually + slightly faster. + But if using a glob instead of a regexp would mean you need some extra code, + then that extra code will cost much more than the regexp would have. + So if only a regexp can do what you need, don't hesitate to use it. +
+ +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/pcre.html b/help/topics/pcre.html new file mode 100644 index 0000000..c0e6cc9 --- /dev/null +++ b/help/topics/pcre.html @@ -0,0 +1,1215 @@ +PCRE syntax + + +This document was extracted from the pcre.3.html documentation, +Copyright (c) 1997-1999 University of Cambridge, +and minimally adapted for use in TinyFugue. + +
    +
  • REGULAR EXPRESSION DETAILS +

    +The syntax and semantics of the regular expressions supported by PCRE are +described below. Regular expressions are also described in the Perl +documentation and in a number of other books, some of which have copious +examples. Jeffrey Friedl's "Mastering Regular Expressions", published by +O'Reilly (ISBN 1-56592-257-3), covers them in great detail. The description +here is intended as reference documentation. +

    +

    +A regular expression is a pattern that is matched against a subject string from +left to right. Most characters stand for themselves in a pattern, and match the +corresponding characters in the subject. As a trivial example, the pattern +

    +

    +

    +  The quick brown fox
    +
    +

    +

    +matches a portion of a subject string that is identical to itself. The power of +regular expressions comes from the ability to include alternatives and +repetitions in the pattern. These are encoded in the pattern by the use of +meta-characters, which do not stand for themselves but instead are +interpreted in some special way. +

    +

    +There are two different sets of meta-characters: those that are recognized +anywhere in the pattern except within square brackets, and those that are +recognized in square brackets. Outside square brackets, the meta-characters are +as follows: +

    +

    +

    +  \      general escape character with several uses
    +  ^      assert start of subject (or line, in multiline mode)
    +  $      assert end of subject (or line, in multiline mode)
    +  .      match any character except newline (by default)
    +  [      start character class definition
    +  |      start of alternative branch
    +  (      start subpattern
    +  )      end subpattern
    +  ?      extends the meaning of (
    +         also 0 or 1 quantifier
    +         also quantifier minimizer
    +  *      0 or more quantifier
    +  +      1 or more quantifier
    +  {      start min/max quantifier
    +
    +

    +

    +Part of a pattern that is in square brackets is called a "character class". In +a character class the only meta-characters are: +

    +

    +

    +  \      general escape character
    +  ^      negate the class, but only if the first character
    +  -      indicates character range
    +  ]      terminates the character class
    +
    +

    +

    +The following sections describe the use of each of the meta-characters. +

    +
  • BACKSLASH +

    +The backslash character has several uses. Firstly, if it is followed by a +non-alphanumeric character, it takes away any special meaning that character may +have. This use of backslash as an escape character applies both inside and +outside character classes. +

    +

    +For example, if you want to match a "*" character, you write "\*" in the +pattern. This applies whether or not the following character would otherwise be +interpreted as a meta-character, so it is always safe to precede a +non-alphanumeric with "\" to specify that it stands for itself. In particular, +if you want to match a backslash, you write "\\". +

    +

    +If a pattern is compiled with the "x" (PCRE_EXTRA) option, whitespace in the +pattern (other than in a character class) and characters between a "#" outside +a character class and the next newline character are ignored. An escaping +backslash can be used to include a whitespace or "#" character as part of the +pattern. +

    +

    +A second use of backslash provides a way of encoding non-printing characters +in patterns in a visible manner. There is no restriction on the appearance of +non-printing characters, apart from the binary zero that terminates a pattern, +but when a pattern is being prepared by text editing, it is usually easier to +use one of the following escape sequences than the binary character it +represents: +

    +

    +

    +  \a     alarm, that is, the BEL character (hex 07)
    +  \cx    "control-x", where x is any character
    +  \e     escape (hex 1B)
    +  \f     formfeed (hex 0C)
    +  \n     newline (hex 0A)
    +  \r     carriage return (hex 0D)
    +  \t     tab (hex 09)
    +  \xhh   character with hex code hh
    +  \ddd   character with octal code ddd, or backreference
    +
    +

    +

    +The precise effect of "\cx" is as follows: if "x" is a lower case letter, it +is converted to upper case. Then bit 6 of the character (hex 40) is inverted. +Thus "\cz" becomes hex 1A, but "\c{" becomes hex 3B, while "\c;" becomes hex +7B. +

    +

    +After "\x", up to two hexadecimal digits are read (letters can be in upper or +lower case). +

    +

    +After "\0" up to two further octal digits are read. In both cases, if there +are fewer than two digits, just those that are present are used. Thus the +sequence "\0\x\07" specifies two binary zeros followed by a BEL character. +Make sure you supply two digits after the initial zero if the character that +follows is itself an octal digit. +

    +

    +The handling of a backslash followed by a digit other than 0 is complicated. +Outside a character class, PCRE reads it and any following digits as a decimal +number. If the number is less than 10, or if there have been at least that many +previous capturing left parentheses in the expression, the entire sequence is +taken as a back reference. A description of how this works is given +later, following the discussion of parenthesized subpatterns. +

    +

    +Inside a character class, or if the decimal number is greater than 9 and there +have not been that many capturing subpatterns, PCRE re-reads up to three octal +digits following the backslash, and generates a single byte from the least +significant 8 bits of the value. Any subsequent digits stand for themselves. +For example: +

    +

    +

    +  \040   is another way of writing a space
    +  \40    is the same, provided there are fewer than 40
    +            previous capturing subpatterns
    +  \7     is always a back reference
    +  \11    might be a back reference, or another way of
    +            writing a tab
    +  \011   is always a tab
    +  \0113  is a tab followed by the character "3"
    +  \113   is the character with octal code 113 (since there
    +            can be no more than 99 back references)
    +  \377   is a byte consisting entirely of 1 bits
    +  \81    is either a back reference, or a binary zero
    +            followed by the two characters "8" and "1"
    +
    +

    +

    +Note that octal values of 100 or greater must not be introduced by a leading +zero, because no more than three octal digits are ever read. +

    +

    +All the sequences that define a single byte value can be used both inside and +outside character classes. In addition, inside a character class, the sequence +"\b" is interpreted as the backspace character (hex 08). Outside a character +class it has a different meaning (see below). +

    +

    +The third use of backslash is for specifying generic character types: +

    +

    +

    +  \d     any decimal digit
    +  \D     any character that is not a decimal digit
    +  \s     any whitespace character
    +  \S     any character that is not a whitespace character
    +  \w     any "word" character
    +  \W     any "non-word" character
    +
    +

    +

    +Each pair of escape sequences partitions the complete set of characters into +two disjoint sets. Any given character matches one, and only one, of each pair. +

    +

    +A "word" character is any letter or digit or the underscore character, that is, +any character which can be part of a Perl "word". The definition of letters and +digits is controlled by PCRE's character tables, and may vary if locale- +specific matching is taking place (see "Locale support" above). For example, in +the "fr" (French) locale, some character codes greater than 128 are used for +accented letters, and these are matched by \w. +

    +

    +These character type sequences can appear both inside and outside character +classes. They each match one character of the appropriate type. If the current +matching point is at the end of the subject string, all of them fail, since +there is no character to match. +

    +

    +The fourth use of backslash is for certain simple assertions. An assertion +specifies a condition that has to be met at a particular point in a match, +without consuming any characters from the subject string. The use of +subpatterns for more complicated assertions is described below. The backslashed +assertions are +

    +

    +

    +  \b     word boundary
    +  \B     not a word boundary
    +  \A     start of subject (same as "^" in tf)
    +  \Z     end of subject (same as "$" in tf)
    +  \z     end of subject (same as "$" in tf)
    +
    +

    +

    +These assertions may not appear in character classes (but note that "\b" has a +different meaning, namely the backspace character, inside a character class). +

    +

    +A word boundary is a position in the subject string where the current character +and the previous character do not both match \w or \W (i.e. one matches +\w and the other matches \W), or the start or end of the string if the +first or last character matches \w, respectively. +

    + +
  • CIRCUMFLEX AND DOLLAR +

    +Outside a character class, in the default matching mode, the circumflex +character is an assertion which is true only if the current matching point is +at the start of the subject string. +Inside a character +class, circumflex has an entirely different meaning (see below). +

    +

    +Circumflex need not be the first character of the pattern if a number of +alternatives are involved, but it should be the first thing in each alternative +in which it appears if the pattern is ever to match that branch. If all +possible alternatives start with a circumflex, that is, if the pattern is +constrained to match only at the start of the subject, it is said to be an +"anchored" pattern. (There are also other constructs that can cause a pattern +to be anchored.) +

    +

    +A dollar character is an assertion which is true only if the current matching +point is at the end of the subject string. + +Dollar need +not be the last character of the pattern if a number of alternatives are +involved, but it should be the last item in any branch in which it appears. +Dollar has no special meaning in a character class. +

    + +
  • SQUARE BRACKETS +

    +An opening square bracket introduces a character class, terminated by a closing +square bracket. A closing square bracket on its own is not special. If a +closing square bracket is required as a member of the class, it should be the +first data character in the class (after an initial circumflex, if present) or +escaped with a backslash. +

    +

    +A character class matches a single character in the subject; the character must +be in the set of characters defined by the class, unless the first character in +the class is a circumflex, in which case the subject character must not be in +the set defined by the class. If a circumflex is actually required as a member +of the class, ensure it is not the first character, or escape it with a +backslash. +

    +

    +For example, the character class [aeiou] matches any lower case vowel, while +[^aeiou] matches any character that is not a lower case vowel. Note that a +circumflex is just a convenient notation for specifying the characters which +are in the class by enumerating those that are not. It is not an assertion: it +still consumes a character from the subject string, and fails if the current +pointer is at the end of the string. +

    +

    +When caseless matching is set, any letters in a class represent both their +upper case and lower case versions, so for example, a caseless [aeiou] matches +"A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a +caseful version would. +

    + +

    +The minus (hyphen) character can be used to specify a range of characters in a +character class. For example, [d-m] matches any letter between d and m, +inclusive. If a minus character is required in a class, it must be escaped with +a backslash or appear in a position where it cannot be interpreted as +indicating a range, typically as the first or last character in the class. +

    +

    +It is not possible to have the literal character "]" as the end character of a +range. A pattern such as [W-]46] is interpreted as a class of two characters +("W" and "-") followed by a literal string "46]", so it would match "W46]" or +"-46]". However, if the "]" is escaped with a backslash it is interpreted as +the end of range, so [W-\]46] is interpreted as a single class containing a +range followed by two separate characters. The octal or hexadecimal +representation of "]" can also be used to end a range. +

    +

    +Ranges operate in ASCII collating sequence. They can also be used for +characters specified numerically, for example [\000-\037]. If a range that +includes letters is used when caseless matching is set, it matches the letters +in either case. For example, [W-c] is equivalent to [][\^_`wxyzabc], matched +caselessly, and if character tables for the "fr" locale are in use, +[\xc8-\xcb] matches accented E characters in both cases. +

    +

    +The character types \d, \D, \s, \S, \w, and \W may also appear in a +character class, and add the characters that they match to the class. For +example, [\dABCDEF] matches any hexadecimal digit. A circumflex can +conveniently be used with the upper case character types to specify a more +restricted set of characters than the matching lower case type. For example, +the class [^\W_] matches any letter or digit, but not underscore. +

    +

    +All non-alphanumeric characters other than \, -, ^ (at the start) and the +terminating ] are non-special in character classes, but it does no harm if they +are escaped. +

    +
  • VERTICAL BAR +

    +Vertical bar characters are used to separate alternative patterns. For example, +the pattern +

    +

    +

    +  gilbert|sullivan
    +
    +

    +

    +matches either "gilbert" or "sullivan". Any number of alternatives may appear, +and an empty alternative is permitted (matching the empty string). +The matching process tries each alternative in turn, from left to right, +and the first one that succeeds is used. If the alternatives are within a +subpattern (defined below), "succeeds" means matching the rest of the main +pattern as well as the alternative in the subpattern. +

    +
  • INTERNAL OPTION SETTING +

    +The settings of PCRE_CASELESS, PCRE_EXTENDED, and PCRE_UNGREEDY +can be changed from within the pattern by a sequence of Perl option letters +enclosed between "(?" and ")". The option letters are +

    +

    +

    +  i  for PCRE_CASELESS
    +  x  for PCRE_EXTENDED
    +  U  for PCRE_UNGREEDY (not in perl)
    +
    +

    +

    +For example, (?x) sets extended matching. It is also possible to +unset these options by preceding the letter with a hyphen, and a combined +setting and unsetting such as (?x-i), which sets extended and +while unsetting caseless, is also +permitted. If a letter appears both before and after the hyphen, the option is +unset. +

    +

    +The scope of these option changes depends on where in the pattern the setting +occurs. For settings that are outside any subpattern (defined below), the +effect is the same as if the options were set or unset at the start of +matching. The following patterns all behave in exactly the same way: +

    +

    +

    +  (?i)ABC
    +  A(?i)BC
    +  AB(?i)C
    +  ABC(?i)
    +
    +

    +

    +Such "top level" settings apply to the whole pattern (unless +there are other changes inside subpatterns). If there is more than one setting +of the same option at top level, the rightmost setting is used. +

    +

    +If an option change occurs inside a subpattern, the effect is different. This +is a change of behavior in Perl 5.005. An option change inside a subpattern +affects only that part of the subpattern that follows it, so +

    + +

    +

    +  (a(?-i)b)c
    +
    +

    +

    +matches abc, Abc, abC and AbC, and no other strings +(remember, in tf, regexps are caseless by default if they do not contain +any capital letters). +By this means, options can be made to have different settings in different +parts of the pattern. Any changes made in one alternative do carry on +into subsequent branches within the same subpattern. For example, +

    +

    +

    +  X(a(?i)b|c)
    +
    +

    +

    +matches "Xab", "XaB", "Xc", and "XC", even though when matching "C" the first +branch is abandoned before the option setting. This is because the effects of +option settings happen at compile time. There would be some very weird +behavior otherwise. +

    + +
  • SUBPATTERNS +

    +Subpatterns are delimited by parentheses (round brackets), which can be nested. +Marking part of a pattern as a subpattern does two things: +

    +

    +1. It localizes a set of alternatives. For example, the pattern +

    +

    +

    +  cat(aract|erpillar|)
    +
    +

    +

    +matches one of the words "cat", "cataract", or "caterpillar". Without the +parentheses, it would match "cataract", "erpillar" or the empty string. +

    +

    +2. It sets up the subpattern as a capturing subpattern (as defined above). +When the whole pattern matches, that portion of the subject string that matched +the subpattern is remembered for the TinyFugue %Pn substitutions. +Opening parentheses are counted from left to right (starting +from 1) to obtain the numbers of the capturing subpatterns. +

    +

    +For example, if the string "the red king" is matched against the pattern +

    +

    +

    +  the ((red|white) (king|queen))
    +
    +

    +

    +the captured substrings are "red king", "red", and "king", and are numbered 1, +2, and 3. +

    +

    +The fact that plain parentheses fulfill two functions is not always helpful. +There are often times when a grouping subpattern is required without a +capturing requirement. If an opening parenthesis is followed by "?:", the +subpattern does not do any capturing, and is not counted when computing the +number of any subsequent capturing subpatterns. For example, if the string "the +white queen" is matched against the pattern +

    +

    +

    +  the ((?:red|white) (king|queen))
    +
    +

    +

    +the captured substrings are "white queen" and "queen", and are numbered 1 and +2. The maximum number of captured substrings is 99, and the maximum number of +all subpatterns, both capturing and non-capturing, is 200. +

    +

    +As a convenient shorthand, if any option settings are required at the start of +a non-capturing subpattern, the option letters may appear between the "?" and +the ":". Thus the two patterns +

    +

    +

    +  (?i:saturday|sunday)
    +  (?:(?i)saturday|sunday)
    +
    +

    +

    +match exactly the same set of strings. Because alternative branches are tried +from left to right, and options are not reset until the end of the subpattern +is reached, an option setting in one branch does affect subsequent branches, so +the above patterns match "SUNDAY" as well as "Saturday". +

    +
  • REPETITION +

    +Repetition is specified by quantifiers, which can follow any of the following +items: +

    +

    +

    +  a single character, possibly escaped
    +  the . metacharacter
    +  a character class
    +  a back reference (see next section)
    +  a parenthesized subpattern (unless it is an assertion - see below)
    +
    +

    +

    +The general repetition quantifier specifies a minimum and maximum number of +permitted matches, by giving the two numbers in curly brackets (braces), +separated by a comma. The numbers must be less than 65536, and the first must +be less than or equal to the second. For example: +

    +

    +

    +  z{2,4}
    +
    +

    +

    +matches "zz", "zzz", or "zzzz". A closing brace on its own is not a special +character. If the second number is omitted, but the comma is present, there is +no upper limit; if the second number and the comma are both omitted, the +quantifier specifies an exact number of required matches. Thus +

    +

    +

    +  [aeiou]{3,}
    +
    +

    +

    +matches at least 3 successive vowels, but may match many more, while +

    +

    +

    +  \d{8}
    +
    +

    +

    +matches exactly 8 digits. An opening curly bracket that appears in a position +where a quantifier is not allowed, or one that does not match the syntax of a +quantifier, is taken as a literal character. For example, {,6} is not a +quantifier, but a literal string of four characters. +

    +

    +The quantifier {0} is permitted, causing the expression to behave as if the +previous item and the quantifier were not present. +

    +

    +For convenience (and historical compatibility) the three most common +quantifiers have single-character abbreviations: +

    +

    +

    +  *    is equivalent to {0,}
    +  +    is equivalent to {1,}
    +  ?    is equivalent to {0,1}
    +
    +

    +

    +It is possible to construct infinite loops by following a subpattern that can +match no characters with a quantifier that has no upper limit, for example: +

    +

    +

    +  (a?)*
    +
    +

    +

    +Earlier versions of Perl and PCRE used to give an error at compile time for +such patterns. However, because there are cases where this can be useful, such +patterns are now accepted, but if any repetition of the subpattern does in fact +match no characters, the loop is forcibly broken. +

    +

    +By default, the quantifiers are "greedy", that is, they match as much as +possible (up to the maximum number of permitted times), without causing the +rest of the pattern to fail. The classic example of where this gives problems +is in trying to match comments in C programs. These appear between the +sequences /* and */ and within the sequence, individual * and / characters may +appear. An attempt to match C comments by applying the pattern +

    +

    +

    +  /\*.*\*/
    +
    +

    +

    +to the string +

    +

    +

    +  /* first command */  not comment  /* second comment */
    +
    +

    +

    +fails, because it matches the entire string due to the greediness of the .* +item. +

    +

    +However, if a quantifier is followed by a question mark, then it ceases to be +greedy, and instead matches the minimum number of times possible, so the +pattern +

    +

    +

    +  /\*.*?\*/
    +
    +

    +

    +does the right thing with the C comments. The meaning of the various +quantifiers is not otherwise changed, just the preferred number of matches. +Do not confuse this use of question mark with its use as a quantifier in its +own right. Because it has two uses, it can sometimes appear doubled, as in +

    +

    +

    +  \d??\d
    +
    +

    +

    +which matches one digit by preference, but can match two if that is the only +way the rest of the pattern matches. +

    +

    +If the "U" (PCRE_UNGREEDY) option is set (an option which is not available in Perl) +then the quantifiers are not greedy by default, but individual ones can be made +greedy by following them with a question mark. In other words, it inverts the +default behavior. +

    +

    +When a parenthesized subpattern is quantified with a minimum repeat count that +is greater than 1 or with a limited maximum, more store is required for the +compiled pattern, in proportion to the size of the minimum or maximum. +

    +

    +If a pattern starts with .* or .{0,}, then the pattern +is implicitly anchored, because whatever follows will be tried against every +character position in the subject string, so there is no point in retrying the +overall match at any position after the first. PCRE treats such a pattern as +though it were preceded by \A. + +

    +

    +When a capturing subpattern is repeated, the value captured is the substring +that matched the final iteration. For example, after +

    +

    +

    +  (tweedle[dume]{3}\s*)+
    +
    +

    +

    +has matched "tweedledum tweedledee" the value of the captured substring is +"tweedledee". However, if there are nested capturing subpatterns, the +corresponding captured values may have been set in previous iterations. For +example, after +

    +

    +

    +  /(a|(b))+/
    +
    +

    +

    +matches "aba" the value of the second captured substring is "b". +

    +
  • BACK REFERENCES +

    +Outside a character class, a backslash followed by a digit greater than 0 (and +possibly further digits) is a back reference to a capturing subpattern earlier +(i.e. to its left) in the pattern, provided there have been that many previous +capturing left parentheses. +

    +

    +However, if the decimal number following the backslash is less than 10, it is +always taken as a back reference, and causes an error only if there are not +that many capturing left parentheses in the entire pattern. In other words, the +parentheses that are referenced need not be to the left of the reference for +numbers less than 10. See the section entitled "Backslash" above for further +details of the handling of digits following a backslash. +

    +

    +A back reference matches whatever actually matched the capturing subpattern in +the current subject string, rather than anything matching the subpattern +itself. So the pattern +

    +

    +

    +  (sens|respons)e and \1ibility
    +
    +

    +

    +matches "sense and sensibility" and "response and responsibility", but not +"sense and responsibility". If caseful matching is in force at the time of the +back reference, then the case of letters is relevant. For example, +

    +

    +

    +  ((?i)rah)\s+\1
    +
    +

    +

    +matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original +capturing subpattern is matched caselessly. +

    +

    +There may be more than one back reference to the same subpattern. If a +subpattern has not actually been used in a particular match, then any back +references to it always fail. For example, the pattern +

    +

    +

    +  (a|(bc))\2
    +
    +

    +

    +always fails if it starts to match "a" rather than "bc". Because there may be +up to 99 back references, all digits following the backslash are taken +as part of a potential back reference number. If the pattern continues with a +digit character, then some delimiter must be used to terminate the back +reference. If the "x" (PCRE_EXTENDED) option is set, this can be whitespace. +Otherwise an empty comment can be used. +

    +

    +A back reference that occurs inside the parentheses to which it refers fails +when the subpattern is first used, so, for example, (a\1) never matches. +However, such references can be useful inside repeated subpatterns. For +example, the pattern +

    +

    +

    +  (a|b\1)+
    +
    +

    +

    +matches any number of "a"s and also "aba", "ababaa" etc. At each iteration of +the subpattern, the back reference matches the character string corresponding +to the previous iteration. In order for this to work, the pattern must be such +that the first iteration does not need to match the back reference. This can be +done using alternation, as in the example above, or by a quantifier with a +minimum of zero. +

    +
  • ASSERTIONS +

    +An assertion is a test on the characters following or preceding the current +matching point that does not actually consume any characters. The simple +assertions coded as \b, \B, \A, \Z, \z, ^ and $ are described above. More +complicated assertions are coded as subpatterns. There are two kinds: those +that look ahead of the current position in the subject string, and those that +look behind it. +

    +

    +An assertion subpattern is matched in the normal way, except that it does not +cause the current matching position to be changed. Lookahead assertions start +with (?= for positive assertions and (?! for negative assertions. For example, +

    +

    +

    +  \w+(?=;)
    +
    +

    +

    +matches a word followed by a semicolon, but does not include the semicolon in +the match, and +

    +

    +

    +  foo(?!bar)
    +
    +

    +

    +matches any occurrence of "foo" that is not followed by "bar". Note that the +apparently similar pattern +

    +

    +

    +  (?!foo)bar
    +
    +

    +

    +does not find an occurrence of "bar" that is preceded by something other than +"foo"; it finds any occurrence of "bar" whatsoever, because the assertion +(?!foo) is always true when the next three characters are "bar". A +lookbehind assertion is needed to achieve this effect. +

    +

    +Lookbehind assertions start with (?<= for positive assertions and (?<! for +negative assertions. For example, +

    +

    +

    +  (?<!foo)bar
    +
    +

    +

    +does find an occurrence of "bar" that is not preceded by "foo". The contents of +a lookbehind assertion are restricted such that all the strings it matches must +have a fixed length. However, if there are several alternatives, they do not +all have to have the same fixed length. Thus +

    +

    +

    +  (?<=bullock|donkey)
    +
    +

    +

    +is permitted, but +

    +

    +

    +  (?<!dogs?|cats?)
    +
    +

    +

    +causes an error at compile time. Branches that match different length strings +are permitted only at the top level of a lookbehind assertion. This is an +extension compared with Perl 5.005, which requires all branches to match the +same length of string. An assertion such as +

    +

    +

    +  (?<=ab(c|de))
    +
    +

    +

    +is not permitted, because its single top-level branch can match two different +lengths, but it is acceptable if rewritten to use two top-level branches: +

    +

    +

    +  (?<=abc|abde)
    +
    +

    +

    +The implementation of lookbehind assertions is, for each alternative, to +temporarily move the current position back by the fixed width and then try to +match. If there are insufficient characters before the current position, the +match is deemed to fail. Lookbehinds in conjunction with once-only subpatterns +can be particularly useful for matching at the ends of strings; an example is +given at the end of the section on once-only subpatterns. +

    +

    +Several assertions (of any sort) may occur in succession. For example, +

    +

    +

    +  (?<=\d{3})(?<!999)foo
    +
    +

    +

    +matches "foo" preceded by three digits that are not "999". Notice that each of +the assertions is applied independently at the same point in the subject +string. First there is a check that the previous three characters are all +digits, then there is a check that the same three characters are not "999". +This pattern does not match "foo" preceded by six characters, the first +of which are digits and the last three of which are not "999". For example, it +doesn't match "123abcfoo". A pattern to do that is +

    +

    +

    +  (?<=\d{3}...)(?<!999)foo
    +
    +

    +

    +This time the first assertion looks at the preceding six characters, checking +that the first three are digits, and then the second assertion checks that the +preceding three characters are not "999". +

    +

    +Assertions can be nested in any combination. For example, +

    +

    +

    +  (?<=(?<!foo)bar)baz
    +
    +

    +

    +matches an occurrence of "baz" that is preceded by "bar" which in turn is not +preceded by "foo", while +

    +

    +

    +  (?<=\d{3}(?!999)...)foo
    +
    +

    +

    +is another pattern which matches "foo" preceded by three digits and any three +characters that are not "999". +

    +

    +Assertion subpatterns are not capturing subpatterns, and may not be repeated, +because it makes no sense to assert the same thing several times. If any kind +of assertion contains capturing subpatterns within it, these are counted for +the purposes of numbering the capturing subpatterns in the whole pattern. +However, substring capturing is carried out only for positive assertions, +because it does not make sense for negative assertions. +

    +

    +Assertions count towards the maximum of 200 parenthesized subpatterns. +

    +
  • ONCE-ONLY SUBPATTERNS +

    +With both maximizing and minimizing repetition, failure of what follows +normally causes the repeated item to be re-evaluated to see if a different +number of repeats allows the rest of the pattern to match. Sometimes it is +useful to prevent this, either to change the nature of the match, or to cause +it fail earlier than it otherwise might, when the author of the pattern knows +there is no point in carrying on. +

    +

    +Consider, for example, the pattern \d+foo when applied to the subject line +

    +

    +

    +  123456bar
    +
    +

    +

    +After matching all 6 digits and then failing to match "foo", the normal +action of the matcher is to try again with only 5 digits matching the \d+ +item, and then with 4, and so on, before ultimately failing. Once-only +subpatterns provide the means for specifying that once a portion of the pattern +has matched, it is not to be re-evaluated in this way, so the matcher would +give up immediately on failing to match "foo" the first time. The notation is +another kind of special parenthesis, starting with (?> as in this example: +

    +

    +

    +  (?>\d+)bar
    +
    +

    +

    +This kind of parenthesis "locks up" the part of the pattern it contains once +it has matched, and a failure further into the pattern is prevented from +backtracking into it. Backtracking past it to previous items, however, works as +normal. +

    +

    +An alternative description is that a subpattern of this type matches the string +of characters that an identical standalone pattern would match, if anchored at +the current point in the subject string. +

    +

    +Once-only subpatterns are not capturing subpatterns. Simple cases such as the +above example can be thought of as a maximizing repeat that must swallow +everything it can. So, while both \d+ and \d+? are prepared to adjust the +number of digits they match in order to make the rest of the pattern match, +(?>\d+) can only match an entire sequence of digits. +

    +

    +This construction can of course contain arbitrarily complicated subpatterns, +and it can be nested. +

    +

    +Once-only subpatterns can be used in conjunction with lookbehind assertions to +specify efficient matching at the end of the subject string. Consider a simple +pattern such as +

    +

    +

    +  abcd$
    +
    +

    +

    +when applied to a long string which does not match it. Because matching +proceeds from left to right, PCRE will look for each "a" in the subject and +then see if what follows matches the rest of the pattern. If the pattern is +specified as +

    +

    +

    +  ^.*abcd$
    +
    +

    +

    +then the initial .* matches the entire string at first, but when this fails, it +backtracks to match all but the last character, then all but the last two +characters, and so on. Once again the search for "a" covers the entire string, +from right to left, so we are no better off. However, if the pattern is written +as +

    +

    +

    +  ^(?>.*)(?<=abcd)
    +
    +

    +

    +then there can be no backtracking for the .* item; it can match only the entire +string. The subsequent lookbehind assertion does a single test on the last four +characters. If it fails, the match fails immediately. For long strings, this +approach makes a significant difference to the processing time. +

    +
  • CONDITIONAL SUBPATTERNS +

    +It is possible to cause the matching process to obey a subpattern +conditionally or to choose between two alternative subpatterns, depending on +the result of an assertion, or whether a previous capturing subpattern matched +or not. The two possible forms of conditional subpattern are +

    +

    +

    +  (?(condition)yes-pattern)
    +  (?(condition)yes-pattern|no-pattern)
    +
    +

    +

    +If the condition is satisfied, the yes-pattern is used; otherwise the +no-pattern (if present) is used. If there are more than two alternatives in the +subpattern, a compile-time error occurs. +

    +

    +There are two kinds of condition. If the text between the parentheses consists +of a sequence of digits, then the condition is satisfied if the capturing +subpattern of that number has previously matched. Consider the following +pattern, which contains non-significant white space to make it more readable +(assume the "x" PCRE_EXTENDED option) and to divide it into three parts for ease +of discussion: +

    +

    +

    +  ( \( )?    [^()]+    (?(1) \) )
    +
    +

    +

    +The first part matches an optional opening parenthesis, and if that +character is present, sets it as the first captured substring. The second part +matches one or more characters that are not parentheses. The third part is a +conditional subpattern that tests whether the first set of parentheses matched +or not. If they did, that is, if subject started with an opening parenthesis, +the condition is true, and so the yes-pattern is executed and a closing +parenthesis is required. Otherwise, since no-pattern is not present, the +subpattern matches nothing. In other words, this pattern matches a sequence of +non-parentheses, optionally enclosed in parentheses. +

    +

    +If the condition is not a sequence of digits, it must be an assertion. This may +be a positive or negative lookahead or lookbehind assertion. Consider this +pattern, again containing non-significant white space, and with the two +alternatives on the second line: +

    +

    +

    +  (?(?=[^a-z]*[a-z])
    +  \d{2}[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} )
    +
    +

    +

    +The condition is a positive lookahead assertion that matches an optional +sequence of non-letters followed by a letter. In other words, it tests for the +presence of at least one letter in the subject. If a letter is found, the +subject is matched against the first alternative; otherwise it is matched +against the second. This pattern matches strings in one of the two forms +dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits. +

    +
  • COMMENTS +

    +The sequence (?# marks the start of a comment which continues up to the next +closing parenthesis. Nested parentheses are not permitted. The characters +that make up a comment play no part in the pattern matching at all. +

    +

    +If the "x" PCRE_EXTENDED option is set, an unescaped # character outside a +character class introduces a comment that continues up to the next newline +character in the pattern. +

    +
  • PERFORMANCE +

    +Certain items that may appear in patterns are more efficient than others. It is +more efficient to use a character class like [aeiou] than a set of alternatives +such as (a|e|i|o|u). In general, the simplest construction that provides the +required behavior is usually the most efficient. Jeffrey Friedl's book +contains a lot of discussion about optimizing regular expressions for efficient +performance. +

    + +

    +Beware of patterns that contain nested indefinite repeats. These can take a +long time to run when applied to a string that does not match. Consider the +pattern fragment +

    +

    +

    +  (a+)*
    +
    +

    +

    +This can match "aaaa" in 33 different ways, and this number increases very +rapidly as the string gets longer. (The * repeat can match 0, 1, 2, 3, or 4 +times, and for each of those cases other than 0, the + repeats can match +different numbers of times.) When the remainder of the pattern is such that the +entire match is going to fail, PCRE has in principle to try every possible +variation, and this can take an extremely long time. +

    +

    +An optimization catches some of the more simple cases such as +

    +

    +

    +  (a+)*b
    +
    +

    +

    +where a literal character follows. Before embarking on the standard matching +procedure, PCRE checks that there is a "b" later in the subject string, and if +there is not, it fails the match immediately. However, when there is no +following literal this optimization cannot be used. You can see the difference +by comparing the behavior of +

    +

    +

    +  (a+)*\d
    +
    +

    +

    +with the pattern above. The former gives a failure almost instantly when +applied to a whole line of "a" characters, whereas the latter takes an +appreciable time with strings longer than about 20 characters. +

    +
  • AUTHOR +

    +Philip Hazel <ph10@cam.ac.uk> +
    +University Computing Service, +
    +New Museums Site, +
    +Cambridge CB2 3QG, England. +
    +Phone: +44 1223 334714 +

    +

    +Last updated: 29 July 1999 +
    +Copyright (c) 1997-1999 University of Cambridge. +

diff --git a/help/topics/priority.html b/help/topics/priority.html new file mode 100644 index 0000000..8512592 --- /dev/null +++ b/help/topics/priority.html @@ -0,0 +1,93 @@ +TinyFugue: priority + + + + + + +

priority

+ +

+ When more than one macro is matched by + a trigger or + hooked event, the following rules are + used to select which of the macros will + be applied (i.e., have its attributes applied to the text, and + its body executed): + +

+ +

+ So, in the simple case when there are no + fall-thrus, the highest + priority match + is chosen. If there is more than one of the highest + priority, one of those + is chosen at random. + +

+ These priority rules apply even to + macros defined or undefined by a + macro found during the search. + For example, if a mud line triggers a + fall-thru + macro /foo, and /foo defines a new + trigger + macro /bar which also matches + the line, then /bar may be triggered if it has lower + priority than /foo. + +

+ A macro's + priority is set with + /def + -p; + its fall-thru option is set with + /def + -F. + +

+ Use the /trigger -n + command to display a list of the triggers + triggers or + hooks + will match a given string. + +

+ See: triggers, + hooks, + macros, + /def + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/problems.html b/help/topics/problems.html new file mode 100644 index 0000000..4f9174a --- /dev/null +++ b/help/topics/problems.html @@ -0,0 +1,81 @@ +TinyFugue: problems + + + + + + + + + + + + +

problems

+ +

+ If you have an old version of TF, chances are your bug has already been + fixed. Current information and the latest version of TF can be found at + http://tinyfugue.sourceforge.net/. + +

+ For general bug reports, questions, etc, visit the website above (preferred), + or email kenkeys@users.sourceforge.net. For + problems specific to the OS/2 version, contact Andreas Sahlbach at + asa@stardiv.de. When reporting a problem or bug, please provide this + information: + +

    +
  • The full version number of TF (type + "/version" in tf). + Please give the full number, don't just say something like + "beta 4" or "the latest version". +
  • The operating system name and version. (On unix systems, type + "uname -a" in the shell to get the exact version information.) +
  • If tf won't install, send the output of the installation process (on UNIX, + that's the output of configure and make). Don't leave out parts just + because you don't know what they mean or think they're irrelevant. +
  • If you have a bug or core: do NOT send the core file, but do send + the debugging dump file (tf.NNNNN.dump) if tf generated one. + If not, give me ALL messages from tf (not just the last line). + In either case, tell me what you did or what happened before the problem, + and whether the problem is repeatable. +
  • Optional: If you have a core, you know how to use a debugger, + tf was compiled with core dumps enabled, and tf did not generate a + debugging dump file, a manual stack + trace would be useful (use the 'bt full' command in gdb or 'where' in dbx). + If you + don't know how, at least provide the other information described above. +
+ +

+ The following bugs are known. Don't bother reporting them. +

    + +
  • + The %{lp} and + %{emulation} + variables should work on a + per-socket + basis (This is partially overcome with WORLD + hooks). + +
  • + If a shell quote (/quote !) reads a + partial line from the child process, tf will hang until the line is + completed. + +
  • + /recall by timestamp doesn't work + when switching to/from daylight savings time (but + /recall by age always works). + +
+ +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/processes.html b/help/topics/processes.html new file mode 100644 index 0000000..9dfcb12 --- /dev/null +++ b/help/topics/processes.html @@ -0,0 +1,107 @@ +TinyFugue: processes + + + + +

processes

+ +

+ Associated topics: + +

+ /quote
+ /repeat
+ /ps
+ /kill
+ %ptime
+ %lpquote
+ +

+ The /quote and + /repeat commands in Fugue are done by + setting up internal processes that + run concurrently with normal input and output. + +

+ /ps can be used to get a listing of the + currently running processes and + their process ID's (for use with /kill). + +

+ /kill can be used to terminate a + process. + +

+ Processes can be either synchronous or + asynchronous. Synchronous processes + (started with the -S option) + run immediately when they are started, and run to completion (unless + TF is interrupted) + before any other commands are executed. Synchronous + processes are new in version 3.3 + beta 10. + +

+ Asynchronous processes + are merely scheduled to be run by a + /quote or + /repeat command; the actual execution + occurs at some later time. They can be run based on two different + criteria: + +

+ 1. Normally, processes + run whenever a specific period of time has + elapsed. The delay can be specified when the + process is started, or will + default to the value of + %{ptime}. + +

+ 2. If the + %{lpquote} flag is + on or the process + was started with the -P option, + a process + run whenever a prompt is received + from the server, indicating that the previous command has completed. + If the process was started with a -w option, only prompts from the specified + world will trigger its execution. + Example: +

+	/quote -P /send `/_echo n%; /_echo w%; /_echo w%; /_echo s
+
+ will send the commands "n", "w", "w", and "s", waiting between each one + until the prompt following + the previous command is seen. + +

+ If an asynchronous /quote or + /repeat is followed immediately by + another command, the other command will run first, because the asynchronous + process + was only scheduled, not actually executed (even with -n or -0 options). + Use a synchronous + /quote or + /repeat to force the + process to run + before any other commands. + +

+ Bodies of /repeat undergo + macro body + expansion when they are executed; + text generated by /quote does not. + +

+ See also: utilities + (/at, + /tick) + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/prompt_protocol.html b/help/topics/prompt_protocol.html new file mode 100644 index 0000000..0a1e675 --- /dev/null +++ b/help/topics/prompt_protocol.html @@ -0,0 +1,54 @@ +TinyFugue: prompt protocol + + + + +

prompt protocol

+ +

+ TF will recognize the TELNET protocol commands GOAHEAD or END-OF-RECORD as + the end of a prompt. If you are + responsible for a server that has + prompts, + and wish to make it more friendly to TF users, choose one of these options: + +

+ GOAHEAD: Send IAC GA (\377 \371) after each + prompt. This is the easier of + the two options. In many servers, this can be done at the beginning of the + routine that reads user input. Disadvantage: could possibly cause problems + in clients that don't understand TELNET protocol (but usually, they will + just pass it through to the terminal, which will usually ignore it). + +

+ END-OF-RECORD: Send IAC WILL EOR (\377 \373 \031) when the user connects. + If the client responds with IAC DO EOR, then you can send IAC END-OF-RECORD + (\377 \357) after each + prompt; otherwise, do nothing special + in prompts. + Disadvantage: requires extra state per descriptor and more understanding of + telnet protocol. Advantage: minimizes potential problems for clients that + do not recognize telnet protocol. + +

+ To debug telnet option negotiations, you may find it useful to + "/set + telopt on" + in TF. + +

+ For more information on TELNET protocol, see RFCs 854, 855, 885, and 1123. + +

+ See also: /telnet, + telopt, + prompts, + protocols + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/prompts.html b/help/topics/prompts.html new file mode 100644 index 0000000..1f0ca5a --- /dev/null +++ b/help/topics/prompts.html @@ -0,0 +1,104 @@ +TinyFugue: prompts + + + + +

prompts

+ +

+ Most LP MUDs, Diku MUDs, telnetd, and some other types of servers + send unterminated prompts, that is, + prompts + that do not end with newline or any other special character. + Normally, TF will not display text + until a newline is received, so you may not see the + prompt until after you + press return. But if the + %{lp} flag is on, TF will + attempt to separate these prompts + from normal text and display them correctly. + +

+ The recommended way to use the + %{lp} flag is to define + your worlds with one of the + /addlp, + /adddiku, or + /addtelnet commands. The + %{lp} flag will be turned + on automatically when you switch to such a world, and turned off for the + other predefined world types. See: + /addworld. + +

+ TF also provides a PROMPT hook, which + allows you to tell it what to look for in a + prompt. When an unterminated + line is received, the PROMPT hook is + called immediately. If there is no match, TF will use the timeout method + described below (if %{lp} + is on). But if there is a matching PROMPT + hook, TF will forget about the line + (unless the hook was defined with + /def + -q) + and let the hook deal with it. By + combining the PROMPT hook with the + /prompt command, you can recognize + most prompts immediately without + having to use the %{lp} + timing mechanism. The typical way of doing this is: +

+    /def -h"PROMPT *> " catch_prompt = /test prompt({*})
+
+ So, whenever TF receives an unterminated line that ends in "> ", + catch_prompt will see it, and use + /prompt to copy it to the current + prompt. + +

+ If an unterminated line is not matched by any PROMPT + hook, and it is not followed by more + text within a short period of time, TF will assume it is a + prompt. This + method is not foolproof. If the delay is too short, broken lines will look + like prompts, and will briefly + appear in the input window until the rest of + the line arrives, at which time both parts of the line will be printed as + normal output. If the delay is too long, there will be an annoying delay + before displaying real prompts. + +

+ The delay can be varied by setting the + variable + prompt_wait. + Its default value is 0.25 seconds. + +

+ All of this hackery can be avoided if the server sends unambiguous + prompts. + TF will recognize "*\b" (that is, "*" followed by backspace) and anything + ending with + GOAHEAD or + END-OF-RECORD + telnet characters. When TF sees + such text, it does not wait for a delay, but calls the PROMPT hook + immediately; if there is no match, TF displays the prompt immediately. + To avoid some minor glitches, you + should leave the %{lp} + flag off when connected to such a server. If you are responsible for a + server and wish to make it more TF-friendly, see + "prompt protocol". + +

+ See also: %login, + prompt protocol, + /addworld + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/protocols.html b/help/topics/protocols.html new file mode 100644 index 0000000..e3fce56 --- /dev/null +++ b/help/topics/protocols.html @@ -0,0 +1,51 @@ +TinyFugue: protocols + + + + + + + + +

Protocols

+ +

+ TF supports the following protocols: +

    +
  • TCP over IPv4 (RFC 791) +
  • TCP over IPv6 (RFC 2460, 3493), if supported by the host +
  • TELNET Protocol (RFC 854, 855) + (See: telnet) +
  • Generic proxy servers + (See: proxy) +
  • ANSI display attributes + (See: %emulation) +
  • EOR and GOAHEAD prompt protocol + (See: prompt protocol) +
  • Mud Client Compression Protocol version 2, if TF was compiled with zlib + (See: mccp) +
  • Secure Socket Layer (SSL), if TF was compiled with libssl. + (See: addworld, + connect) +
+ +

+ RFCs can be obtained from +

+ and other sites. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 2000-2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/proxy.html b/help/topics/proxy.html new file mode 100644 index 0000000..2bf2c7e --- /dev/null +++ b/help/topics/proxy.html @@ -0,0 +1,125 @@ +TinyFugue: proxy server + + + + + +

proxy server

+ +

+ If %{proxy_host} + is set, all connections will go through a proxy server (firewall) defined + by %proxy_host and + %proxy_port. + Note that + %{proxy_host} + should usually not be set if TF has been compiled to use SOCKS. + +

+ When the connection to + %proxy_host + %proxy_port + is made, only the PROXY + hook is called; the CONNECT and LOGIN + hooks which are normally called after + making a connection are not called when a proxy is used. + A PROXY hook defined in the standard + library calls /proxy_command, which by + default sends "telnet + ${world_host} + ${world_port}", and + then invoke the CONNECT and LOGIN hooks + (which, by default, bring the + world into the + foreground + and perform an automatic login). + +

+ Before the connection to the proxy server is made, + ${world_host}, + ${world_port}, + error messages, and /listsockets + all refer to the proxy server; after the connection is made, they + refer to the target server defined in + /addworld. + +

+ The proxy connection command is done with this standard + macro: +

+/def -i proxy_connect = telnet ${world_host} ${world_port}
+
+ If your proxy server requires a different command, you should redefine + proxy_connect. That will be sufficient for most proxy servers. + (Before version 5.0, a custom connect command required you to redefine + proxy_command. This should be avoided now if possible.) + +

+ If your proxy server has more complex requirements, or you want better + error detection, you will need to redefine the proxy_command + macro. By default, + proxy_command immediately calls /proxy_connect, + enables localecho, and invokes the + CONNECT and LOGIN hooks. + There are several reasons you might want to redefine + proxy_command: +

    +
  • The default proxy_command can not detect when + proxy_connect fails, so it will always send your login + command even if the proxy server did not connect to the target server. +
  • Your proxy server may not accept commands immediately, so + proxy_command should wait for some indication that the + proxy server is ready before sending commands. +
+ +

+ For example, say you use a Gauntlet telnet proxy that + leaves localecho off; + prints a "tn-gw->" prompt; + requires you to send "telnet hostname port" to connect; + after a successful connection, prints "Connected to hostname"; + and after a failed connection prints an error message and prints another + prompt. + So, you could use this definition: + +

+/def proxy_command =\
+    /def -p10000 -w -1 -h'PROMPT tn-gw->' =\
+        /proxy_connect%%; \
+        /localecho on%%; \
+        /def -p10002 -w -1 -h'PROMPT tn-gw->' proxy_error_$${world_name} =\
+            /undef proxy_success_$$${world_name}%%%;\
+            /dc%%;\
+        /def -p10002 -w -1 -t'Connected to *' proxy_success_$${world_name} =\
+            /undef proxy_error_$$${world_name}%%%;\
+            /trigger -hCONNECT $$${world_name}%%%;\
+            /if ($$${world_character} !~ "" & $$${world_login}) \
+                /trigger -hLOGIN ${world_name}%%%;\
+            /endif
+
+ + The first /def waits for the first + prompt + before doing anything. It then sends the connection command, + turns localecho back on, + and sets up macros + to catch the results of the connection command. + The success trigger + undefines the error hook, + and invokes the CONNECT and LOGIN hooks. + The error hook + undefines the success trigger + and disconnects from the proxy. + +

+ See: /addworld, + %proxy_host, + %proxy_port + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/redirection.html b/help/topics/redirection.html new file mode 100644 index 0000000..c0a6c79 --- /dev/null +++ b/help/topics/redirection.html @@ -0,0 +1,28 @@ +TinyFugue: redirection + +

redirection

+ +

+ If TF is started with input or output redirected, + %more will be ignored + and SIGINT (^C) will kill TF without prompting. TF will not exit when EOF + is reached; the /quit command must be + given explicitly. + +

+ On UNIX systems, it is possible to write a tf script starting with the + lines: +

+    #!/bin/sh
+    exec tf -n $* <$0
+
+ and following with any tf commands. The file can then be executed directly + like a shell script. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/scrollback.html b/help/topics/scrollback.html new file mode 100644 index 0000000..59489a3 --- /dev/null +++ b/help/topics/scrollback.html @@ -0,0 +1,144 @@ +TinyFugue: virtual windows + + + + + + +

virtual windows

+ +

+Starting in version 5.0, TF maintains a separate virtual window for each +open socket, including the "(no world)" +pseudo-socket. +Normally, a window scrolls when text is written to it. +If the more flag is set, automatic +scrolling will stop when the window becomes full. +You can manually scroll forwards and backwards in each +socket's window +using the keys in the table below. + +

+Per-socket windows make it unnecessary to finish reading the +text on one socket before switching +to another. +When you bring a new socket into the +foreground, the old +socket's window +is hidden, but remembers all of its text and current position; when +you return that old socket to the +foreground, the text is +redrawn at the remembered position, and you can resume +reading where you left off. +A dividing line +makes it easy to find the point where the old text ends and the new +text begins. +The text of a window is also refilled after resuming from +/suspend +or /sh, and even when the terminal's +size changes. + +

+In the table below, the +"/dokey" columns indicate the argument to +the /dokey command that performs the +scrolling, and the "keys" column indicates the default keystrokes that perform +the scrolling. +

+    scroll       ....forward....   ...backward....
+    amount       /dokey  keys      /dokey     keys
+    -----------  ------- -------   ---------- ----
+    normal       PgDn    PgDn      PgUp       PgUp
+    1/2 screen   hpage   ^[h ^X]   hpageback  ^X[
+    1 screen     page    TAB ^X}   pageback   ^X{
+    1 line       line    ^[^N      lineback   ^[^P
+
+Note that the line-scrolling keys may be typable as meta-ctrl-n and meta-ctrl-p +(depending on your +%meta_esc and +locale). +"Normal" scrolling is a full screenfull by default. +If you prefer PgUp and PgDn to scroll a half screen instead, +you should redefine +
+    /def key_pgdn = /dokey_hpage
+    /def key_pgup = /dokey_hpageback
+
+ +

+Some terminal emulators do not send PgUp and PgDn keys to tf. +If you have such a terminal, you may wish to +

+    /bind ^F = /dokey_page
+    /bind ^B = /dokey_pageback
+
+If you're an emacs user, you may want to bind +
+    /bind ^V = /dokey_page
+    /bind ^[v = /dokey_pageback
+
+(or, "/load kb-emacs.tf"). + +

+A virtual screen can be redrawn with ^L, or cleared with ^[^L (ESC ctrl-L). +Once lines are cleared from a screen, they can be redrawn by scrolling +back to them. They are not automatically redrawn when you hide the +screen and then unhide it again. + +

+Some hooks need to print messages that +do not make sense at the bottom of the +foreground +window (as they did before +version 5.0). For example, if you have world Foo in the +foreground, +and get activity in world Bar, it would not make sense for the +ACTIVITY hook to print +"% Activity in world Bar" to Foo's window. +Firstly, you might want to know about the activity even if you are not +at the end of Foo's window buffer. +Secondly, after you read the text in Bar and returned to Foo, +the message would still be at the bottom of Foo's window buffer, +misleadingly. +Many messages of this type are now delivered as +"alerts". +An alert appears temporarily on the +status line, where you can +see it immediately and it will not outlive its usefulness. +Also, because text from different worlds is not mixed in 5.0, +the WORLD hook +no longer prints "--- World name ---". + +

+The /limit command will filter the text +displayed in a window. The counters in the +more +prompt will count only the lines that match the +limit. + +

+If your terminal emulator has its own scrollback, it probably will not +work very well with tf. To avoid confusion and avoid polluting your +terminal's scrollback with garbage, tf tries to switch to the terminal's +"alternate buffer", which does not keep scrollback. But not all terminals +and configurations allow this (for example, xterm does, but only if the +termcap or terminfo entry contains the correct codes, and it has not +been disabled with xterm's titeInhibit resource). If the terminal can +not switch to an alternate buffer, the terminal's scrollback may appear +to work for a while, but will become jumbled as soon as you switch worlds +in tf or use tf's scrollback. You are advised to not attempt to use your +terminal's scrollback at all while running tf. + +

+See also: +interface, +visual, +/limit, +keybindings. + + +


+ Back to index
+ Back to tf home page +
+ Copyright © 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/signals.html b/help/topics/signals.html new file mode 100644 index 0000000..cd93c92 --- /dev/null +++ b/help/topics/signals.html @@ -0,0 +1,62 @@ +TinyFugue: signals + + + + +

signals

+ +

+ TF catches several signals from the operating system and handles them + specially: +

+
SIGINT (normally generated by typing ^C) +
Aborts any running macro or + blocking + hostname + resolution or + connect, + and, if + interactive + is on, offers a menu of choices:
+ C) continue tf; X) exit; T) disable triggers; P) kill + processes. + If interactive + is off, tf exits without prompting. +
SIGQUIT (normally generated by typing ^\) +
If + interactive + is on, TF prompts the user to quit. If the answer is 'y', or + interactive + is off, TF will dump a core file if configured to do so, and exit. +
SIGTERM +
Calls the SIGTERM hook, and then + exits TF. +
SIGHUP (normally generated when the terminal disconnects) +
Calls the SIGHUP hook, and + then exits TF if SIGHUP was not ignored when tf was started. +
SIGUSR1 +
Calls the SIGUSR1 hook. + TF does not exit. +
SIGUSR2 +
Calls the SIGUSR2 hook. + TF does not exit. +
SIGTSTP (normally generated by typing ^Z) +
Suspends the TF process, like + /suspend. +
SIGWINCH (normally generated by resizing the terminal) +
Redraws the screen, and calls the + RESIZE + hook. +
+ +

+ See also: hooks, + /signal + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/sockets.html b/help/topics/sockets.html new file mode 100644 index 0000000..6eae313 --- /dev/null +++ b/help/topics/sockets.html @@ -0,0 +1,192 @@ +TinyFugue: sockets + + +

sockets

+ +

+ Associated topics: +

+
/connect +
open a socket connection + to a world +
/dc +
close (disconnect) a + socket +
/fg +
bring a socket into the + foreground +
%login +
enable automatic login +
/listsockets +
display a list of open + sockets +
fg_world() +
name of foreground world +
idle() +
idle time +
nactive() +
number of active sockets, or number of undisplayed lines +
is_connected() +
tests whether a socket + is connected +
is_open() +
tests whether a socket + is open +
%background +
determines when to process text from + background + sockets +
%bg_output +
determines how to display text from + background + sockets +
+ +

+ + + + + A socket is a world-in-use, + including a network connection (usually) and a virtual window for displaying + text. + TF can have multiple sockets + open simultaneously. Only one of these can be displayed at a time; this is + called the foreground + socket. In + visual mode, the name of the world on the + foreground + socket is displayed on the + status line. + Other sockets are in the + background. + Text from any socket is + triggered and stored in + history immediately, but is not + displayed until that socket is brought + into the foreground. + Handling of events in + background + sockets can be customized with the + %{bg_output} and + %{background} + flags. + +

+ The current + socket is the + socket to which commands are sent. + The current + socket is almost always + the same as the foreground socket, + except: 1) when a macro is + triggered + from any socket, that + socket becomes the + current + socket for the duration of that + macro execution; 2) when a + /repeat or + /quote with world redirection runs (-w + option), that world's socket becomes + the current + socket for the duration of + the process execution. + +

+ + Text from a socket goes through a + number of checks before being displayed. If the text matches any + trigger patterns, a + macro may be executed, or the text + may be gagged or + hilited. If the text was not + gagged, TF also checks to see if it + should be suppressed because of + %quiet, + /watchdog or + /watchname. Finally, the text is + added to the world's history and + the global history, and is + queued for display. + +

+ You can open a new socket in several + ways: +

    +
  • By giving the world name or address on the command line when + starting tf. +
  • By using a /connect or + /world command. +
  • By "bamfing" through a portal + between MUDs (see "bamf"). +
+ +

+ You can switch between + foreground + sockets with + the /fg command; + the /dokey socketb + and /dokey socketf + commands, which by default are bound + to ESC-left and ESC-right; + and with the ESC-w keybinding, + which switches to the next world with activity, or if there is none, + to the last world you were on. + +

+ If the %{quitdone} + flag is on, and you disconnect from all worlds (either with + /dc or because the other end of the + socket's network connection closes), + TF will exit. + +

+ If the + %{sockmload} flag + is on, a world's macro file will be + loaded when you switch to the socket + for that world (either with the next and previous + socket keys or with the + /world command). + +

+ TF supports several TELNET options; see + telnet. + +

+ If %{proxy_host} + is defined, all connections will go through a + proxy server. See: + proxy. + +

+ Normally, certain types of disconnection can only be detected when + you try to send something on a connection. TF uses the socket option + SO_KEEPALIVE to detect such disconnections even when idle, but it usually + takes at least 2 hours to detect. The time limit is usually a property + of the operating system, and can not be set by TF or an unprivileged user. + + + + +

+ A "connectionless" socket is created when you + /connect to a + world + that does not have a host or port defined. + If the world also has the echo flag set, + any text you "send" to the socket is immediately "received", + as if you were connected to an echo server. + +

+ See also: worlds + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/special_variables.html b/help/topics/special_variables.html new file mode 100644 index 0000000..d977491 --- /dev/null +++ b/help/topics/special_variables.html @@ -0,0 +1,1482 @@ +TinyFugue: special variables + + + + + + + + + +

special variables

+ +

+ Many options in TF can be controlled by setting special global + variables. + Many variables have a limited + number of permitted values, with + corresponding integer values; these are called enumerated + variables. + All flags are enumerated variables + which can have the values "off" (0) + or "on" (1). Numeric variables + can have any integer value (within the + range allowed by your system). Attempting to unset numeric + variable or + give it a string value will force its value to 0. + Dtime variables represent a time + duration or period; their values can be written as a number of seconds + or in hours:minutes[:seconds] + format, with up to 6 decimal places (microseconds). + A variable's type (enumerated, numeric, dtime, or string) affects its behavior + in expressions. + +

+

Special substitute-only variables

+ The following special variables + may be used only in substitutions, + never as a variable + reference in an + expression. +

+

+ + +
# +
The number of words in a + macro's argument text. + +

+ + +

? +
The string return value of the most recently executed + command + (builtin or macro). + (Macros) called as functions + return their value and do not set %?.) + +

+ +

1,2... +
L1,L2... +
* +
R +
Positional parameters. See + "substitution". + (As of 5.0 beta 7, these are case sensitive.) + +

+ +

Pn +
PL +
PR +
The text matched by the nth parenthesized subexpression, + or the text to the left or right of the matched text, + in the last successful + regexp + comparison. See + %Pn for more details. + (As of 5.0 beta 7, these are case sensitive.) +
+

+ +

+ +

Special global variables

+ The following special global variables + can be examined and set. In the + following list, a '=' following a + variable name indicates its default + value. For variables that do not + have defaults listed, the default is + dependent on your system or configuration. +

+

+ + + +
COLUMNS +
If this variable is set in the environment when TF starts, + TF will use its value instead of the value from the terminal driver. + See %LINES, + columns(). + +

+ + +

HOME +
Your home directory, used by + /cd and + filename expansion. + This is usually inherited from the environment when TF starts. + +

+ + +

LANG +
The current locale. + See locale. + Automatically exported to the environment when set. + +

+ + +

LC_ALL +
The current locale. + See locale. + Automatically exported to the environment when set. + +

+ + +

LC_CTYPE +
The current locale for character classification. + See locale. + Automatically exported to the environment when set. + +

+ + +

LC_TIME +
The current locale for time formatting. + See locale. + Automatically exported to the environment when set. + +

+ + +

LINES +
If this variable is set in the environment when TF starts, + TF will use its value instead of the value from the terminal driver. + See %COLUMNS, + lines(). + +

+ + +

MAIL +
The name of a file which TF may check for mail. + See: mail. + +

+ + +

SHELL +
Shell used by + /sh and + /quote !. + This is usually inherited from the environment when TF starts. + +

+ + + + +

TERM +
Terminal type. Changing the value of + %TERM at any + time will cause TF to re-initialize its display functions to use + the new value. + The value of %TERM + should agree with your actual terminal or emulator. + If your emulator supports multiple terminal types, the recommended + type to use is vt220, vt100, or ansi (in that order). + %TERM + is usually inherited from the environment when TF starts. + See also: mode. + +

+ + +

+ TFHELP=%{TFLIBDIR}/tf-help +
The name of the file used by + /help. + +

+ + +

TFLIBDIR +
The name of the TF library directory, which should contain the + help file (tf-help), the standard library (stdlib.tf), the local + library (local.tf), and many useful utility files. + The default value of + TFLIBDIR + is set when TF is installed, but can be overridden by setting it + in the environment before starting TF. + This directory will be searched by + /load if + TFPATH is + blank or not set. + See also: /load. + +

+ + +

+ TFLIBRARY=%{TFLIBDIR}/stdlib.tf +
The name of the library file loaded at + startup. This can be + set in the environment before starting TF, to load from an + alternate library file. + +

+ + + +

TFMAILPATH +
A space-separated list of files which TF may check for mail. + Literal spaces in a filename must be preceded by "\". + See: mail. + +

+ + +

TFPATH= +
A space-separated list of directories that will be searched + by /load. + Literal spaces in a directory name must be preceded by "\". + If this is set, + %{TFLIBDIR} + will be ignored by /load, so be + sure to include the value of + %{TFLIBDIR} in + %{TFPATH} + if you want to be able to /load + files with relative names from the standard library directory. + See also: /load. + +

+ + + + +

TZ +
On most systems, the timezone used to display formatted times. + In the United States, + the value is usually the local timezone name, followed by the + difference in hours from GMT, followed by an optional daylight + saving timezone name; for example, "PST8PDT". For details, see + your system documentation for tzset(3) or environ(5). + This is usually inherited from the environment when TF starts, + and is automatically exported to the environment when set. + +

+ + +

alert_attr=Br +
The + attributes used to display + alert text on the + status line. + +

+ + +

alert_time=5.0 +
(dtime) The number of seconds that alert + text is displayed on the + status line. + See tfio. + + + +

+ + +

background=on +
(flag) If on, text from + background + worlds is processed and + recorded immediately upon receipt. Otherwise, the text is ignored + until the socket is brought + into the foreground. + In either case, the text is not displayed + until the socket is brought + into the foreground + (but see + %{bg_output}). + +

+ + +

backslash=on +
(flag) Enables use of '\' to quote the following character + literally during macro + expansion. Generally, this + should only be turned off if you are having problems with '\' in + macros written before version + 3.0. + +

+ + +

bamf=off +
(enumerated) +
+
off +
(0): server "portals" + are ignored. +
on +
(1): Unter-style + bamfing is enabled + (disconnect). +
old +
(2): Old-style + bamfing + is enabled (no disconnect). +
+ See /bamf. + +

+ + +

bg_output=on +
(flag) + When a world + is brought into the + foreground, + %bg_output + determines how to display output that was produced while the + world was in the + background: + If on, the window display resumes where it left off; + if off, the window display jumps to the end, showing only the last + screenfull. Turning + %bg_output + off is equivalent to always using the -q option with + /fg. + The %bg_output + flag has no effect on other processing, including + triggers and + history. This flag is + ignored if the + %{background} + flag is off. + %{background} + is tested when the world is + foregrounded (in versions + before 5.0, it was tested when the text was received). + (See also: /fg -q) + +

+ + +

binary_eol=LF +
Determines what to send as end-of-line marker in + TELNET BINARY mode. + Valid values are "LF", "CR", and "CRLF". + (See: /telnet) + +

+ + +

borg=on +
(flag) Enables trigger + bodies (attributes are + unaffected). (See: triggers, + %max_trig) + +

+ + +

clearfull=off +
(flag) In visual mode, clear + input window rather than scroll when full. Always on if terminal + can not scroll. + +

+ + +

cleardone=off +
(flag) In visual mode, + enables clearing of input window when return is pressed. + +

+ +

clock +
This variable is no longer supported. To disable the status bar + clock, use + "/clock off". + To make the clock display in 12-hour format, do + "/clock + %I:%M". + See /clock. + +

+ + +

clock_format=%H:%M +
The format of the clock displayed on the + status line. + To make the clock display in 12-hour format, "/set + clock_format=%I:%M". + See also: /clock, + %time_format. + +

+ + +

connect=nonblocking +
Set to "blocking" or "nonblocking" to determine how + /connect works. + Default is "nonblocking" on platforms that support it. + Nonblocking allows you to continue doing other things while TF + tries to establish a new connection. + See also %gethostbyname. + +

+ + +

defcompile=off +
(flag) If off, macro bodies are + compiled the first time they are executed; if on, + macro bodies are compiled immediately + when they are defined. Since syntax checking is performed during + compilation, setting defcompile=on will + allow you to see the syntax errors in a macro when you define it + instead of waiting until execution. + +

+ +

e=2.718281828... +
Euler's number. + +

+ + +

expand_tabs=on +
(flag) If on (and + %emulation + is "print", "ansi_strip", or "ansi_attr"), + tabs received from a server are expanded to spaces (according to + %tabsize) + immediately, before any trigger + processing. If off, tab characters are left in received lines. + +

+ + + + + + + + +

emulation=ansi_attr +
Determines how special codes sent by the server should be + interpreted by TF. + The set of printable characters is determined by the current + locale. Valid values for + %emulation are: +
+
raw: +
No conversion is done; lines are not wrapped; all + nonprintable characters are displayed, and their effect is + undefined (depending mainly on your terminal). TF's input + display is not guaranteed correct; use at your own risk. + This mode allows the + server to have most of the control over the screen, but is + not guaranteed to give the desired effect, and will interfere with + trigger matching. + For best results, + %visual + should be "off", and TF + attributes should + not be used. + "Raw" is not recommended unless you know what you're doing. +
print: +
Tabs are expanded (if + %expand_tabs + is on); + backspaces are interpreted; lines are wrapped; + nonprintable characters removed. +
ansi_strip: +
Like "print", but ANSI display codes are also removed. +
ansi_attr: +
Like "ansi_strip", but ANSI + display attribute codes + will be converted to TF's internal format and + displayed correctly (on any terminal). Other ANSI display + codes (e.g., cursor motion) will be removed. Recommended, + especially for servers that send vt100/ansi display + attribute codes. +
debug: +
converts nonprinting characters to a printable form. + See also: + %telopt. +
+ See also: + %istrip, + %meta_esc, + %tabsize, + %expand_tabs, + locale, + attributes, + debugging. + +

+ + +

end_color +
The code that should be sent to your terminal to return to + normal color after a + %{start_color_*} + code. See: color. + +

+ + +

error_attr +
Defines the attributes + used by the "E" attribute. + Can be any combination of + attributes, including color + names. + See: attributes. + +

+ + +

gag=on +
(flag) Enable the gag + attribute. + (See: /gag, + /nogag) + +

+ + +

gethostbyname=nonblocking +
Set to "blocking" or "nonblocking" to determine how + /connect does hostname + resolution. + See also %connect. + +

+ + +

gpri=0 +
Priority of subsequent + /gags. (See: + /gag) + +

+ + +

hook=on +
(flag) Enable hooks. (See: + hooks, + /hook, + %max_hook.) + Note that + autologin and + automatic %{lp} + setting will not work if + %{hook} + is 0. + +

+ + +

hilite=on +
(flag) Enable display + attributes, + whether from a trigger, the + server, or whatever. + (See: /hilite, + /nohilite) + +

+ + +

hiliteattr=B +
Defines the attributes + used by hilites. Can be + any combination of + attributes, including color + names. (See: attributes, + /hilite) + +

+ + +

histsize=1000 +
When a new world history + is created, it will have space for + %{histsize} + lines. A world history is + created the first time text is sent to it. (See also: + /histsize) + +

+ + +

hpri=0 +
Priority of subsequent + /hilites. + +

+ + + +

insert=on +
(flag) If on, keyboard input is inserted; if off, input + overstrikes existing text. + +

+ + +

interactive +
(flag) If off, TF will not prompt for + /quit, + returning from /sh, + SIGINT (^C), + or SIGQUIT (^\). + Defaults to on if standard input and output are attached + to a terminal, off otherwise. + +

+ + +

isize=3 +
Size of input window in + visual mode. + The output window will be redrawn when this is changed. + See also: lines(), + winlines(). + +

+ + + +

istrip=off +
(flag) If on, the meta (high) bit will be stripped from all input + characters. Note that this will prevent + %meta_esc + and locales with 8-bit characters + from working correctly. + +

+ + +

kbnum= +
A value that can be set by typing ESC followed by digits, + to be used as an argument (repeat count) for a subsequent keybinding. + See: keybindings. + +

+ + +

kecho=off +
(flag) Enables echoing of keyboard input, preceded by + %{kprefix}. + See also: + %{kecho_attr}. + %{secho}. + /localecho, + /addworld -e. + +

+ + +

kecho_attr +
Attributes used for lines echoed by + %{kecho}. + +

+ + +

keepalive=on +
(flag) Enable periodic "pings" (TCP keepalive) of servers, + to prevent network timeouts and detect dropped connections. + Note: the timing of keepalive messages is a system parameter + that can not be changed from tf. + +

+ + +

keypad=on +
(flag) Enable application keypad mode, if supported by the terminal. + Application keypad mode makes the numeric keypad generate characters + different than the usual digit characters, so they may be distinguished + from the digit keys across the top of the keyboard. + See: keybindings. + +

+ + +

kprefix= +
Prefix prepended to lines echoed by + %{kecho}. + +

+ + +

login=on +
(flag) Enable automatic login + hook. (See: + automatic login, + hooks, + /world) + +

+ + +

lp=off +
(flag) Displays partial lines as + prompts, after a short + timeout. Useful for LP and Diku MUDs. (See: + prompts) + +

+ + +

lpquote=off +
(flag) If on, all + /quote and + /repeat processes + run when an LP prompt is + received instead of when a timer expires. The -P option of + /quote and + /repeat provides the same + feature on a per-process basis. + (See: processes) + +

+ + +

maildelay=0:01:00.0 (60 seconds) +
(dtime) Delay between mail checks. Setting this to 0 + disables mail checking. The file to be checked is named by the + %{MAIL} + variable. + +

+ + +

matching=glob +
(enumerated) Determines the default + pattern matching style. +
+
"simple": +
straightforward string comparison. +
"glob": +
shell-like matching (as before version 3.2). +
"regexp": +
regular expression. +
+ See also: patterns, + regmatch(), + %Pn. + +

+ + +

max_hook=1000 +
Maximum number of hooks + allowed in a 10 second period. When this value is exceeded, + a message is printed and + %hook is + automatically turned off to disable hooks. + This helps prevent infinite hook loops. + A value of 0 will allow unlimited hooks. + +

+ + + + + + +

max_instr=1000000 +
Maximum number of instructions in a + macro execution. A value of 0 + will allow unlimited instructions. An "instruction" is a basic + internal tf operation, such as addition, testing an /if or /while + condition, a substitution, sending a line of text to a server, or + joining two commands with a "%|" pipe. + +

+ + +

max_kbnum=999 +
The maximum value of + kbnum + that can be set via the keyboard. + See: keybindings. + +

+ + + + +

max_recur=100 +
Maximum depth of recursive + macro calls or + triggers. + This helps prevent infinite macro loops. + A value of 0 will allow unlimited recursion. + +

+ + +

max_trig=1000 +
Maximum number of triggers + allowed in a 10 second period. When this value is exceeded, + a message is printed and + %borg is + automatically turned off to disable triggers. + This helps prevent infinite trigger loops. + A value of 0 will allow unlimited triggers. + +

+ + +

mccp=on (if tf was compiled with MCCP support) +
(flag) If on, MCCPv2 is allowed on new connections. + See mccp. + +

+ + +

mecho=off +
(enumerated) +
+
"off" (0): +
do not echo macro + expansions. +
"on" (1): +
echo + expansions of + non-invisible macros. +
"all" (2): +
echo + expansions of all + macros. +
+ %{mprefix} + will be prepended once for each recursion level when + macro + expansion echoing is + enabled. + See also: + %{mecho_attr}, + debugging. + +

+ + +

mecho_attr +
Attributes used for lines echoed by + %{mecho}. + +

+ + + +

meta_esc=nonprint +
(enumerated) If + %istrip is off, + typed characters with their meta (high) bit set may have the meta bit + stripped and be prefixed with an ESC character. + This allows META-x and ESC x to invoke the same keybinding. + Possible values of + %meta_esc: +
+
"off" (0): +
Never convert a meta bit to ESC. +
"on" (1): +
Always convert a meta bit to ESC. +
"nonprint" (2): +
Convert a meta bit to ESC only if the meta bit makes + the character unprintable in the current + locale. +
+ Meta bit conversion can be prevented for a single keystroke by preceding + it with the LNEXT key (^V), + regardless of the state of + %meta_esc. + +

+ + +

more=off +
(flag) Displays output one screenfull at a time. (See: + /more) + +

+ + +

mprefix=+ +
Prefix prepended to lines echoed by + %{mecho}. + +

+ + +

oldslash=on +
(flag) If on, sequences of more than one '/' in a + macro body will be compressed + by one during macro + expansion. This allows + macros written before version + 3.0 to work properly. + With oldslash=off, only slashes at the beginning of a body are + handled specially. + You are encouraged to turn this off. (See: + evaluation) + +

+ +

pi=3.141592654... +
The ratio of a circle's circumference to its diameter. + +

+ + +

pedantic=off +
(flag) If on, TF will generate warnings about some potential + problems in your macro code. Often the warnings indicate code that + is technically valid but may not do what you intended. + See also debugging. + +

+ + + + +

prompt_sec +
prompt_usec +
Obsolete. Use + %{prompt_wait} + instead. + + + +
prompt_wait=0.25 +
(dtime) The delay (in seconds) used to recognize + unterminated prompts. (See: + prompts). + +

+ + + + +

proxy_host= +
proxy_port=23 +
These two variables + describe the proxy + server used for opening connections. + (See: proxy). + +

+ + +

ptime=1.0 +
(dtime) Default delay (in seconds) between + /quote and + /repeat + process runs. + +

+ + +

qecho=off +
(flag) Echoing of /quote + text. + See also: + %{qprefix}, + %{qecho_attr}, + debugging. + +

+ + +

qecho_attr +
Attributes used for lines echoed by + %{qecho}. + +

+ + +

qprefix= +
Prefix prepended to lines echoed by + %{qecho}. + +

+ + + +

quiet=off +
(flag) Gag text after + login until the mud sends + "Use the WHO command", "### end of messages ###", or 25 lines. + Note: This will not function correctly + on MUDs which don't send those strings or 25 lines in the + introductory text. + +

+ + +

quitdone=off +
(flag) Quit upon disconnection from last + socket. + +

+ + +

redef=on +
(flag) Allows redefinition of existing worlds, keybindings, + and named macros. + +

+ + +

refreshtime=100000 +
(int) The delay (in microseconds) for redisplaying your keyboard + input after it is overwritten by incoming text + in non-visual mode. + If you have a slow connection between you and tf, you may wish to + increase this delay. + The default is 100000 (1/10 second). + +

+ + +

scroll=on +
(flag) In visual mode, + scroll output instead of wrapping from bottom to top. + +

+ + +

secho=off +
(flag) Echoing of text before sending it to the server + (above the TELNET layer). + See also: + %{sprefix}, + %{secho_attr}, + %{kecho}. + %{telopt}, + debugging. + +

+ + +

secho_attr +
Attributes used for lines echoed by + %{secho}. + +

+ + +

shpause=on +
(flag) Wait for a keypress after returning from + /sh + (unless + %interactive + is off). + +

+ + +

sigfigs=15 +
The maximum number of significant digits to display when printing a + floating point number. Note that 16 or more may introduce rounding + error. Also note that some real numbers with up to 6 decimal places are + stored with fixed points, not floating points, so are not affected by + sigfigs + (or rounding error). + +

+ + +

snarf=off +
(flag) Don't send empty lines to the server. + +

+ + +

sockmload=off +
(flag) Load macro files + when foregrounding a world + ("/dokey socketf", + "/dokey socketb", or + "/fg"). Normally, a world's + macro file is loaded only when + TF first connects to it. (Note: the WORLD + hook is more useful than + sockmload). + +

+ + +

sprefix= +
Prefix prepended to lines echoed by + %{secho}. + +

+ + + + + + + + + + + + +

start_color_name +
start_color_bgname +
The control code that should be sent to your terminal to produce + foreground or background + color name. See: + color. + +

+ + +

status_attr +
The + attributes used to display + the status area + in visual mode. + See: status area. + +

+ +

status_fields +
Deprecated. The list of fields displayed on + row 0 of the status area + in visual mode. + See: status area. + +

+ + +

status_height=1 +
The number of rows in the + status area + in visual mode. + See: status area. + +

+ + +

status_pad=_ +
The padding character used in displaying + the status area + in visual mode. + See: status area. + +

+ + + + + +

tabsize=8 +
Tabs will be replaced with spaces to pad to a multiple of + %{tabsize}. + See also: + %expand_tabs, + %emulation. + +

+ + +

telopt=off +
(flag) Display telnet + option negotiations (for debugging purposes). See also: + %emulation=debug, + debugging. + +

+ + + + + + + +

textdiv=on +
(enumerated) When you bring a socket into the foreground, + TF can help you distinguish old text that has been displayed + before from new text that is being displayed for the first time + by printing a dividing line between the old and new text or + by clearing the old text. + The setting of + %textdiv + controls this behavior: +
+
"off" (0): +
Never print a divider or clear the screen; just draw + old and new text normally. +
"on" (1): +
Print a %textdiv_str + divider between old and new text. + The divider is temporary: when it scrolls off the screen, + or the screen is backgrounded, it disappears forever. +
"always" (2): +
Print a %textdiv_str + divider after the old text even if there is + no new text. +
"clear" (3): +
Clear (don't redraw) all old text before displaying new + text. Old text can be manually redisplayed by + scrolling back. +
+ See also: + %textdiv_str, + /fg. + +

+ + +

textdiv_str====== +
The dividing line printed between old and new text when bringing + a socket to the foreground. + See %textdiv. + +

+ + +

tfhost= +
Name or address to use for the client (tf) end of connections. + See also: + addworld, + connect. + +

+ + +

sub=off +
+ See: /sub. + +

+ + +

time_format=%H:%M +
The format used to display times in + /recall and + /time. The default displays + hours and minutes. See + ftime() for a + description of the format. + See also: + %clock_format. + +

+ + +

visual=on +
(flag) Divides the screen into an input window and an output + window. The output window will be redrawn when this is changed. + (See: mode) + +

+ + +

warn_5keys=on +
(flag) If on, TF will warn the first time some of the new + 5.0 keybindings are used. + +

+ + +

warn_curly_re=on +
(flag) If on, TF will warn when using a + regexp + containing '{', which has a new meaning in version 5.0. + +

+ + +

warn_status=on +
(flag) If on, TF will warn when directly setting + %status_fields, + %status_int_more, + %status_int_world, or + %status_int_clock, + which have new default values and new ways to set them in version 5.0. + See status line. + +

+ + +

error_attr +
Defines the attributes + used by the "W" attribute. + Can be any combination of + attributes, including color + names. + See: attributes. + +

+ + +

watchdog=off +
(flag) Gag repeated + lines. (See: /watchdog) + +

+ + +

watchname=off +
(flag) Gag overactive + players. (See: + /watchname) + +

+ + +

wordpunct=_ +
List of punctuation that will be considered to be part of a + word instead of delimiting the ends of a word, by + kbwordleft() and + kbwordright() + (and therefore by /dokey + WLEFT, WRIGHT, etc). + +

+ + + +

wrap=on +
(flag) Enable wordwrap on the screen. TF will try to break + lines at spaces or other punctuation to fit them within + %{wrapsize} + columns. + %{wrap} is + ignored if + %{emulation} + is "raw". + See also: + %{wrappunct}, + %{wrapsize}, + %{wrapspace}. + +

+ + +

wraplog=off +
(flag) Enable wordwrap in log files. See also: + %wrap. + +

+ + +

wrappunct=10 +
When wrapping, + allow wrapping at any punctuation if wrapping only at spaces would + have caused more than + %wrappunct + characters to wrap. This can make long URLs look nicer, but harder + to cut and paste. Setting + %wrappunct + to 0 disables wrapping at punctuation other than spaces. + +

+ + +

wrapsize=79 +
Lines (input and output) extending past this column will be + split. Default value is one less than the number of columns on + your terminal (typically 80). Output is not wrapped if + %{emulation} + is "raw". See also: + %wrap, + %wrappunct, + %wrapspace, + columns(). + +

+ + + + + +

wrapspace=4 +
Wrapped text is indented by this many spaces. See also: + %wrap, + %wrapsize. + +
+ +

+ + The following builtin commands + set the corresponding variables, + and also perform additional functions: + /gag, + /hilite, + /hook, + /nogag, + /nohilite, + /watchdog, and + /watchname + +

+ The standard library also defines the following + macros to set the values of the + corresponding variables: + /background, + /bamf, + /borg, + /clearfull, + /cleardone, + /gpri, + /hpri, + /insert, + /isize, + /login, + /lp, + /lpquote, + /kecho, + /mecho, + /more, + /ptime, + /qecho, + /quiet, + /quitdone, + /redef, + /shpause, + /sockmload, + /sub, + /visual and + /wrapspace. + +

+ Note: The variables 'L' and 'R' are + reserved (see: variables). + You should not assign values to them. + +

+ See: + variables, + /set + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/status_line.html b/help/topics/status_line.html new file mode 100644 index 0000000..37bd915 --- /dev/null +++ b/help/topics/status_line.html @@ -0,0 +1,387 @@ +TinyFugue: status line + + + + + + + + + +

status line

+ + In visual mode, + the input and output windows are separated by a status line, which + by default looks something like this: +
+  More 156_WorldName____________(Read)_(Active: n)_(Log)_(Mail)_(Over)_12:34
+
+
    +
  • "More" indicates how many + more lines of text are waiting + to be seen. +
  • "WorldName" is the name of the + foreground + socket's world. +
  • "(Read)" indicates that keyboard input is being read by + read(). +
  • The "(Active: n)" indicator shows the number of + sockets with unseen text. +
  • "(Log)" indicates that there is one or more + log file open. +
  • "(Mail)" or "Mail n" indicates the number of files named by + %MAIL or + %MAILPATH + that contain unread mail. +
  • "(Over)" indicates that typed characters will overstrike instead of + insert (that is, + %insert is off). +
  • The current time is displayed at the right end of the status line. +
+ + +

Configuring the status area

+ +

+ The status area may contain 1 or more rows; the number is determined by + %status_height. + The rows are numbered from the top starting at 0. + Each row is defined as a list of fields. + A status field is defined as follows: +

    +
  • an optional field name +
  • an optional ":" and number indicating the field width +
  • an optional ":" and attribute +
+ + The current list of status fields for row N can be fetched with + status_fields(N). + + + + + + + + + + + + + + + + The following commands modify the fields of the status area: +
+
/clock off +
Remove the clock from the status bar + (equivalent to "/status_rm @clock"). +

+ +
/clock on +
Add a clock to the end of status row 0 if there is not already + a clock on status row 0. + The width of the @clock field will be set exactly wide + enough to hold a time formatted according to + %clock_format. +

+ +
/clock [format] +
Add a clock to the end of status row 0 if there is not already a + clock on status row 0; in either case, use format to control the + format of the clock (see ftime() + for the meaning of format). + If format is omitted, it defaults to "%H:%M". + The width of the @clock field will be set exactly wide enough + to hold a time formatted according to format. +

+
Example: display a clock in 12-hour format: +
/clock %I:%M +
+
+ +
/status_defaults +
Restore list of status fields for all rows and their formats + (%status_int_* and %status_var_*) to their default values. + (Previous versions of tf had a + %status_field_defaults variable; + this is now deprecated.) +

+ +
/status_save name +
Save the current list of fields in row 0 into memory slot with label + name. + Name must be a legal variable name. + (Saved fields will be forgotten when tf exits.) +

+ +
/status_restore name +
Restore the list of fields in row 0 that was previously saved with + "/status_save name". +

+ +
/status_rm [-rN] name +
Remove status field name from status row N. + If -r is not specified, all rows are searched. + Only the first matching field is removed. + If there are + unnamed pad fields on both sides of the named field, the one with the + smaller width is also removed; if the named field is at the beginning + or end of a row, the neighboring pad field (if any) is removed. +

+
Example: Remove the @mail field from the status bar: +
/status_rm @mail +
+
+ +
/status_add [options] name[:width[:attributes]] ... +
Add status field name to the status bar + with optional width and attributes. + Options: +
+
-rN
add to row N (default 0) +
-A
add after all other fields (i.e., at end) +
-Afield
add after existing field field +
-B
add before all other fields (i.e., at beginning) +
-Bfield
add before existing field field +
-sN
insert padding of N spaces between the new + field and the neighbor selected by -A or -B (default 1) +
-x
don't add the field if one with the same name is + already present +
-c
clear all existing fields before adding new fields +
+ If neither -A nor -B is given, -A is assumed. +

+
+
Example: Add a new field after the world name to display the contents + of the variable "hp": +
/status_add -A@world hp:4 +
+
+
Multiple fields may be specified, but padding is not automatically + added between them; you must specify padding explicitly. For example, +
/status_add -Aclock foo:4 :1 bar:4 :2 baz:4 +
is equivalent to +
/status_add -Aclock foo:4 +
/status_add -Afoo bar:4 +
/status_add -Abar -s2 baz:4 +
+
+ +
/status_edit [-rN] name[:width[:attributes]] +
If field name currently exists in any status row, replace it + with name[:width[:attributes]]. Neighboring padding + is unchanged. If -r is given, only row N is searched. Only the + first matching field is edited. +

+
Example: Change the @log field to say "L" instead of "(Log)", and + change the field's width to match: +
/set status_int_log=nlog() ? "L" : "" +
/status_edit @log:1 +
+
+ +
+ + +

+ For backward compatibility, you can get and set the status fields for row 0 + via the %status_fields variable, + but doing so is deprecated. + +

+ The default list of status fields is: +

+    @more:8:Br :1 @world :1 @read:6 :1 @active:11 :1 @log:5 :1 @mail:6 :1 insert:6 :1 kbnum:4 :1 @clock:5
+  
+ There are several types of fields: +
    +
  • Unnamed fields create padding between the fields on either side of it. + Each of the ":1" fields in the default + status_fields + puts a space of 1 character between the other fields. +
  • Field names beginning with "@" correspond to internal states. + For example, "@more" will be updated whenever the number of unseen + lines changes. +
  • Field names containing only letter, digits, and underscores correspond + to variables. + Whenever there is a change in the value of the + variable + with the same name, the field will be updated. + The value an unset variable is considered to be the empty string. + For example, whenever + the %insert + variable changes, the "insert" field is updated. + Any variable may be monitored + in this manner. +
  • A field whose name is in quotes (", ', or `) has its name (without the + quotes) printed literally on the status bar, and is never updated. + Use the \ character to escape a quote inside the string. + The default status_fields + does not contain any of these literal fields. +
+ +

+ Any variable may be monitored, + but there is a fixed list of internal statuses. + The internal statuses available are: +

+
@more +
Updated when there is a change in the number of lines below the + bottom of the window. +
@world +
Updated when when the + foreground + world changes. + During the evaluation of the format expression, the + current socket is the + new socket. +
@read +
Updated when entering or exiting a + read() function call. +
@active +
Updated when the number of active + worlds changes. + During the evaluation of the format expression, the + current socket is the + socket that became active. +
@log +
Updated when the number of open + log files changes. +
@mail +
Updated when mail arrives (See + "mail"). +
@clock +
Updated every minute, on the minute. +
+ +

+ A field's width determines how many columns it will take up on the screen. + If the width of a string literal field field is omitted, it defaults to the + length of the string literal. + One other field width may be omitted or set to 0, which means that field + will use whatever columns are unused by the other fields. + Normally, fields are left-justified within the width, but a negative + field width will right-justify the field within the absolute + value of the width. A width of "-0" can be used to right-justify the + variable-width field. If the formatted text is wider than the field width, + it will be truncated to fit within the specified width. Fields may also + be truncated if they would not fit on the screen. + +

+ The attributes explicitly given + in the field definition are combined with those in the corresponding + %status_attr_int_fieldname (for internal state fields) + or %status_attr_var_varname (for variable fields). + The combined attributes + are applied to the field text when it is displayed, + but not to the padding used to bring the field to the specified width. + The entire status line, including padding, is displayed with the + attributes given by + %status_attr, + which is none by default. + +

+ To bring fields up to their specified width, they are padded with + %status_pad, + which is "_" by default. By setting + status_pad + to " " and + status_attr + to "r", you can create a status line that looks more like the one in emacs + or the IRC client. + +

+ When a status field is updated, the text displayed for that field is + determined by evaluating the + expression contained in the + variable + status_int_name (for internal state + @name) or + status_var_name (for variable name). + Also, for variable + fields, if status_var_name is not + set, the value of the variable + will be displayed directly. Changing a format variable will cause + the status line to update. + +

+ All this may sound rather complex, so an example might help. The default + value of status_fields is: + +

+  @more:8:Br :1 @world :1 @read:6 :1 @active:11 :1 @log:5 :1 @mail:6 :1 insert:6 :1 kbnum:4 :1 @clock:5
+  
+ + and the corresponding format + variables are: + +
+  /set status_int_more \
+       moresize() == 0 ? "" : \
+       moresize() > 9999 ? "MuchMore" : \
+       pad("More", 4, moresize(), 4)
+  /set status_int_world   strcat( \
+       fg_world() !~ "" & !is_open(fg_world()) ? "!" : "",  fg_world())
+  /set status_int_read    nread() ? "(Read)" : ""
+  /set status_int_active  nactive() ? pad("(Active:",0,nactive(),2,")") : ""
+  /set status_int_log     nlog() ? "(Log)" : ""
+  /set status_int_mail \
+       !nmail() ? "" : \
+       nmail()==1 ? "(Mail)" : \
+       pad("Mail", 0, nmail(), 2)
+  /set status_var_insert  insert ? "" : "(Over)"
+  /set status_int_clock   ftime(clock_format)
+  
+ +

+ The first field is "@more:8:Br". So, whenever the number of + unseen lines changes, TF looks for the + variable + status_int_more, and evaluates the + expression it contains. + The result of the expression + is printed in the first 8 columns of the status line, with + attributes "Br" (bold and reverse). + The expression was carefully + written so that it will never be more than 8 characters, because it would be + confusing to generate something like "More:12345" and then have + it truncated to "More:123" because of the field width of 8. + +

+ Since the "@world" field has no explicit width, its width + is determined dynamically. + The fields on its left are pushed to the left side of the screen, + the fields on its right are pushed to the right side of the screen, and + the "@world" field uses whatever space remains in the middle. + + +

+ Another example: Say your mud has a + prompt like + "H:42 M:17> " that shows your hit points and mana, + and you want it displayed on the status line like + " 42, 17", after the world name. + To do this, call + "/status_add -Aworld hp_mana:7", + and define a prompt + hook: +

+  /def -mregexp -h"PROMPT ^H:([^ ]*) M:([^ ]*)> $" hp_mana_hook = \
+      /set hp=%P1%; \
+      /set mana=%P2%; \
+      /set hp_mana=$[pad(hp, 3, ",", 0, mana, 3)]%; \
+      /test prompt({*})
+
+ + +

+ See: visual + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/substitution.html b/help/topics/substitution.html new file mode 100644 index 0000000..c7a758c --- /dev/null +++ b/help/topics/substitution.html @@ -0,0 +1,398 @@ +TinyFugue: substitution + + +

substitution

+ Before a macro body or arguments to + /eval are executed, special character + sequences are replaced with new text as described below. + +

+ + + +

Command separation.
+%;
+

+ +

+ Separates commands within a macro body. + See evaluation. + +

+ +

Pipe.
+%|
+

+ +

+ Separates commands within a macro body, + and connects the output of the first to the input of the second. + See evaluation. + +

+ + + + +

Character substitution.
+\n
+\c
+

+ +

+ In the first form, the character whose ASCII code is n is + substituted. If n starts with "0x", it is interpreted as a + hexadecimal number; otherwise, if n starts with "0", it is + interpreted as octal; otherwise, it is interpreted as decimal. In the + second form, the character c is substituted. This is useful for + escaping any special meaning c has; in particular, "\\" is + substituted with "\". + If the variable + %{backslash} is + off, the \c form does not have this special interpretation. + +

+ +

Slash compression.
+//...
+

+ +

+ If %{oldslash} is + on, sequences of slashes are replaced with a sequence of one fewer slashes. + A single slash, however, is left alone. This feature remains for backward + compatibility only; you are encouraged to turn + %{oldslash} off to + disable this. + +

+ + +

Expression evaluation.
+$[expression]
+

+ +

+ The expression is evaluated + and its string value is substituted in its place. See + "expressions". + +

+ + + + +

Command substitution.
+$(command)
+

+ +

+ Command is evaluated + as if it were the body of a macro: + it goes through substitution, + and is executed in a new scope. + If command contains any ')' characters, they must be escaped by + preceding them with '\' so they are not interpreted as the end of the + substitution. + The echoed output of command is substituted in place of the $(...) + construct (much like `...` in most shells). If command + produces more than one line of output, they will be concatenated, with + a space between each, to form one line. + +

+ Example: +

+	/def showver = :is using tf version $(/ver)
+
+ could be used to tell other MUDders what version of tf you're using. + +

+ + + + + +

Macro substitution.
+${name}
+$name$
+

+ +

+ The body of the macro name is + substituted. The second form is supported only for backward compatibility, + and its use is discouraged. In the first form, the brackets may be + omitted if the subsequent text could not be confused as part of the name. + +

+ Example: The text "${foo}" would be replaced with the body of + the macro named "foo". + +

+ +

Dollar compression.
+$$...
+

+ +

+ Sequences of '$'s are replaced by a sequence of one fewer '$'s. A single + '$', however, is left alone, unless it introduces one of the substitutions + described above. This is used to put a literal '$' in text that goes + through macro substitution. + +

+ + + + + + + + + + + + + + + + + + + +

Variable and Argument substitution.
+%selector
+%{selector}
+%{selector-default}
+

+ +

+ The value of a variable or an + argument to the + macro is substituted, as determined by + selector. The brackets are recommended for clarity, but may be + omitted if there is no default and the text following it can not be + misinterpreted as part of the selector. The selector can be any of: +

+ +

+

name +
The value of the variable + name is substituted. Names are case sensitive. + +

+

0 +
selects the name of the executing macro. + (Before version 4.0, "0" was equivalent to "*"). + +

+

# +
selects the count of positional parameters. + +

+

* +
selects all positional parameters. + +

+

? +
selects the return value of the most recently executed command + (builtin or macro). + +

+

1, 2, 3, etc. +
selects the corresponding positional parameter. + There is no maximum parameter number; any number greater than + %{#} + will simply produce an empty substitution. + +

+

-1, -2, -3, etc. +
selects all positional parameters except + the first, all except the first two, all except the first three, etc. + +

+

L1, L2, etc. +
selects the last positional parameter, second-to-last, etc. + "L" is the same as "L1". + (As of 5.0 beta 7, these are case sensitive.) + +

+

-L1, -L2, etc. +
selects all positional parameters + except the last, all except the last two, etc. + "-L" is the same as "-L1". + (As of 5.0 beta 7, these are case sensitive.) + +

+

Pn +
selects the text matching the nth parenthesized + subexpression from the last + regular expression + match. See + %Pn. + (As of 5.0 beta 7, these are case sensitive.) + +

+

R +
selects a positional parameter at random. (see also: + rand()) + (As of 5.0 beta 7, this is case sensitive.) +
+ +

+ Variable name and selectors are + case sensitive (prior to 5.0 beta 7, "Ln", "Pn" and "R" + selectors were not). No substitutions are performed on selector. + +

+ If the substitution determined by the selector would be empty, and a + default value is given, the default will be substituted instead. + Thus "%{1-foofle}" is + replaced with the first word if there is one, or "foofle" if not. + The default value may contain + variable, + macro, + expression, and + command + substitutions. + +

+ The meaning of "positional parameters" depends on how the + macro was called. + If called with the traditional "/name ..." command + syntax, each space-separated word is a positional parameter. + If called with the "name(...)" + function syntax, + each function argument is a positional parameter; if more than one is + selected, they are concatenated, with a space between each. + If called as a trigger, the positional + parameters are the words in the text that + triggered the + macro. + In a hook call, the positional parameters + are the hook arguments. + In an /eval statement, + they are inherited from the caller. + +

+ Note that in expressions, it + is easiest to omit the % and just use the + {selector[-default]} part. If the + selector is a variable name and no default is desired, the name may be used + directly in an expressions + without % or {...}. + +

+ + + + + + + + + +

Regexp subexpressions.
+%{Pn}
+%{PL}
+%{PR}
+

+ +

+ This is actually a special case of + variable substitution. + The %P variables get + their values from the last successful regexp match in scope. + %P0 + expands to the text matched by the + entire regexp. + %Pn + expands to the text matched by the + nth parenthesized subexpression of the + regexp. + %PL and + %PR + expand to the text to the left and right, respectively, of the text + matched by the entire regexp. + The "scope" of a + regexp + match is the lifetime of the + macro expansion it + triggered, + hooked, or in which it occurred (i.e., + with regmatch()). + +

+ For example, after the text "Jabba the Hutt goes east." matches the + regexp +

+  " goes ([^ ]*)\.$"
+
+ then the following expansions will be + available until the macro exits: + PL = "Jabba the Hutt"; P0 = " goes east."; P1 = "east". + +

+ The number n can be any non-negative number. + If there is no subexpression corresponding to n, + the substitution will be ignored. When parentheses are nested, n + refers to the order of the opening parentheses. + +

+ The %Pn subs will + always refer to the first + regexp + match on the line, even if a partial + hilite + (/def -P) causes the + regexp + to be applied more than once. + +

+ + +

Percent compression.
+%%...
+

+ +

+ Sequences of '%'s are replaced by a sequence of one fewer '%'s. A single + '%', however, is left alone unless it introduces one of the substitutions + described above. This is used to put a literal '%' in text that goes + through macro substitution. + +

+ +

Examples

+ Here are a couple of simple examples. + +

+ Definition: /def advice = whisper + %1 = Let the wookie + win.
+ Command: /advice R2D2
+ Sends: whisper R2D2 = Let the wookie win.
+ +

+ Definition: /set + ending=meister
+ Definition: /def greet = :waves to + %{1-Jack}%{ending}.
+ Command: /greet
+ Sends: :waves to Jackmeister.
+ Command: /greet Dave
+ Sends: :waves to Davemeister.
+ +

+ For some more complex examples, look at the files in TFLIBDIR. + +

+ See: evaluation, + expressions + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/summary.html b/help/topics/summary.html new file mode 100644 index 0000000..a352a7b --- /dev/null +++ b/help/topics/summary.html @@ -0,0 +1,48 @@ +TinyFugue: summary + +

summary

+ + + +

+ Type "/help + intro" + for basic information on using TF.
+ + Type "/help + topics" + for a list of other help topics.
+ + Type "/help + commands" + for a complete list of TF builtin commands.
+ + Type "/help + /help" + for instructions on using /help.
+ +

+ If you are having problems with TF and wish to contact the author, see + "problems". + +

+ If you are having trouble reading the help sections because text is + scrolling off the screen, try typing + "/more on" before + /help, and then when you get a + "--More--" prompt, press + TAB or + PageDown + when you're ready to continue. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/tf.html b/help/topics/tf.html new file mode 100644 index 0000000..e1293ba --- /dev/null +++ b/help/topics/tf.html @@ -0,0 +1,118 @@ +TinyFugue: tf + + + + + + +

tf

+ +

+ Syntax: + +

+ tf [-Ldir] [-f[file]] [-ccommand] [-vlqn] [world]
+ tf [-Ldir] [-f[file]] [-ccommand] [-vlq] host port +


+ +

+ At startup, TF takes the following steps: +

    +
  1. Initializes special + variables. Any variables + defined in the environment will override TF's default values for the + variables with the same name. +
  2. Loads commands from the + standard macro library (stdlib.tf), + the optional + local macro library (local.tf), + and your personal configuration file + (see tfrc). +
  3. Executes command, if one was given. +
  4. Enables visual mode if -v was not + given and %visual + has not been explicitly set to "off". +
  5. Tries to connect to world, or host port. If no + world + is given, and the -n option is not given, TF will try to connect + to the first world defined with + addworld() in the configuration + file(s). If no worlds are defined, + or TF can not connect to the specified + world, + TF will start up in unconnected mode. +
+ +

+ Options: +

+
-Ldir +
Use dir instead of + %TFLIBDIR + as library directory. +
-ffile +
Load file instead of the normal personal config file. +
-f +
Do not load any personal config file at startup. +
-ccommand +
Execute command after loading config file. + Command is treated as if it had been typed on the tf command + line (i.e., the value of + %sub is + significant). +
-n +
Do not connect to a world + automatically at startup if no + world or host/port are specified. +
-l +
Disable + automatic login. + (see: login) +
-q +
Enable + quiet login. + (see: %quiet) +
-v +
Disable automatic switch to + visual mode. +
+ +

+ The library directory is determined by the first of the following which + has a value: + -L option; + %TFLIBDIR + environment variable; or, + compiled-in default. + + The standard library file is determined by the first of the following which + has a value: + TFLIBRARY + environment variable; or, + appending "/stdlib.tf" to + %TFLIBDIR. + +

+ TF honors several locale categories, + which can be set to make TF work better with languages other than English. + See locale. + +

+ See + http://tinyfugue.sourceforge.net/ + for the latest info on TF. + +

+ See also: intro, + tfrc, + library, + worlds, + /addworld + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/tfio.html b/help/topics/tfio.html new file mode 100644 index 0000000..0e5846d --- /dev/null +++ b/help/topics/tfio.html @@ -0,0 +1,257 @@ +TinyFugue: tfio + + + + + +

tfio

+ +

+ TF normally does its output through "streams", which are analogous to + the streams of C stdio. + +

+ Output from most tf commands, including + /echo, are output to the + "tfout" stream, which is normally attached + to the screen. + tfout may be redirected + with a command /quote, + $() command substitution, + or %| pipe. + +

+ Many TF error messages, hook messages, and the output of + "/echo -e" are output to the + "tferr" stream, which is always attached + to the screen, and may not be redirected. + +

+ Some TF error messages, hook messages, and the output of + "/echo -A" are output to the + "alert" stream. + In visual mode, + text sent to the alert stream is displayed briefly on the status line + status line, where it can be + seen immediately even if you're at a + more prompt. + The duration of the alert display is determined by + %alert_time. + In nonvisual mode, + text sent to the alert stream is redirected to the tferr stream. + +

+ Text from a world or "/echo -w" + is sent to a stream for that world. + Text sent to a world stream + will be stored in the history of + that world. If that world is the + foreground world, + the text is sent to the screen immediately; otherwise, it will not + be displayed until world is brought into the + foreground. + +

+ Commands that read input + (using tfread()) + read by default from + "tfin", which is normally attached + to the keyboard. + tfin may be redirected with + a %| pipe. + +

+ All streams have a handle which can be + used as an argument to the tfio functions. + The handles for + tfin, + tfout, and + tferr + are "i", "o", and "e", respectively. + The handles for streams opened with + tfopen() are integers. + +

+

tfopen()

+ The tfopen(name, + mode) function + can be used to open arbitrary streams. + If called with no arguments, + tfopen() opens + an unnamed "q" mode stream. + The mode argument describes the usage of the + stream: + +
+
"w"
Open a file "name" for writing. + Write operations will overwrite existing file contents, if any. +
"a"
Open a file "name" for appending. + Write operations will occur after existing file contents, if any. +
"r"
Open a file "name" for reading. + (see also: "/quote '"). +
"p"
Execute a shell command "name" and read its output + (see also: "/quote !"). +
"q"
Open a queue for reading and writing. + The name argument will appear in the output of + /liststreams, but has + no other meaning. +
+ + A "q" mode stream may be thought of + as a place to hold lines for passing between two or more commands. + +

+ If successful, + the tfopen() function + returns a positive number which is the handle of + the new stream, + which should be used in subsequent calls to + tfread(), + tfwrite(), and + tfclose(). + If it fails, + the tfopen() function + returns -1. + +

+ A call to tfwrite() + or tfread() on a + stream opened with a mode that + does not allow that operation will return -1. + +

+ The /liststreams command will + display a list of open streams. + +

+

tfclose()

+ When a stream opened by + tfopen() is no longer needed, + it should be closed with + tfclose(handle), + which will flush the stream and release + its resources. + tfclose() can be + used on the tfout stream (handle "o") + within a macro body + to prevent further output from subsequent commands in that + macro body; closing + the tfin stream (handle "i") will + prevent further reads; and closing + the tferr stream (handle "e") is + not allowed. + +

+

tfwrite()

+ The tfwrite(handle, + line) function writes a line of text to the + stream designated by handle. + If handle is omitted, the + tfout stream is used (so + tfwrite(line) + is equivalent to + echo(line)). + Display attributes of line + are stripped if it is written outside of tf (i.e., to a file or pipe). + +

+ If an OS file (mode "w" or "a") is set to autoflush (the default), then + each line written is flushed to the file immediately. If you are writing + a large number of lines, it is more efficient to disable autoflushing with + tfflush(handle, + "off"), and manually force a flush with + tfflush(handle) or + tfclose(handle) + after writing the large block. + tfflush() has no meaning + on files of mode "p", "q", or "r". + Streams + are flushed automatically when closed. + +

+

tfread()

+ The tfread(handle, + variable) function + reads a line from the + stream + designated by handle. + If handle is omitted, the + tfin stream is used. + If successful, the line is assigned to variable, and + tfread() returns the + (non-negative) length of the line. + If variable did not already exist, it is created at the global level, + as if by /set. + If there are no lines available to read, or an error occurs, + tfread() returns -1. + For "r" and "p" mode streams, + a -1 return value indicates end-of-file; the only valid operation on the + stream after that is + tfclose(). + But for a "q" mode stream, a -1 return + value may just mean there are currently no lines in the queue; more lines + may be added by tfwrite(), + and then tfread() will be + able to read them. + +

+

Keyboard Reading

+ tfread() + from the keyboard is special. It can only be done from a command line + command; trying to do it directly or indirectly from a trigger, hook, + keybinding, or process is an error, and will make the + tfread() return -1. + It reads a line of input from the keyboard until the newline key is pressed + or "/dokey newline" is executed. + During the read, all existing + keybindings + continue to work normally. + Any text already in the input buffer is not cleared when the read starts. + Text entered after the read starts is appended + to the existing text, and when the read ends, + its result is the entire input buffer. + Lines entered during a read are not saved in the input + history (but you can use + "/recordline -i" to save + them explicitly). + +

+ A read from the keyboard + (and the macro that called it) + can be interrupted with a SIGINT, normally generated by typing CTRL-C. + +

+ During a keyboard read, if a macro + calls /dokey newline, + the newline will not be executed immediately, but will be held until + the rest of the commands in the macro + are processed. + For example, consider the keybinding + "/def + -b'^[^M' = + /dokey newline%; /send go". Normally, typing ^[^M would execute + the current input buffer, then send "go" to the server. But during a + keyboard read, typing ^[^M would send "go" first, and then do the newline + that completes the read. + +

+ The library file textutil.tf defines + several commands that are useful with tfio. + +

+ See: + interface, + /liststreams, + /input, + expressions, + nread(), + functions, + textutil.tf + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/tfrc.html b/help/topics/tfrc.html new file mode 100644 index 0000000..2c62509 --- /dev/null +++ b/help/topics/tfrc.html @@ -0,0 +1,69 @@ +TinyFugue: .tfrc + + + + + + + + +

.tfrc

+ +

+ At startup, TF attempts to load and + execute commands from the personal config file named + "~/.tfrc", "~/tfrc", "./.tfrc" or "./tfrc". + This file can contain any commands you want executed automatically + when TF starts. + +

+ Some useful commands to include in your personal config file: + +

+

+
/addworld +
Define a world. + TF will automatically connect to the first + world if not started with + the "-n" option. +
/def +
Define a macro + (including + triggers, + hilites, + gags, + keybindings, and + hooks). +
/set +
Set a variable. There are + many special variables + that change the behavior of tf, listed under + "special variables". +
/load +
Load commands from another file. +
/require +
Load a library file. +
+ +

+ TFLIBDIR + contains a sample "tfrc" file that you may + want to copy and modify to fit your tastes. + +

+ For backward compatibility, TF will load ~/.tinytalk if it exists. The use + of ~/.tinytalk is discouraged. + +

+ See: startup, + library, + special variables, + /load + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/timing.html b/help/topics/timing.html new file mode 100644 index 0000000..6ddda68 --- /dev/null +++ b/help/topics/timing.html @@ -0,0 +1,17 @@ +TinyFugue: timing + + +

timing

+ See: processes, + /repeat, + /quote, utilities + (/at, + /tick), + %clock, + /time. + +
+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/tools.html b/help/topics/tools.html new file mode 100644 index 0000000..3f8ba4e --- /dev/null +++ b/help/topics/tools.html @@ -0,0 +1,57 @@ +TinyFugue: tools.tf + + + + + + + + + + +

tools.tf

+ +

+ Usage: + +

+ /REQUIRE tools.tf
+


+ +

+

+
/EDMAC macroname +
/EDVAR variablename +
/EDWORLD worldname +
Stick an existing macro, + variable, or + world definition + in the input window for editing. + +

+

/NAME [name] +
Change your character name (on a TinyMUD style mud). + +

+

/GETLINE n +
Grab the nth line from history + and stick it in the input buffer. + +

+

/XTITLE text +
Put text on the titlebar of an xterm. +
+ +

+ See: /sh, + /edit, + /recall, + tfrc + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/triggers.html b/help/topics/triggers.html new file mode 100644 index 0000000..edefc9d --- /dev/null +++ b/help/topics/triggers.html @@ -0,0 +1,178 @@ +TinyFugue: triggers + +

triggers

+ +

+ Before we get into the gory details, here's a simple example of a trigger: +

+  /def -t"{*} has arrived." greet = :waves to %1.
+
+ This command defines a macro called "greet". Whenever text like "Bob has + arrived." is received, /greet will be executed automatically, + sending the text ":waves to Bob." to the server. + +

+ Associated commands: +

+
/def +
define a macro with any + fields +
/trig +
define a trigger + macro +
/trigp +
define a trigger + macro with + priority +
/trigc +
define a trigger + macro with probability +
/trigpc +
define a trigger + macro with probability and + priority +
/gag +
define a trigger + macro to + gag text +
/hilite +
define a trigger + macro to + hilite text +
/trigger +
call a trigger + macro manually +
/substitute +
modify the text that invoked the + trigger +
+ +

+ Triggers are a method of calling a + macro based on incoming text. When a + line of text from a socket matches the + trigger + pattern of a + macro, that + macro becomes a candidate for automatic + execution. + +

+ If multiple macros have + triggers which match the same text, + one or more are chosen for execution as described under + "priority". + +

+ The text which triggers a + macro is given to the + macro as arguments, as if it had been + called with ``/macro text''. Positional parameters + (e.g., %1) refer + the the corresponding word in the + triggering text. + If the trigger is a + regexp, subexpression + parameters refer to the text matched by the corresponding parenthesized + subexpression (see also: + %Pn). + +

+ If the selected macro(s) have display + attributes, the + attributes are used to display the + text which triggered the + macro. + +

+ If a macro has the world field set, it + can only be triggered by text from + that world. + +

+ If a macro has a probability less than + 100%, it might not be executed even if it is + triggered. + +

+ Triggers can be disabled by turning + the %{borg} flag off. + +

+ If the + %{background} + flag is turned off, text from + background + sockets will not cause + triggering until that + socket is brought into the + foreground. + +

+ Triggers can also be invoked manually + with the command /trigger. + The command "/trigger -n" + can be used to test which triggers + would match a given line. + +

+ The /def command is the only way to + define a multi-shot trigger. All + other commands which define triggers + will create permanent triggers. + +

+ Note that tf may run slowly if there are many + triggers defined, since every + trigger must be compared against + every received line of text. Choose your + triggers carefully. + See also "patterns". + +

+ Triggers + are only matched against normal lines. To have a macro invoked by a + prompt, use the + prompt + hook. + +

+ By default, TF expands tabs and removes ANSI display codes and other + non printable characters from received lines before comparing them + against triggers, so your + triggers need to match only + visible text. But if you change + %expand_tabs + or %emulation, + received lines may still contain invisible codes when compared against + triggers. + +

+ Trigger patterns are not expanded for variable substitutions or anything else. + To get the effect of a variable trigger, write a macro that redefines the + trigger. For example, + +

+    /def set_victim = \
+        /def -t"%{1} has arrived." kill_victim = \
+            kill %%{1}
+  
+ + Then, to change the victim to "Bill", type "/set_victim Bill". + +

+ See also: patterns, + macros, + gags, + hilites, + hooks, + priority, + %max_trig + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/utilities.html b/help/topics/utilities.html new file mode 100644 index 0000000..61a3f0a --- /dev/null +++ b/help/topics/utilities.html @@ -0,0 +1,88 @@ +TinyFugue: utilities + + + + + + + + + +

utilities

+ +

+ The library directory + %{TFLIBDIR} + contains many useful utility files ending in ".tf". To use any one of + them, simply /load or + /require the file. For example, to + enable ESC-TAB completion automatically, just + "/require + completion.tf" from your .tfrc + file. Some of the more useful files: + +

+

+
alias.tf +
/alias, etc: create + commands without '/'. +
at.tf +
/at: execute commands at a + specified time. +
filexfer.tf +
/putfile, + /getfile: transfer files + to/from a mud. +
kb-os2.tf +
Extra default key bindings for OS/2 keyboards. +
kbbind.tf +
Default keybindings. +
kbfunc.tf +
Macros used by kbbind.tf. +
map.tf +
Mapping commands (like tintin). +
psh.tf +
/psh: like + /sh, but uses your favorite + shell. +
quoter.tf +
Various quoting macros. +
rwho.tf +
Remote WHO from a mudwho server. +
spc-page.tf +
Old-style SPACE key scrolling at + --More-- prompt. +
spedwalk.tf +
Single character movement (like tintin). +
spell.tf +
Spelling checker. +
tick.tf +
Diku tick counter (like tintin). +
tintin.tf +
tintin-like commands. +
tr.tf +
/tr: character translation +
watch.tf +
/watch: Watch for a + particular player. +
+ +

+ There are also other files, not listed here. + +

+ For complete instructions on any of these utilities, see the help section + for that topic if there is one, or read the comments at the top of each + file. Sorry, I haven't gotten around to documenting them very well. + +

+ Note to unix users: many library files were renamed in version 3.5, but the + old names still work (via soft links). + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/variables.html b/help/topics/variables.html new file mode 100644 index 0000000..440413a --- /dev/null +++ b/help/topics/variables.html @@ -0,0 +1,80 @@ +TinyFugue: variables + + +

variables

+ +

+ Associated commands: +

+
/listvar +
list values of variables. +
/set +
set the value of a global + variable +
/let +
set the value of a local + variable +
/setenv +
set the value of an environment + variable +
/unset +
unset a variable +
/export +
move an global + variable to the environment +
/edvar +
edit a variable's value +
:= operator +
assign a value of any type to a + variable. +
+ +

+ A TinyFugue variable + has a name and a value. Names are case sensitive, and + should start with a letter and contain only letters, numbers, and + underscores. A value can be a text string (including + display attributes), + integer, or real number, + but some special variables + will automatically convert an assigned value to a particular type. + +

+ Variables may either be local, + global, or exported. Global variables + are visible to all tf commands; + they are defined with /set + or /setenv, + or imported from the environment when tf starts. + Local variables are + created with /let or assignment + expressions, and only exist in the + scope in which they were created. + Exported variables are global + variables + which are also visible to subshells, so they can be used by commands + /sh, the '!' option of + /quote, and file uncompression. + Variables are exported if they were + defined with /setenv, explicitly exported + with /export, or imported from tf's + parent environment. + +

+ The value of a variable can be + obtained using a '%' substitution (see + "substitution"), or by simply + using its name in an expression + (see "expressions"). + +

+ See "special variables" for + a list of special variables. + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/help/topics/worlds.html b/help/topics/worlds.html new file mode 100644 index 0000000..f765dc8 --- /dev/null +++ b/help/topics/worlds.html @@ -0,0 +1,117 @@ +TinyFugue: worlds + +

worlds

+ +

+ Associated commands: +

+
/addworld +
define a new world +
/world +
connect to a defined world +
/dc +
disconnect from a world +
/unworld +
undefine a world +
/purgeworld +
undefine a group of worlds +
/saveworld +
save world definitions to a file +
/loadworld +
load world definitions from a file +
/listworlds +
display world definitions +
/edworld +
edit a world definition +
world_info() +
get world information +
+ +

+ + + + + + + + + Fugue stores a list of "worlds" that it knows about. Each world has several + fields associated with it: +

+
name
a label used to refer to the world +
type
an optional string for matching + /def -T +
character
optional login name +
password
optional login password +
host
server's internet host name, IPv4 address, or (if your + platform supports it) IPv6 address +
port
server's TCP port number or name +
mfile
optional macro file +
login
"1" if automatic login + is enabled for the world's + socket, "0" otherwise. +
proxy
"1" if this world's + socket is using a + proxy, "0" otherwise +
src
optional name or address used for client (tf) end of + connection. +
cipher
current cipher used by SSL connection to world. +
+ +

+ The character name, password, and type are used by + automatic login, if the + %{login} flag is on. + +

+ The macro file is + loaded when a + socket is opened to the world. It can + contain any commands you want executed automatically when you connect to + that world. If the flag + %{sockmload} is + on, this file will also be loaded + whenever you switch to a world with the + SOCKETB and SOCKETF keys (see sockets, + /dokey, + hooks (CONNECT)). + +

+ World information can be accessed with the macro expansion + ${world_fieldname} or the + function + world_info(worldname, + fieldname), where fieldname is one of the fields + described above. + +

+ For example: +
+ /eval say I am + ${world_character} + on ${world_name}. +
+ This would tell the rest of the world some stuff they probably don't care + about, namely the label your Fugue has assigned to the + current world and + the character name under which it logged on. + + +

+ Fugue also keeps track of a world named "default", which is just a dummy + world with a character name and password, and optionally a + macro file. If a default world is + defined, worlds without character, password, or file fields will use the + values from the default world. + +

+ See also: sockets + +

+ +


+ Back to index
+ Back to tf home page +
+ Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys diff --git a/m4/ac_check_icu.m4 b/m4/ac_check_icu.m4 deleted file mode 100644 index 2a6e38d..0000000 --- a/m4/ac_check_icu.m4 +++ /dev/null @@ -1,62 +0,0 @@ -dnl @synopsis AC_CHECK_ICU(version, action-if, action-if-not) -dnl -dnl @summary check for ICU of sufficient version by looking at icu-config -dnl -dnl Defines ICU_LIBS, ICU_CFLAGS, ICU_CXXFLAGS. See icu-config(1) man -dnl page. -dnl -dnl @category InstalledPackages -dnl @author Akos Maroy -dnl @version 2005-09-20 -dnl @license AllPermissive - -AC_DEFUN([AC_CHECK_ICU], [ - succeeded=no - - if test -z "$ICU_CONFIG"; then - AC_PATH_PROG(ICU_CONFIG, icu-config, no) - fi - - if test "$ICU_CONFIG" = "no" ; then - echo "*** The icu-config script could not be found. Make sure it is" - echo "*** in your path, and that taglib is properly installed." - echo "*** Or see http://ibm.com/software/globalization/icu/" - else - ICU_VERSION=`$ICU_CONFIG --version` - AC_MSG_CHECKING(for ICU >= $1) - VERSION_CHECK=`expr $ICU_VERSION \>\= $1` - if test "$VERSION_CHECK" = "1" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING(ICU_CFLAGS) - ICU_CFLAGS=`$ICU_CONFIG --cflags` - AC_MSG_RESULT($ICU_CFLAGS) - - AC_MSG_CHECKING(ICU_CXXFLAGS) - ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags` - AC_MSG_RESULT($ICU_CXXFLAGS) - - AC_MSG_CHECKING(ICU_LIBS) - ICU_LIBS=`$ICU_CONFIG --ldflags` - AC_MSG_RESULT($ICU_LIBS) - else - ICU_CFLAGS="" - ICU_CXXFLAGS="" - ICU_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - ifelse([$3], ,echo "can't find ICU >= $1",) - fi - - AC_SUBST(ICU_CFLAGS) - AC_SUBST(ICU_CXXFLAGS) - AC_SUBST(ICU_LIBS) - fi - - if test $succeeded = yes; then - ifelse([$2], , :, [$2]) - else - ifelse([$3], , AC_MSG_ERROR([Library requirements (ICU) not met.]), [$3]) - fi -]) diff --git a/m4/ax_check_icu.m4 b/m4/ax_check_icu.m4 new file mode 100644 index 0000000..96b2b29 --- /dev/null +++ b/m4/ax_check_icu.m4 @@ -0,0 +1,116 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_icu.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_ICU(version, action-if, action-if-not) +# +# DESCRIPTION +# +# Defines ICU_LIBS, ICU_CFLAGS, ICU_CXXFLAGS. See icu-config(1) man page. +# +# LICENSE +# +# Copyright (c) 2008 Akos Maroy +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_CHECK_ICU], [ + succeeded=no + + if test -z "$ICU_CONFIG"; then + AC_PATH_PROG(ICU_CONFIG, icu-config, no) + fi + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$ICU_CONFIG" = "no" && test "$PKG_CONFIG" = "no" ; then + echo "*** Neither icu-config nor pkg-config could not be found. Make sure either is" + echo "*** in your path, and that taglib is properly installed." + echo "*** Or see http://ibm.com/software/globalization/icu/" + fi + + if test "$ICU_CONFIG" != "no" ; then + ICU_VERSION=`$ICU_CONFIG --version` + AC_MSG_CHECKING(for ICU >= $1 via icu-config) + VERSION_CHECK=`expr $ICU_VERSION \>\= $1` + if test "$VERSION_CHECK" = "1" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING(ICU_CPPFLAGS) + ICU_CPPFLAGS=`$ICU_CONFIG --cppflags` + AC_MSG_RESULT($ICU_CPPFLAGS) + + AC_MSG_CHECKING(ICU_CFLAGS) + ICU_CFLAGS=`$ICU_CONFIG --cflags` + AC_MSG_RESULT($ICU_CFLAGS) + + AC_MSG_CHECKING(ICU_CXXFLAGS) + ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags` + AC_MSG_RESULT($ICU_CXXFLAGS) + + AC_MSG_CHECKING(ICU_LIBS) + ICU_LIBS=`$ICU_CONFIG --ldflags` + AC_MSG_RESULT($ICU_LIBS) + else + ICU_CPPFLAGS="" + ICU_CFLAGS="" + ICU_CXXFLAGS="" + ICU_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + ifelse([$3], ,echo "can't find ICU >= $1 via icu-config",) + fi + fi + + if test "$succeeded" != "yes" && test "$PKG_CONFIG" != "no" ; then + AC_MSG_CHECKING(for ICU >= $1 via pkg-config) + if $PKG_CONFIG --atleast-version=$1 icu-i18n ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING(ICU_CPPFLAGS) + ICU_CPPFLAGS=`$PKG_CONFIG --variable=CPPFLAGS icu-i18n` + AC_MSG_RESULT($ICU_CPPFLAGS) + + AC_MSG_CHECKING(ICU_CFLAGS) + ICU_CFLAGS=`$PKG_CONFIG --cflags icu-i18n` + AC_MSG_RESULT($ICU_CFLAGS) + + AC_MSG_CHECKING(ICU_CXXFLAGS) + ICU_CXXFLAGS=`$PKG_CONFIG --variable=CXXFLAGS icu-i18n` + AC_MSG_RESULT($ICU_CXXFLAGS) + + AC_MSG_CHECKING(ICU_LIBS) + ICU_LIBS=`$PKG_CONFIG --libs icu-i18n` + AC_MSG_RESULT($ICU_LIBS) + else + ICU_CPPFLAGS="" + ICU_CFLAGS="" + ICU_CXXFLAGS="" + ICU_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + ifelse([$3], ,echo "can't find ICU >= $1 via pkg-config",) + fi + fi + + if test "$succeeded" = "yes"; then + AC_SUBST(ICU_CPPFLAGS) + AC_SUBST(ICU_CFLAGS) + AC_SUBST(ICU_CXXFLAGS) + AC_SUBST(ICU_LIBS) + ifelse([$2], , :, [$2]) + else + ifelse([$3], , AC_MSG_ERROR([Library requirements (ICU) not met.]), [$3]) + fi +]) diff --git a/m4/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4 new file mode 100644 index 0000000..49a5f06 --- /dev/null +++ b/m4/ax_compiler_vendor.m4 @@ -0,0 +1,89 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COMPILER_VENDOR +# +# DESCRIPTION +# +# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun, +# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft, +# watcom, etc. The vendor is returned in the cache variable +# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2008 Matteo Frigo +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 17 + +AC_DEFUN([AX_COMPILER_VENDOR], +[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, + dnl Please add if possible support to ax_compiler_version.m4 + [# note: don't check for gcc first since some other compilers define __GNUC__ + vendors="intel: __ICC,__ECC,__INTEL_COMPILER + ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__ + pathscale: __PATHCC__,__PATHSCALE__ + clang: __clang__ + cray: _CRAYC + fujitsu: __FUJITSU + sdcc: SDCC, __SDCC + gnu: __GNUC__ + sun: __SUNPRO_C,__SUNPRO_CC + hp: __HP_cc,__HP_aCC + dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER + borland: __BORLANDC__,__CODEGEARC__,__TURBOC__ + comeau: __COMO__ + kai: __KCC + lcc: __LCC__ + sgi: __sgi,sgi + microsoft: _MSC_VER + metrowerks: __MWERKS__ + watcom: __WATCOMC__ + portland: __PGI + tcc: __TINYC__ + unknown: UNKNOWN" + for ventest in $vendors; do + case $ventest in + *:) vendor=$ventest; continue ;; + *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;; + esac + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ + #if !($vencpp) + thisisanerror; + #endif + ])], [break]) + done + ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1` + ]) +]) + diff --git a/macos/README b/macos/README deleted file mode 100644 index 8429154..0000000 --- a/macos/README +++ /dev/null @@ -1,5 +0,0 @@ - TinyFugue for Mac OS X - -You must have the developer tools installed on your system. -Open a shell window, and follow the instructions in unix/README. - diff --git a/os2/README b/os2/README index fdba978..73de6e6 100644 --- a/os2/README +++ b/os2/README @@ -14,7 +14,7 @@ REQUIREMENTS TO COMPILE 1...OS/2 3.0 with installed Internet Access Kit or OS/2 2.x with installed TCP/IP Basis Kit 2...the tinyfugue-sources -3...more space on your harddisk-partition +3...more space on your hard disk-partition 4...an installed emx-gcc-system INSTALL @@ -29,7 +29,7 @@ INSTALL variables are set in your config.sys or by the OS/2-Command 'SET') 2...unzip the tinyfugue-package with "unzip -a...". You can delete src/*, if you don't want to compile tinyfugue -3...set the followig environment-variables: +3...set the following environment-variables: HOME......your home directory. (.tfrc or tfrc will be searched there) TFLIBDIR..the full pathname of your tf-lib directory 4...setup your .tfrc-file (you can use "tfrc" for FAT-systems). Here is mine @@ -47,7 +47,7 @@ INSTALL /loadworld ;; macros can be redefined /redef on - ;; german-redefining for easier acces of /-key + ;; german-redefining for easier access of /-key ;;; #-key is now / /def -ib'#' = /input / ;;; alt-# is now # diff --git a/os2/config.h b/os2/config.h index 465543a..139120b 100644 --- a/os2/config.h +++ b/os2/config.h @@ -8,7 +8,6 @@ #define MAILDIR "" -#define RETSIGTYPE void /* #undef pid_t */ /* ? */ /* #undef size_t */ /* ? */ /* #undef time_t */ @@ -87,5 +86,4 @@ #define UNAME "OS/2" /* LIBDIR is defined by os2make.cmd */ -#define NDEBUG 1 #include diff --git a/os2/dmake.tl b/os2/dmake.tl index 50055e5..9c6cf28 100644 --- a/os2/dmake.tl +++ b/os2/dmake.tl @@ -13,7 +13,7 @@ usage: @echo #### (scrolling, using os/2-vio-functions,termcap) @echo #### Use "dmake VIDEO=TERMCAP" to build termcap-version @echo #### (no scrolling, using termcap.dat). - @echo #### Use "...DEBUG=ON..." for debugging informations + @echo #### Use "...DEBUG=ON..." for debugging information @echo #### Use "dmake clean" for removing object-files ] diff --git a/os2/make.tl b/os2/make.tl index 505fdf9..4c65760 100644 --- a/os2/make.tl +++ b/os2/make.tl @@ -10,7 +10,7 @@ usage: @echo "#### (scrolling, using os/2-vio-functions,termcap)" @echo "#### Use 'make VIDEO=TERMCAP' to build termcap-version" @echo "#### (no scrolling, using termcap.dat)." - @echo "#### Use '...DEBUG=ON...' for debugging informations" + @echo "#### Use '...DEBUG=ON...' for debugging information" @echo "#### Use 'make clean' for removing object-files" $(EXE): $(OBJS) $(BUILDERS) diff --git a/os2/nmake.tl b/os2/nmake.tl index 72dbaed..c89eba2 100644 --- a/os2/nmake.tl +++ b/os2/nmake.tl @@ -10,7 +10,7 @@ usage: @echo #### (scrolling, using os/2-vio-functions,termcap) @echo #### Use "nmake VIDEO=TERMCAP" to build termcap-version @echo #### (no scrolling, using termcap.dat). - @echo #### Use "...DEBUG=ON..." for debugging informations + @echo #### Use "...DEBUG=ON..." for debugging information @echo #### Use "nmake clean" for removing object-files $(EXE): $(OBJS) $(BUILDERS) diff --git a/src/attr.c b/src/attr.c index d15a002..065dbd8 100644 --- a/src/attr.c +++ b/src/attr.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: attr.c,v 35004.10 2007/01/13 23:12:39 kkeys Exp $"; #include "tfconfig.h" #include "port.h" diff --git a/src/attr.h b/src/attr.h index fa979d7..817b4b6 100644 --- a/src/attr.h +++ b/src/attr.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: attr.h,v 35004.4 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef ATTR_H #define ATTR_H diff --git a/src/cmdlist.h b/src/cmdlist.h index 95520de..9297ea8 100644 --- a/src/cmdlist.h +++ b/src/cmdlist.h @@ -1,3 +1,12 @@ +/************************************************************************* + * TinyFugue - programmable mud client + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) + * + * TinyFugue (aka "tf") is protected under the terms of the GNU + * General Public License. See the file "COPYING" for details. + ************************************************************************/ + + /* command list * defcmd and defvarcmd each define a command. * The "var" indicates that the function needs to be able to write into the diff --git a/src/command.c b/src/command.c index ff95f2d..5afedf7 100644 --- a/src/command.c +++ b/src/command.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: command.c,v 35004.141 2007/01/13 23:12:39 kkeys Exp $"; /***************************************************************** @@ -406,7 +405,7 @@ struct Value *handle_limit_command(String *args, int offset) { int mflag = matching; int got_opts = 0; - int result, had_filter, has_new_pat; + int result, has_new_pat; char c; const char *ptr; Screen *screen = display_screen; @@ -442,7 +441,6 @@ struct Value *handle_limit_command(String *args, int offset) goto end; } } - had_filter = screen_has_filter(screen); clear_screen_filter(screen); set_screen_filter(screen, has_new_pat ? &pat : NULL, attr_flag, sense); @@ -605,7 +603,7 @@ int do_file_load(const char *args, int tinytalk) !user_result->u.ival && !warned) { eprintf("(This line was implicitly treated as an /addworld " - "because it occured before the first '/' line and did not " + "because it occurred before the first '/' line and did not " "start with a '/', ';', or '#'.)"); warned = 1; } @@ -718,7 +716,7 @@ struct Value *handle_load_command(String *args, int offset) /* Generic utility to split arguments into pattern and body. * Note: I can get away with this only because none of the functions - * that use it are reentrant. Be careful. + * that use it are re-entrant. Be careful. */ static void split_args(char *args) { diff --git a/src/command.h b/src/command.h index 998c6be..fa8e7c4 100644 --- a/src/command.h +++ b/src/command.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: command.h,v 35004.24 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef COMMAND_H #define COMMAND_H diff --git a/src/dstring.c b/src/dstring.c index 730de25..50fac09 100644 --- a/src/dstring.c +++ b/src/dstring.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: dstring.c,v 35004.49 2007/01/13 23:12:39 kkeys Exp $"; /********************************************************************* diff --git a/src/dstring.h b/src/dstring.h index c0fa6a8..7430341 100644 --- a/src/dstring.h +++ b/src/dstring.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: dstring.h,v 35004.37 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef DSTRING_H #define DSTRING_H @@ -73,7 +72,7 @@ static inline conString *CS(String *s) { return (conString*)s; } /* AUTO_BUFFER: The structure is allocated automatically in a function's * (file's) scope; if it is used, it must be Stringfree()'d before * before function (program) exit, and it it safe to Stringfree() even if - * it wasn't used. Its data may be modifed and resized. + * it wasn't used. Its data may be modified and resized. */ # define AUTO_BUFFER(name) \ Stringp (name) = {{ NULL, 0, 0, 1, 0,0,1,1, \ @@ -82,7 +81,7 @@ static inline conString *CS(String *s) { return (conString*)s; } /* STATIC_BUFFER: The structure has static storage, and its data is allocated * the first time it's needed, but not freed, and reused after that to save * time. It never needs to be Stringfree()'d. Its data may be - * modified and resized. Not reentrant-safe. + * modified and resized. Not re-entrant-safe. */ #define STATIC_BUFFER_INIT \ {{ NULL, 0, 0, 1, 1,0,1,1, 0, NULL, { -1,-1 }, MD_INIT __FILE__, __LINE__ }} diff --git a/src/enumlist.h b/src/enumlist.h index f402523..ff4e042 100644 --- a/src/enumlist.h +++ b/src/enumlist.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: enumlist.h,v 35000.22 2007/01/13 23:12:39 kkeys Exp $ */ /* It may not be easy to read, but it keeps the constants and the array in the * same place, so they can't get out of sync. @@ -71,6 +70,7 @@ bicode(STAT_ACTIVE, STRING_LITERAL("active")), bicode(STAT_LOGGING, STRING_LITERAL("log")), bicode(STAT_MAIL, STRING_LITERAL("mail")), bicode(STAT_CLOCK, STRING_LITERAL("clock")), +bicode(STAT_ALERT, STRING_LITERAL("alert")), bicode(STAT_COUNT, STRING_NULL), bicode(STAT_NONE = -1, STRING_NULL) } diff --git a/src/expand.c b/src/expand.c index 49e346f..a1aafec 100644 --- a/src/expand.c +++ b/src/expand.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: expand.c,v 35004.232 2007/01/13 23:12:39 kkeys Exp $"; /******************************************************************** @@ -1170,7 +1169,7 @@ static void vcode_add(Program *prog, opcode_t op, int use_mark, va_list ap) inst[-1].op == OP_APPEND && inst[-1].arg.str) { /* e.g. {APPEND string; MACRO NULL;} to {MACRO string;} */ - /* but only if not preceeded by other append operators */ + /* but only if not preceded by other append operators */ if (prog->len > 2 && (inst[-2].op == OP_APPEND /* could be {APPEND NULL;} */ || (op_type_is(inst[-2].op, SUB) && op_is_append(inst[-2].op)))) @@ -1336,18 +1335,17 @@ static int list(Program *prog, int subs) is_special = is_a_command = is_a_condition = FALSE; - /* Lines begining with one "/" are tf commands. Lines beginning + /* Lines beginning with one "/" are tf commands. Lines beginning * with multiple "/"s have the first removed, and are sent to server. */ - - if ((subs > SUB_LITERAL) && (*ip == '/') && (*++ip != '/')) { - is_a_command = TRUE; + if ((subs > SUB_LITERAL) && (ip[0] == '/') && (ip[1] != '/')) { + ++ip; + is_a_command = TRUE; oldblock = block; if (subs >= SUB_KEYWORD) { stmtstart = ip; is_special = block = keyword_parse(prog); } - } else if ((subs > SUB_LITERAL) && (block == IF || block == ELSEIF || block == WHILE)) { diff --git a/src/expand.h b/src/expand.h index 27cdf71..bf0a318 100644 --- a/src/expand.h +++ b/src/expand.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: expand.h,v 35004.45 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef EXPAND_H #define EXPAND_H diff --git a/src/expr.c b/src/expr.c index 88928e7..2c832d2 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: expr.c,v 35004.179 2007/01/13 23:12:39 kkeys Exp $"; /******************************************************************** @@ -267,7 +266,7 @@ void freeval_fl(Value *val, const char *file, int line) { if (!val) return; if (--val->count > 0) return; - assert(val->count == 0); + assert(val->count == 0); clearval_fl(val, file, line); if (val->name) { xfree(NULL, (void*)val->name, file, line); @@ -735,7 +734,7 @@ static int reduce_arithmetic(opcode_t op, const Value *val0, int n, Value *res) neg1 = int1 < 0; sum = (int0 + int1); } - if (neg0 == neg1 && sum<0 != neg0) { + if (neg0 == neg1 && (sum < 0) != neg0) { /* operands have same sign, but sum has different sign: overflow */ promoted_type = TYPE_FLOAT; } @@ -744,8 +743,8 @@ static int reduce_arithmetic(opcode_t op, const Value *val0, int n, Value *res) switch (promoted_type) { case TYPE_INT: switch (op & ~OPF_SIDE) { - case '>': return resint(valint(val[0]) > valint(val[1])); - case '<': return resint(valint(val[0]) < valint(val[1])); + case '>': return resint(valint(val[0]) > valint(val[1])); + case '<': return resint(valint(val[0]) < valint(val[1])); case OP_EQUAL: return resint(valint(val[0]) == valint(val[1])); case OP_NOTEQ: return resint(valint(val[0]) != valint(val[1])); case OP_GTE: return resint(valint(val[0]) >= valint(val[1])); @@ -795,8 +794,8 @@ static int reduce_arithmetic(opcode_t op, const Value *val0, int n, Value *res) case TYPE_FLOAT: f = valfloat(val[0]); switch (op & ~OPF_SIDE) { - case '>': return resint(f > valfloat(val[1])); - case '<': return resint(f < valfloat(val[1])); + case '>': return resint(f > valfloat(val[1])); + case '<': return resint(f < valfloat(val[1])); case OP_EQUAL: return resint(f == valfloat(val[1])); case OP_NOTEQ: return resint(f != valfloat(val[1])); case OP_GTE: return resint(f >= valfloat(val[1])); @@ -926,8 +925,10 @@ static Value *function_switch(const ExprFunc *func, int n, const char *parent) enum2int(opdstd(n-2), 0, enum_flag, "arg 3 (inline)") : 1; constr = CS(i ? decode_attr(opdstr(n), 0, 0) : Stringdup(opdstr(n))); + if (!constr) + return shareval(val_blank); constr->attrs = adj_attr(constr->attrs, attr); - return constr ? newSstr(constr) : shareval(val_blank); + return newSstr(constr); } case FN_strip_attr: @@ -968,10 +969,16 @@ static Value *function_switch(const ExprFunc *func, int n, const char *parent) return_user_result(); case FN_send: - i = handle_send_function(opdstr(n), (n>1 ? opdstd(n-1) : NULL), + i = handle_send_function(opdstr(n), (n>1 ? opdstd(n-1) : NULL), (n>2 ? opdstd(n-2) : "")); return newint(i); +#if ENABLE_ATCP + case FN_atcp: + i = handle_atcp_function(opdstr(n), (n>1 ? opdstd(n-1) : NULL)); + return newint(i); +#endif + case FN_fake_recv: i = handle_fake_recv_function(opdstr(n), (n>1 ? opdstd(n-1) : NULL), (n>2 ? opdstd(n-2) : "")); @@ -993,6 +1000,18 @@ static Value *function_switch(const ExprFunc *func, int n, const char *parent) return newint(handle_tfopen_func( n<2 ? "" : opdstd(2), n<1 ? "q" : opdstd(1))); +#if ENABLE_GMCP + case FN_gmcp: + i = handle_gmcp_function(opdstr(n), (n>1 ? opdstd(n-1) : NULL)); + return newint(i); +#endif + +#if ENABLE_OPTION102 + case FN_option102: + i = handle_option102_function(opdstr(n), (n>1 ? opdstd(n-1) : NULL)); + return newint(i); +#endif + case FN_tfclose: str = opdstd(1); if (!str[1]) { @@ -1208,13 +1227,13 @@ static Value *function_switch(const ExprFunc *func, int n, const char *parent) { struct tm tm; time_t t; - unsigned int usec = 0; - tm.tm_sec = 0; - tm.tm_min = 0; - tm.tm_hour = 0; - tm.tm_mday = 1; - tm.tm_mon = 0; - tm.tm_year = 0; + int usec = 0; + tm.tm_sec = 0; + tm.tm_min = 0; + tm.tm_hour = 0; + tm.tm_mday = 1; + tm.tm_mon = 0; + tm.tm_year = 0; tm.tm_isdst = -1; switch (n) { case 7: usec = opdint(n-6); @@ -1264,7 +1283,7 @@ static Value *function_switch(const ExprFunc *func, int n, const char *parent) { Value *val; (Sstr = opdstrdup(1))->links++; /* XXX not needed if no match */ - /* test for type ==, not &; it must not have other extentions */ + /* test for type ==, not &; it must not have other extensions */ i = regmatch_in_scope(opd(2)->type == TYPE_STR ? opd(2) : NULL, opdstd(2), Sstr); Stringfree(Sstr); @@ -1922,7 +1941,7 @@ static int primary_expr(Program *prog, int could_be_div_or_macro) parse_error(prog, "expression", "operand"); return 0; } - + eat_space(prog); return 1; } diff --git a/src/expr.h b/src/expr.h index c8861c8..e3a0710 100644 --- a/src/expr.h +++ b/src/expr.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: expr.h,v 35004.17 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef EXPR_H #define EXPR_H diff --git a/src/fd_set.h b/src/fd_set.h index a875b44..c2df0e4 100644 --- a/src/fd_set.h +++ b/src/fd_set.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: fd_set.h,v 35004.15 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef FD_SET_H #define FD_SET_H diff --git a/src/funclist.h b/src/funclist.h index b3d505b..00aadd8 100644 --- a/src/funclist.h +++ b/src/funclist.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: funclist.h,v 35000.66 2007/01/13 23:12:39 kkeys Exp $ */ /* sorted by name */ /* Name Pure Arguments */ @@ -17,6 +16,9 @@ funccode(addworld, 0, 2, 9), funccode(ascii, 1, 1, 1), funccode(asin, 1, 1, 1), funccode(atan, 1, 1, 1), +#if ENABLE_ATCP +funccode(atcp, 0, 1, 2), +#endif funccode(char, 1, 1, 1), funccode(columns, 0, 0, 0), funccode(cos, 1, 1, 1), @@ -36,6 +38,9 @@ funccode(fwrite, 0, 2, 2), funccode(gethostname, 0, 0, 0), funccode(getopts, 0, 1, 2), funccode(getpid, 1, 0, 0), +#if ENABLE_GMCP +funccode(gmcp, 0, 1, 2), +#endif funccode(idle, 0, 0, 1), funccode(is_connected, 0, 0, 1), funccode(is_open, 0, 0, 1), @@ -62,6 +67,9 @@ funccode(nactive, 0, 0, 1), funccode(nlog, 0, 0, 0), funccode(nmail, 0, 0, 0), funccode(nread, 0, 0, 0), +#if ENABLE_OPTION102 +funccode(option102, 0, 1, 2), +#endif funccode(pad, 1, 1, (unsigned)-1), funccode(pow, 1, 2, 2), funccode(prompt, 0, 1, 1), diff --git a/src/globals.h b/src/globals.h index 730fdf6..7043a4e 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: globals.h,v 35000.78 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef GLOBALS_H #define GLOBALS_H @@ -158,6 +157,10 @@ enum Vars { #define TFMAILPATH getstdvar(VAR_TFMAILPATH) #define alert_attr getattrvar(VAR_alert_attr) #define alert_time gettimevar(VAR_alert_time) +#define ansi_log getintvar(VAR_ansi_log) +#define async_conn getintvar(VAR_async_conn) +#define async_name getintvar(VAR_async_name) +#define atcp getintvar(VAR_atcp) #define auto_fg getintvar(VAR_auto_fg) #define background getintvar(VAR_background) #define backslash getintvar(VAR_backslash) @@ -176,11 +179,11 @@ enum Vars { #define defcompile getintvar(VAR_defcompile) #define emulation getintvar(VAR_emulation) #define error_attr getattrvar(VAR_error_attr) +#define error_prefix getstdvar(VAR_error_prefix) #define expand_tabs getintvar(VAR_expand_tabs) #define expnonvis getintvar(VAR_expnonvis) #define gag getintvar(VAR_gag) -#define async_name getintvar(VAR_async_name) -#define async_conn getintvar(VAR_async_conn) +#define gmcp getintvar(VAR_gmcp) #define gpri getintvar(VAR_gpri) #define hilite getintvar(VAR_hilite) #define hiliteattr getattrvar(VAR_hiliteattr) @@ -199,6 +202,8 @@ enum Vars { #define keypad getintvar(VAR_keypad) #define kprefix getstrvar(VAR_kprefix) #define login getintvar(VAR_login) +#define log_prefix getstrvar(VAR_log_prefix) +#define log_time_format getstrvar(VAR_log_time_format) #define lpflag getintvar(VAR_lp) #define lpquote getintvar(VAR_lpquote) #define maildelay gettimevar(VAR_maildelay) @@ -215,7 +220,9 @@ enum Vars { #define more getintvar(VAR_more) #define mprefix getstrvar(VAR_mprefix) #define oldslash getintvar(VAR_oldslash) +#define oldunnamed getintvar(VAR_oldunnamed) #define optimize_user getintvar(VAR_optimize) +#define option102 getintvar(VAR_option102) #define pedantic getintvar(VAR_pedantic) #define prompt_wait gettimevar(VAR_prompt_wait) #define proxy_host getstdvar(VAR_proxy_host) @@ -266,10 +273,6 @@ enum Vars { extern Var special_var[]; -#if HAVE_SETLOCALE -static char *lang = NULL; -#endif - #define reset_kbnum() unsetvar(&special_var[VAR_kbnum]) #endif /* GLOBALS_H */ diff --git a/src/help.c b/src/help.c index 66d3a7e..4005a9a 100644 --- a/src/help.c +++ b/src/help.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: help.c,v 35004.35 2007/01/13 23:12:39 kkeys Exp $"; /* * Fugue help handling @@ -25,11 +24,10 @@ static const char RCSid[] = "$Id: help.c,v 35004.35 2007/01/13 23:12:39 kkeys Ex #include "tfio.h" #include "cmdlist.h" #include "variable.h" +#include "help.h" STATIC_BUFFER(indexfname); -#define HELPLEN (240+1) /* maximum length of lines in help file */ - struct Value *handle_help_command(String *args, int offset) { char buf0[HELPLEN], buf1[HELPLEN], buf2[HELPLEN]; diff --git a/src/help.h b/src/help.h new file mode 100644 index 0000000..1159268 --- /dev/null +++ b/src/help.h @@ -0,0 +1,9 @@ +/************************************************************************* + * TinyFugue - programmable mud client + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) + * + * TinyFugue (aka "tf") is protected under the terms of the GNU + * General Public License. See the file "COPYING" for details. + ************************************************************************/ + +#define HELPLEN (240+1) /* maximum length of lines in help file */ diff --git a/src/history.c b/src/history.c index 2ebcc03..03c8160 100644 --- a/src/history.c +++ b/src/history.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: history.c,v 35004.114 2007/01/13 23:12:39 kkeys Exp $"; /**************************************************************** @@ -37,9 +36,9 @@ static const char RCSid[] = "$Id: history.c,v 35004.114 2007/01/13 23:12:39 kkey const int feature_history = !(NO_HISTORY - 0); #if !NO_HISTORY -#define GLOBALSIZE 1000 /* global history size */ -#define LOCALSIZE 100 /* local history size */ -#define INPUTSIZE 100 /* command history buffer size */ +#define GLOBALSIZE 5000 /* global history size */ +#define LOCALSIZE 1000 /* local history size */ +#define INPUTSIZE 500 /* command history buffer size */ typedef struct History { /* circular list of lines, and logfile */ CQueue cq; @@ -64,8 +63,8 @@ struct History globalhist_buf, localhist_buf; struct History * const globalhist = &globalhist_buf; struct History * const localhist = &localhist_buf; int log_count = 0; -int nohistory = 0; /* supress history (but not log) recording */ -int nolog = 0; /* supress log (but not history) recording */ +int nohistory = 0; /* suppress history (but not log) recording */ +int nolog = 0; /* suppress log (but not history) recording */ #define histline(hist, i) \ ((String*)(hist)->cq.data[nmod(i, (hist)->cq.maxsize)]) @@ -127,6 +126,33 @@ static void save_to_hist(History *hist, conString *line) static void save_to_log(History *hist, const conString *str) { + int i_s = 0; + STATIC_BUFFER(log_buffer); + + //set time to string + Stringtrunc(log_buffer, 0); + + //create prefix + if (log_prefix) { + for (i_s = 0; i_s < log_prefix->len; i_s++) + { + if (log_prefix->data[i_s] != '%') { + SStringoncat(log_buffer, log_prefix, i_s, 1); + } else { + ++i_s; + if (log_prefix->data[i_s] == 't') + tftime(log_buffer, log_time_format, &str->time); + else + SStringoncat(log_buffer, log_prefix, i_s-1, 2); + } + } + } + + if (ansi_log) + SStringcat(log_buffer, (conString *) encode_ansi(str, 0)); + else + SStringcat(log_buffer, str); + if (wraplog) { /* ugly, but some people want it */ const char *p = str->data; @@ -141,7 +167,7 @@ static void save_to_log(History *hist, const conString *str) remaining -= len; } while (remaining); } else { - tfputs(str->data, hist->logfile); + tfputs(log_buffer->data, hist->logfile); } tfflush(hist->logfile); } @@ -635,7 +661,7 @@ static void listlog(World *world) /* Parse "ligw:" history options. If another option is found, it is returned, * so the caller can parse it. If end of options is reached, 0 is returned. * '?' is returned for error. *histp will contain a pointer to the history - * selected by the "ligw:" options. *histp will be unchanged if no relavant + * selected by the "ligw:" options. *histp will be unchanged if no relevant * options are given; the caller should assign a default before calling. */ static int next_hist_opt(const char **ptr, int *offsetp, History **histp, diff --git a/src/history.h b/src/history.h index 461846e..081e590 100644 --- a/src/history.h +++ b/src/history.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: history.h,v 35004.30 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef HISTORY_H #define HISTORY_H diff --git a/src/hooklist.h b/src/hooklist.h index 197e18c..752b52f 100644 --- a/src/hooklist.h +++ b/src/hooklist.h @@ -1,17 +1,19 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: hooklist.h,v 35000.24 2007/01/13 23:12:39 kkeys Exp $ */ /* This keeps the constants and the array in the same place * so they can't get out of sync. */ gencode(ACTIVITY, HT_ALERT | HT_XSOCK), +#if ENABLE_ATCP +gencode(ATCP, 0), +#endif gencode(BAMF, HT_WORLD | HT_XSOCK), gencode(BGTEXT, 0), gencode(BGTRIG, HT_ALERT | HT_XSOCK), @@ -19,6 +21,9 @@ gencode(CONFAIL, HT_WORLD | HT_XSOCK), gencode(CONFLICT, 0), gencode(CONNECT, HT_WORLD | HT_XSOCK), gencode(DISCONNECT, HT_WORLD | HT_XSOCK), +#if ENABLE_GMCP +gencode(GMCP, 0), +#endif gencode(ICONFAIL, HT_WORLD | HT_XSOCK), gencode(KILL, 0), gencode(LOAD, 0), @@ -28,6 +33,9 @@ gencode(LOGIN, 0), gencode(MAIL, HT_ALERT), gencode(MORE, 0), gencode(NOMACRO, 0), +#if ENABLE_OPTION102 +gencode(OPTION102, 0), +#endif gencode(PENDING, HT_WORLD | HT_XSOCK), gencode(PREACTIVITY, 0), gencode(PROCESS, 0), diff --git a/src/keyboard.c b/src/keyboard.c index c75bde9..13ec950 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: keyboard.c,v 35004.88 2007/01/13 23:12:39 kkeys Exp $"; /************************************************** * Fugue keyboard handling. @@ -303,7 +302,7 @@ struct Value *handle_dokey_command(String *args, int offset) int n; /* XXX We use kbnum_internal here, but a macro would use the local %kbnum. - * It is possible (though unadvisable) for a macro to change the local + * It is possible (though inadvisable) for a macro to change the local * %kbnum before this point, making this code behave differently than * a /dokey_foo macro would. Fetching the actual local %kbnum here would * make the behavior the same, but is a step in the wrong direction; diff --git a/src/keyboard.h b/src/keyboard.h index 73dfdd5..8a48002 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: keyboard.h,v 35004.23 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef KEYBOARD_H #define KEYBOARD_H diff --git a/src/keylist.h b/src/keylist.h index f59f26d..b8e3649 100644 --- a/src/keylist.h +++ b/src/keylist.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: keylist.h,v 35000.16 2007/01/13 23:12:39 kkeys Exp $ */ gencode(CLEAR), gencode(FLUSH), diff --git a/src/macro.c b/src/macro.c index 19e34a2..e2a5a64 100644 --- a/src/macro.c +++ b/src/macro.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: macro.c,v 35004.188 2007/01/13 23:12:39 kkeys Exp $"; /********************************************** @@ -154,9 +153,9 @@ int hookname2int(const char *name) NUM_HOOKS, sizeof(hookrec_t), cstrstructcmp); if (hookrec) return hookrec - hook_table; - if (cstrcmp(name, "BACKGROUND") == 0) /* backward compatability */ + if (cstrcmp(name, "BACKGROUND") == 0) /* backward compatibility */ return H_BGTRIG; - if (cstrcmp(name, "CONNETFAIL") == 0) /* backward compatability */ + if (cstrcmp(name, "CONNETFAIL") == 0) /* backward compatibility */ eprintf("invalid hook event \"%s\"; see \"/help /connect\"", name); else eprintf("invalid hook event \"%s\"", name); @@ -232,8 +231,10 @@ static Macro *macro_spec(String *args, int offset, int *xmflag, ListOpts *listop spec->used[USED_NAME] = spec->used[USED_TRIG] = spec->used[USED_HOOK] = spec->used[USED_KEY] = 0; - startopt(CS(args), "usSp#c#b:B:E:t:w:h:a:f:P:T:FiIn#1m:q" + - (listopts ? 0 : 3)); + const char *fullOptString = "usSp#c#b:B:E:t:w:h:a:f:P:T:FiIn#1m:q"; + char *optStr = (listopts ? (char *)fullOptString : (char *)fullOptString + 3); + startopt(CS(args), optStr); + // startopt(CS(args), "usSp#c#b:B:E:t:w:h:a:f:P:T:FiIn#1m:q" + (listopts ? 0 : 3)); while (!error && (opt = nextopt(&ptr, &uval, NULL, &offset))) { switch (opt) { case 'u': @@ -621,7 +622,7 @@ Macro *find_hashed_macro(const char *name, unsigned int hash) static Macro *match_exact(int hooknum, const char *str, attr_t attrs) { ListEntry *node; - + if (hooknum < 0 && !*str) return NULL; for (node = hooknum>=0 ? hooklist[hooknum].head : triglist->head; node; node = node->next) @@ -1269,7 +1270,7 @@ static conString *print_def(TFILE *file, String *buffer, Macro *p) Sappendf(buffer, "-T'%q' ", '\'', p->wtype.str); } - if (p->expr) + if (p->expr) Sappendf(buffer, "-E'%q' ", '\'', p->expr->data); if (p->trig.str) { @@ -1290,11 +1291,11 @@ static conString *print_def(TFILE *file, String *buffer, Macro *p) } #if 0 /* obsolete */ - if (*p->keyname) + if (*p->keyname) Sappendf(buffer, "-B'%s' ", p->keyname); else #endif - if (*p->bind) + if (*p->bind) Sappendf(buffer, "-b'%q' ", '\'', ascii_to_print(p->bind)->data); if (p->quiet) Stringcat(buffer, "-q "); diff --git a/src/macro.h b/src/macro.h index 77705f9..4c51391 100644 --- a/src/macro.h +++ b/src/macro.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: macro.h,v 35004.57 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef MACRO_H #define MACRO_H diff --git a/src/main.c b/src/main.c index 1f3b871..a1ad739 100644 --- a/src/main.c +++ b/src/main.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: main.c,v 35004.115 2007/01/13 23:12:39 kkeys Exp $"; /*********************************************** @@ -38,10 +37,11 @@ static const char RCSid[] = "$Id: main.c,v 35004.115 2007/01/13 23:12:39 kkeys E #include "expand.h" #include "expr.h" #include "process.h" +#include "tfdefs.h" /* UNAME */ const char sysname[] = UNAME; -/* For customized versions, please add a unique identifer (e.g., your initials) +/* For customized versions, please add a unique identifier (e.g., your initials) * to the version number, and put a brief description of the modifications * in the mods[] string. */ @@ -54,7 +54,7 @@ const char version[] = const char mods[] = ""; const char copyright[] = - "Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys (kenkeys@users.sourceforge.net)"; + "Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net)"; const char contrib[] = #ifdef PLATFORM_OS2 diff --git a/src/makehelp.c b/src/makehelp.c index 938e7a2..bfb997d 100644 --- a/src/makehelp.c +++ b/src/makehelp.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: makehelp.c,v 35004.18 2007/01/13 23:12:39 kkeys Exp $"; /************************************************************** @@ -16,10 +15,11 @@ static const char RCSid[] = "$Id: makehelp.c,v 35004.18 2007/01/13 23:12:39 kkey **************************************************************/ #include +#include "help.h" int main(int argc, char **argv) { - char line[240+1]; + char line[HELPLEN]; long offset = 0; while (fgets(line, sizeof(line), stdin) != NULL) { diff --git a/src/malloc.c b/src/malloc.c index 03ca393..2446c2a 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -1,18 +1,17 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: malloc.c,v 35004.22 2007/01/13 23:12:39 kkeys Exp $"; +#include #include "tfconfig.h" #include "port.h" #include "signals.h" #include "malloc.h" -caddr_t mmalloc_base = NULL; int low_memory_warning = 0; static char *reserve = NULL; diff --git a/src/malloc.h b/src/malloc.h index cc4d3bf..daa82e4 100644 --- a/src/malloc.h +++ b/src/malloc.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: malloc.h,v 35004.24 2007/01/13 23:12:39 kkeys Exp $ */ /* Function hierarchy: * xmalloc: will kill process if it fails. Calls dmalloc. diff --git a/src/opcodes.h b/src/opcodes.h index 14e2a6c..778a87e 100644 --- a/src/opcodes.h +++ b/src/opcodes.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 2000-2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: opcodes.h,v 35004.29 2007/01/13 23:12:39 kkeys Exp $ */ /* * Expression operators use the ASCII character as their opcode to be @@ -89,10 +88,10 @@ defopcode(JUMP ,'3', JUMP, INT, 0) /* STRP defaults to buffer. */ defopcode(SEND ,'a', CTRL, STRP, 0) /* send string to server */ defopcode(EXECUTE ,'b', CTRL, STRP, 0) /* execute arbitrary cmd line */ -defopcode(BUILTIN ,'c', CTRL, CMDP, 0) /* execute a resovled builtin */ -defopcode(NBUILTIN ,'c', CTRL, CMDP, NEG) /* execute a resovled builtin */ -defopcode(COMMAND ,'d', CTRL, CMDP, 0) /* execute a resovled command */ -defopcode(NCOMMAND ,'d', CTRL, CMDP, NEG) /* execute a resovled command */ +defopcode(BUILTIN ,'c', CTRL, CMDP, 0) /* execute a resolved builtin */ +defopcode(NBUILTIN ,'c', CTRL, CMDP, NEG) /* execute a resolved builtin */ +defopcode(COMMAND ,'d', CTRL, CMDP, 0) /* execute a resolved command */ +defopcode(NCOMMAND ,'d', CTRL, CMDP, NEG) /* execute a resolved command */ defopcode(MACRO ,'e', CTRL, VALP, 0) /* execute a macro cmd line */ defopcode(NMACRO ,'e', CTRL, VALP, NEG) /* execute a macro cmd line */ defopcode(ARG ,'f', CTRL, STRP, 0) /* arg for BUILTIN, COMMAND, SET */ diff --git a/src/output.c b/src/output.c index 4925f74..1fa4d75 100644 --- a/src/output.c +++ b/src/output.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: output.c,v 35004.242 2007/01/14 00:44:19 kkeys Exp $"; /***************************************************************** @@ -49,6 +48,10 @@ static const char RCSid[] = "$Id: output.c,v 35004.242 2007/01/14 00:44:19 kkeys # include #endif +#if HAVE_SETLOCALE +static char *lang = NULL; +#endif + /* Terminal codes and capabilities. * Visual mode requires at least clear_screen and cursor_address. The other * codes are good to have, but are not strictly necessary. @@ -132,8 +135,8 @@ typedef struct statusfield { int rightjust; int column; int row; - attr_t attrs; /* attibutes from status_fields */ - attr_t vattrs; /* attibutes from status_attr_{int,var}_ */ + attr_t attrs; /* attributes from status_fields */ + attr_t vattrs; /* attributes from status_attr_{int,var}_ */ } StatusField; static Var bogusvar; /* placeholder for StatusField->var */ @@ -1993,11 +1996,10 @@ void alert(conString *msg) new_pos = 0; new_len = msg->len > Wrap ? Wrap : msg->len; if (msg->len < Wrap) { - /* if there's a field after @world, and msg fits there, use it */ - for (node = statusfield_list[row]->head; node; node = node->next) { - field = (StatusField*)node->datum; - if (field->internal == STAT_WORLD && node->next) { - field = (StatusField*)node->next->datum; + /* use the @alert field */ + for (node = statusfield_list[row]->head; node; node = node->next) { + field = (StatusField*)node->datum; + if (field->internal == STAT_ALERT) { break; } } @@ -2586,7 +2588,7 @@ int igoto(int place) xy(ix, lines); } } else { - crnl(1); cx = 1; /* old text scrolls up, for continutity */ + crnl(1); cx = 1; /* old text scrolls up, for continuity */ physical_refresh(); } } else { /* on screen */ @@ -3026,7 +3028,7 @@ int screen_end(int need_redraw) screen->nnew_filtered = screen->nnew = 0; special_var[VAR_more].val.u.ival = 0; - /* XXX optimize if (jump < screenful) (but what about tmp lines?) */ + /* XXX optimize if (jump < screenfull) (but what about tmp lines?) */ need_redraw = 1; screen->maxbot = screen->bot = screen->pline.tail; screen_refilter(screen); diff --git a/src/output.h b/src/output.h index ea27c4f..1aabda2 100644 --- a/src/output.h +++ b/src/output.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: output.h,v 35004.68 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef OUTPUT_H #define OUTPUT_H diff --git a/src/parse.h b/src/parse.h index e1f3edd..fedcd56 100644 --- a/src/parse.h +++ b/src/parse.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: parse.h,v 35004.51 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef PARSE_H #define PARSE_H @@ -84,7 +83,7 @@ struct Program { int len; /* length of compiled code */ int size; /* size of code array */ const char *mark; /* pointer into source code, for mecho */ - int optimize; /* opimization level */ + int optimize; /* optimization level */ }; typedef struct Arg { diff --git a/src/pattern.c b/src/pattern.c index 55dc03b..71480a3 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: pattern.c,v 35004.4 2007/01/13 23:12:39 kkeys Exp $"; /* @@ -26,6 +25,13 @@ static const char RCSid[] = "$Id: pattern.c,v 35004.4 2007/01/13 23:12:39 kkeys #include "search.h" /* for tfio.h */ #include "tfio.h" +/* This isn't used unless compiling with PCRE2 */ +int pcre_info(const pcre *argument_re, int *optptr, int *first_byte) { + int n = 0; + pcre_fullinfo(argument_re, NULL, 2, &n); + return n; +} + static RegInfo *reginfo = NULL; static const unsigned char *re_tables = NULL; @@ -49,7 +55,7 @@ int regmatch_in_scope(Value *val, const char *pattern, String *str) if (!(reginfo = tf_reg_compile(pattern, 0))) return 0; } else if (val->type & TYPE_REGEX) { - /* use precompiled regexp */ + /* use pre-compiled regexp */ (reginfo = val->u.ri)->links++; } else { /* compile regexp, and store it on val for future reuse */ @@ -478,4 +484,3 @@ void free_patterns(void) } } #endif - diff --git a/src/pattern.h b/src/pattern.h index cbe9af9..c76ec73 100644 --- a/src/pattern.h +++ b/src/pattern.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: pattern.h,v 35004.3 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef PATTERN_H #define PATTERN_H diff --git a/src/port.h b/src/port.h index 3a97a88..40c9310 100644 --- a/src/port.h +++ b/src/port.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: port.h,v 35004.38 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef PORT_H #define PORT_H @@ -24,7 +23,7 @@ #endif #if 0 /* These cause a few problems, but little benefit, so forget it. */ -/* These aren't neccessary, but may improve optimization, etc. */ +/* These aren't necessary, but may improve optimization, etc. */ # ifdef __GNUC__ # define INLINE __inline__ # if (__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || (__GNUC__ > 2) @@ -246,7 +245,7 @@ extern char *sys_errlist[]; # ifdef MAXPATHLEN # define PATH_MAX MAXPATHLEN # else -# define PATH_MAX 1024 +# define PATH_MAX 1023 # endif #endif diff --git a/src/process.c b/src/process.c index 41c26dc..5974c1e 100644 --- a/src/process.c +++ b/src/process.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: process.c,v 35004.71 2007/01/13 23:12:39 kkeys Exp $"; /************************ * Fugue processes. * diff --git a/src/process.h b/src/process.h index 153dfad..d5b545e 100644 --- a/src/process.h +++ b/src/process.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: process.h,v 35004.20 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef PROCESS_H #define PROCESS_H diff --git a/src/rules.mak b/src/rules.mak index cc05c7c..ec1675a 100644 --- a/src/rules.mak +++ b/src/rules.mak @@ -1,7 +1,6 @@ -# $Id: rules.mak,v 1.21 2007/01/13 23:12:39 kkeys Exp $ ######################################################################## # TinyFugue - programmable mud client -# Copyright (C) 1998, 1999, 2002, 2006-2007 Ken Keys +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) # # TinyFugue (aka "tf") is protected under the terms of the GNU # General Public License. See the file "COPYING" for details. @@ -18,7 +17,7 @@ # Predefined variables: # SYS - required system type (unix, os2) # O - required object suffix (e.g., "o" or "obj") -# BUILDERS - optional list of system-specific dependancies +# BUILDERS - optional list of system-specific dependencies attr.$(O): attr.c tfconfig.h tfdefs.h port.h tf.h malloc.h dstring.h \ globals.h varlist.h enumlist.h hooklist.h util.h pattern.h \ diff --git a/src/search.c b/src/search.c index 2975574..dffc365 100644 --- a/src/search.c +++ b/src/search.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: search.c,v 35004.32 2007/01/13 23:12:39 kkeys Exp $"; /********************************************** @@ -25,7 +24,7 @@ static ListEntry *nodepool = NULL; /* freelist */ /* trie */ /********/ -/* Find the datum in trie assosiated with the key. */ +/* Find the datum in trie associated with the key. */ void *trie_find(TrieNode *root, const unsigned char *key) { TrieNode *n; diff --git a/src/search.h b/src/search.h index a9da20c..cece819 100644 --- a/src/search.h +++ b/src/search.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: search.h,v 35004.29 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef SEARCH_H #define SEARCH_H diff --git a/src/signals.c b/src/signals.c index bd96b87..b6f28c3 100644 --- a/src/signals.c +++ b/src/signals.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: signals.c,v 35004.70 2007/01/14 19:28:36 kkeys Exp $"; /* Signal handling, core dumps, job control, and interactive shells */ @@ -69,7 +68,7 @@ union wait *dummy_union_wait; # define WEXITSTATUS(w) (((*(int *)&(w)) >> 8) & 0xFF) /* works most places */ #endif -typedef RETSIGTYPE (SigHandler)(int sig); +typedef void (SigHandler)(int sig); #if !HAVE_RAISE # if HAVE_KILL @@ -130,18 +129,18 @@ const int feature_core = 1 - DISABLE_CORE; static const char *argv0 = NULL; static int have_pending_signals = 0; static sig_set pending_signals; -static RETSIGTYPE (*parent_tstp_handler)(int sig); +static void (*parent_tstp_handler)(int sig); static void handle_interrupt(void); static void terminate(int sig); static void coremsg(FILE *dumpfile); static int debugger_dump(void); static FILE *get_dumpfile(void); -static RETSIGTYPE core_handler(int sig); -static RETSIGTYPE signal_scheduler(int sig); -static RETSIGTYPE signal_jumper(int sig); +static void core_handler(int sig); +static void signal_scheduler(int sig); +static void signal_jumper(int sig); #ifndef SIG_IGN -static RETSIGTYPE SIG_IGN(int sig); +static void SIG_IGN(int sig); #endif @@ -218,7 +217,7 @@ const char *checkstring(const char *s) { break; } } - + exit: setsighandler(SIGBUS, old_sigbus_handler); setsighandler(SIGSEGV, old_sigsegv_handler); @@ -256,7 +255,7 @@ void init_signals(void) } #ifndef SIG_IGN -static RETSIGTYPE SIG_IGN(int sig) +static void SIG_IGN(int sig) { setsighandler(sig, SIG_IGN); /* restore handler (POSIX) */ } @@ -310,7 +309,7 @@ int suspend(void) } -static RETSIGTYPE core_handler(int sig) +static void core_handler(int sig) { FILE *dumpfile; setsighandler(sig, core_handler); /* restore handler (POSIX) */ @@ -410,7 +409,7 @@ static char initial_dir[PATH_MAX+1] = "."; /* default: many users never chdir */ static void coremsg(FILE *dumpfile) { fputs("Also describe what you were doing in tf when this\r\n", stderr); - fputs("occured, and whether you can repeat it.\r\n\n", stderr); + fputs("occurred, and whether you can repeat it.\r\n\n", stderr); fprintf(dumpfile, "> %.512s\r\n", version); if (*sysname) fprintf(dumpfile, "> %.256s\r\n", sysname); fprintf(dumpfile, "> %.256s\r\n", featurestr->data); @@ -503,9 +502,9 @@ static const char *get_exename(pid_t pid) while (1) { len = strcspn(dir, ":\0"); if (*dir == '/') - sprintf(exebuf, "%.*s/%s", len, dir, argv0); + sprintf(exebuf, "%.*s/%s", (int) len, dir, argv0); else - sprintf(exebuf, "%s/%.*s/%s", initial_dir, len, dir, argv0); + sprintf(exebuf, "%s/%.*s/%s", initial_dir, (int) len, dir, argv0); if (stat(exebuf, &statbuf) == 0) return exebuf; if (!dir[len]) @@ -567,14 +566,14 @@ static void terminate(int sig) raise(sig); } -static RETSIGTYPE signal_scheduler(int sig) +static void signal_scheduler(int sig) { setsighandler(sig, signal_scheduler); /* restore handler (POSIX) */ VEC_SET(sig, &pending_signals); /* set flag to deal with it later */ have_pending_signals++; } -static RETSIGTYPE signal_jumper(int sig) +static void signal_jumper(int sig) { fatal_signal = sig; longjmp(jumpenv, 1); diff --git a/src/signals.h b/src/signals.h index 4bfe2fb..4bae267 100644 --- a/src/signals.h +++ b/src/signals.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: signals.h,v 35004.21 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef SIGNALS_H #define SIGNALS_H diff --git a/src/socket.c b/src/socket.c index 870d4a0..cea974c 100644 --- a/src/socket.c +++ b/src/socket.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: socket.c,v 35004.288 2007/01/13 23:12:39 kkeys Exp $"; /*************************************************************** @@ -35,11 +34,21 @@ static const char RCSid[] = "$Id: socket.c,v 35004.288 2007/01/13 23:12:39 kkeys #endif #if HAVE_SSL -# include -# include +# if HAVE_GNUTLS_OPENSSL_H +# include +# else +# include +# include +# endif SSL_CTX *ssl_ctx; #endif +/* Receive buffer before deciding server is misbehaving. + * This was previously 1024, but that's quite low for + * current servers. It should be fairly safe to modify + * this up or down as needed. */ +#define RECEIVELIMIT ((32 * 1024) -1) + #ifdef NETINET_IN_H # include NETINET_IN_H #else @@ -112,7 +121,9 @@ struct sockaddr_in { # endif #endif -#include NETDB_H +#ifdef NETDB_H + #include NETDB_H +#endif #if !HAVE_GAI_STRERROR || !defined(AI_NUMERICHOST) || !defined(EAI_SERVICE) /* System's implementation is incomplete. Avoid it. */ @@ -215,7 +226,7 @@ static const char *h_errlist[] = { * Nonblocking connect will work on a system if the column contains a 'W' * and there is no 'F' above it; 'N' does not matter. The order of the * tests is arranged to keep the 'F's below the 'W's. - * + * * S * o * P L S l H @@ -448,9 +459,19 @@ STATIC_BUFFER(telbuf); #define TN_AUTH ((char)37) /* 1416 - (not used) */ #define TN_NEW_ENVIRON ((char)39) /* 1572 - (not used) */ #define TN_CHARSET ((char)42) /* 2066 - Charset negotiation */ -/* 85 & 86 are not standard. See http://www.randomly.org/projects/MCCP/ */ +/* 85 & 86 are not standard. + * See http://www.randomly.org/projects/MCCP */ #define TN_COMPRESS ((char)85) /* MCCP v1 */ #define TN_COMPRESS2 ((char)86) /* MCCP v2 */ +/* 200 is not standard. + * See http://www.ironrealms.com/rapture/manual/files/FeatATCP-txt.html */ +#define TN_ATCP ((char)200) /* ATCP */ +/* 201 is not standard. + * See http://www.aardwolf.com/wiki/index.php/Clients/GMCP */ +#define TN_GMCP ((char)201) /* GMCP */ +/* 102 is not standard. + * See http://www.aardwolf.com/blog/category/technical */ +#define TN_102 ((char)102) /* Option 102 */ #define UCHAR unsigned char @@ -547,9 +568,11 @@ static void ssl_io_err(Sock *sock, int ret, int hook) case SSL_ERROR_WANT_WRITE: ssl_io_err_hook("SSL", "SSL_ERROR_WANT_WRITE"); break; +#ifdef SSL_ERROR_WANT_CONNECT case SSL_ERROR_WANT_CONNECT: ssl_io_err_hook("SSL", "SSL_ERROR_WANT_CONNECT"); break; +#endif case SSL_ERROR_SYSCALL: if (ret == 0) { ssl_io_err_hook("SSL/system", "invalid EOF"); @@ -623,6 +646,9 @@ void init_sock(void) telnet_label[(UCHAR)TN_CHARSET] = "CHARSET"; telnet_label[(UCHAR)TN_COMPRESS] = "COMPRESS"; telnet_label[(UCHAR)TN_COMPRESS2] = "COMPRESS2"; + telnet_label[(UCHAR)TN_ATCP] = "ATCP"; + telnet_label[(UCHAR)TN_GMCP] = "GMCP"; + telnet_label[(UCHAR)TN_102] = "102"; telnet_label[(UCHAR)TN_EOR] = "EOR"; telnet_label[(UCHAR)TN_SE] = "SE"; telnet_label[(UCHAR)TN_NOP] = "NOP"; @@ -677,11 +703,11 @@ void main_loop(void) if (depth > 1 && interrupted()) break; /* deal with pending signals */ - /* at loop beginning in case of signals before main_loop() */ + /* at loop beginning in case of signals before main_loop() */ process_signals(); /* run processes */ - /* at loop beginning in case of processes before main_loop() */ + /* at loop beginning in case of processes before main_loop() */ gettime(&now); if (proctime.tv_sec && tvcmp(&proctime, &now) <= 0) runall(0, NULL); /* run timed processes */ @@ -790,7 +816,7 @@ void main_loop(void) * descriptor write: nonblocking connect() * timeout: time for runall() or do_refresh() * Note: if the same descriptor appears in more than one fd_set, some - * systems count it only once, some count it once for each occurance. + * systems count it only once, some count it once for each occurrence. */ active = readers; connected = writers; @@ -1426,8 +1452,12 @@ static void setupnextconn(Sock *sock) { struct addrinfo *ai, *next = sock->addr; - if (sock->fd >= 0) - close(sock->fd); + if (sock->fd >= 0) { + FD_CLR(sock->fd, &readers); + FD_CLR(sock->fd, &writers); + close(sock->fd); + sock->fd = -1; + } retry: next = next->ai_next; /* if next address is a duplicate of one we've already done, skip it */ @@ -1865,7 +1895,7 @@ static int nonblocking_gethost(const char *name, const char *port, #ifdef PLATFORM_OS2 { threadpara *tpara; - + if ((tpara = XMALLOC(sizeof(threadpara)))) { setmode(fds[0],O_BINARY); setmode(fds[1],O_BINARY); @@ -2444,12 +2474,12 @@ int handle_send_function(conString *string, const char *world, for (p = flags; *p; p++) { switch (*p) { - case 'o': /* for backward compatability */ + case 'o': /* for backward compatibility */ break; - case '1': case 'n': /* for backward compatability */ + case '1': case 'n': /* for backward compatibility */ eol_flag = 1; break; case 'u': /* fall through */ - case '0': case 'f': /* for backward compatability */ + case '0': case 'f': /* for backward compatibility */ eol_flag = 0; break; case 'h': hook_flag = 1; break; @@ -2466,6 +2496,45 @@ int handle_send_function(conString *string, const char *world, return result; } +#if ENABLE_ATCP +int handle_atcp_function(conString *string, const char *world) +{ + Sock *old_xsock = xsock; + + xsock = (!world || !*world) ? xsock : find_sock(world); + Sprintf(telbuf, "%c%c%c%s%c%c", TN_IAC, TN_SB, TN_ATCP, string->data, TN_IAC, TN_SE); + telnet_send(telbuf); + xsock = old_xsock; + return 1; +} +#endif + +#if ENABLE_GMCP +int handle_gmcp_function(conString *string, const char *world) +{ + Sock *old_xsock = xsock; + + xsock = (!world || !*world) ? xsock : find_sock(world); + Sprintf(telbuf, "%c%c%c%s%c%c", TN_IAC, TN_SB, TN_GMCP, string->data, TN_IAC, TN_SE); + telnet_send(telbuf); + xsock = old_xsock; + return 1; +} +#endif + +#if ENABLE_OPTION102 +int handle_option102_function(conString *string, const char *world) +{ + Sock *old_xsock = xsock; + + xsock = (!world || !*world) ? xsock : find_sock(world); + Sprintf(telbuf, "%c%c%c%s%c%c", TN_IAC, TN_SB, TN_102, string->data, TN_IAC, TN_SE); + telnet_send(telbuf); + xsock = old_xsock; + return 1; +} +#endif + /* Code for the undocumented fake_recv script function. */ int handle_fake_recv_function(conString *string, const char *world, const char *flags) @@ -2490,10 +2559,12 @@ int handle_fake_recv_function(conString *string, const char *world, eprintf("no open world %s", world ? world : ""); return 0; } - if (raw) + if (raw) { handle_socket_input(string->data, string->len, NULL); - else + } else { queue_socket_line(sock, string, string->len, 0); + flushxsock(); + } return 1; } @@ -2689,7 +2760,9 @@ static void handle_socket_lines(void) socks_with_lines--; if (line->attrs & (F_TFPROMPT)) { - incoming_text = line; + // XXX: This should be cleaner. Adding cast to avoid warning, + // But really we should have a copy function or something, right? + incoming_text = (String *) line; handle_prompt(incoming_text, 0, TRUE); continue; } @@ -2877,7 +2950,6 @@ static void test_prompt(void) static void telnet_subnegotiation(void) { - unsigned int i; char *p; const char *end; char temp_buff[255]; /* Same length as whole subnegotiation line. */ @@ -2944,7 +3016,7 @@ static void telnet_subnegotiation(void) newconverter = ucnv_open(temp_buff, &newconvertererr); /* TODO: Check U_MEMORY_ALLOCATION_ERROR and U_FILE_ACCESS_ERROR */ if (newconverter != NULL) { - p = end; /* Prefer the first valid charset! */ + p = (char *) end; /* Prefer the first valid charset! */ } } if (newconverter != NULL) { @@ -2965,6 +3037,21 @@ static void telnet_subnegotiation(void) } telnet_send(telbuf); break; +#endif +#if ENABLE_ATCP + case TN_ATCP: + do_hook(H_ATCP, NULL, "%s", xsock->subbuffer->data + 3); + break; +#endif +#if ENABLE_GMCP + case TN_GMCP: + do_hook(H_GMCP, NULL, "%s", xsock->subbuffer->data + 3); + break; +#endif +#if ENABLE_OPTION102 + case TN_102: + do_hook(H_OPTION102, NULL, "%s", xsock->subbuffer->data + 3); + break; #endif default: no_reply("unknown option"); @@ -3079,7 +3166,7 @@ char* u_strToUTF8 ( char * dest, */ static int handle_socket_input(const char *simbuffer, int simlen, const char *encoding) { - char rawchar, localchar, inbuffer[BUFFSIZE]; + char rawchar, inbuffer[BUFFSIZE]; const char *incoming, *place; #if HAVE_MCCP char mccpbuffer[BUFFSIZE]; @@ -3091,7 +3178,6 @@ static int handle_socket_input(const char *simbuffer, int simlen, const char *en String *incomingposttelnet; UConverter *incomingFSM = NULL; UErrorCode incomingERR; - int shiftby; #endif if (xsock->constate <= SS_CONNECTING || xsock->constate >= SS_ZOMBIE) @@ -3123,9 +3209,12 @@ static int handle_socket_input(const char *simbuffer, int simlen, const char *en #if HAVE_SSL if (xsock->ssl) { count = SSL_read(xsock->ssl, inbuffer, sizeof(inbuffer)); - if (count == 0 && - SSL_get_error(xsock->ssl, 0) == SSL_ERROR_SYSCALL && - ERR_peek_error() == 0) + if (count == 0 +# if HAVE_ERR_PEEK_ERROR + && SSL_get_error(xsock->ssl, 0) == SSL_ERROR_SYSCALL && + ERR_peek_error() == 0 +# endif + ) { /* Treat a count of 0 with no errors as a normal EOF */ goto eof; @@ -3191,9 +3280,13 @@ static int handle_socket_input(const char *simbuffer, int simlen, const char *en case Z_STREAM_END: /* handle stuff inflated before stream end */ /* NOTE: This could be partway into parsing a character!? */ + /* NOTE: the added if() mentioned being in response to an mccp lockup glitch, + * see if that takes care of the concerns of the above note. + */ count = (char*)xsock->zstream->next_out - mccpbuffer; - received += handle_socket_input(mccpbuffer, count, NULL); - /* prepare to handle noncompressed stuff after stream end */ + if(count > 0) + received += handle_socket_input(mccpbuffer, count, NULL); + /* prepare to handle non-compressed stuff after stream end */ incoming = (char*)xsock->zstream->next_in; count = xsock->zstream->avail_in; /* clean up zstream */ @@ -3247,7 +3340,7 @@ static int handle_socket_input(const char *simbuffer, int simlen, const char *en case TN_SB: if (!(xsock->flags & SOCKTELNET)) { /* Telnet subnegotiation can't happen without a - * previous telnet option negotation, so treat the + * previous telnet option negotiation, so treat the * IAC SB as non-telnet, and disable telnet. */ xsock->flags &= ~SOCKMAYTELNET; place--; @@ -3306,7 +3399,7 @@ static int handle_socket_input(const char *simbuffer, int simlen, const char *en continue; /* avoid non-telnet processing */ } else if (xsock->fsastate == TN_SB) { - if (xsock->subbuffer->len > 255) { + if (xsock->subbuffer->len > RECEIVELIMIT) { /* It shouldn't take this long; server is broken. Abort. */ #if WIDECHAR SStringcat(incomingposttelnet, CS(xsock->subbuffer)); @@ -3366,6 +3459,15 @@ static int handle_socket_input(const char *simbuffer, int simlen, const char *en #if HAVE_MCCP (rawchar == TN_COMPRESS && mccp) || (rawchar == TN_COMPRESS2 && mccp) || +#endif +#if ENABLE_ATCP + (rawchar == TN_ATCP && atcp) || +#endif +#if ENABLE_GMCP + (rawchar == TN_GMCP && gmcp) || +#endif +#if ENABLE_OPTION102 + (rawchar == TN_102 && option102) || #endif rawchar == TN_ECHO || rawchar == TN_SEND_EOR || @@ -3410,6 +3512,9 @@ static int handle_socket_input(const char *simbuffer, int simlen, const char *en } else if ( rawchar == TN_NAWS || rawchar == TN_TTYPE || +#if ENABLE_ATCP + (rawchar == TN_ATCP && atcp) || +#endif rawchar == TN_BINARY) { SET_TELOPT(xsock, us, rawchar); /* set state */ @@ -3535,7 +3640,6 @@ static int handle_socket_input(const char *simbuffer, int simlen, const char *en STATIC_BUFFER(nextline); /* Static for speed */ static void handle_socket_input_queue_lines(Sock *sock) { - String *debug = sock->buffer; char *place; char *bufferend = sock->buffer->data + sock->buffer->len; char rawchar, localchar; @@ -3578,7 +3682,7 @@ static void handle_socket_input_queue_lines(Sock *sock) Stringtrunc(nextline, 0); place = sock->buffer->data - 1; bufferend = sock->buffer->data + sock->buffer->len; - /* other occurances of '\b' are handled by decode_ansi(), so + /* other occurrences of '\b' are handled by decode_ansi(), so * ansi codes aren't clobbered before they're interpreted */ } else { @@ -3799,10 +3903,10 @@ const char *world_info(const char *worldname, const char *fieldname) { World *world; const char *result; - + world = worldname ? find_world(worldname) : xworld(); if (!world) return ""; /* not an error */ - + if (!fieldname || strcmp("name", fieldname) == 0) { result = world->name; } else if (strcmp("type", fieldname) == 0) { diff --git a/src/socket.h b/src/socket.h index 12cfd6f..a75d64b 100644 --- a/src/socket.h +++ b/src/socket.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: socket.h,v 35004.44 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef SOCKET_H #define SOCKET_H @@ -21,7 +20,7 @@ #define CONN_BG 0x08 #define CONN_FG 0x10 -struct World *world_decl; /* declares struct World */ +struct World; /* declares struct World */ extern String *incoming_text; extern int quit_flag; @@ -45,6 +44,15 @@ extern void transmit_window_size(void); extern int local_echo(int flag); extern int handle_send_function(conString *string, const char *world, const char *flags); +#if ENABLE_ATCP +extern int handle_atcp_function(conString *string, const char *world); +#endif +#if ENABLE_GMCP +extern int handle_gmcp_function(conString *string, const char *world); +#endif +#if ENABLE_OPTION102 +extern int handle_option102_function(conString *string, const char *world); +#endif extern int handle_fake_recv_function(conString *string, const char *world, const char *flags); extern int is_connected(const char *worldname); diff --git a/src/tf.1.catman b/src/tf.1.catman index 359fa30..6f19f50 100644 --- a/src/tf.1.catman +++ b/src/tf.1.catman @@ -27,7 +27,7 @@ TF(1) TF(1) learning to use any one function is relatively easy. Because I am continually adding new features and changing the code, TF - sometimes becomes less stable in a new release. Versions labled + sometimes becomes less stable in a new release. Versions labeled "alpha" are generally not as well tested as "beta" versions, so they have the potential for more bugs. For this reason, I leave some older versions at the site where I distribute TF, which do not have all the @@ -127,8 +127,8 @@ TF(1) TF(1) automatically at startup. Two of the most useful commands to use in a TF configuration file are /addworld and /load. - For backward compatability, TF will also try to read the TinyTalk con- - figuration file. Its name defautls to $HOME/.tinytalk, or can be + For backward compatibility, TF will also try to read the TinyTalk con- + figuration file. Its name defaults to $HOME/.tinytalk, or can be defined by the TINYTALK environment variable. This file may start with a list of worlds that will be defined as if with /addworld. @@ -178,17 +178,17 @@ TF(1) TF(1) COPYRIGHT - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2006-2007 - Ken Keys + Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) TinyFugue (aka "tf") is protected under the terms of the GNU General Public License. See the file "COPYING" for details. - TF is currently supported by Ken Keys, who may be contacted by e-mail - at kenkeys@users.sourceforge.net or kkeys@ucsd.edu. + TF was formerly developed by Ken Keys, and he may never fully + understand just how much we appreciate his work. We hope in taking up the + TinyFugue torch that we will honor his legacy. -BACKWARD INCOMPATIBILTIES +BACKWARD INCOMPATIBILITIES VERSION 3.2 /rand has been replaced with rand(). Color names can no longer be user diff --git a/src/tf.1.nroffman b/src/tf.1.nroffman index e8daaca..84617c2 100644 --- a/src/tf.1.nroffman +++ b/src/tf.1.nroffman @@ -1,11 +1,10 @@ -.\" $Id: tf.1.nroffman,v 34000.8 2007/01/13 23:12:39 kkeys Exp $ -.TH TF 1 LOCAL +.TH TF 1 "2021-06-23" "TinyFugue 5.0" "TinyFugue" .SH NAME tf \- TinyFugue, a MUD client .SH SYNOPSIS -.B "tf [-f\fIfile\fB] [-lnq] [\fIworld\fB]" +.B "tf [\-f\fIfile\fB] [\-lnq] [\fIworld\fB]" .br -.B "tf [-f\fIfile\fB] \fIhost\fB \fIport\fB" +.B "tf [\-f\fIfile\fB] \fIhost\fB \fIport\fB" .SH DESCRIPTION \fITinyFugue\fR (also known as "Fugue" or "TF") is a line-based client designed for connecting to MUD servers (note: LP, DIKU, and other servers @@ -28,7 +27,7 @@ any one function is relatively easy. .PP Because I am continually adding new features and changing the code, \fITF\fR sometimes becomes less stable in a new release. -Versions labled "alpha" are generally not as well tested as "beta" versions, +Versions labeled "alpha" are generally not as well tested as "beta" versions, so they have the potential for more bugs. For this reason, I leave some older versions at the site where I distribute \fITF\fR, which do not have all the current @@ -48,15 +47,15 @@ world and try to connect to it. The \fBhost\fR may be an IP number or regular name format. .PP OPTIONS -.IP "-f\fIfile\fR" +.IP "\-f\fIfile\fR" Load \fIfile\fR instead of $HOME/.tfrc at startup. -.IP "-f" +.IP "\-f" Do not load any personal configuration file. The library will still be loaded. -.IP "-l" +.IP "\-l" Disable automatic login. -.IP "-n" +.IP "\-n" Do not connect to any world at startup. -.IP "-q" +.IP "\-q" Quiet login (overrides %{quiet} flag). .SH FEATURES @@ -109,7 +108,7 @@ Log a session to a file. .sp Separate LP and Diku style prompts from normal output. .sp -Page output using a --More-- prompt. +Page output using a \-\-More\-\- prompt. .sp Recall previously received text. @@ -120,16 +119,16 @@ configuration file "stdlib.tf", located in TFLIBDIR. TFLIBDIR is defined when \fITF\fR is installed, and is often /usr/local/lib/tf.lib, or under the home directory of the installer. This library contains many macros -and definitions essential to the correct operation of \fITF.\fR +and definitions essential to the correct operation of \fITF\fR. Next, \fITF\fR will attempt to read your personal configuration file, $HOME/.tfrc, in which you can put any \fITF\fR commands you want executed automatically at startup. Two of the most useful commands to use in a \fITF\fR configuration file are /addworld and /load. -For backward compatability, \fITF\fR will also try +For backward compatibility, \fITF\fR will also try to read the \fITinyTalk\fR configuration file. -Its name defautls to $HOME/.tinytalk, or can be defined by the TINYTALK +Its name defaults to $HOME/.tinytalk, or can be defined by the TINYTALK environment variable. This file may start with a list of worlds that will be defined as if with /addworld. @@ -140,19 +139,19 @@ the first Tinyclient with any great number of features, including hiliting and suppression of text, simple triggers, and separating input and output on the screen. Leo Plotkin (Grod) made rather extensive modifications to \fITinytalk\fR -to produce \fITinywar,\fR which was plagued with some +to produce \fITinywar\fR, which was plagued with some serious bugs and was never officially released (the phrase "Tinywar doesn't exist" is often quoted), and is now an unsupported client. \fITF\fR began when Greg Hudson (Explorer_Bob) merged many of the new -features of \fITinywar\fR back into \fITinyTalk,\fR +features of \fITinywar\fR back into \fITinyTalk\fR, and added many new features of his own, most notably the split screen. Some of the code in Greg's releases was contributed by Leo Plotkin. -After Greg moved on to \fIVaporTalk,\fR Ken Keys (Hawkeye) took over design +After Greg moved on to \fIVaporTalk\fR, Ken Keys (Hawkeye) took over design and maintenance of \fITF\fR in July 1991, and continues to make improvements in features and performance. .PP The code size of \fITF\fR has surpassed 300K (unstripped), -and is signifigantly larger than \fITinytalk.\fR +and is significantly larger than \fITinytalk\fR. It is, in fact, more than three times the size of a number of existing servers. As of version 3.0, it has 66 builtin commands and 57 library commands, each documented in the helpfile. @@ -181,15 +180,15 @@ Post all refused to comment. .SH COPYRIGHT -Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2006-2007 Ken Keys +Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) .sp \fITinyFugue\fR (aka "\fItf\fR") is protected under the terms of the GNU General Public License. See the file "COPYING" for details. .sp -\fITF\fR is currently supported by Ken Keys, who may be contacted by e-mail at -kenkeys@users.sourceforge.net or kkeys@ucsd.edu. +\fITF\fR was formerly developed by Ken Keys, whom we all owe a debt of gratitude. +Hopefully the continuation of his project will bring honor to his legacy. -.SH BACKWARD INCOMPATIBILTIES +.SH BACKWARD INCOMPATIBILITIES .PP VERSION 3.2 .PP @@ -225,8 +224,8 @@ default macro library. .PP The .tinytalk file may not be supported in the future; use .tfrc instead. .PP -The '-' command line option in versions prior to 2.0 is no longer supported, -and has been replaced with '-l'. +The '\-' command line option in versions prior to 2.0 is no longer supported, +and has been replaced with '\-l'. .SH BUGS .PP diff --git a/src/tf.h b/src/tf.h index 59b34e7..352b824 100644 --- a/src/tf.h +++ b/src/tf.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: tf.h,v 35004.59 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef TF_H #define TF_H diff --git a/src/tfconfig.h.in b/src/tfconfig.h.in index 57bc743..db38393 100644 --- a/src/tfconfig.h.in +++ b/src/tfconfig.h.in @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: tfconfig.h.in,v 35004.36 2007/01/13 23:12:39 kkeys Exp $ */ /* This file must not have trailing carriage returns on lines: they will * confuse configure. (With autoconf 2.13, a trailing space and comment @@ -16,7 +15,6 @@ #define PLATFORM_UNIX 1 #undef MAILDIR -#undef RETSIGTYPE #undef pid_t #undef size_t #undef time_t @@ -37,10 +35,12 @@ #define HAVE_LIBZ 0 #define SOCKS 0 #define HAVE_SSL 0 +#define HAVE_GNUTLS_OPENSSL_H 0 #define HAVE_BCOPY 0 #define HAVE_BZERO 0 #define HAVE_CONNECT 0 +#define HAVE_ERR_PEEK_ERROR 0 #define HAVE_FILENO 0 #define HAVE_GETCWD 0 #define HAVE_GETHOSTBYNAME 0 @@ -89,12 +89,18 @@ #define HAVE_GAI_STRERROR 0 #define ENABLE_INET6 0 #define DISABLE_CORE 0 -#undef IN6_ADDR +#undef IN6_ADDR #define NO_HISTORY 0 #define NO_PROCESS 0 #define NO_FLOAT 0 #define NCOLORS 16 #define WIDECHAR 0 +#define USE_DMALLOC 0 +#define USE_MMALLOC 0 + +#define ENABLE_ATCP 0 +#define ENABLE_GMCP 0 +#define ENABLE_OPTION102 0 #define HAVE_MCCP (HAVE_ZLIB_H && HAVE_LIBZ) diff --git a/src/tfdefs.h.in b/src/tfdefs.h.in index 40fd848..507342f 100644 --- a/src/tfdefs.h.in +++ b/src/tfdefs.h.in @@ -1,13 +1,12 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 2001-2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: tfdefs.h.in,v 35004.8 2007/01/13 23:12:39 kkeys Exp $ */ -#define UNAME "@UNAME@" +#define UNAME "generic" #define stringify_token(s) #s #define stringify_value(s) stringify_token(s) #define DEFAULT_TFLIBD stringify_value(DATADIR) "/@LIBNAME@" diff --git a/src/tfio.c b/src/tfio.c index 1c56fbd..cc2ae51 100644 --- a/src/tfio.c +++ b/src/tfio.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: tfio.c,v 35004.114 2007/01/13 23:12:39 kkeys Exp $"; /*********************************** @@ -46,6 +45,7 @@ static const char RCSid[] = "$Id: tfio.c,v 35004.114 2007/01/13 23:12:39 kkeys E #include "keyboard.h" /* keyboard_pos */ #include "expand.h" /* current_command */ #include "cmdlist.h" +#include "socket.h" /* main_loop() */ TFILE *loadfile = NULL; /* currently /load'ing file */ int loadline = 0; /* line number in /load'ing file */ @@ -87,7 +87,7 @@ void init_tfio(void) tfalert = tfopen("", "q"); tfalert->mode = S_IWUSR; - fg_screen = default_screen = new_screen(1000/*XXX make configurable*/); + fg_screen = default_screen = new_screen(1000/*XXX make configurable*/); } /* tfname @@ -528,7 +528,7 @@ void vSprintf(String *buf, int flags, const char *fmt, va_list ap) * then va_start or using va_copy. This * doesn't appear to be a problem on 32 bit systems * but causes problems on 64 bit systems. - * In this case, va_copy is used since I'm usure + * In this case, va_copy is used since I'm unsure * if the program relies on ap staying constant * or not. It appears to work fine, but YMMV. * Also there is a fallback since va_copy doesn't @@ -699,7 +699,8 @@ void Sappendf(String *buf, const char *fmt, ...) void eprefix(String *buffer) { extern char current_opt; - Stringcpy(buffer, "% "); + Stringcat(buffer, error_prefix); + Stringcat(buffer, " "); if (loadfile) { Sappendf(buffer, "%s, line", loadfile->name); if (loadstart == loadline) @@ -793,7 +794,7 @@ char igetchar(void) int tfreadable(TFILE *file) { if (!file) { - return 1; /* tfread will imeediately return error */ + return 1; /* tfread will immediately return error */ } else if (file == tfkeyboard) { return 0; /* tfread will not return immediately */ diff --git a/src/tfio.h b/src/tfio.h index e47d4b0..d44bba4 100644 --- a/src/tfio.h +++ b/src/tfio.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: tfio.h,v 35004.66 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef TFIO_H #define TFIO_H diff --git a/src/tfselect.h b/src/tfselect.h index a11373c..1c9bc88 100644 --- a/src/tfselect.h +++ b/src/tfselect.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: tfselect.h,v 35000.15 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef TFSELECT_H #define TFSELECT_H diff --git a/src/tty.c b/src/tty.c index 2eb95a9..5c53733 100644 --- a/src/tty.c +++ b/src/tty.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: tty.c,v 35004.38 2007/01/13 23:12:39 kkeys Exp $"; /* * TTY driver routines. @@ -142,7 +141,7 @@ void init_tty(void) * so we'll ignore anything that isn't a control character. */ if (is_cntrl(*bs) && *bs && *bs != '\b' && *bs != '\177') - add_ibind(bs, "/DOKEY BSPC"); + add_ibind(bs, "/DOKEY BSPC"); if (is_cntrl(*bword) && *bword) add_ibind(bword, "/DOKEY BWORD"); /* if (is_cntrl(*dline) && *dline) add_ibind(dline, "/DOKEY DLINE"); */ if (is_cntrl(*refresh) && *refresh) add_ibind(refresh, "/DOKEY REFRESH"); diff --git a/src/tty.h b/src/tty.h index b16cf64..7c4c98b 100644 --- a/src/tty.h +++ b/src/tty.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: tty.h,v 35004.15 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef TTY_H #define TTY_H diff --git a/src/util.c b/src/util.c index 3a1d9ad..045d313 100644 --- a/src/util.c +++ b/src/util.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: util.c,v 35004.150 2007/01/13 23:12:39 kkeys Exp $"; /* @@ -36,6 +35,10 @@ static const char RCSid[] = "$Id: util.c,v 35004.150 2007/01/13 23:12:39 kkeys E #include "variable.h" #include "parse.h" /* for expression in nextopt() numeric option */ +#if HAVE_SETLOCALE +static char *lang = NULL; +#endif + typedef struct mail_info_s { /* mail file information */ char *name; /* file name */ int flag; /* new mail? */ @@ -233,7 +236,7 @@ char *cstrchr(register const char *s, register int c) } #endif -/* c may be escaped by preceeding it with e */ +/* c may be escaped by preceding it with e */ char *estrchr(register const char *s, register int c, register int e) { while (*s) { @@ -302,7 +305,7 @@ int nullcstrcmp(const char *s, const char *t) } /* numarg - * Converts argument to a nonnegative integer. Returns -1 for failure. + * Converts argument to a non-negative integer. Returns -1 for failure. * The *str pointer will be advanced to beginning of next word. */ int numarg(const char **str) @@ -406,7 +409,7 @@ char *stripstr(char *s) *arg; an integer argument is returned in *num; a time argument is returned in *tvp. If end of options is reached, nextopt returns '\0'. " - " or " -- " marks the end of options, and is consumed. "\0", "=", or a word not - beggining with "-" marks the end of options, and is not consumed. If an + beginning with "-" marks the end of options, and is not consumed. If an invalid option is encountered, an error message is printed and '?' is returned. diff --git a/src/util.h b/src/util.h index a660eb2..57a36f3 100644 --- a/src/util.h +++ b/src/util.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: util.h,v 35004.63 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef UTIL_H #define UTIL_H diff --git a/src/variable.c b/src/variable.c index 2366cb8..1daca33 100644 --- a/src/variable.c +++ b/src/variable.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: variable.c,v 35004.110 2007/01/13 23:12:39 kkeys Exp $"; /************************************** @@ -203,7 +202,7 @@ void init_variables(void) set_special_var(var, &value, 0, 0); /* We do NOT call the var->func here, because the modules they * reference have not been initialized yet. The init_*() calls - * in main.c should call the funcs in the appropraite order. + * in main.c should call the funcs in the appropriate order. */ } else { /* Shouldn't happen unless environment contained same name twice */ @@ -796,7 +795,7 @@ void freevar(Var *var) /*********/ -/* Set a special variable, with proper coersion of the value. */ +/* Set a special variable, with proper coercion of the value. */ static int set_special_var(Var *var, Value *value, int funcflag, int exportflag) { diff --git a/src/variable.h b/src/variable.h index 9761f6a..d203369 100644 --- a/src/variable.h +++ b/src/variable.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: variable.h,v 35004.40 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef VARIABLE_H #define VARIABLE_H diff --git a/src/varlist.h b/src/varlist.h index 7e26562..32bb303 100644 --- a/src/varlist.h +++ b/src/varlist.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: varlist.h,v 35000.78 2007/01/13 23:12:39 kkeys Exp $ */ /* This keeps the constants and the array in the same place, so they can't * get out of sync. @@ -43,6 +42,13 @@ varstr (VAR_TFPATH, "TFPATH", NULL, NULL) varstrx(VAR_TZ, "TZ", NULL, ch_timezone) varstr (VAR_alert_attr, "alert_attr", "Br", ch_attr) vartime(VAR_alert_time, "alert_time", 5,0, NULL) +varflag(VAR_ansi_log, "ansi_log", FALSE, NULL) +#if ENABLE_ATCP +varflag(VAR_atcp, "atcp", TRUE, NULL) +#else +varenum(VAR_atcp, "atcp", FALSE, NULL, enum_off) +#endif +varenum(VAR_async_name, "gethostbyname",TRUE, NULL, enum_block) #if 0 varflag(VAR_auto_fg, "auto_fg", FALSE, NULL) #endif @@ -64,14 +70,19 @@ varenum(VAR_async_conn, "connect", TRUE, NULL, enum_block) varflag(VAR_defcompile, "defcompile", FALSE, NULL) varenum(VAR_emulation, "emulation", EMUL_ANSI_ATTR, NULL, enum_emul) varstr (VAR_error_attr, "error_attr", NULL, ch_attr) +varstr (VAR_error_prefix,"error_prefix","%", NULL) varflag(VAR_expand_tabs,"expand_tabs", TRUE, NULL) varflag(VAR_expnonvis, "expnonvis", FALSE, ch_expnonvis) varflag(VAR_gag, "gag", TRUE, NULL) -varenum(VAR_async_name, "gethostbyname",TRUE, NULL, enum_block) +#if ENABLE_GMCP +varflag(VAR_gmcp, "gmcp", TRUE, NULL) +#else +varenum(VAR_gmcp, "gmcp", FALSE, NULL, enum_off) +#endif varint (VAR_gpri, "gpri", 0, NULL) varflag(VAR_hilite, "hilite", TRUE, NULL) varstr (VAR_hiliteattr, "hiliteattr", "B", ch_attr) -varpos (VAR_histsize, "histsize", 1000, NULL) +varpos (VAR_histsize, "histsize", 5000, NULL) varflag(VAR_hook, "hook", TRUE, NULL) varint (VAR_hpri, "hpri", 0, NULL) varenum(VAR_iecho, "iecho", 0, NULL, enum_mecho) @@ -88,6 +99,8 @@ varflag(VAR_keepalive, "keepalive", TRUE, tog_keepalive) varflag(VAR_keypad, "keypad", FALSE, tog_keypad) varstr (VAR_kprefix, "kprefix", NULL, NULL) varflag(VAR_login, "login", TRUE, NULL) +varstr (VAR_log_prefix, "log_prefix", FALSE, NULL) +varstr (VAR_log_time_format,"log_time_format","%H:%M:%S",NULL) varflag(VAR_lp, "lp", FALSE, tog_lp) varflag(VAR_lpquote, "lpquote", FALSE, ch_lpquote) vartime(VAR_maildelay, "maildelay", 60,0, ch_maildelay) @@ -108,7 +121,13 @@ varenum(VAR_meta_esc, "meta_esc", META_NONPRINT, NULL, enum_meta) varflag(VAR_more, "more", FALSE, tog_more) varstr (VAR_mprefix, "mprefix", "+", NULL) varflag(VAR_oldslash, "oldslash", TRUE, NULL) +varflag(VAR_oldunnamed, "oldunnamed", FALSE, NULL) varflag(VAR_optimize, "optimize", TRUE, NULL) +#if ENABLE_OPTION102 +varflag(VAR_option102, "option102", TRUE, NULL) +#else +varenum(VAR_option102, "option102", FALSE, NULL, enum_off) +#endif varflag(VAR_pedantic, "pedantic", FALSE, NULL) varstr (VAR_prompt_sec, "prompt_sec", NULL, obsolete_prompt) varstr (VAR_prompt_usec,"prompt_usec", NULL, obsolete_prompt) diff --git a/src/vars.mak b/src/vars.mak index ef4e85d..d82a415 100644 --- a/src/vars.mak +++ b/src/vars.mak @@ -1,7 +1,6 @@ -# $Id: vars.mak,v 1.58 2007/01/13 23:12:39 kkeys Exp $ ######################################################################## # TinyFugue - programmable mud client -# Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) # # TinyFugue (aka "tf") is protected under the terms of the GNU # General Public License. See the file "COPYING" for details. @@ -19,11 +18,8 @@ TFVER=50b8 SOURCE = attr.c command.c dstring.c expand.c expr.c help.c history.c \ - keyboard.c macro.c main.c malloc.c output.c process.c search.c \ + keyboard.c macro.c main.c malloc.c output.c pattern.c process.c search.c \ signals.c socket.c tfio.c tty.c util.c variable.c world.c -OBJS = attr.$O command.$O dstring.$O expand.$O expr.$O help.$O history.$O \ - keyboard.$O macro.$O main.$O malloc.$O output.$O pattern.$O process.$O \ - search.$O signals.$O socket.$O tfio.$O tty.$O util.$O variable.$O world.$O \ - $(OTHER_OBJS) +OBJS = $(subst .c,.$O,$(SOURCE)) $(OTHER_OBJS) diff --git a/src/world.c b/src/world.c index f2a8346..5178bd5 100644 --- a/src/world.c +++ b/src/world.c @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -static const char RCSid[] = "$Id: world.c,v 35004.77 2007/01/13 23:12:39 kkeys Exp $"; /******************************************************** @@ -147,7 +146,11 @@ World *new_world(const char *name, const char *type, if (name) { result->name = STRDUP(name); } else { - sprintf(buffer, "(unnamed%d)", unnamed++); + if (oldunnamed) { + sprintf(buffer, "(unnamed%d)", unnamed++); + } else { + sprintf(buffer, "unnamed%d", unnamed++); + } result->name = STRDUP(buffer); } diff --git a/src/world.h b/src/world.h index 6cafe95..749ec9c 100644 --- a/src/world.h +++ b/src/world.h @@ -1,11 +1,10 @@ /************************************************************************* * TinyFugue - programmable mud client - * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys + * Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) * * TinyFugue (aka "tf") is protected under the terms of the GNU * General Public License. See the file "COPYING" for details. ************************************************************************/ -/* $Id: world.h,v 35004.32 2007/01/13 23:12:39 kkeys Exp $ */ #ifndef WORLD_H #define WORLD_H diff --git a/tf-lib/README b/tf-lib/README index 982f59a..8ec8cf1 100644 --- a/tf-lib/README +++ b/tf-lib/README @@ -2,7 +2,12 @@ The *.tf files in this directory contain many interesting and useful macros. Some are quite useful, others illustrate useful macro -programming techinques. Any of the *.tf files can be loaded directly +programming techniques. Any of the *.tf files can be loaded directly with /load. Read the comments at the top of each file for specific instructions. +============================================================================= + +Newly added: + + utilities.tf - The TF Mailing List's library of missing functions. diff --git a/tf-lib/examples.old b/tf-lib/examples.old index 9374445..d80a6e8 100644 --- a/tf-lib/examples.old +++ b/tf-lib/examples.old @@ -8,7 +8,7 @@ used, and as a tutorial in the use of these features. The examples given here are intended to be used with /load. When a file is read with /load, lines beginning with ';' are ignored, and -lines ending with '\' will have the following line appened to it after +lines ending with '\' will have the following line append to it after leading spaces are stripped. For reference, OUTPUTPREFIX and OUTPUTSUFFIX are MUD commands that set @@ -19,7 +19,7 @@ it only functions once. (This is the "-1" switch.) A note: The OUTPUTPREFIX and OUTPUTSUFFIX commands are not supported on all MUDs. There are other, somewhat less reliable methods for -prefixing and sufixing commands that may be utilized by the reader. +prefixing and suffixing commands that may be utilized by the reader. The priority numbers used in here have no special meaning; a priority of 50 is used for triggers that continually exist (this is @@ -56,7 +56,7 @@ First, TF substitutes for newlines. Every sequences "%;" is changed into a newline. The %%; sequences are left alone. Thus the two commands "/def watch_%1..." and "/repeat..." are processed separately. -Second, TF checks for reentrant commands. Both lines contain commands, +Second, TF checks for re-entrant commands. Both lines contain commands, so these are all processed. Before they are processed, two things occur: first, all multiple "/" sequences are compressed by one, and second, argument substitution is done. The "%1"s are substituted with @@ -100,7 +100,7 @@ After all substitutions, TF comes up with the following commands: /def -p101 -ag -t"chup *" watch_tmp2_chup = /echo chup is connected. /def -p101 -1 -ag -t"" = /purgedef watch_tmp?_chup -Control is then returned to the main progam. All following lines are +Control is then returned to the main program. All following lines are gagged, so the user does not see the WHO list. Any line beginning with "chup *" will set off the command /echo chup is connected., informing you that he is online. The line "" marks the end of the WHO list, @@ -219,7 +219,7 @@ This is one way to set up a "silent" autoreturn. It can't be spoofed by people who don't know what the room you live in is. (Note that since the "" and "" triggers remain on all the time, it may be best to change these to something secret in -odrer to keep people from being able to spoof you into gagging +order to keep people from being able to spoof you into gagging everything.) When killed, you see only the lines " killed you!" and " Returned." @@ -248,7 +248,7 @@ This macro, assuming you have the /pmcmd macro set up properly and the triggers to gag command output (the last two lines from the autoreturn example) will allow you to move around within a MUD without seeing the resulting output. This is useful for -commonly-travelled paths. While the macro looks very simple, it +commonly-traveled paths. While the macro looks very simple, it actually nests several levels. diff --git a/tf-lib/grep.tf b/tf-lib/grep.tf index 509572a..9c7a210 100644 --- a/tf-lib/grep.tf +++ b/tf-lib/grep.tf @@ -5,7 +5,7 @@ ; Note: users should not rely on %_loaded_libs like this. I can get away ; with this here only because this and /loaded are both internal to TF. /if (_loaded_libs =/ "*{__TFLIB__/textutil.tf}*") \ - /echo -e %% Warning: textutil.tf and grep.tf have conflicting defintions.%;\ + /echo -e %% Warning: textutil.tf and grep.tf have conflicting definitions.%;\ /endif diff --git a/tf-lib/kbbind.tf b/tf-lib/kbbind.tf index b3797e3..7455358 100644 --- a/tf-lib/kbbind.tf +++ b/tf-lib/kbbind.tf @@ -349,7 +349,7 @@ /def -i key_ctrl_home = /dokey_recallbeg /def -i key_ctrl_end = /dokey_recallend -/def -i key_ctrl_pgup = /reserved_for_future_use (scroll to first screenful) +/def -i key_ctrl_pgup = /reserved_for_future_use (scroll to first screenfull) /def -i key_ctrl_pgdn = /dokey_flush /def -i key_bspc = /dokey_bspc diff --git a/tf-lib/kbfunc.tf b/tf-lib/kbfunc.tf index eceba2c..239f787 100644 --- a/tf-lib/kbfunc.tf +++ b/tf-lib/kbfunc.tf @@ -3,7 +3,7 @@ ;;; /kb_backward_kill_line delete from cursor to beginning of line ;;; /kb_kill_word delete from cursor to end of punctuated word ;;; /kb_backward_kill_word delete from cursor to start of punctuated word -;;; /kb_capitalize_word capitialize current word +;;; /kb_capitalize_word capitalize current word ;;; /kb_downcase_word convert current word to lowercase ;;; /kb_upcase_word convert current word to uppercase ;;; /kb_transpose_chars swap current character with previous character diff --git a/tf-lib/local-eg.tf b/tf-lib/local-eg.tf index 15a6f2d..b8719fc 100644 --- a/tf-lib/local-eg.tf +++ b/tf-lib/local-eg.tf @@ -1,5 +1,3 @@ -;;; $Id: local-eg.tf,v 35000.4 1998/06/17 05:38:12 hawkeye Exp $ - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; TF local library ;;; This file is not required, but contains some examples of commands diff --git a/tf-lib/map.tf b/tf-lib/map.tf index 2c77b11..3830c4e 100644 --- a/tf-lib/map.tf +++ b/tf-lib/map.tf @@ -13,7 +13,7 @@ ;;; /savepath Create a macro to execute the current path. ;;; Note: macro is not written to a file. ;;; /unpath Remove the last movement from the path. -;;; /unmark Disable maping. +;;; /unmark Disable mapping. ;;; /dopath Execute , where is a space-separated list ;;; of commands with optional repeat counts. E.g., ;;; "/dopath 10 n 3 e d 2 w" will execute "n" 10 diff --git a/tf-lib/spedwalk.tf b/tf-lib/spedwalk.tf index 72d7b69..709db7a 100644 --- a/tf-lib/spedwalk.tf +++ b/tf-lib/spedwalk.tf @@ -4,7 +4,7 @@ ;;;; containing only numbers and the letters "n", "s", "e", "w", "u", and ;;;; "d" are interpreted by speedwalk; other lines are left alone (of course, ;;;; to guarantee that lines don't get interpreted, you should turn speedwalk -;;;; off). Each letter is sent individually; if it is preceeded by a number, +;;;; off). Each letter is sent individually; if it is preceded by a number, ;;;; it will be repeated that many times. For example, with speedwalk ;;;; enabled, typing "ne3ses" will send "n", "e", "s", "s", "s", "e", "s". diff --git a/tf-lib/stdlib.tf b/tf-lib/stdlib.tf index 86a16be..67ba2c2 100644 --- a/tf-lib/stdlib.tf +++ b/tf-lib/stdlib.tf @@ -1,13 +1,11 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; TinyFugue - programmable mud client -;;;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +;;;; Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) ;;;; ;;;; TinyFugue (aka "tf") is protected under the terms of the GNU ;;;; General Public License. See the file "COPYING" for details. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -/set tf_stdlib_id=$Id: stdlib.tf,v 35000.92 2007/01/13 23:12:39 kkeys Exp $ - ;;; TF macro library ;;; DO NOT EDIT THIS FILE. @@ -226,10 +224,10 @@ /set hilite=0%;\ /endif -;; macro existance test. +;; macro existence test. /def -i ismacro = /test tfclose("o")%; /@list -s -i %{*-@} -;; variable existance test. +;; variable existence test. /def -i isvar = /test tfclose("o")%; /listvar -msimple -- %* @@ -633,14 +631,21 @@ /def -ip2 -ah -mregexp -t'^[^ ]* whispers,? ".*" (to [^ ]*)?$$' ~hilite_whisper1 /def -i hilite_page = \ - /def -ip2 -ah -mglob -t'{*} pages from *[,:] *' ~hilite_page1%;\ - /def -ip2 -ah -mglob -t'You sense that {*} is looking for you in *' ~hilite_page2%;\ - /def -ip2 -ah -mglob -t'The message was: *' ~hilite_page3%;\ - /def -ip2 -ah -mglob -t'{*} pages[,:] *' ~hilite_page4%;\ - /def -ip2 -ah -mglob -t'In a page-pose*' ~hilite_page5 - -/def -i nohilite_whisper = /purge -mglob -I ~hilite_whisper[1-9] -/def -i nohilite_page = /purge -mglob -I ~hilite_page[1-9] + /def -ip2 -ah -mregexp -t'^(.+ pages? from .+[:,] .+' ~hilite_page1%; \ +; Not actually a page, but being kept in for now for compatibility. + /def -ip2 -ah -mregexp -t'^(You sense that .+ is looking for you in) .+' ~hilite_page2%; \ + /def -ip2 -ah -mregexp -t'^(The message was:) .+ ' ~hilite_page3%; \ + /def -ip2 -ah -mregexp -t'^(.+ pages[:,]) .+' ~hilite_page4%; \ + /def -ip2 -ah -mregexp -t'^(In a page-pose).+' ~hilite_page5%; \ + /def -ip2 -ah -mregexp -t'^(You paged,) .+' ~hilite_page6%; \ + /def -ip2 -ah -mregexp -t'^(You paged .+ with) .+' ~hilite_page7%; \ + /def -ip2 -ah -mregexp -t'^(From afar[:,]) .+' ~hilite_page9%; \ + /def -ip2 -ah -mregexp -t'^(Long distance to) .+' ~hilite_page10%; \ + /def -ip2 -ah -mregexp -t'^(To \(.+\), .+ pages:) .+' ~hilite_page11%; \ + /def -ip2 -ah -mregexp -t'^(To \(.+\) From Afar:, .+ pages:) .+' ~hilite_page12 + +/def -i nohilite_whisper = /purge -mregexp -I ~hilite_whisper[1-12] +/def -i nohilite_page = /purge -mregexp -I ~hilite_page[1-12] ;;; backward compatible commands diff --git a/tf-lib/textutil.tf b/tf-lib/textutil.tf index 956c9af..a768698 100644 --- a/tf-lib/textutil.tf +++ b/tf-lib/textutil.tf @@ -6,7 +6,7 @@ ; Note: users should not rely on %_loaded_libs like this. I can get away ; with this here only because this and /loaded are both internal to TF. /if (_loaded_libs =/ "*{__TFLIB__/grep.tf}*") \ - /echo -e %% Warning: textutil.tf and grep.tf have conflicting defintions.%;\ + /echo -e %% Warning: textutil.tf and grep.tf have conflicting definitions.%;\ /endif /require lisp.tf diff --git a/tf-lib/tf-help b/tf-lib/tf-help index aaa67f0..d672620 100644 --- a/tf-lib/tf-help +++ b/tf-lib/tf-help @@ -3,111 +3,111 @@ addworld() - Function usage: + Function usage: - ADDWORLD(<name>, <type>, [<host>, <port> [, <char>, <pass> [, <file> [, + ADDWORLD(<name>, <type>, [<host>, <port> [, <char>, <pass> [, <file> [, <flags> [, <srchost>]]]]]) - Command usage: + Command usage: - /ADDWORLD [-pxe] [-T<type>] [-s<srchost>] <name> [<char> <pass>] <host> + /ADDWORLD [-pxe] [-T<type>] [-s<srchost>] <name> [<char> <pass>] <host> <port> [<file>] /ADDWORLD [-T<type>] [-s<srchost>] <name> /ADDWORLD [-T<type>] DEFAULT [<char> <pass> [<file>]] ____________________________________________________________________________ - Defines a new world or redefines an existing world with the name <name>. - <Name> may not contain spaces; addtionally, when defining a new world, - <name> may not begin with "(". - - <Host> is a server's internet hostname, IPv4 address, or (if your platform - supports it) IPv6 address. <Port> is the number or name of a TCP port on - the host. If <host> and <port> 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 world named "default" which does not have a <host> or - <port>. If a normal world is defined without a <character>, <pass>, <type>, - or <mfile>, then that world will use the corresponding field of the - "default" world if there is one. If the "default" world is redefined, - worlds with omitted fields will use the new default values. - - In function form, <flags> 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 <flags> has the same effect as "p", and an "n" or "1" in - <flags> has no effect. - - Options: - command: -p - function: <flags> contains "p" - %{proxy_host} will be ignored, and all connections to the world will - be direct. By default, worlds use %{proxy_host} if it is set. - command: -x - function: <flags> contains "x" - TF will use the SSL protocol to make connections to this world. - command: -e - function: <flags> 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<srchost> - function: <srchost> - 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<type> - function: <type> - The optional <type> is used in hooks and triggers, and for automatic - login and flag setting. (See below.) - - The library pre-defines WORLD and LOGIN hooks for types that match these - glob patterns: - - (none) TinyMud login format ("connect <char> <pass>"), the value of lp is - not changed. - - tiny, tiny.* - TinyMud login format ("connect <char> <pass>"), lp=off. - - lp, lp.* - diku, diku.* - aber, aber.* - LP/Diku login format (sends <char> and <pass> on separate lines), - lp=on. For servers that send unterminated prompts. - - lpp, lpp.* - LP/Diku login format, lp=off. For muds that use GOAHEAD or EOR - prompt protocol. - - telnet, telnet.* - Telnet login format (sends <char> and <pass> when "login:" and - "password:" prompts are received), lp=on, /localecho 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 glob patterns above, the standard library hooks - will still work. For example, if you did: + Defines a new world or redefines an existing world with the name <name>. + <Name> may not contain spaces; additionally, when defining a new world, + <name> may not begin with "(". + + <Host> is a server's internet hostname, IPv4 address, or (if your platform + supports it) IPv6 address. <Port> is the number or name of a TCP port on + the host. If <host> and <port> 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 world named "default" which does not have a <host> or + <port>. If a normal world is defined without a <character>, <pass>, <type>, + or <mfile>, then that world will use the corresponding field of the + "default" world if there is one. If the "default" world is redefined, + worlds with omitted fields will use the new default values. + + In function form, <flags> is a string of 0 or more letters that modify the + behavior of the function. For compatibility with older versions of TF, an + "f" or "0" in <flags> has the same effect as "p", and an "n" or "1" in + <flags> has no effect. + + Options: + command: -p + function: <flags> contains "p" + %{proxy_host} will be ignored, and all connections to the world will + be direct. By default, worlds use %{proxy_host} if it is set. + command: -x + function: <flags> contains "x" + TF will use the SSL protocol to make connections to this world. + command: -e + function: <flags> 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<srchost> + function: <srchost> + 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<type> + function: <type> + The optional <type> is used in hooks and triggers, and for automatic + login and flag setting. (See below.) + + The library pre-defines WORLD and LOGIN hooks for types that match these + glob patterns: + + (none) TinyMUD login format ("connect <char> <pass>"), the value of lp is + not changed. + + tiny, tiny.* + TinyMUD login format ("connect <char> <pass>"), lp=off. + + lp, lp.* + diku, diku.* + aber, aber.* + LP/Diku login format (sends <char> and <pass> on separate lines), + lp=on. For servers that send unterminated prompts. + + lpp, lpp.* + LP/Diku login format, lp=off. For MUDs that use GOAHEAD or EOR + prompt protocol. + + telnet, telnet.* + Telnet login format (sends <char> and <pass> when "login:" and + "password:" prompts are received), lp=on, /localecho 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 glob patterns above, the standard library hooks + will still work. For example, if you did: /test addworld("Cave", "tiny.muck.", "cave.tcp.com", 2283, <char>, <pass>) /test addworld("Foo", "tiny.muck.msp.", "foo.com", 9999, <char>, <pass>) /test addworld("Cow", "tiny.moo.", "cow.com", 8267, <char>, <pass>) /test addworld("Buzz", "tiny.moo.msp.", "buzz.org", 8267, <char>, <pass>) - then tiny-style autologin would still work (using the library hooks), and - you could also define your own triggers and hooks specific to TinyMUCKs or - TinyMOOs (e.g., "/def -Ttiny.muck.*") or to worlds that support MSP - regardless of their server type (e.g., "/def -T*.msp.*"), etc. Note the - trailing period on the world type defintions, which make it easier to write - matching triggers. + then tiny-style autologin would still work (using the library hooks), and + you could also define your own triggers and hooks specific to TinyMUCKs or + TinyMOOs (e.g., "/def -Ttiny.muck.*") or to worlds that support MSP + regardless of their server type (e.g., "/def -T*.msp.*"), etc. Note the + trailing period on the world type definitions, which make it easier to write + matching triggers. - Any <type> is valid, but is only useful if it is matched by a "-T<type>" - option of a hook or trigger. + Any <type> is valid, but is only useful if it is matched by a "-T<type>" + option of a hook or trigger. - If addworld() 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. + If addworld() 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: worlds, /connect, /fg, /unworld, /edworld, /telnet + See: worlds, /connect, /fg, /unworld, /edworld, /telnet &/addtiny &/addlp @@ -117,18 +117,18 @@ addworld() /add<worldtype> - The comamnds /addtiny, /addlp, /addlpp, /adddiku, and /addtelnet take the - same arguments as /addworld, and also give that world a type. A world's - type determines the format for automatic login and flag settings. + The comamnds /addtiny, /addlp, /addlpp, /adddiku, and /addtelnet take the + same arguments as /addworld, and also give that world a type. A world's + type determines the format for automatic login and flag settings. - See: /addworld + See: /addworld &/alias &/unalias /alias - Usage: + Usage: /REQUIRE alias.tf @@ -137,111 +137,111 @@ addworld() /PURGEALIAS ____________________________________________________________________________ - With no arguments, /alias lists all aliases. With a <name> argument, /alias - lists the alias with names that match the glob pattern <name>. Otherwise, - /alias defines <name> as an alias for <command>. + With no arguments, /alias lists all aliases. With a <name> argument, /alias + lists the alias with names that match the glob pattern <name>. Otherwise, + /alias defines <name> as an alias for <command>. - /Unalias undefines an alias for <name> that was defined with /alias. + /Unalias undefines an alias for <name> that was defined with /alias. - /Purgealias undefines all aliases defined with /alias. Note that - /purgealias does not take a pattern argument. + /Purgealias undefines all aliases defined with /alias. Note that + /purgealias does not take a pattern argument. - To use an alias, just type its name followed by any optional arguments. - Unlike macros defined with /def, you do not type '/' before <name> to - execute an alias. Argument substitution in aliases works the same as in - macros. + To use an alias, just type its name followed by any optional arguments. + Unlike macros defined with /def, you do not type '/' before <name> to + execute an alias. Argument substitution in aliases works the same as in + macros. - As of 3.5 alpha 11, aliases can be called from other aliases or macros. To - send a line of text to the server without alias calls, use send(). If an - old alias that used to work now results in "Too many recursions", you need - to rewrite the alias to use send(). + As of 3.5 alpha 11, aliases can be called from other aliases or macros. To + send a line of text to the server without alias calls, use send(). If an + old alias that used to work now results in "Too many recursions", you need + to rewrite the alias to use send(). - Using /def instead of /alias is recommended. + Using /def instead of /alias is recommended. - See: /def, macros, substitution, tfrc + See: /def, macros, substitution, tfrc &/at /at - Usage: + Usage: /AT [-v] [<date>] <time> <commands> ____________________________________________________________________________ - <Commands> will be executed at <date> and <time>. <Date> must be of the - form "<year>-<month>-<day>" or "<month>-<day>", where <year> may be 2 or 4 - digits. <Time> must be of the form "<hours>:<minutes>" or - "<hours>:<minutes>:<seconds>", where <hours> is between 0 and 23, and - <seconds> may be specified to the nearest microsecond. If any part of the - date is omitted, it defaults to the nearest value for which <date> and - <time> 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. + <Commands> will be executed at <date> and <time>. <Date> must be of the + form "<year>-<month>-<day>" or "<month>-<day>", where <year> may be 2 or 4 + digits. <Time> must be of the form "<hours>:<minutes>" or + "<hours>:<minutes>:<seconds>", where <hours> is between 0 and 23, and + <seconds> may be specified to the nearest microsecond. If any part of the + date is omitted, it defaults to the nearest value for which <date> and + <time> 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. - Options: - -v verbose: prints full date and time + Options: + -v verbose: prints full date and time - Examples: + Examples: /at 04-01 00:00:00 /echo Happy April Fools Day! /def lunch_reminder = /at 12:00 /echo Lunchtime!%%; /lunch_reminder - See: processes, /repeat, /quote + See: processes, /repeat, /quote &/bamf /bamf - Usage: + Usage: /BAMF [OFF|ON|OLD] ____________________________________________________________________________ - Sets the flag %{bamf}. 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. + Sets the flag %{bamf}. 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: + How it works: A "portal" is text sent by a server of the form: - #### Please reconnect to <name>@<addr> (<host>) port <port> #### + #### Please reconnect to <name>@<addr> (<host>) port <port> #### - For example: + For example: - #### Please reconnect to Islandia@128.100.102.51 (hawkwind.utcs.toronto.edu) port 2323 #### + #### Please reconnect to Islandia@128.100.102.51 (hawkwind.utcs.toronto.edu) port 2323 #### - If %{bamf} is off, lines in this format have no effect. If %{bamf} is on, - Fugue will attempt to use the portal as an UnterMUD portal: it will - disconnect from the current world, and attempt to connect to the new world; - if the %{login} flag is also on, TF will try to log in to the new world - using the name and password from the current world. If bamf is "old", Fugue - will connect to the new world without disconnecting from the current world. - If %{login} is also on, and the new world has been defined with a name and - password in an /addworld command, Fugue will attempt to log in - automatically. + If %{bamf} is off, lines in this format have no effect. If %{bamf} is on, + Fugue will attempt to use the portal as an UnterMUD portal: it will + disconnect from the current world, and attempt to connect to the new world; + if the %{login} flag is also on, TF will try to log in to the new world + using the name and password from the current world. If bamf is "old", Fugue + will connect to the new world without disconnecting from the current world. + If %{login} is also on, and the new world has been defined with a name and + password in an /addworld 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. + 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 %{bamf} defaults to 0 (off). + The flag %{bamf} defaults to 0 (off). - See: worlds, sockets, %bamf, %login + See: worlds, sockets, %bamf, %login &/beep /beep - Usage: + Usage: /BEEP [<number>|ON|OFF] ____________________________________________________________________________ - /beep causes Fugue to emit <number> beeps (ASCII 7). /beep with no - arguments will emit three beeps. /beep OFF causes Fugue to ignore further - calls to /beep until a /beep ON is performed. + /beep causes Fugue to emit <number> beeps (ASCII 7). /beep with no + arguments will emit three beeps. /beep OFF causes Fugue to ignore further + calls to /beep until a /beep ON is performed. - Note that on many terminals, multiple immediate beeps are indistinguishable. - You can use /repeat to put a delay between beeps: + Note that on many terminals, multiple immediate beeps are indistinguishable. + You can use /repeat to put a delay between beeps: /repeat -0.2 5 /beep @@ -249,134 +249,134 @@ addworld() /bind - Usage: + Usage: /BIND <sequence> = <command> ____________________________________________________________________________ - Creates a macro that will be executed when <sequence> is typed at the - keyboard. The <sequence> may use ^<key> notation for a control key, and - \<number> 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. + Creates a macro that will be executed when <sequence> is typed at the + keyboard. The <sequence> may use ^<key> notation for a control key, and + \<number> 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 <sequence> is typed at the keyboard, <command> is - executed. The command is actually a macro body, so all the substitutions - described under "evaluation" will be performed. The most common command - used with a key binding is /dokey. + When the key sequence <sequence> is typed at the keyboard, <command> is + executed. The command is actually a macro body, so all the substitutions + described under "evaluation" will be performed. The most common command + used with a key binding is /dokey. - At startup, TF defines bindings for /dokey BSPC, BWORD, DLINE, REFRESH, - LNEXT, UP, DOWN, RIGHT, and LEFT based on your terminal settings. Also, the - standard macro library defines a set of (invisible) default bindings, one - for each of the /dokey functions. + At startup, TF defines bindings for /dokey BSPC, BWORD, DLINE, REFRESH, + LNEXT, UP, DOWN, RIGHT, and LEFT based on your terminal settings. Also, the + standard macro library defines a set of (invisible) default bindings, one + for each of the /dokey functions. - If /bind fails for any reason, it returns 0. Otherwise, it returns the - number of the new macro (useful in /undefn and /edit). + If /bind fails for any reason, it returns 0. Otherwise, it returns the + number of the new macro (useful in /undefn and /edit). - As of version 3.5, the NUL character (^@) is allowed in keybindings. + As of version 3.5, the NUL character (^@) is allowed in keybindings. The command /bind <sequence> = <command> is equivalent to - /def -b"<sequence>" = <command>. + /def -b"<sequence>" = <command>. - Examples: + Examples: /bind ^Xtw = :jumps to the left%;:steps to the right! /bind ^[q = /set more off /bind ~ky = /input Kyosuke - See: keys, /dokey, /unbind, /input, interface + See: keys, /dokey, /unbind, /input, interface &/break /break - Usage: + Usage: /BREAK [<n>] ____________________________________________________________________________ - During macro evaluation, /BREAK unconditionally terminates the nearest - enclosing /WHILE loop. If <n> is specified, it will break out of <n> - enclosing /WHILE loops. If used outside a /WHILE loop, the macro evaluation - is terminated. + During macro evaluation, /BREAK unconditionally terminates the nearest + enclosing /WHILE loop. If <n> is specified, it will break out of <n> + enclosing /WHILE loops. If used outside a /WHILE loop, the macro evaluation + is terminated. - See: /while, /return, /exit, evaluation + See: /while, /return, /exit, evaluation &/cat /cat - Usage: + Usage: /CAT [%] ____________________________________________________________________________ - 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. + 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 history as a single line, so - intermediate lines can not be recalled separately. + The concatenated result is stored in the input history as a single line, so + intermediate lines can not be recalled separately. - Example: + Example: /cat % :foo :bar :baz - . + . - This produces: + This produces: :foo%;:bar%;:baz - If the %{sub} flag is set on, this will expand to three lines ":foo", ":bar" - and ":baz" and be sent to the socket. + If the %{sub} flag is set on, this will expand to three lines ":foo", ":bar" + and ":baz" and be sent to the socket. - See: /paste, /sub, general, history + See: /paste, /sub, general, history &/changes /changes - Usage: + Usage: /CHANGES [<version>] ____________________________________________________________________________ - List the changes in a <version> of TinyFugue; if omitted, <version> defaults - to the current version. <Version> 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 %TFLIBDIR/CHANGES. + List the changes in a <version> of TinyFugue; if omitted, <version> defaults + to the current version. <Version> 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 %TFLIBDIR/CHANGES. - A list of changes in the latest version of tf can be found at - http://tinyfugue.sourceforge.net/CHANGES. + A list of changes in the latest version of tf can be found at + http://tinyfugue.sourceforge.net/CHANGES. - See: /version + See: /version &completion &/complete /complete - Usage: + Usage: /COMPLETE [<type>] ____________________________________________________________________________ - When a part of a word is typed, and then /complete is called (from a - keybinding), it will attempt to fill in the rest of the word. The possible - words it chooses from depend on <type>. If no <type> is given, it completes - from context: it will choose the type of completion based on earlier parts - of the line being typed, plus previous input history. 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. + When a part of a word is typed, and then /complete is called (from a + keybinding), it will attempt to fill in the rest of the word. The possible + words it chooses from depend on <type>. If no <type> is given, it completes + from context: it will choose the type of completion based on earlier parts + of the line being typed, plus previous input history. 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 keybindings for each - type. + The following table lists the meanings and the default keybindings for each + type. Keys Type Meaning ---- ---- ------- @@ -389,112 +389,112 @@ addworld() ^[i input_history complete from previously typed words sockname complete name of open tf socket - The "ESC TAB" and "ESC ;" bindings will use the %{completion_list} variable, - in which you can store a list of any words you want to be able to complete. + The "ESC TAB" and "ESC ;" bindings will use the %{completion_list} variable, + 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 - %{TFLIBDIR}/complete.tf file for more information. + You can also define your own types of completion. See the + %{TFLIBDIR}/complete.tf file for more information. - See: keybindings, interface + See: keybindings, interface &/connect /connect - Usage: + Usage: /CONNECT [-lqxbf] [<world>] /CONNECT <host> <port> ____________________________________________________________________________ - In the first form, /connect attempts to open a socket connected to <world>. - <World> must be defined by the /addworld command and not already open. If - <world> is omitted, the first defined world will be used. If <world> does - not have a host and port, /connect will create a "connectionless" socket. - In the form "/connect <host> <port>", it will define a temporary world named - "(unnamed<N>)" with the given address, and try to connect to it. <Host> may - be an internet hostname, an IPv4 address, or (if your platform supports it) - an IPv6 address. A temporary world will be undefined when it is no longer - in use. - - Options: - -l No automatic login (i.e., don't call the LOGIN hook). - -q Quiet login (overrides %{quiet} flag). - -x Connect using SSL (not necessary if world was defined with the "x" - flag). - -f Connect in the foreground - -b Connect in the background - - The first thing /connect does is create a new socket. If the -f option was - given, or /connect was called from the foreground (e.g., from the command - line), the new socket is immediately brought into the foreground. If the -b - option was given, or /connect was called from the background (e.g., from a - DISCONNECT hook in a background world), the connection proceeds in the - background. - - If a hostname was given, TF must look it up to find one or more IPv4 or (if - your platform supports it) IPv6 addresses. If %{gethostbyname} is - "nonblocking" (the default), and this process takes more than a fraction of - a second, TF will print "Hostname resolution for <world> in progress" (the - PENDING hook), and TF will continue running normally while the lookup - proceeds. But if %{gethostbyname} 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 <world>: <address> <port>" (the PENDING hook). On - most platforms, if %{connect} is "nonblocking" (the default), TF continues - running normally while the network connection proceeds. But if %{connect} - 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 socket is not automatically brought to the foreground. However, - if you had run /connect in the foreground (e.g. from the command line), the - socket would already be in the foreground, unless it was nonblocking and had - taken a long time and you foregrounded another socket while you were - waiting, in which case you probably wouldn't want to automatically - foreground the new socket. If you prefer automatic foregrounding upon - successful connection, you can define a CONNECT hook that calls "/fg %{1}". - - Even if %{gethostbyname} and/or %{connect} are "blocking", they can be - interrupted with the SIGINT signal (^C). - - If the connection fails, TF normally prints "Connection to <world> failed: - <address> <port>: <reason>" (the CONFAIL hook). But, if the failure was in - the specific address, and there is more than one address associated with the - world's hostname, the message will instead say "Intermediate connection to - <world> failed: ..." (the ICONFAIL hook), and TF will try to connect to the - next address. So, a failed /connect will always result in a series of zero - or more ICONFAIL hooks followed by exactly one CONFAIL hook. But an - ICONFAIL may also be followed by a successful connection to an alternate - address. - - If the network connection is successful, or the socket is "connectionless", - these events occur: - - * If the world was defined with an <mfile>, that file will be loaded - (and the LOAD hook will be called); - * The CONNECT hook is called (unless the socket is connectionless or - the connection is via a proxy). - * If %{login} is on, and a character and password is defined for the - world, the LOGIN hook is called (unless the socket is connectionless or - the connection is via a proxy). The default LOGIN hooks 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 hook. - - If you have trouble connecting (especially if you use SOCKS), try "/set - connect=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 tfhost variable or define the world - with a <srchost> parameter to addworld. - - /connect returns 0 on error or failure, 1 for immediate success, or 2 if the - name lookup or network connection is pending. - - See: worlds, sockets, proxy, /world, /addworld, /fg, /retry, %login, - %gethostbyname, %connect, hooks procotols + In the first form, /connect attempts to open a socket connected to <world>. + <World> must be defined by the /addworld command and not already open. If + <world> is omitted, the first defined world will be used. If <world> does + not have a host and port, /connect will create a "connectionless" socket. + In the form "/connect <host> <port>", it will define a temporary world named + "(unnamed<N>)" with the given address, and try to connect to it. <Host> may + be an internet hostname, an IPv4 address, or (if your platform supports it) + an IPv6 address. A temporary world will be undefined when it is no longer + in use. + + Options: + -l No automatic login (i.e., don't call the LOGIN hook). + -q Quiet login (overrides %{quiet} flag). + -x Connect using SSL (not necessary if world was defined with the "x" + flag). + -f Connect in the foreground + -b Connect in the background + + The first thing /connect does is create a new socket. If the -f option was + given, or /connect was called from the foreground (e.g., from the command + line), the new socket is immediately brought into the foreground. If the -b + option was given, or /connect was called from the background (e.g., from a + DISCONNECT hook in a background world), the connection proceeds in the + background. + + If a hostname was given, TF must look it up to find one or more IPv4 or (if + your platform supports it) IPv6 addresses. If %{gethostbyname} is + "nonblocking" (the default), and this process takes more than a fraction of + a second, TF will print "Hostname resolution for <world> in progress" (the + PENDING hook), and TF will continue running normally while the lookup + proceeds. But if %{gethostbyname} 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 <world>: <address> <port>" (the PENDING hook). On + most platforms, if %{connect} is "nonblocking" (the default), TF continues + running normally while the network connection proceeds. But if %{connect} + 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 socket is not automatically brought to the foreground. However, + if you had run /connect in the foreground (e.g. from the command line), the + socket would already be in the foreground, unless it was nonblocking and had + taken a long time and you foregrounded another socket while you were + waiting, in which case you probably wouldn't want to automatically + foreground the new socket. If you prefer automatic foregrounding upon + successful connection, you can define a CONNECT hook that calls "/fg %{1}". + + Even if %{gethostbyname} and/or %{connect} are "blocking", they can be + interrupted with the SIGINT signal (^C). + + If the connection fails, TF normally prints "Connection to <world> failed: + <address> <port>: <reason>" (the CONFAIL hook). But, if the failure was in + the specific address, and there is more than one address associated with the + world's hostname, the message will instead say "Intermediate connection to + <world> failed: ..." (the ICONFAIL hook), and TF will try to connect to the + next address. So, a failed /connect will always result in a series of zero + or more ICONFAIL hooks followed by exactly one CONFAIL hook. But an + ICONFAIL may also be followed by a successful connection to an alternate + address. + + If the network connection is successful, or the socket is "connectionless", + these events occur: + + * If the world was defined with an <mfile>, that file will be loaded + (and the LOAD hook will be called); + * The CONNECT hook is called (unless the socket is connectionless or + the connection is via a proxy). + * If %{login} is on, and a character and password is defined for the + world, the LOGIN hook is called (unless the socket is connectionless or + the connection is via a proxy). The default LOGIN hooks 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 hook. + + If you have trouble connecting (especially if you use SOCKS), try "/set + connect=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 tfhost variable or define the world + with a <srchost> parameter to addworld. + + /connect returns 0 on error or failure, 1 for immediate success, or 2 if the + name lookup or network connection is pending. + + See: worlds, sockets, proxy, /world, /addworld, /fg, /retry, %login, + %gethostbyname, %connect, hooks procotols &disconnect &close @@ -502,266 +502,266 @@ addworld() /dc - Usage: + Usage: /DC [<world>|-ALL] ____________________________________________________________________________ - Disconnects from the named world, or the current world if no world is given, - or all worlds if "-all" is given. If the flag %{quitdone} is on, and /dc - disconnects the last socket, TF will exit. + Disconnects from the named world, or the current world if no world is given, + or all worlds if "-all" is given. If the flag %{quitdone} is on, and /dc + disconnects the last socket, TF will exit. - Disconnecting with /dc does not invoke the DISCONNECT hook. + Disconnecting with /dc does not invoke the DISCONNECT hook. - See: sockets, %quitdone, /quit + See: sockets, %quitdone, /quit &/def /def - Usage: + Usage: /DEF [<options>] [<name>] [= <body>] ____________________________________________________________________________ - Defines a macro with an optional keybinding, trigger and/or hook associated - with it. The options and their meanings are: + Defines a macro with an optional keybinding, trigger and/or hook associated + with it. The options and their meanings are: #-msimple #-mglob #-mregexp #/def -m #-m - -m<matching> - Determines which matching style should be used for -t, -h, or -T - options. Valid values are "simple", "glob", and "regexp" (see also: - patterns). If omitted, the value of %{matching} ("glob" by default) - is used, unless -P is also given, in which case "regexp" is used. + -m<matching> + Determines which matching style should be used for -t, -h, or -T + options. Valid values are "simple", "glob", and "regexp" (see also: + patterns). If omitted, the value of %{matching} ("glob" by default) + is used, unless -P is also given, in which case "regexp" is used. #/def -n #-n - -n<shots> - The macro is a multi-shot, that is, it will be deleted after it is - triggered or hooked <shots> times. A value of 0 makes the macro - permanent. Default: 0. + -n<shots> + The macro is a multi-shot, that is, it will be deleted after it is + triggered or hooked <shots> times. A value of 0 makes the macro + permanent. Default: 0. #/def -E #-E - -E<expression> - Before this macro is tested for a trigger (-t) or hook (-h) match, - <expression> is evaluated; if its value is 0, the macro will not be - considered a match, so no attributes (-a) will be applied, and this - macro will not prevent matches of lower priority (-p), and its body - will not be executed. If the value of <expression> is non-zero, the - comparison proceedes as usual. Note: - * positional parameters (%n) and subexpression matches (%Pn) are not - available in <expression>. - * Remember that for every macro with a trigger and an -E expression, - its <expression> must be evaluated for every line received. So, you - should keep it simple (e.g., "enable_foo" or "${world_name} =~ - fg_world()"). More complex expressions should be put in the body of - the macro. - * The body of a high priority macro is not necessarily executed - before the -E expression of a lower priority macro is tested, so - <expression> should not rely on values that may be changed by other - macros that match the same trigger or hook. - Default: no expression (i.e., always match if the trigger or hook - matches). See: expressions. + -E<expression> + Before this macro is tested for a trigger (-t) or hook (-h) match, + <expression> is evaluated; if its value is 0, the macro will not be + considered a match, so no attributes (-a) will be applied, and this + macro will not prevent matches of lower priority (-p), and its body + will not be executed. If the value of <expression> is non-zero, the + comparison proceeds as usual. Note: + * positional parameters (%n) and subexpression matches (%Pn) are not + available in <expression>. + * Remember that for every macro with a trigger and an -E expression, + its <expression> must be evaluated for every line received. So, you + should keep it simple (e.g., "enable_foo" or "${world_name} =~ + fg_world()"). More complex expressions should be put in the body of + the macro. + * The body of a high priority macro is not necessarily executed + before the -E expression of a lower priority macro is tested, so + <expression> should not rely on values that may be changed by other + macros that match the same trigger or hook. + Default: no expression (i.e., always match if the trigger or hook + matches). See: expressions. #/def -t #-t - -t<pattern> - Defines a trigger pattern which will cause the macro to be called - when it is matched by a line of text from a socket. <Pattern> may - be enclosed in quotes (", ', or `); if so, all occurances of quotes - and '\' within the pattern must be preceded with a '\'. The pattern - matching style is determined by the -m option, or defaults to the - value of %{matching}. Default: no trigger. See: triggers. + -t<pattern> + Defines a trigger pattern which will cause the macro to be called + when it is matched by a line of text from a socket. <Pattern> may + be enclosed in quotes (", ', or `); if so, all occurrences of quotes + and '\' within the pattern must be preceded with a '\'. The pattern + matching style is determined by the -m option, or defaults to the + value of %{matching}. Default: no trigger. See: triggers. #/def -h #-h - -h"<event>[ <pattern>]" - Specifies that the macro will be called automatically whenever - <event> occurs and its arguments match <pattern>. <Event> may be a - single event name or a list separated by '|'. If <pattern> 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 pattern - matching style is determined by the -m option, or defaults to the - value of %{matching}. Default: no hook. See: hooks. + -h"<event>[ <pattern>]" + Specifies that the macro will be called automatically whenever + <event> occurs and its arguments match <pattern>. <Event> may be a + single event name or a list separated by '|'. If <pattern> is + omitted, it will match any arguments, and the quotes may also be + omitted. If quotes are used, then all occurrences of quotes and '\' + within the option argument must be preceded with a '\'. The pattern + matching style is determined by the -m option, or defaults to the + value of %{matching}. Default: no hook. See: hooks. #/def -b #-b - -b<bind> - The macro will be called when the string <bind> is typed at the - keyboard. Default: no binding. The <bind> string may contain the - special codes described under "bind". See: keys. + -b<bind> + The macro will be called when the string <bind> is typed at the + keyboard. Default: no binding. The <bind> string may contain the + special codes described under "bind". See: keys. #/def -B #-B - -B<keyname> - Deprecated. The macro will be called when the key named <keyname> - (according to the termcap database) is typed at the keyboard. - Default: none. See "keys". + -B<keyname> + Deprecated. The macro will be called when the key named <keyname> + (according to the termcap database) is typed at the keyboard. + Default: none. See "keys". #/def -p #-p - -p<pri> - Sets the priority of the macro's trigger or hook to <pri>. As in - all numeric options, the argument to -p may be an expression that - has a numeric value. E.g. "/def -pmaxpri ..." will set the macro's - priority to the value of the variable maxpri. The expression is - evaluated only once, when the macro is defined. Default: 1. See - also: fall-thru. See: priority, /def -F. + -p<pri> + Sets the priority of the macro's trigger or hook to <pri>. As in + all numeric options, the argument to -p may be an expression that + has a numeric value. E.g. "/def -pmaxpri ..." will set the macro's + priority to the value of the variable maxpri. The expression is + evaluated only once, when the macro is defined. Default: 1. See + also: fall-thru. See: priority, /def -F. #/def -c #-c - -c<chance> - Sets the percent probability of executing the body of a matched - trigger or hook. (The macro still counts as a match for attributes - and priority even if it does not execute.) Default: 100%. + -c<chance> + Sets the percent probability of executing the body of a matched + trigger or hook. (The macro still counts as a match for attributes + and priority even if it does not execute.) Default: 100%. #/def -w #-w - -w<world> - If the macro has a trigger or hook, it can be matched only by text - or events from <world>. Default: any world. + -w<world> + If the macro has a trigger or hook, it can be matched only by text + or events from <world>. Default: any world. #/def -T #-T - -T<type> - If the macro has a trigger or hook, it can be matched only by text - or events from worlds of type <type>. (See: /addworld). The - pattern matching style is determined by the -m option, or defaults - to the value of %{matching}. Default: any type. + -T<type> + If the macro has a trigger or hook, it can be matched only by text + or events from worlds of type <type>. (See: /addworld). The + pattern matching style is determined by the -m option, or defaults + to the value of %{matching}. Default: any type. #/def -F #-F - -F Fall-thru: on a trigger or hook, allows additional matches of lower - priority to be run. Default: not fall-thru. See: priority + -F Fall-thru: on a trigger or hook, allows additional matches of lower + priority to be run. Default: not fall-thru. See: priority #/def -a #-a - -a[ngGLAurBbhC] - Set attribute(s) (normal, gag, nohistory, nolog, noactivity, - underline, reverse, bold, bell, hilite, Color) used to display text - matched by the trigger or to display the default message of a hook. - Default: normal. See: attributes. + -a[ngGLAurBbhC] + Set attribute(s) (normal, gag, nohistory, nolog, noactivity, + underline, reverse, bold, bell, hilite, Color) used to display text + matched by the trigger or to display the default message of a hook. + Default: normal. See: attributes. #/def -P #-P - -P[<part>]<attr>[;[<part>]<attr>]... - Define a "partial hilite". The argument consists of a list of pairs - of parts (<part>) and attributes (<attr>), separated by ';'. When a - line matches the regexp trigger of this macro, each <attr> is - applied to the corresponding <part> of the line. <Attr> can contain - any of the attribute codes "nxurBhC". (normal, exclusive, - underline, reverse, bold, hilite, Color). The value of <part> - determines which part of the text is affected: - L text to the left of the regexp match - R text to the right of the regexp match - 0 text matched by the entire regexp + -P[<part>]<attr>[;[<part>]<attr>]... + Define a "partial hilite". The argument consists of a list of pairs + of parts (<part>) and attributes (<attr>), separated by ';'. When a + line matches the regexp trigger of this macro, each <attr> is + applied to the corresponding <part> of the line. <Attr> can contain + any of the attribute codes "nxurBhC". (normal, exclusive, + underline, reverse, bold, hilite, Color). The value of <part> + determines which part of the text is affected: + L text to the left of the regexp match + R text to the right of the regexp match + 0 text matched by the entire regexp <number> - text matched by the the <number>th parenthesized - subexpression of the regexp. - If <part> is omitted it defaults to 0. If <part> is a number and - there are multiple matches in the text, the <attr> will be applied - to all of the matches. Implies -mregexp. Only one -P option is - allowed. See: attributes. + text matched by the the <number>th parenthesized + subexpression of the regexp. + If <part> is omitted it defaults to 0. If <part> is a number and + there are multiple matches in the text, the <attr> will be applied + to all of the matches. Implies -mregexp. Only one -P option is + allowed. See: attributes. #/def -f #-f - -f Same as -a, for backward compatibility. + -f Same as -a, for backward compatibility. #/def -I #-I #/def -i #-i - -i - -I Makes the macro "invisible". Invisible macros are not processed by - /list, /save, or /purge unless forced. Default: not invisible. + -i + -I Makes the macro "invisible". Invisible macros are not processed by + /list, /save, or /purge unless forced. Default: not invisible. #/def -q #-q - -q Makes the macro "quiet". If called as a trigger, the macro will not - count toward the BACKGROUND hook or the return value of /trigger. - If called as a SEND hook, the macro will not prevent the sending of - the original input. If called as a PROMPT hook, the macro will not - remove the text from the data stream. + -q Makes the macro "quiet". If called as a trigger, the macro will not + count toward the BACKGROUND hook or the return value of /trigger. + If called as a SEND hook, the macro will not prevent the sending of + the original input. If called as a PROMPT hook, the macro will not + remove the text from the data stream. #-1 - -1 Defines a one-shot. Equivalent to "-n1". + -1 Defines a one-shot. Equivalent to "-n1". # - <name> The name of the macro. 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 expansion. + <name> The name of the macro. 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 expansion. - = <body> - Text to be executed when macro is called. Default: no body. + = <body> + Text to be executed when macro is called. Default: no body. - If /def could not create a new macro, it returns 0. Otherwise, it returns - the number of the new macro (useful with /undefn and /edit). + If /def could not create a new macro, it returns 0. Otherwise, it returns + the number of the new macro (useful with /undefn and /edit). ____________________________________________________________________________ ##follow - Example: + Example: /def follow = \ /def -T^tiny -mregexp -p2 -t"^%{1} goes ([a-z]*)\\\\.$$" do_follow = \ go %%P1 - This will create a macro named "follow". When it is called like "/follow - Joe", it will execute the command + This will create a macro named "follow". When it is called like "/follow + Joe", it will execute the command /def -T^tiny -mregexp -p2 -t"^Joe goes ([a-z]*)\\.$" do_follow = go %P1 - Note the substitutions that occurred: "%{1}" was replaced with the first - (and only) argument; each "\\" was replaced with "\"; "$$" was replaced with - "$"; and "%%" was replaced with "%". + Note the substitutions that occurred: "%{1}" was replaced with the first + (and only) argument; each "\\" was replaced with "\"; "$$" was replaced with + "$"; and "%%" was replaced with "%". - That command, in turn, defines another macro called "do_follow", with a - regexp trigger + That command, in turn, defines another macro called "do_follow", with a + regexp trigger ^Joe goes ([a-z]*)\.$ - which will only match on worlds whose type matches the regexp pattern - "^tiny". + which will only match on worlds whose type matches the regexp pattern + "^tiny". - Thereafter, when a line like "Joe goes north." is received, it will match - the trigger, and cause this command to be executed: + Thereafter, when a line like "Joe goes north." is received, it will match + the trigger, and cause this command to be executed: go north - Note how "%P1" was substituted with the text matched by the first set of - parentheses (in this case, "north"). + Note how "%P1" was substituted with the text matched by the first set of + parentheses (in this case, "north"). - When writing nested macros 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. + When writing nested macros 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. # ____________________________________________________________________________ - /def is sufficient to perform all the functions of the /trig, /trigp, - /trigc, /trigpc, /gag, /hilite, /partial, /hook, and /bind commands. + /def is sufficient to perform all the functions of the /trig, /trigp, + /trigc, /trigpc, /gag, /hilite, /partial, /hook, and /bind commands. - See: macros, triggers, patterns, hooks, priority, evaluation, attributes, - /undef, /undefn, /purge, /list, /save, /load + See: macros, triggers, patterns, hooks, priority, evaluation, attributes, + /undef, /undefn, /purge, /list, /save, /load &/dokey /dokey - Usage: + Usage: /DOKEY <name> ____________________________________________________________________________ - Performs an action that is intended to be invoked from a keybinding created - with /bind or /def -b. Most of the actions not meaningful or useful when - the /dokey command is executed from the command line. + Performs an action that is intended to be invoked from a keybinding created + with /bind or /def -b. Most of the actions not meaningful or useful when + the /dokey command is executed from the command line. Name Default binding Action @@ -854,25 +854,25 @@ addworld() # - A default of "(stty)" means the key sequence is that used by your terminal - driver. A default of the form "key_<name>" means the key named <name> (see - keybindings). + A default of "(stty)" means the key sequence is that used by your terminal + driver. A default of the form "key_<name>" means the key named <name> (see + keybindings). - The return value of /dokey 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. + The return value of /dokey 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 "keybindings" for a complete list of keybindings. + See "keybindings" for a complete list of keybindings. - Example: + Example: /bind ^B = /dokey RECALLB /bind ^F = /dokey RECALLF - Then, ^B and ^F could be used to recall input backwards and forwards. + Then, ^B and ^F could be used to recall input backwards and forwards. - See: keybindings, /bind, sockets, history, /more + See: keybindings, /bind, sockets, history, /more &/echo &/_echo @@ -880,152 +880,152 @@ addworld() echo() - Function usage: + Function usage: ECHO(<text> [, <attrs> [, <inline> [, <dest>]]]) - Command usage: + Command usage: /ECHO [-peA] [-a<attrs>] [-w[<world>]] <text> /_ECHO <text> ____________________________________________________________________________ - Displays <text> on the tfout stream (i.e., the screen, usually), unless - otherwise redirected by options. - - Options and arguments: - command: -a<attrs> - function: <attrs> - Echo <text> with the attributes given by <attrs>. - command: -p - function: <inline> = "on" or 1 - Interpet "@{<attr>}" strings as commands to set attributes inline. - "@@" strings are interpreted as "@". "@{n}" or "@{x}" will turn - attributes off. See also: decode_attr(). - command: -w<world> - function: <dest> = "w<world>" - Echo <text> to the <world> stream instead of the default tfout - stream (see tfio). If <world> is blank, the current world is - assumed. - command: -e - function: <dest> = "e" - Echo <text> to the tferr stream, instead of the default tfout stream - (see tfio). - function: <dest> = "o" - Echo <text> to the tfout stream (the default). - command: -A - function: <dest> = "a" - Echo <text> to the alert stream, instead of the default tfout stream - (see tfio). - - 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 options, in case <text> begins - with "-". - - /_echo is more efficient than /echo, so it is better for use in heavily used - macros that don't need all the options of /echo. - - When echoing to the tferr stream, if no <attrs> are specified, text will be - echoed with the "E" attribute. - - Example: Both of these commands + Displays <text> on the tfout stream (i.e., the screen, usually), unless + otherwise redirected by options. + + Options and arguments: + command: -a<attrs> + function: <attrs> + Echo <text> with the attributes given by <attrs>. + command: -p + function: <inline> = "on" or 1 + Interpret "@{<attr>}" strings as commands to set attributes inline. + "@@" strings are interpreted as "@". "@{n}" or "@{x}" will turn + attributes off. See also: decode_attr(). + command: -w<world> + function: <dest> = "w<world>" + Echo <text> to the <world> stream instead of the default tfout + stream (see tfio). If <world> is blank, the current world is + assumed. + command: -e + function: <dest> = "e" + Echo <text> to the tferr stream, instead of the default tfout stream + (see tfio). + function: <dest> = "o" + Echo <text> to the tfout stream (the default). + command: -A + function: <dest> = "a" + Echo <text> to the alert stream, instead of the default tfout stream + (see tfio). + + 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 options, in case <text> begins + with "-". + + /_echo is more efficient than /echo, so it is better for use in heavily used + macros that don't need all the options of /echo. + + When echoing to the tferr stream, if no <attrs> are specified, text will be + echoed with the "E" attribute. + + Example: Both of these commands /test echo("@{u}Hello@{n}, world!", "BCred", 1) /echo -aBCred -p @{u}Hello@{n}, world! - echo the following line, with "Hello" underlined, and the whole line bold - red: + echo the following line, with "Hello" underlined, and the whole line bold + red: Hello, world! - Echoed text is not matched against triggers. To do that, use /trigger. + Echoed text is not matched against triggers. To do that, use /trigger. - See: attributes, worlds, fwrite(), pad(), tfio + See: attributes, worlds, fwrite(), pad(), tfio &/edit /edit - Usage: + Usage: /EDIT [<options>] [<name>] [= <body>] ____________________________________________________________________________ - Edits a currently existing macro or the trigger associated with a macro. - Options are described under "def". The name of the macro must be specified - and cannot be changed, with the following two exceptions: + Edits a currently existing macro or the trigger associated with a macro. + Options are described under "def". The name of the macro must be specified + and cannot be changed, with the following two exceptions: - 1. The macro name can be specified as "#<num>" where <num> is the number of - the macro instead of the name. A macro number can be determined by listing - the macro with /list, or from the return value of /def or /edit. + 1. The macro name can be specified as "#<num>" where <num> is the number of + the macro instead of the name. A macro number can be determined by listing + the macro with /list, or from the return value of /def or /edit. - 2. The macro name can be specified as "$<pattern>" where <pattern> is the - trigger pattern. You may still change the pattern if this is used to locate - the macro. + 2. The macro name can be specified as "$<pattern>" where <pattern> is the + trigger pattern. You may still change the pattern if this is used to locate + the macro. - In either case, the name cannot be changed. It is possible to create a - macro which changes the name of a macro, if it does not have any options - other than a name and a body: + In either case, the name cannot be changed. It is possible to create a + macro which changes the name of a macro, if it does not have any options + other than a name and a body: - /def rename = /def %2 = $%1%; /undef %1 + /def rename = /def %2 = $%1%; /undef %1 - How this works is discussed in the help section "expansion". + How this works is discussed in the help section "expansion". - Also, the /edmac command will allow you to edit an existing macro definition - on the command line. + Also, the /edmac command will allow you to edit an existing macro definition + on the command line. - The -i flag will be cleared automatically from the macro if it is not - explicitly given to /edit. 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 -F option. The -w, -T -t, and - -h options also can not be cleared, but their arguments can be changed. The - -T, -t, and -h options will use the pattern matching style specified by the - -m option to the /edit command; they will not inherit -m from the original - definition. Any other options that are not specified with /edit will remain - unchanged from the original definition. + The -i flag will be cleared automatically from the macro if it is not + explicitly given to /edit. The body may be cleared by specifying "=" with + nothing after it; if "=" is not present at all, the macro's body will be + unchanged. It is not possible to clear the -F option. The -w, -T -t, and + -h options also can not be cleared, but their arguments can be changed. The + -T, -t, and -h options will use the pattern matching style specified by the + -m option to the /edit command; they will not inherit -m from the original + definition. Any other options that are not specified with /edit will remain + unchanged from the original definition. - As of version 5.0, /edit does not renumber the macro being edited. + As of version 5.0, /edit does not renumber the macro being edited. - Example: + Example: /def -p2 -t"* has arrived." -ah greet = :greets %1 - /edit -c0 greet + /edit -c0 greet - The second command will change the probability of /greet's trigger from 100% - to 0%, effectively disabling it without actually undefining it (however, - because it is not fall-through, it will still block other triggers of lower - priority). + The second command will change the probability of /greet's trigger from 100% + to 0%, effectively disabling it without actually undefining it (however, + because it is not fall-through, it will still block other triggers of lower + priority). - See: macros, triggers, patterns, evaluation, attributes, /def, /list, /edmac + See: macros, triggers, patterns, evaluation, attributes, /def, /list, /edmac &/escape /escape - Function usage: + Function usage: ESCAPE(<metacharacters>, <string>) - Command usage: + Command usage: /ESCAPE <metacharacters> <string> ____________________________________________________________________________ - Echoes (in command form) or returns (in function form) <string>, with any - <metacharacters> or '\' characters contained in <string> preceded by a '\' - character. + Echoes (in command form) or returns (in function form) <string>, with any + <metacharacters> or '\' characters contained in <string> preceded by a '\' + character. - Example: + Example: /def blue = /def -aCblue -t"$(/escape " %*)" - /blue * pages, "*" + /blue * pages, "*" - When the second command executes, it will expand to: + When the second command executes, it will expand to: - /def -aCblue -t"* pages, \"*\"" + /def -aCblue -t"* pages, \"*\"" - See: evaluation + See: evaluation &/not &/eval @@ -1034,130 +1034,130 @@ echo() eval() - Function usage: + Function usage: eval(<text> [, <level>]) - Command usage: + Command usage: /EVAL [-s<level>] <text> /NOT [-s<level>] <text> ____________________________________________________________________________ - <Text> is evaluated as a macro body: it goes through substitution, and is - executed in a new scope. The return value of eval() and /eval is that of - the last command in <text>; the return value of /not is the logical negation - of return value of the last command in <text>. + <Text> is evaluated as a macro body: it goes through substitution, and is + executed in a new scope. The return value of eval() and /eval is that of + the last command in <text>; the return value of /not is the logical negation + of return value of the last command in <text>. - Positional parameters (%1, etc) are inherited from the caller. + Positional parameters (%1, etc) are inherited from the caller. - Options and arguments: - command: -s<level> - function: <level> - Expands the <text> as if %{sub} were set to <level>. By default, - eval expands the <text> as if %{sub} were "full", and echoes it if - %{mecho} is not "off". + Options and arguments: + command: -s<level> + function: <level> + Expands the <text> as if %{sub} were set to <level>. By default, + eval expands the <text> as if %{sub} were "full", and echoes it if + %{mecho} is not "off". - Note: calling /eval with arguments from a trigger could be dangerous. If - not written carefully, such a trigger could allow anyone with access to the - server to gain access to your tf or shell account (if they have not been - /restricted). + Note: calling /eval with arguments from a trigger could be dangerous. If + not written carefully, such a trigger could allow anyone with access to the + server to gain access to your tf or shell account (if they have not been + /restricted). Example: - command: /def showvar = /eval /echo %{1} is %%{%{1}}. + command: /def showvar = /eval /echo %{1} is %%{%{1}}. command: /showvar borg - output: borg is on. + output: borg is on. - "/Eval -s0" can be useful when the argument is generated by an expansion. - For example, if you defined "/def do = %{*}, 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 "/def do = /eval -s0 %{*}", then "/do /echo - test" would execute "/echo test" as a tf command. + "/Eval -s0" can be useful when the argument is generated by an expansion. + For example, if you defined "/def do = %{*}, 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 "/def do = /eval -s0 %{*}", then "/do /echo + test" would execute "/echo test" as a tf command. - Note: Instead of /not, you should normally use the "/!<command>" syntax to - execute "/<command>" and negate its result. /not evaluates its arguments, - which may be undesirable. + Note: Instead of /not, you should normally use the "/!<command>" syntax to + execute "/<command>" and negate its result. /not evaluates its arguments, + which may be undesirable. - See: evaluation + See: evaluation &/exit /exit - Usage: + Usage: /EXIT [<n>] ____________________________________________________________________________ - When called directly or indirectly during a /load, /exit aborts execution of - all enclosing macro bodies, and aborts <n> (default 1) enclosing /load's. + When called directly or indirectly during a /load, /exit aborts execution of + all enclosing macro bodies, and aborts <n> (default 1) enclosing /load's. - When called outside of a /load, /exit has no effect. + When called outside of a /load, /exit 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: + 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: /if (<variable>) /exit%; /endif /set <variable>=1 - ...where <variable> is the name of the file or some other unique name. + ...where <variable> is the name of the file or some other unique name. - See: /load, /return, /break, /loaded + See: /load, /return, /break, /loaded &/export /export - Usage: + Usage: /EXPORT <variable> ____________________________________________________________________________ - If <variable> is a global variable, it becomes an environment variable. - This makes <variable> available to the environment for "/sh" and "/quote !". + If <variable> is a global variable, it becomes an environment variable. + This makes <variable> available to the environment for "/sh" and "/quote !". - Local variables may not be exported. + Local variables may not be exported. - See: environment, variables, /setenv + See: environment, variables, /setenv &/expr /expr - Usage: + Usage: /EXPR <expression> ____________________________________________________________________________ - Evaluates <expression> and prints its value. This almost the same as "/eval - /echo -- $$[<expression>]", except that {#} and positional parameters ({1}, - etc) are not defined. If you neet to print a value of an expression that - uses positional parameters, use /result or echo(). + Evaluates <expression> and prints its value. This almost the same as "/eval + /echo -- $$[<expression>]", except that {#} and positional parameters ({1}, + etc) are not defined. If you need to print a value of an expression that + uses positional parameters, use /result or echo(). - Example: + Example: command: /set x=4 command: /expr x * 2 output: 8 - See: expressions + See: expressions &/features /features - Usage: + Usage: /FEATURES [<name>] ____________________________________________________________________________ - With no arguments, /features prints a list of optional TF features, each - prefixed with "+" or "-" to indicate that it is enabled or disabled, - respectively. + With no arguments, /features prints a list of optional TF features, each + prefixed with "+" or "-" to indicate that it is enabled or disabled, + respectively. - With a <name> argument, /features returns 0 or 1 if the feature <name> is - disabled or enabled, respectively, in this instance of tf. Case is - insignificant in <name>. + With a <name> argument, /features returns 0 or 1 if the feature <name> is + disabled or enabled, respectively, in this instance of tf. Case is + insignificant in <name>. Feature Meaning ------- ------- @@ -1173,201 +1173,201 @@ eval() MCCPv2 Mud Client Compression Protocol version 2 (see: mccp) process /repeat and /quote SOCKS SOCKS proxy - ssl Secure Sockets Layer + SSL Secure Sockets Layer subsecond time is measured with subsecond accuracy TZ honors the TZ variable - Example: + Example: /if (!features("ssl")) /echo -e warning: socket is not secure%; /endif - + &/bg &/fg /fg - Usage: + Usage: /FG [-nsq<>l] [-c<N>] [<world>] /BG ____________________________________________________________________________ - Bring the socket associated with <world> into the foreground. The <world> - must already be connected with the /connect command. Any lines that arrived - while the socket was in the background will be displayed or counted in the - more prompt, unless the -q option is given. + Bring the socket associated with <world> into the foreground. The <world> + must already be connected with the /connect command. Any lines that arrived + while the socket was in the background will be displayed or counted in the + more prompt, unless the -q option is given. - /fg Options: - -n no socket: put all sockets in the background. - -s suppress error messages. - -< previous socket in cycle. - -> next socket in cycle. - -c<N> Repeat the -< or -> option <N> 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 socket was in the - foreground. + /fg Options: + -n no socket: put all sockets in the background. + -s suppress error messages. + -< previous socket in cycle. + -> next socket in cycle. + -c<N> Repeat the -< or -> option <N> times. + -l ignored. + -q quiet: jump to the last screenfull of text, instead of starting at + the same location you were at the last time the socket was in the + foreground. - If successful, /fg returns nonzero and invokes the WORLD hook; otherwise, it - returns 0. + If successful, /fg returns nonzero and invokes the WORLD hook; otherwise, it + returns 0. - By default, /fg 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 %textdiv. + By default, /fg 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 %textdiv. - /bg puts all sockets in the background, and is equivalent to /fg -n. By - default, /bg is bound to the ^] key (not ESC, which is ^[) + /bg puts all sockets in the background, and is equivalent to /fg -n. By + default, /bg is bound to the ^] key (not ESC, which is ^[) - See: /connect, worlds, sockets, %textdiv, %textdiv_str. + See: /connect, worlds, sockets, %textdiv, %textdiv_str. &finger.tf &/finger /finger - Usage: + Usage: /REQUIRE finger.tf /FINGER [<user>][@<host>] ____________________________________________________________________________ - Like unix finger, /finger reports information about <user> (default: all - users) on <host> (default: localhost), assuming that <host> is running a - standard finger daemon. + Like unix finger, /finger reports information about <user> (default: all + users) on <host> (default: localhost), assuming that <host> is running a + standard finger daemon. - See: /require, worlds, sockets + See: /require, worlds, sockets &/for /for - Usage: + Usage: /FOR <variable> <start> <end> <commands> ____________________________________________________________________________ - The <variable> will take on all numeric values between <start> and <end>, - inclusive. The <commands> will be executed once for each of the values. If - <end> is less then <start>, <commands> will not be executed. + The <variable> will take on all numeric values between <start> and <end>, + inclusive. The <commands> will be executed once for each of the values. If + <end> is less then <start>, <commands> will not be executed. - <Commands> are executed in a new evaluation scope. This means, for example, - that a /for called from a macro must use "%%{...}" and "%%;" instead of - "%{...}" and "%;" to have the substitutions performed when the /for is - expanded instead of when the calling macro is expanded. + <Commands> are executed in a new evaluation scope. This means, for example, + that a /for called from a macro must use "%%{...}" and "%%;" instead of + "%{...}" and "%;" to have the substitutions performed when the /for is + expanded instead of when the calling macro is expanded. - Example: + Example: - Given the definition + Given the definition /def countdown = /for 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 substituted when - /countdown is expanded, and the "$$" is replaced with "$". The resulting - "$[10 - i]" is substituted when /for is expanded. If /countdown used - "$[...]" instead of "$$[...]" in the <commands>, it would be substituted - when /countdown is expanded, and you would repeat "10" 11 times. If - /countdown used "%%{1}" or "{1}" instead of "%{1}" inside the expression, it - would not be substituted until /for was expanded, so it would have the value - of /for's first argument (the string "i", which has numeric value 0), and - you would end up counting down from 0 to -10. - See: /while + then the command "/countdown 10" would cause you to execute the commands + "say 10", "say 9", ... "say 0". Note that the "%{1}" is substituted when + /countdown is expanded, and the "$$" is replaced with "$". The resulting + "$[10 - i]" is substituted when /for is expanded. If /countdown used + "$[...]" instead of "$$[...]" in the <commands>, it would be substituted + when /countdown is expanded, and you would repeat "10" 11 times. If + /countdown used "%%{1}" or "{1}" instead of "%{1}" inside the expression, it + would not be substituted until /for was expanded, so it would have the value + of /for's first argument (the string "i", which has numeric value 0), and + you would end up counting down from 0 to -10. + + See: /while &ftime &ftime() ftime() - Function usage: + Function usage: ftime([<format> [, <time>]]) ____________________________________________________________________________ - Returns a string formatted from an absolute system time <time> (obtained - from time() or mktime()) according to <format>. If <time> is omitted, it - defaults to the current time. If <time> is out of range, ftime() returns an - empty string and prints an error message. If <format> is omitted, it - defaults to %time_format. If <format> is "@", a raw system time (e.g., - seconds since 1970-01-01 00:00:00 UTC) will be displayed. Otherwise, each - "%" in <format> 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 local 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 local 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 local date representation - %X local 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 locale 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 <format> are copied unmodified to the result. - - The formats "%@" and "%s.%." do not give the same results if <time> is - negative. + Returns a string formatted from an absolute system time <time> (obtained + from time() or mktime()) according to <format>. If <time> is omitted, it + defaults to the current time. If <time> is out of range, ftime() returns an + empty string and prints an error message. If <format> is omitted, it + defaults to %time_format. If <format> is "@", a raw system time (e.g., + seconds since 1970-01-01 00:00:00 UTC) will be displayed. Otherwise, each + "%" in <format> 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 local 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 local 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 local date representation + %X local 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 locale 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 <format> are copied unmodified to the result. + + The formats "%@" and "%s.%." do not give the same results if <time> is + negative. Example: command: /expr ftime("Today is %a %b %d", time()) output: Today is Thu Jul 02 - See: functions, time(), locale, %TZ, %time_format, %clock_format. + See: functions, time(), locale, %TZ, %time_format, %clock_format. &/gag /gag - Usage: + Usage: /GAG [<pattern> [=<response>]] ____________________________________________________________________________ - Creates a macro which will trigger on text matching <pattern> and prevent it - from being displayed, optionally executing <response>. + Creates a macro which will trigger on text matching <pattern> and prevent it + from being displayed, optionally executing <response>. - With no arguments, /gag sets the flag %{gag} to 1 (on). This flag enables - the gag attribute on triggers. It is on by default. + With no arguments, /gag sets the flag %{gag} to 1 (on). This flag enables + the gag attribute on triggers. It is on by default. - The matching style of the gag pattern is determined by %{matching}. The - priority of the gag is determined by %{gpri}. These variables are examined - when the gag is defined, not when it is executed. + The matching style of the gag pattern is determined by %{matching}. The + priority of the gag is determined by %{gpri}. These variables are examined + when the gag is defined, not when it is executed. - Gagged lines from background worlds will not set the activity indicator on - the status line or call the activity hook. + Gagged lines from background worlds will not set the activity indicator on + the status line or call the activity hook. - If /gag does not create a new macro, it returns 0. Otherwise, it returns - the number of the new macro (useful in /undefn and /edit). + If /gag does not create a new macro, it returns 0. Otherwise, it returns + the number of the new macro (useful in /undefn and /edit). /gag <pattern> [= <response>] is equivalent to - /def -ag -t"<pattern>" [= <response>]. + /def -ag -t"<pattern>" [= <response>]. - See: triggers, patterns, evaluation, %gag, /def, /nogag + See: triggers, patterns, evaluation, %gag, /def, /nogag &download &/getfile_MUCK @@ -1377,7 +1377,7 @@ ftime() /getfile - Usage: + Usage: /REQUIRE filexfer.tf @@ -1386,51 +1386,51 @@ ftime() /GETFILE_UNIX <file> [<remote-file>] ____________________________________________________________________________ - Downloads text <remote-file> from a MUCK, LP, or remote UNIX shell to <file> - on the local host. If <remote-file> is omitted, <file> is used as the name - on both ends. Do not use "wildcard" globbing characters in the file names. + Downloads text <remote-file> from a MUCK, LP, or remote UNIX shell to <file> + on the local host. If <remote-file> is omitted, <file> is used as the name + on both ends. Do not use "wildcard" globbing characters in the file names. - When using /getfile_UNIX, an extra line of garbage may appear at the - beginning of the downloaded file unless you first disable remote echo with - "stty -echo". + When using /getfile_UNIX, 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 current world, it will be closed by - /getfile. + Bug: if there is a log open for the current world, it will be closed by + /getfile. - See: /putfile, /log + See: /putfile, /log &/grab /grab - Usage: + Usage: /GRAB <text> ____________________________________________________________________________ - This command puts <text> into the input buffer. It is not really useful - from the normal command line, but is quite useful when called from a macro - to redefine macros, or perhaps when bound to a key to speed up part of a - line (macros allow you to largely do what this would allow, however). Any - text already in the input buffer is discarded. + This command puts <text> into the input buffer. It is not really useful + from the normal command line, but is quite useful when called from a macro + to redefine macros, or perhaps when bound to a key to speed up part of a + line (macros allow you to largely do what this would allow, however). Any + text already in the input buffer is discarded. - Example: + Example: /def reedit = /grab /edit %1 = $%1 - If you had previously done "/def flail = :flails at his keyboard", the - command "/reedit flail" would place "/edit flail = :flails at his keyboard" - in the input buffer and allow you to edit it using the editing keys. See - "evaluation" for details on how macros like this work. + If you had previously done "/def flail = :flails at his keyboard", the + command "/reedit flail" would place "/edit flail = :flails at his keyboard" + in the input buffer and allow you to edit it using the editing keys. See + "evaluation" for details on how macros like this work. - See: /input, general + See: /input, general &oldgrep &grep.tf /grep - Usage: + Usage: /REQUIRE grep.tf @@ -1439,185 +1439,185 @@ ftime() /EGREP <pattern> <command> ____________________________________________________________________________ - Executes <command> and prints only the output that matches <pattern> (which - must not contain spaces). /fgrep prints lines that contain the string - <pattern>; /grep prints lines that match the glob <pattern>; /egrep prints - lines that match the regexp <pattern>. + Executes <command> and prints only the output that matches <pattern> (which + must not contain spaces). /fgrep prints lines that contain the string + <pattern>; /grep prints lines that match the glob <pattern>; /egrep prints + lines that match the regexp <pattern>. - Remember to use "*" at each end of <pattern> to make /grep match lines that - contain a piece that matches the glob <pattern>; without the "*"s, the - entire line must match. + Remember to use "*" at each end of <pattern> to make /grep match lines that + contain a piece that matches the glob <pattern>; 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. + Example: "/fgrep T'tiny.muck' /listworlds" lists all the worlds defined with + the -T'tiny.muck' option. - See: textutil.tf, /require, patterns, expressions, functions + See: textutil.tf, /require, patterns, expressions, functions &/man &/help /help - Usage: + Usage: /HELP [<topic>] ____________________________________________________________________________ - 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 this format are references to - other topics. That is, a hyperlink in HTML, or something that can be used - as an argument to /help in tf. - - 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 <this format> (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., "/def" and "def" both - match the /def command topic), but sometime will match a different topic - (e.g., "%MAIL" matches the MAIL variable topic, but "MAIL" matches the MAIL - hook topic). There are also (sub)topics for various tf syntax constructions - such as "%{}" and "$()". - - For /help to work, the variable %TFHELP 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, /help 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. + 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 this format are references to + other topics. That is, a hyperlink in HTML, or something that can be used + as an argument to /help in tf. + + 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 <this format> (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., "/def" and "def" both + match the /def command topic), but sometime will match a different topic + (e.g., "%MAIL" matches the MAIL variable topic, but "MAIL" matches the MAIL + hook topic). There are also (sub)topics for various tf syntax constructions + such as "%{}" and "$()". + + For /help to work, the variable %TFHELP 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, /help 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 - http://tinyfugue.sourceforge.net/help/. + The help documents are also available on the web at + http://tinyfugue.sourceforge.net/help/. # - See: index, intro, options + See: index, intro, options &/highlight &/hilite /hilite - Usage: + Usage: /HILITE [<pattern> [= <response>]] ____________________________________________________________________________ - Creates a macro which will trigger on text matching <pattern> and display it - with the hilite attribute, optionally executing <response>. + Creates a macro which will trigger on text matching <pattern> and display it + with the hilite attribute, optionally executing <response>. - With no arguments, /hilite sets the flag %{hilite} to 1 (on). This flag - enables hilite and other attributes on triggers. It is on by default. + With no arguments, /hilite sets the flag %{hilite} to 1 (on). This flag + enables hilite and other attributes on triggers. It is on by default. - The attribute(s) for hilited text are determined by the %{hiliteattr} - variable. The default is bold (hiliteattr=B). Colors are also available - (e.g., hiliteattr=Cgreen); see "attributes" and "color" for more - information. + The attribute(s) for hilited text are determined by the %{hiliteattr} + variable. The default is bold (hiliteattr=B). Colors are also available + (e.g., hiliteattr=Cgreen); see "attributes" and "color" for more + information. - The matching style of the hilite pattern is determined by %{matching}. The - priority of the hilite is determined by %{hpri}. These variables are - examined when the hilite is defined, not when it is executed. + The matching style of the hilite pattern is determined by %{matching}. The + priority of the hilite is determined by %{hpri}. These variables are + examined when the hilite is defined, not when it is executed. - If /hilite does not create a new macro, it returns 0. Otherwise, it returns - the number of the new macro (useful in /undefn and /edit). + If /hilite does not create a new macro, it returns 0. Otherwise, it returns + the number of the new macro (useful in /undefn and /edit). - The standard library also defines /hilite_page and /hilite_whisper which - hilite several different commonly used page and whisper formats. + The standard library also defines /hilite_page and /hilite_whisper which + hilite several different commonly used page and whisper formats. /hilite <pattern> [=<response>] is equivalent to - /def -ah -t"<pattern>" [=<response>]. + /def -ah -t"<pattern>" [=<response>]. - Example: + Example: /hilite {*} tried to kill you! - With the default settings, any line matching that pattern will appear bold. + With the default settings, any line matching that pattern will appear bold. - To hilite messages generated by tf, see hooks. + To hilite messages generated by tf, see hooks. - See: triggers, patterns, attributes, /def, /nohilite, /partial + See: triggers, patterns, attributes, /def, /nohilite, /partial &/histsize /histsize - Usage: + Usage: /HISTSIZE [-lig] [-w[<world>]] [<size>] ____________________________________________________________________________ - Options: - -l local history - -i input history - -g global history (default) - -w<world> - world history + Options: + -l local history + -i input history + -g global history (default) + -w<world> + world history - If <size> is not given, /histsize reports the maximum number of lines that - can be stored in the specified history. + If <size> is not given, /histsize reports the maximum number of lines that + can be stored in the specified history. - If <size> is given, /histsize changes the maximum size of the specified - history to <size>. 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. + If <size> is given, /histsize changes the maximum size of the specified + history to <size>. 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. - /histsize returns 0 for failure, and the size of the history otherwise. + /histsize returns 0 for failure, and the size of the history otherwise. - The %{histsize} variable can be used to set the default size of world - histories before they are created. + The %{histsize} variable can be used to set the default size of world + histories before they are created. - See: history, %histsize + See: history, %histsize &/hook /hook - Usage: + Usage: /HOOK <event>[ <pattern>] [= <body>] /HOOK [OFF|ON] ____________________________________________________________________________ - Creates a macro which will execute <body> when <event> occurs and the - event's arguments match the optional <pattern>. The <event> may be a single - event or a list of events separated by '|'. If omitted, <pattern> will - default to "*". + Creates a macro which will execute <body> when <event> occurs and the + event's arguments match the optional <pattern>. The <event> may be a single + event or a list of events separated by '|'. If omitted, <pattern> will + default to "*". - /hook with no arguments displays the state of the %{hook} flag. /hook with - an argument of ON or OFF sets the %{hook} flag, which determines if hooks - will execute their associated macros. + /hook with no arguments displays the state of the %{hook} flag. /hook with + an argument of ON or OFF sets the %{hook} flag, which determines if hooks + will execute their associated macros. - The matching style of the hook pattern is determined by %{matching}. This - variable is examined when the hook is defined, not when it is executed. + The matching style of the hook pattern is determined by %{matching}. This + variable is examined when the hook is defined, not when it is executed. - Defining a hook will not replace an existing hook on the same event, but - rather creates an additional hook macro on the event. The macro or macros - to be executed are chosen by the normal priority rules. + Defining a hook will not replace an existing hook on the same event, but + rather creates an additional hook macro on the event. The macro or macros + to be executed are chosen by the normal priority rules. - See the section "hooks" for details on hook operation, a list of event - names, and examples. + See the section "hooks" for details on hook operation, a list of event + names, and examples. - If /hook does not create a new macro, it returns 0. Otherwise, it returns - the number of the new macro (useful in /undefn and /edit). + If /hook does not create a new macro, it returns 0. Otherwise, it returns + the number of the new macro (useful in /undefn and /edit). /hook <event>[ <pattern>] [=<response>] is equivalent to - /def -h"<event>[ <pattern>]" [=<response>]. + /def -h"<event>[ <pattern>]" [=<response>]. - Example: + Example: /hook MAIL = /sh mutt - will automatically invoke "mutt" to read mail when it arrives. + will automatically invoke "mutt" to read mail when it arrives. - See: hooks, macros, evaluation, patterns, /def, /unhook + See: hooks, macros, evaluation, patterns, /def, /unhook &/if &/then @@ -1628,49 +1628,49 @@ ftime() /if - Usage: + Usage: /IF (expr) list [ /ELSEIF (expr) list ]... [ /ELSE list ] /ENDIF /IF list /THEN list [ /ELSEIF list /THEN list ]... [ /ELSE list ] /ENDIF ____________________________________________________________________________ - <List> is any list of commands. The return value of a <list> is the return - value of the last command executed in the <list>. Note that each <list> - must be terminated by "%;". + <List> is any list of commands. The return value of a <list> is the return + value of the last command executed in the <list>. Note that each <list> + must be terminated by "%;". - <expr> is any expression, and must be surrounded by parentheses. + <expr> is any expression, and must be surrounded by parentheses. - The <list> or <expr> following the /IF is executed or evaluated. If the - result is non-zero, the next <list> is executed. Otherwise, this is - repeated for each /ELSEIF. If none of the /IF or /ELSEIF <list>s or <expr>s - return non-zero, the /ELSE <list> is executed if there is one. + The <list> or <expr> following the /IF is executed or evaluated. If the + result is non-zero, the next <list> is executed. Otherwise, this is + repeated for each /ELSEIF. If none of the /IF or /ELSEIF <list>s or <expr>s + return non-zero, the /ELSE <list> is executed if there is one. - The return value of the /IF.../ENDIF statement is undefined. + The return value of the /IF.../ENDIF statement is undefined. - /IF (expr) body%; /ENDIF + /IF (expr) body%; /ENDIF is equivalent to - /IF /TEST expr%; /THEN body%; /ENDIF - except that in the former, <expr> does not undergo macro body substitution. + /IF /TEST expr%; /THEN body%; /ENDIF + except that in the former, <expr> does not undergo macro body substitution. - When /IF is used on the command line, "%;" command separation is done even - if %sub=off. Of course, full substitution will be done if %sub=full. + When /IF is used on the command line, "%;" command separation is done even + if %sub=off. Of course, full substitution will be done if %sub=full. - If <list> is a server (mud) command, the condition being tested is whether - the command is sent successfully; that is, whether there is a current - socket. 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 "/if rob corpse%; /then ..." will not have the effect you - probably want. To achieve that effect, you should define a trigger on each - of the possible server responses, before you send your command. + If <list> is a server (mud) command, the condition being tested is whether + the command is sent successfully; that is, whether there is a current + socket. 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 "/if rob corpse%; /then ..." will not have the effect you + probably want. To achieve that effect, you should define a trigger on each + of the possible server responses, before you send your command. - Example: + Example: /if (TERM !~ "dumb") /visual on%; /endif - will do "/visual on" if your %{TERM} is not "dumb". + will do "/visual on" if your %{TERM} is not "dumb". - See: evaluation, expressions, /test, /def -E, + See: evaluation, expressions, /test, /def -E, &builtins &commands @@ -1678,109 +1678,109 @@ ftime() index - Commands marked with '+' are new in the current version. Commands marked - with '*' have changed significantly in the current version. - - *ADDWORLD *FG LISTVAR REPLACE TOGGLE - *AT FINGER LISTWORLDS *RESTRICT TR - BAMF FOR LOAD RETURN TRIG - BEEP GAG LOCALECHO +RUNTIME *TRIGGER - *BIND GETFILE LOG SAVE UNBIND - BREAK GRAB mapping SAVEWORLD UNDEF - CAT HELP *MORE *SEND UNDEFN - CHANGES HILITE NOHILITE SET UNDEFT - *CONNECT HISTSIZE PARTIAL SETENV UNHOOK - DC HOOK *PASTE SH UNSET - *DEF IF *PS SHIFT UNTRIG - *DOKEY INPUT PURGE spelling UNWORLD - *ECHO KILL PURGEWORLD SUB VERSION - *EDIT LCD PUTFILE SUBSTITUTE WATCHDOG - ESCAPE LET *QUIT SUSPEND WATCHNAME - *EVAL/NOT +LIMIT *QUOTE TELNET WHILE - EXIT list commands quoter.tf TEST WORLD - EXPORT LIST *RECALL *textutil.tf - EXPR *LISTSOCKETS RECORDLINE TICK - +FEATURES LISTSTREAMS *REPEAT TIME - - See also: intro, topics + Commands marked with '+' are new in the current version. Commands marked + with '*' have changed significantly in the current version. + + *ADDWORLD *FG LISTVAR REPLACE TOGGLE + *AT FINGER LISTWORLDS *RESTRICT TR + BAMF FOR LOAD RETURN TRIG + BEEP GAG LOCALECHO +RUNTIME *TRIGGER + *BIND GETFILE LOG SAVE UNBIND + BREAK GRAB mapping SAVEWORLD UNDEF + CAT HELP *MORE *SEND UNDEFN + CHANGES HILITE NOHILITE SET UNDEFT + *CONNECT HISTSIZE PARTIAL SETENV UNHOOK + DC HOOK *PASTE SH UNSET + *DEF IF *PS SHIFT UNTRIG + *DOKEY INPUT PURGE spelling UNWORLD + *ECHO KILL PURGEWORLD SUB VERSION + *EDIT LCD PUTFILE SUBSTITUTE WATCHDOG + ESCAPE LET *QUIT SUSPEND WATCHNAME + *EVAL/NOT +LIMIT *QUOTE TELNET WHILE + EXIT list commands quoter.tf TEST WORLD + EXPORT LIST *RECALL *textutil.tf + EXPR *LISTSOCKETS RECORDLINE TICK + +FEATURES LISTSTREAMS *REPEAT TIME + + See also: intro, topics &/input /input - Usage: + Usage: /INPUT <text> ____________________________________________________________________________ - Enters <text> into the input buffer as if it had been typed at the keyboard, - without deleting the current contents of the input buffer. + Enters <text> into the input buffer as if it had been typed at the keyboard, + without deleting the current contents of the input buffer. - /Input is perhaps most useful in combination with /bind, to create short key - sequences that expand to longer text. For example, if you have this - binding: + /Input is perhaps most useful in combination with /bind, to create short key + sequences that expand to longer text. For example, if you have this + binding: - /bind ^[oj = /input OliverJones + /bind ^[oj = /input OliverJones - and then type "page ^[oj = snausages!" at the keyboard, it will appear in - the input window as "page OliverJones = snausages!". + and then type "page ^[oj = snausages!" at the keyboard, it will appear in + the input window as "page OliverJones = snausages!". - See: /bind, /grab + See: /bind, /grab &/ismacro /ismacro - Usage: + Usage: /ISMACRO <macro-options> ____________________________________________________________________________ - If <macro-options> matches one or more existing macros, /ismacro returns the - number of the last matching macro; otherwise, /ismacro returns 0. - <Macro-options> may include any of the options accepted by /list. If -m is - not specified, %{matching} is used. + If <macro-options> matches one or more existing macros, /ismacro returns the + number of the last matching macro; otherwise, /ismacro returns 0. + <Macro-options> may include any of the options accepted by /list. If -m is + not specified, %{matching} is used. - Example: + Example: /if /!ismacro -b"^X*"%; /then /bind ^X = /foobar%; /endif - See: /list, macros + See: /list, macros &/isvar /isvar - Usage: + Usage: /ISVAR <name> ____________________________________________________________________________ - Returns 1 if variable <name> is set, 0 otherwise. + Returns 1 if variable <name> is set, 0 otherwise. - Example: + Example: /if (!isvar('LANG')) /set LANG=en_US%; /endif - See: /listvar, variables + See: /listvar, variables &/kill /kill - Usage: + Usage: - /KILL <pid>... + /KILL <pid>... ____________________________________________________________________________ - For each <pid> given, /kill terminates the corresponding process (/quote or - /repeat command). The pid of a process can be determined from the return - value of the /quote or /repeat, the /ps command, or a PROCESS hook. + For each <pid> given, /kill terminates the corresponding process (/quote or + /repeat command). The pid of a process can be determined from the return + value of the /quote or /repeat, the /ps command, or a PROCESS hook. - Bug: /kill on a pending /quote ! will block until the shell process exits. - The block can be broken with an interrupt. + Bug: /kill on a pending /quote ! will block until the shell process exits. + The block can be broken with an interrupt. - See: processes, /quote, /repeat, /ps + See: processes, /quote, /repeat, /ps &/cd &/pwd @@ -1788,38 +1788,38 @@ index /lcd - Usage: + Usage: /LCD [<dir>] /CD [<dir>] /PWD ____________________________________________________________________________ - /lcd and /cd change to a new working directory. If <dir> is omitted with - /lcd, the current directory is displayed (if supported on your system). If - <dir> is omitted with /cd, %{HOME} is assumed. + /lcd and /cd change to a new working directory. If <dir> is omitted with + /lcd, the current directory is displayed (if supported on your system). If + <dir> is omitted with /cd, %{HOME} is assumed. - The <dir> name is expanded as described under "filenames". + The <dir> name is expanded as described under "filenames". - /pwd displays the current working directory (if supported on your system). + /pwd displays the current working directory (if supported on your system). &/let /let - Usage: + Usage: /LET <name>=<value> /LET <name> <value> ____________________________________________________________________________ - Assigns <value> to variable <name> in the current local scope. Can only be - used during macro expansion. The variable will be destroyed when the scope. - in which it was created exits. + Assigns <value> to variable <name> in the current local scope. Can only be + used during macro expansion. The variable will be destroyed when the scope. + in which it was created exits. - Note to lisp users: this is nothing like lisp's let. + Note to lisp users: this is nothing like lisp's let. - See: /set, variables + See: /set, variables &/limit &/relimit @@ -1827,50 +1827,50 @@ index /limit - Usage: + Usage: /LIMIT [-v] [-a] [-m<style>] [<pattern>] /RELIMIT /UNLIMIT ____________________________________________________________________________ - /Limit redraws the window, showing only lines that match <pattern>. It is - then possible to scroll forward and backward within the "limited" window. - The limit affects only the current screen, and stays in effect until - /unlimit is called. + /Limit redraws the window, showing only lines that match <pattern>. It is + then possible to scroll forward and backward within the "limited" window. + The limit affects only the current screen, and stays in effect until + /unlimit is called. - /Limit options: - -v show only lines that don't match <pattern> - -a show only lines that have attributes - -m<style> - use matching style (simple, glob, or regexp), instead of the default - %{matching}. + /Limit options: + -v show only lines that don't match <pattern> + -a show only lines that have attributes + -m<style> + use matching style (simple, glob, or regexp), instead of the default + %{matching}. - If <pattern> is given, only lines in the given range that match <pattern> - will be recalled. The matching style is determined by the -m option if - given, %{matching} otherwise. By default, the @more status field does not - count lines that are omitted by /limit. + If <pattern> is given, only lines in the given range that match <pattern> + will be recalled. The matching style is determined by the -m option if + given, %{matching} otherwise. By default, the @more status field does not + count lines that are omitted by /limit. - With no options or arguments, /limit returns 1 if a limit is in effect, 0 if - not. + With no options or arguments, /limit returns 1 if a limit is in effect, 0 if + not. - /unlimit disables the /limit so all lines are displayed. + /unlimit disables the /limit so all lines are displayed. - During /limit, scrolling to any point, including the bottom, results in a - More prompt that shows the number of lines (possibly 0) below the status - line. In this state, /unlimit will leave the bottom visible line where it - is, and redraw the unlimited lines above it. Thus, you can use /limit to - find a line you are interested in, use the scrolling keys to position that - line at the bottom of the window, then /unlimit to see the context of that - line. But if you attempt to scroll past the bottom during /limit, the More - prompt changes to "LIMIT ON"; in this state, /unlimit will redraw with the - previously invisible last line at the bottom of the screen. + During /limit, scrolling to any point, including the bottom, results in a + More prompt that shows the number of lines (possibly 0) below the status + line. In this state, /unlimit will leave the bottom visible line where it + is, and redraw the unlimited lines above it. Thus, you can use /limit to + find a line you are interested in, use the scrolling keys to position that + line at the bottom of the window, then /unlimit to see the context of that + line. But if you attempt to scroll past the bottom during /limit, the More + prompt changes to "LIMIT ON"; in this state, /unlimit will redraw with the + previously invisible last line at the bottom of the screen. - /relimit repeats the last /limit. + /relimit repeats the last /limit. - The default keybinding ^[L toggles the last limit off and on. + The default keybinding ^[L toggles the last limit off and on. - See: /recall + See: /recall &/listbind &/listdef @@ -1882,79 +1882,79 @@ index /list - Usage: + Usage: /LIST [-s] [<macro-options>] [<name>] [= <body>] ____________________________________________________________________________ - Lists macros having all the specified options. Except for "-s", each option - is compared against a macro's option, and the macro selected only if the - options match. Omitted options are "don't care", and will not be used in - the comparison. Thus, with no arguments, /list will list all non-invisible - macros. + Lists macros having all the specified options. Except for "-s", each option + is compared against a macro's option, and the macro selected only if the + options match. Omitted options are "don't care", and will not be used in + the comparison. Thus, with no arguments, /list will list all non-invisible + macros. #list options - Options: - -s List macros in short format. - -S Sort macros by name. - -m<matching> - Determines matching style used for comparison of string fields - (trigger, keybinding, keyname, hook, worldtype, name, and body). - This is not compared against the -m options of macros. If omitted, - the style is determined by %{matching}. - -t<pattern> - -b<pattern> - -B<pattern> - -E<pattern> - -T<pattern> - Matches macros with a corresponding /def option whose - option-argument matches <pattern>. <pattern>. An option with no - pattern matches all macros that have that option, regardless of the - value of the option-argument. A "{}" glob pattern or "^$" regexp - can be used to match macros that don't have that option, - -h["<event>[ <pattern>]"] - Matches macros with hooks matching <event> and <pattern>. "-h" by - itself matches all non-empty hooks; "-h0" matches only macros - without hooks. - -a<attrs> - Matches macros having one or more of the display attributes in - <attrs>. - -P<part><attrs> - Matches macros having a -P<part> with one or more of the display - attributes in <attrs>. - -i Matches invisible macros as well as normal macros. - -I Matches only invisible macros. - <name> A pattern that macro names must match. The glob pattern "{}" or - regexp "^$" will match only macros without names. If <name> starts - with "#", it is compared against macro numbers, instead of as a - pattern against macro names. - = <body> - <body> is a pattern that macro bodies must match. The glob pattern - "{}", or the regexp "^$" or the simple pattern "" will match - bodyless macros only. + Options: + -s List macros in short format. + -S Sort macros by name. + -m<matching> + Determines matching style used for comparison of string fields + (trigger, keybinding, keyname, hook, worldtype, name, and body). + This is not compared against the -m options of macros. If omitted, + the style is determined by %{matching}. + -t<pattern> + -b<pattern> + -B<pattern> + -E<pattern> + -T<pattern> + Matches macros with a corresponding /def option whose + option-argument matches <pattern>. <pattern>. An option with no + pattern matches all macros that have that option, regardless of the + value of the option-argument. A "{}" glob pattern or "^$" regexp + can be used to match macros that don't have that option, + -h["<event>[ <pattern>]"] + Matches macros with hooks matching <event> and <pattern>. "-h" by + itself matches all non-empty hooks; "-h0" matches only macros + without hooks. + -a<attrs> + Matches macros having one or more of the display attributes in + <attrs>. + -P<part><attrs> + Matches macros having a -P<part> with one or more of the display + attributes in <attrs>. + -i Matches invisible macros as well as normal macros. + -I Matches only invisible macros. + <name> A pattern that macro names must match. The glob pattern "{}" or + regexp "^$" will match only macros without names. If <name> starts + with "#", it is compared against macro numbers, instead of as a + pattern against macro names. + = <body> + <body> is a pattern that macro bodies must match. The glob pattern + "{}", or the regexp "^$" or the simple pattern "" will match + bodyless macros only. # - Other options allowed by /def may be used with /list, and are compared - directly to macros. + Other options allowed by /def may be used with /list, and are compared + directly to macros. - The return value of /list is the number of the last macro listed, or 0 if no - macros were listed (because of error or none matched the specified options). + The return value of /list is the number of the last macro listed, or 0 if no + macros were listed (because of error or none matched the specified options). - The standard library also defines the macros /listbind, /listdef, /listgag, - /listhilite, /listfullhilite, /listpartial, /listhook, and /listtrig, which - list macros of the appropriate type. + The standard library also defines the macros /listbind, /listdef, /listgag, + /listhilite, /listfullhilite, /listpartial, /listhook, and /listtrig, which + list macros of the appropriate type. - Example: + Example: /list -mregexp -n0 -t -aurh ^foo = - will list all macros whose names begin with "foo"; have a trigger; are not - multi-shots; have any of the underline, reverse, or hilite attributes; and - have an empty body. + will list all macros whose names begin with "foo"; have a trigger; are not + multi-shots; have any of the underline, reverse, or hilite attributes; and + have an empty body. - To list functions for named keys, try "/list -i key_*". + To list functions for named keys, try "/list -i key_*". - See: macros, triggers, patterns, attributes, library, /def + See: macros, triggers, patterns, attributes, library, /def &/car &/cdr @@ -1975,75 +1975,75 @@ index list commands - Usage: + Usage: /REQUIRE lisp.tf ____________________________________________________________________________ - These commands operate on lists of words, and are similar to those in lisp. - They all give their results with /echo, and are intended to be used in - $(...) command substitution to capture the result. + These commands operate on lists of words, and are similar to those in lisp. + They all give their results with /echo, and are intended to be used in + $(...) command substitution to capture the result. - /car <list> - Echo first word. (Same as /first). - /cdr <list> - Echo all words after first. (Same as /rest). - /cadr <list> - Echo second word. - /cddr <list> - Echo all words after second. - /caddr <list> - Echo third word. - /cdddr <list> - Echo all words after third. + /car <list> + Echo first word. (Same as /first). + /cdr <list> + Echo all words after first. (Same as /rest). + /cadr <list> + Echo second word. + /cddr <list> + Echo all words after second. + /caddr <list> + Echo third word. + /cdddr <list> + Echo all words after third. - /length <list> - Echo number of words in <list>. + /length <list> + Echo number of words in <list>. - /reverse <list> - Reverse the order of the words in <list>. + /reverse <list> + Reverse the order of the words in <list>. - /mapcar <cmd> <list> - Execute "<cmd> <word>" for each word in <list>. - /maplist <cmd> <list> - Execute "<cmd> <list>" repeatedly, removing the first word from - <list> each time, until <list> is empty. + /mapcar <cmd> <list> + Execute "<cmd> <word>" for each word in <list>. + /maplist <cmd> <list> + Execute "<cmd> <list>" repeatedly, removing the first word from + <list> each time, until <list> is empty. - /remove <word> <list> - Echo <list> with all occurrences of <word> removed. + /remove <word> <list> + Echo <list> with all occurrences of <word> removed. - /unique <list> - Remove all duplicate words from <list>. Note: /unique is very slow - on long lists. + /unique <list> + Remove all duplicate words from <list>. Note: /unique is very slow + on long lists. - See: /nth + See: /nth &/listsockets /listsockets - Usage: + Usage: /LISTSOCKETS [-sn] [-m<style>] [-S<field>] [-T<type>] [<name>] ____________________________________________________________________________ - Lists the sockets to which TinyFugue is connected. + Lists the sockets to which TinyFugue is connected. - Options and arguments: - -s short form, list only world names - -n print host and port in numeric form - -m<style> - Use <style> for pattern matching in other options (default: - %{matching}). - -S<field> - Sort sockets by <field>. <Field> may be "name", "type", - "character", "host", "port", "lines", "idle", or "-" (don't sort; - this is the default). Only the first character is necessary. - -T<type> - list only worlds with a type matching the pattern <type>. - <name> list only worlds with a name matching the pattern <name>. + Options and arguments: + -s short form, list only world names + -n print host and port in numeric form + -m<style> + Use <style> for pattern matching in other options (default: + %{matching}). + -S<field> + Sort sockets by <field>. <Field> may be "name", "type", + "character", "host", "port", "lines", "idle", or "-" (don't sort; + this is the default). Only the first character is necessary. + -T<type> + list only worlds with a type matching the pattern <type>. + <name> list only worlds with a name matching the pattern <name>. - The output will look something like this (unless the -s option is given): + The output will look something like this (unless the -s option is given): LINES IDLE TYPE NAME HOST PORT 10+ 48 13h tiny.muck Cave tcp.com 2283 @@ -2051,114 +2051,114 @@ list commands 0 7s telnet whitehouse.gov, whitehouse.gov smtp ? 0 15s tiny SlowMUD slow.machine.com 4201 - The columns and their meanings are: - unlabeled first column - "*" marks the current socket. - unlabeled second column - the state of the socket is one of: - ! dead - ? hostname lookup or network connection is incomplete - C/c an established normal connection - S/s an established connection currently in telnet subnegotiation - X/x an established SSL connection - O an open connectionless socket - A lowercase state character indicates the connection is using MCCP. - unlabeled third column - "P" if the connection is proxied - LINES for a background socket, the number of old (seen) and new (unseen) - lines past the bottom of the socket's window (ignoring any limit - that may be in effect on that window); or, "foregnd" for a - foreground socket. - IDLE how long since the last text was received on the socket. - TYPE the type of the world (set with /addworld -T). - NAME the name of the world associated with the socket. - HOST the host to which the socket is connected. - PORT the port to which the socket is connected. - - The return value of /listsockets is the number of sockets listed. - - See: sockets, %background, /connect, /fg, nactive(), idle() + The columns and their meanings are: + unlabeled first column + "*" marks the current socket. + unlabeled second column + the state of the socket is one of: + ! dead + ? hostname lookup or network connection is incomplete + C/c an established normal connection + S/s an established connection currently in telnet sub-negotiation + X/x an established SSL connection + O an open connectionless socket + A lowercase state character indicates the connection is using MCCP. + unlabeled third column + "P" if the connection is proxied + LINES for a background socket, the number of old (seen) and new (unseen) + lines past the bottom of the socket's window (ignoring any limit + that may be in effect on that window); or, "foregnd" for a + foreground socket. + IDLE how long since the last text was received on the socket. + TYPE the type of the world (set with /addworld -T). + NAME the name of the world associated with the socket. + HOST the host to which the socket is connected. + PORT the port to which the socket is connected. + + The return value of /listsockets is the number of sockets listed. + + See: sockets, %background, /connect, /fg, nactive(), idle() &/liststreams /liststreams - Usage: + Usage: /LISTSTREAMS ____________________________________________________________________________ - Lists tfio streams opened by tfopen(). The tfin, tfout, and tferr streams - are not included. + Lists tfio streams opened by tfopen(). The tfin, tfout, and tferr streams + are not included. - The columns and their meanings are: - HANDLE The handle returned by tfopen(). - MODE The mode argument given to tfopen(). - FLUSH Whether automatic flushing is enabled. See tfflush(). - NAME The name argument, if any, given to tfopen(). Files of mode "q" do - not need a name, but you may wish to give them one anyway so it - appears here. + The columns and their meanings are: + HANDLE The handle returned by tfopen(). + MODE The mode argument given to tfopen(). + FLUSH Whether automatic flushing is enabled. See tfflush(). + NAME The name argument, if any, given to tfopen(). Files of mode "q" do + not need a name, but you may wish to give them one anyway so it + appears here. - The return value of /liststreams is the number of open streams listed. + The return value of /liststreams is the number of open streams listed. - See: tfio + See: tfio &/listvar /listvar - Usage: + Usage: /LISTVAR [-m<matching>] [-gxsv] [<name> [<value>]] ____________________________________________________________________________ - Options: - -m<matching> - Determines matching style used for comparison of <name> and <value>. - If omitted, the style is determined by %{matching}. - -g List only global (unexported) variables. - -x List only variables that are exported to the environment. - -s Short format: list variable names only. - -v List values only. + Options: + -m<matching> + Determines matching style used for comparison of <name> and <value>. + If omitted, the style is determined by %{matching}. + -g List only global (unexported) variables. + -x List only variables that are exported to the environment. + -s Short format: list variable names only. + -v List values only. - /Listvar lists values of variables whose name and value match <name> and - <value> according to <matching>, sorted by name. If neither -g nor -x is - given, global and environment variables are listed. + /Listvar lists values of variables whose name and value match <name> and + <value> according to <matching>, sorted by name. If neither -g nor -x is + given, global and environment variables are listed. - The return value of /listvar is the number of variables listed. + The return value of /listvar is the number of variables listed. - See: variables, /set, /setenv, /export, /let, /unset + See: variables, /set, /setenv, /export, /let, /unset &/listworlds /listworlds - Usage: + Usage: /LISTWORLDS [-cus] [-m<style>] [-S<field>] [-T<type>] [<name>] ____________________________________________________________________________ - Lists world definitions. + Lists world definitions. - Options and arguments: - -m<style> - Use <style> for pattern matching of <type> and <name> patterns. - (default: %{matching}). - -s Display short format (world names only). - -c Display command format (including passwords). - -S<field> - Sort worlds by <field>. <Field> may be "name" (the default), - "type", "character", "host", "port", or "-" (don't sort). Only the - first character is necessary. - -u Include unnamed temporary worlds in the listing. - -T<type> - List only worlds with a type matching the pattern <type>. - <name> List only worlds with a name matching the pattern <name>. + Options and arguments: + -m<style> + Use <style> for pattern matching of <type> and <name> patterns. + (default: %{matching}). + -s Display short format (world names only). + -c Display command format (including passwords). + -S<field> + Sort worlds by <field>. <Field> may be "name" (the default), + "type", "character", "host", "port", or "-" (don't sort). Only the + first character is necessary. + -u Include unnamed temporary worlds in the listing. + -T<type> + List only worlds with a type matching the pattern <type>. + <name> List only worlds with a name matching the pattern <name>. - If neither -s nor -c are given, a table format is used, and passwords are - not shown. The return value of /listworlds is the number of worlds listed. + If neither -s nor -c are given, a table format is used, and passwords are + not shown. The return value of /listworlds is the number of worlds listed. - See: worlds, patterns + See: worlds, patterns &/loadbind &/loaddef @@ -2173,7 +2173,7 @@ list commands /load - Usage: + Usage: /LOAD [-q] <file> /REQUIRE [-q] <file> @@ -2181,52 +2181,52 @@ list commands /LOADED <token> ____________________________________________________________________________ - /Load and /require both read and execute commands from <file>. They are - identical, except that if <file> calls /loaded and has already been read - once, /require will not read it again (but the LOAD message/hook will still - be displayed/called). + /Load and /require both read and execute commands from <file>. They are + identical, except that if <file> calls /loaded and has already been read + once, /require will not read it again (but the LOAD message/hook will still + be displayed/called). - "/Loaded <token>" should be the first command in a file that is designed to - be loaded only once with /require. <Token> should be a string that does not - contain space or glob metacharacters, and is different than the token used - by any other /loaded call. The file's full name is usually a good choice - for <token>. + "/Loaded <token>" should be the first command in a file that is designed to + be loaded only once with /require. <Token> should be a string that does not + contain space or glob meta-characters, and is different than the token used + by any other /loaded call. The file's full name is usually a good choice + for <token>. - Options: - -q Do not echo the "% Loading commands from <file>" message in this - /load call or any /load calls in <file>. (but the LOAD hook will - still be called). + Options: + -q Do not echo the "% Loading commands from <file>" message in this + /load call or any /load calls in <file>. (but the LOAD hook will + still be called). - The file may contain any legal TinyFugue commands. Blank lines and lines - beginning with ';' or '#' are ignored. Any leading whitespace on a line is - stripped. Any line ending in '\' will have the following line joined to it - (after leading spaces are stripped). A '%' preceding a '\' eliminates its - special meaning. + The file may contain any legal TinyFugue commands. Blank lines and lines + beginning with ';' or '#' are ignored. Any leading whitespace on a line is + stripped. Any line ending in '\' will have the following line joined to it + (after leading spaces are stripped). A '%' preceding a '\' eliminates its + special meaning. - The <file> name is expanded as described under "filenames". + The <file> name is expanded as described under "filenames". - If the COMPRESS_SUFFIX and COMPRESS_READ macros are defined, the file will - be automatically uncompressed if needed. + If the COMPRESS_SUFFIX and COMPRESS_READ macros are defined, the file will + be automatically uncompressed if needed. - If the expanded filename is not an absolute path name, TF will search first - in the current directory (which can be changed with /lcd), and then in the - list of directories named by %{TFPATH}. If %{TFPATH} is blank or unset, the - single directory named by %{TFLIBDIR} is used. + If the expanded filename is not an absolute path name, TF will search first + in the current directory (which can be changed with /lcd), and then in the + list of directories named by %{TFPATH}. If %{TFPATH} is blank or unset, the + single directory named by %{TFLIBDIR} is used. - A /load may be aborted early with the /exit command in the file. + A /load may be aborted early with the /exit command in the file. - Loaded files may be given any name, but names ending in ".tf" are - recommended. + Loaded files may be given any name, but names ending in ".tf" are + recommended. - /Load and /require return 1 if successful (for /require, this includes not - needing to read the file), or 0 if not successful. /Loaded does not return - if the file that calls it has already been loaded. + /Load and /require return 1 if successful (for /require, this includes not + needing to read the file), or 0 if not successful. /Loaded does not return + if the file that calls it has already been loaded. - The standard macro library also defines the commands /loaddef, /loadbind, - /loadhilite, /loadgag, /loadtrig, /loadhook, and /loadworld. These macros - will load from a default file if no file is specified. + The standard macro library also defines the commands /loaddef, /loadbind, + /loadhilite, /loadgag, /loadtrig, /loadhook, and /loadworld. These macros + will load from a default file if no file is specified. - See: macros, library, /exit, /def, /save, /lcd, filenames, compression + See: macros, library, /exit, /def, /save, /lcd, filenames, compression &%always_echo &always_echo @@ -2234,112 +2234,123 @@ list commands /localecho - Usage: + Usage: /LOCALECHO [ON|OFF] ____________________________________________________________________________ - /Localecho with no arguments returns 1 if local echoing is enabled for the - current socket, 0 otherwise. TF echoes its input by default, unless the - server has negotiated otherwise. + /Localecho with no arguments returns 1 if local echoing is enabled for the + current socket, 0 otherwise. TF echoes its input by default, unless the + server has negotiated otherwise. - /Localecho with an argument attempts to enable or disable echoing for the - current socket. If the server is not known to support TELNET protocol, - "/localecho [ON|OFF]" does nothing, and returns 0. ON tells the server DONT - ECHO; if the server acknowledges (as it must according to TELNET protocol), - tf will echo its own input. OFF tells the server to DO ECHO; if the server - acknowledges, tf will not echo its own input, expecting the server to do it. - The actual change of state takes place after the server agrees, which may be - delayed by network latency ("netlag"). + /Localecho with an argument attempts to enable or disable echoing for the + current socket. If the server is not known to support TELNET protocol, + "/localecho [ON|OFF]" does nothing, and returns 0. ON tells the server DONT + ECHO; if the server acknowledges (as it must according to TELNET protocol), + tf will echo its own input. OFF tells the server to DO ECHO; if the server + acknowledges, tf will not echo its own input, expecting the server to do it. + The actual change of state takes place after the server agrees, which may be + delayed by network latency ("netlag"). - Note that tf does not transmit input until a newline is pressed, and the - server can not echo it until it is received; so, with /localecho off, your - typing will not be visible until you hit return, at which time the server - may echo back the entire line. + Note that tf does not transmit input until a newline is pressed, and the + server can not echo it until it is received; so, with /localecho off, your + typing will not be visible until you hit return, at which time the server + may echo back the entire line. - Some mud servers use the ECHO option to disable local echo during password - entry. Telnet servers, however, try to disable local echo for the entire - session, which would interfere with many useful tf features. Hooks defined - in the standard library use /localecho to override the telnet server - automatically. + Some mud servers use the ECHO option to disable local echo during password + entry. Telnet servers, however, try to disable local echo for the entire + session, which would interfere with many useful tf features. Hooks defined + in the standard library use /localecho to override the telnet server + automatically. - /Localecho is intended to be called by library macros, and should not need - to be called by the user. /Localecho obsoletes %{always_echo}. + /Localecho is intended to be called by library macros, and should not need + to be called by the user. /Localecho obsoletes %{always_echo}. - The TELNET ECHO option is defined in RFC 857. + The TELNET ECHO option is defined in RFC 857. - See: prompts, %telopt, /telnet + See: prompts, %telopt, /telnet &/log /log - Usage: + Usage: /LOG [-ligw[<world>]] [OFF|ON|<file>] ____________________________________________________________________________ - Enables or disables logging, or lists currently open log files. An [-ligw] - option specifies which history is used (only one can be used). The - [OFF|ON|<file>] argument specifies what action is taken on that history. - - Options: - -w<world> - Output from <world> only. - -w Output from the current world. - -l Local output (i.e., output generated by TF). - -i Keyboard input. - -g Global output (all worlds and local TF output). - - Arguments: - OFF Disable specified log, or all logs if unspecified. - ON Log to ${LOGFILE}; -g is assumed if -ligw not given. - <file> Log to <file>; -g is assumed if -ligw not given. - (none) With no option, lists all open logs. - (none) With an -ligw option, same as "ON". - - When logging is enabled for a history, lines that are normally recorded in - that history are also appended to the log file (unless the line has the "L" - nolog attribute). The previously existing contents of the file, if any, are - not affected. - - It is possible to have multiple log files open simultaneously. It is also - possible to have several types of output go to the same log file, by using - several /log commands. For example, + Enables or disables logging, or lists currently open log files. An [-ligw] + option specifies which history is used (only one can be used). The + [OFF|ON|<file>] argument specifies what action is taken on that history. + + Options: + -w<world> + Output from <world> only. + -w Output from the current world. + -l Local output (i.e., output generated by TF). + -i Keyboard input. + -g Global output (all worlds and local TF output). + + Arguments: + OFF Disable specified log, or all logs if unspecified. + ON Log to ${LOGFILE}; -g is assumed if -ligw not given. + <file> Log to <file>; -g is assumed if -ligw not given. + (none) With no option, lists all open logs. + (none) With an -ligw option, same as "ON". + + When logging is enabled for a history, lines that are normally recorded in + that history are also appended to the log file (unless the line has the "L" + nolog attribute). The previously existing contents of the file, if any, are + not affected. + + It is possible to have multiple log files open simultaneously. It is also + possible to have several types of output go to the same log file, by using + several /log commands. For example, /log -i tt.log /log -wTT tt.log /log -g on - will send input from the keyboard and output from the world TT to the file - "tt.log", and also send all (global) output to the file named by the LOGFILE - macro. + will send input from the keyboard and output from the world TT to the file + "tt.log", and also send all (global) output to the file named by th LOGFILE e + macro. - This example logs the current world's output to a file whose name contains - the world's name and today's date: + This example logs the current world's output to a file whose name contains + the world's name and today's date: /eval /log -w ${world_name}.$[ftime("%F")] - - The functions of the /logme command in older versions of TF can be performed - with /log -i. - Wrapping will be done in the log file only if the %{wraplog} variable is - "on". + The functions of the /logme command in older versions of TF can be performed + with /log -i. + + Wrapping will be done in the log file only if the %{wraplog} variable is + "on". + + ANSI sequences will be recorded in the log file only if the %{ansi_log} variable + is "on". + + A line can be prepended to the beginning of each logged line using $%{log_prefix}, + but is disabled by default. + + The default value of %{log_time_format}, is + "%H:%M:%S" + + Logging is disabled by default. The default value of ${LOGFILE} is + "tiny.log". - Logging is disabled by default. The default value of ${LOGFILE} is - "tiny.log". + Note: the natural logarithm function was renamed from log() to ln() in + version 5.0, to avoid confusion with /log. - Note: the natural logarithm function was renamed from log() to ln() in - version 5.0, to avoid confusion with /log. + See: %ansi_log, %log_prefix, %log_time_format, %wraplog, + history[22;0m, nlog() fwrite() - See: %wraplog, history, nlog() fwrite() &/logme /logme - Obsolete. See "log". + Obsolete. See "log". &/map &/mark @@ -2353,7 +2364,7 @@ list commands mapping - Usage: + Usage: /REQUIRE map.tf @@ -2367,36 +2378,36 @@ mapping /DOPATH <path> ____________________________________________________________________________ - These commands, similar to those in tintin, help keep track of sequences of - directions between two locations on a mud. When mapping is enabled with - /mark, all mud movement commands (n, s, e, w, ne, sw, nw, se, u, d) that you - type are recorded in the "current path". + These commands, similar to those in tintin, help keep track of sequences of + directions between two locations on a mud. When mapping is enabled with + /mark, all mud movement commands (n, s, e, w, ne, sw, nw, se, u, d) that you + type are recorded in the "current path". - /mark clears the current path and starts recording your movement. + /mark clears the current path and starts recording your movement. - /unmark disables map recording (but does not clear the current path). + /unmark disables map recording (but does not clear the current path). - /path prints the current recorded path. + /path prints the current recorded path. - /revert "undoes" the last movement by deleting it from the path and - executing the opposite movement command. (This was called "/return" prior - to version 4.0). + /revert "undoes" the last movement by deleting it from the path and + executing the opposite movement command. (This was called "/return" prior + to version 4.0). - /map adds <dir> to the current path as if you had actually gone in that - direction. + /map adds <dir> to the current path as if you had actually gone in that + direction. - /unpath deletes the last movement from the path (but does not move you to - your previous position) + /unpath deletes the last movement from the path (but does not move you to + your previous position) - /savepath defines a macro named <name> that will execute the movements in - the currently defined path. (To save this macro to a file, use "/save [-a] - <file> <name>"). + /savepath defines a macro named <name> that will execute the movements in + the currently defined path. (To save this macro to a file, use "/save [-a] + <file> <name>"). - /dopath executes a <path>. <Path> must be a space-separated list of - movement commands with optional repeat counts. For example, "/dopath 10 n e - d 2 w" will execute "n" 10 times, "e" once, "d" once, and "w" twice. + /dopath executes a <path>. <Path> must be a space-separated list of + movement commands with optional repeat counts. For example, "/dopath 10 n e + d 2 w" will execute "n" 10 times, "e" once, "d" once, and "w" twice. - See: /require, speedwalk + See: /require, speedwalk &scroll &pager @@ -2406,78 +2417,78 @@ mapping /more - Usage: + Usage: /MORE [OFF|ON] ____________________________________________________________________________ - Sets the value of the %{more} flag. If the %{more} flag is ON when the - screen or output window fills up, output will stop, and a "More" prompt will - be displayed. With the default keybindings, TAB will scroll one screenful, - PgDn and PgUp will scroll a half screen forward or backward, ^[^N and ^[^P - will scroll one line forward or backward, and ^[j will Jump to the last - screenful. + Sets the value of the %{more} flag. If the %{more} flag is ON when the + screen or output window fills up, output will stop, and a "More" prompt will + be displayed. With the default keybindings, TAB will scroll one screenfull, + PgDn and PgUp will scroll a half screen forward or backward, ^[^N and ^[^P + will scroll one line forward or backward, and ^[j will Jump to the last + screenfull. - Regardless of the setting of the %more flag, you can use "/dokey pause" (^S) - at any time to pause the screen immediately, or use any of the scrolling - commands to scroll backward and forward. After doing so, the "more" prompt - will remain until you reach the bottom line again; after that point, newly - displayed lines will obey the %more flag normally. + Regardless of the setting of the %more flag, you can use "/dokey pause" (^S) + at any time to pause the screen immediately, or use any of the scrolling + commands to scroll backward and forward. After doing so, the "more" prompt + will remain until you reach the bottom line again; after that point, newly + displayed lines will obey the %more flag normally. - In visual mode, with the default status bar settings, the More prompt - displays the number of old lines (i.e., how far you have scrolled backwards) - and the number of new lines you haven't had a chance to see yet (i.e. lines - that arrived since the More prompt first appeared). If you have not - scrolled backwards, only the count of new lines is shown, so the More prompt - looks the same as it would have in version 4.0. If either count would not - fit in the space allotted to it in the More prompt, they may be displayed in - units of thousands (e.g., "17523" would be shown as "17k"). + In visual mode, with the default status bar settings, the More prompt + displays the number of old lines (i.e., how far you have scrolled backwards) + and the number of new lines you haven't had a chance to see yet (i.e. lines + that arrived since the More prompt first appeared). If you have not + scrolled backwards, only the count of new lines is shown, so the More prompt + looks the same as it would have in version 4.0. If either count would not + fit in the space allotted to it in the More prompt, they may be displayed in + units of thousands (e.g., "17523" would be shown as "17k"). - Each socket and open world world has its own window with its own "more" - state. + Each socket and open world world has its own window with its own "more" + state. - If your terminal can't scroll in visual mode, TF will start over at the top - of the output window instead. + If your terminal can't scroll in visual mode, TF will start over at the top + of the output window instead. - See: /dokey, visual, %more, morescroll(), moresize(), status_fields + See: /dokey, visual, %more, morescroll(), moresize(), status_fields &/nogag /nogag - Usage: + Usage: /NOGAG [<pattern>] ____________________________________________________________________________ - Eliminates a macro that is triggered by <pattern> and has the gag attribute. - /nogag with no arguments turns off the flag %{gag}, disabling all gag - attributes. <Pattern> is matched against existing patterns using simple - comparison. + Eliminates a macro that is triggered by <pattern> and has the gag attribute. + /nogag with no arguments turns off the flag %{gag}, disabling all gag + attributes. <Pattern> is matched against existing patterns using simple + comparison. - The flag %{gag} defaults to 1 (on). + The flag %{gag} defaults to 1 (on). - See: triggers, /gag, %gag + See: triggers, /gag, %gag &/nohilite /nohilite - Usage: + Usage: /NOHILITE [<pattern>] ____________________________________________________________________________ - With a <pattern> argument, /nohilite undefines a macro that is triggered by - <pattern> and has the hilite attribute. <Pattern> is matched against - existing patterns using simple comparison. + With a <pattern> argument, /nohilite undefines a macro that is triggered by + <pattern> and has the hilite attribute. <Pattern> is matched against + existing patterns using simple comparison. - With no argument, /nohilite turns off the flag %{hilite}, disabling all - display attributes. + With no argument, /nohilite turns off the flag %{hilite}, disabling all + display attributes. - The flag %{hilite} defaults to 1 (on). + The flag %{hilite} defaults to 1 (on). - See: triggers, /hilite, %hilite + See: triggers, /hilite, %hilite &/first &/last @@ -2485,52 +2496,52 @@ mapping /nth - Usage: + Usage: /FIRST <text> /LAST <text> /NTH <n> <text> ____________________________________________________________________________ - Echoes the first, last, or <n>th word from text. `/first <text>' is - equivalent to `/nth 1 <text>'. + Echoes the first, last, or <n>th word from text. `/first <text>' is + equivalent to `/nth 1 <text>'. - These commands can be useful in command substitutions. For example, to make - "ctrl-O 1" input the first word of the most recent mud output, you could do - this: + These commands can be useful in command substitutions. For example, to make + "ctrl-O 1" input the first word of the most recent mud output, you could do + this: - /bind ^O1 = /input $(/first $(/recall 1)) + /bind ^O1 = /input $(/first $(/recall 1)) - See: parameters, command substitution + See: parameters, command substitution &/partial /partial - Usage: + Usage: /PARTIAL <regexp> ____________________________________________________________________________ - Creates a macro which will hilite the part of a line containing text matched - by the regular expression <regexp>. Remember that regular expressions are - case sensitive. The new macro is a fall-thru, so multiple /partials (and - other triggers) can match the same text. + Creates a macro which will hilite the part of a line containing text matched + by the regular expression <regexp>. Remember that regular expressions are + case sensitive. The new macro is a fall-thru, so multiple /partials (and + other triggers) can match the same text. - The attribute(s) for hilited text are determined by the %{hiliteattr} - variable. The default is bold (hiliteattr=B). Colors are also available. + The attribute(s) for hilited text are determined by the %{hiliteattr} + variable. The default is bold (hiliteattr=B). Colors are also available. - For example, "/partial [Hh]awkeye" will hilite any occurrence of "Hawkeye" - or "hawkeye". + For example, "/partial [Hh]awkeye" will hilite any occurrence of "Hawkeye" + or "hawkeye". - Unlike version 3.2, a partial hilite will be applied to every match on a - line, not just the first match. + Unlike version 3.2, a partial hilite will be applied to every match on a + line, not just the first match. /partial <regexp> is equivalent to /def -Ph -F -t<regexp> - See: attributes, patterns, /hilite, /def + See: attributes, patterns, /hilite, /def &paste_prefix &%paste_prefix @@ -2539,119 +2550,119 @@ mapping /paste - Usage: + Usage: /PASTE [-pnx] [<prefix>] /ENDPASTE ____________________________________________________________________________ - After executing /paste, every line of input (including lines that begin with - "/") will have <prefix> prepended to it and then get sent to the current - socket. If <prefix> is omitted and -n is not specified, the prefix defaults - to the value of %paste_prefix; if %paste_prefix is empty or unset, it - defaults to ":|". Typing "/endpaste" or "." on a line by itself ends the - pasting; "/abort" on a line by itself aborts the pasting. /Paste can be - very useful when using the cut-and-paste mechanism of many windowing - systems. - - Options: - -p "paragraph mode": adjacent non-blank lines are joined, and leading - spaces are stripped (this is particularly useful when pasting text - cut from a web browser or a window of different width). - -n Don't prepend any prefix. - -x After prepending the prefix (if any), execute the resulting line as - a command (without substitution) instead of sending it. - -w<world> - Send the text to <world>. - -e<end> - End when the user types <end> (default: "/endpaste"). With or - without this option, "." will always work. - -a<abort> - Abort when the user types <abort> (default: "/abort"). With or - without this option, interrupt (^C) will always work. - -q quiet: do not print "Entering paste mode" message. - -s strip trailing spaces from each pasted line - -h invoke matching SEND hooks for each line sent by /paste. - - Note that /endpaste is not actually a command, but a "magic cookie" - recognized by /paste. "/Endpaste", ".", and SIGINT (^C) are the only ways - to end /paste. - - Lines sent by /paste will invoke matching SEND hooks. - - Examples: - Prepare to paste text from a web page to a mud: - /paste -p - Prepare to paste a bunch of lines to be recorded in your input history: - /paste -x /recordline -i - - - See: /quote + After executing /paste, every line of input (including lines that begin with + "/") will have <prefix> prepended to it and then get sent to the current + socket. If <prefix> is omitted and -n is not specified, the prefix defaults + to the value of %paste_prefix; if %paste_prefix is empty or unset, it + defaults to ":|". Typing "/endpaste" or "." on a line by itself ends the + pasting; "/abort" on a line by itself aborts the pasting. /Paste can be + very useful when using the cut-and-paste mechanism of many windowing + systems. + + Options: + -p "paragraph mode": adjacent non-blank lines are joined, and leading + spaces are stripped (this is particularly useful when pasting text + cut from a web browser or a window of different width). + -n Don't prepend any prefix. + -x After prepending the prefix (if any), execute the resulting line as + a command (without substitution) instead of sending it. + -w<world> + Send the text to <world>. + -e<end> + End when the user types <end> (default: "/endpaste"). With or + without this option, "." will always work. + -a<abort> + Abort when the user types <abort> (default: "/abort"). With or + without this option, interrupt (^C) will always work. + -q quiet: do not print "Entering paste mode" message. + -s strip trailing spaces from each pasted line + -h invoke matching SEND hooks for each line sent by /paste. + + Note that /endpaste is not actually a command, but a "magic cookie" + recognized by /paste. "/Endpaste", ".", and SIGINT (^C) are the only ways + to end /paste. + + Lines sent by /paste will invoke matching SEND hooks. + + Examples: + Prepare to paste text from a web page to a mud: + /paste -p + Prepare to paste a bunch of lines to be recorded in your input history: + /paste -x /recordline -i - + + See: /quote &/prompt /prompt - Function usage: + Function usage: PROMPT(<text>) - Command usage: + Command usage: /PROMPT [-a<attrs>] [-p] <text> ____________________________________________________________________________ - Sets the prompt for the current socket to <text>, replacing any existing - prompt. + Sets the prompt for the current socket to <text>, replacing any existing + prompt. - Command options: - -a<attrs> - Apply the attributes given by <attrs> to <text>. - -p Interpet "@{<attr>}" strings within <text> as commands to set - attributes inline. See decode_attr(). + Command options: + -a<attrs> + Apply the attributes given by <attrs> to <text>. + -p Interpret "@{<attr>}" strings within <text> as commands to set + attributes inline. See decode_attr(). - /prompt is most useful when called from a PROMPT hook, like this: + /prompt is most useful when called from a PROMPT hook, like this: /def -h"PROMPT *> " catch_prompt = /test prompt({*}) - Then, any text that ends in ">" without a newline will be made the prompt. + Then, any text that ends in ">" without a newline will be made the prompt. - For a more sophisticated example, see "status line". + For a more sophisticated example, see "status line". - See: prompts, hooks (PROMPT) + See: prompts, hooks (PROMPT) &/ps /ps - Usage: + Usage: /PS [-srq] [-w<world>] [<pid>] ____________________________________________________________________________ - Options: - -s short form, lists only PIDs. - -r list /repeats only. - -q list /quotes only. - -w[<world>] - list only processes for <world>. - - Lists information about process <pid>, or all currently running /quote and - /repeat processes: - - PID unique process identification number. - NEXT time remaining until next execution of process, or "pending" if - process is waiting for output from a shell command. - T the type of the command: "q" for - quote or "r" for repeat. - D disposition of /quote lines: "e" for echo, "s" for send, or "x" for - exec. - WORLD world to which output is sent, if not the current world. - PTIME delay between executions. - COUNT number of /repeat executions remaining. - COMMAND - the command to be executed. - - See: processes + Options: + -s short form, lists only PIDs. + -r list /repeats only. + -q list /quotes only. + -w[<world>] + list only processes for <world>. + + Lists information about process <pid>, or all currently running /quote and + /repeat processes: + + PID unique process identification number. + NEXT time remaining until next execution of process, or "pending" if + process is waiting for output from a shell command. + T the type of the command: "q" for + quote or "r" for repeat. + D disposition of /quote lines: "e" for echo, "s" for send, or "x" for + exec. + WORLD world to which output is sent, if not the current world. + PTIME delay between executions. + COUNT number of /repeat executions remaining. + COMMAND + the command to be executed. + + See: processes &/purgebind &/purgedef @@ -2664,46 +2675,46 @@ mapping /purge - Usage: + Usage: /PURGE [<macro-options>] [<name>] [= <body>] ____________________________________________________________________________ - Removes all macros matching the specified restrictions. The <macro-options> - are the same as those in the /list command; see "/list" for details. - Invisible macros will not be purged unless "-i" is specified. Remember that - "macros" includes keybindings, hilites, gags, triggers, and hooks. + Removes all macros matching the specified restrictions. The <macro-options> + are the same as those in the /list command; see "/list" for details. + Invisible macros will not be purged unless "-i" is specified. Remember that + "macros" includes keybindings, hilites, gags, triggers, and hooks. - The standard macro library also defines the commands /purgedef, /purgebind, - /purgehilite, /purgegag, /purgetrig, /purgedeft, and /purgehook, which purge - macros of the appropriate type. These always use glob matching. + The standard macro library also defines the commands /purgedef, /purgebind, + /purgehilite, /purgegag, /purgetrig, /purgedeft, and /purgehook, which purge + macros of the appropriate type. These always use glob matching. - See: macros, triggers, patterns, attributes, library, /def, /list, - /purgeworld + See: macros, triggers, patterns, attributes, library, /def, /list, + /purgeworld &/purgeworld /purgeworld - Usage: + Usage: /PURGEWORLD [-m<style>] [-T<type>] [<name>] ____________________________________________________________________________ - Removes world definitions. + Removes world definitions. - Options and arguments: - -m<style> - Use <style> for pattern matching of <type> and <name> patterns. - (default: %{matching}). - -T<type> - Remove only worlds with a type matching the pattern <type>. - <name> Remove only worlds with a name matching the pattern <name>. + Options and arguments: + -m<style> + Use <style> for pattern matching of <type> and <name> patterns. + (default: %{matching}). + -T<type> + Remove only worlds with a type matching the pattern <type>. + <name> Remove only worlds with a name matching the pattern <name>. - The return value of /purgeworld is the number of world definitions that were - removed. + The return value of /purgeworld is the number of world definitions that were + removed. - See: worlds, /listworlds, patterns + See: worlds, /listworlds, patterns &upload &/putfile_MUCK @@ -2713,7 +2724,7 @@ mapping /putfile - Usage: + Usage: /REQUIRE filexfer.tf @@ -2722,46 +2733,46 @@ mapping /PUTFILE_UNIX <file> [<remote-file>] ____________________________________________________________________________ - Uploads text <file> from the local system to <remote-file> on a MUCK, LP, or - UNIX server, using an editor on the remote system. If <remote-file> is - omitted, <file> is used as the name of the remote file. + Uploads text <file> from the local system to <remote-file> on a MUCK, LP, or + UNIX server, using an editor on the remote system. If <remote-file> is + omitted, <file> is used as the name of the remote file. - /Putfile_LP assumes the LPmud has an "ed" editor similar to that in UNIX. + /Putfile_LP assumes the LPmud has an "ed" editor similar to that in UNIX. - For backward compatibility, /putfile is the same as /putfile_MUCK. + For backward compatibility, /putfile is the same as /putfile_MUCK. - See: /getfile, /quote + See: /getfile, /quote &/quit /quit - Usage: + Usage: /QUIT [-y] ____________________________________________________________________________ - Exits TF. If TF is interactive, and there are any worlds with unseen text, - /quit first asks you to confirm the exit; if you type anything other than - "Y" or "y", TF does not exit. + Exits TF. If TF is interactive, and there are any worlds with unseen text, + /quit first asks you to confirm the exit; if you type anything other than + "Y" or "y", TF does not exit. - Options: - -y exit unconditionally, without prompting. - When TF exits, all socket connections will be disconnected; all logfiles - will be closed; all /quotes and /repeats will be killed; and all history, - unsaved macros, and variables will be lost. + Options: + -y exit unconditionally, without prompting. + When TF exits, all socket connections will be disconnected; all logfiles + will be closed; all /quotes and /repeats will be killed; and all history, + unsaved macros, and variables will be lost. - If you prefer to never be prompted by /quit, you can redefine it like this: + If you prefer to never be prompted by /quit, you can redefine it like this: /def quit = /@quit -y - See also: /dc, %quitdone + See also: /dc, %quitdone &/quote /quote - Usage: + Usage: /QUOTE [<options>] [<pre>] '"<file>"[<suf>] /QUOTE [<options>] [<pre>] #"<recall_args>"[<suf>] @@ -2769,73 +2780,73 @@ mapping /QUOTE [<options>] [<pre>] `"<TF_cmd>"[<suf>] ____________________________________________________________________________ - /Quote generates lines of text, one for each line quoted from a file, shell - command, history, or TF command. Each generated line is then echoed, sent - to a socket, or executed as a command. Lines will be generated at a rate - described in the section "processes". - - Options and arguments: - -d<disp> - disposition of generated text. <Disp> is one of: "echo" (echo to - the screen), "send" (send directly to the socket), or "exec" - (execute text as a tf command). The default <disp> is "send" if - there is no <pre>, and "exec" if there is a <pre>. - -w<world> - Generated commands will be executed with <world> as the current - world. If <world> is blank, it uses the world that was current when - the /quote started. If -w is omitted, each command's current world - will be whatever happens to be in the foreground when each command - occurs. (See "sockets"). - -<time> - The delay between each generated line. It can have the format - "<hours>:<minutes>:<seconds>", "<hours>:<minutes>", or "<seconds>", - and <seconds> may be specified to the nearest microsecond. If - -<time> is omitted, the variable %{ptime} is used. If <time> is - given as the letter "S", the quote will run synchronously, with no - delay. If a slow shell command is used with /quote -S !, tf will - hang until the command produces some output or exits. A synchronous - /quote may be used inside another /quote. If <time> is given as the - letter "P", the quote will run whenever a prompt is received. See - "processes" for more information on process timing. - -s<sub> - Expand <TF_cmd> as if %{sub} were set to <sub>. By default, /quote - expands <TF_cmd> as if %{sub} were "full". - <pre> <pre> is prefixed to each generated line. If <pre> contains any of - the command characters ('!`#), they must be preceded with '\' to - remove their special meaning. - '<file> - Get text from <file>. The <file> name is expanded as described - under /help filenames. - !<shell_cmd> - Get text from the standard output and standard error of executing - <shell_cmd> in the shell. - `<TF_cmd> - Get text from the output of executing <TF_cmd> in tf. - #<recall_args> - Get text from executing /recall <recall_args>. (See "recall" for - the exact syntax). - <suf> Append <suf> to each generated line. If omitted, the double quotes - around the <file> or <command> may also be omitted. - - An asynchronous (background) /quote (i.e., a /quote without -S) returns the - pid of the new process, or 0 if an error occurred. A synchronous (-S) shell - (!) or command (`) quote returns the return value of the command. A - synchronous file (') quote returns 0 on error, nonzero otherwise. - - The library file quoter.tf defines some useful quoter commands that are - shortcuts for some common uses of quote. - - The following is a list of some nearly equivalent pairs of commands: - /quote -S -dexec '<file> - /load <file> - /quote -S /echo -aG - #<args> - /recall <args> - /quote <opts> `/recall <args> - /quote <opts> #<args> + /Quote generates lines of text, one for each line quoted from a file, shell + command, history, or TF command. Each generated line is then echoed, sent + to a socket, or executed as a command. Lines will be generated at a rate + described in the section "processes". + + Options and arguments: + -d<disp> + disposition of generated text. <Disp> is one of: "echo" (echo to + the screen), "send" (send directly to the socket), or "exec" + (execute text as a tf command). The default <disp> is "send" if + there is no <pre>, and "exec" if there is a <pre>. + -w<world> + Generated commands will be executed with <world> as the current + world. If <world> is blank, it uses the world that was current when + the /quote started. If -w is omitted, each command's current world + will be whatever happens to be in the foreground when each command + occurs. (See "sockets"). + -<time> + The delay between each generated line. It can have the format + "<hours>:<minutes>:<seconds>", "<hours>:<minutes>", or "<seconds>", + and <seconds> may be specified to the nearest microsecond. If + -<time> is omitted, the variable %{ptime} is used. If <time> is + given as the letter "S", the quote will run synchronously, with no + delay. If a slow shell command is used with /quote -S !, tf will + hang until the command produces some output or exits. A synchronous + /quote may be used inside another /quote. If <time> is given as the + letter "P", the quote will run whenever a prompt is received. See + "processes" for more information on process timing. + -s<sub> + Expand <TF_cmd> as if %{sub} were set to <sub>. By default, /quote + expands <TF_cmd> as if %{sub} were "full". + <pre> <pre> is prefixed to each generated line. If <pre> contains any of + the command characters ('!`#), they must be preceded with '\' to + remove their special meaning. + '<file> + Get text from <file>. The <file> name is expanded as described + under /help filenames. + !<shell_cmd> + Get text from the standard output and standard error of executing + <shell_cmd> in the shell. + `<TF_cmd> + Get text from the output of executing <TF_cmd> in tf. + #<recall_args> + Get text from executing /recall <recall_args>. (See "recall" for + the exact syntax). + <suf> Append <suf> to each generated line. If omitted, the double quotes + around the <file> or <command> may also be omitted. + + An asynchronous (background) /quote (i.e., a /quote without -S) returns the + pid of the new process, or 0 if an error occurred. A synchronous (-S) shell + (!) or command (`) quote returns the return value of the command. A + synchronous file (') quote returns 0 on error, nonzero otherwise. + + The library file quoter.tf defines some useful quoter commands that are + shortcuts for some common uses of quote. + + The following is a list of some nearly equivalent pairs of commands: + /quote -S -dexec '<file> + /load <file> + /quote -S /echo -aG - #<args> + /recall <args> + /quote <opts> `/recall <args> + /quote <opts> #<args> ____________________________________________________________________________ - Examples: + Examples: /quote -1 :reads about '"/usr/dict/words" in the dictionary. @@ -2845,36 +2856,36 @@ mapping :reads about aardvark in the dictionary. :reads about aardvore in the dictionary. - with one-second delays between lines. + with one-second delays between lines. /quote -S /echo !ps -gux - This displays the output of the system command "ps -gux" by echoing it - locally, immediately. + This displays the output of the system command "ps -gux" by echoing it + locally, immediately. /quote -0 :heard: #-wCave /2 *pages* - This sends off quickly: + This sends off quickly: - :heard: [the last 2 lines from Cave that contain "pages"] + :heard: [the last 2 lines from Cave that contain "pages"] /quote :is using `/version - will tell everybody in the room what version of TF you're running. + will tell everybody in the room what version of TF you're running. /quote -wlpmud -dsend 'prog.c - will send the file "prog.c" to the world "lpmud", without any interpretation - of leading spaces or slashes (in lines like "/* comment */"), etc.) + will send the file "prog.c" to the world "lpmud", without any interpretation + of leading spaces or slashes (in lines like "/* comment */"), etc.) ____________________________________________________________________________ - See: processes, %ptime, %lpquote, quoter.tf, history, command subs, /load, - /recall, /sh, /sys, /paste + See: processes, %ptime, %lpquote, quoter.tf, history, command subs, /load, + /recall, /sh, /sys, /paste &/qdef &/qmac @@ -2890,258 +2901,258 @@ Quoter Commands /REQUIRE quoter.tf ____________________________________________________________________________ - After doing "/REQUIRE quoter.tf", the quoting commands can be used to take - the output of various sources and execute them as commands, typically - quoting them to a mud server. These are all just shortcuts for things you - can already do with /quote -S. The default <prefix> is ":|", which will - perform a pose on Tiny-style muds. The default prefix can be changed by - setting the appropriate variable: qdef_prefix, qmac_prefix, qworld_prefix, - qtf_prefix, qsh_prefix, or qmud_prefix. An alternate <prefix> can be given - on the command line for /qdef, /qmac, /qworld, and /qfile. Also, before any - output is generated, the command used to generate the output is quoted. - - /QDEF [<prefix>] <name> - Prepends <prefix> to each line generated by "/list <name>", and - executes each resulting line as a command. - - /QMAC [<prefix>] <name> - Searches for the definition of macro <name> in a group of tf files, - prepends <prefix> to each line found, "/quote <name>", and executes - each resulting line as a command. - - /QWORLD [<prefix>] <name> - Prepends <prefix> to each line generated by "/listworlds <name>", - and executes each resulting line as a command. - - /QFILE [<prefix>] <name> - Prepends <prefix> to each line of file <name>, and executes each - resulting line as a command. + After doing "/REQUIRE quoter.tf", the quoting commands can be used to take + the output of various sources and execute them as commands, typically + quoting them to a mud server. These are all just shortcuts for things you + can already do with /quote -S. The default <prefix> is ":|", which will + perform a pose on Tiny-style MUDs. The default prefix can be changed by + setting the appropriate variable: qdef_prefix, qmac_prefix, qworld_prefix, + qtf_prefix, qsh_prefix, or qmud_prefix. An alternate <prefix> can be given + on the command line for /qdef, /qmac, /qworld, and /qfile. Also, before any + output is generated, the command used to generate the output is quoted. + + /QDEF [<prefix>] <name> + Prepends <prefix> to each line generated by "/list <name>", and + executes each resulting line as a command. + + /QMAC [<prefix>] <name> + Searches for the definition of macro <name> in a group of tf files, + prepends <prefix> to each line found, "/quote <name>", and executes + each resulting line as a command. + + /QWORLD [<prefix>] <name> + Prepends <prefix> to each line generated by "/listworlds <name>", + and executes each resulting line as a command. + + /QFILE [<prefix>] <name> + Prepends <prefix> to each line of file <name>, and executes each + resulting line as a command. + + /QTF <cmd> + Prepends <prefix> to each line generated by executing <cmd> in tf, + and executes each resulting line as a command. + + /QSH <cmd> + Prepends <prefix> to each line generated by executing <cmd> in the + shell, and executes each resulting line as a command. + + /QMUD [-w<world>] <cmd> + Prepends <prefix> to each line generated by executing <cmd> on world + <world> (default: the current world), and executes each resulting + line as a command. /Qmud requires that the mud supports the + OUTPUTPREFIX and OUTPUTSUFFIX commands. - /QTF <cmd> - Prepends <prefix> to each line generated by executing <cmd> in tf, - and executes each resulting line as a command. - - /QSH <cmd> - Prepends <prefix> to each line generated by executing <cmd> in the - shell, and executes each resulting line as a command. - - /QMUD [-w<world>] <cmd> - Prepends <prefix> to each line generated by executing <cmd> on world - <world> (default: the current world), and executes each resulting - line as a command. /Qmud requires that the mud supports the - OUTPUTPREFIX and OUTPUTSUFFIX commands. - - Examples: + Examples: - The command + The command /qsh finger - would generate a series of commands something like this: + would generate a series of commands something like this: :! finger :| Login Name TTY Idle When Site Info - :| hawkeye Ken Keys p3 Fri 19:32 - :| hawkeye Ken Keys p4 Sat 17:37 + :| hawkeye Ken Keys p3 Fri 19:32 + :| hawkeye Ken Keys p4 Sat 17:37 - And, on a Tiny-style mud named "Cave", the command + And, on a Tiny-style mud named "Cave", the command /qmud score - would generate a series of commands something like this: + would generate a series of commands something like this: :| Cave> score :| You have 8704 pennies. ____________________________________________________________________________ - See: /quote, processes, /paste + See: /quote, processes, /paste &/recall /recall - Usage: + Usage: - /RECALL [-w<world>] [-ligv] [-t[<format>]] [-a<attrs>] [-m<style>] [-A<n>] + /RECALL [-w<world>] [-ligv] [-t[<format>]] [-a<attrs>] [-m<style>] [-A<n>] [-B<n>] [-C<n>] [#]<range> [<pattern>] ____________________________________________________________________________ - Recalls lines from a history buffer. Only one of the [-ligw] options can be - used, to specify the history from which to recall. - - Options: - -w recall from current world's history (default) - -w<world> - recall from <world>'s history - -l recall from local history (i.e., TF output) - -g recall from global history (all worlds, and local) - -i recall from input history - -t[<format>] - display timestamps on each line, using <format>. If <format> is - omitted, "[%{time_format}]" will be used. The format is described - in ftime(). - -v recall lines that don't match the pattern - -q quiet: suppress the header and footer lines - -a<attr> - suppress specified attributes (e.g., -ag shows gagged lines) - -m<style> - matching style (simple, glob, or regexp). - -A<n> Print <n> lines of context after each matching line. - -B<n> Print <n> lines of context before each matching line. - -C<n> Equivalent to -A<n> -B<n>. - # display line numbers (must be last option, before <range>) - - <range> can have one of the formats below. If <x> and <y> are plain - integers, they are interpreted as line numbers or counts. If they have the - form "<hours>:<minutes>" or "<hours>:<minutes>:<seconds>", they are - interpreted as time values (either a period of time, or a clock time within - the last 24 hours). If they are real numbers (with up to 6 decimal places), - they are interpreted as absolute system times. - /x Recall the last <x> matching lines. - x Recall from the last <x> lines, or lines within the last time period - <x>. - x-y Recall lines starting with <x> and ending with <y>. - -y If <y> is a line number, recall the <y>th previous line; if <y> is a - time, recall lines earlier than <y>. Remember to use "-" before - "-y" so it isn't interpreted as an option. - x- Recall lines after <x>. - - If <range> is prefixed with "#", line numbers will be displayed. - - If <pattern> is given, only lines in the given range that match <pattern> - will be recalled. The matching style is determined by the -m option if - given, %{matching} otherwise. - - If the output of /recall is being sent to the screen, it will be preceded by - "================ Recall start ================" and follwed by - "================= Recall end =================" unless -q is used. These - lines will not be produced if the output is redirected, for example with - $(...) command substitution or "/quote `/recall". When -A, -B, or -C is - used, groups of lines that are not adjacent in history will be separated by - "--". - - If lines are received while tf is suspended (by ^Z or /suspend) or in a - subshell (by /sh), the timestamps on the lines will correspond to the time - tf resumed control, not the time they actually arrived. - - The return value of /recall is the number of lines that were actually - recalled. - - Because the output of /recall may clutter the current window, you may wish - to use /limit instead. - - Examples These examples assume that matching=glob (the default). - Recall every line beginning with "Kite whispers" that arrived in the last - hour: /recall 1:00 Kite whispers* - Recall every line that arrived between 11 am and 1 pm: - /recall 11:00-13:00 - Recall the last 5 lines containing "spam": - /recall /5 *spam* - Recall the last 4th most recent line: - /recall - -4 - - See: history, attributes, /limit, /quote, %time_format + Recalls lines from a history buffer. Only one of the [-ligw] options can be + used, to specify the history from which to recall. + + Options: + -w recall from current world's history (default) + -w<world> + recall from <world>'s history + -l recall from local history (i.e., TF output) + -g recall from global history (all worlds, and local) + -i recall from input history + -t[<format>] + display timestamps on each line, using <format>. If <format> is + omitted, "[%{time_format}]" will be used. The format is described + in ftime(). + -v recall lines that don't match the pattern + -q quiet: suppress the header and footer lines + -a<attr> + suppress specified attributes (e.g., -ag shows gagged lines) + -m<style> + matching style (simple, glob, or regexp). + -A<n> Print <n> lines of context after each matching line. + -B<n> Print <n> lines of context before each matching line. + -C<n> Equivalent to -A<n> -B<n>. + # display line numbers (must be last option, before <range>) + + <range> can have one of the formats below. If <x> and <y> are plain + integers, they are interpreted as line numbers or counts. If they have the + form "<hours>:<minutes>" or "<hours>:<minutes>:<seconds>", they are + interpreted as time values (either a period of time, or a clock time within + the last 24 hours). If they are real numbers (with up to 6 decimal places), + they are interpreted as absolute system times. + /x Recall the last <x> matching lines. + x Recall from the last <x> lines, or lines within the last time period + <x>. + x-y Recall lines starting with <x> and ending with <y>. + -y If <y> is a line number, recall the <y>th previous line; if <y> is a + time, recall lines earlier than <y>. Remember to use "-" before + "-y" so it isn't interpreted as an option. + x- Recall lines after <x>. + + If <range> is prefixed with "#", line numbers will be displayed. + + If <pattern> is given, only lines in the given range that match <pattern> + will be recalled. The matching style is determined by the -m option if + given, %{matching} otherwise. + + If the output of /recall is being sent to the screen, it will be preceded by + "================ Recall start ================" and followed by + "================= Recall end =================" unless -q is used. These + lines will not be produced if the output is redirected, for example with + $(...) command substitution or "/quote `/recall". When -A, -B, or -C is + used, groups of lines that are not adjacent in history will be separated by + "--". + + If lines are received while tf is suspended (by ^Z or /suspend) or in a + sub-shell (by /sh), the timestamps on the lines will correspond to the time + tf resumed control, not the time they actually arrived. + + The return value of /recall is the number of lines that were actually + recalled. + + Because the output of /recall may clutter the current window, you may wish + to use /limit instead. + + Examples These examples assume that matching=glob (the default). + Recall every line beginning with "Kite whispers" that arrived in the last + hour: /recall 1:00 Kite whispers* + Recall every line that arrived between 11 am and 1 pm: + /recall 11:00-13:00 + Recall the last 5 lines containing "spam": + /recall /5 *spam* + Recall the last 4th most recent line: + /recall - -4 + + See: history, attributes, /limit, /quote, %time_format &/recordline /recordline - Usage: + Usage: /RECORDLINE [-lig] [-w[<world>]] [-t<time>] <text> ____________________________________________________________________________ - Records <text> into a history buffer. + Records <text> into a history buffer. - Options: - -w record to current world's history - -w<world> - record to <world>'s history - -l record to local history - -g record to global history (default) - -i record to input history - -t<time> - record the line with the system time <time> (as displayed by /recall - -t@) instead of the current time - -a<attrs> - Record <text> with the attributes given by <attrs>. - -p Interpet "@{<attr>}" strings as commands to set attributes inline. - "@@" strings are interpreted as "@". "@{n}" or "@{x}" will turn - attributes off. See also: decode_attr(). + Options: + -w record to current world's history + -w<world> + record to <world>'s history + -l record to local history + -g record to global history (default) + -i record to input history + -t<time> + record the line with the system time <time> (as displayed by /recall + -t@) instead of the current time + -a<attrs> + Record <text> with the attributes given by <attrs>. + -p Interpret "@{<attr>}" strings as commands to set attributes inline. + "@@" strings are interpreted as "@". "@{n}" or "@{x}" will turn + attributes off. See also: decode_attr(). - The <text> will not be echoed to the screen or saved in any log. + The <text> will not be echoed to the screen or saved in any log. - /Recordline can be combined with /quote to read a log file back into - history. For example, if you had created a log with "/log -i input.log" in - an earlier tf session, you could start a new tf session and use + /Recordline can be combined with /quote to read a log file back into + history. For example, if you had created a log with "/log -i input.log" in + an earlier tf session, you could start a new tf session and use - /quote -S -dexec /recordline -i - 'input.log + /quote -S -dexec /recordline -i - 'input.log - to restore that input history. That way, you could use the RECALLB, - RECALLF, RECALLBEG, RECALLEND, SEARCHB, and SEARCHF (^P, ^N, ^[<, ^[>, ^[P, - and ^[N) keys to recall lines you typed in the earlier session. + to restore that input history. That way, you could use the RECALLB, + RECALLF, RECALLBEG, RECALLEND, SEARCHB, and SEARCHF (^P, ^N, ^[<, ^[>, ^[P, + and ^[N) keys to recall lines you typed in the earlier session. - Note that /recordline always appends to the end of a history. /Recordline - -t<time> makes it possible to insert lines that are not in chronological - order, which may produce strange results with /recall. + Note that /recordline always appends to the end of a history. /Recordline + -t<time> makes it possible to insert lines that are not in chronological + order, which may produce strange results with /recall. - See: /recall, /quote, history + See: /recall, /quote, history &delay &/repeat /repeat - Usage: + Usage: /REPEAT [-w[<world>]] [-n] {[-<time>]|-S|-P} <count> <command> ____________________________________________________________________________ - Repeats <command>, <count> times. <Command> may be any legal macro body. - If <count> is "i", the <command> repeats indefinitely. This works through a - process, which runs concurrently with normal operations. - - Options: - -w[<world>] - <Command> will execute with <world> as the current world. If - <world> is omitted, it is assumed to be the world that was current - for /repeat. If this option is omitted entirely, the <command>'s - current world will be whatever world happens to be in the foreground - when it's time for <command> to run. - -<time> - <Time> is the delay between each execution of <command>. <Time> may - be specified in the format "<hours>:<minutes>:<seconds>", - "<hours>:<minutes>", or "<seconds>" (<seconds> may be specified to - the nearest microsecond). - -S The repeat will run synchronously. - -P The repeat will run whenever a prompt is received. - -n When combined with the -<time> option, this makes the first - execution of <command> happen with no delay. - At most one of the -S, -P, and -<time> options should be specified. If none - are specified, the delay between each execution of <command> is determined - by the variable %{ptime}. See "processes" for more information on process - timing. - - The <command> undergoes macro body substitution when it is executed. - - An asynchronous /repeat (without -S) returns the pid of the new process, or - 0 if an error occurred. A synchronous /repeat returns the return value of - the last command. - - Since the first run is not done until after the first interval (for /repeat - without -S or -n), a useful trick is to use "/repeat -<time> 1 <command>" to - delay the execution of a single command. - - Example: /repeat -0:30 1 /echo -ab Dinner's ready + Repeats <command>, <count> times. <Command> may be any legal macro body. + If <count> is "i", the <command> repeats indefinitely. This works through a + process, which runs concurrently with normal operations. + + Options: + -w[<world>] + <Command> will execute with <world> as the current world. If + <world> is omitted, it is assumed to be the world that was current + for /repeat. If this option is omitted entirely, the <command>'s + current world will be whatever world happens to be in the foreground + when it's time for <command> to run. + -<time> + <Time> is the delay between each execution of <command>. <Time> may + be specified in the format "<hours>:<minutes>:<seconds>", + "<hours>:<minutes>", or "<seconds>" (<seconds> may be specified to + the nearest microsecond). + -S The repeat will run synchronously. + -P The repeat will run whenever a prompt is received. + -n When combined with the -<time> option, this makes the first + execution of <command> happen with no delay. + At most one of the -S, -P, and -<time> options should be specified. If none + are specified, the delay between each execution of <command> is determined + by the variable %{ptime}. See "processes" for more information on process + timing. + + The <command> undergoes macro body substitution when it is executed. + + An asynchronous /repeat (without -S) returns the pid of the new process, or + 0 if an error occurred. A synchronous /repeat returns the return value of + the last command. + + Since the first run is not done until after the first interval (for /repeat + without -S or -n), a useful trick is to use "/repeat -<time> 1 <command>" to + delay the execution of a single command. + + Example: /repeat -0:30 1 /echo -ab Dinner's ready #sleep - There is no good way to directly "sleep" within a macro body. Any attempt - to write your own /sleep macro will, at best, "freeze" tf for the duration - of the sleep, or even worse hog the machine's CPU time in a busy wait. The - best way to achieve the effect a sleep in a /while loop is probably to use a - /repeat where each execution of the /repeat body corresponds to an iteration - of the desired /while loop. That is, if you want to write + There is no good way to directly "sleep" within a macro body. Any attempt + to write your own /sleep macro will, at best, "freeze" tf for the duration + of the sleep, or even worse hog the machine's CPU time in a busy wait. The + best way to achieve the effect a sleep in a /while loop is probably to use a + /repeat where each execution of the /repeat body corresponds to an iteration + of the desired /while loop. That is, if you want to write /def foo = \ /before_stuff%; \ @@ -3151,7 +3162,7 @@ Quoter Commands /done%; \ /after_stuff - you must instead write: + you must instead write: /def foo = \ /before_stuff%; \ @@ -3165,119 +3176,119 @@ Quoter Commands /after_stuff%; \ /endif - Of course, local variables will not survive between calls of /do_stuff in - the second version as they would in the first (if it were possible), so any - variables you need to share between iterations must be global. - - But, if the reason you want to sleep is to wait for a response from a - server, then you really don't want to sleep at all: you want a trigger. - First, set up triggers on the possible responses, then send the command. If - one of the possible responses is no response at all, then a /repeat can be - useful to wait for some maximum timeout and then handle the no-reponse case - and delete the response triggers. This is in general the best way to write - macros that interact with a server. + Of course, local variables will not survive between calls of /do_stuff in + the second version as they would in the first (if it were possible), so any + variables you need to share between iterations must be global. + + But, if the reason you want to sleep is to wait for a response from a + server, then you really don't want to sleep at all: you want a trigger. + First, set up triggers on the possible responses, then send the command. If + one of the possible responses is no response at all, then a /repeat can be + useful to wait for some maximum timeout and then handle the no-reponse case + and delete the response triggers. This is in general the best way to write + macros that interact with a server. # - See: processes, %ptime, /at, kbnum + See: processes, %ptime, /at, kbnum &/replace /replace - Function usage: + Function usage: REPLACE(<old>, <new>, <string>) - Command usage: + Command usage: /REPLACE <old> <new> <string> ____________________________________________________________________________ - Echoes (in command form) or returns (in function form) <string>, with any - occurrences of <old> in <string> replaced by <new>. + Echoes (in command form) or returns (in function form) <string>, with any + occurrences of <old> in <string> replaced by <new>. #replace-ex - Example: + Example: - This example replaces "TF" with "TinyFugue" in every line sent by the - server. + This example replaces "TF" with "TinyFugue" in every line sent by the + server. /def -mregexp -t"TF" replace_tf = \ /test substitute(replace("TF", "TinyFugue", {P0})) - See: evaluation, /tr + See: evaluation, /tr &security &/restrict /restrict - Usage: + Usage: /RESTRICT [SHELL|FILE|WORLD] ____________________________________________________________________________ - With no arguments, /restrict reports the current restriction level. - - With an argument, /restrict sets the restriction level. Once restriction - has been set to a particular level, it can not be lowered. - level 0: NONE - No restrictions. - level 1: SHELL - Prevents all access to shell or external commands. Disables TF - builtins "/sh" and "/quote !", and uncompression during /load and - /help. - level 2: FILE - Prevents reading and writing of files. Disables TF builtins - "/load", "/save", "/saveworld", "/lcd", "/log", and "/quote '", - "tfopen()", the "sockmload feature. Implies /restrict shell. - level 3: WORLD - Disallows all new user-defined connections. The TF builtins - /addworld and the "/connect <host> <port>" semantics are disabled. - Implies /restrict file. - - /Restrict is typically placed in %{TFLIBDIR}/local.tf by an administrator of - a public copy of TF who wishes to restrict users' access. - - Note that while I believe these options to be secure, I provide no warranty - to that effect. - - See: warranty + With no arguments, /restrict reports the current restriction level. + + With an argument, /restrict sets the restriction level. Once restriction + has been set to a particular level, it can not be lowered. + level 0: NONE + No restrictions. + level 1: SHELL + Prevents all access to shell or external commands. Disables TF + builtins "/sh" and "/quote !", and uncompression during /load and + /help. + level 2: FILE + Prevents reading and writing of files. Disables TF builtins + "/load", "/save", "/saveworld", "/lcd", "/log", and "/quote '", + "tfopen()", the "sockmload feature. Implies /restrict shell. + level 3: WORLD + Disallows all new user-defined connections. The TF builtins + /addworld and the "/connect <host> <port>" semantics are disabled. + Implies /restrict file. + + /Restrict is typically placed in %{TFLIBDIR}/local.tf by an administrator of + a public copy of TF who wishes to restrict users' access. + + Note that while I believe these options to be secure, I provide no warranty + to that effect. + + See: warranty &/result &/return /return and /result - Usage: + Usage: /RETURN [<expression>] /RESULT [<expression>] ____________________________________________________________________________ - /return stops execution of the macro body that called it, and causes the - macro to return the string value of <expression>. If the <expression> is - omitted, the return value of the macro is the empty string. + /return stops execution of the macro body that called it, and causes the + macro to return the string value of <expression>. If the <expression> is + omitted, the return value of the macro is the empty string. - When a macro that calls /result was called as a function, /result is - identical to /return. When a macro that calls /result was called as a - command, /result has the additional effect of echoing the value of - <expression> to the tfout stream. /Result thus allows the same macro to be - called usefully as either a command or a function. + When a macro that calls /result was called as a function, /result is + identical to /return. When a macro that calls /result was called as a + command, /result has the additional effect of echoing the value of + <expression> to the tfout stream. /Result thus allows the same macro to be + called usefully as either a command or a function. - Note that /return and /result take the string value of <expression>. This - is not a problem for integer- or float-valued expressions, since they - convert freely to strings and back without loss of information. But if the - expression is an enumerated special variable (e.g., borg), the value - returned will be its string value (e.g., "on"), not its integer value (e.g., - 1). To force it to use the integer value, you can use the unary plus - operator (e.g., +borg). + Note that /return and /result take the string value of <expression>. This + is not a problem for integer- or float-valued expressions, since they + convert freely to strings and back without loss of information. But if the + expression is an enumerated special variable (e.g., borg), the value + returned will be its string value (e.g., "on"), not its integer value (e.g., + 1). To force it to use the integer value, you can use the unary plus + operator (e.g., +borg). - The return value of the last command (builtin or macro) is stored in %{?}. - The return value of a function (builtin or macro) is just the value of the - function. + The return value of the last command (builtin or macro) is stored in %{?}. + The return value of a function (builtin or macro) is just the value of the + function. - These examples define several macros intended to be called as a functions: + These examples define several macros intended to be called as a functions: /def square = /return pow({1}, 2) @@ -3288,27 +3299,27 @@ Quoter Commands /return (len <= 1) ? {*} : \ strcat(strrev(substr({*},len/2)), strrev(substr({*},0,len/2))) - If those examples had used /result instead of /return, they could also be - used as commands when echoing is more convenient. For example, + If those examples had used /result instead of /return, they could also be + used as commands when echoing is more convenient. For example, /eval say My name backwards is $(/strrev ${world_character}). - See: /if, /while, /test, /break, /exit, expressions, evaluation, variables + See: /if, /while, /test, /break, /exit, expressions, evaluation, variables &/runtime /runtime - Usage: + Usage: /runtime <command> ____________________________________________________________________________ - Executes <command>, and prints the real time and cpu time used. <Command> - is not put through any additional substitution before being executed. The - return value of /runtime is that of <command>. + Executes <command>, and prints the real time and cpu time used. <Command> + is not put through any additional substitution before being executed. The + return value of /runtime is that of <command>. - See: cputime(), debugging. + See: cputime(), debugging. &mudwho &rwho.tf @@ -3316,7 +3327,7 @@ Quoter Commands /rwho - Usage: + Usage: /REQUIRE rwho.tf @@ -3325,14 +3336,14 @@ Quoter Commands /RWHO mud=<mud> ____________________________________________________________________________ - Gets a remote WHO list from a mudwho server. The first form gives a - complete list, the other forms give partial lists. Due to the short timeout - of the mudwho server, sometimes the complete list is sent even if the second - or third format is used (send complaints to the author or maintainer of the - mudwho server, not to me). + Gets a remote WHO list from a mudwho server. The first form gives a + complete list, the other forms give partial lists. Due to the short timeout + of the mudwho server, sometimes the complete list is sent even if the second + or third format is used (send complaints to the author or maintainer of the + mudwho server, not to me). - Make sure you /load rwho.tf _after_ you define your worlds, or rwho will be - the default world. + Make sure you /load rwho.tf _after_ you define your worlds, or rwho will be + the default world. &/savebind &/savedef @@ -3344,240 +3355,240 @@ Quoter Commands /save - Usage: + Usage: /SAVE [-a] <file> [<list-options>] ____________________________________________________________________________ - Saves specified macros to <file>. The <list-options> are the same as those - in the /list command; see "/list" for details. Invisible macros will not be - saved unless "-i" is specified. - - If "-a" is specified, macros will be appended to <file>. Otherwise, the - macros will overwrite any existing contents of <file>. - - The return value of /save is the number of the last macro listed, or 0 if no - macros were listed (because of error or none matched the specified options). - - The standard macro library also defines commands that save macros of a - particular type: - /savedef - macros with names, but no triggers, hooks, or keybindings - /savebind - macros with keybindings - /savehilite - macros with triggers and attributes other than -ag - /savegag - macros with triggers and the -ag attribute - /savetrig - macros with triggers and no attributes - /savehook - macros with hooks - These commands take a filename argument; if it is omitted, a default file - name will be used. No -a (append) option is allowed. - - The /save* commands are useful if your macros are few and simple, but if you - have many and/or complex macros, you will probably find it easier to write - them with an editor and then /load them in tf, instead of writing them in tf - and /save'ing them to a file. Avoiding /save allows you to keep the file(s) - nicely formatted, use comments, and organize them better. Use whatever - works best for you. - - Note that when tf starts, it does not automatically read files created with - any of the /save commands. To make it do so, add the corresponding /load - command to your .tfrc file. + Saves specified macros to <file>. The <list-options> are the same as those + in the /list command; see "/list" for details. Invisible macros will not be + saved unless "-i" is specified. + + If "-a" is specified, macros will be appended to <file>. Otherwise, the + macros will overwrite any existing contents of <file>. + + The return value of /save is the number of the last macro listed, or 0 if no + macros were listed (because of error or none matched the specified options). + + The standard macro library also defines commands that save macros of a + particular type: + /savedef + macros with names, but no triggers, hooks, or keybindings + /savebind + macros with keybindings + /savehilite + macros with triggers and attributes other than -ag + /savegag + macros with triggers and the -ag attribute + /savetrig + macros with triggers and no attributes + /savehook + macros with hooks + These commands take a filename argument; if it is omitted, a default file + name will be used. No -a (append) option is allowed. + + The /save* commands are useful if your macros are few and simple, but if you + have many and/or complex macros, you will probably find it easier to write + them with an editor and then /load them in tf, instead of writing them in tf + and /save'ing them to a file. Avoiding /save allows you to keep the file(s) + nicely formatted, use comments, and organize them better. Use whatever + works best for you. + + Note that when tf starts, it does not automatically read files created with + any of the /save commands. To make it do so, add the corresponding /load + command to your .tfrc file. Except for its return value, /save [-a] <file> [<list-options>] is equivalent to - /eval /list [<list-options>] %| /writefile [-a] <file> + /eval /list [<list-options>] %| /writefile [-a] <file> - See: macros, patterns, attributes, library, /def, /list, /load, /saveworld + See: macros, patterns, attributes, library, /def, /list, /load, /saveworld &/saveworld /saveworld - Usage: + Usage: /SAVEWORLD [-a] [<file>] ____________________________________________________________________________ - Saves world definitions to <file> if specified, otherwise from the file - named in the body of the WORLDFILE macro. + Saves world definitions to <file> if specified, otherwise from the file + named in the body of the WORLDFILE macro. - If "-a" is given, world definitions will be appended to <file>; otherwise, - the world definitions will replace any original contents of <file>. + If "-a" is given, world definitions will be appended to <file>; otherwise, + the world definitions will replace any original contents of <file>. - Note that when tf starts, it does not automatically read files created with - /saveworld. To make it do so, add the /loadworld command to your .tfrc - file. + Note that when tf starts, it does not automatically read files created with + /saveworld. To make it do so, add the /loadworld command to your .tfrc + file. - See: worlds, library, /addworld, /load + See: worlds, library, /addworld, /load &send() &/send /send - Function usage: + Function usage: SEND(<text>[, <world>[, <flags>]]) - Command Usage: + Command Usage: /SEND [-W] [-T<type>] [-w[<world>]] [-n] <text> ____________________________________________________________________________ - Sends <text> to a world. If no world is specified, the current world is - used. By default, send does not execute SEND hooks. + Sends <text> to a world. If no world is specified, the current world is + used. By default, send does not execute SEND hooks. - In the function form, the optional <flags> is a string containing letters - that modify the function's behavior: - "h" test for and invoke matching SEND hooks. - "u" send <text> unterminaed (i.e., without a CR LF end-of-line marker). - For backwards compatibility, the flags "o", "n", and "1" are ignored, and - the flags "0" and "f" are equivalent to "u". + In the function form, the optional <flags> is a string containing letters + that modify the function's behavior: + "h" test for and invoke matching SEND hooks. + "u" send <text> unterminated (i.e., without a CR LF end-of-line marker). + For backwards compatibility, the flags "o", "n", and "1" are ignored, and + the flags "0" and "f" are equivalent to "u". - Command options: - -w<world> - sends <text> to <world>. - -T<type> - sends <text> to all connected worlds with a type that matches the - pattern <type>. - -W sends <text> to all connected worlds. - -n send <text> without an end-of-line marker (CR LF). - -h test for and invoke matching SEND hooks. + Command options: + -w<world> + sends <text> to <world>. + -T<type> + sends <text> to all connected worlds with a type that matches the + pattern <type>. + -W sends <text> to all connected worlds. + -n send <text> without an end-of-line marker (CR LF). + -h test for and invoke matching SEND hooks. - The return value of send is 0 if the text is not successfully sent, nonzero - if it is. + The return value of send is 0 if the text is not successfully sent, nonzero + if it is. - See: functions. + See: functions. &/set /set - Usage: + Usage: /SET <name>=<value> /SET [<name> [<value>]] ____________________________________________________________________________ - In the first form, or with two arguments, /set will set the value of - variable <name> to <value>. With one argument, /set will display the value - of variable <name>. With no arguments, /set will display the value of all - internal variables. If the first form is used, there should be no spaces on - either side of the '='. + In the first form, or with two arguments, /set will set the value of + variable <name> to <value>. With one argument, /set will display the value + of variable <name>. With no arguments, /set will display the value of all + internal variables. If the first form is used, there should be no spaces on + either side of the '='. - Variable <name> will be an internal variable unless it has already been - defined as an environment variable. + Variable <name> will be an internal variable unless it has already been + defined as an environment variable. - Note: The variables 'L' and 'R' are reserved. You should not assign values - to them. + Note: The variables 'L' and 'R' are reserved. You should not assign values + to them. - When setting a variable, /set returns 1 if successful, 0 if not. When - listing variables, /set returns the number of variables listed. + When setting a variable, /set returns 1 if successful, 0 if not. When + listing variables, /set returns the number of variables listed. - See: variables, /listvar, /setenv, /export, /let, /unset, /edvar + See: variables, /listvar, /setenv, /export, /let, /unset, /edvar &/setenv /setenv - Usage: + Usage: /SETENV [<name> [<value>]] /SETENV <name>=<value> - With two arguments, /setenv will set the value of <name> to <value> in the - environment. With one argument, /setenv will display the value of <name>. - With no arguments, /setenv will display the value of all environment - variables. If the second form is used, spaces around the '=' will not be - stripped. + With two arguments, /setenv will set the value of <name> to <value> in the + environment. With one argument, /setenv will display the value of <name>. + With no arguments, /setenv will display the value of all environment + variables. If the second form is used, spaces around the '=' will not be + stripped. - If <name> was already defined as an internal variable, it will become an - environment variable. + If <name> was already defined as an internal variable, it will become an + environment variable. - When setting a variable, /setenv returns 1 if successful, 0 if not. When - listing variables, /setenv returns the number of variables listed. + When setting a variable, /setenv returns 1 if successful, 0 if not. When + listing variables, /setenv returns the number of variables listed. - See: variables, /listvar, /set, /export + See: variables, /listvar, /set, /export &/sh /sh - Usage: + Usage: /SH [-q] [<command>] /PSH [<command>] ____________________________________________________________________________ - If no command is given, /sh and /psh execute an interactive shell named by - %{SHELL}. With a <command>, /sh will execute <command> in the default shell - (/bin/sh on unix), and /psh will execute <command> in the shell named by - %{SHELL}. <Command> is executed interactively, so it may accept input and - may produce any output. + If no command is given, /sh and /psh execute an interactive shell named by + %{SHELL}. With a <command>, /sh will execute <command> in the default shell + (/bin/sh on unix), and /psh will execute <command> in the shell named by + %{SHELL}. <Command> is executed interactively, so it may accept input and + may produce any output. - In visual mode, /sh and /psh will fix the screen first, and restore it after - executing the shell. /Sys does not. + In visual mode, /sh and /psh will fix the screen first, and restore it after + executing the shell. /Sys does not. - If the -q option is given, /sh will be quiet: the SHELL hook will not be - called, and the "Executing" line will not be printed. + If the -q option is given, /sh will be quiet: the SHELL hook will not be + called, and the "Executing" line will not be printed. - If the %{shpause} and %{interactive} flags are on, TF will wait for a - keypress before returning. + If the %{shpause} and %{interactive} flags are on, TF will wait for a + keypress before returning. - Note: calling /sh or /psh with arguments from a trigger is very dangerous. - If not written carefully, such a trigger could allow anyone connected to the - server to gain access to your shell account. + Note: calling /sh or /psh with arguments from a trigger is very dangerous. + If not written carefully, such a trigger could allow anyone connected to the + server to gain access to your shell account. - The return value of /sh and /psh is the exit status of the shell if it - exited normally, -1 otherwise. Note that UNIX shell commands usually return - 0 for success and nonzero for failure. + The return value of /sh and /psh is the exit status of the shell if it + exited normally, -1 otherwise. Note that UNIX shell commands usually return + 0 for success and nonzero for failure. - See: /quote, /sys, utilities (/psh) + See: /quote, /sys, utilities (/psh) &/shift /shift - Usage: + Usage: /SHIFT [n] ____________________________________________________________________________ - Shifts the positional parameters left by <n>. That is, the positional - parameters %(n+1) ... %# are renamed to %1 ... %(#-n). If <n> is omitted, - 1 is assumed. + Shifts the positional parameters left by <n>. That is, the positional + parameters %(n+1) ... %# are renamed to %1 ... %(#-n). If <n> is omitted, + 1 is assumed. - /shift is useful only during macro expansion. + /shift is useful only during macro expansion. - Example: + Example: /def worlds = /while ({#}) /world %1%; /shift%; /done - Then, the command "/worlds foo bar baz" would execute the commands "/world - foo", "/world bar", and "/world baz". + Then, the command "/worlds foo bar baz" would execute the commands "/world + foo", "/world bar", and "/world baz". - See: variables, evaluation, list commands + See: variables, evaluation, list commands &/signal /signal - Usage: + Usage: /SIGNAL [<sig>] ____________________________________________________________________________ - Sends signal <sig> to the tf process, or with no arguments, /signal lists - all valid signal names. Valid signals usually include: HUP, INT, QUIT, - KILL, SEGV, TERM, USR1, USR2, and TSTP. The complete list varies from - system to system. + Sends signal <sig> to the tf process, or with no arguments, /signal lists + all valid signal names. Valid signals usually include: HUP, INT, QUIT, + KILL, SEGV, TERM, USR1, USR2, and TSTP. The complete list varies from + system to system. - See: signals, /suspend, getpid(), hooks (SIGHUP, SIGTERM, SIGUSR1, SIGUSR2) + See: signals, /suspend, getpid(), hooks (SIGHUP, SIGTERM, SIGUSR1, SIGUSR2) &spell &spelling @@ -3585,7 +3596,7 @@ Quoter Commands spelling checker - Usage: + Usage: /REQUIRE spell.tf @@ -3593,210 +3604,210 @@ spelling checker Keybinding: ^[s ____________________________________________________________________________ - After executing "/require spell.tf", typing "^[s" will call /spell_line to - report any misspellings in the current input line. /Spell_line can of - course be bound to other keys with "/def -b". + After executing "/require spell.tf", typing "^[s" will call /spell_line to + report any misspellings in the current input line. /Spell_line can of + course be bound to other keys with "/def -b". - /Spell_line assumes your system has a program called "spell" that reports - misspellings in its standard input. + /Spell_line assumes your system has a program called "spell" that reports + misspellings in its standard input. - See: interface, keys + See: interface, keys &/split /split - Usage: + Usage: /split <args> ____________________________________________________________________________ - Sets %{P1} to the substring of <args> before the first '=', and sets %{P2} - to the substring of <args> after the first '='. If there is no '=' in - <args>, %{P1} will contain the entire string and %{P2} will be empty. %{P0} - will contain the entire string. + Sets %{P1} to the substring of <args> before the first '=', and sets %{P2} + to the substring of <args> after the first '='. If there is no '=' in + <args>, %{P1} will contain the entire string and %{P2} will be empty. %{P0} + will contain the entire string. - Spaces surrounding the '=' are stripped. + Spaces surrounding the '=' are stripped. - See: getopts() + See: getopts() &/sub /sub - Usage: + Usage: /SUB [OFF|ON|FULL] ____________________________________________________________________________ - Sets the flag %{sub}. + Sets the flag %{sub}. - If the flag %{sub} is OFF (0), all lines except for history substitutions - (line beginning with '^') and commands (/) are sent as-is to the socket. + If the flag %{sub} is OFF (0), all lines except for history substitutions + (line beginning with '^') and commands (/) are sent as-is to the socket. - If the flag %{sub} is ON (1), the sequences "%;" and "%\" are substituted - with newlines, and the sequence "%%" is substituted with "%", and the - sequence "\<n>" is substituted with the character with decimal ASCII code - <n>. + If the flag %{sub} is ON (1), the sequences "%;" and "%\" are substituted + with newlines, and the sequence "%%" is substituted with "%", and the + sequence "\<n>" is substituted with the character with decimal ASCII code + <n>. - If the flag %{sub} is FULL, text is processed just as if it were the body of - a macro (see "evaluation") called without any arguments. This allows you to - have in-line macros in regular input. + If the flag %{sub} is FULL, text is processed just as if it were the body of + a macro (see "evaluation") called without any arguments. This allows you to + have in-line macros in regular input. - The flag %{sub} defaults to 0 (off). + The flag %{sub} defaults to 0 (off). - See: general, evaluation + See: general, evaluation &/substitute &substitute() /substitute - Function usage: + Function usage: SUBSTITUTE(<text> [, <attrs> [, <inline>]]) - Command usage: + Command usage: /SUBSTITUTE [-a<attrs>] [-p] <text> ____________________________________________________________________________ - When called from a trigger (directly or indirectly), the entire triggering - line is replaced with <text>. After a /substitute, it will appear as if - <text> is what caused the trigger; the original line is lost. In - particular, this means when /substitute is called from a fall-thru trigger, - triggers of lower priority will be compared against <text> instead of the - original line. - - Options and arguments: - command: -a<attrs> - function: <attrs> - Give <text> the attributes described by <attrs>. These are added to - the original line's attributes unless <attrs> include the "x" - attribute. - command: -p - function: <inline> = "on" or 1 - Interpet @{<attr>} strings as commands to set attributes inline, as - in /echo. (See /echo). - - Example: - - On a mud that uses MUFpage, you could set your #prepend string to "##page>", - and define a trigger like: + When called from a trigger (directly or indirectly), the entire triggering + line is replaced with <text>. After a /substitute, it will appear as if + <text> is what caused the trigger; the original line is lost. In + particular, this means when /substitute is called from a fall-thru trigger, + triggers of lower priority will be compared against <text> instead of the + original line. + + Options and arguments: + command: -a<attrs> + function: <attrs> + Give <text> the attributes described by <attrs>. These are added to + the original line's attributes unless <attrs> include the "x" + attribute. + command: -p + function: <inline> = "on" or 1 + Interpret @{<attr>} strings as commands to set attributes inline, as + in /echo. (See /echo). + + Example: + + On a mud that uses MUFpage, you could set your #prepend string to "##page>", + and define a trigger like: /def -ah -t"##page> *" hilite_mufpage = /substitute %-1 - This will match no matter what page format the sender uses, and strip off - the "##page>" so you never see it. + This will match no matter what page format the sender uses, and strip off + the "##page>" so you never see it. - For another example, see /replace. + For another example, see /replace. - See: triggers + See: triggers &/suspend /suspend - Usage: + Usage: /SUSPEND ____________________________________________________________________________ - Suspends the TF process, if your system and shell support job control. This - has the same effect as typing ^Z on most UNIX-like systems. When TF is - resumed, it redraws the screen and processes all /repeat and /quote commands - that were scheduled to run while TF was suspended and processes all text - that was received while TF was suspended. + Suspends the TF process, if your system and shell support job control. This + has the same effect as typing ^Z on most UNIX-like systems. When TF is + resumed, it redraws the screen and processes all /repeat and /quote commands + that were scheduled to run while TF was suspended and processes all text + that was received while TF was suspended. - See: signals, /signal. + See: signals, /signal. &/sys /sys - Usage: + Usage: /SYS <shell-command> ____________________________________________________________________________ - Executes <shell-command>. The command is executed without a tty, so it - should have no input, and its output, if any, should be plain text. The - command's stdout and stderr are echoed to tf's output window. /sys differs - from /sh in that /sys can not do an interactive shell command, but does not - redraw the screen or produce any extra messages. + Executes <shell-command>. The command is executed without a tty, so it + should have no input, and its output, if any, should be plain text. The + command's stdout and stderr are echoed to tf's output window. /sys differs + from /sh in that /sys can not do an interactive shell command, but does not + redraw the screen or produce any extra messages. - Note: calling /sys with arguments from a trigger is dangerous. If not - written carefully, such a trigger could allow anyone with access to the - server to gain access to your shell account. + Note: calling /sys with arguments from a trigger is dangerous. If not + written carefully, such a trigger could allow anyone with access to the + server to gain access to your shell account. - The return value of /sys is the exit status of the shell if it exited - normally, -1 otherwise. Note that UNIX shell commands usually return 0 for - success and nonzero for failure, which is the opposite of the TF convention. + The return value of /sys is the exit status of the shell if it exited + normally, -1 otherwise. Note that UNIX shell commands usually return 0 for + success and nonzero for failure, which is the opposite of the TF convention. - /sys executes synchronously. To execute a command asynchronously (in the - background), use /quote without the -S option. + /sys executes synchronously. To execute a command asynchronously (in the + background), use /quote without the -S option. - See: /sh, /quote + See: /sh, /quote &/telnet /telnet - Usage: + Usage: /TELNET <host> [<port>] ____________________________________________________________________________ - Connect to a line-based telnet host. The telnet login port is used if - <port> is omitted. - - Note that TF operates strictly in line-by-line mode, but telnetd (the server - running on the telnet login port) expects character-by- character mode. So, - simple shell operations and anything else which is basically line-by-line - should work without much difficulty, but anything that tries to control the - screen or expects single keystroke input will not work. /Telnet is somewhat - useful, but not useful enough to alter the fundamental line-by-line nature - of TF. If you want a general telnet client, you know where to find it. - - TF supports most of the TELNET protocol (even if a command other than - /telnet was used to connect). TF implements the TELNET options ECHO (lets - server control echoing of input), SGA (suppress GOAHEAD), EOR (allows use of - END-OF-RECORD in prompts), NAWS (allows TF to send window size information - to the server), TTYPE (allows server to ask about the terminal type), and - BINARY (allows transmission of 8-bit characters). For TTYPE queries, TF - responds "TINYFUGUE", "ANSI-ATTR", "ANSI", and "UNKNOWN", in that order. - For information on TELNET protocol, see RFC 854 and 1123. See also: - prompts. - - See: /addtelnet, /connect, %telopt, %binary_eol, protocols + Connect to a line-based telnet host. The telnet login port is used if + <port> is omitted. + + Note that TF operates strictly in line-by-line mode, but telnetd (the server + running on the telnet login port) expects character-by- character mode. So, + simple shell operations and anything else which is basically line-by-line + should work without much difficulty, but anything that tries to control the + screen or expects single keystroke input will not work. /Telnet is somewhat + useful, but not useful enough to alter the fundamental line-by-line nature + of TF. If you want a general telnet client, you know where to find it. + + TF supports most of the TELNET protocol (even if a command other than + /telnet was used to connect). TF implements the TELNET options ECHO (lets + server control echoing of input), SGA (suppress GOAHEAD), EOR (allows use of + END-OF-RECORD in prompts), NAWS (allows TF to send window size information + to the server), TTYPE (allows server to ask about the terminal type), and + BINARY (allows transmission of 8-bit characters). For TTYPE queries, TF + responds "TINYFUGUE", "ANSI-ATTR", "ANSI", and "UNKNOWN", in that order. + For information on TELNET protocol, see RFC 854 and 1123. See also: + prompts. + + See: /addtelnet, /connect, %telopt, %binary_eol, protocols &/test /test - Usage: + Usage: /TEST <expression> ____________________________________________________________________________ - /test evaluates the <expression> and returns its value, also setting the - special variable %?. The return value may be any type (before version 4.0, - only integer values were allowed). A new variable scope is NOT created. + /test evaluates the <expression> and returns its value, also setting the + special variable %?. The return value may be any type (before version 4.0, + only integer values were allowed). A new variable scope is NOT created. - /Test can be useful for evaluating an expression for its side effects, - ignoring the return value. For example, the command "/test kbdel(kbpoint() - - 1)" will perform a backspace, and "/test regmatch('foo(.*)', 'foobar')" - will assign "bar" to %P1. + /Test can be useful for evaluating an expression for its side effects, + ignoring the return value. For example, the command "/test kbdel(kbpoint() + - 1)" will perform a backspace, and "/test regmatch('foo(.*)', 'foobar')" + will assign "bar" to %P1. - Before version 3.5, /test was frequently used as the condition of an /IF or - /WHILE statement. This is no longer needed, since /IF and /WHILE can now - take an expression as a condition. + Before version 3.5, /test was frequently used as the condition of an /IF or + /WHILE statement. This is no longer needed, since /IF and /WHILE can now + take an expression as a condition. - Before version 4.0, /test was sometimes used to set the return value of a - macro, since a macro's return value is that of the last command executed. - The preferred way to do this now is with /return or /result. + Before version 4.0, /test was sometimes used to set the return value of a + macro, since a macro's return value is that of the last command executed. + The preferred way to do this now is with /return or /result. - See: /return, /if, /while, expressions, evaluation, variables + See: /return, /if, /while, expressions, evaluation, variables &/textencode @@ -3804,27 +3815,27 @@ textencode() /require textencode.tf - Function usage: + Function usage: textencode(<string>) textdecode(<encodedstring>) ____________________________________________________________________________ - textencode converts <string> to a form that contains only letters, digits, - and underscores. textdecode converts <encodedstring> (returned by a - previous call to textencode) back to the original string. + textencode converts <string> to a form that contains only letters, digits, + and underscores. textdecode converts <encodedstring> (returned by a + previous call to textencode) back to the original string. - These two functions can be useful for converting arbitrary text, such as a - world name or the name of a player on a mud, into a form that is safe to use - as part of a tf variable or macro name, or a filename. + These two functions can be useful for converting arbitrary text, such as a + world name or the name of a player on a mud, into a form that is safe to use + as part of a tf variable or macro name, or a filename. - The following example records the time a player connects to the mud, and is - safe even if the player name contains characters that are not legal in tf + The following example records the time a player connects to the mud, and is + safe even if the player name contains characters that are not legal in tf variable names: /def -mglob -t'{*} has connected.' record_connect_time = \ - /set connect_time_$[textencode({1})]=$[time()] + /set connect_time_$[textencode({1})]=$[time()] - See: functions + See: functions &/fgrep &/grep @@ -3846,71 +3857,71 @@ Text Utilities /REQUIRE textutil.tf ____________________________________________________________________________ - The library file textutil.tf defines several unix-like commands that are - particularly convenient when used with the %| pipe to redirect their input - or output. - - In the descriptions below, <filename> is the name of a file, and <in> and - <out> are handles of tfio streams. When <in> is optional, its default is - tfin. - - /fgrep [-cvi] <pattern> - /grep [-cv] <pattern> - /egrep [-cvi] <pattern> - These commands search tfin for lines that match the given pattern, - and by default prints those lines. For /fgrep, a line must contain - <pattern> to match; for /grep, the entire line must match the glob - pattern <pattern>; for /egrep, it must match the regexp pattern - <pattern>. - Options: - -c print only the count of matching lines. - -v select only non-matching lines. - -i ignore case (for /fgrep and /egrep only; /grep always - ignores case). - Note: these commands are not compatible with those defined in the - old library file grep.tf. - - /readfile <filename> - Reads lines from <filename> and writes them to tfout. - - /writefile [-a] <filename> - Reads lines from tfin and writes them to file <filename>. - Options: - -a append to file instead of overwriting. - - /head [-n<count>] [<in>] - Reads the first <count> (default 10) lines from <in> or tfin and - writes them to tfout. - - /wc [-lwc] [<in>] - Reads lines from <in> or tfin and prints the count of lines, - space-separated words, and characters that were read. - Options: - -l Print the count of lines only. - -w Print the count of words only. - -c Print the count of characters only. - - /tee <out> - Reads lines from tfin and echoes them to <out> and tfout. - - /copyio <in> <out> - Reads lines from <in> and writes them to <out>. This can be useful, - for example, when you want to send text from a tfio stream to a - command that reads only tfin: + The library file textutil.tf defines several unix-like commands that are + particularly convenient when used with the %| pipe to redirect their input + or output. + + In the descriptions below, <filename> is the name of a file, and <in> and + <out> are handles of tfio streams. When <in> is optional, its default is + tfin. + + /fgrep [-cvi] <pattern> + /grep [-cv] <pattern> + /egrep [-cvi] <pattern> + These commands search tfin for lines that match the given pattern, + and by default prints those lines. For /fgrep, a line must contain + <pattern> to match; for /grep, the entire line must match the glob + pattern <pattern>; for /egrep, it must match the regexp pattern + <pattern>. + Options: + -c print only the count of matching lines. + -v select only non-matching lines. + -i ignore case (for /fgrep and /egrep only; /grep always + ignores case). + Note: these commands are not compatible with those defined in the + old library file grep.tf. + + /readfile <filename> + Reads lines from <filename> and writes them to tfout. + + /writefile [-a] <filename> + Reads lines from tfin and writes them to file <filename>. + Options: + -a append to file instead of overwriting. + + /head [-n<count>] [<in>] + Reads the first <count> (default 10) lines from <in> or tfin and + writes them to tfout. + + /wc [-lwc] [<in>] + Reads lines from <in> or tfin and prints the count of lines, + space-separated words, and characters that were read. + Options: + -l Print the count of lines only. + -w Print the count of words only. + -c Print the count of characters only. + + /tee <out> + Reads lines from tfin and echoes them to <out> and tfout. + + /copyio <in> <out> + Reads lines from <in> and writes them to <out>. This can be useful, + for example, when you want to send text from a tfio stream to a + command that reads only tfin: /copyio <in> o %| /<command> - - /fmt Copies tfin to tfout, with adjacent non-blank lines joined. - /uniq Copies tfin to tfout, with adjacent duplicate lines removed. + /fmt Copies tfin to tfout, with adjacent non-blank lines joined. - /randline [<in>] - Copies one randomly selected line from <in> or tfin to tfout. + /uniq Copies tfin to tfout, with adjacent duplicate lines removed. + + /randline [<in>] + Copies one randomly selected line from <in> or tfin to tfout. ____________________________________________________________________________ - See: tfio, evaluation, substitution, oldgrep + See: tfio, evaluation, substitution, oldgrep &/tick &/tickon @@ -3920,7 +3931,7 @@ Text Utilities /tick - Usage: + Usage: /REQUIRE tick.tf @@ -3931,77 +3942,77 @@ Text Utilities /ticksize <n> ____________________________________________________________________________ - The /tick* commands implement dikumud tick counting, similar to tintin. - When the ticker is started with /tickon, it will warn you 10 seconds before - each tick, and print "TICK" on the tick. + The /tick* commands implement dikumud tick counting, similar to tintin. + When the ticker is started with /tickon, it will warn you 10 seconds before + each tick, and print "TICK" on the tick. - The messages can be changed by redefining the /tick_warn (10-second warning) - and /tick_action ("TICK") macros. You can make them perform any tf command, - not just printing. + The messages can be changed by redefining the /tick_warn (10-second warning) + and /tick_action ("TICK") macros. You can make them perform any tf command, + not just printing. - It is up to you to start the ticker in synch with the mud. If the mud - prints something on a tick, you can define a trigger on that which calls - /tickon. + It is up to you to start the ticker in sync with the mud. If the mud + prints something on a tick, you can define a trigger on that which calls + /tickon. - /Tick displays the time remaining until the next tick. + /Tick displays the time remaining until the next tick. - /Tickoff stops the ticker. + /Tickoff stops the ticker. - /Tickon and /tickset reset and start the ticker. + /Tickon and /tickset reset and start the ticker. - /Ticksize sets the tick period to <n> seconds (the default is 75). + /Ticksize sets the tick period to <n> seconds (the default is 75). - See: /require, timing, prompts + See: /require, timing, prompts &/time /time - Usage: + Usage: /TIME [<format>] ____________________________________________________________________________ - Displays the current time. <Format> is described under "ftime()". If - <format> is omitted, %{time_format} is used. + Displays the current time. <Format> is described under "ftime()". If + <format> is omitted, %{time_format} is used. - See: time(), ftime(), mktime(), %TZ, %time_format, %clock, idle() + See: time(), ftime(), mktime(), %TZ, %time_format, %clock, idle() &/toggle /toggle - Usage: + Usage: /TOGGLE <variable> ____________________________________________________________________________ - If <variable> has a value of 0, its value will be set to "1". If <variable> - has a non-zero value, its value will be set to "0". + If <variable> has a value of 0, its value will be set to "1". If <variable> + has a non-zero value, its value will be set to "0". - See: variables + See: variables &/tr /tr - Usage: + Usage: /REQUIRE tr.tf /TR <domain> <range> <string> ____________________________________________________________________________ - <Domain> and <range> are lists of characters of equal length. Each - character in <string> that appears in <domain> is translated to the - corresponding character in <range>, and the resulting string is printed. + <Domain> and <range> are lists of characters of equal length. Each + character in <string> that appears in <domain> is translated to the + corresponding character in <range>, and the resulting string is printed. Example: command: /def biff = /tr OIS. 01Z! $[toupper({*})] - command: /biff TinyFugue is cool wares, dude. + command: /biff TinyFugue is cool wares, dude. output: T1NYFUGUE 1Z C00L WAREZ, DUDE! - See: /replace, expressions, functions + See: /replace, expressions, functions &/act &/trigpc @@ -4011,7 +4022,7 @@ Text Utilities /trig - Usage: + Usage: /TRIG <pattern> = <body> /TRIGP <priority> <pattern> = <body> @@ -4019,63 +4030,63 @@ Text Utilities /TRIGPC <priority> <chance> <pattern> = <body> ____________________________________________________________________________ - Creates an unnamed macro that will trigger on <pattern> and execute <body>. - If <chance> is given with /trigc or /trigpc, it will be the percentage - probability of the trigger going off; default is 100%. If <priority> is - given with /trigp or /trigpc, it will be the priority of the trigger; - default is 0. The matching style of the trigger is determined by the global - variable %{matching}. + Creates an unnamed macro that will trigger on <pattern> and execute <body>. + If <chance> is given with /trigc or /trigpc, it will be the percentage + probability of the trigger going off; default is 100%. If <priority> is + given with /trigp or /trigpc, it will be the priority of the trigger; + default is 0. The matching style of the trigger is determined by the global + variable %{matching}. - If the command fails it returns 0. Otherwise, it creates a new macro and - returns its (positive) number (useful in /undefn and /edit). + If the command fails it returns 0. Otherwise, it creates a new macro and + returns its (positive) number (useful in /undefn and /edit). - /trig is equivalent to: /def -t<pattern> = <body>. - /trigp is equivalent to: /def -p<priority> -t<pattern> = <body>. - /trigc is equivalent to: /def -c<chance> -t<pattern> = <body>. + /trig is equivalent to: /def -t<pattern> = <body>. + /trigp is equivalent to: /def -p<priority> -t<pattern> = <body>. + /trigc is equivalent to: /def -c<chance> -t<pattern> = <body>. /trigpc is equivalent to: /def -p<priority> -c<chance> -t<pattern> = <body>. - Note: the /trig commands create macros without names. Thus each /trig - command will create a new macro macro instead of replacing an old macro. - For this reason, it is usually better to use /def and give your macros - names. + Note: the /trig commands create macros without names. Thus each /trig + command will create a new macro macro instead of replacing an old macro. + For this reason, it is usually better to use /def and give your macros + names. - See: triggers, evaluation, patterns, /def, /untrig + See: triggers, evaluation, patterns, /def, /untrig &/trigger /trigger - Usage: + Usage: /TRIGGER [-ln] [-g] [-w[<world>]] [-h[<event>]] <text> ____________________________________________________________________________ - Executes macros with triggers or hook arguments that match <text>, just as - if <text> had come from a socket or a hook event had occurred with <text> as - its arguments. The return value of /trigger is the number of (non-quiet) - macros that were executed. /Trigger is useful for debugging triggers and - hooks. - - Options: - -g Match "global" triggers or hooks that were not defined with /def -w - -w<world> - Match triggers or hooks for <world>, or the current world if <world> - is omitted. - -h<event> - Match hooks where <event> matches the hook event and <text> matches - the hook argument pattern. Without -h, /trigger matches triggers, - not hooks. - -n Do not execute any of the matched macros; instead, display a list of - each macro that would have matched, including its fallthru flag, - priority, and name. (Note that if any macro in the list would have - executed substitute() or /substitute, the macros listed after it may - not be correct.) - -l Like -n, but list each macro in full, as if by /list. - If neither -g nor -w options are given, both are assumed. That is, <text> - is matched against global triggers or hooks, as well as triggers or hooks - for the current world. - - See: triggers, hooks, debugging, /def + Executes macros with triggers or hook arguments that match <text>, just as + if <text> had come from a socket or a hook event had occurred with <text> as + its arguments. The return value of /trigger is the number of (non-quiet) + macros that were executed. /Trigger is useful for debugging triggers and + hooks. + + Options: + -g Match "global" triggers or hooks that were not defined with /def -w + -w<world> + Match triggers or hooks for <world>, or the current world if <world> + is omitted. + -h<event> + Match hooks where <event> matches the hook event and <text> matches + the hook argument pattern. Without -h, /trigger matches triggers, + not hooks. + -n Do not execute any of the matched macros; instead, display a list of + each macro that would have matched, including its fallthru flag, + priority, and name. (Note that if any macro in the list would have + executed substitute() or /substitute, the macros listed after it may + not be correct.) + -l Like -n, but list each macro in full, as if by /list. + If neither -g nor -w options are given, both are assumed. That is, <text> + is matched against global triggers or hooks, as well as triggers or hooks + for the current world. + + See: triggers, hooks, debugging, /def &/false &/: @@ -4083,203 +4094,203 @@ Text Utilities /true - Usage: + Usage: /TRUE /FALSE ____________________________________________________________________________ - /True does nothing, and returns nonzero. + /True does nothing, and returns nonzero. - /False does nothing, and returns zero. + /False does nothing, and returns zero. - /: is the same as /true. + /: is the same as /true. &/unbind /unbind - Usage: + Usage: /UNBIND <sequence> ____________________________________________________________________________ - Removes a macro with the keybinding <sequence>. + Removes a macro with the keybinding <sequence>. - See: general, /bind, /purge + See: general, /bind, /purge &/undef /undef - Usage: + Usage: - /UNDEF <name>... + /UNDEF <name>... ____________________________________________________________________________ - For each <name> given, /undef removes the definition of the macro with that - name. + For each <name> given, /undef removes the definition of the macro with that + name. - The return value of /undef is the number of macros that were removed. + The return value of /undef is the number of macros that were removed. - See: macros, /def, /purge, /undefn, /undeft, /untrig, /unhook + See: macros, /def, /purge, /undefn, /undeft, /untrig, /unhook &/undefn /undefn - Usage: + Usage: - /UNDEFN <number> ... + /UNDEFN <number> ... ____________________________________________________________________________ - Removes macros with the numbers specified in the arguments. Macro numbers - can be determined with /list, or from the return value of the command used - to create the macro. + Removes macros with the numbers specified in the arguments. Macro numbers + can be determined with /list, or from the return value of the command used + to create the macro. - See: macros, /def, /list, /purge, /undef + See: macros, /def, /list, /purge, /undef &/undeft /undeft - Usage: + Usage: /UNDEFT <trigger> ____________________________________________________________________________ - Removes a macro with a trigger associated with it that is triggered by the - pattern <trigger>. <Trigger> is matched against existing triggers using - simple comparison. + Removes a macro with a trigger associated with it that is triggered by the + pattern <trigger>. <Trigger> is matched against existing triggers using + simple comparison. - See: macros, triggers, /def, /purge, /undef + See: macros, triggers, /def, /purge, /undef &/unhook /unhook - Usage: + Usage: /UNHOOK <event> [<pattern>] ____________________________________________________________________________ - Removes a macro with an associated hook on <event> <pattern>. + Removes a macro with an associated hook on <event> <pattern>. - See: hooks, /hook, /purge, /undef + See: hooks, /hook, /purge, /undef &/unset /unset - Usage: + Usage: /UNSET <name> ____________________________________________________________________________ - /Unset removes the value of variable <name>. + /Unset removes the value of variable <name>. - /Unset returns 0 if an error occurred, nonzero otherwise. + /Unset returns 0 if an error occurred, nonzero otherwise. - See: variables, /set, /setenv, /let + See: variables, /set, /setenv, /let &/untrig /untrig - Usage: + Usage: /UNTRIG [-a<attrs>] <trigger> ____________________________________________________________________________ - Removes a macro with an associated trigger that is triggered by the pattern - <trigger> and has attributes <attrs>. If -a<attrs> is omitted, -an is - assumed. <Trigger> is matched against existing triggers using simple - comparison. + Removes a macro with an associated trigger that is triggered by the pattern + <trigger> and has attributes <attrs>. If -a<attrs> is omitted, -an is + assumed. <Trigger> is matched against existing triggers using simple + comparison. - See: triggers, /trig, /purge, /undef + See: triggers, /trig, /purge, /undef &/unworld /unworld - Usage: + Usage: - /UNWORLD <name>... + /UNWORLD <name>... ____________________________________________________________________________ - For each <name> given, /unworld removes the definition of the world with - that name. The history for removed worlds will be deleted, but some or all - of the lines may still exist in the global history. + For each <name> given, /unworld removes the definition of the world with + that name. The history for removed worlds will be deleted, but some or all + of the lines may still exist in the global history. - The return value of /unworld is the number of worlds that were removed. + The return value of /unworld is the number of worlds that were removed. - See: worlds, /addworld + See: worlds, /addworld &/ver &/version /version - Usage: + Usage: /VERSION /VER ____________________________________________________________________________ - /Version displays the TinyFugue version you're running and the operating - system for which it was compiled (if known). + /Version displays the TinyFugue version you're running and the operating + system for which it was compiled (if known). - /Ver displays an abbreviated version number. + /Ver displays an abbreviated version number. - The latest version of TF can be found at http://tinyfugue.sourceforge.net/. + The latest version of TF can be found at http://tinyfugue.sourceforge.net/. - See: /changes + See: /changes &/watchdog /watchdog - Usage: + Usage: /WATCHDOG [OFF|ON] /WATCHDOG <n1> [<n2>] ____________________________________________________________________________ - Sets the flag %{watchdog}. This flag determines whether Fugue will watch - for identical lines and suppress them. Fugue looks for lines which have - occurred <n1> times out of <n2> (<n1> defaults to 2 and <n2> to 5) and - suppress them, so with the default settings Fugue will suppress any lines - that have occurred 2 times out of the last 5. + Sets the flag %{watchdog}. This flag determines whether Fugue will watch + for identical lines and suppress them. Fugue looks for lines which have + occurred <n1> times out of <n2> (<n1> defaults to 2 and <n2> to 5) and + suppress them, so with the default settings Fugue will suppress any lines + that have occurred 2 times out of the last 5. - The <n1> and <n2> settings for /watchdog are distinct from the <n1> and <n2> - settings for /watchname. + The <n1> and <n2> settings for /watchdog are distinct from the <n1> and <n2> + settings for /watchname. - The flag %{watchdog} defaults to 0 (off). + The flag %{watchdog} defaults to 0 (off). - See: %watchdog, /watchname + See: %watchdog, /watchname &/watchname /watchname - Usage: + Usage: /WATCHNAME [OFF|ON] /WATCHNAME <n1> [<n2>] ____________________________________________________________________________ - Sets the flag %{watchname}. This flag determines whether Fugue will watch - for players displaying lots of output. Fugue looks for names which have - begun the line <n1> times out of <n2> (<n1> defaults to 4 and <n2> to 5) and - gag that person (with a message), so with the default settings Fugue will - gag any person whose name has begun 4 of the last 5 lines. + Sets the flag %{watchname}. This flag determines whether Fugue will watch + for players displaying lots of output. Fugue looks for names which have + begun the line <n1> times out of <n2> (<n1> defaults to 4 and <n2> to 5) and + gag that person (with a message), so with the default settings Fugue will + gag any person whose name has begun 4 of the last 5 lines. - The <n1> and <n2> settings for /watchname are distinct from the <n1> and - <n2> settings for /watchdog. + The <n1> and <n2> settings for /watchname are distinct from the <n1> and + <n2> settings for /watchdog. - The flag %{watchname} defaults to 0 (off). + The flag %{watchname} defaults to 0 (off). - See: %watchname, /watchdog + See: %watchname, /watchdog &/while &/do @@ -4288,32 +4299,32 @@ Text Utilities /while - Usage: + Usage: /WHILE (expr) list /DONE /WHILE list /DO list /DONE ____________________________________________________________________________ - The <list>s may be any list of commands. The return value of a <list> is - the return value of the last command executed in the <list>. Each <list> - must be terminated by "%;". + The <list>s may be any list of commands. The return value of a <list> is + the return value of the last command executed in the <list>. Each <list> + must be terminated by "%;". - The <list> or <expr> following the /WHILE is called the condition. The - condition is executed or evaluated, and if its result is non-zero, the next - <list> is executed. This sequence is repeated until the condition returns - zero. + The <list> or <expr> following the /WHILE is called the condition. The + condition is executed or evaluated, and if its result is non-zero, the next + <list> is executed. This sequence is repeated until the condition returns + zero. - The /BREAK command can be used within the loop to terminate the loop early. - The loop can also be terminated early by catching a SIGINT (usually - generated by typing ^C). If the variable %{max_iter} is non-zero, the loop - will terminate automatically if the number of iterations reaches that - number. + The /BREAK command can be used within the loop to terminate the loop early. + The loop can also be terminated early by catching a SIGINT (usually + generated by typing ^C). If the variable %{max_iter} is non-zero, the loop + will terminate automatically if the number of iterations reaches that + number. - When /WHILE is used on the command line, "%;" command separation will be - done even if %sub=off. Of course, full substitution will be done if - %sub=full. + When /WHILE is used on the command line, "%;" command separation will be + done even if %sub=off. Of course, full substitution will be done if + %sub=full. - Example: + Example: /def count = \ @@ -4323,31 +4334,31 @@ Text Utilities /let i=$[i + 1]%; \ /done - The command "/count 10" will execute the commands "say 1", "say 2", ... - "say 10". + The command "/count 10" will execute the commands "say 1", "say 2", ... + "say 10". - See: evaluation, /test, /break, /for + See: evaluation, /test, /break, /for &/world /world - Usage: + Usage: /WORLD [-lqnxfb] [<world>] /WORLD <host> <port> ____________________________________________________________________________ - If <world> is already connected, "/world <world>" is equivalent to "/fg - <world>", and brings <world> into the foreground. If <world> is not - connected, "/world <world>" is equivalent to "/connect <world>", and - attempts to open a connection to that world. + If <world> is already connected, "/world <world>" is equivalent to "/fg + <world>", and brings <world> into the foreground. If <world> is not + connected, "/world <world>" is equivalent to "/connect <world>", and + attempts to open a connection to that world. - The second form is equivalent to "/connect <host> <port>". + The second form is equivalent to "/connect <host> <port>". - The -lqnxfb options are the same as those for /fg and /connect. + The -lqnxfb options are the same as those for /fg and /connect. - See: /connect, /fg + See: /connect, /fg & &hilites @@ -4365,89 +4376,89 @@ Text Utilities display attributes - Many TF commands take an argument to specify an attribute list, containing - one or more of: "n" (none), "x" (exclusive), "g" (gag), "G" (nohistory), "L" - (nolog), "A" (noactivity), "u" (underline), "r" (reverse), "B" (bold), "b" - (bell), "h" (hilite), "E" (error), "W" (warning), or "C<color>" (color). - These attributes are used to display text associated with the command. Use - commas to separate attributes within an attribute list; commas may be - omitted between single-letter attributes. For example, "BuCred,Cbgyellow" - means bold underlined red text on a yellow background. - - "None" ("n") is useful for finding macros without attributes (e.g. "/list - -an") or for turning off attributes in the middle of a line (e.g. "/echo -p - foo @{u}bar@{n} baz"). - - Normally, new attributes are combined with the pre-existing attributes. But - if the new attributes include "x" (exclusive), the pre-existing display - attributes are turned off first. So, for example, if one trigger with -au - and another trigger with -Pr match the same line, the whole line will be - underlined and part of it will also be reversed; but if the second trigger - had -Pxr instead, then most of the line would be underlined, and part would - be reversed but not underlined. - - The "G" (nohistory) attribute prevents the line from being recorded in - history. The "L" (nolog) attribute prevents the line from being recorded in - a log file. - - The "A" (noactivity) attribute prevents the line from causing an ACTIVITY - hook or a nonzero moresize(). For example, the following command prevents - people connecting and disconnecting from counting as activity: + Many TF commands take an argument to specify an attribute list, containing + one or more of: "n" (none), "x" (exclusive), "g" (gag), "G" (nohistory), "L" + (nolog), "A" (noactivity), "u" (underline), "r" (reverse), "B" (bold), "b" + (bell), "h" (hilite), "E" (error), "W" (warning), or "C<color>" (color). + These attributes are used to display text associated with the command. Use + commas to separate attributes within an attribute list; commas may be + omitted between single-letter attributes. For example, "BuCred,Cbgyellow" + means bold underlined red text on a yellow background. + + "None" ("n") is useful for finding macros without attributes (e.g. "/list + -an") or for turning off attributes in the middle of a line (e.g. "/echo -p + foo @{u}bar@{n} baz"). + + Normally, new attributes are combined with the pre-existing attributes. But + if the new attributes include "x" (exclusive), the pre-existing display + attributes are turned off first. So, for example, if one trigger with -au + and another trigger with -Pr match the same line, the whole line will be + underlined and part of it will also be reversed; but if the second trigger + had -Pxr instead, then most of the line would be underlined, and part would + be reversed but not underlined. + + The "G" (nohistory) attribute prevents the line from being recorded in + history. The "L" (nolog) attribute prevents the line from being recorded in + a log file. + + The "A" (noactivity) attribute prevents the line from causing an ACTIVITY + hook or a nonzero moresize(). For example, the following command prevents + people connecting and disconnecting from counting as activity: /def -aA -q -t"{*} has {*connected.}" noact_connect - - The "C<name>" (Color) attribute allows you to name a color. The "C" must be - followed by the <name> of the color; a comma after the <name> can be used to - separate it from attributes that follow it. Depending on your terminal and - how tf was compiled, there may be 8, 16, or 256 colors available. See: - color. - The "h" (hilite), "E" (error), and "W" (warning) attributes are special. - When "h", "E", or "W" is specified, it is replaced with the attributes - listed in the %{hiliteattr}, %{error_attr}, or %{warning_attr} variable, - respectively. Additionally, error and warning messages generated by tf - automatically have the "E" and "W" attributes, so you can alter their - appearance by setting the corresponding variable. For example, the commands + The "C<name>" (Color) attribute allows you to name a color. The "C" must be + followed by the <name> of the color; a comma after the <name> can be used to + separate it from attributes that follow it. Depending on your terminal and + how tf was compiled, there may be 8, 16, or 256 colors available. See: + color. + + The "h" (hilite), "E" (error), and "W" (warning) attributes are special. + When "h", "E", or "W" is specified, it is replaced with the attributes + listed in the %{hiliteattr}, %{error_attr}, or %{warning_attr} variable, + respectively. Additionally, error and warning messages generated by tf + automatically have the "E" and "W" attributes, so you can alter their + appearance by setting the corresponding variable. For example, the commands /set hiliteattr=r /echo -ahu foobar - will display the word "foobar" with reverse and underline attributes. - %{hiliteattr} makes it easy to change the meaning of all your hilite macros - at once, without editing each one individually. + will display the word "foobar" with reverse and underline attributes. + %{hiliteattr} makes it easy to change the meaning of all your hilite macros + at once, without editing each one individually. - The "f" (flash) and "d" (dim) attributes are accepted for backward - compatiblity, but ignored. + The "f" (flash) and "d" (dim) attributes are accepted for backward + compatibility, but ignored. - All attributes except 'n' may be combined usefully. (Even gags can be - combined with other attributes: combining 'g' and 'B', for example, will gag - the text initially, but will display it as bold if it is recalled with - /recall -ag.) + All attributes except 'n' may be combined usefully. (Even gags can be + combined with other attributes: combining 'g' and 'B', for example, will gag + the text initially, but will display it as bold if it is recalled with + /recall -ag.) - It is possible to apply attributes to a part of a line, using /partial or - the -P option of /def. If two or more partial attributes overlap, their - effects will be combined (unless the "x" attribute is used). For example, - overlapping bold and reverse will appear bold and reverse; overlapping blue - and red will appear magenta. + It is possible to apply attributes to a part of a line, using /partial or + the -P option of /def. If two or more partial attributes overlap, their + effects will be combined (unless the "x" attribute is used). For example, + overlapping bold and reverse will appear bold and reverse; overlapping blue + and red will appear magenta. - Ansi attribute codes sent by the server will be interpreted by tf if - %{emulation} is set to "ansi_attr". See: %emulation. + Ansi attribute codes sent by the server will be interpreted by tf if + %{emulation} is set to "ansi_attr". See: %emulation. - As of version 5.0, attributes in string values are preserved by just about - every string operation, including commands, variables, expression operators, - functions, regexp substitutions, $() command substitution, and status bar - field expressions. The inline_attr() function can be used to convert - attribute codes within a string to actual attributes. + As of version 5.0, attributes in string values are preserved by just about + every string operation, including commands, variables, expression operators, + functions, regexp substitutions, $() command substitution, and status bar + field expressions. The inline_attr() function can be used to convert + attribute codes within a string to actual attributes. - Attributes not supported by your terminal type will be stored, but not - displayed. + Attributes not supported by your terminal type will be stored, but not + displayed. &%catch_ctrls %catch_ctrls - See: %emulation + See: %emulation &/color_off &color &colour @@ -4457,76 +4468,76 @@ display attributes colors - Color is enabled by default. To disable it, use "/color_off"; to re-enable - color using ANSI codes, use "/color_on". - - The color attribute allows you to specify a foreground color with "C<name>" - or a background color with "Cbg<name>". Any terminal that supports color - should support the 8 basic colors: black (black), red, green, yellow, blue, - magenta, cyan, white (white). (If you are reading this in tf, and the - previous sentence did not contain colored words, you do not have working - color support. If it contained strange codes, you should do "/color_off" or - redefine the codes as described below.) The standard library defines these 8 - basic colors with ANSI control codes, which will work on most terminals that - support color. - - Many terminals also support brighter versions of the 8 basic colors, but may - need to be configured to do so. On xterm, you may want to disable the - "boldColors" resource so that bold plus a normal color does not produce one - of these bright colors. The bright color names are: gray, brightred, - brightgreen, brightyellow, brightblue, brightmagenta, brightcyan, or - brightwhite. The standard library defines these 8 bright colors with ISO - 6429 extension control codes, which will work on most terminals that support - 16 colors. - - Some newer terminals can display 256 colors. If tf was built with the - "256colors" feature, tf will recognize the following additional color names. - Names names of the form "rgb<R><G><B>" describe a color within a 6x6x6 color - cube: <R>, <G> and <B> are each a single digit between 0 and 5 that - specifies the brightness of the red, green, or blue component of the color. - For example, "rgb020" is a dark green, and "rgb520" is reddish orange. - Names of the form "gray<N>" describe a point on a grayscale, where <N> is - between 0 (dark) and 23 (light). The standard library defines the "rgb*" - and "gray*" colors with xterm 256 color extension control codes. - - To test the functionality and appearance of colors in tf, you can "/load - testcolor.tf". This will also show the <R>, <G> and <B> values of each - color. - - You can use a defined color in any attribute string. For example, to make - /hilite'd text appear blue, you can /set hiliteattr=Cblue. - - To define your own control codes for terminals that don't accept the - predefined codes, you will need to edit the color variables. The code to - enable foreground or background color <name> is stored in a variable called - %{start_color_<name>} or %{start_color_bg<name>}. The code to turn off - colors is stored in %{end_color}. These variables may contain carat - notation and backslashed ascii codes in decimal, octal, or hexadecimal - (e.g., ESC is ^[, \27, \033, or \0x1B). - - The default definition of %end_color is "\033[39;49;0m", which should work - on most ANSI-like terminals. If this does not work on your terminal, then - try "/set end_color \033[30;47;0m" (for black on white) or "/set end_color - \033[37;40;0m" (for white on black). - - If %{emulation} is set to "ansi_attr" (the default), then ANSI, ISO 6429, - and xterm 256 color extension codes sent by the server will be interpreted - by tf. As a result, if the %{start_color_<name>} variables are set - correctly for your terminal, tf will translate color codes from the server - into codes for your terminal, displaying them correctly even if your - terminal does not use the same codes the server sends. See: %emulation. - - Note for "screen(1)" users: to make 8-16 colors work under Screen, you need - the following screenrc settings: + Color is enabled by default. To disable it, use "/color_off"; to re-enable + color using ANSI codes, use "/color_on". + + The color attribute allows you to specify a foreground color with "C<name>" + or a background color with "Cbg<name>". Any terminal that supports color + should support the 8 basic colors: black (black), red, green, yellow, blue, + magenta, cyan, white (white). (If you are reading this in tf, and the + previous sentence did not contain colored words, you do not have working + color support. If it contained strange codes, you should do "/color_off" or + redefine the codes as described below.) The standard library defines these 8 + basic colors with ANSI control codes, which will work on most terminals that + support color. + + Many terminals also support brighter versions of the 8 basic colors, but may + need to be configured to do so. On xterm, you may want to disable the + "boldColors" resource so that bold plus a normal color does not produce one + of these bright colors. The bright color names are: gray, brightred, + brightgreen, brightyellow, brightblue, brightmagenta, brightcyan, or + brightwhite. The standard library defines these 8 bright colors with ISO + 6429 extension control codes, which will work on most terminals that support + 16 colors. + + Some newer terminals can display 256 colors. If tf was built with the + "256colors" feature, tf will recognize the following additional color names. + Names names of the form "rgb<R><G><B>" describe a color within a 6x6x6 color + cube: <R>, <G> and <B> are each a single digit between 0 and 5 that + specifies the brightness of the red, green, or blue component of the color. + For example, "rgb020" is a dark green, and "rgb520" is reddish orange. + Names of the form "gray<N>" describe a point on a grayscale, where <N> is + between 0 (dark) and 23 (light). The standard library defines the "rgb*" + and "gray*" colors with xterm 256 color extension control codes. + + To test the functionality and appearance of colors in tf, you can "/load + testcolor.tf". This will also show the <R>, <G> and <B> values of each + color. + + You can use a defined color in any attribute string. For example, to make + /hilite'd text appear blue, you can /set hiliteattr=Cblue. + + To define your own control codes for terminals that don't accept the + predefined codes, you will need to edit the color variables. The code to + enable foreground or background color <name> is stored in a variable called + %{start_color_<name>} or %{start_color_bg<name>}. The code to turn off + colors is stored in %{end_color}. These variables may contain carat + notation and backslashed ASCII codes in decimal, octal, or hexadecimal + (e.g., ESC is ^[, \27, \033, or \0x1B). + + The default definition of %end_color is "\033[39;49;0m", which should work + on most ANSI-like terminals. If this does not work on your terminal, then + try "/set end_color \033[30;47;0m" (for black on white) or "/set end_color + \033[37;40;0m" (for white on black). + + If %{emulation} is set to "ansi_attr" (the default), then ANSI, ISO 6429, + and xterm 256 color extension codes sent by the server will be interpreted + by tf. As a result, if the %{start_color_<name>} variables are set + correctly for your terminal, tf will translate color codes from the server + into codes for your terminal, displaying them correctly even if your + terminal does not use the same codes the server sends. See: %emulation. + + Note for "screen(1)" users: to make 8-16 colors work under Screen, you need + the following screenrc settings: termcap xterm AF=\E[3%dm terminfo xterm AF=\E[3%p1%dm termcap xterm AB=\E[4%dm terminfo xterm AB=\E[4%p1%dm - - To make 256 colors work under Screen, it must have been compiled with - "--enable-colors256", and you need the following screenrc settings: + + To make 256 colors work under Screen, it must have been compiled with + "--enable-colors256", and you need the following screenrc settings: terminfo xterm Co=256 termcap xterm Co=256 @@ -4534,15 +4545,15 @@ colors terminfo xterm AF=\E[38;5;%p1%dm termcap xterm AB=\E[48;5;%dm terminfo xterm AB=\E[48;5;%p1%dm - - Colors are numbered 0 through 255 in the order in which they are described - above, but refering to colors by their enumeration number is generally not - recommended, as the numbering is subject to change. In particular, the - numbering and interpretation of background colors changed in version 5.0 - beta 7. - See: attributes + Colors are numbered 0 through 255 in the order in which they are described + above, but referring to colors by their enumeration number is generally not + recommended, as the numbering is subject to change. In particular, the + numbering and interpretation of background colors changed in version 5.0 + beta 7. + + See: attributes © &warranty @@ -4552,35 +4563,35 @@ colors copyright TinyFugue - programmable mud client - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, - 2005, 2006-2007 Ken Keys + Cpyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) + - PCRE regexp package is Copyright (C) 1997-1999 University of Cambridge + PCRE regexp package is Copyright (C) 1997-1999 University of Cambridge - For bug reports, questions, suggestions, etc., see "problems". + For bug reports, questions, suggestions, etc., see "problems". - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - You should have received a copy of the GNU General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 675 Mass - Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 675 Mass + Ave, Cambridge, MA 02139, USA. #sites #find #where #www #ftp - The latest information and latest version of TinyFugue can be found at - http://tinyfugue.sourceforge.net/. Other sites may or may not have the - latest version. + The latest information and latest version of TinyFugue can be found at + http://tinyfugue.sourceforge.net/. Other sites may or may not have the + latest version. &debug &debugger @@ -4588,22 +4599,22 @@ copyright Debugging - Debugging topics: + Debugging topics: - * %kecho - echo keyboard input - * %mecho - echo macros as they execute - * %qecho - echo generated /quote text - * %secho - echo text sent to server - * %pedantic - enable extra warnings - * %defcompile - display syntax errors when macros are defined instead - of the first time they are used - * %emulation=debug - display nonprintable characters - * %telopt - echo telnet negotiation - * /trigger -n - see what macros would be triggered - * /addworld -e - simulated "loopback" server - * /runtime - measure running time of commands + * %kecho - echo keyboard input + * %mecho - echo macros as they execute + * %qecho - echo generated /quote text + * %secho - echo text sent to server + * %pedantic - enable extra warnings + * %defcompile - display syntax errors when macros are defined instead + of the first time they are used + * %emulation=debug - display nonprintable characters + * %telopt - echo telnet negotiation + * /trigger -n - see what macros would be triggered + * /addworld -e - simulated "loopback" server + * /runtime - measure running time of commands - See also: hints + See also: hints &syntax &body @@ -4615,77 +4626,77 @@ Debugging evaluation - A Builtin Command is any of the commands listed under "commands". All - builtin commands start with "/". All builtins have a return value, usually - nonzero for success and 0 for failure. + A Builtin Command is any of the commands listed under "commands". All + builtin commands start with "/". All builtins have a return value, usually + nonzero for success and 0 for failure. - A Macro Command is a user-defined command. Macro commands also start with - '/'. The return value of a macro is the return value of its body when - executed. + A Macro Command is a user-defined command. Macro commands also start with + '/'. The return value of a macro is the return value of its body when + executed. #/! #/@ #/# #/ - A command starting with a single "/" is either a Macro Command or a Builtin - Command. If the "/" is followed by "!", the return value of the command - will be negated. If the "/" or "/!" is followed by "@", the rest of the - word is interpreted as the name of a Builtin Command. If the "/" or "/!" is - followed by "#", the rest of the word is interpreted as the number of a - macro. If neither "@" nor "#" is used (the normal case), the rest of the - word is interpreted as a macro if there is one with that name, otherwise it - is interpreted as the name of a Builtin Command. If the name does not match - any macro or Builtin Command, the NOMACRO hook is called. + A command starting with a single "/" is either a Macro Command or a Builtin + Command. If the "/" is followed by "!", the return value of the command + will be negated. If the "/" or "/!" is followed by "@", the rest of the + word is interpreted as the name of a Builtin Command. If the "/" or "/!" is + followed by "#", the rest of the word is interpreted as the number of a + macro. If neither "@" nor "#" is used (the normal case), the rest of the + word is interpreted as a macro if there is one with that name, otherwise it + is interpreted as the name of a Builtin Command. If the name does not match + any macro or Builtin Command, the NOMACRO hook is called. # - A Simple Command is any command that does not start with "/". The text of - such a command is sent directly to the current world, if there is one. The - return value of a simple command is 1 if the text is successfully sent to - the current world, otherwise 0. To send a line that starts with "/" without - having it interpreted as a Macro Command or Builtin Command, use a leading - "//"; the first "/" will be stripped. - - A Compound Command is one of /IF.../ENDIF or /WHILE.../DONE. These are - described under separate help sections. Their return value is that of the - last command executed. - - A List is a sequence of commands separated by "%;" (separator) or "%|" - (pipe) tokens. The commands are executed in sequence, but may be aborted - early with the /RETURN or /BREAK commands. and the return value of the List - is the return value of the last command executed in the sequence. An empty - List has a return value of 1. - - Two commands separated by "%|" pipe token mentioned above will have the - output stream (tfout) of the first connected to the input stream (tfin) of - the second. The first command runs to completion before the second command - begins; the second command should stop reading tfin when it becomes empty. - Simple Commands have no tfin or tfout, so they may not be piped. The tfout - of a Compound Command may not be piped directly, but the output of a macro - that contains a Compound Command may be piped. - - Some characters within a macro body undergo substitution. These special - characters are not interpreted as themselves, but cause some evaluation to - be performed, and the result substituted in place of these characters. This - is described under "substitution". + A Simple Command is any command that does not start with "/". The text of + such a command is sent directly to the current world, if there is one. The + return value of a simple command is 1 if the text is successfully sent to + the current world, otherwise 0. To send a line that starts with "/" without + having it interpreted as a Macro Command or Builtin Command, use a leading + "//"; the first "/" will be stripped. + + A Compound Command is one of /IF.../ENDIF or /WHILE.../DONE. These are + described under separate help sections. Their return value is that of the + last command executed. + + A List is a sequence of commands separated by "%;" (separator) or "%|" + (pipe) tokens. The commands are executed in sequence, but may be aborted + early with the /RETURN or /BREAK commands. and the return value of the List + is the return value of the last command executed in the sequence. An empty + List has a return value of 1. + + Two commands separated by "%|" pipe token mentioned above will have the + output stream (tfout) of the first connected to the input stream (tfin) of + the second. The first command runs to completion before the second command + begins; the second command should stop reading tfin when it becomes empty. + Simple Commands have no tfin or tfout, so they may not be piped. The tfout + of a Compound Command may not be piped directly, but the output of a macro + that contains a Compound Command may be piped. + + Some characters within a macro body undergo substitution. These special + characters are not interpreted as themselves, but cause some evaluation to + be performed, and the result substituted in place of these characters. This + is described under "substitution". #scope #dynamic scope - When an expansion begins, a new scope is created. Any local variables - created during the expansion will be placed in this new scope. The scope - and all variables in it are destroyed when the expansion exits. + When an expansion begins, a new scope is created. Any local variables + created during the expansion will be placed in this new scope. The scope + and all variables in it are destroyed when the expansion exits. - Any variable reference will refer to the variable with that name in the - nearest enclosing (i.e., most recently created) still existing scope. This - is called "dynamic scope". + Any variable reference will refer to the variable with that name in the + nearest enclosing (i.e., most recently created) still existing scope. This + is called "dynamic scope". - Lexical scope can be simulated to some extent by using variable - substitutions with the correct number of "%"s instead of variable - references. (Remember, a "reference" uses the name by itself in an - expression, like "/test foo"; a "substitution" uses "%" characters, like - "/test %foo"). + Lexical scope can be simulated to some extent by using variable + substitutions with the correct number of "%"s instead of variable + references. (Remember, a "reference" uses the name by itself in an + expression, like "/test foo"; a "substitution" uses "%" characters, like + "/test %foo"). # - See: commands, macros, substitution, /if, /while + See: commands, macros, substitution, /if, /while &expnonvis &expnonvisusal @@ -4693,37 +4704,37 @@ evaluation experimental non-visual mode - TF 5.0 beta 5 has a new experimental non-visual mode ("expnonvis") that - fixes design flaws in traditional non-visual mode. I may get rid of - traditional non-visual mode in the future, so if you use it, I suggest you - try expnonvis mode now and let me know if you don't like it. To enable - expnonvis mode, "/set expnonvis=on" and "/set visual=off". You may also - want to "/set kecho=on" (see below). - - In the new expnonvis mode, input is only ever visible on the bottom line. - It scrolls your input buffer left and right as needed to display the part of - the input buffer in the neighborhood of the cursor. The part of the line - that is "off the left edge" of the screen is simply not visible. In - traditional non-visual mode, that part of the line would scroll up, - polluting the output region with partial input lines. - - The "only on bottom line" rule applies even when you hit return to execute - the input line. Your input is erased, and the command is executed; it does - not scroll up. If you want to see the input text scroll up, you can "/set - kecho=on"; this will print the entire input, not just the last segment of it - that fit within the screen width. You may also want to set %kecho_attr so - that the echoed input is easily distinguishable from regular output. - - The minimum amount of scrolling is determined by the %sidescroll variable, - which defaults to 1. For slow terminals, you may wish to increase this. - Any movement that would exceed half the screen width does not use the - terminal's scrolling, but instead redraws the line. - - The current implementation probably has a few bugs; if the screen display - ever appears incorrect, use ^R or ^L to redraw it. I don't think there are - any fatal bugs, but it is possible that some remain, so don't try expnonvis - unless you don't mind crashing tf. Terminals without the delete character - capability are not yet supported, but will be in the future. + TF 5.0 beta 5 has a new experimental non-visual mode ("expnonvis") that + fixes design flaws in traditional non-visual mode. I may get rid of + traditional non-visual mode in the future, so if you use it, I suggest you + try expnonvis mode now and let me know if you don't like it. To enable + expnonvis mode, "/set expnonvis=on" and "/set visual=off". You may also + want to "/set kecho=on" (see below). + + In the new expnonvis mode, input is only ever visible on the bottom line. + It scrolls your input buffer left and right as needed to display the part of + the input buffer in the neighborhood of the cursor. The part of the line + that is "off the left edge" of the screen is simply not visible. In + traditional non-visual mode, that part of the line would scroll up, + polluting the output region with partial input lines. + + The "only on bottom line" rule applies even when you hit return to execute + the input line. Your input is erased, and the command is executed; it does + not scroll up. If you want to see the input text scroll up, you can "/set + kecho=on"; this will print the entire input, not just the last segment of it + that fit within the screen width. You may also want to set %kecho_attr so + that the echoed input is easily distinguishable from regular output. + + The minimum amount of scrolling is determined by the %sidescroll variable, + which defaults to 1. For slow terminals, you may wish to increase this. + Any movement that would exceed half the screen width does not use the + terminal's scrolling, but instead redraws the line. + + The current implementation probably has a few bugs; if the screen display + ever appears incorrect, use ^R or ^L to redraw it. I don't think there are + any fatal bugs, but it is possible that some remain, so don't try expnonvis + unless you don't mind crashing tf. Terminals without the delete character + capability are not yet supported, but will be in the future. &logic &math @@ -4734,10 +4745,10 @@ experimental non-visual mode expressions - Expressions apply operators to numeric and string operands, and return a - result. They can be used in $[...] expression subs, the condition of /if - and /while statements, the condition of /def -E, and as arguments to - /return, /result, and /test commands. + Expressions apply operators to numeric and string operands, and return a + result. They can be used in $[...] expression subs, the condition of /if + and /while statements, the condition of /def -E, and as arguments to + /return, /result, and /test commands. #float #real @@ -4756,156 +4767,156 @@ expressions Operands - Operands can be any of: - - * Integer constants (e.g., 42). - * Real decimal point constants ("reals", for short) containing a - decimal point (e.g., 12.3456789) or exponent (e.g., 1e-2) or both (e.g., - 1.23e4). - * Time duration ("dtime") values of the form <hours>:<minutes>, - <hours>:<minutes>:<seconds>, or <seconds> (where <seconds> may contain a - decimal point followed by up to 6 digits), will be interpreted as real - seconds (e.g., 0:01:02.3 == 62.3), and can be used anywhere a number is - expected. - * Absolute time ("atime") values, in the form of a number with up to 6 - decimal places. On most systems, this represents the number of seconds - since 1970-01-01 00:00:00 UTC. - * Strings of characters, surrounded with quotes (", ', or `, with the - same kind of quote on each end), like "hello world". - * Variable references (see below) like visual. - * Variable substitutions (see below) like {visual} and {1}. - * Macro substitutions like ${COMPRESS_SUFFIX}. - * Command substitutions like $(/listworlds -s). - - Named variables may be accessed by simply using their name (with no leading - '%'). This is called a variable reference, and is the preferred way of - using a variable in an expression. The special substitutions (*, ?, #, <n>, - L<n>, P<n>, R) may not be used this way. - - Variable substitutions of the form "{selector}" and "{selector-default}" may - be used. They follow the same rules as variable substitution in macros, - except that there is no leading '%', and the '{' and '}' are required. The - special substitutions (*, ?, #, <n>, L<n>, P<n>, R) are allowed. - - Macro-style variable substitutions beginning with '%' may also be used, but - are not recommended, since the multiple '%'s required in nested macros can - quickly get confusing. It always easier to use one of the above methods. + Operands can be any of: + + * Integer constants (e.g., 42). + * Real decimal point constants ("reals", for short) containing a + decimal point (e.g., 12.3456789) or exponent (e.g., 1e-2) or both (e.g., + 1.23e4). + * Time duration ("dtime") values of the form <hours>:<minutes>, + <hours>:<minutes>:<seconds>, or <seconds> (where <seconds> may contain a + decimal point followed by up to 6 digits), will be interpreted as real + seconds (e.g., 0:01:02.3 == 62.3), and can be used anywhere a number is + expected. + * Absolute time ("atime") values, in the form of a number with up to 6 + decimal places. On most systems, this represents the number of seconds + since 1970-01-01 00:00:00 UTC. + * Strings of characters, surrounded with quotes (", ', or `, with the + same kind of quote on each end), like "hello world". + * Variable references (see below) like visual. + * Variable substitutions (see below) like {visual} and {1}. + * Macro substitutions like ${COMPRESS_SUFFIX}. + * Command substitutions like $(/listworlds -s). + + Named variables may be accessed by simply using their name (with no leading + '%'). This is called a variable reference, and is the preferred way of + using a variable in an expression. The special substitutions (*, ?, #, <n>, + L<n>, P<n>, R) may not be used this way. + + Variable substitutions of the form "{selector}" and "{selector-default}" may + be used. They follow the same rules as variable substitution in macros, + except that there is no leading '%', and the '{' and '}' are required. The + special substitutions (*, ?, #, <n>, L<n>, P<n>, R) are allowed. + + Macro-style variable substitutions beginning with '%' may also be used, but + are not recommended, since the multiple '%'s required in nested macros can + quickly get confusing. It always easier to use one of the above methods. #operators Operators - In the following list, operators are listed in groups, from highest to - lowest precedence. Operators listed together have equal precedence. The - letters in the table below correspond to the type of objects acted on by the - operators: n for numeric (integer or real); s for string; e for any - expression. All operators group left-to-right except assignment, which - groups right-to-left. If any binary numeric operator is applied to two - integers, the result will be an integer, unless the result would overflow, - in which case it is converted to real. If either operand is a real, the - other will be converted to real if it is not already a real, and the result - will be a real. - - (e) Parentheses, for grouping. - - func(args) Perform function <func> on arguments <args>. (see: functions). - - !n Boolean NOT (1 if n==0, otherwise 0). - +n Unary positive (useful for converting a string to a number). - -n Unary negative. - ++v Equivalent to (v := v + 1). - --v Equivalent to (v := v - 1). - - n1 * n2 Numeric multiplication. - n1 / n2 Numeric division. Remember, if both operands are type integer, - the result will be truncated to integer. - - n1 + n2 Numeric addition. - n1 - n2 Numeric subtraction. - - n1 = n2 Numeric equality (but easily confused with assignment; you are - advised to use == instead). - n1 == n2 Numeric equality. - n1 != n2 Numeric inequality. - s1 =~ s2 String equality (case sensitive, attribute insensitive). - s1 !~ s2 String inequality (case sensitive, attribute insensitive). - s1 =/ s2 String s1 matches glob pattern s2. - s1 !/ s2 String s1 does not match glob pattern s2. - n1 < n2 Numeric less than. - n1 <= n2 Numeric less than or equal. - n1 > n2 Numeric greater than. - n1 >= n2 Numeric greater than or equal. - - n1 & n2 Boolean AND. n2 will be evaluated if and only if n1 is nonzero. - - n1 | n2 Boolean OR. n2 will be evaluated if and only if n1 is zero. - - n ? e1 : e2 - n ? : e2 Conditional. If n is nonzero, the result is the value of - expression e1; otherwise it is the value of expression e2. If - e1 is omitted, the value of n is used in its place. Note that - digits followed by a colon is interpreted as a dtime value, so - if the e2 operand of the ?: operator is an integer, you must - separate it from the colon (with a space or parenthesis, for - example). - - v := e Assignment. The identifier "v" refers to the variable in the - nearest scope. If not found, a new variable is created at the - global level, as if by /set. If v is a special variable, the - value of e may need to be converted to the type of v, or the - assignment may fail altogther if the value is not legal for v. - The value of the assignment expression is the new value of v. - v += n Equivalent to v := v + (n). - v -= n Equivalent to v := v - (n). - v *= n Equivalent to v := v * (n). - v /= n Equivalent to v := v / (n). - - e1 , e2 Comma. Expressions e1 and e2 are evaluated; the result is the - value of e2. Only useful if e1 has some side effect. - - The comparison operators return 0 for false, nonzero for true. The boolean - operators (& and |) stop evaluating as soon as the value of the expression - is known ("short-circuit"), and return the value of the last operand - evaluated. This does not affect the value of the expression, but is - important when the second operand performs side effects. - - Normal (non-enumerated) Variables set with any of the assignment operators - keep the type of the expression assigned to them. This is different than - /set and /let, which always assign a string value to the variables. This - distinction is important for real numeric values, which lose precision if - converted to a string and back. + In the following list, operators are listed in groups, from highest to + lowest precedence. Operators listed together have equal precedence. The + letters in the table below correspond to the type of objects acted on by the + operators: n for numeric (integer or real); s for string; e for any + expression. All operators group left-to-right except assignment, which + groups right-to-left. If any binary numeric operator is applied to two + integers, the result will be an integer, unless the result would overflow, + in which case it is converted to real. If either operand is a real, the + other will be converted to real if it is not already a real, and the result + will be a real. + + (e) Parentheses, for grouping. + + func(args) Perform function <func> on arguments <args>. (see: functions). + + !n Boolean NOT (1 if n==0, otherwise 0). + +n Unary positive (useful for converting a string to a number). + -n Unary negative. + ++v Equivalent to (v := v + 1). + --v Equivalent to (v := v - 1). + + n1 * n2 Numeric multiplication. + n1 / n2 Numeric division. Remember, if both operands are type integer, + the result will be truncated to integer. + + n1 + n2 Numeric addition. + n1 - n2 Numeric subtraction. + + n1 = n2 Numeric equality (but easily confused with assignment; you are + advised to use == instead). + n1 == n2 Numeric equality. + n1 != n2 Numeric inequality. + s1 =~ s2 String equality (case sensitive, attribute insensitive). + s1 !~ s2 String inequality (case sensitive, attribute insensitive). + s1 =/ s2 String s1 matches glob pattern s2. + s1 !/ s2 String s1 does not match glob pattern s2. + n1 < n2 Numeric less than. + n1 <= n2 Numeric less than or equal. + n1 > n2 Numeric greater than. + n1 >= n2 Numeric greater than or equal. + + n1 & n2 Boolean AND. n2 will be evaluated if and only if n1 is nonzero. + + n1 | n2 Boolean OR. n2 will be evaluated if and only if n1 is zero. + + n ? e1 : e2 + n ? : e2 Conditional. If n is nonzero, the result is the value of + expression e1; otherwise it is the value of expression e2. If + e1 is omitted, the value of n is used in its place. Note that + digits followed by a colon is interpreted as a dtime value, so + if the e2 operand of the ?: operator is an integer, you must + separate it from the colon (with a space or parenthesis, for + example). + + v := e Assignment. The identifier "v" refers to the variable in the + nearest scope. If not found, a new variable is created at the + global level, as if by /set. If v is a special variable, the + value of e may need to be converted to the type of v, or the + assignment may fail altogether if the value is not legal for v. + The value of the assignment expression is the new value of v. + v += n Equivalent to v := v + (n). + v -= n Equivalent to v := v - (n). + v *= n Equivalent to v := v * (n). + v /= n Equivalent to v := v / (n). + + e1 , e2 Comma. Expressions e1 and e2 are evaluated; the result is the + value of e2. Only useful if e1 has some side effect. + + The comparison operators return 0 for false, nonzero for true. The boolean + operators (& and |) stop evaluating as soon as the value of the expression + is known ("short-circuit"), and return the value of the last operand + evaluated. This does not affect the value of the expression, but is + important when the second operand performs side effects. + + Normal (non-enumerated) Variables set with any of the assignment operators + keep the type of the expression assigned to them. This is different than + /set and /let, which always assign a string value to the variables. This + distinction is important for real numeric values, which lose precision if + converted to a string and back. #conversion - All operands will be automatically converted to the type expected by the - operator. - - * String to numeric: leading signs, digits, colons, and exponents are - interpreted as an integer, decimal (real), or dtime (real) value; e.g., - "12abc" becomes 12, "12.3junk" becomes 12.3, "0:01:02.3" becomes - 0:01:02.3, and "xyz" becomes 0. - * Integer to real: straightforward. - * Real to integer: the fractional part is truncated. - * Enumerated variable to string: straightforward string value. - * Enumerated variable to numeric: one integer stands for each of the - allowed values. "Off" is always 0, "on" is always 1, etc. This makes - (!visual) and (visual == 0) the same as (visual =~ 'off'). - * Integer to string: straightforward. - * Real to string: decimal notation if the exponent is greater than -5 - and less than %sigfigs, otherwise exponential notation. - * Normal (non-enumerated) variables are treated as whatever type their - value has. + All operands will be automatically converted to the type expected by the + operator. + + * String to numeric: leading signs, digits, colons, and exponents are + interpreted as an integer, decimal (real), or dtime (real) value; e.g., + "12abc" becomes 12, "12.3junk" becomes 12.3, "0:01:02.3" becomes + 0:01:02.3, and "xyz" becomes 0. + * Integer to real: straightforward. + * Real to integer: the fractional part is truncated. + * Enumerated variable to string: straightforward string value. + * Enumerated variable to numeric: one integer stands for each of the + allowed values. "Off" is always 0, "on" is always 1, etc. This makes + (!visual) and (visual == 0) the same as (visual =~ 'off'). + * Integer to string: straightforward. + * Real to string: decimal notation if the exponent is greater than -5 + and less than %sigfigs, otherwise exponential notation. + * Normal (non-enumerated) variables are treated as whatever type their + value has. # Examples - Given the variables + Given the variables /set X=5 /set name=Hawkeye /set visual=1 - here are some expressions and their values: + here are some expressions and their values: Expression Value Comments ---- ----- -------- @@ -4916,7 +4927,7 @@ Examples X == "+5" 1 string "+5" is converted to integer 5. visual & (X > 0) 1 visual is nonzero, AND %X is positive. - See: functions, /test, evaluation, patterns + See: functions, /test, evaluation, patterns &file &files @@ -4925,20 +4936,20 @@ Examples filename expansion - Certain strings are treated as filenames in tf (%{TFHELP}; %{TFLIBDIR}; - %{TFLIBRARY}; arguments to /load, fwrite(); etc.). Those strings undergo - filename expansion as described below. + Certain strings are treated as filenames in tf (%{TFHELP}; %{TFLIBDIR}; + %{TFLIBRARY}; arguments to /load, fwrite(); etc.). Those strings undergo + filename expansion as described below. - If <file> begins with '~', all characters after the '~' up to the first '/' - or end of string are treated as a user name, and the '~' and user name are - replaced with the name of the home directory of that user. If the user name - is empty, %{HOME} is substituted. + If <file> begins with '~', all characters after the '~' up to the first '/' + or end of string are treated as a user name, and the '~' and user name are + replaced with the name of the home directory of that user. If the user name + is empty, %{HOME} is substituted. - For example, if bob's home directory is /users/bob, then the command "/load - ~bob/macros.tf" will attempt to load the file /users/bob/macros.tf. + For example, if bob's home directory is /users/bob, then the command "/load + ~bob/macros.tf" will attempt to load the file /users/bob/macros.tf. - "~user" expansion is not supported on systems that do not have the - getpwnam() function. + "~user" expansion is not supported on systems that do not have the + getpwnam() function. &function &functions @@ -4948,633 +4959,633 @@ functions #macro #function syntax - In an expression, a function operates on 0 or more arguments and returns a - result. A function call is made with a function name, followed by a - parenthesized list of comma-separated arguments: "name(arg1, arg2, ... - argN)". + In an expression, a function operates on 0 or more arguments and returns a + result. A function call is made with a function name, followed by a + parenthesized list of comma-separated arguments: "name(arg1, arg2, ... + argN)". - There are three kinds of objects that can be called as functions: builtin - functions, macros, and builtin commands. They are searched in that order, - so if a builtin function and a macro have the same name, using that name in - a function call will invoke the builtin function. + There are three kinds of objects that can be called as functions: builtin + functions, macros, and builtin commands. They are searched in that order, + so if a builtin function and a macro have the same name, using that name in + a function call will invoke the builtin function. - A macro called as a function can be called with any number of arguments; - each argument corresponds to a positional parameter (%1, %2, etc.). For - example, if "spam" is a macro, the function call + A macro called as a function can be called with any number of arguments; + each argument corresponds to a positional parameter (%1, %2, etc.). For + example, if "spam" is a macro, the function call spam("foo", "bar", "baz") - will set the parameters the same as in the command invocation + will set the parameters the same as in the command invocation /spam foo bar baz - The function call syntax allows positional parameters to contain spaces, - which is not possible in the command syntax. (Note: prior to version 4.0, a - macro called as a function could only take 0 or 1 arguments, and a single - argument was broken into positional parameters at whitespace.) A macro can - set its return value using /return or /result. + The function call syntax allows positional parameters to contain spaces, + which is not possible in the command syntax. (Note: prior to version 4.0, a + macro called as a function could only take 0 or 1 arguments, and a single + argument was broken into positional parameters at whitespace.) A macro can + set its return value using /return or /result. - A builtin command called as a function can have 0 or 1 arguments; the - argument is treated as a command line. For example, the function call + A builtin command called as a function can have 0 or 1 arguments; the + argument is treated as a command line. For example, the function call def("-t'{*} has arrived.' greet = :waves.") - is the same as the command invocation - /def -t'{*} has arrived.' greet = :waves. + is the same as the command invocation + /def -t'{*} has arrived.' greet = :waves. - To evaluate a function for its "side effect" only, you can call it from - /test and ignore the return value (e.g., "/test kbdel(0)"). + To evaluate a function for its "side effect" only, you can call it from + /test and ignore the return value (e.g., "/test kbdel(0)"). #builtin Builtin functions - In the following list of builtin functions, the first letter of each - argument indicates its type: <s> for string, <i> for integer, <r> for real, - <n> for any numeric type, or <f> for flag (0 or "off"; or, 1 or "on"). + In the following list of builtin functions, the first letter of each + argument indicates its type: <s> for string, <i> for integer, <r> for real, + <n> for any numeric type, or <f> for flag (0 or "off"; or, 1 or "on"). Mathematical functions - Angles are in radians. + Angles are in radians. #abs #abs() - abs(n) Absolute value of <n>. Result has the same numeric type as <n>. + abs(n) Absolute value of <n>. Result has the same numeric type as <n>. #sin #sin() - sin(r) (real) Sine of <r>. + sin(r) (real) Sine of <r>. #cos #cos() - cos(r) (real) Cosine of <r>. + cos(r) (real) Cosine of <r>. #tan #tan() - tan(r) (real) Tangent of <r>. + tan(r) (real) Tangent of <r>. #asin #asin() - asin(r) - (real) Arcsine of <r>, in the range [-pi/2, pi/2]. <r> must be in - the domain [-1, 1]. + asin(r) + (real) Arcsine of <r>, in the range [-pi/2, pi/2]. <r> must be in + the domain [-1, 1]. #acos #acos() - acos(r) - (real) Arccosine of <r>, in the range [0, pi]. <r> must be in the - domain [-1, 1]. + acos(r) + (real) Arccosine of <r>, in the range [0, pi]. <r> must be in the + domain [-1, 1]. #atan #atan() - atan(r) - (real) Arctangent of <r>, in the range [-pi/2, pi/2]. + atan(r) + (real) Arctangent of <r>, in the range [-pi/2, pi/2]. #exp #exp() - exp(r) (real) e raised to the power <r>. + exp(r) (real) e raised to the power <r>. #pow #pow() - pow(n1, n2) - (real) <n1> raised to the power <n2>. If <n1> is negative, <n2> - must be an integer. + pow(n1, n2) + (real) <n1> raised to the power <n2>. If <n1> is negative, <n2> + must be an integer. #sqrt #sqrt() - sqrt(n) - (real) Square root of <n> (same as pow(<n>, 0.5)). + sqrt(n) + (real) Square root of <n> (same as pow(<n>, 0.5)). #log #log() #ln #ln() #log10 #log10() - ln(n) (real) Natural logarithm of <n>. <n> must be positive. The base B - logarithm of any number N can be found with the expression ln(N) / - ln(B). - log10(n) - (real) Base 10 logarithm of <n>. <n> must be positive. + ln(n) (real) Natural logarithm of <n>. <n> must be positive. The base B + logarithm of any number N can be found with the expression ln(N) / + ln(B). + log10(n) + (real) Base 10 logarithm of <n>. <n> must be positive. #mod #mod() - mod(i1,i2) - (int) Remainder of <i1> divided by <i2>. + mod(i1,i2) + (int) Remainder of <i1> divided by <i2>. #trunc #trunc() - trunc(r) - (int) Integer part of <r>. + trunc(r) + (int) Integer part of <r>. #random #rand #rand() - rand() (int) Random integer in the range [0, system maximum]. - rand(i) - (int) Random integer in the range [0, <i> - 1]. - rand(i1,i2) - (int) Random integer in the range [<i1>, <i2>]. + rand() (int) Random integer in the range [0, system maximum]. + rand(i) + (int) Random integer in the range [0, <i> - 1]. + rand(i1,i2) + (int) Random integer in the range [<i1>, <i2>]. # Input/output functions # - echo(s1 [,attrs [,inline [,dest]]]) - (int) Echoes <s1> to the screen or <dest> with attributes <attrs>, - interpreting inline attribute codes if the flag <inline> is 1 or - "on". See: "echo()". + echo(s1 [,attrs [,inline [,dest]]]) + (int) Echoes <s1> to the screen or <dest> with attributes <attrs>, + interpreting inline attribute codes if the flag <inline> is 1 or + "on". See: "echo()". # - send(s1[, world[, flags]]) - (int) Sends string <s1> to <world >. See send(). + send(s1[, world[, flags]]) + (int) Sends string <s1> to <world >. See send(). # - prompt(s1) - (int) Sets the prompt of the current socket to <s1>. See /prompt. + prompt(s1) + (int) Sets the prompt of the current socket to <s1>. See /prompt. #fwrite #fwrite() - fwrite(s1,s2) - Writes string <s2> to the end of file <s1>. fwrite() is good for - writing a single line, but when writing multiple lines it is more - efficient to use tfopen(), a series of tfwrite(), and a tfclose(). - Display attributes in <s2> are not written. + fwrite(s1,s2) + Writes string <s2> to the end of file <s1>. fwrite() is good for + writing a single line, but when writing multiple lines it is more + efficient to use tfopen(), a series of tfwrite(), and a tfclose(). + Display attributes in <s2> are not written. #tfopen #tfopen() - tfopen(s1, s2) - tfopen() - (int) Open a tfio stream using file <s1> and mode <s2>. See tfio. + tfopen(s1, s2) + tfopen() + (int) Open a tfio stream using file <s1> and mode <s2>. See tfio. #tfclose #tfclose() - tfclose(i) - (int) Close the stream indicated by handle <i>. See tfio. + tfclose(i) + (int) Close the stream indicated by handle <i>. See tfio. #tfread #tfread() - tfread(i, v) - tfread(v) - (int) Read into variable <v> from the stream indicated by handle - <i>. See tfio. + tfread(i, v) + tfread(v) + (int) Read into variable <v> from the stream indicated by handle + <i>. See tfio. #tfwrite #tfwrite() - tfwrite(i, s) - tfwrite(s) - (int) Write <s> to the stream indicated by handle <i>. See tfio. + tfwrite(i, s) + tfwrite(s) + (int) Write <s> to the stream indicated by handle <i>. See tfio. #tfflush #tfflush() - tfflush(i) - Flushes the stream indicated by handle <i>. - tfflush(i, f) - Disables (if <f> is 0 or "off") or enables (if <f> is 1 or "on") - automatic flushing for the stream indicated by handle <i>. See - tfio. + tfflush(i) + Flushes the stream indicated by handle <i>. + tfflush(i, f) + Disables (if <f> is 0 or "off") or enables (if <f> is 1 or "on") + automatic flushing for the stream indicated by handle <i>. See + tfio. #read #read() - read() Obsolete. Use tfread() instead. + read() Obsolete. Use tfread() instead. # String functions - String positions are always counted from 0. Therefore the first character - of a string <s> is substr(s, 0, 1), and the last character is substr(s, - strlen(s)-1). + String positions are always counted from 0. Therefore the first character + of a string <s> is substr(s, 0, 1), and the last character is substr(s, + strlen(s)-1). - Range checking is done on string positions. Any position given outside the - allowed range will be silently forced to the closest value that is in the - range. + Range checking is done on string positions. Any position given outside the + allowed range will be silently forced to the closest value that is in the + range. #ascii #ascii() - ascii(s) - (int) Integer code of the first character of <s>, The character does - not have to be ASCII, but may be any character allowed by your - locale. + ascii(s) + (int) Integer code of the first character of <s>, The character does + not have to be ASCII, but may be any character allowed by your + locale. #char #char() - char(i) - (str) character with integer code <i>. If <i> is outside the range - allowed by your locale, it will be silently forced into the allowed - range. + char(i) + (str) character with integer code <i>. If <i> is outside the range + allowed by your locale, it will be silently forced into the allowed + range. #tolower #tolower() - tolower(s) - tolower(s, i) - (str) Convert the first <i> (default all) characters in <s> to lower - case. + tolower(s) + tolower(s, i) + (str) Convert the first <i> (default all) characters in <s> to lower + case. #toupper #toupper() - toupper(s) - toupper(s, i) - (str) Convert the first <i> (default all) characters in <s> to upper - case. + toupper(s) + toupper(s, i) + (str) Convert the first <i> (default all) characters in <s> to upper + case. #pad #pad() - pad([s, i]...) - (str) There may be any number of (<s>, <i>) pairs. For each pair, - <s> is padded with spaces to a length equal to the absolute value of - <i>. If <i> is positive, <s> is right-justified (left-padded); If - <i> is negative, <s> is left-justified (right-padded). The result - is the concatenation of all the padded strings. + pad([s, i]...) + (str) There may be any number of (<s>, <i>) pairs. For each pair, + <s> is padded with spaces to a length equal to the absolute value of + <i>. If <i> is positive, <s> is right-justified (left-padded); If + <i> is negative, <s> is left-justified (right-padded). The result + is the concatenation of all the padded strings. #regmatch #regmatch() - regmatch(s1, s2) - (int) If string <s2> matches regexp <s1>, regmatch() returns a - positive integer indicating the number of captured substrings - (including %P0). regmatch() returns 0 if string <s2> does not match - regexp <s1>. After a successful match, captured substrings can - later be extracted using the Pn variables or %Pn substitutions. - (See also: regexp) + regmatch(s1, s2) + (int) If string <s2> matches regexp <s1>, regmatch() returns a + positive integer indicating the number of captured substrings + (including %P0). regmatch() returns 0 if string <s2> does not match + regexp <s1>. After a successful match, captured substrings can + later be extracted using the Pn variables or %Pn substitutions. + (See also: regexp) # #replace() - replace(s1, s2, s3) - (int) Returns <s3> with every occurance of <s1> replaced with <s2>. - See: "/replace". + replace(s1, s2, s3) + (int) Returns <s3> with every occurrence of <s1> replaced with <s2>. + See: "/replace". #strcat #strcat() - strcat(s...) - (str) Returns the concatenation of all string arguments. + strcat(s...) + (str) Returns the concatenation of all string arguments. #strchr #strchr() - strchr(s1, s2) - strchr(s1, s2, i) - (int) Searches for any character of <s2> in <s1> starting at - position <i> (default 0), and returns the position if found, or -1 - if not found. If <i> is negative, it is counted as an absolute - value from the end of <s>. + strchr(s1, s2) + strchr(s1, s2, i) + (int) Searches for any character of <s2> in <s1> starting at + position <i> (default 0), and returns the position if found, or -1 + if not found. If <i> is negative, it is counted as an absolute + value from the end of <s>. #strcmp #strcmp() - strcmp(s1, s2) - (int) Returns an integer less than, equal to, or greater than 0 if - <s1> is lexicographically less than, equal to, or greater than <s2>, - respectively. + strcmp(s1, s2) + (int) Returns an integer less than, equal to, or greater than 0 if + <s1> is lexicographically less than, equal to, or greater than <s2>, + respectively. #strcmpattr #strcmpattr() - strcmpattr(s1, s2) - (int) Like strcmp(), except that in order for the strings to be - considered equal, both their text and their attributes must be - equal. In other words, strcmp(encode_attr(<s1>), encode_attr(<s2>)) - The ordering of attributes is not documented, and may change between - versions of tf. + strcmpattr(s1, s2) + (int) Like strcmp(), except that in order for the strings to be + considered equal, both their text and their attributes must be + equal. In other words, strcmp(encode_attr(<s1>), encode_attr(<s2>)) + The ordering of attributes is not documented, and may change between + versions of tf. #strlen #strlen() - strlen(s) - (int) Length of string <s>. + strlen(s) + (int) Length of string <s>. #strncmp #strncmp() - strncmp(s1, s2, i) - (int) Like strcmp(), but compares only the first <i> characters of - <s1> and <s2>. + strncmp(s1, s2, i) + (int) Like strcmp(), but compares only the first <i> characters of + <s1> and <s2>. #strrchr #strrchr() - strrchr(s1, s2) - strrchr(s1, s2, i) - (int) Searches backward in <s1> starting at position <i> (default: - end of <s1>) for any character of <s2>, and returns the position if - found, or -1 if not found. If <i> is negative, it is counted as an - absolute value from the end of <s>. + strrchr(s1, s2) + strrchr(s1, s2, i) + (int) Searches backward in <s1> starting at position <i> (default: + end of <s1>) for any character of <s2>, and returns the position if + found, or -1 if not found. If <i> is negative, it is counted as an + absolute value from the end of <s>. #strrep #strrep() - strrep(s, i) - (str) Returns a string containing <i> repetitions of <s>. + strrep(s, i) + (str) Returns a string containing <i> repetitions of <s>. #strstr #strstr() - strstr(s1, s2) - strstr(s1, s2, i) - (int) Searches for <s2> in <s1> starting at position <i> (default - 0), and returns the position if found, or -1 if not found. + strstr(s1, s2) + strstr(s1, s2, i) + (int) Searches for <s2> in <s1> starting at position <i> (default + 0), and returns the position if found, or -1 if not found. #substr #substr() - substr(s, i1) - substr(s, i1, i2) - (str) Substring of <s>, starting at position <i1>, with length <i2>. - If <i2> is omitted, it defaults to the remaining length of <s>. If - <i1> or <i2> is negative, they are counted as absolute values from - the end of <s>. + substr(s, i1) + substr(s, i1, i2) + (str) Substring of <s>, starting at position <i1>, with length <i2>. + If <i2> is omitted, it defaults to the remaining length of <s>. If + <i1> or <i2> is negative, they are counted as absolute values from + the end of <s>. #strip_attr #strip_attr() - strip_attr(s) - (str) Returns <s> with all display attributes removed. + strip_attr(s) + (str) Returns <s> with all display attributes removed. #inline_attr #inline_attr() #decode_attr #decode_attr() - decode_attr(s1 [, s2 [, f]]) - (str) Returns <s1> with "@{<attr>}" codes interpeted as display - attributes, as in /echo -p. If present, <s2> is a string of - attributes that will be applied to the entire string (as in /echo - -a<s2>). If <f> is present and equal to 0 or "off", then - "@{<attr>}" codes are not interpeted; this is useful for applying - <s2> attributes with no other effects. + decode_attr(s1 [, s2 [, f]]) + (str) Returns <s1> with "@{<attr>}" codes interpreted as display + attributes, as in /echo -p. If present, <s2> is a string of + attributes that will be applied to the entire string (as in /echo + -a<s2>). If <f> is present and equal to 0 or "off", then + "@{<attr>}" codes are not interpreted; this is useful for applying + <s2> attributes with no other effects. #encode_attr #encode_attr() - encode_attr(s) - (str) Returns <s> with display attributes encoded in "@{<attr>}" - form. + encode_attr(s) + (str) Returns <s> with display attributes encoded in "@{<attr>}" + form. #decode_ansi #decode_ansi() - decode_ansi(s) - (str) Returns <s> with attribute control codes interpeted as display - attributes, and, if %expand_tabs is on, tabs are expanded to spaces - according to %tabsize. Any attributes originally on <s> are not - copied to the result. The attribute control codes recognzied - include ANSI codes, ISO 6429 16-color extension codes, and xterm - 256-color extension codes. + decode_ansi(s) + (str) Returns <s> with attribute control codes interpreted as display + attributes, and, if %expand_tabs is on, tabs are expanded to spaces + according to %tabsize. Any attributes originally on <s> are not + copied to the result. The attribute control codes recognized + include ANSI codes, ISO 6429 16-color extension codes, and xterm + 256-color extension codes. #encode_ansi #encode_ansi() - encode_ansi(s) - (str) Returns <s> with display attributes encoded in terminal - control code form. The control codes generated include ANSI codes, - ISO 6429 16-color extension codes, and xterm 256-color extension - codes. + encode_ansi(s) + (str) Returns <s> with display attributes encoded in terminal + control code form. The control codes generated include ANSI codes, + ISO 6429 16-color extension codes, and xterm 256-color extension + codes. # - textencode(s) - (str) Returns <s> converted to a form containing only letters, - digits, and underscores. See textencode(). + textencode(s) + (str) Returns <s> converted to a form containing only letters, + digits, and underscores. See textencode(). # - textdecode(s) - (str) Converts <s>, the result of textencode(), back to its original - form. See textencode(). + textdecode(s) + (str) Converts <s>, the result of textencode(), back to its original + form. See textencode(). # Keyboard buffer functions #kbdel #kbdel() - kbdel(i) - (int) Delete from the cursor to position <i> in the input buffer. - Returns the new position. + kbdel(i) + (int) Delete from the cursor to position <i> in the input buffer. + Returns the new position. #kbgoto #kbgoto() - kbgoto(i) - (int) Move the cursor to position <i> in the input buffer. Returns - the new position (which may be different than <i> if <i> would put - the cursor outside the buffer). + kbgoto(i) + (int) Move the cursor to position <i> in the input buffer. Returns + the new position (which may be different than <i> if <i> would put + the cursor outside the buffer). #kbhead #kbhead() - kbhead() - (str) Return the current input up to the cursor. + kbhead() + (str) Return the current input up to the cursor. #kblen #kblen() - kblen() - (int) Length of current input line. + kblen() + (int) Length of current input line. #kbmatch #kbmatch() - kbmatch() - kbmatch(i) - (int) Finds one of "()[]{}" under or to the right of the position - <i> (default: cursor position), and returns the position of its - match, or -1 if not found. (See also: keybindings) + kbmatch() + kbmatch(i) + (int) Finds one of "()[]{}" under or to the right of the position + <i> (default: cursor position), and returns the position of its + match, or -1 if not found. (See also: keybindings) #kbpoint #kbpoint() - kbpoint() - (int) Return the current position of the cursor in input. + kbpoint() + (int) Return the current position of the cursor in input. #kbtail #kbtail() - kbtail() - (str) Return the current input after the cursor. + kbtail() + (str) Return the current input after the cursor. #kbwordleft #kbwordleft() - kbwordleft() - kbwordleft(i) - (int) Position of the beginning of the word left of <i> within the - input buffer. <i> defaults to the current cursor position. (See - also: %wordpunct) + kbwordleft() + kbwordleft(i) + (int) Position of the beginning of the word left of <i> within the + input buffer. <i> defaults to the current cursor position. (See + also: %wordpunct) #kbwordright #kbwordright() - kbwordright() - kbwordright(i) - (int) Position just past the end of the word right of <i> within the - input buffer. <i> defaults to the current cursor position. (See - also: %wordpunct) + kbwordright() + kbwordright(i) + (int) Position just past the end of the word right of <i> within the + input buffer. <i> defaults to the current cursor position. (See + also: %wordpunct) #keycode #keycode() - keycode(s) - (str) String generated by typing the key labeled <s>, as defined in - the termcap entry corresponding to the value of %TERM. See also: - keybindings. + keycode(s) + (str) String generated by typing the key labeled <s>, as defined in + the termcap entry corresponding to the value of %TERM. See also: + keybindings. # Information functions #time #time() - time() (atime) Absolute system time in seconds, to the nearest microsecond - (typically measured since 1970-01-01 00:00:00 UTC). See also: - cputime(), mktime(), idle(), sidle(), /time, ftime(). + time() (atime) Absolute system time in seconds, to the nearest microsecond + (typically measured since 1970-01-01 00:00:00 UTC). See also: + cputime(), mktime(), idle(), sidle(), /time, ftime(). #cputime #cputime() - cputime() - (real) CPU time used by tf, or -1 if not available. The resolution - depends on the operating system. See also: /runtime, time(), /time. + cputime() + (real) CPU time used by tf, or -1 if not available. The resolution + depends on the operating system. See also: /runtime, time(), /time. #columns #columns() - columns() - (int) Number of columns on the screen. See also: hooks (RESIZE), - lines(), winlines(), %COLUMNS. + columns() + (int) Number of columns on the screen. See also: hooks (RESIZE), + lines(), winlines(), %COLUMNS. #lines #lines() - lines() - (int) Number of lines on the screen. To get the number of lines in - the output window, use winlines(). See also: hooks (RESIZE), - winlines(), columns(), %LINES. + lines() + (int) Number of lines on the screen. To get the number of lines in + the output window, use winlines(). See also: hooks (RESIZE), + winlines(), columns(), %LINES. #winlines #winlines() - winlines() - (int) Number of lines in the output window. See also: hooks - (RESIZE), lines(), columns(). + winlines() + (int) Number of lines in the output window. See also: hooks + (RESIZE), lines(), columns(). #morepaused #morepaused() - morepaused([s1]) - (int) Returns 1 if output of world <s1> is paused (by more or (dokey - pause). If omitted, <s1> defaults to the current world. See also: - moresize(). + morepaused([s1]) + (int) Returns 1 if output of world <s1> is paused (by more or (dokey + pause). If omitted, <s1> defaults to the current world. See also: + moresize(). #morescroll #morescroll() - morescroll(i) - (int) If <i> is positive, this function scrolls <i> lines of text - from the window buffer into the window from the bottom. If <i> is - negative, it reverse-scrolls abs(<i>) lines of text from the window - buffer into the window from the top. If abs(<i>) is larger than one - screenful, the actual scrolling is skipped, and only the end result - is displayed. Returns the number of lines actually scrolled. + morescroll(i) + (int) If <i> is positive, this function scrolls <i> lines of text + from the window buffer into the window from the bottom. If <i> is + negative, it reverse-scrolls abs(<i>) lines of text from the window + buffer into the window from the top. If abs(<i>) is larger than one + screenfull, the actual scrolling is skipped, and only the end result + is displayed. Returns the number of lines actually scrolled. #moresize #moresize() - moresize([s1 [, s2]]) - (int) Returns a line count for world <s2>, or the current world if - <s2> is omitted. If <s1> is omitted or blank, the count is the - number of lines below the bottom of the output window (i.e., queued - at a more prompt). If <s1> contains "n", it counts only new lines - that have never been seen, not lines that had been displayed and - then reverse scrolled off. If <s1> contains "l", it counts only - lines that match the current /limit. "n" and "l" may be combined. - If all lines that would be counted have the "A" (noactivity) - attribute, the result will normally be 0. But if <s1> contains "a", - lines with "A" attributes are counted anyway. In all cases, the - count is the number of physical (after wrapping) lines. Note that a - return value of 0 does not necessarily indicate that output is not - paused; it may be the case that output is paused and there are just - 0 lines below the bottom of the window, or that all the lines have - the "A" attribute. Use morepaused(), to tell if output is paused. - See also: morepaused(), nactive(). + moresize([s1 [, s2]]) + (int) Returns a line count for world <s2>, or the current world if + <s2> is omitted. If <s1> is omitted or blank, the count is the + number of lines below the bottom of the output window (i.e., queued + at a more prompt). If <s1> contains "n", it counts only new lines + that have never been seen, not lines that had been displayed and + then reverse scrolled off. If <s1> contains "l", it counts only + lines that match the current /limit. "n" and "l" may be combined. + If all lines that would be counted have the "A" (noactivity) + attribute, the result will normally be 0. But if <s1> contains "a", + lines with "A" attributes are counted anyway. In all cases, the + count is the number of physical (after wrapping) lines. Note that a + return value of 0 does not necessarily indicate that output is not + paused; it may be the case that output is paused and there are just + 0 lines below the bottom of the window, or that all the lines have + the "A" attribute. Use morepaused(), to tell if output is paused. + See also: morepaused(), nactive(). #nactive #nactive() - nactive() - (int) Number of active worlds (ie, worlds with unseen text). - nactive(s) - (int) Number of unseen lines in world <s>. - Note: when nactive() (with or without arguments) is called from a - trigger, the line that caused the trigger is not counted by - nactive() because it has not yet been fully processed (for example, - a lower priority trigger might gag the line). nactive(<s>) is - equivalent to moresize("n", <s>). See also: moresize(). + nactive() + (int) Number of active worlds (ie, worlds with unseen text). + nactive(s) + (int) Number of unseen lines in world <s>. + Note: when nactive() (with or without arguments) is called from a + trigger, the line that caused the trigger is not counted by + nactive() because it has not yet been fully processed (for example, + a lower priority trigger might gag the line). nactive(<s>) is + equivalent to moresize("n", <s>). See also: moresize(). #world_info #world_info() - world_info(s1, s2) - (str) Return the value of field <s2> of world <s1>, - world_info(s2) - (str) Return the value of field <s2> of the current world. - world_info() - (str) Return the name of the current world. See worlds. + world_info(s1, s2) + (str) Return the value of field <s2> of world <s1>, + world_info(s2) + (str) Return the value of field <s2> of the current world. + world_info() + (str) Return the name of the current world. See worlds. #fg_world #fg_world() - fg_world() - (str) Returns the name of the world associated with the foreground - socket. + fg_world() + (str) Returns the name of the world associated with the foreground + socket. #is_connected #is_connected() - is_connected() - (int) Returns 1 if the current socket is connected, 0 otherwise. - is_connected(s) - (int) Returns 1 if world <s> is connected, 0 otherwise. See also - is_open(). + is_connected() + (int) Returns 1 if the current socket is connected, 0 otherwise. + is_connected(s) + (int) Returns 1 if world <s> is connected, 0 otherwise. See also + is_open(). #is_open #is_open() - is_open() - (int) Returns 1 if the current socket is open, 0 otherwise. - is_open(s) - (int) Returns 1 if world <s> is open, 0 otherwise. + is_open() + (int) Returns 1 if the current socket is open, 0 otherwise. + is_open(s) + (int) Returns 1 if world <s> is open, 0 otherwise. #idle #idle() - idle() (dtime) Number of seconds (to the nearest microsecond) since the - last keypress. - idle(s) - (dtime) Number of seconds (to the nearest microsecond) since the - last text was received on the socket connected to world <s>, or -1 - on error. + idle() (dtime) Number of seconds (to the nearest microsecond) since the + last keypress. + idle(s) + (dtime) Number of seconds (to the nearest microsecond) since the + last text was received on the socket connected to world <s>, or -1 + on error. #sidle #sidle() - sidle() - sidle(s) - (dtime) Number of seconds (to the nearest microsecond) since the - last text was sent on the current socket or the socket connected to - world <s>, or -1 on error. + sidle() + sidle(s) + (dtime) Number of seconds (to the nearest microsecond) since the + last text was sent on the current socket or the socket connected to + world <s>, or -1 on error. #nlog #nlog() - nlog() (int) Number of open log files. + nlog() (int) Number of open log files. #nmail #nmail() - nmail() - (int) Number of monitored mail files containing unread mail. See - mail. + nmail() + (int) Number of monitored mail files containing unread mail. See + mail. #nread #nread() - nread() - (int) Returns a positive number if a read from the keyboard is in - progress, 0 otherwise. + nread() + (int) Returns a positive number if a read from the keyboard is in + progress, 0 otherwise. #getpid #getpid() - getpid() - (int) The operating system's process id for tf. + getpid() + (int) The operating system's process id for tf. #gethostname #gethostname() - gethostname() - (str) Returns the host's name, or an empty string if the host name - is not available. + gethostname() + (str) Returns the host's name, or an empty string if the host name + is not available. #systype #systype() - systype() - (str) System type: "unix" (includes MacOS X), "os/2", or "cygwin32". + systype() + (str) System type: "unix" (includes MacOS X), "os/2", or "cygwin32". # Other functions # - addworld(name, type, host, port, char, pass, file, use_proxy) - Defines or redefines a world. See "addworld()". + addworld(name, type, host, port, char, pass, file, use_proxy) + Defines or redefines a world. See "addworld()". # - eval(s1 [, s2]) - (str) Evaluates <s1> as a macro body. See: /eval. + eval(s1 [, s2]) + (str) Evaluates <s1> as a macro body. See: /eval. #filename #filename() - filename(s) - (str) Performs filename expansion on <s> as described under - "filenames". + filename(s) + (str) Performs filename expansion on <s> as described under + "filenames". # - ftime(s,n) - ftime(s) - ftime() - (str) Formats a system time <n> (obtained from time()) according to - format <s>, or prints an error message and returns an empty string - if <n> is out of range. See: ftime(). + ftime(s,n) + ftime(s) + ftime() + (str) Formats a system time <n> (obtained from time()) according to + format <s>, or prints an error message and returns an empty string + if <n> is out of range. See: ftime(). #mktime #mktime() - mktime(year [, month [, day [, hour [, minute [, second [, - microsecond]]]]]]) - (atime) Returns the system time in seconds of the date in the local - time zone represented by the arguments. Returns -1 if the arguments - do not represent a valid date. Omitted month or day arguments - default to 1; other omitted arguments default to 0. See: %TZ, - ftime(), /time, + mktime(year [, month [, day [, hour [, minute [, second [, + microsecond]]]]]]) + (atime) Returns the system time in seconds of the date in the local + time zone represented by the arguments. Returns -1 if the arguments + do not represent a valid date. Omitted month or day arguments + default to 1; other omitted arguments default to 0. See: %TZ, + ftime(), /time, # - getopts(s1, s2) - (int) Parse macro options according to format . See - "getopts()". + getopts(s1, s2) + (int) Parse macro options according to format . See + "getopts()". #test() - test(s) - Interprets the contents of the string s as an expression and returns - the result. See also: /test, /expr. + test(s) + Interprets the contents of the string s as an expression and returns + the result. See also: /test, /expr. #status_fields() - status_fields([i]) - Returns the list of fields of status row i, or row 0 if i is - omitted. status area. + status_fields([i]) + Returns the list of fields of status row i, or row 0 if i is + omitted. status area. # - substitute(s [,attrs [,inline]]) - (int) Replaces trigger text. See "/substitute". + substitute(s [,attrs [,inline]]) + (int) Replaces trigger text. See "/substitute". # - Examples: + Examples: - Capitalize first letter of string : + Capitalize first letter of string : strcat(toupper(substr(s, 0, 1)), substr(s, 1)) - Extract the number from a string of the form "(#123PML)": + Extract the number from a string of the form "(#123PML)": 0 + substr(dbref, strchr(dbref, "#") + 1) - See: expressions + See: expressions &getopts &getopts() getopts() - Usage: + Usage: getopts(<options> [, <init>]) ____________________________________________________________________________ - getopts() is a function that parses and validates macro options according to - the format described by <options>. <Options> is a list of letters that - getopts() will accept. If a letter is followed by ":", the option will be - expected to have a string argument; if a letter is followed by "#", the - option will be expected to have a expression argument that evaluates to a - (possibly signed) integer; if a letter is followed by "@", the option will - be expected to have a time argument. The option syntax accepted by - getopts() is a subset of that accepted by builtin tf commands, as described - under "options". + getopts() is a function that parses and validates macro options according to + the format described by <options>. <Options> is a list of letters that + getopts() will accept. If a letter is followed by ":", the option will be + expected to have a string argument; if a letter is followed by "#", the + option will be expected to have a expression argument that evaluates to a + (possibly signed) integer; if a letter is followed by "@", the option will + be expected to have a time argument. The option syntax accepted by + getopts() is a subset of that accepted by builtin tf commands, as described + under "options". - When an option is found, getopts() creates a new local variable named - "opt_X", where "X" is the letter of the option. If an argument is expected, - the variable will get that argument as its value; otherwise, the variable - will have a value of "1". + When an option is found, getopts() creates a new local variable named + "opt_X", where "X" is the letter of the option. If an argument is expected, + the variable will get that argument as its value; otherwise, the variable + will have a value of "1". - If <init> is given, the variables corresponding to each letter of <options> - are initialized to <init> before processing the command line options. If - <init> is omitted, the variables are not initialized, so if variables with - the same names already exist and are not set by getopts(), they will be - unchanged. You can use this to set the variables to some default value - before calling getopts(). + If <init> is given, the variables corresponding to each letter of <options> + are initialized to <init> before processing the command line options. If + <init> is omitted, the variables are not initialized, so if variables with + the same names already exist and are not set by getopts(), they will be + unchanged. You can use this to set the variables to some default value + before calling getopts(). - The argument list will be shifted to discard the options that have been - parsed, so %{*} will contain the remainder of the arguments, without the - options. + The argument list will be shifted to discard the options that have been + parsed, so %{*} will contain the remainder of the arguments, without the + options. - If getopts() encounters an error, it will print an error message and return - 0; otherwise, it returns nonzero. + If getopts() encounters an error, it will print an error message and return + 0; otherwise, it returns nonzero. - Using getopts(), /escape, and /split, it is possible to write macros that - behave just like builtin tf commands. + Using getopts(), /escape, and /split, it is possible to write macros that + behave just like builtin tf commands. - Here's a contrived example to illustrate how getopts() works: + Here's a contrived example to illustrate how getopts() works: /def foo = \ @@ -5588,14 +5599,14 @@ getopts() /echo name: %{P1}%;\ /echo body: %{P2} - Now, all of these commands are equivalent: + Now, all of these commands are equivalent: /foo -a -b -n5 -s"can't stop" -- whiz = bang biff /foo -a -b -n5 -s'can\'t stop' whiz = bang biff /foo -n5 -ba -s`can't stop` whiz = bang biff /foo -as"can't stop" -bn5 whiz = bang biff - and produce this output: + and produce this output: option a: 1 option b: 1 @@ -5605,16 +5616,16 @@ getopts() name: whiz body: bang biff - But the command: + But the command: /foo -a -x whiz = bang biff - produces the error: + produces the error: % foo: invalid option 'x' % foo: options: -ab -n -s - See: expressions, functions, options, /escape, /split + See: expressions, functions, options, /escape, /split &style &tips @@ -5622,31 +5633,31 @@ getopts() hints - Some hints and style tips: + Some hints and style tips: - * Use a high-priority trigger on yourself to prevent loops. Say I - want to throw a tomato at anyone who says the word "tomato", and I write - the following trigger: + * Use a high-priority trigger on yourself to prevent loops. Say I + want to throw a tomato at anyone who says the word "tomato", and I write + the following trigger: /def -t"*tomato*" tomato = :throws a tomato at %1. - If Ben uses the word tomato, I will trigger, and then see the text - "Hawkeye throws a tomato at Ben." That text contains the word tomato, - which will trigger me again, creating an infinite loop. One way to - prevent this is by creating a high-priority trigger on myself which does - nothing: + If Ben uses the word tomato, I will trigger, and then see the text + "Hawkeye throws a tomato at Ben." That text contains the word tomato, + which will trigger me again, creating an infinite loop. One way to + prevent this is by creating a high-priority trigger on myself which does + nothing: /def -p99999 -t"{Hawkeye|You}*" anti_loop - Now, when I see "Hawkeye throws a tomato at Ben", the /anti_loop trigger - will catch it before /tomato does, so I won't loop. + Now, when I see "Hawkeye throws a tomato at Ben", the /anti_loop trigger + will catch it before /tomato does, so I won't loop. - * Use multiple lines, spacing, and indentation in /load files. - Normally, commands must be on one line. But in files read with /load, - if a line ends in '\', the following line will have leading whitespace - stripped and the two lines will be joined. This makes it much easier - (for humans) to read complex macros. Compare the two identical macros - below, and see which is easier to read. + * Use multiple lines, spacing, and indentation in /load files. + Normally, commands must be on one line. But in files read with /load, + if a line ends in '\', the following line will have leading whitespace + stripped and the two lines will be joined. This makes it much easier + (for humans) to read complex macros. Compare the two identical macros + below, and see which is easier to read. /def count=/let i=1%;/while (i<=%1) say %i%;/let i=$[i+1]%;/done @@ -5659,59 +5670,59 @@ hints /let i=$[i + 1]%; \ /done - * Use comments in /load files. Complicated macros are much easier to - read if you include a short comment describing the arguments to the - macro and what it does. Lines beginning with ';' or '#' are comments, - and are ignored during /load. + * Use comments in /load files. Complicated macros are much easier to + read if you include a short comment describing the arguments to the + macro and what it does. Lines beginning with ';' or '#' are comments, + and are ignored during /load. - * Name all triggers and hooks. If you ever need to /load a file a - second time, triggers, hilites, hooks, and gags without names may be - duplicated. But if they are named, old copies of macros will be - replaced with new copies of macros with the same name. Naming macros - also makes them easier to manipulate with commands like /list and - /undef. + * Name all triggers and hooks. If you ever need to /load a file a + second time, triggers, hilites, hooks, and gags without names may be + duplicated. But if they are named, old copies of macros will be + replaced with new copies of macros with the same name. Naming macros + also makes them easier to manipulate with commands like /list and + /undef. - * Don't use "weird" characters in macro names. Although any macro - name is legal, some characters can have unwanted expansion effects. - Weird characters are also harder to read. You should stick to letters, - numbers, and '_' characters. In particular, avoid '~' characters, since - they are used in library macros. + * Don't use "weird" characters in macro names. Although any macro + name is legal, some characters can have unwanted expansion effects. + Weird characters are also harder to read. You should stick to letters, + numbers, and '_' characters. In particular, avoid '~' characters, since + they are used in library macros. - * Use local variables instead of global variables if possible. This - avoids conflicts when two macros use a variable with the same name. If - you're using a variable in an expression, use /let first to initialize - the variable in the local scope. But remember, when you use a variable - reference (by name, as opposed to a variable substitution using "%"), TF - uses dynamic scoping (see: scope). + * Use local variables instead of global variables if possible. This + avoids conflicts when two macros use a variable with the same name. If + you're using a variable in an expression, use /let first to initialize + the variable in the local scope. But remember, when you use a variable + reference (by name, as opposed to a variable substitution using "%"), TF + uses dynamic scoping (see: scope). - * Use variable references instead of %-substitutions in expressions. - Because macro bodies are expanded, something like "/test %1" is prone to - problems if %1 contains any special characters. But by using a variable - reference you can avoid this problem; for example, "/test {1}". + * Use variable references instead of %-substitutions in expressions. + Because macro bodies are expanded, something like "/test %1" is prone to + problems if %1 contains any special characters. But by using a variable + reference you can avoid this problem; for example, "/test {1}". - * "/set pedantic=on" to make tf generate warnings about some potential - problems. + * "/set pedantic=on" to make tf generate warnings about some potential + problems. - * "/set defcompile=on" to see syntax errors in a macro when you define - it, instead of waiting until you first run it. + * "/set defcompile=on" to see syntax errors in a macro when you define + it, instead of waiting until you first run it. - * "/set mecho=on" to see what commands are being executed, or /connect - to a normal or connectionless socket defined with "/addworld -e" to see - what you're sending to the socket. + * "/set mecho=on" to see what commands are being executed, or /connect + to a normal or connectionless socket defined with "/addworld -e" to see + what you're sending to the socket. - * "/set emulation=debug" and "telopt=on" to see exactly what the - socket is sending to tf. + * "/set emulation=debug" and "telopt=on" to see exactly what the + socket is sending to tf. - * Use the -n or -l option of /trigger to see a list of trigger macros - that would match a given line. + * Use the -n or -l option of /trigger to see a list of trigger macros + that would match a given line. - See also debugging. + See also debugging. &history history - Associated topics: + Associated topics: scrollback /recall @@ -5723,72 +5734,72 @@ history Recall beginning/end keys (RECALLBEG/RECALLEND, default ^[< and ^[>) Search backward/forward keys (SEARCHB/SEARCHF, default ^[p and ^[n) - TinyFugue stores lines in 4 different types of history lists. Input history - records the last 100 non-repeated commands from the keyboard, including the - current line. Each world has a world history, which stores 1000 lines of - output from that world. Local history stores 100 lines of output generated - by TF, i.e. anything that didn't come from a world. Global history is an - integrated list of 1000 lines from TF and every world. The history sizes - can be changed with the /histsize command and the %{histsize} variable. + TinyFugue stores lines in 4 different types of history lists. Input history + records the last 500 non-repeated commands from the keyboard, including the + current line. Each world has a world history, which stores 500 lines of + output from that world. Local history stores 1000 lines of output generated + by TF, i.e. anything that didn't come from a world. Global history is an + integrated list of 5000 lines from TF and every world. The history sizes + can be changed with the /histsize command and the %{histsize} variable. - /recall is used to display text from any of the history lists. The /quote - command may be used to quote out of any history list using the /quote # - feature. + /recall is used to display text from any of the history lists. The /quote + command may be used to quote out of any history list using the /quote # + feature. #^^ #^ - Typing ^<string1>^<string2> finds the last command in the input history - containing <string1>, replaces <string1> with <string2>, and executes the - modified line. + Typing ^<string1>^<string2> finds the last command in the input history + containing <string1>, replaces <string1> with <string2>, and executes the + modified line. # - The recall keys replace the current input with a line from the input history - list. See /dokey for details. + The recall keys replace the current input with a line from the input history + list. See /dokey for details. - See also /log. + See also /log. &hook &hooks hooks - Associated topics: - /def define a macro with any fields - /hook define a hook macro - /unhook - undefine a hook macro - /trigger -h - call a hook macro - %hook enable hooks - %max_hook - maximum hook rate - - Hooks are a method of calling a macro based on special events within TF, in - much the same way as triggers call macros based on text received from a - socket. Hooks allow the user to customize the behavior of TinyFugue and - automate special functions. - - A hook definition has two parts: an <event> and a <pattern>. When the event - occurs, the macro will be executed if the arguments supplied by the event - match the macro's <pattern> (see the section on "patterns"). - - If multiple hooks match the same event and pattern, one or more are selected - as described under "priority". - - Most hooks have a default message associated with them, which will be - displayed with the attributes of the hook if one is defined. Thus a hook - with a gag attribute will suppress the display of the message. - - Hook may have multi-shots, in which case it and the macro it is associated - with is removed after executing a specified number of times. - - In the table below, 'A' or 'W' in the message column indicates the location - of the message display: - A the message is printed to the the alert stream (i.e., the status - line). - W the message is printed to the appropriate world's stream; if that - world is not the foreground world, the message is also printed to - the alert stream. - Otherwise, the message is sent to the the tferr stream (i.e., the screen). + Associated topics: + /def define a macro with any fields + /hook define a hook macro + /unhook + undefine a hook macro + /trigger -h + call a hook macro + %hook enable hooks + %max_hook + maximum hook rate + + Hooks are a method of calling a macro based on special events within TF, in + much the same way as triggers call macros based on text received from a + socket. Hooks allow the user to customize the behavior of TinyFugue and + automate special functions. + + A hook definition has two parts: an <event> and a <pattern>. When the event + occurs, the macro will be executed if the arguments supplied by the event + match the macro's <pattern> (see the section on "patterns"). + + If multiple hooks match the same event and pattern, one or more are selected + as described under "priority". + + Most hooks have a default message associated with them, which will be + displayed with the attributes of the hook if one is defined. Thus a hook + with a gag attribute will suppress the display of the message. + + Hook may have multi-shots, in which case it and the macro it is associated + with is removed after executing a specified number of times. + + In the table below, 'A' or 'W' in the message column indicates the location + of the message display: + A the message is printed to the the alert stream (i.e., the status + line). + W the message is printed to the appropriate world's stream; if that + world is not the foreground world, the message is also printed to + the alert stream. + Otherwise, the message is sent to the the tferr stream (i.e., the screen). Event Name Arguments Default Message or Action ---------- --------- ------------------------- @@ -5874,85 +5885,85 @@ hooks WORLD world W (foreground socket changes) # - Notes: - - The -w and -T options to /def can be used to restrict hooks to matching only - when the current world matches the world or world type. - - When a macro is defined with the same name as an existing macro, the REDEF - hook will be called, unless the new macro is identical to the original. - - BGTRIG used to be called BACKGROUND, and the old name still works. Its "% - Trigger in world " message can be quieted for individual triggers by - defining them with /def -q, or for all triggers with "/def -ag -hBGTRIG". - - The SEND hook is called whenever text would be sent to the current socket. - If a SEND hook matches the text that would be sent, the text is not sent - (unless the hook was defined with /def -q), and the hook is executed - instead. By default, SEND hooks are not invoked from send() or /send, but - there is an option to do so; SEND hooks are invoked from any macro or - command line that sends plain text. - - When successfully connected to a new socket, these events occur: 1) If this - is a proxy connection, the PROXY hook is called; 2) If there is a file - associated with the world, the file will be loaded (and the LOAD hook will - be called). 3) If this is not a proxy connection, the CONNECT hook is - called; 4) If %{login} is on, a character and password are defined, and this - is not a proxy connection, the LOGIN hook is called. - - When a (non-gagged) line is displayed in a background world, the PREACTIVITY - hook is called immediately before the line is displayed, and the ACTIVITY - hook is called immediately after. Thus, functions like moresize() and - nactive() will give different results in the two hooks. Any activity - generated by a PREACTIVITY hook will not recursively cause another - PREACTIVITY or ACTIVITY event. - - The SIGHUP, SIGTERM, SIGUSR1, and SIGUSR2 hooks are called when the - corresponding signal is received. If SIGHUP is received and SIGHUP was not - ignored when tf was started, or SIGTERM was received, TF will terminate - immediately after executing the hook; if the hook calls any commands with - delayed effects (a /repeat or /quote without -S, a nonblocking /connect, - etc), those effects will not occur before termination. - - A hook's message, if any, is displayed (with its attributes) before any of - the hooked macros are executed. Prior to version 5.0, the message was - displayed after executing hooked macros, which may have generated their own - output, which was sometimes confusing. - - Examples: + Notes: + + The -w and -T options to /def can be used to restrict hooks to matching only + when the current world matches the world or world type. + + When a macro is defined with the same name as an existing macro, the REDEF + hook will be called, unless the new macro is identical to the original. + + BGTRIG used to be called BACKGROUND, and the old name still works. Its "% + Trigger in world " message can be quieted for individual triggers by + defining them with /def -q, or for all triggers with "/def -ag -hBGTRIG". + + The SEND hook is called whenever text would be sent to the current socket. + If a SEND hook matches the text that would be sent, the text is not sent + (unless the hook was defined with /def -q), and the hook is executed + instead. By default, SEND hooks are not invoked from send() or /send, but + there is an option to do so; SEND hooks are invoked from any macro or + command line that sends plain text. + + When successfully connected to a new socket, these events occur: 1) If this + is a proxy connection, the PROXY hook is called; 2) If there is a file + associated with the world, the file will be loaded (and the LOAD hook will + be called). 3) If this is not a proxy connection, the CONNECT hook is + called; 4) If %{login} is on, a character and password are defined, and this + is not a proxy connection, the LOGIN hook is called. + + When a (non-gagged) line is displayed in a background world, the PREACTIVITY + hook is called immediately before the line is displayed, and the ACTIVITY + hook is called immediately after. Thus, functions like moresize() and + nactive() will give different results in the two hooks. Any activity + generated by a PREACTIVITY hook will not recursively cause another + PREACTIVITY or ACTIVITY event. + + The SIGHUP, SIGTERM, SIGUSR1, and SIGUSR2 hooks are called when the + corresponding signal is received. If SIGHUP is received and SIGHUP was not + ignored when tf was started, or SIGTERM was received, TF will terminate + immediately after executing the hook; if the hook calls any commands with + delayed effects (a /repeat or /quote without -S, a nonblocking /connect, + etc), those effects will not occur before termination. + + A hook's message, if any, is displayed (with its attributes) before any of + the hooked macros are executed. Prior to version 5.0, the message was + displayed after executing hooked macros, which may have generated their own + output, which was sometimes confusing. + + Examples: /hook ACTIVITY|DISCONNECT {TT|SM}* = /world %1 - will cause TF to automatically switch to TT or SM if either becomes active - or disconnected. + will cause TF to automatically switch to TT or SM if either becomes active + or disconnected. /def -T'tiny.mush' -hSEND mush_escape = /send - $(/escape \%[ %*) - will catch any line sent to a world of type 'tiny.mush', escape all - occurrences of '%', '[' and '\' within that line, and send the new line - instead of the original. This is useful for avoiding unwanted - interpretation of '%', '[', and '\' on TinyMUSH servers. + will catch any line sent to a world of type 'tiny.mush', escape all + occurrences of '%', '[' and '\' within that line, and send the new line + instead of the original. This is useful for avoiding unwanted + interpretation of '%', '[', and '\' on TinyMUSH servers. /hook SIGHUP = /log on%; /recall /10 - will log the last 10 lines of output if you are unexpectedly disconnected - from your tf session. + will log the last 10 lines of output if you are unexpectedly disconnected + from your tf session. #CONNETFAIL - The CONNETFAIL hook, which existed in versions 5.0 alpha 13 through 5.0 beta - 6, has been replaced with the ICONFAIL hook. + The CONNETFAIL hook, which existed in versions 5.0 alpha 13 through 5.0 beta + 6, has been replaced with the ICONFAIL hook. # - See also: macros, triggers, patterns, priority, signals. + See also: macros, triggers, patterns, priority, signals. &topics topics - Topics marked with + are new; those marked with * have changed since the - last version. Many topics also have subtopics that are not listed here - (e.g., individual variables, hooks, and functions). + Topics marked with + are new; those marked with * have changed since the + last version. Many topics also have subtopics that are not listed here + (e.g., individual variables, hooks, and functions). *copying copyright; no warranty @@ -5992,7 +6003,7 @@ topics *tfio output, error, and world streams *proxy connecting to outside hosts via a proxy server (firewall) +locale multi-language support - + &typing &user @@ -6000,48 +6011,48 @@ topics interface - Any input line that does not begin with '/' will be sent directly to the - foreground world, if there is one. A line starting with more than one '/' - will be sent to the forground socket after having the first '/' removed. - (Exception: lines may be caught with a SEND hook before being sent; see - "hooks"). - - Any input line beginning with a single '/' is a TF command, which will be - interpreted as described in "evaluation". - - Input lines of the form "^old^new" will cause TF to search backward in the - input history for a line containing "old", replace that text with "new", and - execute the modified command. See: history. - - Many special functions, such as backspace, can be performed by special keys - or sequences of keys. See "dokey" for a complete list. You can also define - your own commands and bind them to key sequences. See bind. - - Normally, user input does not undergo the expansion that macro bodies - undergo. The /eval command can be used to expand text before executing it. - If the %{sub} flag is on (it is off by default), user input undergoes macro - body expansion without the %{sub} flag. The %{sub} flag also applies to - text generated by "^old^new" history commands. See: history, /sub, - variables - - Control characters may be input literally. A literal control character will - be displayed in the input window in printable form in bold reverse. Note - that since most control keys are also parts of the default keybindings, it - will usually be necessary to type ^V (/dokey LNEXT) to avoid invoking the - keybinding. - - International characters may be input if your locale is set to a locale that - supports them and your system supports locales. Any input character that is - not valid in your locale and has the high bit set (normally generated by - holding the "meta" key) will be translated to ESC plus that character with - the high bit stripped (assuming %meta_esc is on). This allows M-x and ^[x - to invoke the same ^[x keybinding. See locale, %meta_esc, %istrip. - - If standard input is not a terminal, visual mode will not be allowed, and tf - will continue to operate even after EOF is read, until /quit or something - else terminates it. - - See also: visual, options + Any input line that does not begin with '/' will be sent directly to the + foreground world, if there is one. A line starting with more than one '/' + will be sent to the foreground socket after having the first '/' removed. + (Exception: lines may be caught with a SEND hook before being sent; see + "hooks"). + + Any input line beginning with a single '/' is a TF command, which will be + interpreted as described in "evaluation". + + Input lines of the form "^old^new" will cause TF to search backward in the + input history for a line containing "old", replace that text with "new", and + execute the modified command. See: history. + + Many special functions, such as backspace, can be performed by special keys + or sequences of keys. See "dokey" for a complete list. You can also define + your own commands and bind them to key sequences. See bind. + + Normally, user input does not undergo the expansion that macro bodies + undergo. The /eval command can be used to expand text before executing it. + If the %{sub} flag is on (it is off by default), user input undergoes macro + body expansion without the %{sub} flag. The %{sub} flag also applies to + text generated by "^old^new" history commands. See: history, /sub, + variables + + Control characters may be input literally. A literal control character will + be displayed in the input window in printable form in bold reverse. Note + that since most control keys are also parts of the default keybindings, it + will usually be necessary to type ^V (/dokey LNEXT) to avoid invoking the + keybinding. + + International characters may be input if your locale is set to a locale that + supports them and your system supports locales. Any input character that is + not valid in your locale and has the high bit set (normally generated by + holding the "meta" key) will be translated to ESC plus that character with + the high bit stripped (assuming %meta_esc is on). This allows M-x and ^[x + to invoke the same ^[x keybinding. See locale, %meta_esc, %istrip. + + If standard input is not a terminal, visual mode will not be allowed, and tf + will continue to operate even after EOF is read, until /quit or something + else terminates it. + + See also: visual, options &intro &me @@ -6051,39 +6062,39 @@ interface introduction - TinyFugue is a MUD client. It helps you connect to a MUD, in a much more - convenient manner than telnet. You can connect to a mud world using the - same syntax as you would with telnet: "tf <host> <port>". Or, while running - tf, you can use "/connect <host> <port>". To make things easier, you can - give names to worlds, using /addworld, and then use "tf <name>" and - "/connect <name>". If you store a set of /addworld commands in a file, TF - can read them automatically when it starts. You can even connect to more - than one world at the same time, and switch between them. See: /connect, - /fg, /addworld, worlds, tfrc. + TinyFugue is a MUD client. It helps you connect to a MUD, in a much more + convenient manner than telnet. You can connect to a mud world using the + same syntax as you would with telnet: "tf <host> <port>". Or, while running + tf, you can use "/connect <host> <port>". To make things easier, you can + give names to worlds, using /addworld, and then use "tf <name>" and + "/connect <name>". If you store a set of /addworld commands in a file, TF + can read them automatically when it starts. You can even connect to more + than one world at the same time, and switch between them. See: /connect, + /fg, /addworld, worlds, tfrc. - Normally, TF will split the screen into two windows: one for input, and one - for output. TF will display useful information on the line separating the - two windows, such as the name of the foreground world. See: windows. + Normally, TF will split the screen into two windows: one for input, and one + for output. TF will display useful information on the line separating the + two windows, such as the name of the foreground world. See: windows. - Any line you type that starts with a single '/' is a tf command. Anything - else you type will be sent to the mud. See: interface, commands. + Any line you type that starts with a single '/' is a tf command. Anything + else you type will be sent to the mud. See: interface, commands. - You can define your own tf commands, called macros. The simplest type of - macro is just an abbreviation or alias for a longer command or commands. - But macros can also perform much more powerful tasks. See: macros, /def. + You can define your own tf commands, called macros. The simplest type of + macro is just an abbreviation or alias for a longer command or commands. + But macros can also perform much more powerful tasks. See: macros, /def. - You can tell tf to watch for certain patterns in the text from the mud, and - then do special things when it sees that pattern: display the text in a - special way (hilite); not display the text at all (gag); execute a macro - command (trigger); or do any combination of these. See: attributes, - triggers, /hilite, /gag, /trig, /def. + You can tell tf to watch for certain patterns in the text from the mud, and + then do special things when it sees that pattern: display the text in a + special way (hilite); not display the text at all (gag); execute a macro + command (trigger); or do any combination of these. See: attributes, + triggers, /hilite, /gag, /trig, /def. - TF keeps a history of every line it prints, every line sent by the mud, and - every command you enter. You can see those histories using /recall. You - can also have this text saved in a file using /log. See: history, /recall, - /log. + TF keeps a history of every line it prints, every line sent by the mud, and + every command you enter. You can see those histories using /recall. You + can also have this text saved in a file using /log. See: history, /recall, + /log. - See also: topics + See also: topics &keys &key @@ -6097,26 +6108,26 @@ keybindings Default keybindings - TF's default command line editing keys are similar to those in emacs and - bash. In addition, several features may be invoked by more than one - keybinding, and TF has keybindings for unique features like switching the - foreground socket. + TF's default command line editing keys are similar to those in emacs and + bash. In addition, several features may be invoked by more than one + keybinding, and TF has keybindings for unique features like switching the + foreground socket. - Here, and throughout the TF documentation, the notation "^X" means the - character generated by typing the X key while holding the CTRL key. Also, - "^[" can be more easily typed just by pressing the ESC key. /Def -b and - /bind accept the ^X notation as well as "\<number>" notation, where <number> - is the octal, hexadecimal, or decimal number of the character's ascii value. - For example, the escape character can be given in any of these forms: ^[, - \033, \0x1B, or \27. + Here, and throughout the TF documentation, the notation "^X" means the + character generated by typing the X key while holding the CTRL key. Also, + "^[" can be more easily typed just by pressing the ESC key. /Def -b and + /bind accept the ^X notation as well as "\<number>" notation, where <number> + is the octal, hexadecimal, or decimal number of the character's ASCII value. + For example, the escape character can be given in any of these forms: ^[, + \033, \0x1B, or \27. - In the tables below, keys with "*" in the "Meaning" column make use of kbnum - (see below). + In the tables below, keys with "*" in the "Meaning" column make use of kbnum + (see below). #named keys Named keys - To redefine the named keys, see the section titled "Mapping Named Keys to - functions". + To redefine the named keys, see the section titled "Mapping Named Keys to + functions". Key Command Meaning --- ------- ------- @@ -6138,13 +6149,13 @@ Named keys Delete /dokey dch *delete character Home /dokey_home cursor to beginning of line End /dokey_end cursor to end of line - PgDn /dokey_pgdn *scroll forward a screenful - PgUp /dokey_pgup *scroll back a screenful - Tab /dokey page *scroll forward a screenful + PgDn /dokey_pgdn *scroll forward a screenfull + PgUp /dokey_pgup *scroll back a screenfull + Tab /dokey page *scroll forward a screenfull Ctrl_Home /dokey_recallbeg recall first line of input Ctrl_End /dokey_recallend recall last line of input - Ctrl_PgDn /dokey_flush scroll forward to last screenful + Ctrl_PgDn /dokey_flush scroll forward to last screenfull Ctrl_PgUp (reserved for future use) F1 /help help @@ -6196,10 +6207,10 @@ Unnamed key sequences "^X^R" /load ~/.tfrc reload personal config file "^X^V" /version display version information "^X^?" /kb_backward_kill_word *delete backward word (punctuation-delimited) - "^X[" /dokey_hpageback *scroll back a half screenful - "^X]" /dokey_hpage *scroll forward a half screenful - "^X{" /dokey_pageback *scroll back a screenful - "^X}" /dokey_page *scroll forward a screenful + "^X[" /dokey_hpageback *scroll back a half screenfull + "^X]" /dokey_hpage *scroll forward a half screenfull + "^X{" /dokey_pageback *scroll back a screenfull + "^X}" /dokey_page *scroll forward a screenfull "^[^E" /kb_expand_line expand current input line in place "^[^H" /kb_backward_kill_word *delete backward word (punctuation-delimited) "^[^I" /complete complete current word, depending on context @@ -6228,9 +6239,9 @@ Unnamed key sequences "^[c" /kb_capitalize_word *capitalize word "^[d" /kb_kill_word *delete forward word "^[f" /dokey_wright *cursor to end of word - "^[h" /dokey_hpage *scroll forward a half screenful + "^[h" /dokey_hpage *scroll forward a half screenfull "^[i" /complete input_history complete from previously typed words - "^[j" /dokey flush jump to last screenful of text + "^[j" /dokey flush jump to last screenfull of text "^[l" /kb_downcase_word *convert word to lower case "^[n" /dokey searchf *search forward input history "^[p" /dokey searchb *search backward input history @@ -6259,9 +6270,9 @@ Other useful commands not bound by default #tty #stty Terminal keys - Some keys are interpeted by the terminal, not TF, so if you want to change - them, you must do so outside of TF (e.g. with stty in unix). Typical unix - terminal keys include: + Some keys are interpreted by the terminal, not TF, so if you want to change + them, you must do so outside of TF (e.g. with stty in unix). Typical unix + terminal keys include: Key Name Meaning --- ---- ------- @@ -6269,44 +6280,44 @@ Terminal keys ^\ quit generates a SIGQUIT signal. ^Z susp suspends the TF process - When TF starts, it disables the terminal driver's "stop" and "start" keys - (typically ^S and ^Q), so they are available for binding within TF. + When TF starts, it disables the terminal driver's "stop" and "start" keys + (typically ^S and ^Q), so they are available for binding within TF. # Using keys - Keys F1...F12 are the function keys, located across the top of most - keyboards. - - Keys with names of the form "esc_<name>" correspond to the ESC key followed - by the <name> key. There is an "esc_<name>" for every single key in the - Named Key table above, but only the ones with default meanings are listed in - the table; the rest are available for custom definitions. - - On recent versions of xterm with the modifyCursorKeys resource, tf can - recognize when the CTRL, SHIFT, or META modifier is held down while pressing - the editor keys (insert, delete, home, end, pgdn, pgup), arrow keys, or - numbered function keys, and calls /key_ctrl_<name>, /key_shift_<name>, or - /key_meta_<name>, respectively. Additionally, by default, each - /key_meta_<name> calls the corresponding /key_esc_<name>, so, for example, - pressing META-Left has the same effect as ESC Left. Note that some xterms - capture shift_insert, shift_pgup, and shift_pgdn by default for their own - use, so tf will not receive these sequences. If you use another terminal - emulator that generates unique character sequences for ctrl-, shift-, and - meta-modified keys, you can bind those sequences to call the corresponding - /key_<mod>_<name> (and send them to the tf author for inclusion in a future - release of tf). + Keys F1...F12 are the function keys, located across the top of most + keyboards. + + Keys with names of the form "esc_<name>" correspond to the ESC key followed + by the <name> key. There is an "esc_<name>" for every single key in the + Named Key table above, but only the ones with default meanings are listed in + the table; the rest are available for custom definitions. + + On recent versions of xterm with the modifyCursorKeys resource, tf can + recognize when the CTRL, SHIFT, or META modifier is held down while pressing + the editor keys (insert, delete, home, end, pgdn, pgup), arrow keys, or + numbered function keys, and calls /key_ctrl_<name>, /key_shift_<name>, or + /key_meta_<name>, respectively. Additionally, by default, each + /key_meta_<name> calls the corresponding /key_esc_<name>, so, for example, + pressing META-Left has the same effect as ESC Left. Note that some xterms + capture shift_insert, shift_pgup, and shift_pgdn by default for their own + use, so tf will not receive these sequences. If you use another terminal + emulator that generates unique character sequences for ctrl-, shift-, and + meta-modified keys, you can bind those sequences to call the corresponding + /key_<mod>_<name> (and send them to the tf author for inclusion in a future + release of tf). #keypad #numeric keypad Numeric keypad - TF tries to put the keypad in "application mode", which on many terminals - will make the keypad keys generate unique character sequences. Application - mode can be disabled by setting %keypad to "off". The meaning of your - numeric keypad keys depends on your terminal emulator and its settings, the - setting of %keypad in tf, and the state of your NumLock key. Two common - configurations of the keypad are shown below. A <name> on a key in the - diagram indicates that it is bound in tf to "/key_<name>". + TF tries to put the keypad in "application mode", which on many terminals + will make the keypad keys generate unique character sequences. Application + mode can be disabled by setting %keypad to "off". The meaning of your + numeric keypad keys depends on your terminal emulator and its settings, the + setting of %keypad in tf, and the state of your NumLock key. Two common + configurations of the keypad are shown below. A <name> on a key in the + diagram indicates that it is bound in tf to "/key_<name>". configuration A configuration B @@ -6322,210 +6333,210 @@ Numeric keypad | Insert |Delete| | | nkp0 |nkp. | | +-------------+------+------+ +-------------+------+------+ - How this works for some specific terminals: - X Consortium xterm - %keypad=on and NumLock on gives configuration B above; %keypad=off - and NumLock on gives normal digit/punctuation keys; and NumLock off - gives configuration A. - XFree86/X.Org xterm - Identical to X Consortium xterm if you disable the "Alt/numlock - modifiers" option (under the ctrl-leftclick menu); if you do not, - then %keypad=on and NumLock on gives normal digit/punctuation keys, - and there is no way to get configuration B. There is also a "VT220 - keyboard" option; if that is enabled, %keypad=on and NumLock off - gives configuration B, and all other combinations of %keypad and - NumLock give normal digit/punctuation keys. - linux (Linux console) - %keypad=on gives configuration B, with these changes: "NumLock" - calls /key_f1, "/" calls /key_f2, "*" calls /key_f3, and "-" calls - /key_f4. With %keypad=off, NumLock chooses between configuration A - and normal digit/punctuation keys. (Prior to TF 5.0 beta 7, it was - often impossible to set %keypad=on because many (if not all) "linux" - termcap entries were missing a necessary code; TF now supplies that - code automatically if it is missing and %TERM is "linux".) - konsole and gnome-terminal - As far as I can tell, %keypad has no effect, NumLock chooses between - configuration A and normal digit/punctuation keys, and there is no - way to get configuration B. - PuTTY %keypad=on and NumLock on gives configuration B above; %keypad=off - and NumLock on gives normal digit/punctuation keys; and NumLock off - gives a configuration similar to configuration A. - Mac OSX Terminal - By default, Terminal's keypad always acts like normal - digit/punctuation keys. But if you turn on "strict vt100 keypad - behavior" under Terminal | Window Settings | Emulation, then - %keypad=on will give a configuration similar to configuration B. + How this works for some specific terminals: + X Consortium xterm + %keypad=on and NumLock on gives configuration B above; %keypad=off + and NumLock on gives normal digit/punctuation keys; and NumLock off + gives configuration A. + XFree86/X.Org xterm + Identical to X Consortium xterm if you disable the "Alt/numlock + modifiers" option (under the ctrl-leftclick menu); if you do not, + then %keypad=on and NumLock on gives normal digit/punctuation keys, + and there is no way to get configuration B. There is also a "VT220 + keyboard" option; if that is enabled, %keypad=on and NumLock off + gives configuration B, and all other combinations of %keypad and + NumLock give normal digit/punctuation keys. + linux (Linux console) + %keypad=on gives configuration B, with these changes: "NumLock" + calls /key_f1, "/" calls /key_f2, "*" calls /key_f3, and "-" calls + /key_f4. With %keypad=off, NumLock chooses between configuration A + and normal digit/punctuation keys. (Prior to TF 5.0 beta 7, it was + often impossible to set %keypad=on because many (if not all) "linux" + termcap entries were missing a necessary code; TF now supplies that + code automatically if it is missing and %TERM is "linux".) + konsole and gnome-terminal + As far as I can tell, %keypad has no effect, NumLock chooses between + configuration A and normal digit/punctuation keys, and there is no + way to get configuration B. + PuTTY %keypad=on and NumLock on gives configuration B above; %keypad=off + and NumLock on gives normal digit/punctuation keys; and NumLock off + gives a configuration similar to configuration A. + Mac OSX Terminal + By default, Terminal's keypad always acts like normal + digit/punctuation keys. But if you turn on "strict vt100 keypad + behavior" under Terminal | Window Settings | Emulation, then + %keypad=on will give a configuration similar to configuration B. # - In some environments, unnamed key sequences consisting of "^[" (ESC) - followed by one other character may also be typed by holding the META key - while typing the other character instead of typing ESC before the other - character. See %meta_esc. + In some environments, unnamed key sequences consisting of "^[" (ESC) + followed by one other character may also be typed by holding the META key + while typing the other character instead of typing ESC before the other + character. See %meta_esc. - The one-time warning about certain new keybindings in 5.0 can be disabled by - setting the variable warn_5keys=off. + The one-time warning about certain new keybindings in 5.0 can be disabled by + setting the variable warn_5keys=off. #mapping_named_keys Mapping Named Keys to functions - Named keys have two levels of mapping: first the character sequence - generated by the key is bound (with /def -b) to call a macro named - key_<name>; then the macro key_<name> is defined to execute a command. If - you wish to change the functionality of any named key, you should do so by - redefining key_<name>. For example, if you want Insert to invoke your own - macro /foo, you should redefine "/def key_insert = /foo". You should only - make a direct keybinding if a key on your terminal generates a character - sequence not covered by TF's default bindings; and then you should only bind - the character sequence to call key_<name> (but first, see the "keypad" - section above). For example, if your Insert key generates "^[Q", you can - bind it with "/def -b'^[Q' = /key_insert". You should never redefine any of - the predefined /dokey_* or /kb_* commands. + Named keys have two levels of mapping: first the character sequence + generated by the key is bound (with /def -b) to call a macro named + key_<name>; then the macro key_<name> is defined to execute a command. If + you wish to change the functionality of any named key, you should do so by + redefining key_<name>. For example, if you want Insert to invoke your own + macro /foo, you should redefine "/def key_insert = /foo". You should only + make a direct keybinding if a key on your terminal generates a character + sequence not covered by TF's default bindings; and then you should only bind + the character sequence to call key_<name> (but first, see the "keypad" + section above). For example, if your Insert key generates "^[Q", you can + bind it with "/def -b'^[Q' = /key_insert". You should never redefine any of + the predefined /dokey_* or /kb_* commands. - There are several advantages to this two-level mapping: redefining a key's - function is independent of the terminal; and adding keybindings for new - terminals is independent of the functions invoked by a named key. + There are several advantages to this two-level mapping: redefining a key's + function is independent of the terminal; and adding keybindings for new + terminals is independent of the functions invoked by a named key. - Examples of popular alternatives to the standard key definitions: + Examples of popular alternatives to the standard key definitions: - Make PgUp and PgDn to scroll a half screen instead of a full screen: + Make PgUp and PgDn to scroll a half screen instead of a full screen: /def key_pgdn = /dokey_hpage /def key_pgup = /dokey_hpageback - Make up and down arrow keys perform movement only: + Make up and down arrow keys perform movement only: /def key_up = /dokey_up /def key_down = /dokey_down - Make up and down arrow keys perform input recall only: + Make up and down arrow keys perform input recall only: /def key_up = /dokey_recallb /def key_down = /dokey_recallf - Before version 5.0, /def -B was the only way to bind a named key to a macro. - This, however, has been superceded by the use of "key_<name>" macros. - Whereas /def -B depends strictly on termcap entries, the bindings to - "key_<name>" macros are automatically generated from TF's own list of - standard keybindings in addition to termcap entries. Termcap entries are - often incomplete or not well matched to your terminal emulator; TF's - additional keybindings fill in the gaps. So, to redefine the meaning of a - named key, you should redefine "/def key_<name> = ...", not "/def -B<name> = - ...". The names recognized by /def -B are different than the names in the - Named Key table. For reference, they are: the function keys "F0", "F1",... - "F19"; the keypad keys "KP1" (upper left), "KP2" (center), "KP3" (upper - right), "KP4" (lower left), "KP5" (lower right); the arrow keys "Up", - "Down", "Right", "Left"; and the other keys, "Backspace", "Clear EOL", - "Clear EOS", "Clear Screen", "Delete", "Delete Line", "Home", "Home Down", - "Insert", "Insert Line", "PgDn", "PgUp", "Scroll Down", "Scroll Up". They - must be spelled as shown, but capitalization is ignored. The function - keycode() can be used to find the string generated by a key (as defined in - the termcap entry for %TERM). + Before version 5.0, /def -B was the only way to bind a named key to a macro. + This, however, has been superseded by the use of "key_<name>" macros. + Whereas /def -B depends strictly on termcap entries, the bindings to + "key_<name>" macros are automatically generated from TF's own list of + standard keybindings in addition to termcap entries. Termcap entries are + often incomplete or not well matched to your terminal emulator; TF's + additional keybindings fill in the gaps. So, to redefine the meaning of a + named key, you should redefine "/def key_<name> = ...", not "/def -B<name> = + ...". The names recognized by /def -B are different than the names in the + Named Key table. For reference, they are: the function keys "F0", "F1",... + "F19"; the keypad keys "KP1" (upper left), "KP2" (center), "KP3" (upper + right), "KP4" (lower left), "KP5" (lower right); the arrow keys "Up", + "Down", "Right", "Left"; and the other keys, "Backspace", "Clear EOL", + "Clear EOS", "Clear Screen", "Delete", "Delete Line", "Home", "Home Down", + "Insert", "Insert Line", "PgDn", "PgUp", "Scroll Down", "Scroll Up". They + must be spelled as shown, but capitalization is ignored. The function + keycode() can be used to find the string generated by a key (as defined in + the termcap entry for %TERM). #mapping_char_seqs Mapping character sequences to functions - /Def -b (or /bind) allows you to bind a character sequence to a macro body. - Typing that sequence at the keyboard (which may mean pressing a single key - that generates the sequence) will then execute the macro body. + /Def -b (or /bind) allows you to bind a character sequence to a macro body. + Typing that sequence at the keyboard (which may mean pressing a single key + that generates the sequence) will then execute the macro body. - TF's input handler recognizes ^H and ^? as backspace and ^J and ^M as - newline, even when they are not bound to anything. However, if a keybinding - is defined for any of these keys, it will override the internal handling of - that key. + TF's input handler recognizes ^H and ^? as backspace and ^J and ^M as + newline, even when they are not bound to anything. However, if a keybinding + is defined for any of these keys, it will override the internal handling of + that key. - At startup, TF also examines the terminal driver settings for character - sequences corresponding to the /dokey functions BWORD, DLINE, REFRESH, and - LNEXT, and binds them accordingly in addition to the default bindings listed - above. + At startup, TF also examines the terminal driver settings for character + sequences corresponding to the /dokey functions BWORD, DLINE, REFRESH, and + LNEXT, and binds them accordingly in addition to the default bindings listed + above. Mapping character sequences to Named Keys - Because TF runs in a terminal and not in a windowing system, it does not see - actual keystrokes, but only the characters generated by a keystroke. For - example, the up arrow key on many terminals generates "^[[A", and that is - what TF receives. Thus, TF uses a set of definitions like "/def - -b'<charsequence>' = /key_<name>" to map chracter sequences to the keys that - generate them. If two different keys generate the same sequence of - characters, there is no way for TF to tell them apart. - - At startup, TF automatically binds character sequences to the named key - macros according to vt100, vt220, ANSI, and xterm definitions, plus OS/2 - definitions if running on OS/2, as well as the termcap entry corresponding - to your %TERM variable. If the named keys on your terminal generate - character sequences that are not recognized by TF, you will need to bind - them yourself with "/def -b'<charsequence>' = /key_<name>". For example, if - your terminal's PgUp key generates "^[[3~", TF will think you pressed - Delete, since that is the character sequence generated by Delete on most - terminals. To tell TF about PgUp on your terminal, you should do "/def - -b'^[[3~' = /key_pgup". + Because TF runs in a terminal and not in a windowing system, it does not see + actual keystrokes, but only the characters generated by a keystroke. For + example, the up arrow key on many terminals generates "^[[A", and that is + what TF receives. Thus, TF uses a set of definitions like "/def + -b'<charsequence>' = /key_<name>" to map character sequences to the keys that + generate them. If two different keys generate the same sequence of + characters, there is no way for TF to tell them apart. + + At startup, TF automatically binds character sequences to the named key + macros according to vt100, vt220, ANSI, and xterm definitions, plus OS/2 + definitions if running on OS/2, as well as the termcap entry corresponding + to your %TERM variable. If the named keys on your terminal generate + character sequences that are not recognized by TF, you will need to bind + them yourself with "/def -b'<charsequence>' = /key_<name>". For example, if + your terminal's PgUp key generates "^[[3~", TF will think you pressed + Delete, since that is the character sequence generated by Delete on most + terminals. To tell TF about PgUp on your terminal, you should do "/def + -b'^[[3~' = /key_pgup". #Terminal #terminal.app #osx #os x #OS X Terminal - Note for Mac OS X Terminal.app users: by default, Terminal.app traps PageUp - and PageDown keys itself and does not send them to the application (tf). It - does however send Shift-PageUp and Shift-PageDown to the application, so you - can use these to scroll in tf running inside Terminal. You can also tell - Terminal to send the unshifted keys to tf by redefining them in Terminal | - Window Settings | Keyboard. + Note for Mac OS X Terminal.app users: by default, Terminal.app traps PageUp + and PageDown keys itself and does not send them to the application (tf). It + does however send Shift-PageUp and Shift-PageDown to the application, so you + can use these to scroll in tf running inside Terminal. You can also tell + Terminal to send the un-shifted keys to tf by redefining them in Terminal | + Window Settings | Keyboard. #teraterm #niftytelnet #broken emulators - Note: some broken terminal emulators (TeraTerm, NiftyTelnet) send incorrect - character sequences for the editor keypad (insert, delete, home, end, pgup, - pgdn). For TeraTerm users, the preferred fix is to copy - %TFLIBDIR/teraterm.keyboard.cnf to KEYBOARD.CNF in their TeraTerm directory; - this will help all applications you run within TeraTerm, not just TF. Users - of either terminal emulator may work around the problem with "/load - kb_badterm.tf". + Note: some broken terminal emulators (TeraTerm, NiftyTelnet) send incorrect + character sequences for the editor keypad (insert, delete, home, end, pgup, + pgdn). For TeraTerm users, the preferred fix is to copy + %TFLIBDIR/teraterm.keyboard.cnf to KEYBOARD.CNF in their TeraTerm directory; + this will help all applications you run within TeraTerm, not just TF. Users + of either terminal emulator may work around the problem with "/load + kb_badterm.tf". # - Note that before version 3.5 alpha 21 or beta 1, it was usually harmless to - "/set TERM=vt100" on terminals that accepted a superset of vt100 display - codes. However, the termcap key definitions are often different for - terminals that are otherwise similar (e.g., vt100 and xterm share many - display codes, but the key definitions are different), so setting %TERM - incorrectly may interfere with the operation of named keys. Xterm users - should also note that since 5.0, TF has its own scrollback, and xterm's - scrollback will not work properly even if you try to trick TF with - TERM=vt100. + Note that before version 3.5 alpha 21 or beta 1, it was usually harmless to + "/set TERM=vt100" on terminals that accepted a superset of vt100 display + codes. However, the termcap key definitions are often different for + terminals that are otherwise similar (e.g., vt100 and xterm share many + display codes, but the key definitions are different), so setting %TERM + incorrectly may interfere with the operation of named keys. Xterm users + should also note that since 5.0, TF has its own scrollback, and xterm's + scrollback will not work properly even if you try to trick TF with + TERM=vt100. #kbnum "Kbnum" argument - With the default keybindings, ESC followed by an optional "-" and any number - of digits sets the global variable %kbnum. By default, the current %kbnum - value is displayed near the right end of the status line. Then, when any - other keybinding is typed, that keybinding may use the value of %kbnum. - Whether the keybinding uses the value or not, %kbnum is cleared after the - keybinding has run. Most keybindings that use %kbnum use it as a repeat - count. For example, typing "ESC 1 2 x" is the same as typing "x" 12 times. - For keybindings that have a sense of direction, negative values of %kbnum - reverse that direction: for example, typing "ESC - 4 PgDn" is like typing - "PgUp" 4 times. The "^G" (/beep) keybinding does not honor %kbnum, so it - can be used to cancel %kbnum with no effect. The variable %max_kbnum sets - an upper limit on the value of %kbnum that can be entered by the ESC and - digit keys, to prevent typos from sending TF into very long loops. - - The interpretation of %kbnum must be done by the command called from the - keybinding; it is not done automatically by TF. So, for %kbnum to be - meaningful in a macro you write, you must implement those semantics - yourself. Additionally, most of the standard "/kb_*" and "/dokey" commands - that use %kbnum are optimized to not simply repeat the command a number of - times, but instead calculate only the end result. For example, ESC 300 TAB - does not laboriously scroll 300 screenfuls of text onto the screen, but - figures out what the 300th screenful looks like and draws that immediately. - It does this because /dokey_page calls "/test morescroll( winlines() * - (kbnum?:1))". - - To set %kbnum by means other than the default keybindings above, simply /set - it as you would any other variable. Once it is set, all typed digits are - appended to it. When any non-digit key is typed, that key will be executed, - and %kbnum will be cleared. + With the default keybindings, ESC followed by an optional "-" and any number + of digits sets the global variable %kbnum. By default, the current %kbnum + value is displayed near the right end of the status line. Then, when any + other keybinding is typed, that keybinding may use the value of %kbnum. + Whether the keybinding uses the value or not, %kbnum is cleared after the + keybinding has run. Most keybindings that use %kbnum use it as a repeat + count. For example, typing "ESC 1 2 x" is the same as typing "x" 12 times. + For keybindings that have a sense of direction, negative values of %kbnum + reverse that direction: for example, typing "ESC - 4 PgDn" is like typing + "PgUp" 4 times. The "^G" (/beep) keybinding does not honor %kbnum, so it + can be used to cancel %kbnum with no effect. The variable %max_kbnum sets + an upper limit on the value of %kbnum that can be entered by the ESC and + digit keys, to prevent typos from sending TF into very long loops. + + The interpretation of %kbnum must be done by the command called from the + keybinding; it is not done automatically by TF. So, for %kbnum to be + meaningful in a macro you write, you must implement those semantics + yourself. Additionally, most of the standard "/kb_*" and "/dokey" commands + that use %kbnum are optimized to not simply repeat the command a number of + times, but instead calculate only the end result. For example, ESC 300 TAB + does not laboriously scroll 300 screenfulls of text onto the screen, but + figures out what the 300th screenfull looks like and draws that immediately. + It does this because /dokey_page calls "/test morescroll( winlines() * + (kbnum?:1))". + + To set %kbnum by means other than the default keybindings above, simply /set + it as you would any other variable. Once it is set, all typed digits are + appended to it. When any non-digit key is typed, that key will be executed, + and %kbnum will be cleared. #kbnum Other key bindings @@ -6541,22 +6552,22 @@ Other key bindings #emacs #extra keybindings - Some additional keyboard operations can be defined by /loading these library - files: - kb-old.tf - keybindings like those in TF 4.0 and earlier - kb-emacs.tf - additional emacs-like keybindings - kbregion.tf - cut-and-paste operations - kbstack.tf - save the current input line with ESC DOWN and restore it later with - ESC UP. - See the comments at the top of each file for further documentation. + Some additional keyboard operations can be defined by /loading these library + files: + kb-old.tf + keybindings like those in TF 4.0 and earlier + kb-emacs.tf + additional emacs-like keybindings + kbregion.tf + cut-and-paste operations + kbstack.tf + save the current input line with ESC DOWN and restore it later with + ESC UP. + See the comments at the top of each file for further documentation. # ____________________________________________________________________________ - See also: /dokey, /bind, /complete, %wordpunct, signals. + See also: /dokey, /bind, /complete, %wordpunct, signals. &stdlib.tf &local.tf @@ -6567,86 +6578,86 @@ Other key bindings standard library - When TF is started, commands are loaded from the standard library - (%{TFLIBDIR}/stdlib.tf). If the installer has created an optional local - library (%{TFLIBDIR}/local.tf), that will also be loaded. Macros defined in - the standard library are marked with the invisible option ("-i") so they - will not be processed by /list, /save and /purge unless forced. Redefining - or undefining such a macro will clear the -i option, so customized macros - with the same names as library macros can be created, listed, saved, and - purged. + When TF is started, commands are loaded from the standard library + (%{TFLIBDIR}/stdlib.tf). If the installer has created an optional local + library (%{TFLIBDIR}/local.tf), that will also be loaded. Macros defined in + the standard library are marked with the invisible option ("-i") so they + will not be processed by /list, /save and /purge unless forced. Redefining + or undefining such a macro will clear the -i option, so customized macros + with the same names as library macros can be created, listed, saved, and + purged. - See also: utilities + See also: utilities #filename macros Filenames: - These macros may be redefined to any filename. LOGFILE contains the default - filename used by /log. MACROFILE, HILITEFILE, GAGFILE, TRIGFILE, BINDFILE, - HOOKFILE, and WORLDFILE contain the default filenames used by the /load* and - /save* families of commands. + These macros may be redefined to any filename. LOGFILE contains the default + filename used by /log. MACROFILE, HILITEFILE, GAGFILE, TRIGFILE, BINDFILE, + HOOKFILE, and WORLDFILE contain the default filenames used by the /load* and + /save* families of commands. # #list* List commands: - /listdef <spec> - equivalent to '/list <spec>'. - /listhilite <spec> - lists hilites on <spec>. - /listgag <spec> - lists gags on <spec>. - /listtrig <spec> - lists triggers on <spec>. - /listbind <spec> - lists key bindings matching <spec> - /listhook <spec> - lists hooks matching <spec>. - - See: /list + /listdef <spec> + equivalent to '/list <spec>'. + /listhilite <spec> + lists hilites on <spec>. + /listgag <spec> + lists gags on <spec>. + /listtrig <spec> + lists triggers on <spec>. + /listbind <spec> + lists key bindings matching <spec> + /listhook <spec> + lists hooks matching <spec>. + + See: /list #purge* Purge commands: - /purgedef <spec> - purges macros whose name matches <spec> - /purgehilite <spec> - purges macros with hilites on <spec> - /purgegag <spec> - purges macros with gags on <spec> - /purgetrig <spec> - purges macros with triggers on <spec> - /purgedeft <spec> - purges named macros with triggers on <spec> - /purgebind <spec> - purges key bindings matching <spec>. - /purgehook <spec> - purges hooks matching <spec>. - - See: /purge + /purgedef <spec> + purges macros whose name matches <spec> + /purgehilite <spec> + purges macros with hilites on <spec> + /purgegag <spec> + purges macros with gags on <spec> + /purgetrig <spec> + purges macros with triggers on <spec> + /purgedeft <spec> + purges named macros with triggers on <spec> + /purgebind <spec> + purges key bindings matching <spec>. + /purgehook <spec> + purges hooks matching <spec>. + + See: /purge #load* Load commands: - /loaddef, /loadhilite, /loadgag, /loadtrig, /loadbind, /loadhook, - /loadworld. All take a <file> argument; if the argument is omitted, the - appropriate default filename macro is used. + /loaddef, /loadhilite, /loadgag, /loadtrig, /loadbind, /loadhook, + /loadworld. All take a <file> argument; if the argument is omitted, the + appropriate default filename macro is used. - See: /load + See: /load #save* Save commands: - /savedef, /savehilite, /savegag, /savetrig, /savebind, /savehook, - /saveworld. All take a <file> argument. If <file> is omitted, the - appropriate default filename macro is used. + /savedef, /savehilite, /savegag, /savetrig, /savebind, /savehook, + /saveworld. All take a <file> argument. If <file> is omitted, the + appropriate default filename macro is used. - See: /save + See: /save #compress #COMPRESS_READ @@ -6657,26 +6668,26 @@ Save commands: File compression: - The helpfile, personal config file, and files read with /load may be stored - compressed on disk. If TF can not find a file with the specified name, it - will add ${COMPRESS_SUFFIX} to the filename and try to read it by piping it - through ${COMPRESS_READ}. ${COMPRESS_READ} should contain the name of a - shell command that takes a filename as an argument, and prints its output on - standard output. The default values for ${COMPRESS_SUFFIX} and - ${COMPRESS_READ} defined in the library are ".Z" and "zcat" for unix, ".zip" - and "unzip -p" for os/2. Undefining ${COMPRESS_SUFFIX} will disable this - feature. Note: /save, /saveworld, and /log do not write compressed files. + The helpfile, personal config file, and files read with /load may be stored + compressed on disk. If TF can not find a file with the specified name, it + will add ${COMPRESS_SUFFIX} to the filename and try to read it by piping it + through ${COMPRESS_READ}. ${COMPRESS_READ} should contain the name of a + shell command that takes a filename as an argument, and prints its output on + standard output. The default values for ${COMPRESS_SUFFIX} and + ${COMPRESS_READ} defined in the library are ".Z" and "zcat" for unix, ".zip" + and "unzip -p" for os/2. Undefining ${COMPRESS_SUFFIX} will disable this + feature. Note: /save, /saveworld, and /log do not write compressed files. #retry #retry_off World connection commands: - /retry <world> [<delay>] - Try to connect to <world>; repeat every <delay> seconds until - successful. - /retry_off [<world>] - Cancels "/retry <world>" (default: all worlds) + /retry <world> [<delay>] + Try to connect to <world>; repeat every <delay> seconds until + successful. + /retry_off [<world>] + Cancels "/retry <world>" (default: all worlds) #hilite_whisper #hilite whisper @@ -6685,15 +6696,15 @@ World connection commands: Hilite commands: - /hilite_whisper, /hilite_page, /nohilite_whisper, and /nohilite_page turn on - or off hiliting several different page and whisper formats. + /hilite_whisper, /hilite_page, /nohilite_whisper, and /nohilite_page turn on + or off hiliting several different page and whisper formats. # Backward compatible commands: - /reply, /act, /nolog, /nologin, /nologme, /noquiet, and /nowrap are provided - for compatibility. + /reply, /act, /nolog, /nologin, /nologme, /noquiet, and /nowrap are provided + for compatibility. &8-bit &8 bit @@ -6711,200 +6722,200 @@ Backward compatible commands: locale - On many systems, "/setenv LC_CTYPE=en_US" will allow you to use characters - in the 8-bit ISO 8859 character set. If this does not work on your system, - or you want to use a non-English locale, or you just want to learn more, - keep reading. - - A locale defines a set of rules for a language and culture. If the platform - on which TF runs supports locales, TF will support the following categories - of locale rules: - LC_CTYPE - determines what characters are allowed, and whether they should be - treated as letters, digits, puctuation, or control characters. When - using a locale with an 8-bit character set, make sure that %istrip - is off and %meta_esc is off or nonprint, so you can type 8-bit - characters with the meta key. - LC_TIME - determines the names and formats used in displaying dates and times - with /time, ftime(), etc. - - The user can set the locale either by having special variables defined in - the environment before starting TF (preferred), or by setting them while TF - is running (they will automatically be exported to the environment even if - /set is used). The exact rules for setting locale depend on the platform, - and should be found your system's documentation for setlocale(). The rules - are usually something like this: - - * If the variable LC_ALL is set, its value is used as the locale for - all supported categories. - * Otherwise, if the variable with the name of a category (e.g., - LC_CTYPE) is set, its value is used as the locale for that category. - * Otherwise, if the variable LANG is set, its value is used as the - locale for any supported categories that were not covered by the first - two rules. - * If none of those are set for a category, the default "C" locale is - used for that category, which allows the 7-bit ASCII character set and - US English date and time formats. - - The valid values for the locale variables depend on your system. On a POSIX - system, the valid values can be listed with the shell command "locale -a". - - Bugs: - - * LC_COLLATE and LC_MESSAGES categories are not supported. - * In glob patterns, there is no way to specify a range of all letters - that works in all locales. E.g., "[A-Za-z]" works in the standard "C" - locale, but not necessarily in others. (However, in regexp patterns, - locale information is used to define character type operators like "\w" - and "\W", case insensitivity, etc.) - * TF will convert character 0x80 to the character 0x00. This is not - usually an issue, since character 0x80 is not a printable character in - the character sets of most locales (including all ISO character sets). - - If your system has locale support, but does not have any locales installed, - you can get the POSIX 1003.2 WG15-collection locale definitions from - ftp://dkuug.dk/i18n/ or ftp://i44ftp.info.uni-karlsruhe.de/pub/linux/ctype/. - - Note that even though TF supports locales with non-ASCII character sets, not - all MUD servers support non-ASCII character sets. Many servers simply - discard characters that are not printable ASCII. Among servers that do - support non-ASCII characters, the most commonly used set is ISO-8859-1 - (Latin1). When choosing a locale for TF, you should choose one that uses - the same character set as the servers you use. - - Note to linux users and other users of GNU libc: at least some versions of - GNU localedef generate invalid LC_TIME information from the WG15-collection - sources, and the GNU libc causes any program that tries to use the invalid - LC_TIME information to crash. Workarounds: delete the LC_TIME data; or, do - not set any of the LC_ALL, LC_TIME, or LANG variables. + On many systems, "/setenv LC_CTYPE=en_US" will allow you to use characters + in the 8-bit ISO 8859 character set. If this does not work on your system, + or you want to use a non-English locale, or you just want to learn more, + keep reading. + + A locale defines a set of rules for a language and culture. If the platform + on which TF runs supports locales, TF will support the following categories + of locale rules: + LC_CTYPE + determines what characters are allowed, and whether they should be + treated as letters, digits, punctuation, or control characters. When + using a locale with an 8-bit character set, make sure that %istrip + is off and %meta_esc is off or nonprint, so you can type 8-bit + characters with the meta key. + LC_TIME + determines the names and formats used in displaying dates and times + with /time, ftime(), etc. + + The user can set the locale either by having special variables defined in + the environment before starting TF (preferred), or by setting them while TF + is running (they will automatically be exported to the environment even if + /set is used). The exact rules for setting locale depend on the platform, + and should be found your system's documentation for setlocale(). The rules + are usually something like this: + + * If the variable LC_ALL is set, its value is used as the locale for + all supported categories. + * Otherwise, if the variable with the name of a category (e.g., + LC_CTYPE) is set, its value is used as the locale for that category. + * Otherwise, if the variable LANG is set, its value is used as the + locale for any supported categories that were not covered by the first + two rules. + * If none of those are set for a category, the default "C" locale is + used for that category, which allows the 7-bit ASCII character set and + US English date and time formats. + + The valid values for the locale variables depend on your system. On a POSIX + system, the valid values can be listed with the shell command "locale -a". + + Bugs: + + * LC_COLLATE and LC_MESSAGES categories are not supported. + * In glob patterns, there is no way to specify a range of all letters + that works in all locales. E.g., "[A-Za-z]" works in the standard "C" + locale, but not necessarily in others. (However, in regexp patterns, + locale information is used to define character type operators like "\w" + and "\W", case insensitivity, etc.) + * TF will convert character 0x80 to the character 0x00. This is not + usually an issue, since character 0x80 is not a printable character in + the character sets of most locales (including all ISO character sets). + + If your system has locale support, but does not have any locales installed, + you can get the POSIX 1003.2 WG15-collection locale definitions from + ftp://dkuug.dk/i18n/ or ftp://i44ftp.info.uni-karlsruhe.de/pub/linux/ctype/. + + Note that even though TF supports locales with non-ASCII character sets, not + all MUD servers support non-ASCII character sets. Many servers simply + discard characters that are not printable ASCII. Among servers that do + support non-ASCII characters, the most commonly used set is ISO-8859-1 + (Latin1). When choosing a locale for TF, you should choose one that uses + the same character set as the servers you use. + + Note to linux users and other users of GNU libc: at least some versions of + GNU localedef generate invalid LC_TIME information from the WG15-collection + sources, and the GNU libc causes any program that tries to use the invalid + LC_TIME information to crash. Workarounds: delete the LC_TIME data; or, do + not set any of the LC_ALL, LC_TIME, or LANG variables. &autologin &login login - If the %{login} flag is on when you connect to a world, and that world was - defined with a character, password, and optional worldtype, TF will attempt - to automatically login to that world. + If the %{login} flag is on when you connect to a world, and that world was + defined with a character, password, and optional worldtype, TF will attempt + to automatically login to that world. - Autologin is done by a hook defined in the standard library. The hook for - the default worldtype uses TinyMUD login format; there are also hooks for - "tiny", "lp", "lpp", and "telnet" worldtypes. You can also define your own - LOGIN hooks. + Autologin is done by a hook defined in the standard library. The hook for + the default worldtype uses TinyMUD login format; there are also hooks for + "tiny", "lp", "lpp", and "telnet" worldtypes. You can also define your own + LOGIN hooks. - See: hooks, variables, /addworld + See: hooks, variables, /addworld ¯os macros - A macro is basically a named set of commands. The simplest kind of macro - has a name and a body. The body is a list of one or more commands, - separated by '%;' tokens. These commands are executed when the macro is - called. For example, if you define a macro like + A macro is basically a named set of commands. The simplest kind of macro + has a name and a body. The body is a list of one or more commands, + separated by '%;' tokens. These commands are executed when the macro is + called. For example, if you define a macro like /def time_warp = :jumps to the left!%;:steps to the right! - and call it by typing + and call it by typing /time_warp - you will execute the commands + you will execute the commands :jumps to the left! :steps to the right! - A macro name is the way of calling it from the command line or from another - macro. You can execute a macro by typing '/' followed by the name of the - macro. If a macro and builtin have the same name, the macro will be called. - Typing '/@' followed by the name will always call the builtin command. - - A macro body, or execution text, is the commands and/or text executed when - the macro is called. This text is evaluated according to the rules - described under "evaluation". - - Macros actually have many more fields, described below. All fields - (including name and body) are optional. - - name The name of the macro. Names should begin with a letter, and - contain letters, numbers, or '_' characters. - - body One or more commands to be executed when macro is called. The body - is compiled to an efficient internal format the first time it is - needed, so each future call can execute it more quickly. - - number All macros are automatically numbered sequentially. This field can - not be changed. - - trigger - when text matches the trigger pattern, the macro may be called. - - hook the macro can be called when a TF hook event occurs. - - keybinding - the macro will be called when its keybinding is typed. - - shots the macro will be deleted after it is triggered or hooked a certain - number of times. - - priority - when multiple triggers match the same text, the one with the highest - priority is selected (see "priority"). - - fall-thru - on a trigger or hook, allows additional macros of lower priority to - be run (see "priority"). - - world the macro can only be triggered/hooked by text/events from a - particular world. - - worldtype - the macro can only be triggered/hooked by text/events from a - particular type of world. - - expression - the macro can only be triggered/hooked if expression is non-zero. - - attributes - bold, underline, etc. for displaying trigger text. - - probability - when triggered, the macro has a certain probability of being - executed. - - invisibility - prevents handling of macro by /list, /save, or /purge. - Macros may be called in several ways: - - * a command of the form "/name" or "/#number" - * triggered by text from a socket (see "triggers") - * hooked by a tinyfugue event (see "hooks") - * by keybindings - - Associated commands: - /def define a named macro, with any fields - /trig define a trigger macro - /hilite - define a hilite macro - /gag define a gag macro - /bind define a keybinding macro - /hook define a hook macro - /undef undefine a named macro - /unhook - undefine a hook macro - /unbind - undefine a keybinding macro - /undefn - undefine a macro by number - /undeft - undefine a macro by trigger - /purge undefine a set of macros - /list display a list of macros - /load load commands from a file - /save save macro definitions to a file - - See also: triggers, gags, hilites, hooks + A macro name is the way of calling it from the command line or from another + macro. You can execute a macro by typing '/' followed by the name of the + macro. If a macro and builtin have the same name, the macro will be called. + Typing '/@' followed by the name will always call the builtin command. + + A macro body, or execution text, is the commands and/or text executed when + the macro is called. This text is evaluated according to the rules + described under "evaluation". + + Macros actually have many more fields, described below. All fields + (including name and body) are optional. + + name The name of the macro. Names should begin with a letter, and + contain letters, numbers, or '_' characters. + + body One or more commands to be executed when macro is called. The body + is compiled to an efficient internal format the first time it is + needed, so each future call can execute it more quickly. + + number All macros are automatically numbered sequentially. This field can + not be changed. + + trigger + when text matches the trigger pattern, the macro may be called. + + hook the macro can be called when a TF hook event occurs. + + keybinding + the macro will be called when its keybinding is typed. + + shots the macro will be deleted after it is triggered or hooked a certain + number of times. + + priority + when multiple triggers match the same text, the one with the highest + priority is selected (see "priority"). + + fall-thru + on a trigger or hook, allows additional macros of lower priority to + be run (see "priority"). + + world the macro can only be triggered/hooked by text/events from a + particular world. + + worldtype + the macro can only be triggered/hooked by text/events from a + particular type of world. + + expression + the macro can only be triggered/hooked if expression is non-zero. + + attributes + bold, underline, etc. for displaying trigger text. + + probability + when triggered, the macro has a certain probability of being + executed. + + invisibility + prevents handling of macro by /list, /save, or /purge. + Macros may be called in several ways: + + * a command of the form "/name" or "/#number" + * triggered by text from a socket (see "triggers") + * hooked by a tinyfugue event (see "hooks") + * by keybindings + + Associated commands: + /def define a named macro, with any fields + /trig define a trigger macro + /hilite + define a hilite macro + /gag define a gag macro + /bind define a keybinding macro + /hook define a hook macro + /undef undefine a named macro + /unhook + undefine a hook macro + /unbind + undefine a keybinding macro + /undefn + undefine a macro by number + /undeft + undefine a macro by trigger + /purge undefine a set of macros + /list display a list of macros + /load load commands from a file + /save save macro definitions to a file + + See also: triggers, gags, hilites, hooks &mail &mail check @@ -6912,36 +6923,36 @@ macros mail checking - If %{maildelay} is nonzero, TF will check for mail every %{maildelay} - seconds. TF checks for mail in each file in the space-separated list of - files in the %{TFMAILPATH} variable (literal spaces in TFMAILPATH may be - quoted by preceeding them with a backslash). If %{TFMAILPATH} is not set, - TF will check in the single file named by the %{MAIL} variable. - - TF considers a mailfile to have unread mail if the file has been written - more recently than it has been read. When this changes for any of the - monitored files, TF updates the mail indicator on the status line (actually, - the "@mail" status). When TF determines that a mailfile contains new mail, - it calls the MAIL hook, which by default prints "You have new mail". If a - mailfile is not empty the first time TF checks it, TF just prints "You have - mail" without calling the MAIL hook. - - If an error occurs while checking any file, an error message will be - displayed only once, until that error clears up (or changes to a different - error), but TF will continue to check that file. To disable checking, even - after an error, you must remove the file from %{TFMAILPATH} or %{MAIL}. - - The nmail() function returns the number of monitored mail files containing - unread mail. - - MAIL and/or MAILPATH variables are usually set in the environment before TF - starts. If %{MAIL} is not set when TF starts, TF will try to set it to the - name of the system mail directory plus your user name (if the system mail - directory was defined when TF was installed). If MAILPATH (which uses ":" - as a delimiter) is set when TF starts, it is transferred to %{TFMAILPATH} - (which uses space as a delimiter). - - See: nmail(), variables, special variables, /set, mailing list. + If %{maildelay} is nonzero, TF will check for mail every %{maildelay} + seconds. TF checks for mail in each file in the space-separated list of + files in the %{TFMAILPATH} variable (literal spaces in TFMAILPATH may be + quoted by preceding them with a backslash). If %{TFMAILPATH} is not set, + TF will check in the single file named by the %{MAIL} variable. + + TF considers a mailfile to have unread mail if the file has been written + more recently than it has been read. When this changes for any of the + monitored files, TF updates the mail indicator on the status line (actually, + the "@mail" status). When TF determines that a mailfile contains new mail, + it calls the MAIL hook, which by default prints "You have new mail". If a + mailfile is not empty the first time TF checks it, TF just prints "You have + mail" without calling the MAIL hook. + + If an error occurs while checking any file, an error message will be + displayed only once, until that error clears up (or changes to a different + error), but TF will continue to check that file. To disable checking, even + after an error, you must remove the file from %{TFMAILPATH} or %{MAIL}. + + The nmail() function returns the number of monitored mail files containing + unread mail. + + MAIL and/or MAILPATH variables are usually set in the environment before TF + starts. If %{MAIL} is not set when TF starts, TF will try to set it to the + name of the system mail directory plus your user name (if the system mail + directory was defined when TF was installed). If MAILPATH (which uses ":" + as a delimiter) is set when TF starts, it is transferred to %{TFMAILPATH} + (which uses space as a delimiter). + + See: nmail(), variables, special variables, /set, mailing list. &majordomo &listserv @@ -6950,9 +6961,9 @@ mail checking mailing list - The TinyFugue mailing list is an email forum for discussion of topics - related to TinyFugue. To subscribe, follow the instructions at - http://tinyfugue.sourceforge.net/ + The TinyFugue mailing list is an email forum for discussion of topics + related to TinyFugue. To subscribe, follow the instructions at + http://tinyfugue.sourceforge.net/ &mccpv1 &mccpv2 @@ -6960,20 +6971,20 @@ mailing list Mud Client Compression Protocol - TF supports versions 1 and 2 of the Mud Client Compression Protocol (MCCP) - described at http://www.randomly.org/projects/MCCP/. MCCP allows a server - to compress the data stream it sends to the client (TF), which may improve - throughput on a poor connection. + TF supports versions 1 and 2 of the Mud Client Compression Protocol (MCCP) + described at http://www.randomly.org/projects/MCCP/. MCCP allows a server + to compress the data stream it sends to the client (TF), which may improve + throughput on a poor connection. - MCCP is transparent to the user. When TF connects to a server that supports - MCCP, it will be enabled automatically, unless the mccp variable is off. - The listsockets command will indicate that MCCP is enabled. + MCCP is transparent to the user. When TF connects to a server that supports + MCCP, it will be enabled automatically, unless the mccp variable is off. + The listsockets command will indicate that MCCP is enabled. - MCCP v1 is broken, and may not be supported in the future if it is found to - interfere with valid protocols. If you use a server that has only MCCP v1, - you should encourage the owner to upgrade to add support for v2. + MCCP v1 is broken, and may not be supported in the future if it is found to + interfere with valid protocols. If you use a server that has only MCCP v1, + you should encourage the owner to upgrade to add support for v2. - See also: protocols, telnet + See also: protocols, telnet &visual &visual mode @@ -6984,61 +6995,61 @@ Mud Client Compression Protocol mode - TinyFugue has two main interface modes: Visual and non-visual. Visual mode - will be enabled by default, unless your %{TERM} does not support it, or - %{visual} is explicitly turned off in .tfrc, or tf is started with the -v - option. Visual mode can be turned off or on with the "/visual" command. + TinyFugue has two main interface modes: Visual and non-visual. Visual mode + will be enabled by default, unless your %{TERM} does not support it, or + %{visual} is explicitly turned off in .tfrc, or tf is started with the -v + option. Visual mode can be turned off or on with the "/visual" command. #visual Visual mode - The Visual interface has two windows: the bottom window is for input, the - top for output. TF maintains a separate virtual window for each open - socket; only the foreground world's window is displayed. If your terminal - can scroll in a region, output will scroll; otherwise if your terminal can - delete and insert lines, TF will simulate scrolling; otherwise it will wrap - from bottom to top, clearing two lines ahead. The %{scroll} variable can be - set to explicitly choose scrolling or wrapping. The %{isize}, %{cleardone}, - and %{clearfull} variables can be used to customize the visual display. - See: %isize, %cleardone, %clearfull. - - The two windows are separated by a status line, which can be formatted by - the user as described under status line. - - If you are using a terminal emulator that emulates different terminal types, - the recommended type to use is vt220, vt100, or ansi (in that order), with - %{TERM} set to the same value. Scrolling may appear jumpy under ansi, but - will be smooth under vt220 and vt100. vt220 also provides some additional - features that may make command line editing smoother (especially over a slow - modem). + The Visual interface has two windows: the bottom window is for input, the + top for output. TF maintains a separate virtual window for each open + socket; only the foreground world's window is displayed. If your terminal + can scroll in a region, output will scroll; otherwise if your terminal can + delete and insert lines, TF will simulate scrolling; otherwise it will wrap + from bottom to top, clearing two lines ahead. The %{scroll} variable can be + set to explicitly choose scrolling or wrapping. The %{isize}, %{cleardone}, + and %{clearfull} variables can be used to customize the visual display. + See: %isize, %cleardone, %clearfull. + + The two windows are separated by a status line, which can be formatted by + the user as described under status line. + + If you are using a terminal emulator that emulates different terminal types, + the recommended type to use is vt220, vt100, or ansi (in that order), with + %{TERM} set to the same value. Scrolling may appear jumpy under ansi, but + will be smooth under vt220 and vt100. vt220 also provides some additional + features that may make command line editing smoother (especially over a slow + modem). #nonvisual Non-visual mode - In the non-visual interface, input and output are both displayed on the - bottom line. If you are typing and output appears, your input is cleared, - the output is displayed and everything above it scrolls, and your input is - redisplayed on the last line. If your input has wrapped around to a second - or third line, only the last line will be cleared and redisplayed. + In the non-visual interface, input and output are both displayed on the + bottom line. If you are typing and output appears, your input is cleared, + the output is displayed and everything above it scrolls, and your input is + redisplayed on the last line. If your input has wrapped around to a second + or third line, only the last line will be cleared and redisplayed. # ____________________________________________________________________________ - In both modes, the output window is redrawn whenever necessary: when its - size changes, when the mode changes, when %wrap, %wrapsize, or %wrapspace - change, or when TF resumes after /suspend or /sh. + In both modes, the output window is redrawn whenever necessary: when its + size changes, when the mode changes, when %wrap, %wrapsize, or %wrapspace + change, or when TF resumes after /suspend or /sh. - In both modes, output text is wrapped around at a right margin of one less - than the number of columns on your screen (typically 79) unless wrapping has - been turned off. In addition, when text is wrapped, all wrapped lines after - the first will be indented 4 spaces to help distinguish them from the - beginning of an original line (configurable by setting %wrapspace). See: - columns(), %wrap, %wrapsize, %wrappunct, %wrapspace. + In both modes, output text is wrapped around at a right margin of one less + than the number of columns on your screen (typically 79) unless wrapping has + been turned off. In addition, when text is wrapped, all wrapped lines after + the first will be indented 4 spaces to help distinguish them from the + beginning of an original line (configurable by setting %wrapspace). See: + columns(), %wrap, %wrapsize, %wrappunct, %wrapspace. - If the %{more} flag is on, output is suspended when the screen is full, and - you can use the TAB key to continue. See: /more, /dokey. + If the %{more} flag is on, output is suspended when the screen is full, and + you can use the TAB key to continue. See: /more, /dokey. &- &-- @@ -7046,40 +7057,40 @@ Non-visual mode options - Many commands take options to modify their behavior, following these rules - (similar to UNIX conventions, but not identical): - - * All options must be immediately preceded by '-'. - * Options may be grouped after a single '-'. - * Some options may take string, numeric, or time arguments. There - must be no space between the option and the argument. - * String option-arguments may be delimited by a space, double quotes, - single quotes, or backquotes. - * A literal delimiter character or '\' within a delimited string must - be escaped by preceding it with '\'. - * A numeric option-argument may be given as an expression that - evaluates to a numeric value. If the expression contains spaces or - quotes, they must be quoted or escaped as in a string option-argument. - * All options must precede normal arguments. - * A '-' or '--' by itself may be used to mark the end of the options. - This is useful when the first regular argument begins with '-'. - * A '-?' or invalid option will produce a list of valid options. - - See also: getopts(). + Many commands take options to modify their behavior, following these rules + (similar to UNIX conventions, but not identical): + + * All options must be immediately preceded by '-'. + * Options may be grouped after a single '-'. + * Some options may take string, numeric, or time arguments. There + must be no space between the option and the argument. + * String option-arguments may be delimited by a space, double quotes, + single quotes, or back quotes. + * A literal delimiter character or '\' within a delimited string must + be escaped by preceding it with '\'. + * A numeric option-argument may be given as an expression that + evaluates to a numeric value. If the expression contains spaces or + quotes, they must be quoted or escaped as in a string option-argument. + * All options must precede normal arguments. + * A '-' or '--' by itself may be used to mark the end of the options. + This is useful when the first regular argument begins with '-'. + * A '-?' or invalid option will produce a list of valid options. + + See also: getopts(). &patterns patterns - Patterns are used throughout TF, including triggers, hooks, /purge, /list, - /limit, /recall, and expressions. There are four styles of pattern matching - available: - simple target string and pattern string must be identical - glob similar to shell filename patterns - regexp perl-compatible regular expressions - substr target string must contain pattern string - The style used by a particular command is determined either by the use of - the -m option or the setting of the global variable %{matching}. + Patterns are used throughout TF, including triggers, hooks, /purge, /list, + /limit, /recall, and expressions. There are four styles of pattern matching + available: + simple target string and pattern string must be identical + glob similar to shell filename patterns + regexp perl-compatible regular expressions + substr target string must contain pattern string + The style used by a particular command is determined either by the use of + the -m option or the setting of the global variable %{matching}. #comparison #simple @@ -7087,16 +7098,16 @@ patterns Simple matching ("simple") - The pattern is compared directly to the string. There are no special - characters. Case is significant. + The pattern is compared directly to the string. There are no special + characters. Case is significant. #substr #contain Substring matching ("substr") - The string must contain the pattern. There are no special characters. Case - is significant. + The string must contain the pattern. There are no special characters. Case + is significant. #smatch #globbing @@ -7104,48 +7115,48 @@ Substring matching ("substr") Globbing ("glob") - Globbing is the default matching style, and was the only style available - before version 3.2. It is similar to filename expansion ("globbing") used - by many shells (but unlike shells, tf uses glob only for comparison, not - expansion). + Globbing is the default matching style, and was the only style available + before version 3.2. It is similar to filename expansion ("globbing") used + by many shells (but unlike shells, tf uses glob only for comparison, not + expansion). - There are several special sequences that can be used in tf globbing: + There are several special sequences that can be used in tf globbing: - * The '*' character matches any number of characters. + * The '*' character matches any number of characters. - * The '?' character matches any one character. + * The '?' character matches any one character. - * Square brackets ([...]) can be used to match any one of a sequence - of characters. Ranges can be specified by giving the first and last - characters with a '-' between them. If '^' is the first character, the - sequence will match any character NOT specified. + * Square brackets ([...]) can be used to match any one of a sequence + of characters. Ranges can be specified by giving the first and last + characters with a '-' between them. If '^' is the first character, the + sequence will match any character NOT specified. - * Curly braces ({...}) can be used to match any one of a list of - words. Different words can be matched by listing each within the - braces, separated by a '|' (or) character. Both ends of {...} will only - match a space or end of string. Therefore "{foo}*" and "{foo}p" do not - match "foop", and "*{foo}" and "p{foo}" do not match "pfoo". + * Curly braces ({...}) can be used to match any one of a list of + words. Different words can be matched by listing each within the + braces, separated by a '|' (or) character. Both ends of {...} will only + match a space or end of string. Therefore "{foo}*" and "{foo}p" do not + match "foop", and "*{foo}" and "p{foo}" do not match "pfoo". - Patterns containing "{...}" can easily be meaningless. A valid {...} - pattern must: (a) contain no spaces, (b) follow a wildcard, space, or - beginning of string, (c) be followed by a wildcard, space, or end of - string. + Patterns containing "{...}" can easily be meaningless. A valid {...} + pattern must: (a) contain no spaces, (b) follow a wildcard, space, or + beginning of string, (c) be followed by a wildcard, space, or end of + string. - The pattern "{}" will match the empty string. + The pattern "{}" will match the empty string. - * Any other character will match itself, ignoring case. A special - character can be made to match itself by preceding it with '\' to remove - its special meaning. + * Any other character will match itself, ignoring case. A special + character can be made to match itself by preceding it with '\' to remove + its special meaning. Examples: - "d?g" matches "dog", "dig" and "dug" but not "dg" or "drug". - "d*g" matches "dg", "dog", "drug", "debug", "dead slug", etc. - "{d*g}" matches "dg", "dog", "drug", "debug", but not "dead slug". + "d?g" matches "dog", "dig" and "dug" but not "dg" or "drug". + "d*g" matches "dg", "dog", "drug", "debug", "dead slug", etc. + "{d*g}" matches "dg", "dog", "drug", "debug", but not "dead slug". "M[rs]." matches "Mr." and "Ms." - "M[a-z]" matches "Ma", "Mb", "Mc", etc. - "[^a-z]" matches any character that is not in the English alphabet. - "{storm|chup*}*" matches "chupchup fehs" and "Storm jiggles". - "{storm|chup*}*" does NOT match "stormette jiggles". + "M[a-z]" matches "Ma", "Mb", "Mc", etc. + "[^a-z]" matches any character that is not in the English alphabet. + "{storm|chup*}*" matches "chupchup fehs" and "Storm jiggles". + "{storm|chup*}*" does NOT match "stormette jiggles". #re #regex @@ -7155,44 +7166,44 @@ Globbing ("glob") Regular expressions ("regexp") - TF implements regular expressions with the package PCRE 2.08, Copyright (c) - 1997-1999 University of Cambridge. The PCRE regexp syntax is documented on - its own page under the topic "pcre". + TF implements regular expressions with the package PCRE 2.08, Copyright (c) + 1997-1999 University of Cambridge. The PCRE regexp syntax is documented on + its own page under the topic "pcre". - The syntax and semantics of these regular expressions is nearly identical to - those in perl 5, and is roughly a superset of those used in versions of tf - prior to 5.0. There is one incompatability with old tf regexps: the "{" - character is now special, and must be written "\{" to match a literal "{". - To help with the transition to the new syntax, you will be warned if you use - a regexp containing "{", unless you turn off the warn_curly_re variable. + The syntax and semantics of these regular expressions is nearly identical to + those in perl 5, and is roughly a superset of those used in versions of tf + prior to 5.0. There is one incompatibility with old tf regexps: the "{" + character is now special, and must be written "\{" to match a literal "{". + To help with the transition to the new syntax, you will be warned if you use + a regexp containing "{", unless you turn off the warn_curly_re variable. - If all letters in a regexp are lower case, the regexp will default to using - caseless matching. If a regexp contains any upper case letters, it will - default to case-sensitive matching. Of course, you can explicitly specify - caseless matching by including "(?i)" at the beginning of the regexp, or - case-sensitive by including "(?-i)". + If all letters in a regexp are lower case, the regexp will default to using + caseless matching. If a regexp contains any upper case letters, it will + default to case-sensitive matching. Of course, you can explicitly specify + caseless matching by including "(?i)" at the beginning of the regexp, or + case-sensitive by including "(?-i)". - Regexps will honor the locale that was set when the regexp was defined. - Locale affects caseless matching, and determines whether characters are - letters, digits, or whatever. So, for example, while the regexp "[A-Za-z]" - will match only English letters, "[^\W\d_]" will match any letter defined by - the locale. + Regexps will honor the locale that was set when the regexp was defined. + Locale affects caseless matching, and determines whether characters are + letters, digits, or whatever. So, for example, while the regexp "[A-Za-z]" + will match only English letters, "[^\W\d_]" will match any letter defined by + the locale. - After a regexp match, %Pn substitutions can be used to get the value of the - string that matched various parts of the regexp. See %Pn. + After a regexp match, %Pn substitutions can be used to get the value of the + string that matched various parts of the regexp. See %Pn. - For those of you who care about code details: TF compiles PCRE regexps with - the PCRE_DOLLAR_ENDONLY and PCRE_DOTALL options. + For those of you who care about code details: TF compiles PCRE regexps with + the PCRE_DOLLAR_ENDONLY and PCRE_DOTALL options. - See also: regmatch(), substitution. + See also: regmatch(), substitution. -Comparison of glob and regexps. +Comparison of glob and regexps. - In a glob, '*' and '?' by themselves match text. In a regexp, '*' and '?' - are only meaningful in combination with the pattern they follow. Regexps - are not "anchored"; that is, the match may occur anywhere in the string, - unless you explicitly use '^' and/or '$' to anchor it. Globs are anchored, - and must match the entire string. + In a glob, '*' and '?' by themselves match text. In a regexp, '*' and '?' + are only meaningful in combination with the pattern they follow. Regexps + are not "anchored"; that is, the match may occur anywhere in the string, + unless you explicitly use '^' and/or '$' to anchor it. Globs are anchored, + and must match the entire string. regexp equivalent glob ------ ----------------- @@ -7209,54 +7220,54 @@ Comparison of glob and regexps. "foo ?bar" none "(foo bar|frodo)" none -Notes. +Notes. - * For best performance, make the beginning of your patterns as - specific as possible. - * Do not use ".*" or "^.*" at the beginning of a regexp. It is very - inefficient, and not needed. Use %PL instead if you need to retrieve - the substring to the left of the match. - * If a glob and regexp can do the same job, the glob is usually - slightly faster. But if using a glob instead of a regexp would mean you - need some extra code, then that extra code will cost much more than the - regexp would have. So if only a regexp can do what you need, don't - hesitate to use it. + * For best performance, make the beginning of your patterns as + specific as possible. + * Do not use ".*" or "^.*" at the beginning of a regexp. It is very + inefficient, and not needed. Use %PL instead if you need to retrieve + the substring to the left of the match. + * If a glob and regexp can do the same job, the glob is usually + slightly faster. But if using a glob instead of a regexp would mean you + need some extra code, then that extra code will cost much more than the + regexp would have. So if only a regexp can do what you need, don't + hesitate to use it. &pcre &pcre syntax - This document was extracted from the pcre.3.html documentation, Copyright - (c) 1997-1999 University of Cambridge, and minimally adapted for use in - TinyFugue. + This document was extracted from the pcre.3.html documentation, Copyright + (c) 1997-1999 University of Cambridge, and minimally adapted for use in + TinyFugue. - * + * #SEC13 - REGULAR EXPRESSION DETAILS + REGULAR EXPRESSION DETAILS - The syntax and semantics of the regular expressions supported by PCRE - are described below. Regular expressions are also described in the Perl - documentation and in a number of other books, some of which have copious - examples. Jeffrey Friedl's "Mastering Regular Expressions", published - by O'Reilly (ISBN 1-56592-257-3), covers them in great detail. The - description here is intended as reference documentation. + The syntax and semantics of the regular expressions supported by PCRE + are described below. Regular expressions are also described in the Perl + documentation and in a number of other books, some of which have copious + examples. Jeffrey Friedl's "Mastering Regular Expressions", published + by O'Reilly (ISBN 1-56592-257-3), covers them in great detail. The + description here is intended as reference documentation. - A regular expression is a pattern that is matched against a subject - string from left to right. Most characters stand for themselves in a - pattern, and match the corresponding characters in the subject. As a - trivial example, the pattern + A regular expression is a pattern that is matched against a subject + string from left to right. Most characters stand for themselves in a + pattern, and match the corresponding characters in the subject. As a + trivial example, the pattern The quick brown fox - matches a portion of a subject string that is identical to itself. The - power of regular expressions comes from the ability to include - alternatives and repetitions in the pattern. These are encoded in the - pattern by the use of <meta-characters>, which do not stand for - themselves but instead are interpreted in some special way. + matches a portion of a subject string that is identical to itself. The + power of regular expressions comes from the ability to include + alternatives and repetitions in the pattern. These are encoded in the + pattern by the use of <meta-characters>, which do not stand for + themselves but instead are interpreted in some special way. - There are two different sets of meta-characters: those that are - recognized anywhere in the pattern except within square brackets, and - those that are recognized in square brackets. Outside square brackets, - the meta-characters are as follows: + There are two different sets of meta-characters: those that are + recognized anywhere in the pattern except within square brackets, and + those that are recognized in square brackets. Outside square brackets, + the meta-characters are as follows: \ general escape character with several uses @@ -7274,8 +7285,8 @@ Notes. + 1 or more quantifier { start min/max quantifier - Part of a pattern that is in square brackets is called a "character - class". In a character class the only meta-characters are: + Part of a pattern that is in square brackets is called a "character + class". In a character class the only meta-characters are: \ general escape character @@ -7283,34 +7294,34 @@ Notes. - indicates character range ] terminates the character class - The following sections describe the use of each of the meta-characters. - * + The following sections describe the use of each of the meta-characters. + * #SEC14 - BACKSLASH + BACKSLASH - The backslash character has several uses. Firstly, if it is followed by - a non-alphameric character, it takes away any special meaning that - character may have. This use of backslash as an escape character - applies both inside and outside character classes. + The backslash character has several uses. Firstly, if it is followed by + a non-alphanumeric character, it takes away any special meaning that + character may have. This use of backslash as an escape character + applies both inside and outside character classes. - For example, if you want to match a "*" character, you write "\*" in the - pattern. This applies whether or not the following character would - otherwise be interpreted as a meta-character, so it is always safe to - precede a non-alphameric with "\" to specify that it stands for itself. - In particular, if you want to match a backslash, you write "\\". + For example, if you want to match a "*" character, you write "\*" in the + pattern. This applies whether or not the following character would + otherwise be interpreted as a meta-character, so it is always safe to + precede a non-alphanumeric with "\" to specify that it stands for itself. + In particular, if you want to match a backslash, you write "\\". - If a pattern is compiled with the "x" (PCRE_EXTRA) option, whitespace in - the pattern (other than in a character class) and characters between a - "#" outside a character class and the next newline character are - ignored. An escaping backslash can be used to include a whitespace or - "#" character as part of the pattern. + If a pattern is compiled with the "x" (PCRE_EXTRA) option, whitespace in + the pattern (other than in a character class) and characters between a + "#" outside a character class and the next newline character are + ignored. An escaping backslash can be used to include a whitespace or + "#" character as part of the pattern. - A second use of backslash provides a way of encoding non-printing - characters in patterns in a visible manner. There is no restriction on - the appearance of non-printing characters, apart from the binary zero - that terminates a pattern, but when a pattern is being prepared by text - editing, it is usually easier to use one of the following escape - sequences than the binary character it represents: + A second use of backslash provides a way of encoding non-printing + characters in patterns in a visible manner. There is no restriction on + the appearance of non-printing characters, apart from the binary zero + that terminates a pattern, but when a pattern is being prepared by text + editing, it is usually easier to use one of the following escape + sequences than the binary character it represents: \a alarm, that is, the BEL character (hex 07) @@ -7323,33 +7334,33 @@ Notes. \xhh character with hex code hh \ddd character with octal code ddd, or backreference - The precise effect of "\cx" is as follows: if "x" is a lower case - letter, it is converted to upper case. Then bit 6 of the character (hex - 40) is inverted. Thus "\cz" becomes hex 1A, but "\c{" becomes hex 3B, - while "\c;" becomes hex 7B. + The precise effect of "\cx" is as follows: if "x" is a lower case + letter, it is converted to upper case. Then bit 6 of the character (hex + 40) is inverted. Thus "\cz" becomes hex 1A, but "\c{" becomes hex 3B, + while "\c;" becomes hex 7B. - After "\x", up to two hexadecimal digits are read (letters can be in - upper or lower case). + After "\x", up to two hexadecimal digits are read (letters can be in + upper or lower case). - After "\0" up to two further octal digits are read. In both cases, if - there are fewer than two digits, just those that are present are used. - Thus the sequence "\0\x\07" specifies two binary zeros followed by a BEL - character. Make sure you supply two digits after the initial zero if - the character that follows is itself an octal digit. + After "\0" up to two further octal digits are read. In both cases, if + there are fewer than two digits, just those that are present are used. + Thus the sequence "\0\x\07" specifies two binary zeros followed by a BEL + character. Make sure you supply two digits after the initial zero if + the character that follows is itself an octal digit. - The handling of a backslash followed by a digit other than 0 is - complicated. Outside a character class, PCRE reads it and any following - digits as a decimal number. If the number is less than 10, or if there - have been at least that many previous capturing left parentheses in the - expression, the entire sequence is taken as a <back reference>. A - description of how this works is given later, following the discussion - of parenthesized subpatterns. + The handling of a backslash followed by a digit other than 0 is + complicated. Outside a character class, PCRE reads it and any following + digits as a decimal number. If the number is less than 10, or if there + have been at least that many previous capturing left parentheses in the + expression, the entire sequence is taken as a <back reference>. A + description of how this works is given later, following the discussion + of parenthesized subpatterns. - Inside a character class, or if the decimal number is greater than 9 and - there have not been that many capturing subpatterns, PCRE re-reads up to - three octal digits following the backslash, and generates a single byte - from the least significant 8 bits of the value. Any subsequent digits - stand for themselves. For example: + Inside a character class, or if the decimal number is greater than 9 and + there have not been that many capturing subpatterns, PCRE re-reads up to + three octal digits following the backslash, and generates a single byte + from the least significant 8 bits of the value. Any subsequent digits + stand for themselves. For example: \040 is another way of writing a space @@ -7366,15 +7377,15 @@ Notes. \81 is either a back reference, or a binary zero followed by the two characters "8" and "1" - Note that octal values of 100 or greater must not be introduced by a - leading zero, because no more than three octal digits are ever read. + Note that octal values of 100 or greater must not be introduced by a + leading zero, because no more than three octal digits are ever read. - All the sequences that define a single byte value can be used both - inside and outside character classes. In addition, inside a character - class, the sequence "\b" is interpreted as the backspace character (hex - 08). Outside a character class it has a different meaning (see below). + All the sequences that define a single byte value can be used both + inside and outside character classes. In addition, inside a character + class, the sequence "\b" is interpreted as the backspace character (hex + 08). Outside a character class it has a different meaning (see below). - The third use of backslash is for specifying generic character types: + The third use of backslash is for specifying generic character types: \d any decimal digit @@ -7384,28 +7395,28 @@ Notes. \w any "word" character \W any "non-word" character - Each pair of escape sequences partitions the complete set of characters - into two disjoint sets. Any given character matches one, and only one, - of each pair. + Each pair of escape sequences partitions the complete set of characters + into two disjoint sets. Any given character matches one, and only one, + of each pair. - A "word" character is any letter or digit or the underscore character, - that is, any character which can be part of a Perl "word". The - definition of letters and digits is controlled by PCRE's character - tables, and may vary if locale- specific matching is taking place (see - "Locale support" above). For example, in the "fr" (French) locale, some - character codes greater than 128 are used for accented letters, and - these are matched by \w. + A "word" character is any letter or digit or the underscore character, + that is, any character which can be part of a Perl "word". The + definition of letters and digits is controlled by PCRE's character + tables, and may vary if locale- specific matching is taking place (see + "Locale support" above). For example, in the "fr" (French) locale, some + character codes greater than 128 are used for accented letters, and + these are matched by \w. - These character type sequences can appear both inside and outside - character classes. They each match one character of the appropriate - type. If the current matching point is at the end of the subject - string, all of them fail, since there is no character to match. + These character type sequences can appear both inside and outside + character classes. They each match one character of the appropriate + type. If the current matching point is at the end of the subject + string, all of them fail, since there is no character to match. - The fourth use of backslash is for certain simple assertions. An - assertion specifies a condition that has to be met at a particular point - in a match, without consuming any characters from the subject string. - The use of subpatterns for more complicated assertions is described - below. The backslashed assertions are + The fourth use of backslash is for certain simple assertions. An + assertion specifies a condition that has to be met at a particular point + in a match, without consuming any characters from the subject string. + The use of subpatterns for more complicated assertions is described + below. The backslashed assertions are \b word boundary @@ -7414,140 +7425,140 @@ Notes. \Z end of subject (same as "$" in tf) \z end of subject (same as "$" in tf) - These assertions may not appear in character classes (but note that "\b" - has a different meaning, namely the backspace character, inside a - character class). + These assertions may not appear in character classes (but note that "\b" + has a different meaning, namely the backspace character, inside a + character class). - A word boundary is a position in the subject string where the current - character and the previous character do not both match \w or \W (i.e. - one matches \w and the other matches \W), or the start or end of the - string if the first or last character matches \w, respectively. - * + A word boundary is a position in the subject string where the current + character and the previous character do not both match \w or \W (i.e. + one matches \w and the other matches \W), or the start or end of the + string if the first or last character matches \w, respectively. + * #SEC15 - CIRCUMFLEX AND DOLLAR - - Outside a character class, in the default matching mode, the circumflex - character is an assertion which is true only if the current matching - point is at the start of the subject string. Inside a character class, - circumflex has an entirely different meaning (see below). - - Circumflex need not be the first character of the pattern if a number of - alternatives are involved, but it should be the first thing in each - alternative in which it appears if the pattern is ever to match that - branch. If all possible alternatives start with a circumflex, that is, - if the pattern is constrained to match only at the start of the subject, - it is said to be an "anchored" pattern. (There are also other - constructs that can cause a pattern to be anchored.) - - A dollar character is an assertion which is true only if the current - matching point is at the end of the subject string. Dollar need not be - the last character of the pattern if a number of alternatives are - involved, but it should be the last item in any branch in which it - appears. Dollar has no special meaning in a character class. - * + CIRCUMFLEX AND DOLLAR + + Outside a character class, in the default matching mode, the circumflex + character is an assertion which is true only if the current matching + point is at the start of the subject string. Inside a character class, + circumflex has an entirely different meaning (see below). + + Circumflex need not be the first character of the pattern if a number of + alternatives are involved, but it should be the first thing in each + alternative in which it appears if the pattern is ever to match that + branch. If all possible alternatives start with a circumflex, that is, + if the pattern is constrained to match only at the start of the subject, + it is said to be an "anchored" pattern. (There are also other + constructs that can cause a pattern to be anchored.) + + A dollar character is an assertion which is true only if the current + matching point is at the end of the subject string. Dollar need not be + the last character of the pattern if a number of alternatives are + involved, but it should be the last item in any branch in which it + appears. Dollar has no special meaning in a character class. + * #SEC17 - SQUARE BRACKETS - - An opening square bracket introduces a character class, terminated by a - closing square bracket. A closing square bracket on its own is not - special. If a closing square bracket is required as a member of the - class, it should be the first data character in the class (after an - initial circumflex, if present) or escaped with a backslash. - - A character class matches a single character in the subject; the - character must be in the set of characters defined by the class, unless - the first character in the class is a circumflex, in which case the - subject character must not be in the set defined by the class. If a - circumflex is actually required as a member of the class, ensure it is - not the first character, or escape it with a backslash. - - For example, the character class [aeiou] matches any lower case vowel, - while [^aeiou] matches any character that is not a lower case vowel. - Note that a circumflex is just a convenient notation for specifying the - characters which are in the class by enumerating those that are not. It - is not an assertion: it still consumes a character from the subject - string, and fails if the current pointer is at the end of the string. - - When caseless matching is set, any letters in a class represent both - their upper case and lower case versions, so for example, a caseless - [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not - match "A", whereas a caseful version would. - - The minus (hyphen) character can be used to specify a range of - characters in a character class. For example, [d-m] matches any letter - between d and m, inclusive. If a minus character is required in a - class, it must be escaped with a backslash or appear in a position where - it cannot be interpreted as indicating a range, typically as the first - or last character in the class. - - It is not possible to have the literal character "]" as the end - character of a range. A pattern such as [W-]46] is interpreted as a - class of two characters ("W" and "-") followed by a literal string - "46]", so it would match "W46]" or "-46]". However, if the "]" is - escaped with a backslash it is interpreted as the end of range, so - [W-\]46] is interpreted as a single class containing a range followed by - two separate characters. The octal or hexadecimal representation of "]" - can also be used to end a range. - - Ranges operate in ASCII collating sequence. They can also be used for - characters specified numerically, for example [\000-\037]. If a range - that includes letters is used when caseless matching is set, it matches - the letters in either case. For example, [W-c] is equivalent to - [][\^_`wxyzabc], matched caselessly, and if character tables for the - "fr" locale are in use, [\xc8-\xcb] matches accented E characters in - both cases. - - The character types \d, \D, \s, \S, \w, and \W may also appear in a - character class, and add the characters that they match to the class. - For example, [\dABCDEF] matches any hexadecimal digit. A circumflex can - conveniently be used with the upper case character types to specify a - more restricted set of characters than the matching lower case type. - For example, the class [^\W_] matches any letter or digit, but not - underscore. - - All non-alphameric characters other than \, -, ^ (at the start) and the - terminating ] are non-special in character classes, but it does no harm - if they are escaped. - * + SQUARE BRACKETS + + An opening square bracket introduces a character class, terminated by a + closing square bracket. A closing square bracket on its own is not + special. If a closing square bracket is required as a member of the + class, it should be the first data character in the class (after an + initial circumflex, if present) or escaped with a backslash. + + A character class matches a single character in the subject; the + character must be in the set of characters defined by the class, unless + the first character in the class is a circumflex, in which case the + subject character must not be in the set defined by the class. If a + circumflex is actually required as a member of the class, ensure it is + not the first character, or escape it with a backslash. + + For example, the character class [aeiou] matches any lower case vowel, + while [^aeiou] matches any character that is not a lower case vowel. + Note that a circumflex is just a convenient notation for specifying the + characters which are in the class by enumerating those that are not. It + is not an assertion: it still consumes a character from the subject + string, and fails if the current pointer is at the end of the string. + + When caseless matching is set, any letters in a class represent both + their upper case and lower case versions, so for example, a caseless + [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not + match "A", whereas a caseful version would. + + The minus (hyphen) character can be used to specify a range of + characters in a character class. For example, [d-m] matches any letter + between d and m, inclusive. If a minus character is required in a + class, it must be escaped with a backslash or appear in a position where + it cannot be interpreted as indicating a range, typically as the first + or last character in the class. + + It is not possible to have the literal character "]" as the end + character of a range. A pattern such as [W-]46] is interpreted as a + class of two characters ("W" and "-") followed by a literal string + "46]", so it would match "W46]" or "-46]". However, if the "]" is + escaped with a backslash it is interpreted as the end of range, so + [W-\]46] is interpreted as a single class containing a range followed by + two separate characters. The octal or hexadecimal representation of "]" + can also be used to end a range. + + Ranges operate in ASCII collating sequence. They can also be used for + characters specified numerically, for example [\000-\037]. If a range + that includes letters is used when caseless matching is set, it matches + the letters in either case. For example, [W-c] is equivalent to + [][\^_`wxyzabc], matched caselessly, and if character tables for the + "fr" locale are in use, [\xc8-\xcb] matches accented E characters in + both cases. + + The character types \d, \D, \s, \S, \w, and \W may also appear in a + character class, and add the characters that they match to the class. + For example, [\dABCDEF] matches any hexadecimal digit. A circumflex can + conveniently be used with the upper case character types to specify a + more restricted set of characters than the matching lower case type. + For example, the class [^\W_] matches any letter or digit, but not + underscore. + + All non-alphanumeric characters other than \, -, ^ (at the start) and the + terminating ] are non-special in character classes, but it does no harm + if they are escaped. + * #SEC18 - VERTICAL BAR + VERTICAL BAR - Vertical bar characters are used to separate alternative patterns. For - example, the pattern + Vertical bar characters are used to separate alternative patterns. For + example, the pattern gilbert|sullivan - matches either "gilbert" or "sullivan". Any number of alternatives may - appear, and an empty alternative is permitted (matching the empty - string). The matching process tries each alternative in turn, from left - to right, and the first one that succeeds is used. If the alternatives - are within a subpattern (defined below), "succeeds" means matching the - rest of the main pattern as well as the alternative in the subpattern. - * + matches either "gilbert" or "sullivan". Any number of alternatives may + appear, and an empty alternative is permitted (matching the empty + string). The matching process tries each alternative in turn, from left + to right, and the first one that succeeds is used. If the alternatives + are within a subpattern (defined below), "succeeds" means matching the + rest of the main pattern as well as the alternative in the subpattern. + * #SEC19 - INTERNAL OPTION SETTING + INTERNAL OPTION SETTING - The settings of PCRE_CASELESS, PCRE_EXTENDED, and PCRE_UNGREEDY can be - changed from within the pattern by a sequence of Perl option letters - enclosed between "(?" and ")". The option letters are + The settings of PCRE_CASELESS, PCRE_EXTENDED, and PCRE_UNGREEDY can be + changed from within the pattern by a sequence of Perl option letters + enclosed between "(?" and ")". The option letters are i for PCRE_CASELESS x for PCRE_EXTENDED U for PCRE_UNGREEDY (not in perl) - For example, (?x) sets extended matching. It is also possible to unset - these options by preceding the letter with a hyphen, and a combined - setting and unsetting such as (?x-i), which sets extended and while - unsetting caseless, is also permitted. If a letter appears both before - and after the hyphen, the option is unset. + For example, (?x) sets extended matching. It is also possible to unset + these options by preceding the letter with a hyphen, and a combined + setting and unsetting such as (?x-i), which sets extended and while + unsetting caseless, is also permitted. If a letter appears both before + and after the hyphen, the option is unset. - The scope of these option changes depends on where in the pattern the - setting occurs. For settings that are outside any subpattern (defined - below), the effect is the same as if the options were set or unset at - the start of matching. The following patterns all behave in exactly the - same way: + The scope of these option changes depends on where in the pattern the + setting occurs. For settings that are outside any subpattern (defined + below), the effect is the same as if the options were set or unset at + the start of matching. The following patterns all behave in exactly the + same way: (?i)ABC @@ -7555,95 +7566,95 @@ Notes. AB(?i)C ABC(?i) - Such "top level" settings apply to the whole pattern (unless there are - other changes inside subpatterns). If there is more than one setting of - the same option at top level, the rightmost setting is used. + Such "top level" settings apply to the whole pattern (unless there are + other changes inside subpatterns). If there is more than one setting of + the same option at top level, the rightmost setting is used. - If an option change occurs inside a subpattern, the effect is different. - This is a change of behaviour in Perl 5.005. An option change inside a - subpattern affects only that part of the subpattern that follows it, so + If an option change occurs inside a subpattern, the effect is different. + This is a change of behavior in Perl 5.005. An option change inside a + subpattern affects only that part of the subpattern that follows it, so (a(?-i)b)c - matches abc, Abc, abC and AbC, and no other strings (remember, in tf, - regexps are caseless by default if they do not contain any capital - letters). By this means, options can be made to have different settings - in different parts of the pattern. Any changes made in one alternative - do carry on into subsequent branches within the same subpattern. For - example, + matches abc, Abc, abC and AbC, and no other strings (remember, in tf, + regexps are caseless by default if they do not contain any capital + letters). By this means, options can be made to have different settings + in different parts of the pattern. Any changes made in one alternative + do carry on into subsequent branches within the same subpattern. For + example, X(a(?i)b|c) - matches "Xab", "XaB", "Xc", and "XC", even though when matching "C" the - first branch is abandoned before the option setting. This is because - the effects of option settings happen at compile time. There would be - some very weird behaviour otherwise. - * + matches "Xab", "XaB", "Xc", and "XC", even though when matching "C" the + first branch is abandoned before the option setting. This is because + the effects of option settings happen at compile time. There would be + some very weird behavior otherwise. + * #SEC20 - SUBPATTERNS + SUBPATTERNS - Subpatterns are delimited by parentheses (round brackets), which can be - nested. Marking part of a pattern as a subpattern does two things: + Subpatterns are delimited by parentheses (round brackets), which can be + nested. Marking part of a pattern as a subpattern does two things: - 1. It localizes a set of alternatives. For example, the pattern + 1. It localizes a set of alternatives. For example, the pattern cat(aract|erpillar|) - matches one of the words "cat", "cataract", or "caterpillar". Without - the parentheses, it would match "cataract", "erpillar" or the empty - string. + matches one of the words "cat", "cataract", or "caterpillar". Without + the parentheses, it would match "cataract", "erpillar" or the empty + string. - 2. It sets up the subpattern as a capturing subpattern (as defined - above). When the whole pattern matches, that portion of the subject - string that matched the subpattern is remembered for the TinyFugue %Pn - substitutions. Opening parentheses are counted from left to right - (starting from 1) to obtain the numbers of the capturing subpatterns. + 2. It sets up the subpattern as a capturing subpattern (as defined + above). When the whole pattern matches, that portion of the subject + string that matched the subpattern is remembered for the TinyFugue %Pn + substitutions. Opening parentheses are counted from left to right + (starting from 1) to obtain the numbers of the capturing subpatterns. - For example, if the string "the red king" is matched against the pattern + For example, if the string "the red king" is matched against the pattern the ((red|white) (king|queen)) - the captured substrings are "red king", "red", and "king", and are - numbered 1, 2, and 3. + the captured substrings are "red king", "red", and "king", and are + numbered 1, 2, and 3. - The fact that plain parentheses fulfil two functions is not always - helpful. There are often times when a grouping subpattern is required - without a capturing requirement. If an opening parenthesis is followed - by "?:", the subpattern does not do any capturing, and is not counted - when computing the number of any subsequent capturing subpatterns. For - example, if the string "the white queen" is matched against the pattern + The fact that plain parentheses fulfill two functions is not always + helpful. There are often times when a grouping subpattern is required + without a capturing requirement. If an opening parenthesis is followed + by "?:", the subpattern does not do any capturing, and is not counted + when computing the number of any subsequent capturing subpatterns. For + example, if the string "the white queen" is matched against the pattern the ((?:red|white) (king|queen)) - the captured substrings are "white queen" and "queen", and are numbered - 1 and 2. The maximum number of captured substrings is 99, and the - maximum number of all subpatterns, both capturing and non-capturing, is - 200. + the captured substrings are "white queen" and "queen", and are numbered + 1 and 2. The maximum number of captured substrings is 99, and the + maximum number of all subpatterns, both capturing and non-capturing, is + 200. - As a convenient shorthand, if any option settings are required at the - start of a non-capturing subpattern, the option letters may appear - between the "?" and the ":". Thus the two patterns + As a convenient shorthand, if any option settings are required at the + start of a non-capturing subpattern, the option letters may appear + between the "?" and the ":". Thus the two patterns (?i:saturday|sunday) (?:(?i)saturday|sunday) - match exactly the same set of strings. Because alternative branches are - tried from left to right, and options are not reset until the end of the - subpattern is reached, an option setting in one branch does affect - subsequent branches, so the above patterns match "SUNDAY" as well as - "Saturday". - * + match exactly the same set of strings. Because alternative branches are + tried from left to right, and options are not reset until the end of the + subpattern is reached, an option setting in one branch does affect + subsequent branches, so the above patterns match "SUNDAY" as well as + "Saturday". + * #SEC21 - REPETITION + REPETITION - Repetition is specified by quantifiers, which can follow any of the - following items: + Repetition is specified by quantifiers, which can follow any of the + following items: a single character, possibly escaped @@ -7652,511 +7663,511 @@ Notes. a back reference (see next section) a parenthesized subpattern (unless it is an assertion - see below) - The general repetition quantifier specifies a minimum and maximum number - of permitted matches, by giving the two numbers in curly brackets - (braces), separated by a comma. The numbers must be less than 65536, - and the first must be less than or equal to the second. For example: + The general repetition quantifier specifies a minimum and maximum number + of permitted matches, by giving the two numbers in curly brackets + (braces), separated by a comma. The numbers must be less than 65536, + and the first must be less than or equal to the second. For example: z{2,4} - matches "zz", "zzz", or "zzzz". A closing brace on its own is not a - special character. If the second number is omitted, but the comma is - present, there is no upper limit; if the second number and the comma are - both omitted, the quantifier specifies an exact number of required - matches. Thus + matches "zz", "zzz", or "zzzz". A closing brace on its own is not a + special character. If the second number is omitted, but the comma is + present, there is no upper limit; if the second number and the comma are + both omitted, the quantifier specifies an exact number of required + matches. Thus [aeiou]{3,} - matches at least 3 successive vowels, but may match many more, while + matches at least 3 successive vowels, but may match many more, while \d{8} - matches exactly 8 digits. An opening curly bracket that appears in a - position where a quantifier is not allowed, or one that does not match - the syntax of a quantifier, is taken as a literal character. For - example, {,6} is not a quantifier, but a literal string of four - characters. + matches exactly 8 digits. An opening curly bracket that appears in a + position where a quantifier is not allowed, or one that does not match + the syntax of a quantifier, is taken as a literal character. For + example, {,6} is not a quantifier, but a literal string of four + characters. - The quantifier {0} is permitted, causing the expression to behave as if - the previous item and the quantifier were not present. + The quantifier {0} is permitted, causing the expression to behave as if + the previous item and the quantifier were not present. - For convenience (and historical compatibility) the three most common - quantifiers have single-character abbreviations: + For convenience (and historical compatibility) the three most common + quantifiers have single-character abbreviations: * is equivalent to {0,} + is equivalent to {1,} ? is equivalent to {0,1} - It is possible to construct infinite loops by following a subpattern - that can match no characters with a quantifier that has no upper limit, - for example: + It is possible to construct infinite loops by following a subpattern + that can match no characters with a quantifier that has no upper limit, + for example: (a?)* - Earlier versions of Perl and PCRE used to give an error at compile time - for such patterns. However, because there are cases where this can be - useful, such patterns are now accepted, but if any repetition of the - subpattern does in fact match no characters, the loop is forcibly - broken. + Earlier versions of Perl and PCRE used to give an error at compile time + for such patterns. However, because there are cases where this can be + useful, such patterns are now accepted, but if any repetition of the + subpattern does in fact match no characters, the loop is forcibly + broken. - By default, the quantifiers are "greedy", that is, they match as much as - possible (up to the maximum number of permitted times), without causing - the rest of the pattern to fail. The classic example of where this - gives problems is in trying to match comments in C programs. These - appear between the sequences /* and */ and within the sequence, - individual * and / characters may appear. An attempt to match C - comments by applying the pattern + By default, the quantifiers are "greedy", that is, they match as much as + possible (up to the maximum number of permitted times), without causing + the rest of the pattern to fail. The classic example of where this + gives problems is in trying to match comments in C programs. These + appear between the sequences /* and */ and within the sequence, + individual * and / characters may appear. An attempt to match C + comments by applying the pattern /\*.*\*/ - to the string + to the string /* first command */ not comment /* second comment */ - fails, because it matches the entire string due to the greediness of the - .* item. + fails, because it matches the entire string due to the greediness of the + .* item. - However, if a quantifier is followed by a question mark, then it ceases - to be greedy, and instead matches the minimum number of times possible, - so the pattern + However, if a quantifier is followed by a question mark, then it ceases + to be greedy, and instead matches the minimum number of times possible, + so the pattern /\*.*?\*/ - does the right thing with the C comments. The meaning of the various - quantifiers is not otherwise changed, just the preferred number of - matches. Do not confuse this use of question mark with its use as a - quantifier in its own right. Because it has two uses, it can sometimes - appear doubled, as in + does the right thing with the C comments. The meaning of the various + quantifiers is not otherwise changed, just the preferred number of + matches. Do not confuse this use of question mark with its use as a + quantifier in its own right. Because it has two uses, it can sometimes + appear doubled, as in \d??\d - which matches one digit by preference, but can match two if that is the - only way the rest of the pattern matches. + which matches one digit by preference, but can match two if that is the + only way the rest of the pattern matches. - If the "U" (PCRE_UNGREEDY) option is set (an option which is not - available in Perl) then the quantifiers are not greedy by default, but - individual ones can be made greedy by following them with a question - mark. In other words, it inverts the default behaviour. + If the "U" (PCRE_UNGREEDY) option is set (an option which is not + available in Perl) then the quantifiers are not greedy by default, but + individual ones can be made greedy by following them with a question + mark. In other words, it inverts the default behavior. - When a parenthesized subpattern is quantified with a minimum repeat - count that is greater than 1 or with a limited maximum, more store is - required for the compiled pattern, in proportion to the size of the - minimum or maximum. + When a parenthesized subpattern is quantified with a minimum repeat + count that is greater than 1 or with a limited maximum, more store is + required for the compiled pattern, in proportion to the size of the + minimum or maximum. - If a pattern starts with .* or .{0,}, then the pattern is implicitly - anchored, because whatever follows will be tried against every character - position in the subject string, so there is no point in retrying the - overall match at any position after the first. PCRE treats such a - pattern as though it were preceded by \A. + If a pattern starts with .* or .{0,}, then the pattern is implicitly + anchored, because whatever follows will be tried against every character + position in the subject string, so there is no point in retrying the + overall match at any position after the first. PCRE treats such a + pattern as though it were preceded by \A. - When a capturing subpattern is repeated, the value captured is the - substring that matched the final iteration. For example, after + When a capturing subpattern is repeated, the value captured is the + substring that matched the final iteration. For example, after (tweedle[dume]{3}\s*)+ - has matched "tweedledum tweedledee" the value of the captured substring - is "tweedledee". However, if there are nested capturing subpatterns, - the corresponding captured values may have been set in previous - iterations. For example, after + has matched "tweedledum tweedledee" the value of the captured substring + is "tweedledee". However, if there are nested capturing subpatterns, + the corresponding captured values may have been set in previous + iterations. For example, after /(a|(b))+/ - matches "aba" the value of the second captured substring is "b". - * + matches "aba" the value of the second captured substring is "b". + * #SEC22 - BACK REFERENCES + BACK REFERENCES - Outside a character class, a backslash followed by a digit greater than - 0 (and possibly further digits) is a back reference to a capturing - subpattern earlier (i.e. to its left) in the pattern, provided there - have been that many previous capturing left parentheses. + Outside a character class, a backslash followed by a digit greater than + 0 (and possibly further digits) is a back reference to a capturing + subpattern earlier (i.e. to its left) in the pattern, provided there + have been that many previous capturing left parentheses. - However, if the decimal number following the backslash is less than 10, - it is always taken as a back reference, and causes an error only if - there are not that many capturing left parentheses in the entire - pattern. In other words, the parentheses that are referenced need not - be to the left of the reference for numbers less than 10. See the - section entitled "Backslash" above for further details of the handling - of digits following a backslash. + However, if the decimal number following the backslash is less than 10, + it is always taken as a back reference, and causes an error only if + there are not that many capturing left parentheses in the entire + pattern. In other words, the parentheses that are referenced need not + be to the left of the reference for numbers less than 10. See the + section entitled "Backslash" above for further details of the handling + of digits following a backslash. - A back reference matches whatever actually matched the capturing - subpattern in the current subject string, rather than anything matching - the subpattern itself. So the pattern + A back reference matches whatever actually matched the capturing + subpattern in the current subject string, rather than anything matching + the subpattern itself. So the pattern (sens|respons)e and \1ibility - matches "sense and sensibility" and "response and responsibility", but - not "sense and responsibility". If caseful matching is in force at the - time of the back reference, then the case of letters is relevant. For - example, + matches "sense and sensibility" and "response and responsibility", but + not "sense and responsibility". If caseful matching is in force at the + time of the back reference, then the case of letters is relevant. For + example, ((?i)rah)\s+\1 - matches "rah rah" and "RAH RAH", but not "RAH rah", even though the - original capturing subpattern is matched caselessly. + matches "rah rah" and "RAH RAH", but not "RAH rah", even though the + original capturing subpattern is matched caselessly. - There may be more than one back reference to the same subpattern. If a - subpattern has not actually been used in a particular match, then any - back references to it always fail. For example, the pattern + There may be more than one back reference to the same subpattern. If a + subpattern has not actually been used in a particular match, then any + back references to it always fail. For example, the pattern (a|(bc))\2 - always fails if it starts to match "a" rather than "bc". Because there - may be up to 99 back references, all digits following the backslash are - taken as part of a potential back reference number. If the pattern - continues with a digit character, then some delimiter must be used to - terminate the back reference. If the "x" (PCRE_EXTENDED) option is set, - this can be whitespace. Otherwise an empty comment can be used. + always fails if it starts to match "a" rather than "bc". Because there + may be up to 99 back references, all digits following the backslash are + taken as part of a potential back reference number. If the pattern + continues with a digit character, then some delimiter must be used to + terminate the back reference. If the "x" (PCRE_EXTENDED) option is set, + this can be whitespace. Otherwise an empty comment can be used. - A back reference that occurs inside the parentheses to which it refers - fails when the subpattern is first used, so, for example, (a\1) never - matches. However, such references can be useful inside repeated - subpatterns. For example, the pattern + A back reference that occurs inside the parentheses to which it refers + fails when the subpattern is first used, so, for example, (a\1) never + matches. However, such references can be useful inside repeated + subpatterns. For example, the pattern (a|b\1)+ - matches any number of "a"s and also "aba", "ababaa" etc. At each - iteration of the subpattern, the back reference matches the character - string corresponding to the previous iteration. In order for this to - work, the pattern must be such that the first iteration does not need to - match the back reference. This can be done using alternation, as in the - example above, or by a quantifier with a minimum of zero. - * + matches any number of "a"s and also "aba", "ababaa" etc. At each + iteration of the subpattern, the back reference matches the character + string corresponding to the previous iteration. In order for this to + work, the pattern must be such that the first iteration does not need to + match the back reference. This can be done using alternation, as in the + example above, or by a quantifier with a minimum of zero. + * #SEC23 - ASSERTIONS + ASSERTIONS - An assertion is a test on the characters following or preceding the - current matching point that does not actually consume any characters. - The simple assertions coded as \b, \B, \A, \Z, \z, ^ and $ are described - above. More complicated assertions are coded as subpatterns. There are - two kinds: those that look ahead of the current position in the subject - string, and those that look behind it. + An assertion is a test on the characters following or preceding the + current matching point that does not actually consume any characters. + The simple assertions coded as \b, \B, \A, \Z, \z, ^ and $ are described + above. More complicated assertions are coded as subpatterns. There are + two kinds: those that look ahead of the current position in the subject + string, and those that look behind it. - An assertion subpattern is matched in the normal way, except that it - does not cause the current matching position to be changed. Lookahead - assertions start with (?= for positive assertions and (?! for negative - assertions. For example, + An assertion subpattern is matched in the normal way, except that it + does not cause the current matching position to be changed. Lookahead + assertions start with (?= for positive assertions and (?! for negative + assertions. For example, \w+(?=;) - matches a word followed by a semicolon, but does not include the - semicolon in the match, and + matches a word followed by a semicolon, but does not include the + semicolon in the match, and foo(?!bar) - matches any occurrence of "foo" that is not followed by "bar". Note - that the apparently similar pattern + matches any occurrence of "foo" that is not followed by "bar". Note + that the apparently similar pattern (?!foo)bar - does not find an occurrence of "bar" that is preceded by something other - than "foo"; it finds any occurrence of "bar" whatsoever, because the - assertion (?!foo) is always true when the next three characters are - "bar". A lookbehind assertion is needed to achieve this effect. + does not find an occurrence of "bar" that is preceded by something other + than "foo"; it finds any occurrence of "bar" whatsoever, because the + assertion (?!foo) is always true when the next three characters are + "bar". A lookbehind assertion is needed to achieve this effect. - Lookbehind assertions start with (?<= for positive assertions and (? match "foo" preceded - by six characters, the first of which are digits and the last three of - which are not "999". For example, it doesn't match "123abcfoo". A - pattern to do that is + matches "foo" preceded by three digits that are not "999". Notice that + each of the assertions is applied independently at the same point in the + subject string. First there is a check that the previous three + characters are all digits, then there is a check that the same three + characters are not "999". This pattern does <not> match "foo" preceded + by six characters, the first of which are digits and the last three of + which are not "999". For example, it doesn't match "123abcfoo". A + pattern to do that is (?<=\d{3}...)(? as in this example: + After matching all 6 digits and then failing to match "foo", the normal + action of the matcher is to try again with only 5 digits matching the + \d+ item, and then with 4, and so on, before ultimately failing. + Once-only subpatterns provide the means for specifying that once a + portion of the pattern has matched, it is not to be re-evaluated in this + way, so the matcher would give up immediately on failing to match "foo" + the first time. The notation is another kind of special parenthesis, + starting with (?> as in this example: (?>\d+)bar - This kind of parenthesis "locks up" the part of the pattern it contains - once it has matched, and a failure further into the pattern is prevented - from backtracking into it. Backtracking past it to previous items, - however, works as normal. + This kind of parenthesis "locks up" the part of the pattern it contains + once it has matched, and a failure further into the pattern is prevented + from backtracking into it. Backtracking past it to previous items, + however, works as normal. - An alternative description is that a subpattern of this type matches the - string of characters that an identical standalone pattern would match, - if anchored at the current point in the subject string. + An alternative description is that a subpattern of this type matches the + string of characters that an identical standalone pattern would match, + if anchored at the current point in the subject string. - Once-only subpatterns are not capturing subpatterns. Simple cases such - as the above example can be thought of as a maximizing repeat that must - swallow everything it can. So, while both \d+ and \d+? are prepared to - adjust the number of digits they match in order to make the rest of the - pattern match, (?>\d+) can only match an entire sequence of digits. + Once-only subpatterns are not capturing subpatterns. Simple cases such + as the above example can be thought of as a maximizing repeat that must + swallow everything it can. So, while both \d+ and \d+? are prepared to + adjust the number of digits they match in order to make the rest of the + pattern match, (?>\d+) can only match an entire sequence of digits. - This construction can of course contain arbitrarily complicated - subpatterns, and it can be nested. + This construction can of course contain arbitrarily complicated + subpatterns, and it can be nested. - Once-only subpatterns can be used in conjunction with lookbehind - assertions to specify efficient matching at the end of the subject - string. Consider a simple pattern such as + Once-only subpatterns can be used in conjunction with lookbehind + assertions to specify efficient matching at the end of the subject + string. Consider a simple pattern such as abcd$ - when applied to a long string which does not match it. Because matching - proceeds from left to right, PCRE will look for each "a" in the subject - and then see if what follows matches the rest of the pattern. If the - pattern is specified as + when applied to a long string which does not match it. Because matching + proceeds from left to right, PCRE will look for each "a" in the subject + and then see if what follows matches the rest of the pattern. If the + pattern is specified as ^.*abcd$ - then the initial .* matches the entire string at first, but when this - fails, it backtracks to match all but the last character, then all but - the last two characters, and so on. Once again the search for "a" - covers the entire string, from right to left, so we are no better off. - However, if the pattern is written as + then the initial .* matches the entire string at first, but when this + fails, it backtracks to match all but the last character, then all but + the last two characters, and so on. Once again the search for "a" + covers the entire string, from right to left, so we are no better off. + However, if the pattern is written as ^(?>.*)(?<=abcd) - then there can be no backtracking for the .* item; it can match only the - entire string. The subsequent lookbehind assertion does a single test - on the last four characters. If it fails, the match fails immediately. - For long strings, this approach makes a significant difference to the - processing time. - * + then there can be no backtracking for the .* item; it can match only the + entire string. The subsequent lookbehind assertion does a single test + on the last four characters. If it fails, the match fails immediately. + For long strings, this approach makes a significant difference to the + processing time. + * #SEC25 - CONDITIONAL SUBPATTERNS + CONDITIONAL SUBPATTERNS - It is possible to cause the matching process to obey a subpattern - conditionally or to choose between two alternative subpatterns, - depending on the result of an assertion, or whether a previous capturing - subpattern matched or not. The two possible forms of conditional - subpattern are + It is possible to cause the matching process to obey a subpattern + conditionally or to choose between two alternative subpatterns, + depending on the result of an assertion, or whether a previous capturing + subpattern matched or not. The two possible forms of conditional + subpattern are (?(condition)yes-pattern) (?(condition)yes-pattern|no-pattern) - If the condition is satisfied, the yes-pattern is used; otherwise the - no-pattern (if present) is used. If there are more than two - alternatives in the subpattern, a compile-time error occurs. + If the condition is satisfied, the yes-pattern is used; otherwise the + no-pattern (if present) is used. If there are more than two + alternatives in the subpattern, a compile-time error occurs. - There are two kinds of condition. If the text between the parentheses - consists of a sequence of digits, then the condition is satisfied if the - capturing subpattern of that number has previously matched. Consider - the following pattern, which contains non-significant white space to - make it more readable (assume the "x" PCRE_EXTENDED option) and to - divide it into three parts for ease of discussion: + There are two kinds of condition. If the text between the parentheses + consists of a sequence of digits, then the condition is satisfied if the + capturing subpattern of that number has previously matched. Consider + the following pattern, which contains non-significant white space to + make it more readable (assume the "x" PCRE_EXTENDED option) and to + divide it into three parts for ease of discussion: ( \( )? [^()]+ (?(1) \) ) - The first part matches an optional opening parenthesis, and if that - character is present, sets it as the first captured substring. The - second part matches one or more characters that are not parentheses. - The third part is a conditional subpattern that tests whether the first - set of parentheses matched or not. If they did, that is, if subject - started with an opening parenthesis, the condition is true, and so the - yes-pattern is executed and a closing parenthesis is required. - Otherwise, since no-pattern is not present, the subpattern matches - nothing. In other words, this pattern matches a sequence of - non-parentheses, optionally enclosed in parentheses. + The first part matches an optional opening parenthesis, and if that + character is present, sets it as the first captured substring. The + second part matches one or more characters that are not parentheses. + The third part is a conditional subpattern that tests whether the first + set of parentheses matched or not. If they did, that is, if subject + started with an opening parenthesis, the condition is true, and so the + yes-pattern is executed and a closing parenthesis is required. + Otherwise, since no-pattern is not present, the subpattern matches + nothing. In other words, this pattern matches a sequence of + non-parentheses, optionally enclosed in parentheses. - If the condition is not a sequence of digits, it must be an assertion. - This may be a positive or negative lookahead or lookbehind assertion. - Consider this pattern, again containing non-significant white space, and - with the two alternatives on the second line: + If the condition is not a sequence of digits, it must be an assertion. + This may be a positive or negative lookahead or lookbehind assertion. + Consider this pattern, again containing non-significant white space, and + with the two alternatives on the second line: (?(?=[^a-z]*[a-z]) \d{2}[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) - The condition is a positive lookahead assertion that matches an optional - sequence of non-letters followed by a letter. In other words, it tests - for the presence of at least one letter in the subject. If a letter is - found, the subject is matched against the first alternative; otherwise - it is matched against the second. This pattern matches strings in one - of the two forms dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are - digits. - * + The condition is a positive lookahead assertion that matches an optional + sequence of non-letters followed by a letter. In other words, it tests + for the presence of at least one letter in the subject. If a letter is + found, the subject is matched against the first alternative; otherwise + it is matched against the second. This pattern matches strings in one + of the two forms dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are + digits. + * #SEC26 - COMMENTS + COMMENTS - The sequence (?# marks the start of a comment which continues up to the - next closing parenthesis. Nested parentheses are not permitted. The - characters that make up a comment play no part in the pattern matching - at all. + The sequence (?# marks the start of a comment which continues up to the + next closing parenthesis. Nested parentheses are not permitted. The + characters that make up a comment play no part in the pattern matching + at all. - If the "x" PCRE_EXTENDED option is set, an unescaped # character outside - a character class introduces a comment that continues up to the next - newline character in the pattern. - * + If the "x" PCRE_EXTENDED option is set, an unescaped # character outside + a character class introduces a comment that continues up to the next + newline character in the pattern. + * #SEC27 - PERFORMANCE + PERFORMANCE - Certain items that may appear in patterns are more efficient than - others. It is more efficient to use a character class like [aeiou] than - a set of alternatives such as (a|e|i|o|u). In general, the simplest - construction that provides the required behaviour is usually the most - efficient. Jeffrey Friedl's book contains a lot of discussion about - optimizing regular expressions for efficient performance. + Certain items that may appear in patterns are more efficient than + others. It is more efficient to use a character class like [aeiou] than + a set of alternatives such as (a|e|i|o|u). In general, the simplest + construction that provides the required behavior is usually the most + efficient. Jeffrey Friedl's book contains a lot of discussion about + optimizing regular expressions for efficient performance. - Beware of patterns that contain nested indefinite repeats. These can - take a long time to run when applied to a string that does not match. - Consider the pattern fragment + Beware of patterns that contain nested indefinite repeats. These can + take a long time to run when applied to a string that does not match. + Consider the pattern fragment (a+)* - This can match "aaaa" in 33 different ways, and this number increases - very rapidly as the string gets longer. (The * repeat can match 0, 1, - 2, 3, or 4 times, and for each of those cases other than 0, the + - repeats can match different numbers of times.) When the remainder of the - pattern is such that the entire match is going to fail, PCRE has in - principle to try every possible variation, and this can take an - extremely long time. + This can match "aaaa" in 33 different ways, and this number increases + very rapidly as the string gets longer. (The * repeat can match 0, 1, + 2, 3, or 4 times, and for each of those cases other than 0, the + + repeats can match different numbers of times.) When the remainder of the + pattern is such that the entire match is going to fail, PCRE has in + principle to try every possible variation, and this can take an + extremely long time. - An optimization catches some of the more simple cases such as + An optimization catches some of the more simple cases such as (a+)*b - where a literal character follows. Before embarking on the standard - matching procedure, PCRE checks that there is a "b" later in the subject - string, and if there is not, it fails the match immediately. However, - when there is no following literal this optimization cannot be used. - You can see the difference by comparing the behaviour of + where a literal character follows. Before embarking on the standard + matching procedure, PCRE checks that there is a "b" later in the subject + string, and if there is not, it fails the match immediately. However, + when there is no following literal this optimization cannot be used. + You can see the difference by comparing the behavior of (a+)*\d - with the pattern above. The former gives a failure almost instantly - when applied to a whole line of "a" characters, whereas the latter takes - an appreciable time with strings longer than about 20 characters. - * + with the pattern above. The former gives a failure almost instantly + when applied to a whole line of "a" characters, whereas the latter takes + an appreciable time with strings longer than about 20 characters. + * #SEC28 - AUTHOR + AUTHOR - Philip Hazel - University Computing Service, - New Museums Site, - Cambridge CB2 3QG, England. - Phone: +44 1223 334714 + Philip Hazel + University Computing Service, + New Museums Site, + Cambridge CB2 3QG, England. + Phone: +44 1223 334714 - Last updated: 29 July 1999 - Copyright (c) 1997-1999 University of Cambridge. + Last updated: 29 July 1999 + Copyright (c) 1997-1999 University of Cambridge. &priorities &fallthru @@ -8167,35 +8178,35 @@ Notes. priority - When more than one macro is matched by a trigger or hooked event, the - following rules are used to select which of the macros will be applied - (i.e., have its attributes applied to the text, and its body executed): + When more than one macro is matched by a trigger or hooked event, the + following rules are used to select which of the macros will be applied + (i.e., have its attributes applied to the text, and its body executed): - * Macros are compared in order of decreasing priority. - * Fall-thrus of a given priority are compared before non-fall-thrus of - the same priority. - * Each matching fall-thru macro is applied immediately when it is - found. - * When the first matching non-fall-thru macro is found, all the - non-fall-thrus of equal priority are collected, and the search ends. - One of the non-fall-thrus is chosen at random and applied. + * Macros are compared in order of decreasing priority. + * Fall-thrus of a given priority are compared before non-fall-thrus of + the same priority. + * Each matching fall-thru macro is applied immediately when it is + found. + * When the first matching non-fall-thru macro is found, all the + non-fall-thrus of equal priority are collected, and the search ends. + One of the non-fall-thrus is chosen at random and applied. - So, in the simple case when there are no fall-thrus, the highest priority - match is chosen. If there is more than one of the highest priority, one of - those is chosen at random. + So, in the simple case when there are no fall-thrus, the highest priority + match is chosen. If there is more than one of the highest priority, one of + those is chosen at random. - These priority rules apply even to macros defined or undefined by a macro - found during the search. For example, if a mud line triggers a fall-thru - macro /foo, and /foo defines a new trigger macro /bar which also matches the - line, then /bar may be triggered if it has lower priority than /foo. + These priority rules apply even to macros defined or undefined by a macro + found during the search. For example, if a mud line triggers a fall-thru + macro /foo, and /foo defines a new trigger macro /bar which also matches the + line, then /bar may be triggered if it has lower priority than /foo. - A macro's priority is set with /def -p; its fall-thru option is set with - /def -F. + A macro's priority is set with /def -p; its fall-thru option is set with + /def -F. - Use the /trigger -n command to display a list of the triggers triggers or - hooks will match a given string. + Use the /trigger -n command to display a list of the triggers triggers or + hooks will match a given string. - See: triggers, hooks, macros, /def + See: triggers, hooks, macros, /def &bug &bugs @@ -8212,43 +8223,43 @@ priority problems - If you have an old version of TF, chances are your bug has already been - fixed. Current information and the latest version of TF can be found at - http://tinyfugue.sourceforge.net/. - - For general bug reports, questions, etc, visit the website above - (preferred), or email kenkeys@users.sourceforge.net. For problems specific - to the OS/2 version, contact Andreas Sahlbach at asa@stardiv.de. When - reporting a problem or bug, please provide this information: - - * The full version number of TF (type "/version" in tf). Please give - the full number, don't just say something like "beta 4" or "the latest - version". - * The operating system name and version. (On unix systems, type - "uname -a" in the shell to get the exact version information.) - * If tf won't install, send the output of the installation process (on - UNIX, that's the output of configure and make). Don't leave out parts - just because you don't know what they mean or think they're irrelevant. - * If you have a bug or core: do NOT send the core file, but do send - the debugging dump file (tf.<NNNNN>.dump) if tf generated one. If not, - give me ALL messages from tf (not just the last line). In either case, - tell me what you did or what happened before the problem, and whether - the problem is repeatable. - * Optional: If you have a core, you know how to use a debugger, tf was - compiled with core dumps enabled, and tf did not generate a debugging - dump file, a manual stack trace would be useful (use the 'bt full' - command in gdb or 'where' in dbx). If you don't know how, at least - provide the other information described above. + If you have an old version of TF, chances are your bug has already been + fixed. Current information and the latest version of TF can be found at + http://tinyfugue.sourceforge.net/. + + For general bug reports, questions, etc, visit the website above + (preferred), or email kenkeys@users.sourceforge.net. For problems specific + to the OS/2 version, contact Andreas Sahlbach at asa@stardiv.de. When + reporting a problem or bug, please provide this information: + + * The full version number of TF (type "/version" in tf). Please give + the full number, don't just say something like "beta 4" or "the latest + version". + * The operating system name and version. (On unix systems, type + "uname -a" in the shell to get the exact version information.) + * If tf won't install, send the output of the installation process (on + UNIX, that's the output of configure and make). Don't leave out parts + just because you don't know what they mean or think they're irrelevant. + * If you have a bug or core: do NOT send the core file, but do send + the debugging dump file (tf.<NNNNN>.dump) if tf generated one. If not, + give me ALL messages from tf (not just the last line). In either case, + tell me what you did or what happened before the problem, and whether + the problem is repeatable. + * Optional: If you have a core, you know how to use a debugger, tf was + compiled with core dumps enabled, and tf did not generate a debugging + dump file, a manual stack trace would be useful (use the 'bt full' + command in gdb or 'where' in dbx). If you don't know how, at least + provide the other information described above. # - The following bugs are known. Don't bother reporting them. + The following bugs are known. Don't bother reporting them. - * The %{lp} and %{emulation} variables should work on a per-socket - basis (This is partially overcome with WORLD hooks). - * If a shell quote (/quote !) reads a partial line from the child - process, tf will hang until the line is completed. - * /recall by timestamp doesn't work when switching to/from daylight - savings time (but /recall by age always works). + * The %{lp} and %{emulation} variables should work on a per-socket + basis (This is partially overcome with WORLD hooks). + * If a shell quote (/quote !) reads a partial line from the child + process, tf will hang until the line is completed. + * /recall by timestamp doesn't work when switching to/from daylight + savings time (but /recall by age always works). &tinyprocesses &process @@ -8257,7 +8268,7 @@ problems processes - Associated topics: + Associated topics: /quote /repeat @@ -8266,48 +8277,48 @@ processes %ptime %lpquote - The /quote and /repeat commands in Fugue are done by setting up internal - processes that run concurrently with normal input and output. + The /quote and /repeat commands in Fugue are done by setting up internal + processes that run concurrently with normal input and output. - /ps can be used to get a listing of the currently running processes and - their process ID's (for use with /kill). + /ps can be used to get a listing of the currently running processes and + their process ID's (for use with /kill). - /kill can be used to terminate a process. + /kill can be used to terminate a process. - Processes can be either synchronous or asynchronous. Synchronous processes - (started with the -S option) run immediately when they are started, and run - to completion (unless TF is interrupted) before any other commands are - executed. Synchronous processes are new in version 3.3 beta 10. + Processes can be either synchronous or asynchronous. Synchronous processes + (started with the -S option) run immediately when they are started, and run + to completion (unless TF is interrupted) before any other commands are + executed. Synchronous processes are new in version 3.3 beta 10. - Asynchronous processes are merely scheduled to be run by a /quote or /repeat - command; the actual execution occurs at some later time. They can be run - based on two different criteria: + Asynchronous processes are merely scheduled to be run by a /quote or /repeat + command; the actual execution occurs at some later time. They can be run + based on two different criteria: - 1. Normally, processes run whenever a specific period of time has elapsed. - The delay can be specified when the process is started, or will default to - the value of %{ptime}. + 1. Normally, processes run whenever a specific period of time has elapsed. + The delay can be specified when the process is started, or will default to + the value of %{ptime}. - 2. If the %{lpquote} flag is on or the process was started with the -P - option, a process run whenever a prompt is received from the server, - indicating that the previous command has completed. If the process was - started with a -w option, only prompts from the specified world will trigger - its execution. Example: + 2. If the %{lpquote} flag is on or the process was started with the -P + option, a process run whenever a prompt is received from the server, + indicating that the previous command has completed. If the process was + started with a -w option, only prompts from the specified world will trigger + its execution. Example: /quote -P /send `/_echo n%; /_echo w%; /_echo w%; /_echo s - will send the commands "n", "w", "w", and "s", waiting between each one - until the prompt following the previous command is seen. + will send the commands "n", "w", "w", and "s", waiting between each one + until the prompt following the previous command is seen. - If an asynchronous /quote or /repeat is followed immediately by another - command, the other command will run first, because the asynchronous process - was only scheduled, not actually executed (even with -n or -0 options). Use - a synchronous /quote or /repeat to force the process to run before any other - commands. + If an asynchronous /quote or /repeat is followed immediately by another + command, the other command will run first, because the asynchronous process + was only scheduled, not actually executed (even with -n or -0 options). Use + a synchronous /quote or /repeat to force the process to run before any other + commands. - Bodies of /repeat undergo macro body expansion when they are executed; text - generated by /quote does not. + Bodies of /repeat undergo macro body expansion when they are executed; text + generated by /quote does not. - See also: utilities (/at, /tick) + See also: utilities (/at, /tick) &goahead &eor @@ -8316,29 +8327,29 @@ processes prompt protocol - TF will recognize the TELNET protocol commands GOAHEAD or END-OF-RECORD as - the end of a prompt. If you are responsible for a server that has prompts, - and wish to make it more friendly to TF users, choose one of these options: + TF will recognize the TELNET protocol commands GOAHEAD or END-OF-RECORD as + the end of a prompt. If you are responsible for a server that has prompts, + and wish to make it more friendly to TF users, choose one of these options: - GOAHEAD: Send IAC GA (\377 \371) after each prompt. This is the easier of - the two options. In many servers, this can be done at the beginning of the - routine that reads user input. Disadvantage: could possibly cause problems - in clients that don't understand TELNET protocol (but usually, they will - just pass it through to the terminal, which will usually ignore it). + GOAHEAD: Send IAC GA (\377 \371) after each prompt. This is the easier of + the two options. In many servers, this can be done at the beginning of the + routine that reads user input. Disadvantage: could possibly cause problems + in clients that don't understand TELNET protocol (but usually, they will + just pass it through to the terminal, which will usually ignore it). - END-OF-RECORD: Send IAC WILL EOR (\377 \373 \031) when the user connects. - If the client responds with IAC DO EOR, then you can send IAC END-OF-RECORD - (\377 \357) after each prompt; otherwise, do nothing special in prompts. - Disadvantage: requires extra state per descriptor and more understanding of - telnet protocol. Advantage: minimizes potential problems for clients that - do not recognize telnet protocol. + END-OF-RECORD: Send IAC WILL EOR (\377 \373 \031) when the user connects. + If the client responds with IAC DO EOR, then you can send IAC END-OF-RECORD + (\377 \357) after each prompt; otherwise, do nothing special in prompts. + Disadvantage: requires extra state per descriptor and more understanding of + telnet protocol. Advantage: minimizes potential problems for clients that + do not recognize telnet protocol. - To debug telnet option negotiations, you may find it useful to "/set telopt - on" in TF. + To debug telnet option negotiations, you may find it useful to "/set telopt + on" in TF. - For more information on TELNET protocol, see RFCs 854, 855, 885, and 1123. + For more information on TELNET protocol, see RFCs 854, 855, 885, and 1123. - See also: /telnet, telopt, prompts, protocols + See also: /telnet, telopt, prompts, protocols &lp &diku @@ -8347,53 +8358,53 @@ prompt protocol prompts - Most LP muds, Diku muds, telnetd, and some other types of servers send - unterminated prompts, that is, prompts that do not end with newline or any - other special character. Normally, TF will not display text until a newline - is received, so you may not see the prompt until after you press return. - But if the %{lp} flag is on, TF will attempt to separate these prompts from - normal text and display them correctly. - - The recommended way to use the %{lp} flag is to define your worlds with one - of the /addlp, /adddiku, or /addtelnet commands. The %{lp} flag will be - turned on automatically when you switch to such a world, and turned off for - the other predefined world types. See: /addworld. - - TF also provides a PROMPT hook, which allows you to tell it what to look for - in a prompt. When an unterminated line is received, the PROMPT hook is - called immediately. If there is no match, TF will use the timeout method - described below (if %{lp} is on). But if there is a matching PROMPT hook, - TF will forget about the line (unless the hook was defined with /def -q) and - let the hook deal with it. By combining the PROMPT hook with the /prompt - command, you can recognize most prompts immediately without having to use - the %{lp} timing mechanism. The typical way of doing this is: + Most LP MUDs, Diku MUDs, telnetd, and some other types of servers send + unterminated prompts, that is, prompts that do not end with newline or any + other special character. Normally, TF will not display text until a newline + is received, so you may not see the prompt until after you press return. + But if the %{lp} flag is on, TF will attempt to separate these prompts from + normal text and display them correctly. + + The recommended way to use the %{lp} flag is to define your worlds with one + of the /addlp, /adddiku, or /addtelnet commands. The %{lp} flag will be + turned on automatically when you switch to such a world, and turned off for + the other predefined world types. See: /addworld. + + TF also provides a PROMPT hook, which allows you to tell it what to look for + in a prompt. When an unterminated line is received, the PROMPT hook is + called immediately. If there is no match, TF will use the timeout method + described below (if %{lp} is on). But if there is a matching PROMPT hook, + TF will forget about the line (unless the hook was defined with /def -q) and + let the hook deal with it. By combining the PROMPT hook with the /prompt + command, you can recognize most prompts immediately without having to use + the %{lp} timing mechanism. The typical way of doing this is: /def -h"PROMPT *> " catch_prompt = /test prompt({*}) - So, whenever TF receives an unterminated line that ends in "> ", - catch_prompt will see it, and use /prompt to copy it to the current prompt. + So, whenever TF receives an unterminated line that ends in "> ", + catch_prompt will see it, and use /prompt to copy it to the current prompt. - If an unterminated line is not matched by any PROMPT hook, and it is not - followed by more text within a short period of time, TF will assume it is a - prompt. This method is not foolproof. If the delay is too short, broken - lines will look like prompts, and will briefly appear in the input window - until the rest of the line arrives, at which time both parts of the line - will be printed as normal output. If the delay is too long, there will be - an annoying delay before displaying real prompts. + If an unterminated line is not matched by any PROMPT hook, and it is not + followed by more text within a short period of time, TF will assume it is a + prompt. This method is not foolproof. If the delay is too short, broken + lines will look like prompts, and will briefly appear in the input window + until the rest of the line arrives, at which time both parts of the line + will be printed as normal output. If the delay is too long, there will be + an annoying delay before displaying real prompts. - The delay can be varied by setting the variable prompt_wait. Its default - value is 0.25 seconds. + The delay can be varied by setting the variable prompt_wait. Its default + value is 0.25 seconds. - All of this hackery can be avoided if the server sends unambiguous prompts. - TF will recognize "*\b" (that is, "*" followed by backspace) and anything - ending with GOAHEAD or END-OF-RECORD telnet characters. When TF sees such - text, it does not wait for a delay, but calls the PROMPT hook immediately; - if there is no match, TF displays the prompt immediately. To avoid some - minor glitches, you should leave the %{lp} flag off when connected to such a - server. If you are responsible for a server and wish to make it more - TF-friendly, see "prompt protocol". + All of this hackery can be avoided if the server sends unambiguous prompts. + TF will recognize "*\b" (that is, "*" followed by backspace) and anything + ending with GOAHEAD or END-OF-RECORD telnet characters. When TF sees such + text, it does not wait for a delay, but calls the PROMPT hook immediately; + if there is no match, TF displays the prompt immediately. To avoid some + minor glitches, you should leave the %{lp} flag off when connected to such a + server. If you are responsible for a server and wish to make it more + TF-friendly, see "prompt protocol". - See also: %login, prompt protocol, /addworld + See also: %login, prompt protocol, /addworld &protocol &ip @@ -8406,30 +8417,30 @@ prompts Protocols - TF supports the following protocols: + TF supports the following protocols: - * TCP over IPv4 (RFC 791) - * TCP over IPv6 (RFC 2460, 3493), if supported by the host - * TELNET Protocol (RFC 854, 855) (See: telnet) - * Generic proxy servers (See: proxy) - * ANSI display attributes (See: %emulation) - * EOR and GOAHEAD prompt protocol (See: prompt protocol) - * Mud Client Compression Protocol version 2, if TF was compiled with - zlib (See: mccp) - * Secure Socket Layer (SSL), if TF was compiled with libssl. (See: - addworld, connect) + * TCP over IPv4 (RFC 791) + * TCP over IPv6 (RFC 2460, 3493), if supported by the host + * TELNET Protocol (RFC 854, 855) (See: telnet) + * Generic proxy servers (See: proxy) + * ANSI display attributes (See: %emulation) + * EOR and GOAHEAD prompt protocol (See: prompt protocol) + * Mud Client Compression Protocol version 2, if TF was compiled with + zlib (See: mccp) + * Secure Socket Layer (SSL), if TF was compiled with libssl. (See: + addworld, connect) - RFCs can be obtained from + RFCs can be obtained from - * http://www.rfc-editor.org/rfc.html - * http://info.internet.isi.edu/1/in-notes/rfc - * http://www.garlic.com/~lynn/rfcietf.html - * http://www.cis.ohio-state.edu/hypertext/information/rfc.html - * ftp://wuarchive.wustl.edu/doc/rfc/ - * ftp://nis.nsf.net/documents/rfc/ - * ftp://src.doc.ic.ac.uk/rfc/ + * http://www.rfc-editor.org/rfc.html + * http://info.internet.isi.edu/1/in-notes/rfc + * http://www.garlic.com/~lynn/rfcietf.html + * http://www.cis.ohio-state.edu/hypertext/information/rfc.html + * ftp://wuarchive.wustl.edu/doc/rfc/ + * ftp://nis.nsf.net/documents/rfc/ + * ftp://src.doc.ic.ac.uk/rfc/ - and other sites. + and other sites. &firewall &proxy @@ -8439,50 +8450,50 @@ Protocols proxy server - If %{proxy_host} is set, all connections will go through a proxy server - (firewall) defined by %proxy_host and %proxy_port. Note that %{proxy_host} - should usually not be set if TF has been compiled to use SOCKS. + If %{proxy_host} is set, all connections will go through a proxy server + (firewall) defined by %proxy_host and %proxy_port. Note that %{proxy_host} + should usually not be set if TF has been compiled to use SOCKS. - When the connection to %proxy_host %proxy_port is made, only the PROXY hook - is called; the CONNECT and LOGIN hooks which are normally called after - making a connection are not called when a proxy is used. A PROXY hook - defined in the standard library calls /proxy_command, which by default sends - "telnet ${world_host} ${world_port}", and then invoke the CONNECT and LOGIN - hooks (which, by default, bring the world into the foreground and perform an - automatic login). + When the connection to %proxy_host %proxy_port is made, only the PROXY hook + is called; the CONNECT and LOGIN hooks which are normally called after + making a connection are not called when a proxy is used. A PROXY hook + defined in the standard library calls /proxy_command, which by default sends + "telnet ${world_host} ${world_port}", and then invoke the CONNECT and LOGIN + hooks (which, by default, bring the world into the foreground and perform an + automatic login). - Before the connection to the proxy server is made, ${world_host}, - ${world_port}, error messages, and /listsockets all refer to the proxy - server; after the connection is made, they refer to the target server - defined in /addworld. + Before the connection to the proxy server is made, ${world_host}, + ${world_port}, error messages, and /listsockets all refer to the proxy + server; after the connection is made, they refer to the target server + defined in /addworld. - The proxy connection command is done with this standard macro: + The proxy connection command is done with this standard macro: /def -i proxy_connect = telnet ${world_host} ${world_port} - If your proxy server requires a different command, you should redefine - proxy_connect. That will be sufficient for most proxy servers. (Before - version 5.0, a custom connect command required you to redefine - proxy_command. This should be avoided now if possible.) - - If your proxy server has more complex requirements, or you want better error - detection, you will need to redefine the proxy_command macro. By default, - proxy_command immediately calls /proxy_connect, enables localecho, and - invokes the CONNECT and LOGIN hooks. There are several reasons you might - want to redefine proxy_command: - - * The default proxy_command can not detect when proxy_connect fails, - so it will always send your login command even if the proxy server did - not connect to the target server. - * Your proxy server may not accept commands immediately, so - proxy_command should wait for some indication that the proxy server is - ready before sending commands. - - For example, say you use a Gauntlet telnet proxy that leaves localecho off; - prints a "tn-gw->" prompt; requires you to send "telnet <hostname> <port>" - to connect; after a successful connection, prints "Connected to <hostname>"; - and after a failed connection prints an error message and prints another - prompt. So, you could use this definition: + If your proxy server requires a different command, you should redefine + proxy_connect. That will be sufficient for most proxy servers. (Before + version 5.0, a custom connect command required you to redefine + proxy_command. This should be avoided now if possible.) + + If your proxy server has more complex requirements, or you want better error + detection, you will need to redefine the proxy_command macro. By default, + proxy_command immediately calls /proxy_connect, enables localecho, and + invokes the CONNECT and LOGIN hooks. There are several reasons you might + want to redefine proxy_command: + + * The default proxy_command can not detect when proxy_connect fails, + so it will always send your login command even if the proxy server did + not connect to the target server. + * Your proxy server may not accept commands immediately, so + proxy_command should wait for some indication that the proxy server is + ready before sending commands. + + For example, say you use a Gauntlet telnet proxy that leaves localecho off; + prints a "tn-gw->" prompt; requires you to send "telnet <hostname> <port>" + to connect; after a successful connection, prints "Connected to <hostname>"; + and after a failed connection prints an error message and prints another + prompt. So, you could use this definition: /def proxy_command =\ /def -p10000 -w -1 -h'PROMPT tn-gw->' =\ @@ -8498,30 +8509,30 @@ proxy server /trigger -hLOGIN ${world_name}%%%;\ /endif - The first /def waits for the first prompt before doing anything. It then - sends the connection command, turns localecho back on, and sets up macros to - catch the results of the connection command. The success trigger undefines - the error hook, and invokes the CONNECT and LOGIN hooks. The error hook - undefines the success trigger and disconnects from the proxy. + The first /def waits for the first prompt before doing anything. It then + sends the connection command, turns localecho back on, and sets up macros to + catch the results of the connection command. The success trigger undefines + the error hook, and invokes the CONNECT and LOGIN hooks. The error hook + undefines the success trigger and disconnects from the proxy. - See: /addworld, %proxy_host, %proxy_port + See: /addworld, %proxy_host, %proxy_port &redirection redirection - If TF is started with input or output redirected, %more will be ignored and - SIGINT (^C) will kill TF without prompting. TF will not exit when EOF is - reached; the /quit command must be given explicitly. + If TF is started with input or output redirected, %more will be ignored and + SIGINT (^C) will kill TF without prompting. TF will not exit when EOF is + reached; the /quit command must be given explicitly. - On UNIX systems, it is possible to write a tf script starting with the - lines: + On UNIX systems, it is possible to write a tf script starting with the + lines: #!/bin/sh exec tf -n $* <$0 - and following with any tf commands. The file can then be executed directly - like a shell script. + and following with any tf commands. The file can then be executed directly + like a shell script. &scrolling &scrollback @@ -8532,26 +8543,26 @@ redirection virtual windows - Starting in version 5.0, TF maintains a separate virtual window for each - open socket, including the "(no world)" pseudo-socket. Normally, a window - scrolls when text is written to it. If the more flag is set, automatic - scrolling will stop when the window becomes full. You can manually scroll - forwards and backwards in each socket's window using the keys in the table - below. - - Per-socket windows make it unnecessary to finish reading the text on one - socket before switching to another. When you bring a new socket into the - foreground, the old socket's window is hidden, but remembers all of its text - and current position; when you return that old socket to the foreground, the - text is redrawn at the remembered position, and you can resume reading where - you left off. A dividing line makes it easy to find the point where the old - text ends and the new text begins. The text of a window is also refilled - after resuming from /suspend or /sh, and even when the terminal's size - changes. - - In the table below, the "/dokey" columns indicate the argument to the /dokey - command that performs the scrolling, and the "keys" column indicates the - default keystrokes that perform the scrolling. + Starting in version 5.0, TF maintains a separate virtual window for each + open socket, including the "(no world)" pseudo-socket. Normally, a window + scrolls when text is written to it. If the more flag is set, automatic + scrolling will stop when the window becomes full. You can manually scroll + forwards and backwards in each socket's window using the keys in the table + below. + + Per-socket windows make it unnecessary to finish reading the text on one + socket before switching to another. When you bring a new socket into the + foreground, the old socket's window is hidden, but remembers all of its text + and current position; when you return that old socket to the foreground, the + text is redrawn at the remembered position, and you can resume reading where + you left off. A dividing line makes it easy to find the point where the old + text ends and the new text begins. The text of a window is also refilled + after resuming from /suspend or /sh, and even when the terminal's size + changes. + + In the table below, the "/dokey" columns indicate the argument to the /dokey + command that performs the scrolling, and the "keys" column indicates the + default keystrokes that perform the scrolling. scroll ....forward.... ...backward.... amount /dokey keys /dokey keys @@ -8561,61 +8572,61 @@ virtual windows 1 screen page TAB ^X} pageback ^X{ 1 line line ^[^N lineback ^[^P - Note that the line-scrolling keys may be typable as meta-ctrl-n and - meta-ctrl-p (depending on your %meta_esc and locale). "Normal" scrolling is - a full screenful by default. If you prefer PgUp and PgDn to scroll a half - screen instead, you should redefine + Note that the line-scrolling keys may be typable as meta-ctrl-n and + meta-ctrl-p (depending on your %meta_esc and locale). "Normal" scrolling is + a full screenfull by default. If you prefer PgUp and PgDn to scroll a half + screen instead, you should redefine /def key_pgdn = /dokey_hpage /def key_pgup = /dokey_hpageback - Some terminal emulators do not send PgUp and PgDn keys to tf. If you have - such a terminal, you may wish to + Some terminal emulators do not send PgUp and PgDn keys to tf. If you have + such a terminal, you may wish to /bind ^F = /dokey_page /bind ^B = /dokey_pageback - If you're an emacs user, you may want to bind + If you're an emacs user, you may want to bind /bind ^V = /dokey_page /bind ^[v = /dokey_pageback - (or, "/load kb-emacs.tf"). - - A virtual screen can be redrawn with ^L, or cleared with ^[^L (ESC ctrl-L). - Once lines are cleared from a screen, they can be redrawn by scrolling back - to them. They are not automatically redrawn when you hide the screen and - then unhide it again. - - Some hooks need to print messages that do not make sense at the bottom of - the foreground window (as they did before version 5.0). For example, if you - have world Foo in the foreground, and get activity in world Bar, it would - not make sense for the ACTIVITY hook to print "% Activity in world Bar" to - Foo's window. Firstly, you might want to know about the activity even if - you are not at the end of Foo's window buffer. Secondly, after you read the - text in Bar and returned to Foo, the message would still be at the bottom of - Foo's window buffer, misleadingly. Many messages of this type are now - delivered as "alerts". An alert appears temporarily on the status line, - where you can see it immediately and it will not outlive its usefulness. - Also, because text from different worlds is not mixed in 5.0, the WORLD hook - no longer prints "--- World <name> ---". - - The /limit command will filter the text displayed in a window. The counters - in the more prompt will count only the lines that match the limit. - - If your terminal emulator has its own scrollback, it probably will not work - very well with tf. To avoid confusion and avoid polluting your terminal's - scrollback with garbage, tf tries to switch to the terminal's "alternate - buffer", which does not keep scrollback. But not all terminals and - configurations allow this (for example, xterm does, but only if the termcap - or terminfo entry contains the correct codes, and it has not been disabled - with xterm's titeInhibit resource). If the terminal can not switch to an - alternate buffer, the terminal's scrollback may appear to work for a while, - but will become jumbled as soon as you switch worlds in tf or use tf's - scrollback. You are advised to not attempt to use your terminal's - scrollback at all while running tf. - - See also: interface, visual, /limit, keybindings. + (or, "/load kb-emacs.tf"). + + A virtual screen can be redrawn with ^L, or cleared with ^[^L (ESC ctrl-L). + Once lines are cleared from a screen, they can be redrawn by scrolling back + to them. They are not automatically redrawn when you hide the screen and + then unhide it again. + + Some hooks need to print messages that do not make sense at the bottom of + the foreground window (as they did before version 5.0). For example, if you + have world Foo in the foreground, and get activity in world Bar, it would + not make sense for the ACTIVITY hook to print "% Activity in world Bar" to + Foo's window. Firstly, you might want to know about the activity even if + you are not at the end of Foo's window buffer. Secondly, after you read the + text in Bar and returned to Foo, the message would still be at the bottom of + Foo's window buffer, misleadingly. Many messages of this type are now + delivered as "alerts". An alert appears temporarily on the status line, + where you can see it immediately and it will not outlive its usefulness. + Also, because text from different worlds is not mixed in 5.0, the WORLD hook + no longer prints "--- World <name> ---". + + The /limit command will filter the text displayed in a window. The counters + in the more prompt will count only the lines that match the limit. + + If your terminal emulator has its own scrollback, it probably will not work + very well with tf. To avoid confusion and avoid polluting your terminal's + scrollback with garbage, tf tries to switch to the terminal's "alternate + buffer", which does not keep scrollback. But not all terminals and + configurations allow this (for example, xterm does, but only if the termcap + or terminfo entry contains the correct codes, and it has not been disabled + with xterm's titeInhibit resource). If the terminal can not switch to an + alternate buffer, the terminal's scrollback may appear to work for a while, + but will become jumbled as soon as you switch worlds in tf or use tf's + scrollback. You are advised to not attempt to use your terminal's + scrollback at all while running tf. + + See also: interface, visual, /limit, keybindings. &interrupt &hangup &sigwinch @@ -8623,129 +8634,129 @@ virtual windows signals - TF catches several signals from the operating system and handles them - specially: - SIGINT (normally generated by typing ^C) - Aborts any running macro or blocking hostname resolution or connect, + TF catches several signals from the operating system and handles them + specially: + SIGINT (normally generated by typing ^C) + Aborts any running macro or blocking hostname resolution or connect, and, if interactive is on, offers a menu of choices: - C) continue tf; X) exit; T) disable triggers; P) kill processes. If - interactive is off, tf exits without prompting. - SIGQUIT (normally generated by typing ^\) - If interactive is on, TF prompts the user to quit. If the answer is - 'y', or interactive is off, TF will dump a core file if configured - to do so, and exit. - SIGTERM - Calls the SIGTERM hook, and then exits TF. - SIGHUP (normally generated when the terminal disconnects) - Calls the SIGHUP hook, and then exits TF if SIGHUP was not ignored - when tf was started. - SIGUSR1 - Calls the SIGUSR1 hook. TF does not exit. - SIGUSR2 - Calls the SIGUSR2 hook. TF does not exit. - SIGTSTP (normally generated by typing ^Z) - Suspends the TF process, like /suspend. - SIGWINCH (normally generated by resizing the terminal) - Redraws the screen, and calls the RESIZE hook. - - See also: hooks, /signal + C) continue tf; X) exit; T) disable triggers; P) kill processes. If + interactive is off, tf exits without prompting. + SIGQUIT (normally generated by typing ^\) + If interactive is on, TF prompts the user to quit. If the answer is + 'y', or interactive is off, TF will dump a core file if configured + to do so, and exit. + SIGTERM + Calls the SIGTERM hook, and then exits TF. + SIGHUP (normally generated when the terminal disconnects) + Calls the SIGHUP hook, and then exits TF if SIGHUP was not ignored + when tf was started. + SIGUSR1 + Calls the SIGUSR1 hook. TF does not exit. + SIGUSR2 + Calls the SIGUSR2 hook. TF does not exit. + SIGTSTP (normally generated by typing ^Z) + Suspends the TF process, like /suspend. + SIGWINCH (normally generated by resizing the terminal) + Redraws the screen, and calls the RESIZE hook. + + See also: hooks, /signal & &sockets sockets - Associated topics: - /connect - open a socket connection to a world - /dc close (disconnect) a socket - /fg bring a socket into the foreground - %login enable automatic login - /listsockets - display a list of open sockets - fg_world() - name of foreground world - idle() idle time - nactive() - number of active sockets, or number of undisplayed lines - is_connected() - tests whether a socket is connected - is_open() - tests whether a socket is open - %background - determines when to process text from background sockets - %bg_output - determines how to display text from background sockets + Associated topics: + /connect + open a socket connection to a world + /dc close (disconnect) a socket + /fg bring a socket into the foreground + %login enable automatic login + /listsockets + display a list of open sockets + fg_world() + name of foreground world + idle() idle time + nactive() + number of active sockets, or number of undisplayed lines + is_connected() + tests whether a socket is connected + is_open() + tests whether a socket is open + %background + determines when to process text from background sockets + %bg_output + determines how to display text from background sockets #current #foreground #background #foreground/background/current - A socket is a world-in-use, including a network connection (usually) and a - virtual window for displaying text. TF can have multiple sockets open - simultaneously. Only one of these can be displayed at a time; this is - called the foreground socket. In visual mode, the name of the world on the - foreground socket is displayed on the status line. Other sockets are in the - background. Text from any socket is triggered and stored in history - immediately, but is not displayed until that socket is brought into the - foreground. Handling of events in background sockets can be customized with - the %{bg_output} and %{background} flags. - - The current socket is the socket to which commands are sent. The current - socket is almost always the same as the foreground socket, except: 1) when a - macro is triggered from any socket, that socket becomes the current socket - for the duration of that macro execution; 2) when a /repeat or /quote with - world redirection runs (-w option), that world's socket becomes the current - socket for the duration of the process execution. + A socket is a world-in-use, including a network connection (usually) and a + virtual window for displaying text. TF can have multiple sockets open + simultaneously. Only one of these can be displayed at a time; this is + called the foreground socket. In visual mode, the name of the world on the + foreground socket is displayed on the status line. Other sockets are in the + background. Text from any socket is triggered and stored in history + immediately, but is not displayed until that socket is brought into the + foreground. Handling of events in background sockets can be customized with + the %{bg_output} and %{background} flags. + + The current socket is the socket to which commands are sent. The current + socket is almost always the same as the foreground socket, except: 1) when a + macro is triggered from any socket, that socket becomes the current socket + for the duration of that macro execution; 2) when a /repeat or /quote with + world redirection runs (-w option), that world's socket becomes the current + socket for the duration of the process execution. # - Text from a socket goes through a number of checks before being displayed. - If the text matches any trigger patterns, a macro may be executed, or the - text may be gagged or hilited. If the text was not gagged, TF also checks - to see if it should be suppressed because of %quiet, /watchdog or - /watchname. Finally, the text is added to the world's history and the - global history, and is queued for display. - - You can open a new socket in several ways: - - * By giving the world name or address on the command line when - starting tf. - * By using a /connect or /world command. - * By "bamfing" through a portal between muds (see "bamf"). - - You can switch between foreground sockets with the /fg command; the /dokey - socketb and /dokey socketf commands, which by default are bound to ESC-left - and ESC-right; and with the ESC-w keybinding, which switches to the next - world with activity, or if there is none, to the last world you were on. - - If the %{quitdone} flag is on, and you disconnect from all worlds (either - with /dc or because the other end of the socket's network connection - closes), TF will exit. - - If the %{sockmload} flag is on, a world's macro file will be loaded when you - switch to the socket for that world (either with the next and previous - socket keys or with the /world command). - - TF supports several TELNET options; see telnet. - - If %{proxy_host} is defined, all connections will go through a proxy server. - See: proxy. - - Normally, certain types of disconnection can only be detected when you try - to send something on a connection. TF uses the socket option SO_KEEPALIVE - to detect such disconnections even when idle, but it usually takes at least - 2 hours to detect. The time limit is usually a property of the operating - system, and can not be set by TF or an unprivileged user. + Text from a socket goes through a number of checks before being displayed. + If the text matches any trigger patterns, a macro may be executed, or the + text may be gagged or hilited. If the text was not gagged, TF also checks + to see if it should be suppressed because of %quiet, /watchdog or + /watchname. Finally, the text is added to the world's history and the + global history, and is queued for display. + + You can open a new socket in several ways: + + * By giving the world name or address on the command line when + starting tf. + * By using a /connect or /world command. + * By "bamfing" through a portal between MUDs (see "bamf"). + + You can switch between foreground sockets with the /fg command; the /dokey + socketb and /dokey socketf commands, which by default are bound to ESC-left + and ESC-right; and with the ESC-w keybinding, which switches to the next + world with activity, or if there is none, to the last world you were on. + + If the %{quitdone} flag is on, and you disconnect from all worlds (either + with /dc or because the other end of the socket's network connection + closes), TF will exit. + + If the %{sockmload} flag is on, a world's macro file will be loaded when you + switch to the socket for that world (either with the next and previous + socket keys or with the /world command). + + TF supports several TELNET options; see telnet. + + If %{proxy_host} is defined, all connections will go through a proxy server. + See: proxy. + + Normally, certain types of disconnection can only be detected when you try + to send something on a connection. TF uses the socket option SO_KEEPALIVE + to detect such disconnections even when idle, but it usually takes at least + 2 hours to detect. The time limit is usually a property of the operating + system, and can not be set by TF or an unprivileged user. #loopback #connectionless #connectionless socket - A "connectionless" socket is created when you /connect to a world that does - not have a host or port defined. If the world also has the echo flag set, - any text you "send" to the socket is immediately "received", as if you were - connected to an echo server. + A "connectionless" socket is created when you /connect to a world that does + not have a host or port defined. If the world also has the echo flag set, + any text you "send" to the socket is immediately "received", as if you were + connected to an echo server. - See also: worlds + See also: worlds &flags &globals @@ -8759,291 +8770,297 @@ sockets special variables - Many options in TF can be controlled by setting special global variables. - Many variables have a limited number of permitted values, with corresponding - integer values; these are called enumerated variables. All flags are - enumerated variables which can have the values "off" (0) or "on" (1). - Numeric variables can have any integer value (within the range allowed by - your system). Attempting to unset numeric variable or give it a string - value will force its value to 0. Dtime variables represent a time duration - or period; their values can be written as a number of seconds or in - hours:minutes[:seconds] format, with up to 6 decimal places (microseconds). - A variable's type (enumerated, numeric, dtime, or string) affects its - behavior in expressions. + Many options in TF can be controlled by setting special global variables. + Many variables have a limited number of permitted values, with corresponding + integer values; these are called enumerated variables. All flags are + enumerated variables which can have the values "off" (0) or "on" (1). + Numeric variables can have any integer value (within the range allowed by + your system). Attempting to unset numeric variable or give it a string + value will force its value to 0. Dtime variables represent a time duration + or period; their values can be written as a number of seconds or in + hours:minutes[:seconds] format, with up to 6 decimal places (microseconds). + A variable's type (enumerated, numeric, dtime, or string) affects its + behavior in expressions. Special substitute-only variables - The following special variables may be used only in substitutions, never as - a variable reference in an expression. + The following special variables may be used only in substitutions, never as + a variable reference in an expression. ## #%# - # The number of words in a macro's argument text. + # The number of words in a macro's argument text. #? #%? - ? The string return value of the most recently executed command - (builtin or macro). (Macros) called as functions return their value - and do not set %?.) + ? The string return value of the most recently executed command + (builtin or macro). (Macros) called as functions return their value + and do not set %?.) # - 1,2... - L1,L2... - * - R Positional parameters. See "substitution". (As of 5.0 beta 7, - these are case sensitive.) + 1,2... + L1,L2... + * + R Positional parameters. See "substitution". (As of 5.0 beta 7, + these are case sensitive.) # - P<n> - PL - PR The text matched by the <n>th parenthesized subexpression, or the - text to the left or right of the matched text, in the last - successful regexp comparison. See %Pn for more details. (As of 5.0 - beta 7, these are case sensitive.) + P<n> + PL + PR The text matched by the <n>th parenthesized subexpression, or the + text to the left or right of the matched text, in the last + successful regexp comparison. See %Pn for more details. (As of 5.0 + beta 7, these are case sensitive.) # Special global variables - The following special global variables can be examined and set. In the - following list, a '=' following a variable name indicates its default value. - For variables that do not have defaults listed, the default is dependent on - your system or configuration. + The following special global variables can be examined and set. In the + following list, a '=' following a variable name indicates its default value. + For variables that do not have defaults listed, the default is dependent on + your system or configuration. #COLUMNS #%COLUMNS - COLUMNS - If this variable is set in the environment when TF starts, TF will - use its value instead of the value from the terminal driver. See - %LINES, columns(). + COLUMNS + If this variable is set in the environment when TF starts, TF will + use its value instead of the value from the terminal driver. See + %LINES, columns(). #HOME #%HOME - HOME Your home directory, used by /cd and filename expansion. This is - usually inherited from the environment when TF starts. + HOME Your home directory, used by /cd and filename expansion. This is + usually inherited from the environment when TF starts. #LANG #%LANG - LANG The current locale. See locale. Automatically exported to the - environment when set. + LANG The current locale. See locale. Automatically exported to the + environment when set. #LC_ALL #%LC_ALL - LC_ALL The current locale. See locale. Automatically exported to the - environment when set. + LC_ALL The current locale. See locale. Automatically exported to the + environment when set. #LC_CTYPE #%LC_CTYPE - LC_CTYPE - The current locale for character classification. See locale. - Automatically exported to the environment when set. + LC_CTYPE + The current locale for character classification. See locale. + Automatically exported to the environment when set. #LC_TIME #%LC_TIME - LC_TIME - The current locale for time formatting. See locale. Automatically - exported to the environment when set. + LC_TIME + The current locale for time formatting. See locale. Automatically + exported to the environment when set. #LINES #%LINES - LINES If this variable is set in the environment when TF starts, TF will - use its value instead of the value from the terminal driver. See - %COLUMNS, lines(). + LINES If this variable is set in the environment when TF starts, TF will + use its value instead of the value from the terminal driver. See + %COLUMNS, lines(). #%MAIL - MAIL The name of a file which TF may check for mail. See: mail. + MAIL The name of a file which TF may check for mail. See: mail. #SHELL #%SHELL - SHELL Shell used by /sh and /quote !. This is usually inherited from the - environment when TF starts. + SHELL Shell used by /sh and /quote !. This is usually inherited from the + environment when TF starts. #terminal #term #TERM #%TERM - TERM Terminal type. Changing the value of %TERM at any time will cause - TF to re-initialize its display functions to use the new value. The - value of %TERM should agree with your actual terminal or emulator. - If your emulator supports multiple terminal types, the recommended - type to use is vt220, vt100, or ansi (in that order). %TERM is - usually inherited from the environment when TF starts. See also: - mode. + TERM Terminal type. Changing the value of %TERM at any time will cause + TF to re-initialize its display functions to use the new value. The + value of %TERM should agree with your actual terminal or emulator. + If your emulator supports multiple terminal types, the recommended + type to use is vt220, vt100, or ansi (in that order). %TERM is + usually inherited from the environment when TF starts. See also: + mode. #TFHELP #%TFHELP - TFHELP=%{TFLIBDIR}/tf-help - The name of the file used by /help. + TFHELP=%{TFLIBDIR}/tf-help + The name of the file used by /help. #TFLIBDIR #%TFLIBDIR - TFLIBDIR - The name of the TF library directory, which should contain the help - file (tf-help), the standard library (stdlib.tf), the local library - (local.tf), and many useful utility files. The default value of - TFLIBDIR is set when TF is installed, but can be overridden by - setting it in the environment before starting TF. This directory - will be searched by /load if TFPATH is blank or not set. See also: - /load. + TFLIBDIR + The name of the TF library directory, which should contain the help + file (tf-help), the standard library (stdlib.tf), the local library + (local.tf), and many useful utility files. The default value of + TFLIBDIR is set when TF is installed, but can be overridden by + setting it in the environment before starting TF. This directory + will be searched by /load if TFPATH is blank or not set. See also: + /load. #TFLIBRARY #%TFLIBRARY - TFLIBRARY=%{TFLIBDIR}/stdlib.tf - The name of the library file loaded at startup. This can be set in - the environment before starting TF, to load from an alternate - library file. + TFLIBRARY=%{TFLIBDIR}/stdlib.tf + The name of the library file loaded at startup. This can be set in + the environment before starting TF, to load from an alternate + library file. #MAILPATH #TFMAILPATH #%TFMAILPATH - TFMAILPATH - A space-separated list of files which TF may check for mail. - Literal spaces in a filename must be preceded by "\". See: mail. + TFMAILPATH + A space-separated list of files which TF may check for mail. + Literal spaces in a filename must be preceded by "\". See: mail. #TFPATH #%TFPATH - TFPATH= - A space-separated list of directories that will be searched by - /load. Literal spaces in a directory name must be preceded by "\". - If this is set, %{TFLIBDIR} will be ignored by /load, so be sure to - include the value of %{TFLIBDIR} in %{TFPATH} if you want to be able - to /load files with relative names from the standard library - directory. See also: /load. + TFPATH= + A space-separated list of directories that will be searched by + /load. Literal spaces in a directory name must be preceded by "\". + If this is set, %{TFLIBDIR} will be ignored by /load, so be sure to + include the value of %{TFLIBDIR} in %{TFPATH} if you want to be able + to /load files with relative names from the standard library + directory. See also: /load. #timezone #time zone #TZ #%TZ - TZ On most systems, the timezone used to display formatted times. In - the United States, the value is usually the local timezone name, - followed by the difference in hours from GMT, followed by an - optional daylight saving timezone name; for example, "PST8PDT". For - details, see your system documentation for tzset(3) or environ(5). - This is usually inherited from the environment when TF starts, and - is automatically exported to the environment when set. + TZ On most systems, the timezone used to display formatted times. In + the United States, the value is usually the local timezone name, + followed by the difference in hours from GMT, followed by an + optional daylight saving timezone name; for example, "PST8PDT". For + details, see your system documentation for tzset(3) or environ(5). + This is usually inherited from the environment when TF starts, and + is automatically exported to the environment when set. #alert_attr #%alert_attr - alert_attr=Br - The attributes used to display alert text on the status line. + alert_attr=Br + The attributes used to display alert text on the status line. #alert_time #%alert_time - alert_time=5.0 - (dtime) The number of seconds that alert text is displayed on the - status line. See tfio. + alert_time=5.0 + (dtime) The number of seconds that alert text is displayed on the + status line. See tfio. + +#ansi_log +#%ansi_log + ansi_log=off + (flag) Enable ANSI sequences in log files. + See also: /log. #background #%background - background=on - (flag) If on, text from background worlds is processed and recorded - immediately upon receipt. Otherwise, the text is ignored until the - socket is brought into the foreground. In either case, the text is - not displayed until the socket is brought into the foreground (but - see %{bg_output}). + background=on + (flag) If on, text from background worlds is processed and recorded + immediately upon receipt. Otherwise, the text is ignored until the + socket is brought into the foreground. In either case, the text is + not displayed until the socket is brought into the foreground (but + see %{bg_output}). #backslash #%backslash - backslash=on - (flag) Enables use of '\' to quote the following character literally - during macro expansion. Generally, this should only be turned off - if you are having problems with '\' in macros written before version - 3.0. + backslash=on + (flag) Enables use of '\' to quote the following character literally + during macro expansion. Generally, this should only be turned off + if you are having problems with '\' in macros written before version + 3.0. #bamf #%bamf - bamf=off - (enumerated) - off (0): server "portals" are ignored. - on (1): Unter-style bamfing is enabled (disconnect). - old (2): Old-style bamfing is enabled (no disconnect). - See /bamf. + bamf=off + (enumerated) + off (0): server "portals" are ignored. + on (1): Unter-style bamfing is enabled (disconnect). + old (2): Old-style bamfing is enabled (no disconnect). + See /bamf. #bg_output #%bg_output - bg_output=on - (flag) When a world is brought into the foreground, %bg_output - determines how to display output that was produced while the world - was in the background: If on, the window display resumes where it - left off; if off, the window display jumps to the end, showing only - the last screenful. Turning %bg_output off is equivalent to always - using the -q option with /fg. The %bg_output flag has no effect on - other processing, including triggers and history. This flag is - ignored if the %{background} flag is off. %{background} is tested - when the world is foregrounded (in versions before 5.0, it was - tested when the text was received). (See also: /fg -q) + bg_output=on + (flag) When a world is brought into the foreground, %bg_output + determines how to display output that was produced while the world + was in the background: If on, the window display resumes where it + left off; if off, the window display jumps to the end, showing only + the last screenfull. Turning %bg_output off is equivalent to always + using the -q option with /fg. The %bg_output flag has no effect on + other processing, including triggers and history. This flag is + ignored if the %{background} flag is off. %{background} is tested + when the world is foregrounded (in versions before 5.0, it was + tested when the text was received). (See also: /fg -q) #binary_eol #%binary_eol - binary_eol=LF - Determines what to send as end-of-line marker in TELNET BINARY mode. - Valid values are "LF", "CR", and "CRLF". (See: /telnet) + binary_eol=LF + Determines what to send as end-of-line marker in TELNET BINARY mode. + Valid values are "LF", "CR", and "CRLF". (See: /telnet) #borg #%borg - borg=on - (flag) Enables trigger bodies (attributes are unaffected). (See: - triggers, %max_trig) + borg=on + (flag) Enables trigger bodies (attributes are unaffected). (See: + triggers, %max_trig) #clearfull #%clearfull - clearfull=off - (flag) In visual mode, clear input window rather than scroll when - full. Always on if terminal can not scroll. + clearfull=off + (flag) In visual mode, clear input window rather than scroll when + full. Always on if terminal can not scroll. #cleardone #%cleardone - cleardone=off - (flag) In visual mode, enables clearing of input window when return - is pressed. + cleardone=off + (flag) In visual mode, enables clearing of input window when return + is pressed. #%clock - clock This variable is no longer supported. To disable the status bar - clock, use "/clock off". To make the clock display in 12-hour - format, do "/clock %I:%M". See /clock. + clock This variable is no longer supported. To disable the status bar + clock, use "/clock off". To make the clock display in 12-hour + format, do "/clock %I:%M". See /clock. #clock_format #%clock_format - clock_format=%H:%M - The format of the clock displayed on the status line. To make the - clock display in 12-hour format, "/set clock_format=%I:%M". See - also: /clock, %time_format. + clock_format=%H:%M + The format of the clock displayed on the status line. To make the + clock display in 12-hour format, "/set clock_format=%I:%M". See + also: /clock, %time_format. #connect #%connect - connect=nonblocking - Set to "blocking" or "nonblocking" to determine how /connect works. - Default is "nonblocking" on platforms that support it. Nonblocking - allows you to continue doing other things while TF tries to - establish a new connection. See also %gethostbyname. + connect=nonblocking + Set to "blocking" or "nonblocking" to determine how /connect works. + Default is "nonblocking" on platforms that support it. Nonblocking + allows you to continue doing other things while TF tries to + establish a new connection. See also %gethostbyname. #default_charset #%default_charset - default_charset=US-ASCII - Set the default character set for newly created worlds. For use with - MUDs that do not negotiate the character set they use. Changing - this does not alter the character sets of any worlds. + default_charset=US-ASCII + Set the default character set for newly created worlds. For use with + MUDs that do not negotiate the character set they use. Changing + this does not alter the character sets of any worlds. #defcompile #%defcompile - defcompile=off - (flag) If off, macro bodies are compiled the first time they are - executed; if on, macro bodies are compiled immediately when they are - defined. Since syntax checking is performed during compilation, - setting defcompile=on will allow you to see the syntax errors in a - macro when you define it instead of waiting until execution. + defcompile=off + (flag) If off, macro bodies are compiled the first time they are + executed; if on, macro bodies are compiled immediately when they are + defined. Since syntax checking is performed during compilation, + setting defcompile=on will allow you to see the syntax errors in a + macro when you define it instead of waiting until execution. #%e - e=2.718281828... - Euler's number. + e=2.718281828... + Euler's number. #expand_tabs #%expand_tabs - expand_tabs=on - (flag) If on (and %emulation is "print", "ansi_strip", or - "ansi_attr"), tabs received from a server are expanded to spaces - (according to %tabsize) immediately, before any trigger processing. - If off, tab characters are left in received lines. + expand_tabs=on + (flag) If on (and %emulation is "print", "ansi_strip", or + "ansi_attr"), tabs received from a server are expanded to spaces + (according to %tabsize) immediately, before any trigger processing. + If off, tab characters are left in received lines. #raw #canon @@ -9053,198 +9070,218 @@ Special global variables #ansi_attr #emulation #%emulation - emulation=ansi_attr - Determines how special codes sent by the server should be - interpreted by TF. The set of printable characters is determined by - the current locale. Valid values for %emulation are: - raw: No conversion is done; lines are not wrapped; all - nonprintable characters are displayed, and their effect is - undefined (depending mainly on your terminal). TF's input - display is not guaranteed correct; use at your own risk. - This mode allows the server to have most of the control over - the screen, but is not guaranteed to give the desired - effect, and will interfere with trigger matching. For best - results, %visual should be "off", and TF attributes should - not be used. "Raw" is not recommended unless you know what - you're doing. - print: Tabs are expanded (if %expand_tabs is on); backspaces are - interpreted; lines are wrapped; nonprintable characters - removed. - ansi_strip: - Like "print", but ANSI display codes are also removed. - ansi_attr: - Like "ansi_strip", but ANSI display attribute codes will be - converted to TF's internal format and displayed correctly - (on any terminal). Other ANSI display codes (e.g., cursor - motion) will be removed. Recommended, especially for - servers that send vt100/ansi display attribute codes. - debug: converts nonprinting characters to a printable form. See - also: %telopt. - See also: %istrip, %meta_esc, %tabsize, %expand_tabs, locale, - attributes, debugging. + emulation=ansi_attr + Determines how special codes sent by the server should be + interpreted by TF. The set of printable characters is determined by + the current locale. Valid values for %emulation are: + raw: No conversion is done; lines are not wrapped; all + nonprintable characters are displayed, and their effect is + undefined (depending mainly on your terminal). TF's input + display is not guaranteed correct; use at your own risk. + This mode allows the server to have most of the control over + the screen, but is not guaranteed to give the desired + effect, and will interfere with trigger matching. For best + results, %visual should be "off", and TF attributes should + not be used. "Raw" is not recommended unless you know what + you're doing. + print: Tabs are expanded (if %expand_tabs is on); backspaces are + interpreted; lines are wrapped; nonprintable characters + removed. + ansi_strip: + Like "print", but ANSI display codes are also removed. + ansi_attr: + Like "ansi_strip", but ANSI display attribute codes will be + converted to TF's internal format and displayed correctly + (on any terminal). Other ANSI display codes (e.g., cursor + motion) will be removed. Recommended, especially for + servers that send vt100/ansi display attribute codes. + debug: converts nonprinting characters to a printable form. See + also: %telopt. + See also: %istrip, %meta_esc, %tabsize, %expand_tabs, locale, + attributes, debugging. #end_color #%end_color - end_color - The code that should be sent to your terminal to return to normal - color after a %{start_color_*} code. See: color. + end_color + The code that should be sent to your terminal to return to normal + color after a %{start_color_*} code. See: color. #error_attr #%error_attr - error_attr - Defines the attributes used by the "E" attribute. Can be any - combination of attributes, including color names. See: attributes. + error_attr + Defines the attributes used by the "E" attribute. Can be any + combination of attributes, including color names. See: attributes. + +#error_prefix +#%errpr_prefix + error_prefix=% + Prefix prepended to all normal error messages. + By default all normal error messages will be prefixed with '%' #gag #%gag - gag=on (flag) Enable the gag attribute. (See: /gag, /nogag) + gag=on (flag) Enable the gag attribute. (See: /gag, /nogag) #gethostbyname #%gethostbyname - gethostbyname=nonblocking - Set to "blocking" or "nonblocking" to determine how /connect does - hostname resolution. See also %connect. + gethostbyname=nonblocking + Set to "blocking" or "nonblocking" to determine how /connect does + hostname resolution. See also %connect. #gpri #%gpri - gpri=0 Priority of subsequent /gags. (See: /gag) + gpri=0 Priority of subsequent /gags. (See: /gag) #hook #%hook - hook=on - (flag) Enable hooks. (See: hooks, /hook, %max_hook.) Note that - autologin and automatic %{lp} setting will not work if %{hook} is 0. + hook=on + (flag) Enable hooks. (See: hooks, /hook, %max_hook.) Note that + autologin and automatic %{lp} setting will not work if %{hook} is 0. #hilite #%hilite - hilite=on - (flag) Enable display attributes, whether from a trigger, the - server, or whatever. (See: /hilite, /nohilite) + hilite=on + (flag) Enable display attributes, whether from a trigger, the + server, or whatever. (See: /hilite, /nohilite) #hiliteattr #%hiliteattr - hiliteattr=B - Defines the attributes used by hilites. Can be any combination of - attributes, including color names. (See: attributes, /hilite) + hiliteattr=B + Defines the attributes used by hilites. Can be any combination of + attributes, including color names. (See: attributes, /hilite) #histsize #%histsize - histsize=1000 - When a new world history is created, it will have space for - %{histsize} lines. A world history is created the first time text - is sent to it. (See also: /histsize) + histsize=5000 + When a new world history is created, it will have space for + %{histsize} lines. A world history is created the first time text + is sent to it. (See also: /histsize) #hpri #%hpri - hpri=0 Priority of subsequent /hilites. + hpri=0 Priority of subsequent /hilites. #insert #typeover #%insert - insert=on - (flag) If on, keyboard input is inserted; if off, input overstrikes - existing text. + insert=on + (flag) If on, keyboard input is inserted; if off, input overstrikes + existing text. #interactive #%interactive - interactive - (flag) If off, TF will not prompt for /quit, returning from /sh, - SIGINT (^C), or SIGQUIT (^\). Defaults to on if standard input and - output are attatched to a terminal, off otherwise. + interactive + (flag) If off, TF will not prompt for /quit, returning from /sh, + SIGINT (^C), or SIGQUIT (^\). Defaults to on if standard input and + output are attached to a terminal, off otherwise. #isize #%isize - isize=3 - Size of input window in visual mode. The output window will be - redrawn when this is changed. See also: lines(), winlines(). + isize=3 + Size of input window in visual mode. The output window will be + redrawn when this is changed. See also: lines(), winlines(). #istrip #%istrip - istrip=off - (flag) If on, the meta (high) bit will be stripped from all input - characters. Note that this will prevent %meta_esc and locales with - 8-bit characters from working correctly. + istrip=off + (flag) If on, the meta (high) bit will be stripped from all input + characters. Note that this will prevent %meta_esc and locales with + 8-bit characters from working correctly. #%kbnum - kbnum= A value that can be set by typing ESC followed by digits, to be used - as an argument (repeat count) for a subsequent keybinding. See: - keybindings. + kbnum= A value that can be set by typing ESC followed by digits, to be used + as an argument (repeat count) for a subsequent keybinding. See: + keybindings. #kecho #%kecho - kecho=off - (flag) Enables echoing of keyboard input, preceded by %{kprefix}. - See also: %{kecho_attr}. %{secho}. /localecho, /addworld -e. + kecho=off + (flag) Enables echoing of keyboard input, preceded by %{kprefix}. + See also: %{kecho_attr}. %{secho}. /localecho, /addworld -e. #kecho_attr #%kecho_attr - kecho_attr - Attributes used for lines echoed by %{kecho}. + kecho_attr + Attributes used for lines echoed by %{kecho}. #keepalive #%keepalive - keepalive=on - (flag) Enable periodic "pings" (TCP keepalive) of servers, to - prevent network timeouts and detect dropped connections. Note: the - timing of keepalive messages is a system parameter that can not be - changed from tf. + keepalive=on + (flag) Enable periodic "pings" (TCP keepalive) of servers, to + prevent network timeouts and detect dropped connections. Note: the + timing of keepalive messages is a system parameter that can not be + changed from tf. #%keypad - keypad=on - (flag) Enable application keypad mode, if supported by the terminal. - Application keypad mode makes the numeric keypad generate characters - different than the usual digit characters, so they may be - distinguished from the digit keys across the top of the keyboard. - See: keybindings. + keypad=on + (flag) Enable application keypad mode, if supported by the terminal. + Application keypad mode makes the numeric keypad generate characters + different than the usual digit characters, so they may be + distinguished from the digit keys across the top of the keyboard. + See: keybindings. #kprefix #%kprefix - kprefix= - Prefix prepended to lines echoed by %{kecho}. + kprefix= + Prefix prepended to lines echoed by %{kecho}. #%login - login=on - (flag) Enable automatic login hook. (See: automatic login, hooks, - /world) + login=on + (flag) Enable automatic login hook. (See: automatic login, hooks, + /world + +#log_prefix +#%log_prefix + log_prefix= + Prefix prepended to all logged lines. + The current time can be referenced with %t and will be formatted + according to what is set in %{log_time_format}. + See: /log log_time_format + +#log_time_format +#%log_time_format + log_time_format=%H:%M:%S + Format for current time when referenced by %{log_prefix}. + See: /log, log_prefix ftime #lp #%lp - lp=off (flag) Displays partial lines as prompts, after a short timeout. - Useful for LP and Diku MUDs. (See: prompts) + lp=off (flag) Displays partial lines as prompts, after a short timeout. + Useful for LP and Diku MUDs. (See: prompts) #lpquote #%lpquote - lpquote=off - (flag) If on, all /quote and /repeat processes run when an LP prompt - is received instead of when a timer expires. The -P option of - /quote and /repeat provides the same feature on a per-process basis. - (See: processes) + lpquote=off + (flag) If on, all /quote and /repeat processes run when an LP prompt + is received instead of when a timer expires. The -P option of + /quote and /repeat provides the same feature on a per-process basis. + (See: processes) #maildelay #%maildelay - maildelay=0:01:00.0 (60 seconds) - (dtime) Delay between mail checks. Setting this to 0 disables mail - checking. The file to be checked is named by the %{MAIL} variable. + maildelay=0:01:00.0 (60 seconds) + (dtime) Delay between mail checks. Setting this to 0 disables mail + checking. The file to be checked is named by the %{MAIL} variable. #matching #%matching - matching=glob - (enumerated) Determines the default pattern matching style. - "simple": - straightforward string comparison. - "glob": - shell-like matching (as before version 3.2). - "regexp": - regular expression. - See also: patterns, regmatch(), %Pn. + matching=glob + (enumerated) Determines the default pattern matching style. + "simple": + straightforward string comparison. + "glob": + shell-like matching (as before version 3.2). + "regexp": + regular expression. + See also: patterns, regmatch(), %Pn. #max_hook #%max_hook - max_hook=1000 - Maximum number of hooks allowed in a 10 second period. When this - value is exceeded, a message is printed and %hook is automatically - turned off to disable hooks. This helps prevent infinite hook - loops. A value of 0 will allow unlimited hooks. + max_hook=1000 + Maximum number of hooks allowed in a 10 second period. When this + value is exceeded, a message is printed and %hook is automatically + turned off to disable hooks. This helps prevent infinite hook + loops. A value of 0 will allow unlimited hooks. #max_instr #iteration @@ -9252,231 +9289,236 @@ Special global variables #instruction #instructions #%max_instr - max_instr=1000000 - Maximum number of instructions in a macro execution. A value of 0 - will allow unlimited instructions. An "instruction" is a basic - internal tf operation, such as addition, testing an /if or /while - condition, a substitution, sending a line of text to a server, or - joining two commands with a "%|" pipe. + max_instr=1000000 + Maximum number of instructions in a macro execution. A value of 0 + will allow unlimited instructions. An "instruction" is a basic + internal tf operation, such as addition, testing an /if or /while + condition, a substitution, sending a line of text to a server, or + joining two commands with a "%|" pipe. #max_kbnum #%max_kbnum - max_kbnum=999 - The maximum value of kbnum that can be set via the keyboard. See: - keybindings. + max_kbnum=999 + The maximum value of kbnum that can be set via the keyboard. See: + keybindings. #max_recur #recursion #recursions #%max_recur - max_recur=100 - Maximum depth of recursive macro calls or triggers. This helps - prevent infinite macro loops. A value of 0 will allow unlimited - recursion. + max_recur=100 + Maximum depth of recursive macro calls or triggers. This helps + prevent infinite macro loops. A value of 0 will allow unlimited + recursion. #max_trig #%max_trig - max_trig=1000 - Maximum number of triggers allowed in a 10 second period. When this - value is exceeded, a message is printed and %borg is automatically - turned off to disable triggers. This helps prevent infinite trigger - loops. A value of 0 will allow unlimited triggers. + max_trig=1000 + Maximum number of triggers allowed in a 10 second period. When this + value is exceeded, a message is printed and %borg is automatically + turned off to disable triggers. This helps prevent infinite trigger + loops. A value of 0 will allow unlimited triggers. #%mccp - mccp=on (if tf was compiled with MCCP support) - (flag) If on, MCCPv2 is allowed on new connections. See mccp. + mccp=on (if tf was compiled with MCCP support) + (flag) If on, MCCPv2 is allowed on new connections. See mccp. #mecho #%mecho - mecho=off - (enumerated) - "off" (0): - do not echo macro expansions. - "on" (1): - echo expansions of non-invisible macros. - "all" (2): - echo expansions of all macros. - %{mprefix} will be prepended once for each recursion level when - macro expansion echoing is enabled. See also: %{mecho_attr}, - debugging. + mecho=off + (enumerated) + "off" (0): + do not echo macro expansions. + "on" (1): + echo expansions of non-invisible macros. + "all" (2): + echo expansions of all macros. + %{mprefix} will be prepended once for each recursion level when + macro expansion echoing is enabled. See also: %{mecho_attr}, + debugging. #mecho_attr #%mecho_attr - mecho_attr - Attributes used for lines echoed by %{mecho}. + mecho_attr + Attributes used for lines echoed by %{mecho}. #meta_esc #meta #%meta_esc - meta_esc=nonprint - (enumerated) If %istrip is off, typed characters with their meta - (high) bit set may have the meta bit stripped and be prefixed with - an ESC character. This allows META-x and ESC x to invoke the same - keybinding. Possible values of %meta_esc: - "off" (0): - Never convert a meta bit to ESC. - "on" (1): - Always convert a meta bit to ESC. - "nonprint" (2): - Convert a meta bit to ESC only if the meta bit makes the - character unprintable in the current locale. - Meta bit conversion can be prevented for a single keystroke by - preceeding it with the LNEXT key (^V), regardless of the state of - %meta_esc. + meta_esc=nonprint + (enumerated) If %istrip is off, typed characters with their meta + (high) bit set may have the meta bit stripped and be prefixed with + an ESC character. This allows META-x and ESC x to invoke the same + keybinding. Possible values of %meta_esc: + "off" (0): + Never convert a meta bit to ESC. + "on" (1): + Always convert a meta bit to ESC. + "nonprint" (2): + Convert a meta bit to ESC only if the meta bit makes the + character unprintable in the current locale. + Meta bit conversion can be prevented for a single keystroke by + preceding it with the LNEXT key (^V), regardless of the state of + %meta_esc. #more #%more - more=off - (flag) Displays output one screenfull at a time. (See: /more) + more=off + (flag) Displays output one screenfull at a time. (See: /more) #mprefix #%mprefix - mprefix=+ - Prefix prepended to lines echoed by %{mecho}. + mprefix=+ + Prefix prepended to lines echoed by %{mecho}. #oldslash #%oldslash - oldslash=on - (flag) If on, sequences of more than one '/' in a macro body will be - compressed by one during macro expansion. This allows macros - written before version 3.0 to work properly. With oldslash=off, - only slashes at the beginning of a body are handled specially. You - are encouraged to turn this off. (See: evaluation) + oldslash=on + (flag) If on, sequences of more than one '/' in a macro body will be + compressed by one during macro expansion. This allows macros + written before version 3.0 to work properly. With oldslash=off, + only slashes at the beginning of a body are handled specially. You + are encouraged to turn this off. (See: evaluation) + +#oldunnamed +#%oldunnamed + oldunnamed=off + (flag) If on, unnamed worlds will have their names wrapped in parentheses. #%pi - pi=3.141592654... - The ratio of a circle's circumference to its diameter. + pi=3.141592654... + The ratio of a circle's circumference to its diameter. #pedantic #%pedantic - pedantic=off - (flag) If on, TF will generate warnings about some potential - problems in your macro code. Often the warnings indicate code that - is technically valid but may not do what you intended. See also - debugging. + pedantic=off + (flag) If on, TF will generate warnings about some potential + problems in your macro code. Often the warnings indicate code that + is technically valid but may not do what you intended. See also + debugging. #prompt_sec #%prompt_sec #prompt_usec #%prompt_usec - prompt_sec - prompt_usec - Obsolete. Use %{prompt_wait} instead. + prompt_sec + prompt_usec + Obsolete. Use %{prompt_wait} instead. #prompt_wait #%prompt_wait - prompt_wait=0.25 - (dtime) The delay (in seconds) used to recognize unterminated - prompts. (See: prompts). + prompt_wait=0.25 + (dtime) The delay (in seconds) used to recognize unterminated + prompts. (See: prompts). #proxy_host #%proxy_host #proxy_port #%proxy_port - proxy_host= - proxy_port=23 - These two variables describe the proxy server used for opening - connections. (See: proxy). + proxy_host= + proxy_port=23 + These two variables describe the proxy server used for opening + connections. (See: proxy). #ptime #%ptime - ptime=1.0 - (dtime) Default delay (in seconds) between /quote and /repeat - process runs. + ptime=1.0 + (dtime) Default delay (in seconds) between /quote and /repeat + process runs. #qecho #%qecho - qecho=off - (flag) Echoing of /quote text. See also: %{qprefix}, %{qecho_attr}, - debugging. + qecho=off + (flag) Echoing of /quote text. See also: %{qprefix}, %{qecho_attr}, + debugging. #qecho_attr #%qecho_attr - qecho_attr - Attributes used for lines echoed by %{qecho}. + qecho_attr + Attributes used for lines echoed by %{qecho}. #qprefix #%qprefix - qprefix= - Prefix prepended to lines echoed by %{qecho}. + qprefix= + Prefix prepended to lines echoed by %{qecho}. #quiet login #quiet #%quiet - quiet=off - (flag) Gag text after login until the mud sends "Use the WHO - command", "### end of messages ###", or 25 lines. Note: This will - not function correctly on MUDs which don't send those strings or 25 - lines in the introductory text. + quiet=off + (flag) Gag text after login until the mud sends "Use the WHO + command", "### end of messages ###", or 25 lines. Note: This will + not function correctly on MUDs which don't send those strings or 25 + lines in the introductory text. #quitdone #%quitdone - quitdone=off - (flag) Quit upon disconnection from last socket. + quitdone=off + (flag) Quit upon disconnection from last socket. #redef #%redef - redef=on - (flag) Allows redefinition of existing worlds, keybindings, and - named macros. + redef=on + (flag) Allows redefinition of existing worlds, keybindings, and + named macros. #refreshtime #%refreshtime - refreshtime=100000 - (int) The delay (in microseconds) for redisplaying your keyboard - input after it is overwritten by incoming text in non-visual mode. - If you have a slow connection between you and tf, you may wish to - increase this delay. The default is 100000 (1/10 second). + refreshtime=100000 + (int) The delay (in microseconds) for redisplaying your keyboard + input after it is overwritten by incoming text in non-visual mode. + If you have a slow connection between you and tf, you may wish to + increase this delay. The default is 100000 (1/10 second). #scroll #%scroll - scroll=on - (flag) In visual mode, scroll output instead of wrapping from bottom - to top. + scroll=on + (flag) In visual mode, scroll output instead of wrapping from bottom + to top. #secho #%secho - secho=off - (flag) Echoing of text before sending it to the server (above the - TELNET layer). See also: %{sprefix}, %{secho_attr}, %{kecho}. - %{telopt}, debugging. + secho=off + (flag) Echoing of text before sending it to the server (above the + TELNET layer). See also: %{sprefix}, %{secho_attr}, %{kecho}. + %{telopt}, debugging. #secho_attr #%secho_attr - secho_attr - Attributes used for lines echoed by %{secho}. + secho_attr + Attributes used for lines echoed by %{secho}. #shpause #%shpause - shpause=on - (flag) Wait for a keypress after returning from /sh (unless - %interactive is off). + shpause=on + (flag) Wait for a keypress after returning from /sh (unless + %interactive is off). #sigfigs #%sigfigs - sigfigs=15 - The maximum number of significant digits to display when printing a - floating point number. Note that 16 or more may introduce rounding - error. Also note that some real numbers with up to 6 decimal places - are stored with fixed points, not floating points, so are not - affected by sigfigs (or rounding error). + sigfigs=15 + The maximum number of significant digits to display when printing a + floating point number. Note that 16 or more may introduce rounding + error. Also note that some real numbers with up to 6 decimal places + are stored with fixed points, not floating points, so are not + affected by sigfigs (or rounding error). #snarf #%snarf - snarf=off - (flag) Don't send empty lines to the server. + snarf=off + (flag) Don't send empty lines to the server. #sockmload #%sockmload - sockmload=off - (flag) Load macro files when foregrounding a world ("/dokey - socketf", "/dokey socketb", or "/fg"). Normally, a world's macro - file is loaded only when TF first connects to it. (Note: the WORLD - hook is more useful than sockmload). + sockmload=off + (flag) Load macro files when foregrounding a world ("/dokey + socketf", "/dokey socketb", or "/fg"). Normally, a world's macro + file is loaded only when TF first connects to it. (Note: the WORLD + hook is more useful than sockmload). #sprefix #%sprefix - sprefix= - Prefix prepended to lines echoed by %{secho}. + sprefix= + Prefix prepended to lines echoed by %{secho}. #start_color #%start_color @@ -9490,48 +9532,48 @@ Special global variables #%start_color_bgname #start_color_bg #%start_color_bg - start_color_<name> - start_color_bg<name> - The control code that should be sent to your terminal to produce - foreground or background color <name>. See: color. + start_color_<name> + start_color_bg<name> + The control code that should be sent to your terminal to produce + foreground or background color <name>. See: color. #status_attr #%status_attr - status_attr - The attributes used to display the status area in visual mode. See: - status area. + status_attr + The attributes used to display the status area in visual mode. See: + status area. #%status_fields - status_fields - Deprecated. The list of fields displayed on row 0 of the status area - in visual mode. See: status area. + status_fields + Deprecated. The list of fields displayed on row 0 of the status area + in visual mode. See: status area. #status_height #%status_height - status_height=1 - The number of rows in the status area in visual mode. See: status - area. + status_height=1 + The number of rows in the status area in visual mode. See: status + area. #status_pad #%status_pad - status_pad=_ - The padding character used in displaying the status area in visual - mode. See: status area. + status_pad=_ + The padding character used in displaying the status area in visual + mode. See: status area. #tab #%tab #tabs #tabsize #%tabsize - tabsize=8 - Tabs will be replaced with spaces to pad to a multiple of - %{tabsize}. See also: %expand_tabs, %emulation. + tabsize=8 + Tabs will be replaced with spaces to pad to a multiple of + %{tabsize}. See also: %expand_tabs, %emulation. #telopt #%telopt - telopt=off - (flag) Display telnet option negotiations (for debugging purposes). - See also: %emulation=debug, debugging. + telopt=off + (flag) Display telnet option negotiations (for debugging purposes). + See also: %emulation=debug, debugging. #textdiv #separator @@ -9540,156 +9582,156 @@ Special global variables #===== #dividing line #%textdiv - textdiv=on - (enumerated) When you bring a socket into the foreground, TF can - help you distinguish old text that has been displayed before from - new text that is being displayed for the first time by printing a - dividing line between the old and new text or by clearing the old - text. The setting of %textdiv controls this behavior: - "off" (0): - Never print a divider or clear the screen; just draw old and - new text normally. - "on" (1): - Print a %textdiv_str divider between old and new text. The - divider is temporary: when it scrolls off the screen, or the - screen is backgrounded, it disappears forever. - "always" (2): - Print a %textdiv_str divider after the old text even if - there is no new text. - "clear" (3): - Clear (don't redraw) all old text before displaying new - text. Old text can be manually redisplayed by scrolling - back. - See also: %textdiv_str, /fg. + textdiv=on + (enumerated) When you bring a socket into the foreground, TF can + help you distinguish old text that has been displayed before from + new text that is being displayed for the first time by printing a + dividing line between the old and new text or by clearing the old + text. The setting of %textdiv controls this behavior: + "off" (0): + Never print a divider or clear the screen; just draw old and + new text normally. + "on" (1): + Print a %textdiv_str divider between old and new text. The + divider is temporary: when it scrolls off the screen, or the + screen is backgrounded, it disappears forever. + "always" (2): + Print a %textdiv_str divider after the old text even if + there is no new text. + "clear" (3): + Clear (don't redraw) all old text before displaying new + text. Old text can be manually redisplayed by scrolling + back. + See also: %textdiv_str, /fg. #textdiv_str #%textdiv_str - textdiv_str====== - The dividing line printed between old and new text when bringing a - socket to the foreground. See %textdiv. + textdiv_str====== + The dividing line printed between old and new text when bringing a + socket to the foreground. See %textdiv. #tfhost #%tfhost - tfhost= - Name or address to use for the client (tf) end of connections. See - also: addworld, connect. + tfhost= + Name or address to use for the client (tf) end of connections. See + also: addworld, connect. #sub #%sub - sub=off - See: /sub. + sub=off + See: /sub. #time_format #%time_format - time_format=%H:%M - The format used to display times in /recall and /time. The default - displays hours and minutes. See ftime() for a description of the - format. See also: %clock_format. + time_format=%H:%M + The format used to display times in /recall and /time. The default + displays hours and minutes. See ftime() for a description of the + format. See also: %clock_format. #visual #%visual - visual=on - (flag) Divides the screen into an input window and an output window. - The output window will be redrawn when this is changed. (See: mode) + visual=on + (flag) Divides the screen into an input window and an output window. + The output window will be redrawn when this is changed. (See: mode) #warn_5keys #%warn_5keys - warn_5keys=on - (flag) If on, TF will warn the first time some of the new 5.0 - keybindings are used. + warn_5keys=on + (flag) If on, TF will warn the first time some of the new 5.0 + keybindings are used. #warn_curly_re #%warn_curly_re - warn_curly_re=on - (flag) If on, TF will warn when using a regexp containing '{', which - has a new meaning in version 5.0. + warn_curly_re=on + (flag) If on, TF will warn when using a regexp containing '{', which + has a new meaning in version 5.0. #warn_status #%warn_status - warn_status=on - (flag) If on, TF will warn when directly setting %status_fields, - %status_int_more, %status_int_world, or %status_int_clock, which - have new default values and new ways to set them in version 5.0. - See status line. + warn_status=on + (flag) If on, TF will warn when directly setting %status_fields, + %status_int_more, %status_int_world, or %status_int_clock, which + have new default values and new ways to set them in version 5.0. + See status line. #warning_attr #%warning_attr - error_attr - Defines the attributes used by the "W" attribute. Can be any - combination of attributes, including color names. See: attributes. + error_attr + Defines the attributes used by the "W" attribute. Can be any + combination of attributes, including color names. See: attributes. #watchdog #%watchdog - watchdog=off - (flag) Gag repeated lines. (See: /watchdog) + watchdog=off + (flag) Gag repeated lines. (See: /watchdog) #watchname #%watchname - watchname=off - (flag) Gag overactive players. (See: /watchname) + watchname=off + (flag) Gag overactive players. (See: /watchname) #wordpunct #%wordpunct - wordpunct=_ - List of punctuation that will be considered to be part of a word - instead of delimiting the ends of a word, by kbwordleft() and - kbwordright() (and therefore by /dokey WLEFT, WRIGHT, etc). + wordpunct=_ + List of punctuation that will be considered to be part of a word + instead of delimiting the ends of a word, by kbwordleft() and + kbwordright() (and therefore by /dokey WLEFT, WRIGHT, etc). #wordwrap #wrap #%wrap - wrap=on - (flag) Enable wordwrap on the screen. TF will try to break lines at - spaces or other punctuation to fit them within %{wrapsize} columns. - %{wrap} is ignored if %{emulation} is "raw". See also: - %{wrappunct}, %{wrapsize}, %{wrapspace}. + wrap=on + (flag) Enable wordwrap on the screen. TF will try to break lines at + spaces or other punctuation to fit them within %{wrapsize} columns. + %{wrap} is ignored if %{emulation} is "raw". See also: + %{wrappunct}, %{wrapsize}, %{wrapspace}. #wraplog #%wraplog - wraplog=off - (flag) Enable wordwrap in log files. See also: %wrap. + wraplog=off + (flag) Enable wordwrap in log files. See also: %wrap. #wrappunct #%wrappunct - wrappunct=10 - When wrapping, allow wrapping at any punctuation if wrapping only at - spaces would have caused more than %wrappunct characters to wrap. - This can make long URLs look nicer, but harder to cut and paste. - Setting %wrappunct to 0 disables wrapping at punctuation other than - spaces. + wrappunct=10 + When wrapping, allow wrapping at any punctuation if wrapping only at + spaces would have caused more than %wrappunct characters to wrap. + This can make long URLs look nicer, but harder to cut and paste. + Setting %wrappunct to 0 disables wrapping at punctuation other than + spaces. #wrapsize #%wrapsize - wrapsize=79 - Lines (input and output) extending past this column will be split. - Default value is one less than the number of columns on your - terminal (typically 80). Output is not wrapped if %{emulation} is - "raw". See also: %wrap, %wrappunct, %wrapspace, columns(). + wrapsize=79 + Lines (input and output) extending past this column will be split. + Default value is one less than the number of columns on your + terminal (typically 80). Output is not wrapped if %{emulation} is + "raw". See also: %wrap, %wrappunct, %wrapspace, columns(). #wrapspace #indent #indenting #indentation #%wrapspace - wrapspace=4 - Wrapped text is indented by this many spaces. See also: %wrap, - %wrapsize. + wrapspace=4 + Wrapped text is indented by this many spaces. See also: %wrap, + %wrapsize. # - The following builtin commands set the corresponding variables, and also - perform additional functions: /gag, /hilite, /hook, /nogag, /nohilite, - /watchdog, and /watchname + The following builtin commands set the corresponding variables, and also + perform additional functions: /gag, /hilite, /hook, /nogag, /nohilite, + /watchdog, and /watchname - The standard library also defines the following macros to set the values of - the corresponding variables: /background, /bamf, /borg, /clearfull, - /cleardone, /gpri, /hpri, /insert, /isize, /login, /lp, /lpquote, /kecho, - /mecho, /more, /ptime, /qecho, /quiet, /quitdone, /redef, /shpause, - /sockmload, /sub, /visual and /wrapspace. + The standard library also defines the following macros to set the values of + the corresponding variables: /background, /bamf, /borg, /clearfull, + /cleardone, /gpri, /hpri, /insert, /isize, /login, /lp, /lpquote, /kecho, + /mecho, /more, /ptime, /qecho, /quiet, /quitdone, /redef, /shpause, + /sockmload, /sub, /visual and /wrapspace. - Note: The variables 'L' and 'R' are reserved (see: variables). You should - not assign values to them. + Note: The variables 'L' and 'R' are reserved (see: variables). You should + not assign values to them. - See: variables, /set + See: variables, /set &status &status fields @@ -9703,35 +9745,35 @@ Special global variables status line - In visual mode, the input and output windows are separated by a status line, - which by default looks something like this: + In visual mode, the input and output windows are separated by a status line, + which by default looks something like this: More 156_WorldName____________(Read)_(Active: n)_(Log)_(Mail)_(Over)_12:34 - * "More" indicates how many more lines of text are waiting to be seen. - * "<WorldName>" is the name of the foreground socket's world. - * "(Read)" indicates that keyboard input is being read by read(). - * The "(Active: n)" indicator shows the number of sockets with unseen - text. - * "(Log)" indicates that there is one or more log file open. - * "(Mail)" or "Mail n" indicates the number of files named by %MAIL or - %MAILPATH that contain unread mail. - * "(Over)" indicates that typed characters will overstrike instead of - insert (that is, %insert is off). - * The current time is displayed at the right end of the status line. + * "More" indicates how many more lines of text are waiting to be seen. + * "<WorldName>" is the name of the foreground socket's world. + * "(Read)" indicates that keyboard input is being read by read(). + * The "(Active: n)" indicator shows the number of sockets with unseen + text. + * "(Log)" indicates that there is one or more log file open. + * "(Mail)" or "Mail n" indicates the number of files named by %MAIL or + %MAILPATH that contain unread mail. + * "(Over)" indicates that typed characters will overstrike instead of + insert (that is, %insert is off). + * The current time is displayed at the right end of the status line. Configuring the status area - The status area may contain 1 or more rows; the number is determined by - %status_height. The rows are numbered from the top starting at 0. Each row - is defined as a list of fields. A status field is defined as follows: + The status area may contain 1 or more rows; the number is determined by + %status_height. The rows are numbered from the top starting at 0. Each row + is defined as a list of fields. A status field is defined as follows: - * an optional field name - * an optional ":" and number indicating the field width - * an optional ":" and attribute + * an optional field name + * an optional ":" and number indicating the field width + * an optional ":" and attribute - The current list of status fields for row <N> can be fetched with - status_fields(<N>). + The current list of status fields for row <N> can be fetched with + status_fields(<N>). #%status_field_defaults #status_rm #status_edit @@ -9746,177 +9788,177 @@ Configuring the status area #/status_save #/status_restore #/status_add - The following commands modify the fields of the status area: - /clock off - Remove the clock from the status bar (equivalent to "/status_rm - @clock"). - - /clock on - Add a clock to the end of status row 0 if there is not already a - clock on status row 0. The width of the @clock field will be set - exactly wide enough to hold a time formatted according to - %clock_format. - - /clock [<format>] - Add a clock to the end of status row 0 if there is not already a - clock on status row 0; in either case, use <format> to control the - format of the clock (see ftime() for the meaning of <format>). If - <format> is omitted, it defaults to "%H:%M". The width of the - @clock field will be set exactly wide enough to hold a time - formatted according to <format>. - - Example: display a clock in 12-hour format: - /clock %I:%M - - /status_defaults - Restore list of status fields for all rows and their formats - (%status_int_* and %status_var_*) to their default values. - (Previous versions of tf had a %status_field_defaults variable; this - is now deprecated.) - - /status_save <name> - Save the current list of fields in row 0 into memory slot with label - <name>. <Name> must be a legal variable name. (Saved fields will - be forgotten when tf exits.) - - /status_restore <name> - Restore the list of fields in row 0 that was previously saved with - "/status_save <name>". - - /status_rm [-r<N>] <name> - Remove status field <name> from status row <N>. If -r is not - specified, all rows are searched. Only the first matching field is - removed. If there are unnamed pad fields on both sides of the named - field, the one with the smaller width is also removed; if the named - field is at the beginning or end of a row, the neighboring pad field - (if any) is removed. - - Example: Remove the @mail field from the status bar: - /status_rm @mail - - /status_add [<options>] <name>[:<width>[:<attributes>]] ... - Add status field <name> to the status bar with optional <width> and - <attributes>. Options: - -r<N> add to row <N> (default 0) - -A add after all other fields (i.e., at end) - -A<field> - add after existing field <field> - -B add before all other fields (i.e., at beginning) - -B<field> - add before existing field <field> - -s<N> insert padding of <N> spaces between the new field and the - neighbor selected by -A or -B (default 1) - -x don't add the field if one with the same name is already - present - -c clear all existing fields before adding new fields - If neither -A nor -B is given, -A is assumed. - - Example: Add a new field after the world name to display the - contents of the variable "hp": - /status_add -A@world hp:4 - - Multiple fields may be specified, but padding is not automatically - added between them; you must specify padding explicly. For example, - /status_add -Aclock foo:4 :1 bar:4 :2 baz:4 - is equivalent to - /status_add -Aclock foo:4 - /status_add -Afoo bar:4 - /status_add -Abar -s2 baz:4 - - /status_edit [-r<N>] <name>[:<width>[:<attributes>]] - If field <name> currently exists in any status row, replace it with - <name>[:<width>[:<attributes>]]. Neighboring padding is unchanged. - If -r is given, only row <N> is searched. Only the first matching - field is edited. - - Example: Change the @log field to say "L" instead of "(Log)", and - change the field's width to match: - /set status_int_log=nlog() ? "L" : "" - /status_edit @log:1 + The following commands modify the fields of the status area: + /clock off + Remove the clock from the status bar (equivalent to "/status_rm + @clock"). + + /clock on + Add a clock to the end of status row 0 if there is not already a + clock on status row 0. The width of the @clock field will be set + exactly wide enough to hold a time formatted according to + %clock_format. + + /clock [<format>] + Add a clock to the end of status row 0 if there is not already a + clock on status row 0; in either case, use <format> to control the + format of the clock (see ftime() for the meaning of <format>). If + <format> is omitted, it defaults to "%H:%M". The width of the + @clock field will be set exactly wide enough to hold a time + formatted according to <format>. + + Example: display a clock in 12-hour format: + /clock %I:%M + + /status_defaults + Restore list of status fields for all rows and their formats + (%status_int_* and %status_var_*) to their default values. + (Previous versions of tf had a %status_field_defaults variable; this + is now deprecated.) + + /status_save <name> + Save the current list of fields in row 0 into memory slot with label + <name>. <Name> must be a legal variable name. (Saved fields will + be forgotten when tf exits.) + + /status_restore <name> + Restore the list of fields in row 0 that was previously saved with + "/status_save <name>". + + /status_rm [-r<N>] <name> + Remove status field <name> from status row <N>. If -r is not + specified, all rows are searched. Only the first matching field is + removed. If there are unnamed pad fields on both sides of the named + field, the one with the smaller width is also removed; if the named + field is at the beginning or end of a row, the neighboring pad field + (if any) is removed. + + Example: Remove the @mail field from the status bar: + /status_rm @mail + + /status_add [<options>] <name>[:<width>[:<attributes>]] ... + Add status field <name> to the status bar with optional <width> and + <attributes>. Options: + -r<N> add to row <N> (default 0) + -A add after all other fields (i.e., at end) + -A<field> + add after existing field <field> + -B add before all other fields (i.e., at beginning) + -B<field> + add before existing field <field> + -s<N> insert padding of <N> spaces between the new field and the + neighbor selected by -A or -B (default 1) + -x don't add the field if one with the same name is already + present + -c clear all existing fields before adding new fields + If neither -A nor -B is given, -A is assumed. + + Example: Add a new field after the world name to display the + contents of the variable "hp": + /status_add -A@world hp:4 + + Multiple fields may be specified, but padding is not automatically + added between them; you must specify padding explicitly. For example, + /status_add -Aclock foo:4 :1 bar:4 :2 baz:4 + is equivalent to + /status_add -Aclock foo:4 + /status_add -Afoo bar:4 + /status_add -Abar -s2 baz:4 + + /status_edit [-r<N>] <name>[:<width>[:<attributes>]] + If field <name> currently exists in any status row, replace it with + <name>[:<width>[:<attributes>]]. Neighboring padding is unchanged. + If -r is given, only row <N> is searched. Only the first matching + field is edited. + + Example: Change the @log field to say "L" instead of "(Log)", and + change the field's width to match: + /set status_int_log=nlog() ? "L" : "" + /status_edit @log:1 # - For backward compatiblity, you can get and set the status fields for row 0 - via the %status_fields variable, but doing so is deprecated. + For backward compatibility, you can get and set the status fields for row 0 + via the %status_fields variable, but doing so is deprecated. - The default list of status fields is: + The default list of status fields is: @more:8:Br :1 @world :1 @read:6 :1 @active:11 :1 @log:5 :1 @mail:6 :1 insert:6 :1 kbnum:4 :1 @clock:5 - - - There are several types of fields: - - * Unnamed fields create padding between the fields on either side of - it. Each of the ":1" fields in the default status_fields puts a space - of 1 character between the other fields. - * Field names beginning with "@" correspond to internal states. For - example, "@more" will be updated whenever the number of unseen lines - changes. - * Field names containing only letter, digits, and underscores - correspond to variables. Whenever there is a change in the value of the - variable with the same name, the field will be updated. The value an - unset variable is considered to be the empty string. For example, - whenever the %insert variable changes, the "insert" field is updated. - Any variable may be monitored in this manner. - * A field whose name is in quotes (", ', or `) has its name (without - the quotes) printed literally on the status bar, and is never updated. - Use the \ character to escape a quote inside the string. The default - status_fields does not contain any of these literal fields. - - Any variable may be monitored, but there is a fixed list of internal - statuses. The internal statuses available are: - @more Updated when there is a change in the number of lines below the - bottom of the window. - @world Updated when when the foreground world changes. During the - evaluation of the format expression, the current socket is the new - socket. - @read Updated when entering or exiting a read() function call. - @active - Updated when the number of active worlds changes. During the - evaluation of the format expression, the current socket is the - socket that became active. - @log Updated when the number of open log files changes. - @mail Updated when mail arrives (See "mail"). - @clock Updated every minute, on the minute. - - A field's width determines how many columns it will take up on the screen. - If the width of a string literal field field is omitted, it defaults to the - length of the string literal. One other field width may be omitted or set - to 0, which means that field will use whatever columns are unused by the - other fields. Normally, fields are left-justified within the width, but a - negative field width will right-justify the field within the absolute value - of the width. A width of "-0" can be used to right-justify the - variable-width field. If the formatted text is wider than the field width, - it will be truncated to fit within the specified width. Fields may also be - truncated if they would not fit on the screen. - - The attributes explicily given in the field definiton are combined with - those in the corresponding %status_attr_int_<fieldname> (for internal state - fields) or %status_attr_var_<varname> (for variable fields). The combined - attributes are applied to the field text when it is displayed, but not to - the padding used to bring the field to the specified width. The entire - status line, including padding, is displayed with the attributes given by - %status_attr, which is none by default. - - To bring fields up to their specified width, they are padded with - %status_pad, which is "_" by default. By setting status_pad to " " and - status_attr to "r", you can create a status line that looks more like the - one in emacs or the irc client. - - When a status field is updated, the text displayed for that field is - determined by evaluating the expression contained in the variable - status_int_<name> (for internal state @<name>) or status_var_<name> (for - variable <name>). Also, for variable fields, if status_var_<name> is not - set, the value of the variable will be displayed directly. Changing a - format variable will cause the status line to update. - - All this may sound rather complex, so an example might help. The default - value of status_fields is: + + + There are several types of fields: + + * Unnamed fields create padding between the fields on either side of + it. Each of the ":1" fields in the default status_fields puts a space + of 1 character between the other fields. + * Field names beginning with "@" correspond to internal states. For + example, "@more" will be updated whenever the number of unseen lines + changes. + * Field names containing only letter, digits, and underscores + correspond to variables. Whenever there is a change in the value of the + variable with the same name, the field will be updated. The value an + unset variable is considered to be the empty string. For example, + whenever the %insert variable changes, the "insert" field is updated. + Any variable may be monitored in this manner. + * A field whose name is in quotes (", ', or `) has its name (without + the quotes) printed literally on the status bar, and is never updated. + Use the \ character to escape a quote inside the string. The default + status_fields does not contain any of these literal fields. + + Any variable may be monitored, but there is a fixed list of internal + statuses. The internal statuses available are: + @more Updated when there is a change in the number of lines below the + bottom of the window. + @world Updated when when the foreground world changes. During the + evaluation of the format expression, the current socket is the new + socket. + @read Updated when entering or exiting a read() function call. + @active + Updated when the number of active worlds changes. During the + evaluation of the format expression, the current socket is the + socket that became active. + @log Updated when the number of open log files changes. + @mail Updated when mail arrives (See "mail"). + @clock Updated every minute, on the minute. + + A field's width determines how many columns it will take up on the screen. + If the width of a string literal field field is omitted, it defaults to the + length of the string literal. One other field width may be omitted or set + to 0, which means that field will use whatever columns are unused by the + other fields. Normally, fields are left-justified within the width, but a + negative field width will right-justify the field within the absolute value + of the width. A width of "-0" can be used to right-justify the + variable-width field. If the formatted text is wider than the field width, + it will be truncated to fit within the specified width. Fields may also be + truncated if they would not fit on the screen. + + The attributes explicitly given in the field definition are combined with + those in the corresponding %status_attr_int_<fieldname> (for internal state + fields) or %status_attr_var_<varname> (for variable fields). The combined + attributes are applied to the field text when it is displayed, but not to + the padding used to bring the field to the specified width. The entire + status line, including padding, is displayed with the attributes given by + %status_attr, which is none by default. + + To bring fields up to their specified width, they are padded with + %status_pad, which is "_" by default. By setting status_pad to " " and + status_attr to "r", you can create a status line that looks more like the + one in emacs or the IRC client. + + When a status field is updated, the text displayed for that field is + determined by evaluating the expression contained in the variable + status_int_<name> (for internal state @<name>) or status_var_<name> (for + variable <name>). Also, for variable fields, if status_var_<name> is not + set, the value of the variable will be displayed directly. Changing a + format variable will cause the status line to update. + + All this may sound rather complex, so an example might help. The default + value of status_fields is: @more:8:Br :1 @world :1 @read:6 :1 @active:11 :1 @log:5 :1 @mail:6 :1 insert:6 :1 kbnum:4 :1 @clock:5 - - and the corresponding format variables are: + + and the corresponding format variables are: /set status_int_more \ moresize() == 0 ? "" : \ @@ -9933,27 +9975,27 @@ Configuring the status area pad("Mail", 0, nmail(), 2) /set status_var_insert insert ? "" : "(Over)" /set status_int_clock ftime(clock_format) - - - The first field is "@more:8:Br". So, whenever the number of unseen lines - changes, TF looks for the variable status_int_more, and evaluates the - expression it contains. The result of the expression is printed in the - first 8 columns of the status line, with attributes "Br" (bold and reverse). - The expression was carefully written so that it will never be more than 8 - characters, because it would be confusing to generate something like - "More:12345" and then have it truncated to "More:123" because of the field - width of 8. - - Since the "@world" field has no explicit width, its width is determined - dynamically. The fields on its left are pushed to the left side of the - screen, the fields on its right are pushed to the right side of the screen, - and the "@world" field uses whatever space remains in the middle. + + + The first field is "@more:8:Br". So, whenever the number of unseen lines + changes, TF looks for the variable status_int_more, and evaluates the + expression it contains. The result of the expression is printed in the + first 8 columns of the status line, with attributes "Br" (bold and reverse). + The expression was carefully written so that it will never be more than 8 + characters, because it would be confusing to generate something like + "More:12345" and then have it truncated to "More:123" because of the field + width of 8. + + Since the "@world" field has no explicit width, its width is determined + dynamically. The fields on its left are pushed to the left side of the + screen, the fields on its right are pushed to the right side of the screen, + and the "@world" field uses whatever space remains in the middle. #prompt example - Another example: Say your mud has a prompt like "H:42 M:17> " that shows - your hit points and mana, and you want it displayed on the status line like - " 42, 17", after the world name. To do this, call "/status_add -Aworld - hp_mana:7", and define a prompt hook: + Another example: Say your mud has a prompt like "H:42 M:17> " that shows + your hit points and mana, and you want it displayed on the status line like + " 42, 17", after the world name. To do this, call "/status_add -Aworld + hp_mana:7", and define a prompt hook: /def -mregexp -h"PROMPT ^H:([^ ]*) M:([^ ]*)> $" hp_mana_hook = \ /set hp=%P1%; \ @@ -9963,90 +10005,90 @@ Configuring the status area # - See: visual + See: visual &subs &substitution substitution - Before a macro body or arguments to /eval are executed, special character - sequences are replaced with new text as described below. + Before a macro body or arguments to /eval are executed, special character + sequences are replaced with new text as described below. #%; #newline #command separator -Command separation. +Command separation. %; - Separates commands within a macro body. See evaluation. + Separates commands within a macro body. See evaluation. #%| -Pipe. +Pipe. %| - Separates commands within a macro body, and connects the output of the first - to the input of the second. See evaluation. + Separates commands within a macro body, and connects the output of the first + to the input of the second. See evaluation. #character substitution #\n #\\ #ascii -Character substitution. +Character substitution. \n \c - In the first form, the character whose ASCII code is <n> is substituted. If - <n> starts with "0x", it is interpreted as a hexadecimal number; otherwise, - if <n> starts with "0", it is interpreted as octal; otherwise, it is - interpreted as decimal. In the second form, the character <c> is - substituted. This is useful for escaping any special meaning <c> has; in - particular, "\\" is substituted with "\". If the variable %{backslash} is - off, the \c form does not have this special interpretation. + In the first form, the character whose ASCII code is <n> is substituted. If + <n> starts with "0x", it is interpreted as a hexadecimal number; otherwise, + if <n> starts with "0", it is interpreted as octal; otherwise, it is + interpreted as decimal. In the second form, the character <c> is + substituted. This is useful for escaping any special meaning <c> has; in + particular, "\\" is substituted with "\". If the variable %{backslash} is + off, the \c form does not have this special interpretation. #// -Slash compression. -//... +Slash compression. +//... - If %{oldslash} is on, sequences of slashes are replaced with a sequence of - one fewer slashes. A single slash, however, is left alone. This feature - remains for backward compatibility only; you are encouraged to turn - %{oldslash} off to disable this. + If %{oldslash} is on, sequences of slashes are replaced with a sequence of + one fewer slashes. A single slash, however, is left alone. This feature + remains for backward compatibility only; you are encouraged to turn + %{oldslash} off to disable this. #$[ #$[] -Expression evaluation. +Expression evaluation. $[expression] - The <expression> is evaluated and its string value is substituted in its - place. See "expressions". + The <expression> is evaluated and its string value is substituted in its + place. See "expressions". #$( #$() #command subs #command substitution -Command substitution. +Command substitution. $(command) - <Command> is evaluated as if it were the body of a macro: it goes through - substitution, and is executed in a new scope. If <command> contains any ')' - characters, they must be escaped by preceding them with '\' so they are not - interpreted as the end of the substitution. The echoed output of <command> - is substituted in place of the $(...) construct (much like `...` in most - shells). If <command> produces more than one line of output, they will be - concatenated, with a space between each, to form one line. + <Command> is evaluated as if it were the body of a macro: it goes through + substitution, and is executed in a new scope. If <command> contains any ')' + characters, they must be escaped by preceding them with '\' so they are not + interpreted as the end of the substitution. The echoed output of <command> + is substituted in place of the $(...) construct (much like `...` in most + shells). If <command> produces more than one line of output, they will be + concatenated, with a space between each, to form one line. - Example: + Example: /def showver = :is using tf version $(/ver) - could be used to tell other mudders what version of tf you're using. + could be used to tell other MUDders what version of tf you're using. #$ #${ @@ -10054,27 +10096,27 @@ $(command) #macro subs #macro substitution -Macro substitution. +Macro substitution. ${name} $name$ - The body of the macro <name> is substituted. The second form is supported - only for backward compatibility, and its use is discouraged. In the first - form, the brackets may be omitted if the subsequent text could not be - confused as part of the name. + The body of the macro <name> is substituted. The second form is supported + only for backward compatibility, and its use is discouraged. In the first + form, the brackets may be omitted if the subsequent text could not be + confused as part of the name. - Example: The text "${foo}" would be replaced with the body of the macro - named "foo". + Example: The text "${foo}" would be replaced with the body of the macro + named "foo". #$$ -Dollar compression. -$$... +Dollar compression. +$$... - Sequences of '$'s are replaced by a sequence of one fewer '$'s. A single - '$', however, is left alone, unless it introduces one of the substitutions - described above. This is used to put a literal '$' in text that goes - through macro substitution. + Sequences of '$'s are replaced by a sequence of one fewer '$'s. A single + '$', however, is left alone, unless it introduces one of the substitutions + described above. This is used to put a literal '$' in text that goes + through macro substitution. #% #%{ @@ -10096,78 +10138,78 @@ $$... #parameters #variables and parameters -Variable and Argument substitution. +Variable and Argument substitution. %selector %{selector} %{selector-default} - The value of a variable or an argument to the macro is substituted, as - determined by <selector>. The brackets are recommended for clarity, but may - be omitted if there is no default and the text following it can not be - misinterpreted as part of the selector. The selector can be any of: + The value of a variable or an argument to the macro is substituted, as + determined by <selector>. The brackets are recommended for clarity, but may + be omitted if there is no default and the text following it can not be + misinterpreted as part of the selector. The selector can be any of: - <name> The value of the variable <name> is substituted. Names are case - sensitive. + <name> The value of the variable <name> is substituted. Names are case + sensitive. - 0 selects the name of the executing macro. (Before version 4.0, "0" - was equivalent to "*"). + 0 selects the name of the executing macro. (Before version 4.0, "0" + was equivalent to "*"). - # selects the count of positional parameters. + # selects the count of positional parameters. - * selects all positional parameters. + * selects all positional parameters. - ? selects the return value of the most recently executed command - (builtin or macro). + ? selects the return value of the most recently executed command + (builtin or macro). - 1, 2, 3, etc. - selects the corresponding positional parameter. There is no maximum - parameter number; any number greater than %{#} will simply produce - an empty substitution. + 1, 2, 3, etc. + selects the corresponding positional parameter. There is no maximum + parameter number; any number greater than %{#} will simply produce + an empty substitution. - -1, -2, -3, etc. - selects all positional parameters except the first, all except the - first two, all except the first three, etc. + -1, -2, -3, etc. + selects all positional parameters except the first, all except the + first two, all except the first three, etc. - L1, L2, etc. - selects the last positional parameter, second-to-last, etc. "L" is - the same as "L1". (As of 5.0 beta 7, these are case sensitive.) + L1, L2, etc. + selects the last positional parameter, second-to-last, etc. "L" is + the same as "L1". (As of 5.0 beta 7, these are case sensitive.) - -L1, -L2, etc. - selects all positional parameters except the last, all except the - last two, etc. "-L" is the same as "-L1". (As of 5.0 beta 7, these - are case sensitive.) + -L1, -L2, etc. + selects all positional parameters except the last, all except the + last two, etc. "-L" is the same as "-L1". (As of 5.0 beta 7, these + are case sensitive.) - Pn selects the text matching the <n>th parenthesized subexpression from - the last regular expression match. See %Pn. (As of 5.0 beta 7, - these are case sensitive.) + Pn selects the text matching the <n>th parenthesized subexpression from + the last regular expression match. See %Pn. (As of 5.0 beta 7, + these are case sensitive.) - R selects a positional parameter at random. (see also: rand()) (As of - 5.0 beta 7, this is case sensitive.) + R selects a positional parameter at random. (see also: rand()) (As of + 5.0 beta 7, this is case sensitive.) - Variable name and selectors are case sensitive (prior to 5.0 beta 7, "Ln", - "Pn" and "R" selectors were not). No substitutions are performed on - <selector>. + Variable name and selectors are case sensitive (prior to 5.0 beta 7, "Ln", + "Pn" and "R" selectors were not). No substitutions are performed on + <selector>. - If the substitution determined by the <selector> would be empty, and a - <default> value is given, the default will be substituted instead. Thus - "%{1-foofle}" is replaced with the first word if there is one, or "foofle" - if not. The <default> value may contain variable, macro, expression, and - command substitutions. + If the substitution determined by the <selector> would be empty, and a + <default> value is given, the default will be substituted instead. Thus + "%{1-foofle}" is replaced with the first word if there is one, or "foofle" + if not. The <default> value may contain variable, macro, expression, and + command substitutions. - The meaning of "positional parameters" depends on how the macro was called. - If called with the traditional "/name ..." command syntax, each - space-separated word is a positional parameter. If called with the - "name(...)" function syntax, each function argument is a positional - parameter; if more than one is selected, they are concatenated, with a space - between each. If called as a trigger, the positional parameters are the - words in the text that triggered the macro. In a hook call, the positional - parameters are the hook arguments. In an /eval statement, they are - inherited from the caller. + The meaning of "positional parameters" depends on how the macro was called. + If called with the traditional "/name ..." command syntax, each + space-separated word is a positional parameter. If called with the + "name(...)" function syntax, each function argument is a positional + parameter; if more than one is selected, they are concatenated, with a space + between each. If called as a trigger, the positional parameters are the + words in the text that triggered the macro. In a hook call, the positional + parameters are the hook arguments. In an /eval statement, they are + inherited from the caller. - Note that in expressions, it is easiest to omit the % and just use the - {selector[-default]} part. If the selector is a variable name and no - default is desired, the name may be used directly in an expressions without - % or {...}. + Note that in expressions, it is easiest to omit the % and just use the + {selector[-default]} part. If the selector is a variable name and no + default is desired, the name may be used directly in an expressions without + % or {...}. #%{PL} #%PL @@ -10179,83 +10221,83 @@ Variable and Argument substitution. #subexpressions #regexp subexpressions -Regexp subexpressions. +Regexp subexpressions. %{Pn} %{PL} %{PR} - This is actually a special case of variable substitution. The %P variables - get their values from the last successful regexp match in scope. %P0 - expands to the text matched by the entire regexp. %Pn expands to the text - matched by the <n>th parenthesised subexpression of the regexp. %PL and %PR - expand to the text to the left and right, respectively, of the text matched - by the entire regexp. The "scope" of a regexp match is the lifetime of the - macro expansion it triggered, hooked, or in which it occurred (i.e., with - regmatch()). + This is actually a special case of variable substitution. The %P variables + get their values from the last successful regexp match in scope. %P0 + expands to the text matched by the entire regexp. %Pn expands to the text + matched by the <n>th parenthesized subexpression of the regexp. %PL and %PR + expand to the text to the left and right, respectively, of the text matched + by the entire regexp. The "scope" of a regexp match is the lifetime of the + macro expansion it triggered, hooked, or in which it occurred (i.e., with + regmatch()). - For example, after the text "Jabba the Hutt goes east." matches the regexp + For example, after the text "Jabba the Hutt goes east." matches the regexp " goes ([^ ]*)\.$" - then the following expansions will be available until the macro exits: PL = - "Jabba the Hutt"; P0 = " goes east."; P1 = "east". + then the following expansions will be available until the macro exits: PL = + "Jabba the Hutt"; P0 = " goes east."; P1 = "east". - The number <n> can be any nonnegative number. If there is no subexpression - corresponding to <n>, the substitution will be ignored. When parentheses - are nested, <n> refers to the order of the opening parentheses. + The number <n> can be any non-negative number. If there is no subexpression + corresponding to <n>, the substitution will be ignored. When parentheses + are nested, <n> refers to the order of the opening parentheses. - The %Pn subs will always refer to the first regexp match on the line, even - if a partial hilite (/def -P) causes the regexp to be applied more than - once. + The %Pn subs will always refer to the first regexp match on the line, even + if a partial hilite (/def -P) causes the regexp to be applied more than + once. #%% #percent compression -Percent compression. -%%... +Percent compression. +%%... - Sequences of '%'s are replaced by a sequence of one fewer '%'s. A single - '%', however, is left alone unless it introduces one of the substitutions - described above. This is used to put a literal '%' in text that goes - through macro substitution. + Sequences of '%'s are replaced by a sequence of one fewer '%'s. A single + '%', however, is left alone unless it introduces one of the substitutions + described above. This is used to put a literal '%' in text that goes + through macro substitution. # -Examples +Examples - Here are a couple of simple examples. + Here are a couple of simple examples. - Definition: /def advice = whisper %1 = Let the wookie win. + Definition: /def advice = whisper %1 = Let the wookie win. Command: /advice R2D2 - Sends: whisper R2D2 = Let the wookie win. + Sends: whisper R2D2 = Let the wookie win. Definition: /set ending=meister - Definition: /def greet = :waves to %{1-Jack}%{ending}. + Definition: /def greet = :waves to %{1-Jack}%{ending}. Command: /greet - Sends: :waves to Jackmeister. + Sends: :waves to Jackmeister. Command: /greet Dave - Sends: :waves to Davemeister. + Sends: :waves to Davemeister. - For some more complex examples, look at the files in TFLIBDIR. + For some more complex examples, look at the files in TFLIBDIR. - See: evaluation, expressions + See: evaluation, expressions &summary summary - Type "/help intro" for basic information on using TF. - Type "/help topics" for a list of other help topics. - Type "/help commands" for a complete list of TF builtin commands. - Type "/help /help" for instructions on using /help. + Type "/help intro" for basic information on using TF. + Type "/help topics" for a list of other help topics. + Type "/help commands" for a complete list of TF builtin commands. + Type "/help /help" for instructions on using /help. - If you are having problems with TF and wish to contact the author, see - "problems". + If you are having problems with TF and wish to contact the author, see + "problems". - If you are having trouble reading the help sections because text is - scrolling off the screen, try typing "/more on" before /help, and then when - you get a "--More--" prompt, press TAB or PageDown when you're ready to - continue. + If you are having trouble reading the help sections because text is + scrolling off the screen, try typing "/more on" before /help, and then when + you get a "--More--" prompt, press TAB or PageDown when you're ready to + continue. &command line &commandline @@ -10266,57 +10308,57 @@ summary tf - Syntax: + Syntax: tf [-L<dir>] [-f[<file>]] [-c<command>] [-vlqn] [<world>] - tf [-L<dir>] [-f[<file>]] [-c<command>] [-vlq] <host> <port> + tf [-L<dir>] [-f[<file>]] [-c<command>] [-vlq] <host> <port> ____________________________________________________________________________ - At startup, TF takes the following steps: - - * Initializes special variables. Any variables defined in the - environment will override TF's default values for the variables with the - same name. - * Loads commands from the standard macro library (stdlib.tf), the - optional local macro library (local.tf), and your personal configuration - file (see tfrc). - * Executes <command>, if one was given. - * Enables visual mode if -v was not given and %visual has not been - explicitly set to "off". - * Tries to connect to <world>, or <host> <port>. If no world is - given, and the -n option is not given, TF will try to connect to the - first world defined with addworld() in the configuration file(s). If no - worlds are defined, or TF can not connect to the specified world, TF - will start up in unconnected mode. - - Options: - -L<dir> - Use <dir> instead of %TFLIBDIR as library directory. - -f<file> - Load <file> instead of the normal personal config file. - -f Do not load any personal config file at startup. - -c<command> - Execute <command> after loading config file. <Command> is treated - as if it had been typed on the tf command line (i.e., the value of - %sub is significant). - -n Do not connect to a world automatically at startup if no <world> or - <host>/<port> are specified. - -l Disable automatic login. (see: login) - -q Enable quiet login. (see: %quiet) - -v Disable automatic switch to visual mode. - - The library directory is determined by the first of the following which has - a value: -L option; %TFLIBDIR environment variable; or, compiled-in default. - The standard library file is determined by the first of the following which - has a value: TFLIBRARY environment variable; or, appending "/stdlib.tf" to - %TFLIBDIR. - - TF honors several locale categories, which can be set to make TF work better - with languages other than English. See locale. - - See http://tinyfugue.sourceforge.net/ for the latest info on TF. - - See also: intro, tfrc, library, worlds, /addworld + At startup, TF takes the following steps: + + * Initializes special variables. Any variables defined in the + environment will override TF's default values for the variables with the + same name. + * Loads commands from the standard macro library (stdlib.tf), the + optional local macro library (local.tf), and your personal configuration + file (see tfrc). + * Executes <command>, if one was given. + * Enables visual mode if -v was not given and %visual has not been + explicitly set to "off". + * Tries to connect to <world>, or <host> <port>. If no world is + given, and the -n option is not given, TF will try to connect to the + first world defined with addworld() in the configuration file(s). If no + worlds are defined, or TF can not connect to the specified world, TF + will start up in unconnected mode. + + Options: + -L<dir> + Use <dir> instead of %TFLIBDIR as library directory. + -f<file> + Load <file> instead of the normal personal config file. + -f Do not load any personal config file at startup. + -c<command> + Execute <command> after loading config file. <Command> is treated + as if it had been typed on the tf command line (i.e., the value of + %sub is significant). + -n Do not connect to a world automatically at startup if no <world> or + <host>/<port> are specified. + -l Disable automatic login. (see: login) + -q Enable quiet login. (see: %quiet) + -v Disable automatic switch to visual mode. + + The library directory is determined by the first of the following which has + a value: -L option; %TFLIBDIR environment variable; or, compiled-in default. + The standard library file is determined by the first of the following which + has a value: TFLIBRARY environment variable; or, appending "/stdlib.tf" to + %TFLIBDIR. + + TF honors several locale categories, which can be set to make TF work better + with languages other than English. See locale. + + See http://tinyfugue.sourceforge.net/ for the latest info on TF. + + See also: intro, tfrc, library, worlds, /addworld &tfout &tferr @@ -10326,132 +10368,132 @@ tf tfio - TF normally does its output through "streams", which are analagous to the - streams of C stdio. + TF normally does its output through "streams", which are analogous to the + streams of C stdio. - Output from most tf commands, including /echo, are output to the "tfout" - stream, which is normally attached to the screen. tfout may be redirected - with a command /quote, $() command substitution, or %| pipe. + Output from most tf commands, including /echo, are output to the "tfout" + stream, which is normally attached to the screen. tfout may be redirected + with a command /quote, $() command substitution, or %| pipe. - Many TF error messages, hook messages, and the output of "/echo -e" are - output to the "tferr" stream, which is always attached to the screen, and - may not be redirected. + Many TF error messages, hook messages, and the output of "/echo -e" are + output to the "tferr" stream, which is always attached to the screen, and + may not be redirected. - Some TF error messages, hook messages, and the output of "/echo -A" are - output to the "alert" stream. In visual mode, text sent to the alert stream - is displayed briefly on the status line status line, where it can be seen - immediately even if you're at a more prompt. The duration of the alert - display is determined by %alert_time. In nonvisual mode, text sent to the - alert stream is redirected to the tferr stream. + Some TF error messages, hook messages, and the output of "/echo -A" are + output to the "alert" stream. In visual mode, text sent to the alert stream + is displayed briefly on the status line status line, where it can be seen + immediately even if you're at a more prompt. The duration of the alert + display is determined by %alert_time. In nonvisual mode, text sent to the + alert stream is redirected to the tferr stream. - Text from a world or "/echo -w" is sent to a stream for that world. Text - sent to a world stream will be stored in the history of that world. If that - world is the foreground world, the text is sent to the screen immediately; - otherwise, it will not be displayed until world is brought into the - foreground. + Text from a world or "/echo -w" is sent to a stream for that world. Text + sent to a world stream will be stored in the history of that world. If that + world is the foreground world, the text is sent to the screen immediately; + otherwise, it will not be displayed until world is brought into the + foreground. - Commands that read input (using tfread()) read by default from "tfin", which - is normally attached to the keyboard. tfin may be redirected with a %| - pipe. + Commands that read input (using tfread()) read by default from "tfin", which + is normally attached to the keyboard. tfin may be redirected with a %| + pipe. - All streams have a handle which can be used as an argument to the tfio - functions. The handles for tfin, tfout, and tferr are "i", "o", and "e", - respectively. The handles for streams opened with tfopen() are integers. + All streams have a handle which can be used as an argument to the tfio + functions. The handles for tfin, tfout, and tferr are "i", "o", and "e", + respectively. The handles for streams opened with tfopen() are integers. tfopen() - The tfopen(name, mode) function can be used to open arbitrary streams. If - called with no arguments, tfopen() opens an unnamed "q" mode stream. The - <mode> argument describes the usage of the stream: - "w" Open a file "<name>" for writing. Write operations will overwrite - existing file contents, if any. - "a" Open a file "<name>" for appending. Write operations will occur - after existing file contents, if any. - "r" Open a file "<name>" for reading. (see also: "/quote '"). - "p" Execute a shell command "<name>" and read its output (see also: - "/quote !"). - "q" Open a queue for reading and writing. The <name> argument will - appear in the output of /liststreams, but has no other meaning. - A "q" mode stream may be thought of as a place to hold lines for passing - between two or more commands. - - If successful, the tfopen() function returns a positive number which is the - handle of the new stream, which should be used in subsequent calls to - tfread(), tfwrite(), and tfclose(). If it fails, the tfopen() function - returns -1. - - A call to tfwrite() or tfread() on a stream opened with a mode that does not - allow that operation will return -1. - - The /liststreams command will display a list of open streams. + The tfopen(name, mode) function can be used to open arbitrary streams. If + called with no arguments, tfopen() opens an unnamed "q" mode stream. The + <mode> argument describes the usage of the stream: + "w" Open a file "<name>" for writing. Write operations will overwrite + existing file contents, if any. + "a" Open a file "<name>" for appending. Write operations will occur + after existing file contents, if any. + "r" Open a file "<name>" for reading. (see also: "/quote '"). + "p" Execute a shell command "<name>" and read its output (see also: + "/quote !"). + "q" Open a queue for reading and writing. The <name> argument will + appear in the output of /liststreams, but has no other meaning. + A "q" mode stream may be thought of as a place to hold lines for passing + between two or more commands. + + If successful, the tfopen() function returns a positive number which is the + handle of the new stream, which should be used in subsequent calls to + tfread(), tfwrite(), and tfclose(). If it fails, the tfopen() function + returns -1. + + A call to tfwrite() or tfread() on a stream opened with a mode that does not + allow that operation will return -1. + + The /liststreams command will display a list of open streams. tfclose() - When a stream opened by tfopen() is no longer needed, it should be closed - with tfclose(handle), which will flush the stream and release its resources. - tfclose() can be used on the tfout stream (handle "o") within a macro body - to prevent further output from subsequent commands in that macro body; - closing the tfin stream (handle "i") will prevent further reads; and closing - the tferr stream (handle "e") is not allowed. + When a stream opened by tfopen() is no longer needed, it should be closed + with tfclose(handle), which will flush the stream and release its resources. + tfclose() can be used on the tfout stream (handle "o") within a macro body + to prevent further output from subsequent commands in that macro body; + closing the tfin stream (handle "i") will prevent further reads; and closing + the tferr stream (handle "e") is not allowed. tfwrite() - The tfwrite(handle, line) function writes a <line> of text to the stream - designated by <handle>. If <handle> is omitted, the tfout stream is used - (so tfwrite(line) is equivalent to echo(line)). Display attributes of line - are stripped if it is written outside of tf (i.e., to a file or pipe). + The tfwrite(handle, line) function writes a <line> of text to the stream + designated by <handle>. If <handle> is omitted, the tfout stream is used + (so tfwrite(line) is equivalent to echo(line)). Display attributes of line + are stripped if it is written outside of tf (i.e., to a file or pipe). - If an OS file (mode "w" or "a") is set to autoflush (the default), then each - line written is flushed to the file immediately. If you are writing a large - number of lines, it is more efficient to disable autoflushing with - tfflush(handle, "off"), and manually force a flush with tfflush(handle) or - tfclose(handle) after writing the large block. tfflush() has no meaning on - files of mode "p", "q", or "r". Streams are flushed automatically when - closed. + If an OS file (mode "w" or "a") is set to autoflush (the default), then each + line written is flushed to the file immediately. If you are writing a large + number of lines, it is more efficient to disable autoflushing with + tfflush(handle, "off"), and manually force a flush with tfflush(handle) or + tfclose(handle) after writing the large block. tfflush() has no meaning on + files of mode "p", "q", or "r". Streams are flushed automatically when + closed. tfread() - The tfread(handle, variable) function reads a line from the stream - designated by <handle>. If <handle> is omitted, the tfin stream is used. - If successful, the line is assigned to <variable>, and tfread() returns the - (non-negative) length of the line. If <variable> did not already exist, it - is created at the global level, as if by /set. If there are no lines - available to read, or an error occurs, tfread() returns -1. For "r" and "p" - mode streams, a -1 return value indicates end-of-file; the only valid - operation on the stream after that is tfclose(). But for a "q" mode stream, - a -1 return value may just mean there are currently no lines in the queue; - more lines may be added by tfwrite(), and then tfread() will be able to read - them. + The tfread(handle, variable) function reads a line from the stream + designated by <handle>. If <handle> is omitted, the tfin stream is used. + If successful, the line is assigned to <variable>, and tfread() returns the + (non-negative) length of the line. If <variable> did not already exist, it + is created at the global level, as if by /set. If there are no lines + available to read, or an error occurs, tfread() returns -1. For "r" and "p" + mode streams, a -1 return value indicates end-of-file; the only valid + operation on the stream after that is tfclose(). But for a "q" mode stream, + a -1 return value may just mean there are currently no lines in the queue; + more lines may be added by tfwrite(), and then tfread() will be able to read + them. Keyboard Reading - tfread() from the keyboard is special. It can only be done from a command - line command; trying to do it directly or indirectly from a trigger, hook, - keybinding, or process is an error, and will make the tfread() return -1. - It reads a line of input from the keyboard until the newline key is pressed - or "/dokey newline" is executed. During the read, all existing keybindings - continue to work normally. Any text already in the input buffer is not - cleared when the read starts. Text entered after the read starts is - appended to the existing text, and when the read ends, its result is the - entire input buffer. Lines entered during a read are not saved in the input - history (but you can use "/recordline -i" to save them explicitly). - - A read from the keyboard (and the macro that called it) can be interrupted - with a SIGINT, normally generated by typing CTRL-C. - - During a keyboard read, if a macro calls /dokey newline, the newline will - not be executed immediately, but will be held until the rest of the commands - in the macro are processed. For example, consider the keybinding "/def - -b'^[^M' = /dokey newline%; /send go". Normally, typing ^[^M would execute - the current input buffer, then send "go" to the server. But during a - keyboard read, typing ^[^M would send "go" first, and then do the newline - that completes the read. - - The library file textutil.tf defines several commands that are useful with - tfio. - - See: interface, /liststreams, /input, expressions, nread(), functions, - textutil.tf + tfread() from the keyboard is special. It can only be done from a command + line command; trying to do it directly or indirectly from a trigger, hook, + keybinding, or process is an error, and will make the tfread() return -1. + It reads a line of input from the keyboard until the newline key is pressed + or "/dokey newline" is executed. During the read, all existing keybindings + continue to work normally. Any text already in the input buffer is not + cleared when the read starts. Text entered after the read starts is + appended to the existing text, and when the read ends, its result is the + entire input buffer. Lines entered during a read are not saved in the input + history (but you can use "/recordline -i" to save them explicitly). + + A read from the keyboard (and the macro that called it) can be interrupted + with a SIGINT, normally generated by typing CTRL-C. + + During a keyboard read, if a macro calls /dokey newline, the newline will + not be executed immediately, but will be held until the rest of the commands + in the macro are processed. For example, consider the keybinding "/def + -b'^[^M' = /dokey newline%; /send go". Normally, typing ^[^M would execute + the current input buffer, then send "go" to the server. But during a + keyboard read, typing ^[^M would send "go" first, and then do the newline + that completes the read. + + The library file textutil.tf defines several commands that are useful with + tfio. + + See: interface, /liststreams, /input, expressions, nread(), functions, + textutil.tf &config &configuration @@ -10464,37 +10506,37 @@ Keyboard Reading .tfrc - At startup, TF attempts to load and execute commands from the personal - config file named "~/.tfrc", "~/tfrc", "./.tfrc" or "./tfrc". This file can - contain any commands you want executed automatically when TF starts. + At startup, TF attempts to load and execute commands from the personal + config file named "~/.tfrc", "~/tfrc", "./.tfrc" or "./tfrc". This file can + contain any commands you want executed automatically when TF starts. - Some useful commands to include in your personal config file: + Some useful commands to include in your personal config file: - /addworld - Define a world. TF will automatically connect to the first world if - not started with the "-n" option. - /def Define a macro (including triggers, hilites, gags, keybindings, and - hooks). - /set Set a variable. There are many special variables that change the - behavior of tf, listed under "special variables". - /load Load commands from another file. - /require - Load a library file. + /addworld + Define a world. TF will automatically connect to the first world if + not started with the "-n" option. + /def Define a macro (including triggers, hilites, gags, keybindings, and + hooks). + /set Set a variable. There are many special variables that change the + behavior of tf, listed under "special variables". + /load Load commands from another file. + /require + Load a library file. - TFLIBDIR contains a sample "tfrc" file that you may want to copy and modify - to fit your tastes. + TFLIBDIR contains a sample "tfrc" file that you may want to copy and modify + to fit your tastes. - For backward compatibility, TF will load ~/.tinytalk if it exists. The use - of ~/.tinytalk is discouraged. + For backward compatibility, TF will load ~/.tinytalk if it exists. The use + of ~/.tinytalk is discouraged. - See: startup, library, special variables, /load + See: startup, library, special variables, /load &timer &timing timing - See: processes, /repeat, /quote, utilities (/at, /tick), %clock, /time. + See: processes, /repeat, /quote, utilities (/at, /tick), %clock, /time. &tools &/reedit &/edmac @@ -10508,114 +10550,114 @@ timing tools.tf - Usage: + Usage: /REQUIRE tools.tf ____________________________________________________________________________ - /EDMAC <macroname> - /EDVAR <variablename> - /EDWORLD <worldname> - Stick an existing macro, variable, or world definition in the input - window for editing. + /EDMAC <macroname> + /EDVAR <variablename> + /EDWORLD <worldname> + Stick an existing macro, variable, or world definition in the input + window for editing. - /NAME [<name>] - Change your character name (on a TinyMUD style mud). + /NAME [<name>] + Change your character name (on a TinyMUD style mud). - /GETLINE <n> - Grab the <n>th line from history and stick it in the input buffer. + /GETLINE <n> + Grab the <n>th line from history and stick it in the input buffer. - /XTITLE <text> - Put <text> on the titlebar of an xterm. + /XTITLE <text> + Put <text> on the titlebar of an xterm. - See: /sh, /edit, /recall, tfrc + See: /sh, /edit, /recall, tfrc &triggers triggers - Before we get into the gory details, here's a simple example of a trigger: + Before we get into the gory details, here's a simple example of a trigger: /def -t"{*} has arrived." greet = :waves to %1. - This command defines a macro called "greet". Whenever text like "Bob has - arrived." is received, /greet will be executed automatically, sending the - text ":waves to Bob." to the server. + This command defines a macro called "greet". Whenever text like "Bob has + arrived." is received, /greet will be executed automatically, sending the + text ":waves to Bob." to the server. - Associated commands: - /def define a macro with any fields - /trig define a trigger macro - /trigp define a trigger macro with priority - /trigc define a trigger macro with probability - /trigpc - define a trigger macro with probability and priority - /gag define a trigger macro to gag text - /hilite - define a trigger macro to hilite text - /trigger - call a trigger macro manually - /substitute - modify the text that invoked the trigger + Associated commands: + /def define a macro with any fields + /trig define a trigger macro + /trigp define a trigger macro with priority + /trigc define a trigger macro with probability + /trigpc + define a trigger macro with probability and priority + /gag define a trigger macro to gag text + /hilite + define a trigger macro to hilite text + /trigger + call a trigger macro manually + /substitute + modify the text that invoked the trigger - Triggers are a method of calling a macro based on incoming text. When a - line of text from a socket matches the trigger pattern of a macro, that - macro becomes a candidate for automatic execution. + Triggers are a method of calling a macro based on incoming text. When a + line of text from a socket matches the trigger pattern of a macro, that + macro becomes a candidate for automatic execution. - If multiple macros have triggers which match the same text, one or more are - chosen for execution as described under "priority". + If multiple macros have triggers which match the same text, one or more are + chosen for execution as described under "priority". - The <text> which triggers a macro is given to the macro as arguments, as if - it had been called with ``/<macro> <text>''. Positional parameters (e.g., - %1) refer the the corresponding word in the triggering text. If the trigger - is a regexp, subexpression parameters refer to the text matched by the - corresponding parenthesised subexpression (see also: %Pn). + The <text> which triggers a macro is given to the macro as arguments, as if + it had been called with ``/<macro> <text>''. Positional parameters (e.g., + %1) refer the the corresponding word in the triggering text. If the trigger + is a regexp, subexpression parameters refer to the text matched by the + corresponding parenthesized subexpression (see also: %Pn). - If the selected macro(s) have display attributes, the attributes are used to - display the text which triggered the macro. + If the selected macro(s) have display attributes, the attributes are used to + display the text which triggered the macro. - If a macro has the world field set, it can only be triggered by text from - that world. + If a macro has the world field set, it can only be triggered by text from + that world. - If a macro has a probability less than 100%, it might not be executed even - if it is triggered. + If a macro has a probability less than 100%, it might not be executed even + if it is triggered. - Triggers can be disabled by turning the %{borg} flag off. + Triggers can be disabled by turning the %{borg} flag off. - If the %{background} flag is turned off, text from background sockets will - not cause triggering until that socket is brought into the foreground. + If the %{background} flag is turned off, text from background sockets will + not cause triggering until that socket is brought into the foreground. - Triggers can also be invoked manually with the command /trigger. The - command "/trigger -n" can be used to test which triggers would match a given - line. + Triggers can also be invoked manually with the command /trigger. The + command "/trigger -n" can be used to test which triggers would match a given + line. - The /def command is the only way to define a multi-shot trigger. All other - commands which define triggers will create permanent triggers. + The /def command is the only way to define a multi-shot trigger. All other + commands which define triggers will create permanent triggers. - Note that tf may run slowly if there are many triggers defined, since every - trigger must be compared against every received line of text. Choose your - triggers carefully. See also "patterns". + Note that tf may run slowly if there are many triggers defined, since every + trigger must be compared against every received line of text. Choose your + triggers carefully. See also "patterns". - Triggers are only matched against normal lines. To have a macro invoked by - a prompt, use the prompt hook. + Triggers are only matched against normal lines. To have a macro invoked by + a prompt, use the prompt hook. - By default, TF expands tabs and removes ANSI display codes and other non - printable characters from received lines before comparing them against - triggers, so your triggers need to match only visible text. But if you - change %expand_tabs or %emulation, received lines may still contain - invisible codes when compared against triggers. + By default, TF expands tabs and removes ANSI display codes and other non + printable characters from received lines before comparing them against + triggers, so your triggers need to match only visible text. But if you + change %expand_tabs or %emulation, received lines may still contain + invisible codes when compared against triggers. - Trigger patterns are not expanded for variable substitutions or anything - else. To get the effect of a variable trigger, write a macro that redefines - the trigger. For example, + Trigger patterns are not expanded for variable substitutions or anything + else. To get the effect of a variable trigger, write a macro that redefines + the trigger. For example, /def set_victim = \ /def -t"%{1} has arrived." kill_victim = \ kill %%{1} - - Then, to change the victim to "Bill", type "/set_victim Bill". - See also: patterns, macros, gags, hilites, hooks, priority, %max_trig + Then, to change the victim to "Bill", type "/set_victim Bill". + + See also: patterns, macros, gags, hilites, hooks, priority, %max_trig &util &utils @@ -10629,115 +10671,115 @@ triggers utilities - The library directory %{TFLIBDIR} contains many useful utility files ending - in ".tf". To use any one of them, simply /load or /require the file. For - example, to enable ESC-TAB completion automatically, just "/require - completion.tf" from your .tfrc file. Some of the more useful files: - - alias.tf - /alias, etc: create commands without '/'. - at.tf /at: execute commands at a specified time. - filexfer.tf - /putfile, /getfile: transfer files to/from a mud. - kb-os2.tf - Extra default key bindings for OS/2 keyboards. - kbbind.tf - Default keybindings. - kbfunc.tf - Macros used by kbbind.tf. - map.tf Mapping commands (like tintin). - psh.tf /psh: like /sh, but uses your favorite shell. - quoter.tf - Various quoting macros. - rwho.tf - Remote WHO from a mudwho server. - spc-page.tf - Old-style SPACE key scrolling at --More-- prompt. - spedwalk.tf - Single character movement (like tintin). - spell.tf - Spelling checker. - tick.tf - Diku tick counter (like tintin). - tintin.tf - tintin-like commands. - tr.tf /tr: character translation - watch.tf - /watch: Watch for a particular player. - - There are also other files, not listed here. - - For complete instructions on any of these utilities, see the help section - for that topic if there is one, or read the comments at the top of each - file. Sorry, I haven't gotten around to documenting them very well. - - Note to unix users: many library files were renamed in version 3.5, but the - old names still work (via soft links). + The library directory %{TFLIBDIR} contains many useful utility files ending + in ".tf". To use any one of them, simply /load or /require the file. For + example, to enable ESC-TAB completion automatically, just "/require + completion.tf" from your .tfrc file. Some of the more useful files: + + alias.tf + /alias, etc: create commands without '/'. + at.tf /at: execute commands at a specified time. + filexfer.tf + /putfile, /getfile: transfer files to/from a mud. + kb-os2.tf + Extra default key bindings for OS/2 keyboards. + kbbind.tf + Default keybindings. + kbfunc.tf + Macros used by kbbind.tf. + map.tf Mapping commands (like tintin). + psh.tf /psh: like /sh, but uses your favorite shell. + quoter.tf + Various quoting macros. + rwho.tf + Remote WHO from a mudwho server. + spc-page.tf + Old-style SPACE key scrolling at --More-- prompt. + spedwalk.tf + Single character movement (like tintin). + spell.tf + Spelling checker. + tick.tf + Diku tick counter (like tintin). + tintin.tf + tintin-like commands. + tr.tf /tr: character translation + watch.tf + /watch: Watch for a particular player. + + There are also other files, not listed here. + + For complete instructions on any of these utilities, see the help section + for that topic if there is one, or read the comments at the top of each + file. Sorry, I haven't gotten around to documenting them very well. + + Note to unix users: many library files were renamed in version 3.5, but the + old names still work (via soft links). &variables &variable variables - Associated commands: - /listvar - list values of variables. - /set set the value of a global variable - /let set the value of a local variable - /setenv - set the value of an environment variable - /unset unset a variable - /export - move an global variable to the environment - /edvar edit a variable's value - := operator - assign a value of any type to a variable. - - A TinyFugue variable has a name and a value. Names are case sensitive, and - should start with a letter and contain only letters, numbers, and - underscores. A value can be a text string (including display attributes), - integer, or real number, but some special variables will automatically - convert an assigned value to a particular type. - - Variables may either be local, global, or exported. Global variables are - visible to all tf commands; they are defined with /set or /setenv, or - imported from the environment when tf starts. Local variables are created - with /let or assignment expressions, and only exist in the scope in which - they were created. Exported variables are global variables which are also - visible to subshells, so they can be used by commands /sh, the '!' option of - /quote, and file uncompression. Variables are exported if they were defined - with /setenv, explicitly exported with /export, or imported from tf's parent - environment. - - The value of a variable can be obtained using a '%' substitution (see - "substitution"), or by simply using its name in an expression (see - "expressions"). - - See "special variables" for a list of special variables. + Associated commands: + /listvar + list values of variables. + /set set the value of a global variable + /let set the value of a local variable + /setenv + set the value of an environment variable + /unset unset a variable + /export + move an global variable to the environment + /edvar edit a variable's value + := operator + assign a value of any type to a variable. + + A TinyFugue variable has a name and a value. Names are case sensitive, and + should start with a letter and contain only letters, numbers, and + underscores. A value can be a text string (including display attributes), + integer, or real number, but some special variables will automatically + convert an assigned value to a particular type. + + Variables may either be local, global, or exported. Global variables are + visible to all tf commands; they are defined with /set or /setenv, or + imported from the environment when tf starts. Local variables are created + with /let or assignment expressions, and only exist in the scope in which + they were created. Exported variables are global variables which are also + visible to subshells, so they can be used by commands /sh, the '!' option of + /quote, and file uncompression. Variables are exported if they were defined + with /setenv, explicitly exported with /export, or imported from tf's parent + environment. + + The value of a variable can be obtained using a '%' substitution (see + "substitution"), or by simply using its name in an expression (see + "expressions"). + + See "special variables" for a list of special variables. &worlds worlds - Associated commands: - /addworld - define a new world - /world connect to a defined world - /dc disconnect from a world - /unworld - undefine a world - /purgeworld - undefine a group of worlds - /saveworld - save world definitions to a file - /loadworld - load world definitions from a file - /listworlds - display world definitions - /edworld - edit a world definition - world_info() - get world information + Associated commands: + /addworld + define a new world + /world connect to a defined world + /dc disconnect from a world + /unworld + undefine a world + /purgeworld + undefine a group of worlds + /saveworld + save world definitions to a file + /loadworld + load world definitions from a file + /listworlds + display world definitions + /edworld + edit a world definition + world_info() + get world information #$world_name #$world_character @@ -10747,49 +10789,49 @@ worlds #$world_mfile #$world_type #fields - Fugue stores a list of "worlds" that it knows about. Each world has several - fields associated with it: - name a label used to refer to the world - type an optional string for matching /def -T - character - optional login name - password - optional login password - host server's internet host name, IPv4 address, or (if your platform - supports it) IPv6 address - port server's TCP port number or name - mfile optional macro file - login "1" if automatic login is enabled for the world's socket, "0" - otherwise. - proxy "1" if this world's socket is using a proxy, "0" otherwise - src optional name or address used for client (tf) end of connection. - cipher current cipher used by SSL connection to world. - - The character name, password, and type are used by automatic login, if the - %{login} flag is on. - - The macro file is loaded when a socket is opened to the world. It can - contain any commands you want executed automatically when you connect to - that world. If the flag %{sockmload} is on, this file will also be loaded - whenever you switch to a world with the SOCKETB and SOCKETF keys (see - sockets, /dokey, hooks (CONNECT)). - - World information can be accessed with the macro expansion - ${world_fieldname} or the function world_info(worldname, fieldname), where - <fieldname> is one of the fields described above. - - For example: - /eval say I am ${world_character} on ${world_name}. - This would tell the rest of the world some stuff they probably don't care - about, namely the label your Fugue has assigned to the current world and the - character name under which it logged on. + Fugue stores a list of "worlds" that it knows about. Each world has several + fields associated with it: + name a label used to refer to the world + type an optional string for matching /def -T + character + optional login name + password + optional login password + host server's internet host name, IPv4 address, or (if your platform + supports it) IPv6 address + port server's TCP port number or name + mfile optional macro file + login "1" if automatic login is enabled for the world's socket, "0" + otherwise. + proxy "1" if this world's socket is using a proxy, "0" otherwise + src optional name or address used for client (tf) end of connection. + cipher current cipher used by SSL connection to world. + + The character name, password, and type are used by automatic login, if the + %{login} flag is on. + + The macro file is loaded when a socket is opened to the world. It can + contain any commands you want executed automatically when you connect to + that world. If the flag %{sockmload} is on, this file will also be loaded + whenever you switch to a world with the SOCKETB and SOCKETF keys (see + sockets, /dokey, hooks (CONNECT)). + + World information can be accessed with the macro expansion + ${world_fieldname} or the function world_info(worldname, fieldname), where + <fieldname> is one of the fields described above. + + For example: + /eval say I am ${world_character} on ${world_name}. + This would tell the rest of the world some stuff they probably don't care + about, namely the label your Fugue has assigned to the current world and the + character name under which it logged on. # - Fugue also keeps track of a world named "default", which is just a dummy - world with a character name and password, and optionally a macro file. If a - default world is defined, worlds without character, password, or file fields - will use the values from the default world. + Fugue also keeps track of a world named "default", which is just a dummy + world with a character name and password, and optionally a macro file. If a + default world is defined, worlds without character, password, or file fields + will use the values from the default world. - See also: sockets + See also: sockets & diff --git a/tf-lib/tfrc b/tf-lib/tfrc index a246df2..d6efaad 100644 --- a/tf-lib/tfrc +++ b/tf-lib/tfrc @@ -15,6 +15,10 @@ ;;; I recommend this unless you have old macros containing multiple slashes. /set oldslash=off +;;; Unnamed worlds used to be wrapped in () which could cause problems with +;;; macros. If for some reason you want the () back, uncomment the next line. +;/set oldunnamed=on + ;;; Enter the directory where you keep your tf files. /cd ~/tf-dir diff --git a/tf-lib/tfstatus.tf b/tf-lib/tfstatus.tf index 59a3591..3efa5a0 100644 --- a/tf-lib/tfstatus.tf +++ b/tf-lib/tfstatus.tf @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; TinyFugue - programmable mud client -;;;; Copyright (C) 1998-2002, 2003, 2004, 2005, 2006-2007 Ken Keys +;;;; Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) ;;;; ;;;; TinyFugue (aka "tf") is protected under the terms of the GNU ;;;; General Public License. See the file "COPYING" for details. diff --git a/tf-lib/tr.tf b/tf-lib/tr.tf index 5c23d83..669cb25 100644 --- a/tf-lib/tr.tf +++ b/tf-lib/tr.tf @@ -1,6 +1,6 @@ ;;;; Character translation ;;; usage: /tr -;;; and are lists of charcters. Each character in +;;; and are lists of characters. Each character in ;;; that appears in will be translated to the corresponding ;;; character in . diff --git a/tf-lib/utilities.tf b/tf-lib/utilities.tf new file mode 100644 index 0000000..26286b4 --- /dev/null +++ b/tf-lib/utilities.tf @@ -0,0 +1,1201 @@ +;============================================================================; +; utilities.tf (formerly mylib.tf) ; +; This contains common functions that were missing in the main tf library ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Virtual Array +;;; +;;; Originally submitted to the Tinyfugue mailing list] +;;; by Galvin +;;; Modified by Michael Hunger +;;; Modified by Regan@ Many MU's +;;; Possibly modified by other members of the Tinyfugue mailing list. +;;; +;;; You may store anything to be abbreviated in +;;; these lists, e.g. weapons, friends, npcs, scores etc. +;;; +;;; If you use text not containing other characters than letters, numbers and _ +;;; you may also use this as an simple key-value hash list +;;; e.g. /set_array weapon s1 sword_with_a_very_long_id +;;; +;;; /def wield = /get_array weapon %1%;wield %? +;;; +;;; Usage: +;;; instead of: wield sword_with_a_very_long_id +;;; just use: /wield s1 +;;; +;;; Some Examples: +;;; /test put_array('test_array', 1, 367382) +;;; /test put_array('test_array', 2, 'a string') +;;; /test echo(get_array('test_array', 1)) +;;; /test echo(get_array('test_array', 2)) +;;; +;;; You should see 367382 and a string echoed to your screen. +;;; +;;; Passing an array to a function +;;; +;;; /def function_array = \ +;;; /test array1 := get_array({*}, 1) %;\ +;;; /test array2 := get_array({*}, 2) %;\ +;;; /test echo(strcat(array1, ':', array2)) +;;; +;;; /test function_array('test_array') +;;; +;;; Debugging can be done with /listarray which would return: +;;; /listarray test_array +;;; test_array[1]:=367382 +;;; test_array[2]:=a string +;;; test_array[3]:= +;;; +;;; /listarray only lists up till a blank entry, +;;; I thought about using entry 0 as the # of elements but decided +;;; that some people may want to start arrays from 0 and not 1. +;;; +;;; Some get_array_count examples: +;;; +;;; /test put_array('halloween', 1, 'skeleton') +;;; /test put_array('halloween', 2, 'owls') +;;; /test put_array('halloween', 3, 'boo!') +;;; +;;; /test echo(get_array_count('halloween', 1)) +;;; returns 3 +;;; /test echo(get_array_count('halloween', 2)) +;;; returns 2 +;;; +;;; /test put_2array('double', 1, 1 , 'hmm') +;;; /test put_2array('double, 1, 2, 'burp!') +;;; /test put_2array('double, 1, 3, 'damn') +;;; /test echo(get_2array_count('double', 1, 1) +;;; +;----------------------------------------------------------------------------; + +/loaded __TFLIB__/utilities.tf + +;----------------------------------------------------------------------------- +;Get array / get 2array : A virtual array function to similate a real array +;usage: +;get_array("Array name here", I) & get_2array("array name", I, I2) +;example get_array("Dir_Array", 43) returns the 43rd element from "Dir_Stack" +;----------------------------------------------------------------------------- +/def get_array = \ + /return _array_%1_%2 + +/def get_2array = \ + /return _array_%1_%2_%3 + +;----------------------------------------------------------------------------- +;PUT array / put 2array: A virtual array function to similate a real array +;usage: +;put_array("Array name here", I, st) & put_2array("array name", I, I2, st) +;example put_array("Dir_Array", 43, "sw") puts "sw" at element 43 in +;"Dir_Array" +;----------------------------------------------------------------------------- +/def put_array = \ + /IF (strlen({3}) > 0) \ + /set _array_%1_%2=%3%;\ + /ELSE \ + /unset _array_%1_%2%;\ + /ENDIF%;\ + +/def put_2array = \ + /IF (strlen({4}) > 0) \ + /set _array_%1_%2_%3=%4%;\ + /ELSE \ + /unset _array_%1_%2_%3%;\ + /ENDIF%;\ + +;----------------------------------------------------------------------------- +;PURGE array : Purges a virtual array made by get_array & put_array +;usage: +;purge_array("Array name here") +;example purge_array("Dir_Array"), deletes the whole array from memory +;NOTE: Purge array starts from element 0 +;NOTE: this can also purge double dimensioned arrays too. +;----------------------------------------------------------------------------- +/def purge_array = \ + /quote -S /unset `/listvar -s _array_%1_* + +;----------------------------------------------------------------------------- +;listarray / list2array +;USAGE: +;/listarray array_name & /list2array array_name +;Will list the whole array of array_name starting from element +;/list2array only lists the second dimension from +;----------------------------------------------------------------------------- +/def listarray = \ + /test LA_Count := %2 - 1%;\ + /test LA_Element := " "%;\ + /while (strlen(LA_Element) > 0) \ + /test ++LA_Count%;\ + /test LA_Element := get_array({1}, LA_Count)%;\ + /test echo(strcat({1}, "[", LA_Count, "]:=", LA_Element))%;\ + /DONE + +/def list2array = \ + /test LA2_Count := -1%;\ + /test LA2_Element := " "%;\ + /while (LA2_Count < 255) \ + /test ++LA2_Count%;\ + /test LA2_Element := get_2array({1}, {2}, LA2_Count)%;\ + /IF (strlen(LA2_Element) > 0) \ + /test echo(strcat({1}, "[", {2}, "][", LA2_Count, "]:=", LA2_Element))%;\ + /ENDIF%;\ + /DONE + +;----------------------------------------------------------------------------- +; list_array() / list_2array() +; +; List an array in an easy to read format. +; USAGE: +; list_array("array_name", startindex) +; list_2array("array_name", startindex1, startindex2) +; /list_array +; /list_2array +; +; "array_name" : Name of the array you want to list. (function form only) +; startindex : Starting element you want to list from. +; startindex1 : Starting element of startindex2 you want to list from. +; startindex2 : Starting element of startindex1 +;----------------------------------------------------------------------------- +/def list_array = \ + /def list_array2 = \ + /test la_rawname := {1} %%;\ + /test la_name := {2} %%;\ + /test la_index := substr(la_rawname, strlen(la_name) + 8, 256) %%;\ + /IF (la_index >= {3}) \ + /test echo(strcat(la_name, '[', la_index, '] :=', get_array(la_name, la_index))) %%;\ + /ENDIF %;\ + /quote -S /test list_array2("`"/listvar -s _%1_array_*"", {1}, {2}) %;\ + /undef list_array2 + +/def list_2array = \ + /test la2_i2F := 0 %;\ + /def list_2array2 = \ + /test la2_rawname := {1} %%;\ + /test la2_name := {2} %%;\ + /test la2_rawindex := substr(la2_rawname, strlen(la2_name) + 8, 256) %%;\ + /test la2_pos := strstr(la2_rawindex, '_') %%;\ + /test la2_index1 := substr(la2_rawindex, 0, la2_pos) %%;\ + /test la2_index2 := substr(la2_rawindex, la2_pos + 1, 255) %%;\ + /IF (la2_index1 >= {3}) \ + /IF ( (la2_i2F = 0) & (la2_index2 >= {4}) )\ + /test la2_i2F := 1 %%;\ + /ENDIF %%;\ + /IF (la2_i2F = 1) \ + /test echo(strcat(la2_name, '[', la2_index1, '][', la2_index2, '] :=', get_2array(la2_name, la2_index1, la2_index2))) %%;\ + /ENDIF %%;\ + /ENDIF %;\ + /quote -S /test list_2array2("`"/listvar -s _%1_array_*"", {1}, {2}, {3}) %;\ + /undef list_2array2 + +;----------------------------------------------------------------------------- +;GET array count / GET 2array count +; Written by: Ian Leisk who may actually be "Galvin", but, +; may not (kairo at attbi dot com)! +;usage: +;get_array_count("Array name here", start) +;get_2array_count("Array name here", index, start) +; +;NOTE: +;These will count the number of elements starting at "start" till the first +;empty element. +;Get_array2_count will count the number of elements starting at index +;from "start" +;----------------------------------------------------------------------------- + +/def get_array_count = \ + /test GA_Name := {1} %;\ + /test GA_Count := {2} - 1 %;\ + /test GA_Element := " " %;\ + /while (strlen(GA_Element) > 0) \ + /test ++GA_Count %;\ + /test GA_Element := get_array(GA_Name, GA_Count) %;\ + /DONE %;\ + /return GA_Count - 1 + +/def get_2array_count = \ + /test GA2_Name := {1} %;\ + /test GA2_Index := {2} %;\ + /test GA2_Count := {3} -1 %;\ + /test GA2_Element := " " %;\ + /while (strlen(GA2_Element) > 0) \ + /test ++GA2_Count %;\ + /test GA2_Element := get_2array(GA2_Name, GA2_Index, GA2_Count) %;\ + /DONE %;\ + /return GA2_Count - 1 + +;----------------------------------------------------------------------------- +; tfwrite_array() / tfwrite_2array() +; +; Writes a virtual array to a disk file. +; USAGE: +; tfwrite_array(file_variable, "array_name", start_index, size) +; tfwrite_2array(file_variable, "array_name", index, start_index, size) +; +; file_variable : File variable of a tfopened file. +; "array_name" : Name of the array. +; start_index : The element you want to start writing from. +; index : Start_index of index [first dimension] (tfwrite_2array only) +; Size : Number of elements to write. +; +; NOTES: tfwrite_2array() can't write the whole array to disk. You must +; write each dimension at a time. +;----------------------------------------------------------------------------- +/def tfwrite_array = \ + /let file_ %{1} %;\ + /let array_ %{2} %;\ + /let start_ %{3} %;\ + /let size_ %{4} %;\ + /let count_ 0 %;\ + /WHILE (++count_ <= size_) \ + /test tfwrite(file_, get_array(array_, start_)) %;\ + /test ++start_ %;\ + /DONE + +/def tfwrite_2array = \ + /let file_ %{1} %;\ + /let array_ %{2} %;\ + /let index_ %{3} %;\ + /let start_ %{4} %;\ + /let size_ %{5} %;\ + /let count_ 0 %;\ + /WHILE (++count_ <= size_) \ + /test tfwrite(file_, get_2array(array_, index_, start_)) %;\ + /test ++start_ %;\ + /DONE + +;----------------------------------------------------------------------------- +; tfread_array() / tfread_2array() +; +; reads an array file from disk +; USAGE: +; x := tfread_array(file_variable, "array_name", start_index, size) +; x := tfread_2array(file_variable, "array_name", index, start_index, size) +; +; x : Number of records read. +; file_variable : File variable of a tfopened file. +; "array_name" : Name of the array. +; start_index : Starting element you want to read into. +; index : Start_index of index [first dimension] (tfread_2array only) +; size : Number of elements to read. +;----------------------------------------------------------------------------- +/def tfread_array = \ + /let file_ %{1} %;\ + /let array_ %{2} %;\ + /let start_ %{3} %;\ + /let size_ %{4} %;\ + /let count_ 0 %;\ + /let done_ 0 %;\ + /let err_ 0 %;\ + /let st_ 0 %;\ + /test st_ := '' %;\ + /WHILE (!done_) \ + /test err_ := tfread(file_, st_) %;\ + /IF ( (err_ != -1) & (count_ < size_) ) \ + /test put_array(array_, start_, st_) %;\ + /test ++count_ %;\ + /test ++start_ %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /DONE %;\ + /RETURN count_ + +/def tfread_2array = \ + /let file_ %{1} %;\ + /let array_ %{2} %;\ + /let index_ %{3} %;\ + /let start_ %{4} %;\ + /let size_ %{5} %;\ + /let count_ 0 %;\ + /let done_ 0 %;\ + /let err_ 0 %;\ + /let st_ 0 %;\ + /test st_ := '' %;\ + /WHILE (!done_) \ + /test err_ := tfread(file_, st_) %;\ + /IF ( (err_ != -1) & (count_ < size_) ) \ + /test put_2array(array_, index_, start_, st_) %;\ + /test ++count_ %;\ + /test ++start_ %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /DONE %;\ + /RETURN count_ + +;----------------------------------------------------------------------------- +; strstr_array() / strstr_2array() +; +; Searches for a value in a virtual array returning the element its found in. +; USAGE: +; x := strstr_array("array_name", start_index, size, value) +; x := strstr_2array("array_name", index, start_index, size, value) +; +; x : Element of "array_name" that value was found in. +; -1 is returned if value was not found. +; "array_name" : Name of the array. +; start_index : Element to start searching at +; index : Start_index of index [first dimension] (strstr_2arrat only). +; size : Number of elements to search. +; value : The item your searching for. +; +; NOTES: Strstr_2array can't search all dimensions, you must search +; each dimension at a time. +; If value = "" then it will return the first element that is blank. +;----------------------------------------------------------------------------- +/def strstr_array = \ + /let array_ %{1} %;\ + /let start_ %{2} %;\ + /let size_ %{3} %;\ + /let value_ 0 %;\ + /test value_ := {4} %;\ + /let count_ 0 %;\ + /let pos_ 0 %;\ + /let st_ 0 %;\ + /test st_ := '' %;\ + /let element_ -1 %;\ + /WHILE ( (++count_ <= size_) & (element_ = -1) ) \ + /test st_ := get_array(array_, start_) %;\ + /IF (value_ =~ '') \ + /IF (st_ =~ '') \ + /test element_ := start_ %;\ + /ENDIF %;\ + /ELSE \ + /test pos_ := strstr(st_, value_) %;\ + /IF (pos_ > -1) \ + /test element_ := start_ %;\ + /ENDIF %;\ + /ENDIF %;\ + /test ++start_ %;\ + /DONE %;\ + /RETURN element_ + +/def strstr_2array = \ + /let array_ %{1} %;\ + /let index_ %{2} %;\ + /let start_ %{3} %;\ + /let size_ %{4} %;\ + /let value_ 0 %;\ + /test value_ := {5} %;\ + /let count_ 0 %;\ + /let pos_ 0 %;\ + /let st_ 0 %;\ + /let element_ -1 %;\ + /test st_ := '' %;\ + /WHILE ( (++count_ <= size_) & (element_ = -1) ) \ + /test st_ := get_2array(array_, index_, start_) %;\ + /IF (value_ =~ '') \ + /IF (st_ =~ '') \ + /test element_ := start_ %;\ + /ENDIF %;\ + /ELSE \ + /test pos_ := strstr(st_, value_) %;\ + /IF (pos_ > -1) \ + /test element_ := start_ %;\ + /ENDIF %;\ + /ENDIF %;\ + /test ++start_ %;\ + /DONE %;\ + /RETURN element_; + +;----------------------------------------------------------------------------- +; searchstr_2array() +; +; Searches for a value in all dimensions of a virtual array and returns +; each element its found in. Multiple matches are put into a space-delimited +; list +; Modified by Regan @ Many MU's +; +; USAGE: +; x := searchstr_2array("array_name", index, start_index, size, value) +; +; x : Element of "array_name" that value was found in. +; -1 is returned if value was not found. +; "array_name" : Name of the array. +; start_index : Element to start searching at +; index : Start_index of index [first dimension] (strstr_2arrat only). +; size : Number of elements to search. +; value : The item your searching for. +; +; If value = "" then it will return the first element that is blank. +;----------------------------------------------------------------------------- + +/def searchstr_2array = \ + /let array_ %{1} %;\ + /let index_ %{2} %;\ + /let start_ %{3} %;\ + /let size_ %{4} %;\ + /let value_ 0 %;\ + /test value_ := {5} %;\ + /let count_ 0 %;\ + /let pos_ 0 %;\ + /let st_ 0 %;\ + /let element_ -1 %;\ + /test blank_ := ' ' %;\ + /test list_ := '' %;\ + /test st_ := '' %;\ + /WHILE (++count_ <= size_) \ + /test st_ := get_2array(array_, start_, index_) %;\ + /IF (value_ =~ '') \ + /IF (st_ =~ '') \ + /test element_ := start_ %;\ + /IF (list_ =~ '') \ + /test list_ := element_ %;\ + /ELSE \ + /test temp_ := strcat(list_, blank_) %:\ + /test list_ := strcat(temp_, element_) %;\ + /ENDIF %;\ + /ENDIF %;\ + /ELSE \ + /test pos_ := strstr(st_, value_) %;\ + /IF (pos_ > -1) \ + /test element_ := start_ %;\ + /IF (list_ =~ '') \ + /test list_ := element_ %;\ + /ELSE \ + /test temp_ := strcat(list_, blank_) %;\ + /test list_ := strcat(temp_, element_) %;\ + /ENDIF %;\ + /ENDIF %;\ + /ENDIF %;\ + /test ++start_ %;\ + /DONE %;\ + /RETURN list_ + +;----------------------------------------------------------------------------- +; chr2chr() +; +; Changes one character to difference character in a string +; USAGE: +; x := chr2chr("string", "searchchar", "changechar") +; +; x : contains "string" with all "." as "_". +; "string" : any string. +; "searchar" : The character to be changed in "string". +; "changechar : The character to replace each occrance of "searchar" in +; "string"." +;----------------------------------------------------------------------------- +/def chr2chr = \ + /let st_ 0 %;\ + /test st_ := {1} %;\ + /let searchchar_ 0 %;\ + /test searchchar_ := {2} %;\ + /let changechar_ 0 %;\ + /test changechar_ := {3} %;\ + /let pos_ -1 %;\ + /let pos2_ 0 %;\ + /let done_ 0 %;\ + /WHILE (!done_) \ + /test pos2_ := pos_ %;\ + /test pos_ := strchr(substr(st_, pos_ + 1), searchchar_) %;\ + /IF (pos_ > -1) \ + /test pos_ := pos_ + pos2_ + 1 %;\ + /IF (substr(st_, pos_, 1) =~ searchchar_) \ + /test st_ := strcat(substr(st_, 0, pos_), changechar_, substr(st_, pos_ + 1)) %;\ + /ENDIF %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /DONE %;\ + /RETURN st_ + +;----------------------------------------------------------------------------- +; tfwrite_vars() +; Write variables to a disk file. +; USAGE: +; x := tfwrite_vars("variables", "matching", file_variable) +; +; x : Number of variables written to disk. +; "variables" : A string matching the variables you want to write to disk. +; "matching" : "simple": straightforward string comparison. +; "glob" : shell-like matching (as before version 3.2). +; "regexp": regular expression. +; "" : defaults to "glob" +; file_variable : File variable of a tfopened file. +; +; EXAMPLES: +; /set movie_title lord of the rings +; /set movie_year 2001 +; /set movie_length 2 hours 59 min +; /test file_ := tfopen("movies.dat", "w") +; /test tfwrite_vars("movie_*", "glob", file_) +; /test tfclose(file_) +; +; This will write all 3 variables to disk. +; +; NOTES: The variables must be global variables made with /set or +; /test var := value. +;----------------------------------------------------------------------------- +/def tfwrite_vars = \ + /let vars_ %{1} %;\ + /let matching_ 0 %;\ + /test matching_ := {2} %;\ + /IF (matching_ =~ '') \ + /test matching_ := "glob" %;\ + /ENDIF %;\ + /let file_ %{3} %;\ + /let count_ 0 %;\ + /def tfwrite_vars2 = \ + /let var_ %%{1} %%;\ + /test ++count_ %%;\ + /test echo(strcat('::',$$[var_],'::')) %%;\ + /test tfwrite(file_, strcat(':',var_,'=',$$[var_], ':')) %;\ + /quote -S /test tfwrite_vars2("`"/listvar -m$[matching_] -s $[vars_]"") %;\ + /undef tfwrite_vars2 %;\ + /return count_ + +;----------------------------------------------------------------------------- +; tfread_vars() +; Reads variables to a from a disk file that was written by tfwrite_vars() +; USAGE: +; x := tfread_vars(file_variable) +; +; x : number of variables read. +; file_variable : File variable of a tfopened file. +; +; EXAMPLES: +; +; /test file_ := tfopen("movies.dat", "r") +; /test tfread_vars(file_) +; /test tfclose(file_) +; +; Now the variables will be set to the same values as shown in the +; tfwrite_vars() examples. +; +; NOTE: The variables do not have to exist prior to reading since they're +; already written in the file by tfwrite_vars() +;----------------------------------------------------------------------------- +/def tfread_vars = \ + /let file_ %{1} %;\ + /let done_ 0 %;\ + /let st_ 0 %;\ + /let pos_ 0 %;\ + /let var_ 0 %;\ + /let value_ 0 %;\ + /let err_ 0 %;\ + /let count_ 0 %;\ + /WHILE (!done_) \ + /test err_ := tfread(file_, st_) %;\ + /IF (err_ != -1) \ + /test ++count_ %;\ + /test st_ := substr(st_, 1, strlen(st_) - 2) %;\ + /test pos_ := strstr(st_, '=') %;\ + /test var_ := substr(st_, 0, pos_) %;\ + /test value_ := substr(st_, pos_ +1) %;\ + /eval /test $[var_] := value_ %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /DONE %;\ + /RETURN count_ + +;----------------------------------------------------------------------------- +; delay() +; +; Delays an X number of seconds before returning. +; USAGE: +; delay(seconds) +;----------------------------------------------------------------------------- +/def delay = \ + /let seconds_ %{1} %;\ + /let ctime_ 0 %;\ + /test ctime_ := get_time(0) %;\ + /WHILE ( (get_time(0) - ctime_) < seconds_ ) \ + /DONE + +;----------------------------------------------------------------------------- +; get_time() +; +; returns hours, minutes, seconds in integer format +; USAGE: +; x := get_time(0) +; x := get_time(raw_time) +; +; x : Time in seconds. +; 0 : Current time in seconds returned. +; raw_time : Raw time, raw time gets passed back from tinyfugue's time() +; This will get converted to seconds. +;----------------------------------------------------------------------------- +/def get_time = \ + /let st_ 0 %;\ + /let hours_ 0 %;\ + /let min_ 0 %;\ + /let sec_ 0 %;\ + /IF ({*} = 0) \ + /test st_ := ftime('%%H:%%M:%%S', time()) %;\ + /ELSE \ + /test st_ := ftime('%%H:%%M:%%S', {*}) %;\ + /ENDIF %;\ + /test hours_ := substr(st_, 0, 2) %;\ + /test min_ := substr(st_, 3, 2) %;\ + /test sec_ := substr(st_, 6, 2) %;\ + /return time2sec(hours_, min_, sec_) + +;----------------------------------------------------------------------------- +; time2sec() +; +; converts hours, min, sec to total seconds +; USAGE: +; +; x := time2sec(hours, min, sec) +; +; x : The total time in seconds of hours, min, sec. +; hours : Can range from 0 to 23. +; min : Can range from 0 to 59. +; sec : Can range from 0 to 59. +;----------------------------------------------------------------------------- +/def time2sec = \ + /let h_ %{1} %;\ + /let m_ %{2} %;\ + /let s_ %{3} %;\ + /return h_ * 3600 + m_ * 60 + s_ + +;----------------------------------------------------------------------------- +; sec2time() +; +; converts total seconds back into hours, min, sec +; USAGE: +; sec2time("time_rec", seconds) +; +; "time_rec" : Contains the hours, min, seconds passed back. +; get_rec("time_rec", "hours") = hours. +; get_rec("time_rec", "min") = minutes. +; get_rec("time_rec", "sec") = seconds. +; seconds : Value in seconds. +; +; NOTES: "time_rec" can be any record name you want. +; If "" is specified for "time_rec" then no record gets used. See how +; this is used in sec2clock. Local vars are set in calling function +; to get back the values from this function. +;----------------------------------------------------------------------------- +/def sec2time = \ + /let rec_ 0 %;\ + /test rec_ := {1} %;\ + /let int_ %{2} %;\ + /IF (rec_ !~ '') \ + /let hours_ 0 %;\ + /let min_ 0 %;\ + /let sec_ 0 %;\ + /ENDIF %;\ + /test hours_ := int_ / 3600 %;\ + /let rem_ $[int_ - (hours_ * 3600)] %;\ + /test min_ := rem_ / 60 %;\ + /test rem_ := rem_ - (min_ * 60) %;\ + /test sec_ := rem_ %;\ + /IF (rec_ !~ '') \ + /test del_rec(rec_, '') %;\ + /test add_rec(rec_, 'hours', hours_) %;\ + /test add_rec(rec_, 'min', min_) %;\ + /test add_rec(rec_, 'sec', sec_) %;\ + /ENDIF + +;----------------------------------------------------------------------------- +; sec2clock() +; +; similar to sec2time except it turns seconds into a clock reading AM/PM +; USAGE: +; x := sec2clock(value) +; +; x : Time returned formatted in ##:##pm. Example : "3:04am" +; value : Total seconds of time ranging over a 24 hour period. +;----------------------------------------------------------------------------- +/def sec2clock = \ + /let rawtime_ %{1} %;\ + /let hours_ 0 %;\ + /let min_ 0 %;\ + /let sec_ 0 %;\ + /let pm_ 0 %;\ + /let st_ 0 %;\ + /test sec2time('', rawtime_) %;\ + /IF (min_ <= 9) \ + /test min_ := strcat('0', min_) %;\ + /ENDIF %;\ + /IF (rawtime_ > 12 * 3600) \ + /test pm_ := 1 %;\ + /test hours_ := hours_ - 12 %;\ + /ELSE \ + /test pm_ := 0 %;\ + /ENDIF %;\ + /test st_ := strcat(hours_, ':', min_) %;\ + /IF (pm_) \ + /test st_ := strcat(st_, 'pm') %;\ + /ELSE \ + /test st_ := strcat(st_, 'am') %;\ + /ENDIF %;\ + /return st_ + +;----------------------------------------------------------------------------- +; num2commas() +; +; returns a number formatted with comma's +; USAGE: +; x := num2commas(value) +; +; x : Value returned with commas. Example 1,345 from 1345. +; value : Any number. +; +; NOTES: x can also be floating point. +;----------------------------------------------------------------------------- +/def num2commas = \ + /let st_ %{1} %;\ + /let pos_ 0 %;\ + /let count_ 0 %;\ + /let count2_ 0 %;\ + /let st2_ 0 %;\ + /let frac_ 0 %;\ + /test st2_ := '' %;\ + /test pos_ := strstr(st_, '.') %;\ + /IF (pos_ > -1) \ + /test count_ := pos_ %;\ + /test frac_ := substr(st_, pos_) %;\ + /ELSE \ + /test count_ := strlen(st_) %;\ + /test frac_ := '' %;\ + /ENDIF %;\ + /WHILE (--count_ >= 0) \ + /IF ( (count2_ = 3) & (substr(st_, count_, 1) !~ '-') ) \ + /test st2_ := strcat(',', st2_) %;\ + /test count2_ := 0 %;\ + /ENDIF %;\ + /test st2_ := strcat(substr(st_, count_, 1), st2_) %;\ + /test ++count2_ %;\ + /DONE %;\ + /return strcat(st2_, frac_) + +;----------------------------------------------------------------------------- +; send_macro() +; +; Sends a macro to tinyfugue +; USAGE: +; send_macro("macro") +; +; "macro" : A tinyfugue macro like "/help" +; +; NOTES: If "macro" doesn't begin with a "/" it will send it to the world +; you're currently connected to. +;----------------------------------------------------------------------------- +/def send_macro = \ + /def send_macro2 = \ + %* %;\ + /send_macro2 %;\ + /undef send_macro2 + +;----------------------------------------------------------------------------- +; strip_left() +; +; Strips all leading spaces from a string. +; USAGE: +; x := strip_left("string") +; +; x : Returned "string" with no leading spaces. +; "string" : Any string +;----------------------------------------------------------------------------- +/def strip_left = \ + /let st_ 0 %;\ + /test st_ := {1} %;\ + /let count_ -1 %;\ + /let len_ $[strlen(st_)] %;\ + /WHILE ( (++count_ < len_) & (substr(st_, count_, 1) =~ ' ') ) \ + /DONE %;\ + /return substr(st_, count_) + +;----------------------------------------------------------------------------- +; strip_right() +; +; Strips all trailing spaces from a string. +; USAGE: +; x := strip_right("string") +; +; x : Returned "string" with no leading spaces. +; "string" : Any string +;----------------------------------------------------------------------------- +/def strip_right = \ + /let st_=%* %;\ + /RETURN st_ + +;----------------------------------------------------------------------------- +; parse_string() +; +; This function will parse a string by the separator you choose and place the +; elements back into an array of your choosing. +; USAGE: +; parse_string("array", "sep", "string") +; +; "array" : get_array("data", 0) = number of elements returned. +; get_array("data", 1, 2, 3..) = "string" parsed out. +; "sep" : The divider of elements in string. +; "string" : The string you want parsed. +; +; EXAMPLE: +; parse_string("data", " ", "hp(45/100) sp(450/500)") +; +; get_array("data", 0) = 2 +; get_array("data", 1) = "hp(45/100)" +; get_array("data", 2) = "sp(450/500)" +;----------------------------------------------------------------------------- +/def parse_string = \ + /let array_ %{1} %;\ + /let sep_ 0 %;\ + /test sep_ := {2} %;\ + /let data_ 0 %;\ + /test data_ := {3} %;\ + /let count_ -1 %;\ + /let parcount_ 0 %;\ + /let ch_ 0 %;\ + /let st_ 0 %;\ + /let len_ 0 %;\ + /test ch_ := '' %;\ + /test st_ := '' %;\ + /test len_ := strlen(data_) %;\ + /test purge_array(array_) %;\ + /WHILE (++count_ <= len_) \ + /test ch_ := substr(data_, count_, 1) %;\ + /IF ( (ch_ =~ sep_) | (count_ = len_) ) \ + /test ++parcount_ %;\ + /test put_array(array_, parcount_, st_) %;\ + /test st_ := '' %;\ + /ELSE \ + /test st_ := strcat(st_, ch_) %;\ + /ENDIF %;\ + /DONE %;\ + /test put_array(array_, 0, parcount_) + +;----------------------------------------------------------------------------- +; search_literal() +; +; Search for a character in a string of characters. Characters will be +; skipped in the string that start with a literal-switch. The position of +; the character found will be based on the string returned with no literal +; switches. +; USAGE: +; x := search_literal("data", "string", char, litchar) +; +; x : Position of char in "string". -1 returned if nothing found. +; "data" : Record that contains the following: +; /rec :data.pos: = position +; /rec :data.st: = "string" with no literal switches. +; "string" : String being searched. +; char : Char to search for in "string" skipping literal switches. +; litchar : The literal-switch of your choosing. +; +; EXAMPLES: +; x := search_literal("data", "/A/C/car/rocks", "c", "/") +; RETURNS: +; x := 7 +; /rec :data.pos: = 7 +; /rec :data.st: = "ACcarrocks" +; +; NOTES: To use a literal-switch as data in the "data" use two of them in +; a row, like "\\" would mean "\" +;----------------------------------------------------------------------------- +/def search_literal = \ + /let rec_ 0 %;\ + /test rec_ := {1} %;\ + /let string_ 0 %;\ + /test string_ := {2} %;\ + /let char_ 0 %;\ + /test char_ := {3} %;\ + /let litchar_ 0 %;\ + /test litchar_ := {4} %;\ + /let string2_ 0 %;\ + /let lastch_ 0 %;\ + /let ch_ 0 %;\ + /let count_ -1 %;\ + /let pos_ -1 %;\ + /let length_ $[strlen(string_)] %;\ + /test string2_ := '' %;\ + /test lastch_ := '' %;\ + /test ch_ := '' %;\ + /WHILE (++count_ <= length_) \ + /test lastch_ := ch_ %;\ + /test ch_ := substr(string_, count_, 1) %;\ + /IF (ch_ =~ litchar_) \ + /IF (substr(string_, count_ + 1, 1) =~ litchar_) \ + /test string2_ := strcat(string2_, litchar_) %;\ + /test ++count_ %;\ + /ENDIF %;\ + /ELSE \ + /IF ( (lastch_ !~ litchar_) & (ch_ =~ char_) & (pos_ = -1) ) \ + /test pos_ := strlen(string2_) %;\ + /ENDIF %;\ + /test string2_ := strcat(string2_, ch_) %;\ + /ENDIF %;\ + /DONE %;\ + /test del_rec(rec_, '') %;\ + /test add_rec(rec_, 'pos', pos_) %;\ + /test add_rec(rec_, 'st', string2_) %;\ + /RETURN pos_ + +;----------------------------------------------------------------------------- +; find_string() +; +; Finds a string within a string and return the starting position, end +; position and length in a virtual array. +; USAGE: +; x := find_string("pos", "string", "search", stringpos, skip) +; +; x : -1 no string found, 1 string found. +; "pos" : Position data returned in a record. +; /rec :pos.found: = 1 if string found -1 if not found. +; /rec :pos.st: = search data found. +; /rec :pos.start: = starting location in "string". +; /rec :pos.end: = ending location in "string". +; /rec :pos.len: = length of sub string found. +; "string" : String being searched. +; "search" : String your searching for. +; stringpos : Position in string to start searching at. +; skip : Number of matches to skip before returning a real match. +; +; EXAMPLES: +; find_string("pos", "Status is currently 45.65 degrees", "y * d", 0, 0) +; RETURNS: +; /rec :pos.found: = 1 {string found} +; /rec :pos.st: = "y 45.65 d" {actual data found} +; /rec :pos.start: = 18 {starting position} +; /rec :pos.end: = 26 {ending position} +; /rec :pos.len: = 9 {length} +; +; To pull out just the 45.65 in the example above you would need to do: +; find_string("pos", "Status is currently 45.65 degrees", "y (*) d", 0, 0) +; +; NOTES: Anything in () is returned, you can only have one set of () and +; one "*" in your search. Use ~( ~) ~* if you want that as part of +; your search data. When using () with *, the * must be inside the +; () or you may get strange results. +;----------------------------------------------------------------------------- +/def find_string2 = \ + /let string_ 0 %;\ + /test string_ := {1} %;\ + /let search_ := 0 %;\ + /test search_ := {2} %;\ + /let skip_ %{3} %;\ + /let searchl_ $[strlen(search_)] %;\ + /let count_ 0 %;\ + /let count2_ 0 %;\ + /let done_ 0 %;\ + /let pos_ 0 %;\ + /let pos2_ 0 %;\ + /WHILE (!done_) \ + /test pos_ := strstr(string_, search_) %;\ + /IF (pos_ > -1) \ + /test ++count2_ %;\ + /IF (count2_ > skip_) \ + /test pos_ := pos2_ + pos_ %;\ + /test done_ := 1 %;\ + /ELSE \ + /test string_ := substr(string_, pos_ + searchl_) %;\ + /test pos2_ := pos2_ + pos_ + searchl_ %;\ + /ENDIF %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /DONE %;\ + /IF (count2_ <= skip_) \ + /test pos_ := -1 %;\ + /ENDIF %;\ + /RETURN pos_ + +/def find_string3 = \ + /let string_ 0 %;\ + /test string_ := {1} %;\ + /let searchL_ 0 %;\ + /test searchL_ := {2} %;\ + /let searchR_ 0 %;\ + /test searchR_ := {3} %;\ + /let skip_ %{4} %;\ + /let count_ 0 %;\ + /let count2_ 0 %;\ + /let done_ 0 %;\ + /let posL_ 0 %;\ + /let posR_ 0 %;\ + /let pos2_ 0 %;\ + /WHILE (!done_) \ + /test posL_ := strstr(string_, searchL_) %;\ + /IF (posL_ > -1) \ + /test string_ := substr(string_, posL_ + strlen(searchL_)) %;\ + /test posR_ := strstr(string_, searchR_) %;\ + /IF (posR_ > -1) \ + /test ++count2_ %;\ + /IF (count2_ > skip_) \ + /test length_ := posR_ + strlen(searchL_) + strlen(searchR_) %;\ + /test pos_ := pos2_ + posL_ %;\ + /test done_ := 1 %;\ + /ELSE \ + /test pos2_ := pos2_ + posL_ + strlen(searchL_) %;\ + /ENDIF %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /DONE %;\ + /IF (count2_ <= skip_) \ + /test pos_ := -1 %;\ + /ENDIF %;\ + /RETURN pos_ + +/def find_string = \ + /let rec_ 0 %;\ + /test rec_ := {1} %;\ + /let string_ 0 %;\ + /test string_ := {2} %;\ + /let search_ 0 %;\ + /test search_ := {3} %;\ + /let stringpos_ %{4} %;\ + /let skip_ 0 %;\ + /test skip_ := {5} %;\ + /let found_ -1 %;\ + /let pos_ -1 %;\ + /let pos2_ 0 %;\ + /let end_ 0 %;\ + /let length_ 0 %;\ + /let left_ 0 %;\ + /let right_ 0 %;\ + /let st_ 0 %;\ + /let searchL_ 0 %;\ + /let searchR_ 0 %;\ + /test right_ := 0 %;\ + /test st_ := '' %;\ + /test searchL_ := '' %;\ + /test searchR_ := '' %;\ + /test string_ := substr(string_, stringpos_) %;\ + /IF (search_ !~ '') \ + /IF ( (search_ =~ '*') | (search_ =~ "(*)") ) \ + /IF ( (skip_ = 0) & (string_ !~ '') )\ + /test found_ := 1 %;\ + /test pos_ := 0 %;\ + /test end_ := strlen(string_) - 1 %;\ + /test length_ := end_ + 1 %;\ + /test st_ := string_ %;\ + /ENDIF %;\ + /ELSE \ + /test del_rec(rec_, '') %;\ + /test left_ := search_literal(rec_, search_, '(', '~') %;\ + /test right_ := search_literal(rec_, search_, ')', '~') %;\ + /test pos2_ := search_literal(rec_, search_, '*', '~') %;\ + /test search_ := get_rec(rec_, 'st') %;\ + /IF (left_ + right_ > 0) \ + /test search_ := strcat(substr(search_, 0, left_), \ + substr(search_, left_ + 1, right_ - left_ - 1), \ + substr(search_, right_ + 1)) %;\ + /test right_ := right_ - 2 %;\ + /IF (pos2_ > -1) \ + /test --pos2_ %;\ + /ENDIF %;\ + /ENDIF %;\ + /IF (pos2_ = -1) \ + /test found_ := find_string2(string_, search_, skip_) %;\ + /IF (found_ > -1) \ + /test pos_ := found_ %;\ + /test length_ := strlen(search_) %;\ + /test end_ := pos_ + length_ - 1 %;\ + /test st_ := search_ %;\ + /test found_ := 1 %;\ + /IF (left_ + right_ > 0) \ + /test length_ := right_ - left_ + 1 %;\ + /test pos_ := pos_ + left_ %;\ + /test end_ := pos_ + right_ - 1 %;\ + /test st_ := substr(string_, pos_, length_) %;\ + /ENDIF %;\ + /ENDIF %;\ + /ELSE \ + /test searchL_ := substr(search_, 0, pos2_) %;\ + /test searchR_ := substr(search_, pos2_ + 1) %;\ + /IF (find_string3(string_, searchL_, searchR_, skip_) > -1) \ + /test found_ := 1 %;\ + /test end_ := pos_ + length_ - 1 %;\ + /test st_ := substr(string_, pos_, length_) %;\ + /IF (left_ + right_ > 0) \ + /test pos_ := pos_ + left_ %;\ + /test end_ := end_ - (strlen(search_) - right_) + 1 %;\ + /test length_ := end_ - pos_ +1 %;\ + /test st_ := substr(string_, pos_, length_) %;\ + /ENDIF %;\ + /ENDIF %;\ + /ENDIF %;\ + /ENDIF %;\ + /ENDIF %;\ + /test del_rec(rec_, '') %;\ + /IF (found_ = 1) \ + /test pos_ := pos_ + stringpos_ %;\ + /test end_ := end_ + stringpos_ %;\ + /ENDIF %;\ + /test add_rec(rec_, 'found', found_) %;\ + /test add_rec(rec_, 'st', st_) %;\ + /test add_rec(rec_, 'start', pos_) %;\ + /test add_rec(rec_, 'end', end_) %;\ + /test add_rec(rec_, 'len', length_) %;\ + /RETURN found_ + +;----------------------------------------------------------------------------- +; search_replace() +; +; Searches for a string and replaces each occurrence with a new string. +; USAGE +; x := search_replace("record", "string", "search", "replace", count, skip) +; +; x : -1 no searches done, >=1 = how many searches were done. +; "record" : /rec :record.replace: = How many replaces were done. -1 = none +; /rec :record.st: = New string with replaced parts. +; "string" : String to have parts to be replaced. +; "search" : Sub string in "string" to be replaced. +; "replace" : New sub string that will replace each "search" string found. +; count : How many replacements to do. 0 = unlimited. +; skip : How many matches you want to skip before replacing. 0 = no skip. +; +; EXAMPLES: +; search_replace("search", "Status is currently 45.65 degrees", "y (*) d", "34.2", 0, 0) +; RETURNS: +; /rec :search.replace: = 1 (1 replacement was done) +; /rec :search.st: = "Status is currently 32.2 degrees" +; +; NOTES: Anything in () is replaced. You can only have one set of () and +; one "*" in your search. Use ~( ~) ~* if you want that as part of +; your search data. When using () with *, the * must be inside the +; () or you may get strange results. +;----------------------------------------------------------------------------- +/def search_replace = \ + /let rec_ %{1} %;\ + /let string_ 0 %;\ + /test string_ := {2} %;\ + /let search_ 0 %;\ + /test search_ := {3} %;\ + /let replace_ 0 %;\ + /test replace_ := {4} %;\ + /let count_ %{5} %;\ + /let skip_ %{6} %;\ + /let count2_ 0 %;\ + /let pos_ 0 %;\ + /let done_ 0 %;\ + /let start_ 0 %;\ + /let length_ 0 %;\ + /let end_ 0 %;\ + /WHILE (!done_) \ + /IF (find_string(rec_, string_, search_, pos_, skip_) != -1) \ + /IF ( (count2_ < count_) | (count_ = 0) ) \ + /test ++count2_ %;\ + /test skip_ := 0 %;\ + /test start_ := get_rec(rec_, "start") %;\ + /test length_ := get_rec(rec_, "len") %;\ + /test end_ := start_ + length_ %;\ + /test string_ := strcat(substr(string_, 0, start_), \ + replace_, \ + substr(string_, end_)) %;\ + /test pos_ := start_ + strlen(replace_) %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /ELSE \ + /test done_ := 1 %;\ + /ENDIF %;\ + /DONE %;\ + /test del_rec(rec_, '') %;\ + /IF (count2_ = 0) \ + /test count2_ := -1 %;\ + /ENDIF %;\ + /test add_rec(rec_, 'replace', count2_) %;\ + /test add_rec(rec_, 'st', string_) %;\ + /RETURN count2_ +;============================================================================; diff --git a/unix/Makefile b/unix/Makefile index a29faa5..9c07694 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -1,11 +1,10 @@ -# $Id: Makefile,v 35000.39 2007/01/13 23:12:39 kkeys Exp $ ######################################################################## # # TinyFugue - programmable mud client -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) # # TinyFugue (aka "tf") is protected under the terms of the GNU -# General Public Licence. See the file "COPYING" for details. +# General Public License. See the file "COPYING" for details. # # DO NOT EDIT THIS FILE. To change the default configuration, # see "unix/README". @@ -30,28 +29,28 @@ install all files tf: default configure: configure.in autoconf -reconfigure: unconfigure install +reconfigure: unconfigure install unconfigure: - rm -f src/Makefile src/config.h + rm -f src/Makefile src/config.h src tfdefs.h clean: - cd ./src; rm -f *.o Makefile core* *.core config.h typescript* - cd ./unix; rm -f vars.mak + cd ./src; rm -f *.o core* *.core typescript* -distclean: clean +distclean: clean rm -f Build.log -# cd ./tf-lib; rm -f tf-help.idx cd ./src; rm -f tf makehelp tags cd ./src; rm -f tf.pixie* tf.Addrs* tf.Counts* + cd ./src; rm -f Makefile tfconfig.h tfdefs.h + cd ./unix; rm -f vars.mak -spotless cleanest veryclean: distclean +spotless cleanest veryclean: distclean cd ./src; rm -f tf.1.catman uninstall: cd ./src; $(MAKE) uninstall -./src/tf.1.catman: ./src/tf.1.nroffman +./src/tf.1.catman: ./src/tf.1.nroffman TERM=vt100; nroff -man ./src/tf.1.nroffman > ./src/tf.1.catman srcdist: ./src/tf.1.catman @@ -62,11 +61,6 @@ help ./tf-lib/tf-help ./tf-lib/tf-help.idx: __always__ bogus-makefile: cp bogus.mak Makefile -disttest: __always__ - @{ test ! -d CVS && test "`basename \`pwd\``" = "tf-$(TFVER)"; } || \ - { echo '"make dist" should be run from a CVS exported directory.'; \ - false; } - disthelp: distclean ln -s help tf-$(TFVER)-help tar -zcf tf-$(TFVER)-help.tar.gz tf-$(TFVER)-help/. \ @@ -77,7 +71,7 @@ disthelp: distclean rm tf-$(TFVER)-help mv tf-$(TFVER)-help.tar.gz .. -dist: disttest srcdist distclean disthelp help bogus-makefile configure +dist: srcdist distclean disthelp help bogus-makefile configure chmod -R ugo+r . cd ..; tar -zcf tf-$(TFVER).tar.gz -X tf-$(TFVER)/EXCLUDE tf-$(TFVER) cd ..; zip -qlr tf-$(TFVER).zip tf-$(TFVER) \ diff --git a/unix/README b/unix/README index 9d57d63..0246ff0 100644 --- a/unix/README +++ b/unix/README @@ -7,7 +7,7 @@ Installing TinyFugue TinyFugue should work on any Unix-like system that has an ANSI compiler and BSD-style select(). This includes almost everything except some old -SVr3-like systems which either do not have select(), or have a select() +SVR3-like systems which either do not have select(), or have a select() that works only on STREAMS devices but not terminals. Installing TinyFugue is quite easy on most Unix-like systems. @@ -23,24 +23,30 @@ option, be sure to read the rest of this file. In addition to the usual GNU configure options, TinyFugue's configure script has these options: - --enable-version insert version number into name of tf executable - and library directory (implies --enable-symlink) - --enable-symlink[=NAME] make a symlink NAME to the executable [PREFIX/bin/tf] + + --enable-version insert version number into names of installed files + (equivalent to --program-suffix=\"-${TFVER}\") + --enable-symlink=NAME make a symlink NAME to the executable + NAME=BINDIR/tf + --enable-core enable debugging core files --disable-ssl disable SSL support - --enable-inet6 enable IPv6 support (may be broken) - --disable-netdb disable hostname resolution + --enable-getaddrinfo enable getaddrinfo() (if configure complains) + --disable-getaddrinfo disable getaddrinfo() (implies --disable-inet6) + --disable-inet6 disable IPv6 support --disable-termcap use hardcoded vt100 codes instead of termcap - --enable-termcap=LIB enable termcap with library LIB (e.g., ncurses) + --enable-termcap=LIB enable termcap with library LIB (e.g., "ncurses") (needed only if configure guesses incorrectly) + --disable-256colors disable 256 color support (may reduce memory use) --disable-mailcheck disable mail checking --enable-mailcheck=DIR enable checking for mail in directory DIR (needed only if configure guesses incorrectly) - --enable-strip strip debugging symbols from executable - --enable-core enable core files, enable debugging symbols in the - executable (-g), and disable optimization (-O) --disable-history disable /recall and other history features --disable-process disable /quote and /repeat --disable-float disable floating point arithmetic and functions + --disable-widechar disable wide character support (UTF-8) + --enable-atcp enable ATCP support + --enable-gmcp enable GMCP support + --enable-option102 enable 102 option support --with-incdirs=DIRS search for include files in DIRS --with-libdirs=DIRS search for libraries in DIRS --with-inclibdirs=DIRS same as --with-incdirs=DIRS --with-libdirs=DIRS diff --git a/unix/unix.mak b/unix/unix.mak index 60f1b18..58dc8e0 100644 --- a/unix/unix.mak +++ b/unix/unix.mak @@ -1,7 +1,6 @@ -# $Id: unix.mak,v 35004.50 2007/01/13 23:12:39 kkeys Exp $ ######################################################################## # TinyFugue - programmable mud client -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) # # TinyFugue (aka "tf") is protected under the terms of the GNU # General Public License. See the file "COPYING" for details. @@ -17,7 +16,6 @@ SHELL = /bin/sh BUILDERS = Makefile - default: all install: _all PREFIXDIRS $(TF) LIBRARY $(MANPAGE) $(SYMLINK) @@ -26,7 +24,7 @@ install: _all PREFIXDIRS $(TF) LIBRARY $(MANPAGE) $(SYMLINK) @echo '## TinyFugue installation successful.' @echo '## tf binary: $(TF)' @echo '## library: $(TF_LIBDIR)' -# @echo '## manpage: $(MANPAGE)' + @echo '## manpage: $(MANPAGE)' @DIR=`echo $(TF) | sed 's;/[^/]*$$;;'`; \ echo ":$(PATH):" | egrep ":$${DIR}:" >/dev/null 2>&1 || { \ echo "##"; \ @@ -49,37 +47,16 @@ all files: _all @echo '## Use "$(MAKE) install" to install:' @echo '## tf binary: $(TF)' @echo '## library: $(TF_LIBDIR)' -# @echo '## manpage: $(MANPAGE)' + @echo '## manpage: $(MANPAGE)' -_all: tf$(X) ../tf-lib/tf-help.idx +_all: tf$(X) ../tf-lib/tf-help.idx _failmsg: -# @echo '#####################################################' -# @echo '## TinyFugue installation FAILED.' -# @echo '## See README for help.' -# @if [ "$(STD_C)" != "1" ]; then \ -# echo '## '; \ -# echo '## TF requires a standard (ANSI/ISO 9889-1990) C compiler.'; \ -# echo '## The standard has existed since 1989, and gcc is freely'; \ -# echo '## available for many platforms, so there is really no'; \ -# echo '## excuse for not having a standard compiler at this time.'; \ -# echo '## If your system does not have one, you should complain'; \ -# echo '## strongly to the vendor or administrator. Do not bother'; \ -# echo '## contacting the author of TF.'; \ -# elif [ "$(CC)" = "gcc" ]; then \ -# echo '## '; \ -# echo '## Perhaps $(CC) is not configured correctly. Before'; \ -# echo '## contacting the TF author, try setting the environment'; \ -# echo '## variable CC to "cc", and run ./configure again.'; \ -# fi - -pcre: -# ranlib is required by MacOS X, maybe others - cd pcre-2.08 && \ - $(MAKE) CC='$(CC)' CFLAGS='-O' O=o libpcre.a && \ - $(RANLIB) libpcre.a - -TF tf$(X): $(OBJS) $(BUILDERS) $(PCRE) + @echo '#####################################################' + @echo '## TinyFugue installation FAILED.' + @echo '## See README for help.' + +TF tf$(X): $(OBJS) $(BUILDERS) $(CC) $(LDFLAGS) -o tf$(X) $(OBJS) $(LIBS) -lpcre # @# Some stupid linkers return ok status even if they fail. @test -f "tf$(X)" @@ -87,8 +64,8 @@ TF tf$(X): $(OBJS) $(BUILDERS) $(PCRE) -test -z "$(STRIP)" || $(STRIP) tf$(X) || true PREFIXDIRS: - test -d "$(bindir)" || mkdir $(bindir) - test -d "$(datadir)" || mkdir $(datadir) + test -d "$(bindir)" || mkdir -p $(bindir) + test -d "$(datadir)" || mkdir -p $(datadir) install_TF $(TF): tf$(X) $(BUILDERS) -@rm -f $(TF) @@ -98,16 +75,17 @@ install_TF $(TF): tf$(X) $(BUILDERS) SYMLINK $(SYMLINK): $(TF) test -z "$(SYMLINK)" || { rm -f $(SYMLINK) && ln -s $(TF) $(SYMLINK); } +# There's a lot of unecessary steps below here. + LIBRARY $(TF_LIBDIR): ../tf-lib/tf-help ../tf-lib/tf-help.idx @echo '## Creating library directory...' # @# Overly simplified shell commands, to avoid problems on ultrix -@test -n "$(TF_LIBDIR)" || echo "TF_LIBDIR is undefined." test -n "$(TF_LIBDIR)" - test -d "$(TF_LIBDIR)" || mkdir $(TF_LIBDIR) + test -d "$(TF_LIBDIR)" || mkdir -p $(TF_LIBDIR) -@test -d "$(TF_LIBDIR)" || echo "Can't make $(TF_LIBDIR) directory. See if" -@test -d "$(TF_LIBDIR)" || echo "there is already a file with that name." test -d "$(TF_LIBDIR)" -# # @#rm -f $(TF_LIBDIR)/*; # wrong: this would remove local.tf, etc. @echo '## Copying library files...' cd ../tf-lib; \ @@ -133,6 +111,7 @@ LIBRARY $(TF_LIBDIR): ../tf-lib/tf-help ../tf-lib/tf-help.idx rm -f factorial.tf; ln -s factoral.tf factorial.tf; \ rm -f file-xfer.tf; ln -s filexfer.tf file-xfer.tf; \ rm -f local.tf.sample; ln -s local-eg.tf local.tf.sample; \ + rm -f mylib.tf; ln -s utilities.tf mylib.tf; \ rm -f pref-shell.tf; ln -s psh.tf pref-shell.tf; \ rm -f space_page.tf; ln -s spc-page.tf space_page.tf; \ rm -f speedwalk.tf; ln -s spedwalk.tf speedwalk.tf; \ @@ -140,13 +119,16 @@ LIBRARY $(TF_LIBDIR): ../tf-lib/tf-help ../tf-lib/tf-help.idx rm -f worldqueue.tf; ln -s world-q.tf worldqueue.tf; makehelp: makehelp.c - $(CC) $(CFLAGS) -o makehelp makehelp.c + $(CC) $(CFLAGS) $(LDFLAGS) -o makehelp makehelp.c __always__: ../tf-lib/tf-help: __always__ if test -d ../help; then cd ../help; $(MAKE) tf-help; fi - if test -d ../help; then cp ../help/tf-help ../tf-lib; fi +# Skip this step for now. +# Currently the HTML documents are the least up to date, so they +# shouldn't be blowing away the most up to date documents. +# if test -d ../help; then cp ../help/tf-help ../tf-lib; fi ../tf-lib/tf-help.idx: ../tf-lib/tf-help makehelp $(MAKE) -f ../unix/unix.mak CC='$(CC)' CFLAGS='$(CFLAGS)' makehelp @@ -172,7 +154,6 @@ uninstall: clean distclean cleanest: cd ..; make -f unix/Makefile $@ - # development stuff, not necessarily portable. tags: *.[ch] diff --git a/unix/vars.mak.in b/unix/vars.mak.in index 7c49fe2..e5fcb05 100644 --- a/unix/vars.mak.in +++ b/unix/vars.mak.in @@ -1,7 +1,6 @@ -# $Id: vars.mak.in,v 35004.13 2007/01/13 23:12:39 kkeys Exp $ ######################################################################## # TinyFugue - programmable mud client -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys +# Copyright (C) 1993-2007 Ken Keys (kenkeys@users.sourceforge.net) # # TinyFugue (aka "tf") is protected under the terms of the GNU # General Public License. See the file "COPYING" for details. @@ -11,14 +10,15 @@ ######################################################################## # @configure_input@ - -prefix = @prefix@ -exec_prefix= @exec_prefix@ -bindir = @bindir@ -datadir = @datadir@ -mandir = @mandir@ +prefix = ${DESTDIR}@prefix@ +exec_prefix= ${DESTDIR}@exec_prefix@ +bindir = ${DESTDIR}@bindir@ +datadir = ${DESTDIR}@datadir@ +mandir = ${DESTDIR}@mandir@ +datarootdir= ${DESTDIR}@datarootdir@ TFVERSION = @TFVERSION@ +TFVER = @TFVER@ X = @EXEEXT@ O = @OBJEXT@ @SET_MAKE@ @@ -28,14 +28,14 @@ TF = ${bindir}/@EXENAME@${X} # already exist in the environment. TF_LIBDIR = ${datadir}/@LIBNAME@ SYMLINK = @SYMLINK@ -# MANPAGE = ${mandir}/man1/tf.1 -# MANTYPE = @MANTYPE@ +MANPAGE = ${mandir}/man1/tf.1 +MANTYPE = @MANTYPE@ MODE = @MODE@ CC = @CC@ -CFLAGS = @CFLAGS@ @CPPFLAGS@ +CFLAGS = @CFLAGS@ @CPPFLAGS@ @ICU_CFLAGS@ LDFLAGS = @LDFLAGS@ -STD_C = @STD_C@ STRIP = @STRIP@ RANLIB = @RANLIB@ -LIBS = @LIBS@ +LIBS = @LIBS@ @ICU_LIBS@ OTHER_OBJS = @OTHER_OBJS@ + diff --git a/win32/README b/win32/README deleted file mode 100644 index 24de655..0000000 --- a/win32/README +++ /dev/null @@ -1,25 +0,0 @@ - TinyFugue for Win32 - - -The official release of TF for win32 is available only in source form. -To compile it, you will need the Cygwin Development Kit (cdk.exe), -available at http://www.cygnus.com/misc/gnu-win32/. Once you have the -CDK installed, follow the instructions for compiling TF under UNIX. - -Unofficial binary releases may be available. Check -http://tinyfugue.sourceforge.net/ for more information. - -There are several known problems with the win32 version of tf, mostly due -to shortcomings of cygwin: - * Scrolling in visual mode is jumpy. - * /quote ! (and code that calls it, like /sys) is not supported. - * $COMPRESS_READ is not supported. - * Nonblocking hostname resolution (%gethostbyname) is not supported. - * The flash attribute (-af) does not work. - - -Note that TF (and all cygwin applications) use "//X" notation instead of -"X:" to indicate drives in paths, and slashes instead of backslashes -to separate path components. For example, a DOS path of "C:\foo\bar" -should be written "//c/foo/bar" in cygwin. -